]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
drm/amd/display: Set vsc pack revision when DPCD revision is >= 1.2
authorTao <xtao@amd.com>
Thu, 8 Feb 2018 21:04:25 +0000 (16:04 -0500)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Mon, 27 Aug 2018 14:40:05 +0000 (16:40 +0200)
BugLink: http://bugs.launchpad.net/bugs/1786352
[ Upstream commit 3b94a4007dcfd4ac5780cd3d8a2d99979c966073 ]

Brightness couldn't change when booting up in DC mode.
It was because "psr_enabled" flag was not set to true before
setting vsc packet revision, causing packet rev setup was skipped.
Now instead of checking the psr flag, it checks if the DPCD_REV >= 1.2
and set the vsc packet revision.

Signed-off-by: Tao <xtao@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

index 9288958098676611dc91b632e53e00802ef6b7bc..078161b42b3e37a1ec065d7efcaf14489bd92a3c 100644 (file)
@@ -35,6 +35,7 @@
 #include "core_types.h"
 #include "set_mode_types.h"
 #include "virtual/virtual_stream_encoder.h"
+#include "dpcd_defs.h"
 
 #include "dce80/dce80_resource.h"
 #include "dce100/dce100_resource.h"
@@ -2428,7 +2429,8 @@ static void set_vsc_info_packet(
        unsigned int vscPacketRevision = 0;
        unsigned int i;
 
-       if (stream->sink->link->psr_enabled) {
+       /*VSC packet set to 2 when DP revision >= 1.2*/
+       if (stream->sink->link->dpcd_caps.dpcd_rev.raw >= DPCD_REV_12) {
                vscPacketRevision = 2;
        }