Skip to content

[RFC] radeon: Do not redefine existing fourcc values

The xserver XV implementation recently added support for rgba32 [1] and added the definition for FOURCC_RGBA32 to the public header fourcc.h.

But the definition of that value differs from the one already present in the radeon driver.

As a result, the compiler chokes on the redefinition of the value for FOURCC_RGBA32:

|  radeon_textured_video.c:761:9: warning: "FOURCC_RGBA32" redefined
|    761 | #define FOURCC_RGBA32   0x41424752
|        |         ^~~~~~~~~~~~~
|  In file included from radeon_textured_video.c:43:
|    include/xorg/fourcc.h:179:9: note: this is the location of the
|    previous definition
|    179 | #define FOURCC_RGBA32 0x34325241
|        |         ^~~~~~~~~~~~~

To avoid that issue, regardless of what value is actually correct for FOURCC_RGBA32, the implementation in the radeon driver could be more careful when (re)defining common values with a high risk of namespace collision with other (public) headers.

[1] xorg/xserver!1164 (merged)

Signed-off-by: Olivier Fourdan ofourdan@redhat.com
See-also: xorg/xserver!1321

Edited by Olivier Fourdan

Merge request reports

Loading