drm/amd/display: Optimize clocks on clock change
authorWesley Chalmers <Wesley.Chalmers@amd.com>
Fri, 30 Aug 2019 18:59:00 +0000 (14:59 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 3 Oct 2019 14:10:57 +0000 (09:10 -0500)
commit3a4d180d4a9df63144c6c069860b2be312c3256a
tree6308bb6ef2560ef1d58f91086c09e29e209e3d2d
parent2fef0faa1cdc5d41ce3ef83f7b8f7e7ecb02d700
drm/amd/display: Optimize clocks on clock change

[WHY]
Presently, there is no way for clocks to be lowered, only raised.

[HOW]
Compare clock status against previous known clock status, and optimize
if different.
This requires re-ordering the layout of the dc_clocks structure, as the
current ordering allows identical clock states to appear different.

Signed-off-by: Wesley Chalmers <Wesley.Chalmers@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Anthony Koo <Anthony.Koo@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc.c
drivers/gpu/drm/amd/display/dc/dc.h