drm/amd/display: fix mapping to non-allocated address
authorBrandon Syu <Brandon.Syu@amd.com>
Thu, 22 Dec 2022 08:43:37 +0000 (16:43 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 17 Jan 2023 20:40:44 +0000 (15:40 -0500)
commit9190d4a263264eabf715f5fc1827da45e3fdc247
treea70010df1f87378ae059062ac779e7a65b2a319c
parente0886e1fa53d0c705ff14df14769ddcc6e0a20ca
drm/amd/display: fix mapping to non-allocated address

[Why]
There is an issue mapping non-allocated location of memory.
It would allocate gpio registers from an array out of bounds.

[How]
Patch correct numbers of bounds for using.

Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com>
Reviewed-by: Martin Leung <Martin.Leung@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Brandon Syu <Brandon.Syu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/gpio/dcn20/hw_factory_dcn20.c
drivers/gpu/drm/amd/display/dc/gpio/dcn30/hw_factory_dcn30.c
drivers/gpu/drm/amd/display/dc/gpio/dcn32/hw_factory_dcn32.c
drivers/gpu/drm/amd/display/dc/gpio/ddc_regs.h