Patch "drm/amd/display: Try YCbCr420 color when YCbCr444 fails" has been added to the 5.10-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: Try YCbCr420 color when YCbCr444 fails

to the 5.10-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-try-ycbcr420-color-when-ycbcr444-fai.patch
and it can be found in the queue-5.10 subdirectory.

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



commit a82357ce30547cf4a825c6c1e5df6867c8a9bc25
Author: Werner Sembach <wse@xxxxxxxxxxxxxxxxxxx>
Date:   Wed Mar 17 16:13:48 2021 +0100

    drm/amd/display: Try YCbCr420 color when YCbCr444 fails
    
    [ Upstream commit 68eb3ae3c63708f823aeeb63bb15197c727bd9bf ]
    
    When encoder validation of a display mode fails, retry with less bandwidth
    heavy YCbCr420 color mode, if available. This enables some HDMI 1.4 setups
    to support 4k60Hz output, which previously failed silently.
    
    On some setups, while the monitor and the gpu support display modes with
    pixel clocks of up to 600MHz, the link encoder might not. This prevents
    YCbCr444 and RGB encoding for 4k60Hz, but YCbCr420 encoding might still be
    possible. However, which color mode is used is decided before the link
    encoder capabilities are checked. This patch fixes the problem by retrying
    to find a display mode with YCbCr420 enforced and using it, if it is
    valid.
    
    Reviewed-by: Harry Wentland <harry.wentland@xxxxxxx>
    Signed-off-by: Werner Sembach <wse@xxxxxxxxxxxxxxxxxxx>
    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 12a4f0675fb0..d18341b7daac 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -5328,6 +5328,15 @@ create_validate_stream_for_sink(struct amdgpu_dm_connector *aconnector,
 
 	} while (stream == NULL && requested_bpc >= 6);
 
+	if (dc_result == DC_FAIL_ENC_VALIDATE && !aconnector->force_yuv420_output) {
+		DRM_DEBUG_KMS("Retry forcing YCbCr420 encoding\n");
+
+		aconnector->force_yuv420_output = true;
+		stream = create_validate_stream_for_sink(aconnector, drm_mode,
+						dm_state, old_stream);
+		aconnector->force_yuv420_output = false;
+	}
+
 	return stream;
 }
 



[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