[PATCH 19/19] drm: Make passing of format info to drm_helper_mode_fill_fb_struct() mandatory

Ville Syrjala ville.syrjala at linux.intel.com
Thu Apr 10 16:32:18 UTC 2025


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Now that everyone passes along the format info to
drm_helper_mode_fill_fb_struct() we can make this behaviour
mandatory and drop the extra lookup.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/drm_modeset_helper.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_modeset_helper.c b/drivers/gpu/drm/drm_modeset_helper.c
index ae2a83ecb1cf..3c153d420822 100644
--- a/drivers/gpu/drm/drm_modeset_helper.c
+++ b/drivers/gpu/drm/drm_modeset_helper.c
@@ -86,8 +86,7 @@ void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
 	int i;
 
 	fb->dev = dev;
-	fb->format = info ? : drm_get_format_info(dev, mode_cmd->pixel_format,
-						  mode_cmd->modifier[0]);
+	fb->format = info;
 	fb->width = mode_cmd->width;
 	fb->height = mode_cmd->height;
 	for (i = 0; i < 4; i++) {
-- 
2.49.0



More information about the dri-devel mailing list