Doubt in gpu driver

Alex Deucher alexdeucher at gmail.com
Thu Jan 2 12:00:09 PST 2014


On Mon, Dec 30, 2013 at 11:51 AM, Rashika Kheria
<rashika.kheria at gmail.com> wrote:
> 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.


I would like to keep them separate.  The radeon drm is basically two
drivers (the old UMS one and the new KMS one) that get compiled into
one binary.  Most of radeon_drv.h is a remnant of the old UMS driver
and is deprecated.  At some point it will be removed.

Alex

>
> Thanks,
> --
> Rashika Kheria
> B.Tech CSE
> IIIT Hyderabad
> _______________________________________________
> dri-devel mailing list
> dri-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel


More information about the dri-devel mailing list