All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes
@ 2015-06-04 18:04 Doug Anderson
  2015-06-05  6:15 ` Yakir
  2015-06-05 10:02   ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Doug Anderson @ 2015-06-04 18:04 UTC (permalink / raw)
  To: Philipp Zabel, Russell King, Thierry Reding
  Cc: Doug Anderson, airlied, andy.yan, ykk, fabio.estevam, dri-devel,
	linux-kernel

The dw_hdmi_connector_get_modes() function accidentally forgets to
return the number of modes it added, although it has this information
stored in a local variable.  Let's fix that.

Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
could get confused and always call drm_add_modes_noedid().  That's not
right.

Signed-off-by: Doug Anderson <dianders@chromium.org>
---
 drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
index 594f84c..816d104 100644
--- a/drivers/gpu/drm/bridge/dw_hdmi.c
+++ b/drivers/gpu/drm/bridge/dw_hdmi.c
@@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
 	struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
 					     connector);
 	struct edid *edid;
-	int ret;
+	int ret = 0;
 
 	if (!hdmi->ddc)
 		return 0;
@@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
 		dev_dbg(hdmi->dev, "failed to get edid\n");
 	}
 
-	return 0;
+	return ret;
 }
 
 static enum drm_mode_status
-- 
2.2.0.rc0.207.ga3a616c


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

* Re: [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes
  2015-06-04 18:04 [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes Doug Anderson
@ 2015-06-05  6:15 ` Yakir
  2015-06-05 10:02   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Yakir @ 2015-06-05  6:15 UTC (permalink / raw)
  To: Doug Anderson, Philipp Zabel, Russell King, Thierry Reding
  Cc: andy.yan, fabio.estevam, dri-devel, linux-kernel


[-- Attachment #1.1: Type: text/plain, Size: 2346 bytes --]

Doug,

在 2015/6/5 2:04, Doug Anderson 写道:
> The dw_hdmi_connector_get_modes() function accidentally forgets to
> return the number of modes it added, although it has this information
> stored in a local variable.  Let's fix that.
>
> Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
> could get confused and always call drm_add_modes_noedid().  That's not
> right.
>
> Signed-off-by: Doug Anderson<dianders@chromium.org>

Test-by: Yakir Yang <ykk@rock-chips.com>

Thanks for your patch, it looks good to me. I And I test it on my 1080p TV,
found that the 800x600@56Hz resolution which don't indicate in edid would no
longer report, that is right :)

33    31    connected    HDMI-A    510x290        17    31
   modes:
     name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot)
   800x600 60 800 840 968 1056 600 601 605 628 flags: phsync, pvsync; 
type: driver
   800x600 56 800 824 896 1024 600 601 603 625 flags: phsync, pvsync; 
type: driver
   640x480 60 640 656 752 800 480 490 492 525 flags: nhsync, nvsync; 
type: driver
   640x480 60 640 656 752 800 480 489 492 525 flags: nhsync, nvsync; 
type: driver

First detailed timing is preferred timing
Established timings supported:
   720x400@70Hz
   640x480@60Hz
   640x480@75Hz
   800x600@60Hz
   800x600@75Hz
   1024x768@60Hz
   1024x768@75Hz
   1280x1024@75Hz
Standard timings supported:
   1152x864@75Hz
   1280x1024@60Hz
   1920x1080@60Hz

Thanks !
- Yakir

> ---
>   drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/dw_hdmi.c b/drivers/gpu/drm/bridge/dw_hdmi.c
> index 594f84c..816d104 100644
> --- a/drivers/gpu/drm/bridge/dw_hdmi.c
> +++ b/drivers/gpu/drm/bridge/dw_hdmi.c
> @@ -1395,7 +1395,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
>   	struct dw_hdmi *hdmi = container_of(connector, struct dw_hdmi,
>   					     connector);
>   	struct edid *edid;
> -	int ret;
> +	int ret = 0;
>   
>   	if (!hdmi->ddc)
>   		return 0;
> @@ -1412,7 +1412,7 @@ static int dw_hdmi_connector_get_modes(struct drm_connector *connector)
>   		dev_dbg(hdmi->dev, "failed to get edid\n");
>   	}
>   
> -	return 0;
> +	return ret;
>   }
>   
>   static enum drm_mode_status


[-- Attachment #1.2: Type: text/html, Size: 3348 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

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

* Re: [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes
  2015-06-04 18:04 [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes Doug Anderson
@ 2015-06-05 10:02   ` Thierry Reding
  2015-06-05 10:02   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-06-05 10:02 UTC (permalink / raw)
  To: Doug Anderson
  Cc: Philipp Zabel, Russell King, airlied, andy.yan, ykk,
	fabio.estevam, dri-devel, linux-kernel

On Thu, Jun 04, 2015 at 11:04:36AM -0700, Doug Anderson wrote:
> The dw_hdmi_connector_get_modes() function accidentally forgets to
> return the number of modes it added, although it has this information
> stored in a local variable.  Let's fix that.
> 
> Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
> could get confused and always call drm_add_modes_noedid().  That's not
> right.
> 
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
>  drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

Thierry

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

* Re: [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes
@ 2015-06-05 10:02   ` Thierry Reding
  0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2015-06-05 10:02 UTC (permalink / raw)
  To: Doug Anderson
  Cc: fabio.estevam, linux-kernel, dri-devel, ykk, Russell King, andy.yan

On Thu, Jun 04, 2015 at 11:04:36AM -0700, Doug Anderson wrote:
> The dw_hdmi_connector_get_modes() function accidentally forgets to
> return the number of modes it added, although it has this information
> stored in a local variable.  Let's fix that.
> 
> Without this fix, drm_helper_probe_single_connector_modes_merge_bits()
> could get confused and always call drm_add_modes_noedid().  That's not
> right.
> 
> Signed-off-by: Doug Anderson <dianders@chromium.org>
> ---
>  drivers/gpu/drm/bridge/dw_hdmi.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Applied, thanks.

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

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

end of thread, other threads:[~2015-06-05 10:03 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-04 18:04 [PATCH] drm: bridge/dw_hdmi: Return num_modes in dw_hdmi_connector_get_modes Doug Anderson
2015-06-05  6:15 ` Yakir
2015-06-05 10:02 ` Thierry Reding
2015-06-05 10:02   ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.