]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: Implement voltage limitation for dali
authorBhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Fri, 6 Sep 2019 20:32:44 +0000 (16:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 16 Sep 2019 15:06:48 +0000 (10:06 -0500)
[Why]
we only want the lowest voltage to be available for dali.

[How]
Use the get_highest_allowed_voltage_level function
to return 0 for dali

Signed-off-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Reviewed-by: Huang Rui <ray.huang@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/calcs/dcn_calcs.c

index 383f4f8db8f4b98d7ff7b36e8d857df05f9aa9af..9b2cb57bf2bada07c7ab9b8988ac0b548c4e3a1d 100644 (file)
@@ -708,6 +708,10 @@ static void hack_bounding_box(struct dcn_bw_internal_vars *v,
 
 unsigned int get_highest_allowed_voltage_level(uint32_t hw_internal_rev)
 {
+       /* for dali, the highest voltage level we want is 0 */
+       if (ASICREV_IS_DALI(hw_internal_rev))
+               return 0;
+
        /* we are ok with all levels */
        return 4;
 }