All of lore.kernel.org
 help / color / mirror / Atom feed
* gcc 12.1.1 warnings around display writeback
@ 2022-06-01  1:34 Dave Airlie
  0 siblings, 0 replies; only message in thread
From: Dave Airlie @ 2022-06-01  1:34 UTC (permalink / raw)
  To: amd-gfx mailing list, Harry Wentland, Deucher, Alexander

I recently finally got my build box updated to a modern gcc, and I
started seeing

/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:
In function ‘dc_stream_remove_writeback’:
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:523:55:
warning: array subscript [0, 0] is outside array bounds of ‘struct
dc_writeback_info[1]’ [-Warray-bounds]
  523 |                                 stream->writeback_info[j] =
stream->writeback_info[i];
      |                                 ~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dc.h:1110,
                 from
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/inc/core_types.h:29,
                 from
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/basics/dc_common.h:29,
                 from
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:30:
/home/airlied/devel/kernel/dim/src/drivers/gpu/drm/amd/amdgpu/../display/dc/dc_stream.h:230:34:
note: while referencing ‘writeback_info’
  230 |         struct dc_writeback_info writeback_info[MAX_DWB_PIPES];
      |                                  ^~~~~~~~~~~~~~

There's a bunch of code in dc_stream.c to handle multiple writeback
info, but MAX_DWB_PIPES is set to 1, will this ever be increased? can
we rip out the code that assumes it's > 1?

Dave.

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-01  1:35 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-01  1:34 gcc 12.1.1 warnings around display writeback Dave Airlie

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.