mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-08 02:49:48 +00:00
drm/i915: Only enable DFP 4:4:4->4:2:0 conversion when outputting YCbCr 4:4:4
commit1c4995b0a5upstream. 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. Cc: stable@vger.kernel.org Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2914 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210111164111.13302-1-ville.syrjala@linux.intel.com Fixes:181567aa9f("drm/i915: Do YCbCr 444->420 conversion via DP protocol converters") Reviewed-by: Jani Nikula <jani.nikula@intel.com> (cherry picked from commit3170a21f70) Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210118154355.24453-1-ville.syrjala@linux.intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
75b9444030
commit
a2989acadc
@@ -3470,7 +3470,7 @@ static void hsw_ddi_pre_enable_dp(struct intel_atomic_state *state,
|
|||||||
intel_ddi_init_dp_buf_reg(encoder);
|
intel_ddi_init_dp_buf_reg(encoder);
|
||||||
if (!is_mst)
|
if (!is_mst)
|
||||||
intel_dp_set_power(intel_dp, DP_SET_POWER_D0);
|
intel_dp_set_power(intel_dp, DP_SET_POWER_D0);
|
||||||
intel_dp_configure_protocol_converter(intel_dp);
|
intel_dp_configure_protocol_converter(intel_dp, crtc_state);
|
||||||
intel_dp_sink_set_decompression_state(intel_dp, crtc_state,
|
intel_dp_sink_set_decompression_state(intel_dp, crtc_state,
|
||||||
true);
|
true);
|
||||||
intel_dp_sink_set_fec_ready(intel_dp, crtc_state);
|
intel_dp_sink_set_fec_ready(intel_dp, crtc_state);
|
||||||
|
|||||||
@@ -3856,7 +3856,8 @@ static void intel_dp_enable_port(struct intel_dp *intel_dp,
|
|||||||
intel_de_posting_read(dev_priv, intel_dp->output_reg);
|
intel_de_posting_read(dev_priv, intel_dp->output_reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp)
|
void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp,
|
||||||
|
const struct intel_crtc_state *crtc_state)
|
||||||
{
|
{
|
||||||
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
|
struct drm_i915_private *i915 = dp_to_i915(intel_dp);
|
||||||
u8 tmp;
|
u8 tmp;
|
||||||
@@ -3875,8 +3876,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",
|
drm_dbg_kms(&i915->drm, "Failed to set protocol converter HDMI mode to %s\n",
|
||||||
enableddisabled(intel_dp->has_hdmi_sink));
|
enableddisabled(intel_dp->has_hdmi_sink));
|
||||||
|
|
||||||
tmp = intel_dp->dfp.ycbcr_444_to_420 ?
|
tmp = crtc_state->output_format == INTEL_OUTPUT_FORMAT_YCBCR444 &&
|
||||||
DP_CONVERSION_TO_YCBCR420_ENABLE : 0;
|
intel_dp->dfp.ycbcr_444_to_420 ? DP_CONVERSION_TO_YCBCR420_ENABLE : 0;
|
||||||
|
|
||||||
if (drm_dp_dpcd_writeb(&intel_dp->aux,
|
if (drm_dp_dpcd_writeb(&intel_dp->aux,
|
||||||
DP_PROTOCOL_CONVERTER_CONTROL_1, tmp) != 1)
|
DP_PROTOCOL_CONVERTER_CONTROL_1, tmp) != 1)
|
||||||
@@ -3930,7 +3931,7 @@ static void intel_enable_dp(struct intel_atomic_state *state,
|
|||||||
}
|
}
|
||||||
|
|
||||||
intel_dp_set_power(intel_dp, DP_SET_POWER_D0);
|
intel_dp_set_power(intel_dp, DP_SET_POWER_D0);
|
||||||
intel_dp_configure_protocol_converter(intel_dp);
|
intel_dp_configure_protocol_converter(intel_dp, pipe_config);
|
||||||
intel_dp_start_link_train(intel_dp);
|
intel_dp_start_link_train(intel_dp);
|
||||||
intel_dp_stop_link_train(intel_dp);
|
intel_dp_stop_link_train(intel_dp);
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,8 @@ int intel_dp_get_link_train_fallback_values(struct intel_dp *intel_dp,
|
|||||||
int intel_dp_retrain_link(struct intel_encoder *encoder,
|
int intel_dp_retrain_link(struct intel_encoder *encoder,
|
||||||
struct drm_modeset_acquire_ctx *ctx);
|
struct drm_modeset_acquire_ctx *ctx);
|
||||||
void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode);
|
void intel_dp_set_power(struct intel_dp *intel_dp, u8 mode);
|
||||||
void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp);
|
void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp,
|
||||||
|
const struct intel_crtc_state *crtc_state);
|
||||||
void intel_dp_sink_set_decompression_state(struct intel_dp *intel_dp,
|
void intel_dp_sink_set_decompression_state(struct intel_dp *intel_dp,
|
||||||
const struct intel_crtc_state *crtc_state,
|
const struct intel_crtc_state *crtc_state,
|
||||||
bool enable);
|
bool enable);
|
||||||
|
|||||||
Reference in New Issue
Block a user