diff options
| author | Imre Deak <[email protected]> | 2025-08-05 17:57:50 +0000 |
|---|---|---|
| committer | Imre Deak <[email protected]> | 2025-08-06 12:26:14 +0000 |
| commit | f8f6e72fe28595969829d63db93ecaa56a0c2811 (patch) | |
| tree | 2f87d2d3562f2c915268962c634757e42a8bd6d2 /drivers/gpu/drm/omapdrm/omap_fb.h | |
| parent | drm/bridge: document HDMI CEC callbacks (diff) | |
| download | kernel-f8f6e72fe28595969829d63db93ecaa56a0c2811.tar.gz kernel-f8f6e72fe28595969829d63db93ecaa56a0c2811.zip | |
drm/omap: Pass along the format info from .fb_create() to drm_helper_mode_fill_fb_struct()
Plumb the format info from .fb_create() all the way to
drm_helper_mode_fill_fb_struct() to avoid the redundant
lookup.
For the fbdev case a manual drm_get_format_info() lookup
is needed.
The patch is based on the driver parts of the patchset at Link:
below, which missed converting the omap driver.
Due to the absence of this change in the patchset at Link:, after the
Fixed: commit below, omap_framebuffer_init() ->
drm_helper_mode_fill_fb_struct() set drm_framebuffer::format incorrectly
to NULL, which lead to the !fb->format WARN() in drm_framebuffer_init()
and causing framebuffer creation to fail. This patch fixes both of these
issues.
v2: Amend the commit log mentioning the functional issues the patch
fixes. (Tomi)
Cc: Ville Syrjälä <[email protected]>
Cc: Tomi Valkeinen <[email protected]>
Cc: Thomas Zimmermann <[email protected]>
Cc: Maarten Lankhorst <[email protected]>
Cc: Maxime Ripard <[email protected]>
Fixes: 41ab92d35ccd ("drm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory")
Reported-by: Mark Brown <[email protected]>
Closes: https://lore.kernel.org/all/[email protected]
Link: https://lore.kernel.org/all/[email protected]
Tested-by: Mark Brown <[email protected]>
Tested-by: Linux Kernel Functional Testing <[email protected]>
Acked-by: Alex Deucher <[email protected]>
Reviewed-by: Tomi Valkeinen <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_fb.h')
| -rw-r--r-- | drivers/gpu/drm/omapdrm/omap_fb.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.h b/drivers/gpu/drm/omapdrm/omap_fb.h index 0873f953cf1d..e6010302a22b 100644 --- a/drivers/gpu/drm/omapdrm/omap_fb.h +++ b/drivers/gpu/drm/omapdrm/omap_fb.h @@ -13,6 +13,7 @@ struct drm_connector; struct drm_device; struct drm_file; struct drm_framebuffer; +struct drm_format_info; struct drm_gem_object; struct drm_mode_fb_cmd2; struct drm_plane_state; @@ -23,6 +24,7 @@ struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev, struct drm_file *file, const struct drm_format_info *info, const struct drm_mode_fb_cmd2 *mode_cmd); struct drm_framebuffer *omap_framebuffer_init(struct drm_device *dev, + const struct drm_format_info *info, const struct drm_mode_fb_cmd2 *mode_cmd, struct drm_gem_object **bos); int omap_framebuffer_pin(struct drm_framebuffer *fb); void omap_framebuffer_unpin(struct drm_framebuffer *fb); |
