drm/amd/display: Increase Backlight Gain Step Size
authorEryk Brol <eryk.brol@amd.com>
Wed, 15 May 2019 19:12:41 +0000 (15:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 31 May 2019 15:39:33 +0000 (10:39 -0500)
[Why]
Some backlight tests fail due to backlight settling
taking too long. This happens because the step
size used to change backlight levels is too small.

[How]
1. Change the size of the backlight gain step size
2. Change how DMCU firmware gets the step size value
   so that it is passed in by driver during DMCU initn

Signed-off-by: Eryk Brol <eryk.brol@amd.com>
Reviewed-by: Jun Lei <Jun.Lei@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/dce/dce_dmcu.c
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.h

index 6504227ead9c34d234240e0a6f00d0909f48db14..c2bc36f9f6c78ee5c63998696d7f6c9780166dbb 100644 (file)
@@ -388,6 +388,9 @@ static bool dcn10_dmcu_init(struct dmcu *dmcu)
                /* Set initialized ramping boundary value */
                REG_WRITE(MASTER_COMM_DATA_REG1, 0xFFFF);
 
+               /* Set backlight ramping stepsize */
+               REG_WRITE(MASTER_COMM_DATA_REG2, abm_gain_stepsize);
+
                /* Set command to initialize microcontroller */
                REG_UPDATE(MASTER_COMM_CMD_REG, MASTER_COMM_CMD_REG_BYTE0,
                        MCP_INIT_DMCU);
index 60ce56f60ae3d29438c8a60b3dc851591d3892b6..5bd0df55aa5d908032e256ba94ffb4f6f6ed0848 100644 (file)
@@ -263,4 +263,6 @@ struct dmcu *dcn10_dmcu_create(
 
 void dce_dmcu_destroy(struct dmcu **dmcu);
 
+static const uint32_t abm_gain_stepsize = 0x0060;
+
 #endif /* _DCE_ABM_H_ */