Patch "drm/amd/display: Fix VRR cannot enable" has been added to the 6.11-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    drm/amd/display: Fix VRR cannot enable

to the 6.11-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     drm-amd-display-fix-vrr-cannot-enable.patch
and it can be found in the queue-6.11 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 0bab536fec7ba5d5bc256828b9eda7e30e817f3c
Author: Tom Chung <chiahsuan.chung@xxxxxxx>
Date:   Wed Jul 3 16:47:57 2024 +0800

    drm/amd/display: Fix VRR cannot enable
    
    [ Upstream commit f91a9af09dea850d83d4b217b8acbafd97b5c61f ]
    
    [Why]
    Sometimes the VRR cannot enable after login to the desktop.
    
    User space may call the DRM_IOCTL_MODE_GETCONNECTOR right after
    the DRM_IOCTL_MODE_RMFB.
    
    After calling DRM_IOCTL_MODE_RMFB to remove all the frame buffer
    and it will cause the driver to disable the crtc and disable the
    link while calling the link_set_dpms_off().
    
    It will cause the dpcd read failed in amdgpu_dm_update_freesync_caps()
    while try to get the DP_MSA_TIMING_PAR_IGNORED capability and think
    the sink side does not support VRR.
    
    [How]
    Use the dpcd_caps.allow_invalid_MSA_timing_param flag instead of
    reading from dpcd directly.
    
    dpcd_caps.allow_invalid_MSA_timing_param flag is updated during HPD.
    It is safe to replace the original method.
    
    Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@xxxxxxx>
    Signed-off-by: Jerry Zuo <jerry.zuo@xxxxxxx>
    Signed-off-by: Tom Chung <chiahsuan.chung@xxxxxxx>
    Tested-by: Daniel Wheeler <daniel.wheeler@xxxxxxx>
    Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index a705e7fa18c06..9ee54c5ce4a61 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -11812,25 +11812,6 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
 	return ret;
 }
 
-static bool is_dp_capable_without_timing_msa(struct dc *dc,
-					     struct amdgpu_dm_connector *amdgpu_dm_connector)
-{
-	u8 dpcd_data;
-	bool capable = false;
-
-	if (amdgpu_dm_connector->dc_link &&
-		dm_helpers_dp_read_dpcd(
-				NULL,
-				amdgpu_dm_connector->dc_link,
-				DP_DOWN_STREAM_PORT_COUNT,
-				&dpcd_data,
-				sizeof(dpcd_data))) {
-		capable = (dpcd_data & DP_MSA_TIMING_PAR_IGNORED) ? true:false;
-	}
-
-	return capable;
-}
-
 static bool dm_edid_parser_send_cea(struct amdgpu_display_manager *dm,
 		unsigned int offset,
 		unsigned int total_length,
@@ -12133,8 +12114,8 @@ void amdgpu_dm_update_freesync_caps(struct drm_connector *connector,
 		     sink->sink_signal == SIGNAL_TYPE_EDP)) {
 		bool edid_check_required = false;
 
-		if (is_dp_capable_without_timing_msa(adev->dm.dc,
-						     amdgpu_dm_connector)) {
+		if (amdgpu_dm_connector->dc_link &&
+		    amdgpu_dm_connector->dc_link->dpcd_caps.allow_invalid_MSA_timing_param) {
 			if (edid->features & DRM_EDID_FEATURE_CONTINUOUS_FREQ) {
 				amdgpu_dm_connector->min_vfreq = connector->display_info.monitor_range.min_vfreq;
 				amdgpu_dm_connector->max_vfreq = connector->display_info.monitor_range.max_vfreq;




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux