All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/dg2: fix snps buf trans for uhbr
@ 2021-10-07 11:56 Jani Nikula
  2021-10-07 12:08 ` Ville Syrjälä
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Jani Nikula @ 2021-10-07 11:56 UTC (permalink / raw)
  To: intel-gfx; +Cc: jani.nikula, Ville Syrjälä

The UHBR check was using > instead of >=. Use the helper instead to
avoid mistakes. Also always use the non-UHBR values for HDMI.

Fixes: 2817efaeb608 ("drm/i915/dg2: add SNPS PHY translations for UHBR link rates")
Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
index a2d39131ea53..a87a688d8475 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi_buf_trans.c
@@ -8,6 +8,7 @@
 #include "intel_ddi_buf_trans.h"
 #include "intel_de.h"
 #include "intel_display_types.h"
+#include "intel_dp.h"
 
 /* HDMI/DVI modes ignore everything but the last 2 items. So we share
  * them for both DP and FDI transports, allowing those ports to
@@ -1611,10 +1612,11 @@ dg2_get_snps_buf_trans(struct intel_encoder *encoder,
 		       const struct intel_crtc_state *crtc_state,
 		       int *n_entries)
 {
-	if (crtc_state->port_clock > 1000000)
-		return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
-	else
+	if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI) ||
+	    !intel_dp_is_uhbr(crtc_state))
 		return intel_get_buf_trans(&dg2_snps_trans, n_entries);
+	else
+		return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
 }
 
 void intel_ddi_buf_trans_init(struct intel_encoder *encoder)
-- 
2.30.2


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

end of thread, other threads:[~2021-10-07 16:10 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-10-07 11:56 [Intel-gfx] [PATCH] drm/i915/dg2: fix snps buf trans for uhbr Jani Nikula
2021-10-07 12:08 ` Ville Syrjälä
2021-10-07 12:43   ` Jani Nikula
2021-10-07 12:42 ` [Intel-gfx] [PATCH v2] " Jani Nikula
2021-10-07 14:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dg2: fix snps buf trans for uhbr (rev2) Patchwork
2021-10-07 16:10 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

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.