UPSTREAM: drm/edid: Make max_tmds_clock kHz instead of MHz
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 28 Sep 2016 13:51:36 +0000 (16:51 +0300)
committerZheng Yang <zhengyang@rock-chips.com>
Tue, 20 Jun 2017 09:22:50 +0000 (17:22 +0800)
We generally store clocks in kHz, so let's do that for the
HDMI max TMDS clock value as well. Less surpising.

v2: Deal with superfluous code shuffling

Change-Id: I27afd0604e5e7f1bfaa572c1c5b81ecfbcf0994e
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-4-git-send-email-ville.syrjala@linux.intel.com
Signed-off-by: Zheng Yang <zhengyang@rock-chips.com>
(cherry picked from commit ab5603c4d334224e3a884e62e7083ec69849fa7a)

drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
drivers/gpu/drm/drm_edid.c
drivers/gpu/drm/radeon/radeon_connectors.c
include/drm/drm_crtc.h

index 9300833369688ddf2d886f8c63edfcc97a0b83e8..86e95703a49fb5558f69b2f1dada595929e9e53d 100644 (file)
@@ -173,7 +173,7 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector)
                        mode_clock = amdgpu_connector->pixelclock_for_modeset;
 
                        /* Maximum allowable input clock in kHz */
-                       max_tmds_clock = connector->max_tmds_clock * 1000;
+                       max_tmds_clock = connector->max_tmds_clock;
 
                        DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
                                  connector->name, mode_clock, max_tmds_clock);
index 306e67c9f82d5dee95cdbbd9b9d1a9fd331842ba..49ffcfb1fe9b69b95570042b6d66f6b20f42d50f 100644 (file)
@@ -3611,7 +3611,7 @@ parse_hdmi_vsdb(struct drm_connector *connector, const u8 *db)
                connector->dvi_dual = db[6] & 1;
        }
        if (len >= 7)
-               connector->max_tmds_clock = db[7] * 5;
+               connector->max_tmds_clock = db[7] * 5000;
        if (len >= 8) {
                connector->latency_present[0] = db[8] >> 7;
                connector->latency_present[1] = (db[8] >> 6) & 1;
index 30f00748ed37e7c406beed32ab3ac539ab86d120..191b86c0f542abf380428a7a6516143f141dcbcd 100644 (file)
@@ -202,7 +202,7 @@ int radeon_get_monitor_bpc(struct drm_connector *connector)
                        mode_clock = radeon_connector->pixelclock_for_modeset;
 
                        /* Maximum allowable input clock in kHz */
-                       max_tmds_clock = connector->max_tmds_clock * 1000;
+                       max_tmds_clock = connector->max_tmds_clock;
 
                        DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
                                          connector->name, mode_clock, max_tmds_clock);
index 1bf21931d42f7d8be0db78cb6b6b867468857e2c..6c6f6545c05fd71ceb9ab5dabac8a1e9fca7a559 100644 (file)
@@ -798,7 +798,7 @@ struct drm_connector {
        /* EDID bits */
        uint8_t eld[MAX_ELD_BYTES];
        bool dvi_dual;
-       int max_tmds_clock;     /* in MHz */
+       int max_tmds_clock;     /* in kHz */
        bool latency_present[2];
        int video_latency[2];   /* [0]: progressive, [1]: interlaced */
        int audio_latency[2];