All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Fix HW readout for crtc_clock in HDMI mode
@ 2019-08-08 13:37 Imre Deak
  2019-08-08 14:27 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Imre Deak @ 2019-08-08 13:37 UTC (permalink / raw)
  To: intel-gfx

The conversion during HDMI HW readout from port_clock to crtc_clock was
missed when HDMI 10bpc support was added, so fix that.

Fixes: cd9e11a8bf25 ("drm/i915/icl: Add 10-bit support for hdmi")
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=109593
Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c           | 9 +++++----
 drivers/gpu/drm/i915/display/intel_display_types.h | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index aa5b2440513c..65396f913f56 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -1467,10 +1467,11 @@ static void ddi_dotclock_get(struct intel_crtc_state *pipe_config)
 	else if (intel_crtc_has_dp_encoder(pipe_config))
 		dotclock = intel_dotclock_calculate(pipe_config->port_clock,
 						    &pipe_config->dp_m_n);
-	else if (pipe_config->has_hdmi_sink && pipe_config->pipe_bpp == 36)
-		dotclock = pipe_config->port_clock * 2 / 3;
-	else
-		dotclock = pipe_config->port_clock;
+	else if (pipe_config->has_hdmi_sink) {
+		int bpp = max(24, pipe_config->pipe_bpp);
+
+		dotclock = pipe_config->port_clock * 24 / bpp;
+	}
 
 	if (pipe_config->output_format == INTEL_OUTPUT_FORMAT_YCBCR420 &&
 	    !intel_crtc_has_dp_encoder(pipe_config))
diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
index a88ec9aa9ca0..21cb7ee34d45 100644
--- a/drivers/gpu/drm/i915/display/intel_display_types.h
+++ b/drivers/gpu/drm/i915/display/intel_display_types.h
@@ -866,7 +866,7 @@ struct intel_crtc_state {
 
 	/*
 	 * Frequence the dpll for the port should run at. Differs from the
-	 * adjusted dotclock e.g. for DP or 12bpc hdmi mode. This is also
+	 * adjusted dotclock e.g. for DP or 10/12bpc hdmi mode. This is also
 	 * already multiplied by pixel_multiplier.
 	 */
 	int port_clock;
-- 
2.17.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

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

end of thread, other threads:[~2019-08-20 13:16 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-08-08 13:37 [PATCH] drm/i915: Fix HW readout for crtc_clock in HDMI mode Imre Deak
2019-08-08 14:27 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2019-08-08 14:48 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-08-08 16:25 ` [PATCH v2] " Imre Deak
2019-08-19 16:14   ` Ville Syrjälä
2019-08-08 19:29 ` ✓ Fi.CI.BAT: success for drm/i915: Fix HW readout for crtc_clock in HDMI mode (rev2) Patchwork
2019-08-09  6:55 ` ✗ Fi.CI.IGT: failure " Patchwork
2019-08-09  8:47   ` Imre Deak
2019-08-20 13:15     ` Imre Deak

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.