From f759fef40101bc0796e5628c1dce60ae2c8a7e87 Mon Sep 17 00:00:00 2001 From: jsg Date: Thu, 12 Sep 2024 23:36:35 +0000 Subject: [PATCH] drm/amd/display: Check denominator pbn_div before used From Alex Hung dfafee0a7b51c7c9612edd2d991401294964d02f in linux-6.6.y/6.6.51 116a678f3a9abc24f5c9d2525b7393d18d9eb58e in mainline linux --- sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index 4773734d8e6..9688dc53952 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -6941,7 +6941,7 @@ static int dm_update_mst_vcpi_slots_for_dsc(struct drm_atomic_state *state, } } - if (j == dc_state->stream_count) + if (j == dc_state->stream_count || pbn_div == 0) continue; slot_num = DIV_ROUND_UP(pbn, pbn_div); -- 2.20.1