mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2026-05-07 13:28:06 +02:00
Remove some linuxisms that were left in drm_bufs.h, make some types match,
and add a cast to drm_sysctl.h (not sure why this is necessary, but
it's debug info anyway)
This commit is contained in:
parent
433526a123
commit
270e349804
6 changed files with 6 additions and 24 deletions
|
|
@ -107,16 +107,10 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
|
|||
switch ( map->type ) {
|
||||
case _DRM_REGISTERS:
|
||||
case _DRM_FRAME_BUFFER:
|
||||
#if !defined(__sparc__) && !defined(__alpha__)
|
||||
if ( map->offset + map->size < map->offset
|
||||
) {
|
||||
if ( map->offset + map->size < map->offset ) {
|
||||
DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
#endif
|
||||
#ifdef __alpha__
|
||||
map->offset += dev->hose->mem_space->start;
|
||||
#endif
|
||||
#if __REALLY_HAVE_MTRR
|
||||
if ( map->type == _DRM_FRAME_BUFFER ||
|
||||
(map->flags & _DRM_WRITE_COMBINING) ) {
|
||||
|
|
@ -161,9 +155,6 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
|
|||
break;
|
||||
#if __REALLY_HAVE_AGP
|
||||
case _DRM_AGP:
|
||||
#ifdef __alpha__
|
||||
map->offset += dev->hose->mem_space->start;
|
||||
#endif
|
||||
map->offset += dev->agp->base;
|
||||
map->mtrr = dev->agp->agp_mtrr; /* for getmap */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
|||
the circular buffer), is based on Alessandro Rubini's LINUX DEVICE
|
||||
DRIVERS (Cambridge: O'Reilly, 1998), pages 111-113. */
|
||||
|
||||
ssize_t DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
|
||||
int DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
|
||||
{
|
||||
DRM_DEVICE;
|
||||
int left;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ static int DRM(_queues_info)DRM_SYSCTL_HANDLER_ARGS
|
|||
q->read_queue ? 'r':'-',
|
||||
q->write_queue ? 'w':'-',
|
||||
q->flush_queue ? 'f':'-',
|
||||
DRM_BUFCOUNT(&q->waitlist),
|
||||
(int)DRM_BUFCOUNT(&q->waitlist),
|
||||
atomic_read(&q->total_flushed),
|
||||
atomic_read(&q->total_queued),
|
||||
atomic_read(&q->total_locks));
|
||||
|
|
|
|||
|
|
@ -107,16 +107,10 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
|
|||
switch ( map->type ) {
|
||||
case _DRM_REGISTERS:
|
||||
case _DRM_FRAME_BUFFER:
|
||||
#if !defined(__sparc__) && !defined(__alpha__)
|
||||
if ( map->offset + map->size < map->offset
|
||||
) {
|
||||
if ( map->offset + map->size < map->offset ) {
|
||||
DRM(free)( map, sizeof(*map), DRM_MEM_MAPS );
|
||||
return DRM_ERR(EINVAL);
|
||||
}
|
||||
#endif
|
||||
#ifdef __alpha__
|
||||
map->offset += dev->hose->mem_space->start;
|
||||
#endif
|
||||
#if __REALLY_HAVE_MTRR
|
||||
if ( map->type == _DRM_FRAME_BUFFER ||
|
||||
(map->flags & _DRM_WRITE_COMBINING) ) {
|
||||
|
|
@ -161,9 +155,6 @@ int DRM(addmap)( DRM_IOCTL_ARGS )
|
|||
break;
|
||||
#if __REALLY_HAVE_AGP
|
||||
case _DRM_AGP:
|
||||
#ifdef __alpha__
|
||||
map->offset += dev->hose->mem_space->start;
|
||||
#endif
|
||||
map->offset += dev->agp->base;
|
||||
map->mtrr = dev->agp->agp_mtrr; /* for getmap */
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ int DRM(open_helper)(dev_t kdev, int flags, int fmt, DRM_STRUCTPROC *p,
|
|||
the circular buffer), is based on Alessandro Rubini's LINUX DEVICE
|
||||
DRIVERS (Cambridge: O'Reilly, 1998), pages 111-113. */
|
||||
|
||||
ssize_t DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
|
||||
int DRM(read)(dev_t kdev, struct uio *uio, int ioflag)
|
||||
{
|
||||
DRM_DEVICE;
|
||||
int left;
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ static int DRM(_queues_info)DRM_SYSCTL_HANDLER_ARGS
|
|||
q->read_queue ? 'r':'-',
|
||||
q->write_queue ? 'w':'-',
|
||||
q->flush_queue ? 'f':'-',
|
||||
DRM_BUFCOUNT(&q->waitlist),
|
||||
(int)DRM_BUFCOUNT(&q->waitlist),
|
||||
atomic_read(&q->total_flushed),
|
||||
atomic_read(&q->total_queued),
|
||||
atomic_read(&q->total_locks));
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue