summaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorShirish S2018-02-13 09:45:17 +0100
committerAlex Deucher2018-03-07 22:27:02 +0100
commit5449e07caa3a246c4ec79213978e70097e8b52aa (patch)
tree342454e1b7ef30ac4edf394e536d358ef82ab04e /drivers/gpu
parentdrm/amd/display: validate plane in dce110 for scaling (diff)
downloadkernel-qcow2-linux-5449e07caa3a246c4ec79213978e70097e8b52aa.tar.gz
kernel-qcow2-linux-5449e07caa3a246c4ec79213978e70097e8b52aa.tar.xz
kernel-qcow2-linux-5449e07caa3a246c4ec79213978e70097e8b52aa.zip
drm/amd/display: update plane params before validation
This patch updates the dc's plane state with the parameters set by the user side. This is needed to validate the plane capabilities with the parameters user space wants to set. Signed-off-by: Shirish S <shirish.s@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index 19a37663df10..d8d0f2cb5590 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -3064,6 +3064,9 @@ static int dm_plane_atomic_check(struct drm_plane *plane,
if (!dm_plane_state->dc_state)
return 0;
+ if (!fill_rects_from_plane_state(state, dm_plane_state->dc_state))
+ return -EINVAL;
+
if (dc_validate_plane(dc, dm_plane_state->dc_state) == DC_OK)
return 0;