]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/panel: panel-simple: Make panel_simple_probe return its panel
authorMaxime Ripard <mripard@kernel.org>
Thu, 26 Jun 2025 10:05:01 +0000 (12:05 +0200)
committerMaxime Ripard <mripard@kernel.org>
Fri, 27 Jun 2025 09:22:47 +0000 (11:22 +0200)
commit921c41e509746aabecbbb2595ebf41a9d8fdc4e2
tree64b032e2975bd8c98f3b5387a3eb4a6f687dad68
parent073667fce1667eab31d6a62cdd7fb795933ec7e8
drm/panel: panel-simple: Make panel_simple_probe return its panel

In order to fix the regession introduced by commit de04bb0089a9
("drm/panel/panel-simple: Use the new allocation in place of
devm_kzalloc()"), we need to move the panel_desc lookup into the common
panel_simple_probe() function.

There's two callers for that function, the probe implementations of the
platform and MIPI-DSI drivers panel-simple implements.

The MIPI-DSI driver's probe will need to access the current panel_desc
to initialize properly, which won't be possible anymore if we make that
lookup in panel_simple_probe().

However, we can make panel_simple_probe() return the initialized
panel_simple structure it allocated, which will contain a pointer to the
associated panel_desc in its desc field.

This doesn't fix de04bb0089a9 ("drm/panel/panel-simple: Use the new
allocation in place of devm_kzalloc()") still, but makes progress
towards that goal.

Fixes: de04bb0089a9 ("drm/panel/panel-simple: Use the new allocation in place of devm_kzalloc()")
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Tested-by: Francesco Dolcini <francesco.dolcini@toradex.com> # Toradex Colibri iMX6
Link: https://lore.kernel.org/r/20250626-drm-panel-simple-fixes-v2-3-5afcaa608bdc@kernel.org
Signed-off-by: Maxime Ripard <mripard@kernel.org>
drivers/gpu/drm/panel/panel-simple.c