Merge tag 'amd-drm-fixes-5.13-2021-05-05' of https://gitlab.freedesktop.org/agd5f...
authorDave Airlie <airlied@redhat.com>
Fri, 7 May 2021 02:44:50 +0000 (12:44 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 7 May 2021 02:44:51 +0000 (12:44 +1000)
amd-drm-fixes-5.13-2021-05-05:

amdgpu:
- MPO hang workaround
- Fix for concurrent VM flushes on vega/navi
- dcefclk is not adjustable on navi1x and newer
- MST HPD debugfs fix
- Suspend/resumes fixes
- Register VGA clients late in case driver fails to load
- Fix GEM leak in user framebuffer create
- Add support for polaris12 with 32 bit memory interface
- Fix duplicate cursor issue when using overlay
- Fix corruption with tiled surfaces on VCN3
- Add BO size and stride check to fix BO size verification

radeon:
- Fix off-by-one in power state parsing
- Fix possible memory leak in power state parsing

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210506033929.3875-1-alexander.deucher@amd.com
1  2 
drivers/gpu/drm/amd/amdgpu/amdgpu_display.c
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_debugfs.c
drivers/gpu/drm/amd/pm/amdgpu_pm.c

@@@ -902,25 -1070,10 +1070,23 @@@ int amdgpu_display_gem_fb_verify_and_in
        int ret;
  
        rfb->base.obj[0] = obj;
-       /* Verify that bo size can fit the fb size. */
-       ret = drm_gem_fb_init_with_funcs(dev, &rfb->base, file_priv, mode_cmd,
-                                        &amdgpu_fb_funcs);
+       drm_helper_mode_fill_fb_struct(dev, &rfb->base, mode_cmd);
+       ret = drm_framebuffer_init(dev, &rfb->base, &amdgpu_fb_funcs);
        if (ret)
                goto err;
 +      /* Verify that the modifier is supported. */
 +      if (!drm_any_plane_has_format(dev, mode_cmd->pixel_format,
 +                                    mode_cmd->modifier[0])) {
 +              struct drm_format_name_buf format_name;
 +              drm_dbg_kms(dev,
 +                          "unsupported pixel format %s / modifier 0x%llx\n",
 +                          drm_get_format_name(mode_cmd->pixel_format,
 +                                              &format_name),
 +                          mode_cmd->modifier[0]);
 +
 +              ret = -EINVAL;
 +              goto err;
 +      }
  
        ret = amdgpu_display_framebuffer_init(dev, rfb, mode_cmd, obj);
        if (ret)
Simple merge