Commit ab5603c4 authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Daniel Vetter

drm/edid: Make max_tmds_clock kHz instead of MHz

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

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Christian König <christian.koenig@amd.com> (v1)
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/1475070703-6435-4-git-send-email-ville.syrjala@linux.intel.com
parent 75d7e542
...@@ -173,7 +173,7 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector) ...@@ -173,7 +173,7 @@ int amdgpu_connector_get_monitor_bpc(struct drm_connector *connector)
mode_clock = amdgpu_connector->pixelclock_for_modeset; mode_clock = amdgpu_connector->pixelclock_for_modeset;
/* Maximum allowable input clock in kHz */ /* 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", DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
connector->name, mode_clock, max_tmds_clock); connector->name, mode_clock, max_tmds_clock);
......
...@@ -3262,7 +3262,7 @@ parse_hdmi_vsdb(struct drm_connector *connector, const u8 *db) ...@@ -3262,7 +3262,7 @@ parse_hdmi_vsdb(struct drm_connector *connector, const u8 *db)
connector->dvi_dual = db[6] & 1; connector->dvi_dual = db[6] & 1;
} }
if (len >= 7) if (len >= 7)
connector->max_tmds_clock = db[7] * 5; connector->max_tmds_clock = db[7] * 5000;
if (len >= 8) { if (len >= 8) {
connector->latency_present[0] = db[8] >> 7; connector->latency_present[0] = db[8] >> 7;
connector->latency_present[1] = (db[8] >> 6) & 1; connector->latency_present[1] = (db[8] >> 6) & 1;
......
...@@ -203,7 +203,7 @@ int radeon_get_monitor_bpc(struct drm_connector *connector) ...@@ -203,7 +203,7 @@ int radeon_get_monitor_bpc(struct drm_connector *connector)
mode_clock = radeon_connector->pixelclock_for_modeset; mode_clock = radeon_connector->pixelclock_for_modeset;
/* Maximum allowable input clock in kHz */ /* 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", DRM_DEBUG("%s: hdmi mode dotclock %d kHz, max tmds input clock %d kHz.\n",
connector->name, mode_clock, max_tmds_clock); connector->name, mode_clock, max_tmds_clock);
......
...@@ -651,7 +651,7 @@ struct drm_connector { ...@@ -651,7 +651,7 @@ struct drm_connector {
/* EDID bits */ /* EDID bits */
uint8_t eld[MAX_ELD_BYTES]; uint8_t eld[MAX_ELD_BYTES];
bool dvi_dual; bool dvi_dual;
int max_tmds_clock; /* in MHz */ int max_tmds_clock; /* in kHz */
bool latency_present[2]; bool latency_present[2];
int video_latency[2]; /* [0]: progressive, [1]: interlaced */ int video_latency[2]; /* [0]: progressive, [1]: interlaced */
int audio_latency[2]; int audio_latency[2];
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment