[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20210629125736.414467-3-maxime@cerno.tech>
Date: Tue, 29 Jun 2021 14:57:34 +0200
From: Maxime Ripard <maxime@...no.tech>
To: dri-devel@...ts.freedesktop.org,
Daniel Vetter <daniel.vetter@...el.com>,
David Airlie <airlied@...ux.ie>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Thomas Zimmermann <tzimmermann@...e.de>,
Maxime Ripard <maxime@...no.tech>
Cc: linux-kernel@...r.kernel.org,
bcm-kernel-feedback-list@...adcom.com,
Boris Brezillon <bbrezillon@...nel.org>,
Emma Anholt <emma@...olt.net>,
Maxime Ripard <mripard@...nel.org>,
Dave Stevenson <dave.stevenson@...pberrypi.com>,
Hans Verkuil <hverkuil-cisco@...all.nl>,
Nicolas Saenz Julienne <nsaenz@...nel.org>,
Phil Elwell <phil@...pberrypi.com>,
Tim Gover <tim.gover@...pberrypi.com>,
Dom Cobley <dom@...pberrypi.com>,
linux-rpi-kernel@...ts.infradead.org
Subject: [PATCH 2/4] drm/vc4: hdmi: Put the device on error in pre_crtc_configure
In the vc4_hdmi_encoder_pre_crtc_configure() function error path we
never actually call pm_runtime_put() even though
pm_runtime_resume_and_get() is our very first call.
Fixes: 4f6e3d66ac52 ("drm/vc4: Add runtime PM support to the HDMI encoder driver")
Signed-off-by: Maxime Ripard <maxime@...no.tech>
---
drivers/gpu/drm/vc4/vc4_hdmi.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c
index 707fe43ffeea..b3db38d37550 100644
--- a/drivers/gpu/drm/vc4/vc4_hdmi.c
+++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
@@ -958,6 +958,7 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
if (ret) {
DRM_ERROR("Failed to set pixel bvb clock rate: %d\n", ret);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
+ pm_runtime_put(&vc4_hdmi->pdev->dev);
return;
}
@@ -965,6 +966,7 @@ static void vc4_hdmi_encoder_pre_crtc_configure(struct drm_encoder *encoder,
if (ret) {
DRM_ERROR("Failed to turn on pixel bvb clock: %d\n", ret);
clk_disable_unprepare(vc4_hdmi->pixel_clock);
+ pm_runtime_put(&vc4_hdmi->pdev->dev);
return;
}
--
2.31.1
Powered by blists - more mailing lists