dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: dri-devel@lists.freedesktop.org
Cc: "Alex Deucher" <alexander.deucher@amd.com>,
	intel-gfx@lists.freedesktop.org,
	"Tomeu Vizoso" <tomeu.vizoso@collabora.com>,
	"Mika Kahola" <mika.kahola@intel.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 03/10] drm/edid: Make max_tmds_clock kHz instead of MHz
Date: Wed,  3 Aug 2016 09:33:22 +0300	[thread overview]
Message-ID: <1470206009-1534-4-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <1470206009-1534-1-git-send-email-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

We generally store clocks in kHz, so let's do that for the
HDMI max TMDS clock value as well. Less surpising.

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>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c | 2 +-
 drivers/gpu/drm/drm_edid.c                     | 2 +-
 drivers/gpu/drm/radeon/radeon_connectors.c     | 2 +-
 include/drm/drm_crtc.h                         | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
index ff0b55a65ca3..a56eeaa213f4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
@@ -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);
diff --git a/drivers/gpu/drm/drm_edid.c b/drivers/gpu/drm/drm_edid.c
index 40e7f1a863a6..f0f08f56ea97 100644
--- a/drivers/gpu/drm/drm_edid.c
+++ b/drivers/gpu/drm/drm_edid.c
@@ -3257,7 +3257,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;
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c
index b79f3b002471..db5488732e31 100644
--- a/drivers/gpu/drm/radeon/radeon_connectors.c
+++ b/drivers/gpu/drm/radeon/radeon_connectors.c
@@ -203,7 +203,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);
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 3edeaf88ebc0..e7cf08d9df10 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -1366,7 +1366,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];
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2016-08-03  6:33 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-03  6:33 [PATCH 00/10] drm/edid: Clean up display_info stuff ville.syrjala
2016-08-03  6:33 ` [PATCH 01/10] drm/edid: Clear old audio latency values before parsing the new EDID ville.syrjala
2016-08-03  6:33 ` [PATCH 02/10] drm/edid: Clear old dvi_dual/max_tmds_clock " ville.syrjala
2016-08-03  6:33 ` ville.syrjala [this message]
2016-08-03  6:33 ` [PATCH 04/10] drm/edid: Move dvi_dual/max_tmds_clock to drm_display_info ville.syrjala
2016-08-03  6:33 ` [PATCH 05/10] drm/edid: Don't pass around drm_display_info needlessly ville.syrjala
2016-08-03  6:33 ` [PATCH 06/10] drm/edid: Reduce the number of times we parse the CEA extension block ville.syrjala
2016-08-03  6:33 ` [PATCH 07/10] drm/edid: Clear the old cea_rev when there's no CEA extension in the new EDID ville.syrjala
2016-08-03  6:33 ` [PATCH 08/10] drm/edid: Move dvi_dual/max_tmds_clock parsing out from drm_edid_to_eld() ville.syrjala
2016-08-03  6:33 ` [PATCH 09/10] drm/i915: Replace a bunch of connector->base.display_info with a local variable ville.syrjala
2016-08-03  6:33 ` [PATCH 10/10] drm/i915: Account for sink max TMDS clock when checking the port clock ville.syrjala
2016-08-03 11:55 ` [PATCH 00/10] drm/edid: Clean up display_info stuff Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470206009-1534-4-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=mika.kahola@intel.com \
    --cc=tomeu.vizoso@collabora.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox