linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/stm: Fix leak of pixel clock enable in some error paths.
       [not found] <1497889685-27349-2-git-send-email-philippe.cornu@st.com>
@ 2017-06-22 17:56 ` Eric Anholt
  2017-06-22 17:56   ` [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support" Eric Anholt
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2017-06-22 17:56 UTC (permalink / raw)
  To: dri-devel, Philippe CORNU, Alexandre Torgue, Yannick Fertre
  Cc: linux-kernel, Eric Anholt

The clock gets enabled early on in init, since it's required in order
to read registers.  If only devm_clk_prepare_enable() was a thing!

Signed-off-by: Eric Anholt <eric@anholt.net>
---

This fixup, if you like, I would slip in before patch 1 of your series.

 drivers/gpu/drm/stm/ltdc.c | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 8aa05860029f..7d7e889f09c3 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -908,13 +908,15 @@ int ltdc_load(struct drm_device *ddev)
 
 	if (of_address_to_resource(np, 0, &res)) {
 		DRM_ERROR("Unable to get resource\n");
-		return -ENODEV;
+		ret = -ENODEV;
+		goto err;
 	}
 
 	ldev->regs = devm_ioremap_resource(dev, &res);
 	if (IS_ERR(ldev->regs)) {
 		DRM_ERROR("Unable to get ltdc registers\n");
-		return PTR_ERR(ldev->regs);
+		ret = PTR_ERR(ldev->regs);
+		goto err;
 	}
 
 	for (i = 0; i < MAX_IRQ; i++) {
@@ -927,7 +929,7 @@ int ltdc_load(struct drm_device *ddev)
 						dev_name(dev), ddev);
 		if (ret) {
 			DRM_ERROR("Failed to register LTDC interrupt\n");
-			return ret;
+			goto err;
 		}
 	}
 
@@ -942,7 +944,7 @@ int ltdc_load(struct drm_device *ddev)
 	if (ret) {
 		DRM_ERROR("hardware identifier (0x%08x) not supported!\n",
 			  ldev->caps.hw_version);
-		return ret;
+		goto err;
 	}
 
 	DRM_INFO("ltdc hw version 0x%08x - ready\n", ldev->caps.hw_version);
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support"
  2017-06-22 17:56 ` [PATCH 1/2] drm/stm: Fix leak of pixel clock enable in some error paths Eric Anholt
@ 2017-06-22 17:56   ` Eric Anholt
  2017-06-23 14:46     ` Philippe CORNU
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Anholt @ 2017-06-22 17:56 UTC (permalink / raw)
  To: dri-devel, Philippe CORNU, Alexandre Torgue, Yannick Fertre
  Cc: linux-kernel, Eric Anholt

Signed-off-by: Eric Anholt <eric@anholt.net>
---

This fixup would be squashed into patch 1 of your series.
 drivers/gpu/drm/stm/ltdc.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 7d7e889f09c3..d1d28348512b 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -953,7 +953,8 @@ int ltdc_load(struct drm_device *ddev)
 		bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DPI);
 		if (IS_ERR(bridge)) {
 			DRM_ERROR("Failed to create panel-bridge\n");
-			return PTR_ERR(bridge);
+			ret = PTR_ERR(bridge);
+			goto err;
 		}
 		ldev->is_panel_bridge = true;
 	}
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support"
  2017-06-22 17:56   ` [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support" Eric Anholt
@ 2017-06-23 14:46     ` Philippe CORNU
  2017-06-23 18:18       ` Eric Anholt
  0 siblings, 1 reply; 4+ messages in thread
From: Philippe CORNU @ 2017-06-23 14:46 UTC (permalink / raw)
  To: Eric Anholt, dri-devel, Alexandre TORGUE, Yannick FERTRE; +Cc: linux-kernel



On 06/22/2017 07:56 PM, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric@anholt.net>
> ---
> 
> This fixup would be squashed into patch 1 of your series.

Hi Eric,
and many thanks for the two patches, I will follow your suggestion for 
the v5 serie.
By the way, do you have more comments on the "drm/stm: ltdc: Add 
panel-bridge support" patch?
Many thanks :-)
Philippe

>   drivers/gpu/drm/stm/ltdc.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 7d7e889f09c3..d1d28348512b 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -953,7 +953,8 @@ int ltdc_load(struct drm_device *ddev)
>   		bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_DPI);
>   		if (IS_ERR(bridge)) {
>   			DRM_ERROR("Failed to create panel-bridge\n");
> -			return PTR_ERR(bridge);
> +			ret = PTR_ERR(bridge);
> +			goto err;
>   		}
>   		ldev->is_panel_bridge = true;
>   	}
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support"
  2017-06-23 14:46     ` Philippe CORNU
@ 2017-06-23 18:18       ` Eric Anholt
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Anholt @ 2017-06-23 18:18 UTC (permalink / raw)
  To: Philippe CORNU, dri-devel, Alexandre TORGUE, Yannick FERTRE; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 534 bytes --]

Philippe CORNU <philippe.cornu@st.com> writes:

> On 06/22/2017 07:56 PM, Eric Anholt wrote:
>> Signed-off-by: Eric Anholt <eric@anholt.net>
>> ---
>> 
>> This fixup would be squashed into patch 1 of your series.
>
> Hi Eric,
> and many thanks for the two patches, I will follow your suggestion for 
> the v5 serie.
> By the way, do you have more comments on the "drm/stm: ltdc: Add 
> panel-bridge support" patch?

I think that's all -- I was going to add my r-b and apply that one, when
I found this little nitpick.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-06-23 18:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1497889685-27349-2-git-send-email-philippe.cornu@st.com>
2017-06-22 17:56 ` [PATCH 1/2] drm/stm: Fix leak of pixel clock enable in some error paths Eric Anholt
2017-06-22 17:56   ` [PATCH 2/2] drm/stm: Fixup for "drm/stm: ltdc: Add panel-bridge support" Eric Anholt
2017-06-23 14:46     ` Philippe CORNU
2017-06-23 18:18       ` Eric Anholt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).