Skip to content

Commit 8193ce9

Browse files
committed
drm/i915/dp: Simplify computing DSC BPPs for eDP
The maximum pipe BPP value (used as the DSC input BPP) has been aligned already to the corresponding source/sink input BPP capabilities in intel_dp_compute_config_limits(). So it isn't needed to perform the same alignment again in intel_edp_dsc_compute_pipe_bpp() called later, this function can simply use the already aligned maximum pipe BPP value, do that. Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> Signed-off-by: Imre Deak <imre.deak@intel.com> Link: https://patch.msgid.link/20251222153547.713360-16-imre.deak@intel.com
1 parent 4d2dd78 commit 8193ce9

1 file changed

Lines changed: 3 additions & 13 deletions

File tree

drivers/gpu/drm/i915/display/intel_dp.c

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2338,26 +2338,16 @@ static int intel_edp_dsc_compute_pipe_bpp(struct intel_dp *intel_dp,
23382338
struct drm_connector_state *conn_state,
23392339
const struct link_config_limits *limits)
23402340
{
2341-
struct intel_display *display = to_intel_display(intel_dp);
23422341
struct intel_connector *connector =
23432342
to_intel_connector(conn_state->connector);
23442343
int pipe_bpp, forced_bpp;
23452344

23462345
forced_bpp = intel_dp_force_dsc_pipe_bpp(intel_dp, limits);
2347-
2348-
if (forced_bpp) {
2346+
if (forced_bpp)
23492347
pipe_bpp = forced_bpp;
2350-
} else {
2351-
int max_bpc = limits->pipe.max_bpp / 3;
2348+
else
2349+
pipe_bpp = limits->pipe.max_bpp;
23522350

2353-
/* For eDP use max bpp that can be supported with DSC. */
2354-
pipe_bpp = intel_dp_dsc_compute_max_bpp(connector, max_bpc);
2355-
if (!is_dsc_pipe_bpp_sufficient(limits, pipe_bpp)) {
2356-
drm_dbg_kms(display->drm,
2357-
"Computed BPC is not in DSC BPC limits\n");
2358-
return -EINVAL;
2359-
}
2360-
}
23612351
pipe_config->port_clock = limits->max_rate;
23622352
pipe_config->lane_count = limits->max_lane_count;
23632353

0 commit comments

Comments
 (0)