drm/amd/display: Clear dpcd_sink_ext_caps if not set
authorPaul Hsieh <paul.hsieh@amd.com>
Wed, 25 Oct 2023 02:53:35 +0000 (10:53 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 28 Nov 2023 17:20:18 +0000 (17:20 +0000)
commita4a131bdd9cf37c76388276835a1c31d3e1dc240
treeeb54270d72d4f6ee008b6f93aeb0262281354b2f
parent9a5ae53e0f46ab17176ae8c50de3318be10c00b6
drm/amd/display: Clear dpcd_sink_ext_caps if not set

commit 923bbfe6c888812db1088d684bd30c24036226d2 upstream.

[WHY]
Some eDP panels' ext caps don't set initial values
and the value of dpcd_addr (0x317) is random.
It means that sometimes the eDP can be OLED, miniLED and etc,
and cause incorrect backlight control interface.

[HOW]
Add remove_sink_ext_caps to remove sink ext caps (HDR, OLED and etc)

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Acked-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Paul Hsieh <paul.hsieh@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/display/dc/dc_types.h
drivers/gpu/drm/amd/display/dc/link/link_detection.c