[Intel-gfx] [PATCH] drm/i915/dg2: fix snps buf trans for uhbr
Jani Nikula
jani.nikula at intel.com
Thu Oct 7 12:43:59 UTC 2021
On Thu, 07 Oct 2021, Ville Syrjälä <ville.syrjala at linux.intel.com> wrote:
> On Thu, Oct 07, 2021 at 02:56:29PM +0300, Jani Nikula wrote:
>> 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 at linux.intel.com>
>> Cc: Ville Syrjälä <ville.syrjala at linux.intel.com>
>> Signed-off-by: Jani Nikula <jani.nikula at 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))
>
> Might be more clear flipped around to 'has_dp_encoder && is_uhbr'?
Silly me, forgot about intel_crtc_has_dp_encoder() since it's not used
in this file. v2 sent.
> Either way
> Reviewed-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
Thanks,
Jani.
>
>> 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
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list