]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: add psr_version to stream
authorXingyue Tao <xingyue.tao@amd.com>
Fri, 16 Feb 2018 21:29:13 +0000 (16:29 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:33:56 +0000 (15:33 -0500)
Brightness could not be changed for some panels whose DPCD_version is below 1.2
Now psr_version is added into stream, and it copies from the displayTarget's psr_version.
It checks if the stream's psr_versio is non-zero and sets the vsc info packet revision now.

Signed-off-by: Xingyue Tao <xingyue.tao@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Reviewed-by: Anthony Koo <Anthony.Koo@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/core/dc_resource.c
drivers/gpu/drm/amd/display/dc/dc_stream.h

index ce0e9e76eb3544c40dbe6da89c3127186e9af2b9..48709d4b5627022f5cad9b3e0b7c82c72b463430 100644 (file)
@@ -2436,7 +2436,7 @@ static void set_vsc_info_packet(
        unsigned int i;
 
        /*VSC packet set to 2 when DP revision >= 1.2*/
-       if (stream->sink->link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_12) {
+       if (stream->psr_version != 0) {
                vscPacketRevision = 2;
        }
 
index 78a2bbe0b2727a973f03425d1b1bd0af1f945e84..f44cd4d87b79a76a89f38c532a6936829cde1b14 100644 (file)
@@ -70,7 +70,8 @@ struct dc_stream_state {
        bool ignore_msa_timing_param;
        /* TODO: custom INFO packets */
        /* TODO: ABM info (DMCU) */
-       /* TODO: PSR info */
+       /* PSR info */
+       unsigned char psr_version;
        /* TODO: CEA VIC */
 
        /* from core_stream struct */