OSDN Git Service

drm/amd/display: defer modeset check in dm_update_planes_state
authorShirish S <shirish.s@amd.com>
Fri, 16 Feb 2018 06:14:22 +0000 (11:44 +0530)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:36:10 +0000 (15:36 -0500)
commitc21b68c5ebd9b0267d59c7a899ee4c6a7e0668fc
tree52cc0343afab7a0c5eb23b3435002bb5e7e8baf6
parent33f2d94ecd0ebb9c9c651691b4535332aac40edf
drm/amd/display: defer modeset check in dm_update_planes_state

amdgpu_dm_atomic_check() is used to validate the entire configuration of
planes and crtc's that the user space wants to commit.

However amdgpu_dm_atomic_check() depends upon DRM_MODE_ATOMIC_ALLOW_MODESET
flag else its mostly dummy.
Its not mandatory for the user space to set DRM_MODE_ATOMIC_ALLOW_MODESET,
and in general its not set either along with DRM_MODE_ATOMIC_TEST_ONLY.

Considering its importantance, this patch defers the allow_modeset check
in dm_update_planes_state(), so that there shall be scope to validate
the configuration sent from user space, without impacting the population
of dc/dm related data structures.

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>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c