From: Hersen Wu <[email protected]>

remove limit YUV422 color depth to 24bits which is
workaround for old ASIC

Signed-off-by: Hersen Wu <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Harry Wentland <[email protected]>
---
 .../gpu/drm/amd/display/dc/core/dc_link_dp.c  | 47 +++++++++----------
 1 file changed, 21 insertions(+), 26 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c 
b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
index a6dcd4246c20..bc490302df5f 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
@@ -1379,34 +1379,29 @@ static uint32_t bandwidth_in_kbps_from_timing(
        uint32_t bits_per_channel = 0;
        uint32_t kbps;
 
-       if (timing->pixel_encoding == PIXEL_ENCODING_YCBCR422)
+       switch (timing->display_color_depth) {
+       case COLOR_DEPTH_666:
+               bits_per_channel = 6;
+               break;
+       case COLOR_DEPTH_888:
+               bits_per_channel = 8;
+               break;
+       case COLOR_DEPTH_101010:
+               bits_per_channel = 10;
+               break;
+       case COLOR_DEPTH_121212:
                bits_per_channel = 12;
-       else{
-
-               switch (timing->display_color_depth) {
-
-               case COLOR_DEPTH_666:
-                       bits_per_channel = 6;
-                       break;
-               case COLOR_DEPTH_888:
-                       bits_per_channel = 8;
-                       break;
-               case COLOR_DEPTH_101010:
-                       bits_per_channel = 10;
-                       break;
-               case COLOR_DEPTH_121212:
-                       bits_per_channel = 12;
-                       break;
-               case COLOR_DEPTH_141414:
-                       bits_per_channel = 14;
-                       break;
-               case COLOR_DEPTH_161616:
-                       bits_per_channel = 16;
-                       break;
-               default:
-                       break;
-               }
+               break;
+       case COLOR_DEPTH_141414:
+               bits_per_channel = 14;
+               break;
+       case COLOR_DEPTH_161616:
+               bits_per_channel = 16;
+               break;
+       default:
+               break;
        }
+
        ASSERT(bits_per_channel != 0);
 
        kbps = timing->pix_clk_khz;
-- 
2.17.0

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to