drm/amdgpu/display: add helper functions to get/set backlight (v2)

And cache the value.  These can be used by the backlight callbacks
and modesetting functions.

v2: rebase on latest backlight changes.

Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1337
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Alex Deucher
2021-05-11 11:37:09 -04:00
parent 1f6256590c
commit 3d6c91641b
2 changed files with 38 additions and 11 deletions

View File

@@ -436,6 +436,13 @@ struct amdgpu_display_manager {
*/
struct list_head da_list;
struct completion dmub_aux_transfer_done;
/**
* @brightness:
*
* cached backlight values.
*/
u32 brightness[AMDGPU_DM_MAX_NUM_EDP];
};
enum dsc_clock_force_state {