Commit 71af6bae authored by Jani Nikula's avatar Jani Nikula

drm/i915/dg2: fix snps buf trans for uhbr

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

v2: Use intel_crtc_has_dp_encoder() && intel_dp_is_uhbr() (Ville)

Fixes: 2817efae ("drm/i915/dg2: add SNPS PHY translations for UHBR link rates")
Reported-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20211007124201.18686-1-jani.nikula@intel.com
parent 149ac2e7
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
#include "intel_ddi_buf_trans.h" #include "intel_ddi_buf_trans.h"
#include "intel_de.h" #include "intel_de.h"
#include "intel_display_types.h" #include "intel_display_types.h"
#include "intel_dp.h"
/* HDMI/DVI modes ignore everything but the last 2 items. So we share /* HDMI/DVI modes ignore everything but the last 2 items. So we share
* them for both DP and FDI transports, allowing those ports to * them for both DP and FDI transports, allowing those ports to
...@@ -1611,7 +1612,8 @@ dg2_get_snps_buf_trans(struct intel_encoder *encoder, ...@@ -1611,7 +1612,8 @@ dg2_get_snps_buf_trans(struct intel_encoder *encoder,
const struct intel_crtc_state *crtc_state, const struct intel_crtc_state *crtc_state,
int *n_entries) int *n_entries)
{ {
if (crtc_state->port_clock > 1000000) if (intel_crtc_has_dp_encoder(crtc_state) &&
intel_dp_is_uhbr(crtc_state))
return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries); return intel_get_buf_trans(&dg2_snps_trans_uhbr, n_entries);
else else
return intel_get_buf_trans(&dg2_snps_trans, n_entries); return intel_get_buf_trans(&dg2_snps_trans, n_entries);
......
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