drm/amd/display: Check pipe offset before setting vblank
authorAlex Hung <alex.hung@amd.com>
Tue, 23 Apr 2024 00:07:17 +0000 (18:07 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 26 Apr 2024 21:22:44 +0000 (17:22 -0400)
commit5396a70e8cf462ec5ccf2dc8de103c79de9489e6
tree1ca335594a932851d4566f6642164dec16210e87
parentbd31e5026dc39e7ca46ffb763c513130f405b1a8
drm/amd/display: Check pipe offset before setting vblank

pipe_ctx has a size of MAX_PIPES so checking its index before accessing
the array.

This fixes an OVERRUN issue reported by Coverity.

Reviewed-by: Rodrigo Siqueira <rodrigo.siqueira@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/irq/dce110/irq_service_dce110.c