dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Fix error returned by program_hpd_filter
@ 2019-11-17 17:22 Aditya Pakki
  2019-11-17 17:22 ` Aditya Pakki
  2019-12-31 15:08 ` Harry Wentland
  0 siblings, 2 replies; 3+ messages in thread
From: Aditya Pakki @ 2019-11-17 17:22 UTC (permalink / raw)
  To: pakki001
  Cc: kjlu, Harry Wentland, Leo Li, Alex Deucher, Christian König,
	David (ChunMing) Zhou, David Airlie, Daniel Vetter,
	Bhawanpreet Lakha, Anthony Koo, Jun Lei, David Francis,
	Eric Yang, Nikola Cornij, Eric Bernstein, Chris Park,
	Wenjing Liu, David Galiffi, amd-gfx, dri-devel, linux-kernel

program_hpd_filter() currently fails to check for the errors
returned in construct(). This patch returns error in
case of failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index ca20b150afcc..bbb648a50c41 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1379,9 +1379,8 @@ static bool construct(
 	 * If GPIO isn't programmed correctly HPD might not rise or drain
 	 * fast enough, leading to bounces.
 	 */
-	program_hpd_filter(link);
+	return program_hpd_filter(link);
 
-	return true;
 device_tag_fail:
 	link->link_enc->funcs->destroy(&link->link_enc);
 link_enc_create_fail:
-- 
2.17.1

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

* [PATCH] drm/amd/display: Fix error returned by program_hpd_filter
  2019-11-17 17:22 [PATCH] drm/amd/display: Fix error returned by program_hpd_filter Aditya Pakki
@ 2019-11-17 17:22 ` Aditya Pakki
  2019-12-31 15:08 ` Harry Wentland
  1 sibling, 0 replies; 3+ messages in thread
From: Aditya Pakki @ 2019-11-17 17:22 UTC (permalink / raw)
  To: pakki001
  Cc: dri-devel, Chris Park, Eric Yang, Leo Li, Bhawanpreet Lakha,
	David Francis, kjlu, linux-kernel, amd-gfx, Nikola Cornij,
	David Airlie, Eric Bernstein, David Galiffi, Alex Deucher,
	Wenjing Liu, Jun Lei, Christian König, Anthony Koo

program_hpd_filter() currently fails to check for the errors
returned in construct(). This patch returns error in
case of failure.

Signed-off-by: Aditya Pakki <pakki001@umn.edu>
---
 drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
index ca20b150afcc..bbb648a50c41 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
@@ -1379,9 +1379,8 @@ static bool construct(
 	 * If GPIO isn't programmed correctly HPD might not rise or drain
 	 * fast enough, leading to bounces.
 	 */
-	program_hpd_filter(link);
+	return program_hpd_filter(link);
 
-	return true;
 device_tag_fail:
 	link->link_enc->funcs->destroy(&link->link_enc);
 link_enc_create_fail:
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/amd/display: Fix error returned by program_hpd_filter
  2019-11-17 17:22 [PATCH] drm/amd/display: Fix error returned by program_hpd_filter Aditya Pakki
  2019-11-17 17:22 ` Aditya Pakki
@ 2019-12-31 15:08 ` Harry Wentland
  1 sibling, 0 replies; 3+ messages in thread
From: Harry Wentland @ 2019-12-31 15:08 UTC (permalink / raw)
  To: Aditya Pakki
  Cc: dri-devel, Chris Park, Eric Yang, Leo Li, Bhawanpreet Lakha,
	David Francis, kjlu, linux-kernel, amd-gfx, Nikola Cornij,
	David Airlie, Eric Bernstein, David Galiffi, Alex Deucher,
	Wenjing Liu, Jun Lei, Christian König, Anthony Koo

On 2019-11-17 12:22 p.m., Aditya Pakki wrote:
> program_hpd_filter() currently fails to check for the errors
> returned in construct(). This patch returns error in
> case of failure.
> 
> Signed-off-by: Aditya Pakki <pakki001@umn.edu>
> ---
>  drivers/gpu/drm/amd/display/dc/core/dc_link.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link.c b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> index ca20b150afcc..bbb648a50c41 100644
> --- a/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> +++ b/drivers/gpu/drm/amd/display/dc/core/dc_link.c
> @@ -1379,9 +1379,8 @@ static bool construct(
>  	 * If GPIO isn't programmed correctly HPD might not rise or drain
>  	 * fast enough, leading to bounces.
>  	 */
> -	program_hpd_filter(link);
> +	return program_hpd_filter(link);

We don't want program_hpd_filter to become a fatal error, which this
would do.

Though it would be good to print a warning if program_hpd_filter fails
as it's unexpected and might lead to bugs with some displays. In many
cases failing to program the HPD filter won't lead to adverse behavior.

Harry

>  
> -	return true;
>  device_tag_fail:
>  	link->link_enc->funcs->destroy(&link->link_enc);
>  link_enc_create_fail:
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-12-31 15:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-17 17:22 [PATCH] drm/amd/display: Fix error returned by program_hpd_filter Aditya Pakki
2019-11-17 17:22 ` Aditya Pakki
2019-12-31 15:08 ` Harry Wentland

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).