Message ID | 20210111164111.13302-1-ville.syrjala@linux.intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915: Only enable DFP 4:4:4->4:2:0 conversion when outputting YCbCr 4:4:4 | expand |
On Mon, 11 Jan 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote: > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Let's not enable the 4:4:4->4:2:0 conversion bit in the DFP unless we're > actually outputting YCbCr 4:4:4. It would appear some protocol > converters blindy consult this bit even when the source is outputting > RGB, resulting in a visual mess. > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2914 > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Fixes: 181567aa9f0d ("drm/i915: Do YCbCr 444->420 conversion via DP protocol converters") Cc: <stable@vger.kernel.org> # v5.10+ Right? Reviewed-by: Jani Nikula <jani.nikula@intel.com> > --- > drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > index 4f190a82d4ad..aa30ef9f6906 100644 > --- a/drivers/gpu/drm/i915/display/intel_dp.c > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > @@ -4368,8 +4368,8 @@ void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp, > drm_dbg_kms(&i915->drm, "Failed to set protocol converter HDMI mode to %s\n", > enableddisabled(intel_dp->has_hdmi_sink)); > > - tmp = intel_dp->dfp.ycbcr_444_to_420 ? > - DP_CONVERSION_TO_YCBCR420_ENABLE : 0; > + tmp = crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444 && > + intel_dp->dfp.ycbcr_444_to_420 ? DP_CONVERSION_TO_YCBCR420_ENABLE : 0; > > if (drm_dp_dpcd_writeb(&intel_dp->aux, > DP_PROTOCOL_CONVERTER_CONTROL_1, tmp) != 1)
On Thu, Jan 14, 2021 at 09:27:35AM +0200, Jani Nikula wrote: > On Mon, 11 Jan 2021, Ville Syrjala <ville.syrjala@linux.intel.com> wrote: > > From: Ville Syrjälä <ville.syrjala@linux.intel.com> > > > > Let's not enable the 4:4:4->4:2:0 conversion bit in the DFP unless we're > > actually outputting YCbCr 4:4:4. It would appear some protocol > > converters blindy consult this bit even when the source is outputting > > RGB, resulting in a visual mess. > > > > Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2914 > > Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> > > Fixes: 181567aa9f0d ("drm/i915: Do YCbCr 444->420 conversion via DP protocol converters") > Cc: <stable@vger.kernel.org> # v5.10+ > > Right? Not sure I should to add the stable tag directly since it apparently applies cleanly but does not build. So needs a custom backport. > > Reviewed-by: Jani Nikula <jani.nikula@intel.com> Ta. > > > --- > > drivers/gpu/drm/i915/display/intel_dp.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c > > index 4f190a82d4ad..aa30ef9f6906 100644 > > --- a/drivers/gpu/drm/i915/display/intel_dp.c > > +++ b/drivers/gpu/drm/i915/display/intel_dp.c > > @@ -4368,8 +4368,8 @@ void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp, > > drm_dbg_kms(&i915->drm, "Failed to set protocol converter HDMI mode to %s\n", > > enableddisabled(intel_dp->has_hdmi_sink)); > > > > - tmp = intel_dp->dfp.ycbcr_444_to_420 ? > > - DP_CONVERSION_TO_YCBCR420_ENABLE : 0; > > + tmp = crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444 && > > + intel_dp->dfp.ycbcr_444_to_420 ? DP_CONVERSION_TO_YCBCR420_ENABLE : 0; > > > > if (drm_dp_dpcd_writeb(&intel_dp->aux, > > DP_PROTOCOL_CONVERTER_CONTROL_1, tmp) != 1) > > -- > Jani Nikula, Intel Open Source Graphics Center
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 4f190a82d4ad..aa30ef9f6906 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -4368,8 +4368,8 @@ void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp, drm_dbg_kms(&i915->drm, "Failed to set protocol converter HDMI mode to %s\n", enableddisabled(intel_dp->has_hdmi_sink)); - tmp = intel_dp->dfp.ycbcr_444_to_420 ? - DP_CONVERSION_TO_YCBCR420_ENABLE : 0; + tmp = crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444 && + intel_dp->dfp.ycbcr_444_to_420 ? DP_CONVERSION_TO_YCBCR420_ENABLE : 0; if (drm_dp_dpcd_writeb(&intel_dp->aux, DP_PROTOCOL_CONVERTER_CONTROL_1, tmp) != 1)