summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
diff options
context:
space:
mode:
authorHamza Mahfooz <hamza.mahfooz@amd.com>2022-11-15 11:58:45 -0500
committerAlex Deucher <alexander.deucher@amd.com>2022-12-02 10:04:05 -0500
commit30ebe41582d1ea5a7de990319f9e593dad4886f7 (patch)
tree01872b3bed7dfe3038dd4fb6ea4b11b78563ec73 /drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
parentfed58c70bb0764dda3085f2b21057e15209b6f9e (diff)
downloadlinux-30ebe41582d1ea5a7de990319f9e593dad4886f7.tar.gz
linux-30ebe41582d1ea5a7de990319f9e593dad4886f7.tar.bz2
linux-30ebe41582d1ea5a7de990319f9e593dad4886f7.zip
drm/amd/display: add FB_DAMAGE_CLIPS support
Currently, userspace doesn't have a way to communicate selective updates to displays. So, enable support for FB_DAMAGE_CLIPS for DCN ASICs newer than DCN301, convert DRM damage clips to dc dirty rectangles and fill them into dirty_rects in fill_dc_dirty_rects(). Reviewed-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Hamza Mahfooz <hamza.mahfooz@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
index e6854f7270a6..3c50b3ff7954 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c
@@ -1600,6 +1600,10 @@ int amdgpu_dm_plane_init(struct amdgpu_display_manager *dm,
drm_plane_create_rotation_property(plane, DRM_MODE_ROTATE_0,
supported_rotations);
+ if (dm->adev->ip_versions[DCE_HWIP][0] > IP_VERSION(3, 0, 1) &&
+ plane->type != DRM_PLANE_TYPE_CURSOR)
+ drm_plane_enable_fb_damage_clips(plane);
+
drm_plane_helper_add(plane, &dm_plane_helper_funcs);
#ifdef CONFIG_DRM_AMD_DC_HDR