public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/hdmi: Compute port_clock for 27.027 pixel replicated modes
@ 2014-09-24 22:49 clinton.a.taylor
  2014-09-26 15:58 ` Ville Syrjälä
  0 siblings, 1 reply; 8+ messages in thread
From: clinton.a.taylor @ 2014-09-24 22:49 UTC (permalink / raw)
  To: Intel-gfx

From: Clint Taylor <clinton.a.taylor@intel.com>

port_clock was being incorrectly computed and WRPLL was incorrectly
programmed for pixel doubled modes using a 27.027MHz pixel clock.
port_clock was set to 27.026 resulting in an output pixel clock
matching 27.000MHz. Since there is no way to correctly half the 27.027
frequency as an integer just set port_clock to 27027 for these modes.

Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
---
 drivers/gpu/drm/i915/intel_hdmi.c |    5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index 29ec153..a0786d6 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -933,6 +933,11 @@ bool intel_hdmi_compute_config(struct intel_encoder *encoder,
 
 	if (adjusted_mode->flags & DRM_MODE_FLAG_DBLCLK) {
 		pipe_config->pixel_multiplier = 2;
+
+		/* Fix up port_clock since 27027 is not divisible by 2 */
+		if (pipe_config->adjusted_mode.crtc_clock == 13513) {
+			pipe_config->port_clock = 27027;
+		}
 	}
 
 	if (intel_hdmi->color_range)
-- 
1.7.9.5

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-10-08  9:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-24 22:49 [PATCH] drm/i915/hdmi: Compute port_clock for 27.027 pixel replicated modes clinton.a.taylor
2014-09-26 15:58 ` Ville Syrjälä
2014-09-26 16:28   ` Clint Taylor
2014-09-30 12:46     ` Ville Syrjälä
2014-10-06 23:17       ` Clint Taylor
2014-10-07  8:29         ` Ville Syrjälä
2014-10-08  9:36           ` Daniel Vetter
2014-09-26 16:40   ` Clint Taylor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox