Doubt in gpu driver

Rashika Kheria rashika.kheria at gmail.com
Mon Dec 30 08:51:14 PST 2013


Hello,

I am trying to eliminate missing-prototypes warnings for drivers/gpu/.
I noticed that radeon_reg.h and radeon_drv.h conflict due to
incompatible definitions therefore making it difficult to add both the
headers in a single file. If it is included, then it throws the
following error:

drivers/gpu/drm/radeon/radeon_drv.h:849:0: warning:
"RADEON_RB3D_DSTCACHE_CTLSTAT" redefined [enabled by default]
drivers/gpu/drm/radeon/radeon_reg.h:1627:0: note: this is the location
of the previous definition
drivers/gpu/drm/radeon/radeon_drv.h:1057:0: warning:
"R300_CP_RESYNC_ADDR" redefined [enabled by default]
drivers/gpu/drm/radeon/radeon_reg.h:3342:0: note: this is the location
of the previous definition
drivers/gpu/drm/radeon/radeon_drv.h:1058:0: warning:
"R300_CP_RESYNC_DATA" redefined [enabled by default]
drivers/gpu/drm/radeon/radeon_reg.h:3343:0: note: this is the location
of the previous definition

I am therefore not able to add prototypes to radeon.h (which includes
radeon_reg.h) or radeon_drv.h if a file that needs to include one
already includes the other.

For eg. If I add the prototype declaration of function
r600_cs_legacy_get_tiling_conf to either header file radeon.h or
radeon_drv.h, then I have to add the corresponding header file to
r600_cp.c or r600_cs.c. Hence, either r600_cp.c or r600_cs.c would end
up including both.

I wanted to confirm whether it will be fine to remove the redundant
and conflicting definitions from either radeon_reg.h or radeon_drv.h
or atleast make the definitions match so that the compiler does not
complain.

Thanks,
-- 
Rashika Kheria
B.Tech CSE
IIIT Hyderabad


More information about the dri-devel mailing list