drm/amd/display: Use new connector state when getting color depth
authorNicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Wed, 22 May 2019 16:00:55 +0000 (12:00 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 24 May 2019 17:25:56 +0000 (12:25 -0500)
commit42ba01fc30e6f84e7433879052474e716237ab33
tree614286b392a521a728d133df5fa5dfd102d60c42
parent1825fd34e8ed026911c6de6d7be7bd2d1ff8101a
drm/amd/display: Use new connector state when getting color depth

[Why]
The current state on the connector is queried when getting the max bpc
rather than the new state. This means that a new max bpc value can only
currently take effect on the commit *after* it changes.

The new state should be passed in instead.

[How]
Pass down the dm_state as drm state to where we do color depth lookup.

The passed in state can still be NULL when called from
amdgpu_dm_connector_mode_valid, so make sure that we have reasonable
defaults in place. That should probably be addressed at some point.

This change now (correctly) causes a modeset to occur when changing the
max bpc for a connector.

v2: Drop extra TODO.

Cc: Leo Li <sunpeng.li@amd.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Acked-by: Alex Deucher <alexander.deucher@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