diff options
Diffstat (limited to 'common/recipes-kernel/linux/linux-yocto-4.14.71/0409-drm-amd-display-Implement-support-for-backlight-opti.patch')
-rw-r--r-- | common/recipes-kernel/linux/linux-yocto-4.14.71/0409-drm-amd-display-Implement-support-for-backlight-opti.patch | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/common/recipes-kernel/linux/linux-yocto-4.14.71/0409-drm-amd-display-Implement-support-for-backlight-opti.patch b/common/recipes-kernel/linux/linux-yocto-4.14.71/0409-drm-amd-display-Implement-support-for-backlight-opti.patch deleted file mode 100644 index 7ec43ea9..00000000 --- a/common/recipes-kernel/linux/linux-yocto-4.14.71/0409-drm-amd-display-Implement-support-for-backlight-opti.patch +++ /dev/null @@ -1,81 +0,0 @@ -From c59e3d5ab9600899f81faefedf13d4dc85c47685 Mon Sep 17 00:00:00 2001 -From: Anthony Koo <Anthony.Koo@amd.com> -Date: Thu, 4 May 2017 14:09:09 -0400 -Subject: [PATCH 0409/4131] drm/amd/display: Implement support for backlight - optimization - -- Add functionality to get real hw backlight level as opposed to user -level, meaning the level that takes into account backlight ramping -over time and backlight reduction due to Varibright -- Add backlight optimization which allows for a second OS state -that is able to control ABM - -Signed-off-by: Anthony Koo <Anthony.Koo@amd.com> -Reviewed-by: Aric Cyr <Aric.Cyr@amd.com> -Acked-by: Harry Wentland <Harry.Wentland@amd.com> -Signed-off-by: Alex Deucher <alexander.deucher@amd.com> ---- - drivers/gpu/drm/amd/display/dc/dce/dce_abm.c | 13 +++++++++++-- - drivers/gpu/drm/amd/display/dc/inc/hw/abm.h | 1 + - 2 files changed, 12 insertions(+), 2 deletions(-) - -diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -index 393c435..cefffe1 100644 ---- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c -@@ -60,7 +60,7 @@ struct abm_backlight_registers { - static struct abm_backlight_registers stored_backlight_registers = {0}; - - --static unsigned int get_current_backlight(struct dce_abm *abm_dce) -+static unsigned int get_current_backlight_16_bit(struct dce_abm *abm_dce) - { - uint64_t current_backlight; - uint32_t round_result; -@@ -252,7 +252,7 @@ static void dmcu_set_backlight_level( - static void dce_abm_init(struct abm *abm) - { - struct dce_abm *abm_dce = TO_DCE_ABM(abm); -- unsigned int backlight = get_current_backlight(abm_dce); -+ unsigned int backlight = get_current_backlight_16_bit(abm_dce); - - REG_WRITE(DC_ABM1_HG_SAMPLE_RATE, 0x103); - REG_WRITE(DC_ABM1_HG_SAMPLE_RATE, 0x101); -@@ -289,6 +289,14 @@ static void dce_abm_init(struct abm *abm) - ABM1_BL_REG_READ_MISSED_FRAME_CLEAR, 1); - } - -+static unsigned int dce_abm_get_current_backlight_8_bit(struct abm *abm) -+{ -+ struct dce_abm *abm_dce = TO_DCE_ABM(abm); -+ unsigned int backlight = REG_READ(BL1_PWM_CURRENT_ABM_LEVEL); -+ -+ return (backlight >> 8); -+} -+ - static bool dce_abm_set_level(struct abm *abm, uint32_t level) - { - struct dce_abm *abm_dce = TO_DCE_ABM(abm); -@@ -405,6 +413,7 @@ static const struct abm_funcs dce_funcs = { - .set_abm_level = dce_abm_set_level, - .init_backlight = dce_abm_init_backlight, - .set_backlight_level = dce_abm_set_backlight_level, -+ .get_current_backlight_8_bit = dce_abm_get_current_backlight_8_bit, - .is_dmcu_initialized = is_dmcu_initialized - }; - -diff --git a/drivers/gpu/drm/amd/display/dc/inc/hw/abm.h b/drivers/gpu/drm/amd/display/dc/inc/hw/abm.h -index ceabbd3..da465b3 100644 ---- a/drivers/gpu/drm/amd/display/dc/inc/hw/abm.h -+++ b/drivers/gpu/drm/amd/display/dc/inc/hw/abm.h -@@ -40,6 +40,7 @@ struct abm_funcs { - unsigned int backlight_level, - unsigned int frame_ramp, - unsigned int controller_id); -+ unsigned int (*get_current_backlight_8_bit)(struct abm *abm); - bool (*is_dmcu_initialized)(struct abm *abm); - }; - --- -2.7.4 - |