[Public] > -----Original Message----- > From: amd-gfx <[email protected]> On Behalf Of Ville > Syrjala > Sent: Tuesday, July 1, 2025 5:07 AM > To: [email protected] > Cc: [email protected]; [email protected]; Deucher, > Alexander <[email protected]>; [email protected]; > Thomas Zimmermann <[email protected]> > Subject: [PATCH v2 09/19] drm/amdgpu: Pass along the format info from > .fb_create() to drm_helper_mode_fill_fb_struct() > > From: Ville Syrjälä <[email protected]> > > 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]> > Signed-off-by: Ville Syrjälä <[email protected]>
Series is: Acked-by: Alex Deucher <[email protected]> Feel free to take the amdgpu/radeon bits via drm-misc. Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_display.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > index 4cbbae543e34..2bc0d9a2509f 100644 > --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_display.c > @@ -1196,13 +1196,14 @@ static int amdgpu_display_get_fb_info(const struct > amdgpu_framebuffer *amdgpu_fb static int > amdgpu_display_gem_fb_verify_and_init(struct drm_device *dev, > struct amdgpu_framebuffer *rfb, > struct drm_file *file_priv, > + const struct drm_format_info > *info, > const struct drm_mode_fb_cmd2 > *mode_cmd, > struct drm_gem_object *obj) > { > int ret; > > rfb->base.obj[0] = obj; > - drm_helper_mode_fill_fb_struct(dev, &rfb->base, NULL, mode_cmd); > + drm_helper_mode_fill_fb_struct(dev, &rfb->base, info, mode_cmd); > /* Verify that the modifier is supported. */ > if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format, > mode_cmd->modifier[0])) { > @@ -1331,7 +1332,7 @@ amdgpu_display_user_framebuffer_create(struct > drm_device *dev, > } > > ret = amdgpu_display_gem_fb_verify_and_init(dev, amdgpu_fb, file_priv, > - mode_cmd, obj); > + info, mode_cmd, obj); > if (ret) { > kfree(amdgpu_fb); > drm_gem_object_put(obj); > -- > 2.49.0
