kernel_samsung_a53x/drivers/gpu/drm/msm
Zichen Xie ddf9b5cb6e drm/msm/dpu: cast crtc_clk calculation to u64 in _dpu_core_perf_calc_clk()
[ Upstream commit 20c7b42d9dbd048019bfe0af39229e3014007a98 ]

There may be a potential integer overflow issue in
_dpu_core_perf_calc_clk(). crtc_clk is defined as u64, while
mode->vtotal, mode->hdisplay, and drm_mode_vrefresh(mode) are defined as
a smaller data type. The result of the calculation will be limited to
"int" in this case without correct casting. In screen with high
resolution and high refresh rate, integer overflow may happen.
So, we recommend adding an extra cast to prevent potential
integer overflow.

Fixes: c33b7c0389e1 ("drm/msm/dpu: add support for clk and bw scaling for display")
Signed-off-by: Zichen Xie <zichenxie0106@gmail.com>
Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Patchwork: https://patchwork.freedesktop.org/patch/622206/
Link: https://lore.kernel.org/r/20241029194209.23684-1-zichenxie0106@gmail.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-12-17 13:24:06 +01:00
..
adreno drm/msm/adreno: Use IRQF_NO_AUTOEN flag in request_irq() 2024-12-17 13:24:05 +01:00
disp drm/msm/dpu: cast crtc_clk calculation to u64 in _dpu_core_perf_calc_clk() 2024-12-17 13:24:06 +01:00
dp drm/msm/dp: reset the link phy params before link training 2024-11-23 23:20:49 +01:00
dsi drm/msm/dsi: fix 32-bit signed integer extension in pclk_rate calculation 2024-11-23 23:21:58 +01:00
edp
hdmi
Kconfig
Makefile
msm_atomic.c
msm_atomic_trace.h
msm_atomic_tracepoints.c
msm_debugfs.c Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_debugfs.h
msm_drv.c Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_drv.h Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_fb.c
msm_fbdev.c
msm_fence.c
msm_fence.h
msm_gem.c Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_gem.h
msm_gem_prime.c
msm_gem_shrinker.c Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_gem_submit.c
msm_gem_vma.c
msm_gpu.c Revert "drm/msm: Drop priv->lastctx" 2024-11-24 00:23:25 +01:00
msm_gpu.h Revert "drm/msm: Add priv->mm_lock to protect active/inactive lists" 2024-11-24 00:23:25 +01:00
msm_gpu_trace.h
msm_gpu_tracepoints.c
msm_gpummu.c
msm_iommu.c
msm_kms.h
msm_mmu.h
msm_perf.c
msm_rd.c
msm_ringbuffer.c
msm_ringbuffer.h
msm_submitqueue.c
NOTES