]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
drm/amd/display: Wrong index type for pipe iterator
authorSaaem Rizvi <syedsaaem.rizvi@amd.com>
Thu, 18 May 2023 16:12:20 +0000 (12:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 16:41:26 +0000 (12:41 -0400)
[Why and How]
Type mismatch in index and pipe count might cause an infinite loop. code
Change should resolve this issue.

Acked-by: Stylon Wang <stylon.wang@amd.com>
Signed-off-by: Saaem Rizvi <syedsaaem.rizvi@amd.com>
Reviewed-by: Josip Pavic <Josip.Pavic@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn314/dcn314_hwseq.c
drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c

index 46b6f4f9e1fd1ac7c7f4316da0d44845ee9d84c0..ce7e6f20b31fc1bec262721beb315bd5a32433da 100644 (file)
@@ -392,7 +392,7 @@ void dcn314_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx)
 
 void dcn314_resync_fifo_dccg_dio(struct dce_hwseq *hws, struct dc *dc, struct dc_state *context)
 {
-       uint8_t i;
+       unsigned int i;
        struct pipe_ctx *pipe = NULL;
        bool otg_disabled[MAX_PIPES] = {false};
 
index 3f11992e380b03ef93e737510763a37c5f8b6dcf..00f32ffe00796ccc124ef3f36ed85f3378d2bda7 100644 (file)
@@ -1201,7 +1201,7 @@ void dcn32_set_pixels_per_cycle(struct pipe_ctx *pipe_ctx)
 
 void dcn32_resync_fifo_dccg_dio(struct dce_hwseq *hws, struct dc *dc, struct dc_state *context)
 {
-       uint8_t i;
+       unsigned int i;
        struct pipe_ctx *pipe = NULL;
        bool otg_disabled[MAX_PIPES] = {false};