aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2025-01-31 14:50:06 +0200
committerJani Nikula <jani.nikula@intel.com>2025-02-03 16:31:48 +0200
commitcf92a9d4f01d8d63013dc0bdf1fc63ad4f6e7334 (patch)
tree88b2c229c4ed06d423c24c15dca47dc2fb28a22a
parentdrm/i915/dp: Drop compute_pipe_bpp parameter from intel_dp_dsc_compute_config() (diff)
downloadwireguard-linux-cf92a9d4f01d8d63013dc0bdf1fc63ad4f6e7334.tar.xz
wireguard-linux-cf92a9d4f01d8d63013dc0bdf1fc63ad4f6e7334.zip
drm/i915/dp: Pass connector state all the way to dsc_compute_link_config()
Going forward, we'll need the connector state in dsc_compute_link_config(). Pass it along through the chain. Maintain the same parameter order where relevant. Reviewed-by: Imre Deak <imre.deak@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/645d950a80df5fd4441d69aba4893ab263b3e555.1738327620.git.jani.nikula@intel.com
-rw-r--r--drivers/gpu/drm/i915/display/intel_dp.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index adfd1b6d148d..e287c3d04339 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -1941,6 +1941,7 @@ static bool is_bw_sufficient_for_dsc_config(int dsc_bpp_x16, u32 link_clock,
static int dsc_compute_link_config(struct intel_dp *intel_dp,
struct intel_crtc_state *pipe_config,
+ struct drm_connector_state *conn_state,
const struct link_config_limits *limits,
int dsc_bpp_x16,
int timeslots)
@@ -2098,13 +2099,14 @@ static bool intel_dp_dsc_valid_bpp(struct intel_dp *intel_dp, int bpp_x16)
* try depend on the source (platform) and sink.
*/
static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
- const struct intel_connector *connector,
struct intel_crtc_state *pipe_config,
+ struct drm_connector_state *conn_state,
const struct link_config_limits *limits,
int pipe_bpp,
int timeslots)
{
struct intel_display *display = to_intel_display(intel_dp);
+ const struct intel_connector *connector = to_intel_connector(conn_state->connector);
const struct drm_display_mode *adjusted_mode = &pipe_config->hw.adjusted_mode;
int output_bpp;
int dsc_min_bpp;
@@ -2138,6 +2140,7 @@ static int dsc_compute_compressed_bpp(struct intel_dp *intel_dp,
ret = dsc_compute_link_config(intel_dp,
pipe_config,
+ conn_state,
limits,
bpp_x16,
timeslots);
@@ -2209,7 +2212,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
forced_bpp = intel_dp_force_dsc_pipe_bpp(intel_dp, limits);
if (forced_bpp) {
- ret = dsc_compute_compressed_bpp(intel_dp, connector, pipe_config,
+ ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, conn_state,
limits, forced_bpp, timeslots);
if (ret == 0) {
pipe_config->pipe_bpp = forced_bpp;
@@ -2227,7 +2230,7 @@ static int intel_dp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
if (pipe_bpp < limits->pipe.min_bpp || pipe_bpp > limits->pipe.max_bpp)
continue;
- ret = dsc_compute_compressed_bpp(intel_dp, connector, pipe_config,
+ ret = dsc_compute_compressed_bpp(intel_dp, pipe_config, conn_state,
limits, pipe_bpp, timeslots);
if (ret == 0) {
pipe_config->pipe_bpp = pipe_bpp;