Skip to content

Commit d053fbc

Browse files
MarijnS95lumag
authored andcommitted
drm/msm/dsi: Disallow 8 BPC DSC configuration for alternative BPC values
According to the `/* bpc 8 */` comment below only values for a bits_per_component of 8 are currently hardcoded in place. This is further confirmed by downstream sources [1] containing different constants for other BPC values (and different initial_offset too, with an extra dependency on bits_per_pixel). Prevent future mishaps by explicitly disallowing any other bits_per_component value until the right parameters are put in place and tested. [1]: https://git.codelinaro.org/clo/la/platform/vendor/opensource/display-drivers/-/blob/DISPLAY.LA.2.0.r1-08000-WAIPIO.0/msm/sde_dsc_helper.c#L110-139 Fixes: b908032 ("drm/msm/dsi: add support for dsc data") Reviewed-by: Dmitry Baryshkov <[email protected]> Signed-off-by: Marijn Suijten <[email protected]> Patchwork: https://patchwork.freedesktop.org/patch/508942/ Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Dmitry Baryshkov <[email protected]>
1 parent d2c277c commit d053fbc

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

drivers/gpu/drm/msm/dsi/dsi_host.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,11 @@ static int dsi_populate_dsc_params(struct msm_dsi_host *msm_host, struct drm_dsc
17611761
return -EINVAL;
17621762
}
17631763

1764+
if (dsc->bits_per_component != 8) {
1765+
DRM_DEV_ERROR(&msm_host->pdev->dev, "DSI does not support bits_per_component != 8 yet\n");
1766+
return -EOPNOTSUPP;
1767+
}
1768+
17641769
dsc->rc_model_size = 8192;
17651770
dsc->first_line_bpg_offset = 12;
17661771
dsc->rc_edge_factor = 6;

0 commit comments

Comments
 (0)