drm/amd/display: fix dp_hdmi_max_pixel_clk units
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Tue, 19 Mar 2019 19:21:50 +0000 (15:21 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 10 Apr 2019 18:53:27 +0000 (13:53 -0500)
[Why]
We are incorrectly using dp_hdmi_max_pixel_clk because the units are not clear.

[How]
Rename to dp_hdmi_max_pixel_clk_in_khz, and change mode timing validation to use
the value correctly.

Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>
Reviewed-by: Aric Cyr <Aric.Cyr@amd.com>
Acked-by: Leo Li <sunpeng.li@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_link.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c
drivers/gpu/drm/amd/display/dc/dc_types.h

index b39f76e..2f0117c 100644 (file)
@@ -2150,7 +2150,7 @@ static bool dp_active_dongle_validate_timing(
                return false;
        }
 
-       if (get_timing_pixel_clock_100hz(timing) > (dongle_caps->dp_hdmi_max_pixel_clk * 10))
+       if (get_timing_pixel_clock_100hz(timing) > (dongle_caps->dp_hdmi_max_pixel_clk_in_khz * 10))
                return false;
 
        return true;
index 063d019..528c962 100644 (file)
@@ -2304,8 +2304,8 @@ static void get_active_converter_info(
                                        hdmi_caps = {.raw = det_caps[3] };
                                union dwnstream_port_caps_byte2
                                        hdmi_color_caps = {.raw = det_caps[2] };
-                               link->dpcd_caps.dongle_caps.dp_hdmi_max_pixel_clk =
-                                       det_caps[1] * 25000;
+                               link->dpcd_caps.dongle_caps.dp_hdmi_max_pixel_clk_in_khz =
+                                       det_caps[1] * 2500;
 
                                link->dpcd_caps.dongle_caps.is_dp_hdmi_s3d_converter =
                                        hdmi_caps.bits.FRAME_SEQ_TO_FRAME_PACK;
@@ -2322,7 +2322,7 @@ static void get_active_converter_info(
                                        translate_dpcd_max_bpc(
                                                hdmi_color_caps.bits.MAX_BITS_PER_COLOR_COMPONENT);
 
-                               if (link->dpcd_caps.dongle_caps.dp_hdmi_max_pixel_clk != 0)
+                               if (link->dpcd_caps.dongle_caps.dp_hdmi_max_pixel_clk_in_khz != 0)
                                        link->dpcd_caps.dongle_caps.extendedCapValid = true;
                        }
 
index c8e2dc5..6c2a3d9 100644 (file)
@@ -395,7 +395,7 @@ struct dc_dongle_caps {
        bool is_dp_hdmi_ycbcr422_converter;
        bool is_dp_hdmi_ycbcr420_converter;
        uint32_t dp_hdmi_max_bpc;
-       uint32_t dp_hdmi_max_pixel_clk;
+       uint32_t dp_hdmi_max_pixel_clk_in_khz;
 };
 /* Scaling format */
 enum scaling_transformation {