From patchwork Wed Sep 25 19:31:54 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Hilman X-Patchwork-Id: 174420 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp1065846ill; Wed, 25 Sep 2019 12:31:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqy7T1J784r/d2lqBzqS+I/z0kpEOJ8QTPIXuuLNqShrMXA49npAAOhO/GvWAmDz4YtW3Xqb X-Received: by 2002:a63:7016:: with SMTP id l22mr911745pgc.443.1569439916706; Wed, 25 Sep 2019 12:31:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569439916; cv=none; d=google.com; s=arc-20160816; b=GrHPSIivrk3s2Byjk3d/0XKZTtXfqj4htWU3xXGllvTgvC/S/Vf53dx8oQHQD0uWsB uTn8ZqUA4PlZlWkBJQKuSRfc4lUHo6sfb16qf6W6FUlCuc5LLc2nbAnqt77qQ/a+Ac8u va0D38Lu7vnQem+pE9dYjYjWMCF90ZhV7h4JOMwNELU4HngVwzkdXx322CR/JqgAiJHD /X+5Kf861sfM0jHmz+x+mrUGE4Y1W/rimJDj9cOZGFFYrQxt50nI2K0VYyhuU08463vG nGalhbIpIfTiTUX7p487SZirh3Mjgbyylu2KHItmjWH0Cu1a3uxbSGdPRHece1XOBqyY Zllw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:mime-version:message-id:date:subject:to:from :delivered-to; bh=cte1sRlDd1XC4EIjntTzDpMA7x1vn2i0k6JWiKdt+20=; b=Jw+ReOTJjKyq6471pvaEr9GidIzWTr2L3gwpFwP3YrgM9r1k50JYY0JcUD4ivKLMBT pE87IbU9+ouRy02ysAT6PV1WkwmAV7Qzfg7uRKOQANr6jZrIlsSpHqq+mqXDvzV3qgVe jT8lhVLaNtu7Cc2wG5klG98vfDRmcsEN1IxXbj7e05kkNWXZAtu/OTtxq4JsdmUZy1Tn QoPzkeghWENQzxecgTiMqQI0EqsKk0hHYmHiE3ijDWpII78G+XTd8UmPOiUNKpxHYG7U hpKzgizlDCnkopWi1eYP+dnTh3d5LyzFK3YT9vq0o6c1PSbe9RrMoaNaYXJKoSXc73kz 6fwQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id j15si444953pgs.543.2019.09.25.12.31.56 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 25 Sep 2019 12:31:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C12C76F534; Wed, 25 Sep 2019 19:31:55 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by gabe.freedesktop.org (Postfix) with ESMTPS id 84A616F51E for ; Wed, 25 Sep 2019 19:31:54 +0000 (UTC) Received: from localhost (c-71-197-186-152.hsd1.wa.comcast.net [71.197.186.152]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 531D321D7A; Wed, 25 Sep 2019 19:31:54 +0000 (UTC) From: Kevin Hilman To: Neil Armstrong , dri-devel@lists.freedesktop.org Subject: [PATCH] drm/meson: enable runtime PM Date: Wed, 25 Sep 2019 12:31:54 -0700 Message-Id: <20190925193154.20732-1-khilman@kernel.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1569439914; bh=tVJ3MnTdv85ltB6ucAQ46KlHKpnPNYJaGZPDutR3fp8=; h=From:To:Cc:Subject:Date:From; b=Jd9KEG6M9wIhSdq/pkhMiCLEGnUUrEvd/n5hgE/6vMLCwlxnCwwnVESoKRkVFnD9d eLdfreA03h5EA/fxmJlYh5I8+DuafRSO1ow8Jq8SRwnKGcHVjzmmHRvrG8Umz2v1Ob zXCEBpqOdLZxlSkcfIvKJDYbAGoGk+9t75R+9f8c= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Kevin Hilman Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Kevin Hilman On some SoCs, the VPU is in a power-domain and needs runtime PM enabled and used in order to keep the power domain on. Signed-off-by: Kevin Hilman --- drivers/gpu/drm/meson/meson_drv.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index 2310c96fff46..256b6a0e9c6b 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -274,6 +275,7 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) /* Hardware Initialization */ + pm_runtime_get_sync(dev); meson_vpu_init(priv); meson_venc_init(priv); meson_vpp_init(priv); @@ -416,6 +418,7 @@ static int meson_drv_probe(struct platform_device *pdev) struct device_node *ep, *remote; int count = 0; + pm_runtime_enable(&pdev->dev); for_each_endpoint_of_node(np, ep) { remote = of_graph_get_remote_port_parent(ep); if (!remote || !of_device_is_available(remote)) { @@ -440,6 +443,7 @@ static int meson_drv_probe(struct platform_device *pdev) } /* If no output endpoints were available, simply bail out */ + pm_runtime_disable(&pdev->dev); return 0; };