Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/amdgpu: 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.

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: amd-gfx@lists.freedesktop.org
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20250701090722.13645-10-ville.syrjala@linux.intel.com

+3 -2
+3 -2
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
··· 1196 1196 static int amdgpu_display_gem_fb_verify_and_init(struct drm_device *dev, 1197 1197 struct amdgpu_framebuffer *rfb, 1198 1198 struct drm_file *file_priv, 1199 + const struct drm_format_info *info, 1199 1200 const struct drm_mode_fb_cmd2 *mode_cmd, 1200 1201 struct drm_gem_object *obj) 1201 1202 { 1202 1203 int ret; 1203 1204 1204 1205 rfb->base.obj[0] = obj; 1205 - drm_helper_mode_fill_fb_struct(dev, &rfb->base, NULL, mode_cmd); 1206 + drm_helper_mode_fill_fb_struct(dev, &rfb->base, info, mode_cmd); 1206 1207 /* Verify that the modifier is supported. */ 1207 1208 if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format, 1208 1209 mode_cmd->modifier[0])) { ··· 1332 1331 } 1333 1332 1334 1333 ret = amdgpu_display_gem_fb_verify_and_init(dev, amdgpu_fb, file_priv, 1335 - mode_cmd, obj); 1334 + info, mode_cmd, obj); 1336 1335 if (ret) { 1337 1336 kfree(amdgpu_fb); 1338 1337 drm_gem_object_put(obj);