mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-13 11:48:58 -04:00
drm/amd/display: fix graphics_object_id size
The graphics_object_id structure is meant to fit into 32 bits, as it's
passed by value in and out of functions. A recent change increased
the size to 128 bits, so it's now always passed by reference, which
is clearly not intended and ends up producing a compile-time warning:
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c: In function 'construct_phy':
drivers/gpu/drm/amd/amdgpu/../display/dc/link/link_factory.c:743:1: error: the frame size of 1040 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
Add back the bitfields to revert to the original size, while keeping
the 'enum' type change.
Fixes: fec85f995a ("drm/amd/display: Fix compiler redefinition warnings for certain configs")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
88c61827ce
commit
6d438caaea
@@ -226,8 +226,8 @@ enum dp_alt_mode {
|
||||
|
||||
struct graphics_object_id {
|
||||
uint32_t id:8;
|
||||
enum object_enum_id enum_id;
|
||||
enum object_type type;
|
||||
enum object_enum_id enum_id :4;
|
||||
enum object_type type :4;
|
||||
uint32_t reserved:16; /* for padding. total size should be u32 */
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user