1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/gpu/drm/msm/dsi
Marijn Suijten cc84b66be2 drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent bits
The bpg_offset array contains negative BPG offsets which fill the full 8
bits of a char thanks to two's complement: this however results in those
bits bleeding into the next field when the value is packed into DSC PPS
by the drm_dsc_helper function, which only expects range_bpg_offset to
contain 6-bit wide values.  As a consequence random slices appear
corrupted on-screen (tested on a Sony Tama Akatsuki device with sdm845).

Use AND operators to limit these two's complement values to 6 bits,
similar to the AMD and i915 drivers.

Fixes: b9080324d6 ("drm/msm/dsi: add support for dsc data")
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Marijn Suijten <marijn.suijten@somainline.org>
Patchwork: https://patchwork.freedesktop.org/patch/508941/
Link: https://lore.kernel.org/r/20221026182824.876933-11-marijn.suijten@somainline.org
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
2022-11-04 17:39:41 +03:00
..
phy drm/msm/dsi: Add phy configuration for QCM2290 2022-11-04 17:39:40 +03:00
dsi.c drm/msm/dsi: drop modeset sanity checks 2022-11-04 17:39:38 +03:00
dsi.h drm/msm/dsi: switch to DRM_PANEL_BRIDGE 2022-09-18 09:38:06 -07:00
dsi.xml.h drm/msm: Update generated headers 2022-04-26 00:56:22 +03:00
dsi_cfg.c drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const() 2022-09-18 09:38:06 -07:00
dsi_cfg.h drm/msm/dsi: Take advantage of devm_regulator_bulk_get_const() 2022-09-18 09:38:06 -07:00
dsi_host.c drm/msm/dsi: Prevent signed BPG offsets from bleeding into adjacent bits 2022-11-04 17:39:41 +03:00
dsi_manager.c drm/msm/dsi: switch to DRM_PANEL_BRIDGE 2022-09-18 09:38:06 -07:00
dsi_phy_7nm.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
dsi_phy_10nm.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
dsi_phy_14nm.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
dsi_phy_20nm.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
dsi_phy_28nm.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
dsi_phy_28nm_8960.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
mmss_cc.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00
sfpb.xml.h drm/msm: Update generated headers 2022-03-04 11:50:41 -08:00