Skip to content

Commit b4d3607

Browse files
committed
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 <[email protected]> Cc: [email protected] Reviewed-by: Thomas Zimmermann <[email protected]> Acked-by: Alex Deucher <[email protected]> Signed-off-by: Ville Syrjälä <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 283da9e commit b4d3607

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_display.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1196,13 +1196,14 @@ static int amdgpu_display_get_fb_info(const struct amdgpu_framebuffer *amdgpu_fb
11961196
static int amdgpu_display_gem_fb_verify_and_init(struct drm_device *dev,
11971197
struct amdgpu_framebuffer *rfb,
11981198
struct drm_file *file_priv,
1199+
const struct drm_format_info *info,
11991200
const struct drm_mode_fb_cmd2 *mode_cmd,
12001201
struct drm_gem_object *obj)
12011202
{
12021203
int ret;
12031204

12041205
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);
12061207
/* Verify that the modifier is supported. */
12071208
if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format,
12081209
mode_cmd->modifier[0])) {
@@ -1331,7 +1332,7 @@ amdgpu_display_user_framebuffer_create(struct drm_device *dev,
13311332
}
13321333

13331334
ret = amdgpu_display_gem_fb_verify_and_init(dev, amdgpu_fb, file_priv,
1334-
mode_cmd, obj);
1335+
info, mode_cmd, obj);
13351336
if (ret) {
13361337
kfree(amdgpu_fb);
13371338
drm_gem_object_put(obj);

0 commit comments

Comments
 (0)