diff mbox series

drm/panel: simple: Assign data from panel_dpi_probe() correctly

Message ID 20220201110153.3479-1-cniedermaier@dh-electronics.com (mailing list archive)
State New, archived
Headers show
Series drm/panel: simple: Assign data from panel_dpi_probe() correctly | expand

Commit Message

Christoph Niedermaier Feb. 1, 2022, 11:01 a.m. UTC
In the function panel_simple_probe() the pointer panel->desc is
assigned to the passed pointer desc. If function panel_dpi_probe()
is called panel->desc will be updated, but further on only desc
will be evaluated. So update the desc pointer to be able to use
the data from the function panel_dpi_probe().

Fixes: 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support")

Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
To: dri-devel@lists.freedesktop.org
---
 drivers/gpu/drm/panel/panel-simple.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Sam Ravnborg Feb. 4, 2022, 9:26 p.m. UTC | #1
On Tue, Feb 01, 2022 at 12:01:53PM +0100, Christoph Niedermaier wrote:
> In the function panel_simple_probe() the pointer panel->desc is
> assigned to the passed pointer desc. If function panel_dpi_probe()
> is called panel->desc will be updated, but further on only desc
> will be evaluated. So update the desc pointer to be able to use
> the data from the function panel_dpi_probe().
> 
> Fixes: 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support")
> 
> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
> Cc: Marek Vasut <marex@denx.de>
> Cc: Thierry Reding <thierry.reding@gmail.com>
> Cc: Sam Ravnborg <sam@ravnborg.org>
> Cc: David Airlie <airlied@linux.ie>
> Cc: Daniel Vetter <daniel@ffwll.ch>
> To: dri-devel@lists.freedesktop.org

Thanks for fixing this
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

> ---
>  drivers/gpu/drm/panel/panel-simple.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
> index 9e46db5e359c..3c08f9827acf 100644
> --- a/drivers/gpu/drm/panel/panel-simple.c
> +++ b/drivers/gpu/drm/panel/panel-simple.c
> @@ -588,6 +588,7 @@ static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
>  		err = panel_dpi_probe(dev, panel);
>  		if (err)
>  			goto free_ddc;
> +		desc = panel->desc;
>  	} else {
>  		if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
>  			panel_simple_parse_panel_timing_node(dev, panel, &dt);
> -- 
> 2.11.0
Marek Vasut Feb. 6, 2022, 9:59 a.m. UTC | #2
On 2/4/22 22:26, Sam Ravnborg wrote:
> On Tue, Feb 01, 2022 at 12:01:53PM +0100, Christoph Niedermaier wrote:
>> In the function panel_simple_probe() the pointer panel->desc is
>> assigned to the passed pointer desc. If function panel_dpi_probe()
>> is called panel->desc will be updated, but further on only desc
>> will be evaluated. So update the desc pointer to be able to use
>> the data from the function panel_dpi_probe().
>>
>> Fixes: 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support")
>>
>> Signed-off-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
>> Cc: Marek Vasut <marex@denx.de>
>> Cc: Thierry Reding <thierry.reding@gmail.com>
>> Cc: Sam Ravnborg <sam@ravnborg.org>
>> Cc: David Airlie <airlied@linux.ie>
>> Cc: Daniel Vetter <daniel@ffwll.ch>
>> To: dri-devel@lists.freedesktop.org
> 
> Thanks for fixing this
> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>

Applied to drm-misc/drm-misc-fixes , thanks.
diff mbox series

Patch

diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c
index 9e46db5e359c..3c08f9827acf 100644
--- a/drivers/gpu/drm/panel/panel-simple.c
+++ b/drivers/gpu/drm/panel/panel-simple.c
@@ -588,6 +588,7 @@  static int panel_simple_probe(struct device *dev, const struct panel_desc *desc)
 		err = panel_dpi_probe(dev, panel);
 		if (err)
 			goto free_ddc;
+		desc = panel->desc;
 	} else {
 		if (!of_get_display_timing(dev->of_node, "panel-timing", &dt))
 			panel_simple_parse_panel_timing_node(dev, panel, &dt);