Commit 751dbac1 authored by Imre Deak's avatar Imre Deak

drm/i915/dp_mst: Enable DSC passthrough

Enable passing through DSC streams to the sink in last branch devices.

v2:
- Fix the DPCD register address while setting/clearing the passthrough
  flag.
Reviewed-by: default avatarStanislav Lisovskiy <stanislav.lisovskiy@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20231030155843.2251023-25-imre.deak@intel.com
parent 7c4631ff
...@@ -2968,6 +2968,24 @@ intel_dp_sink_set_dsc_decompression(struct intel_connector *connector, ...@@ -2968,6 +2968,24 @@ intel_dp_sink_set_dsc_decompression(struct intel_connector *connector,
str_enable_disable(enable)); str_enable_disable(enable));
} }
static void
intel_dp_sink_set_dsc_passthrough(const struct intel_connector *connector,
bool enable)
{
struct drm_i915_private *i915 = to_i915(connector->base.dev);
struct drm_dp_aux *aux = connector->port ?
connector->port->passthrough_aux : NULL;
if (!aux)
return;
if (write_dsc_decompression_flag(aux,
DP_DSC_PASSTHROUGH_EN, enable) < 0)
drm_dbg_kms(&i915->drm,
"Failed to %s sink compression passthrough state\n",
str_enable_disable(enable));
}
/** /**
* intel_dp_sink_enable_decompression - Enable DSC decompression in sink/last branch device * intel_dp_sink_enable_decompression - Enable DSC decompression in sink/last branch device
* @state: atomic state * @state: atomic state
...@@ -2994,7 +3012,7 @@ void intel_dp_sink_enable_decompression(struct intel_atomic_state *state, ...@@ -2994,7 +3012,7 @@ void intel_dp_sink_enable_decompression(struct intel_atomic_state *state,
!connector->dp.dsc_decompression_aux)) !connector->dp.dsc_decompression_aux))
return; return;
/* TODO: Enable passthrough in the MST last branch device if needed. */ intel_dp_sink_set_dsc_passthrough(connector, true);
intel_dp_sink_set_dsc_decompression(connector, true); intel_dp_sink_set_dsc_decompression(connector, true);
} }
...@@ -3022,7 +3040,7 @@ void intel_dp_sink_disable_decompression(struct intel_atomic_state *state, ...@@ -3022,7 +3040,7 @@ void intel_dp_sink_disable_decompression(struct intel_atomic_state *state,
return; return;
intel_dp_sink_set_dsc_decompression(connector, false); intel_dp_sink_set_dsc_decompression(connector, false);
/* TODO: Disable passthrough in the MST last branch device if needed. */ intel_dp_sink_set_dsc_passthrough(connector, false);
} }
static void static void
......
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