drm/panel-simple: When using panel-dpi, update desc
authorDave Stevenson <dave.stevenson@raspberrypi.com>
Thu, 2 Dec 2021 18:13:02 +0000 (18:13 +0000)
committerPhil Elwell <8911409+pelwell@users.noreply.github.com>
Fri, 3 Dec 2021 13:00:19 +0000 (13:00 +0000)
When using the "panel-dpi" compatible string, desc as passed
from DT is a dumy entry, and panel_dpi_probe allocates a new
one and attaches it to the panel.
However panel_simple_probe has already taken a local copy of
the variable, which means all the validation is done against
the empty dummy structure, not the configured data.

Update the local variable after panel_dpi_probe.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/panel/panel-simple.c

index c0cd50e..81f8747 100644 (file)
@@ -559,6 +559,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);