cleanup VIA driver to look a bit like others before kernel merge
parent
efcb9fb7ae
commit
8727326371
|
@ -27,16 +27,6 @@
|
||||||
#include "via_drm.h"
|
#include "via_drm.h"
|
||||||
#include "via_drv.h"
|
#include "via_drv.h"
|
||||||
|
|
||||||
#define DRIVER_AUTHOR "VIA"
|
|
||||||
|
|
||||||
#define DRIVER_NAME "via"
|
|
||||||
#define DRIVER_DESC "VIA Unichrome"
|
|
||||||
#define DRIVER_DATE "20041010"
|
|
||||||
|
|
||||||
#define DRIVER_MAJOR 2
|
|
||||||
#define DRIVER_MINOR 0
|
|
||||||
#define DRIVER_PATCHLEVEL 0
|
|
||||||
|
|
||||||
#include "drm_pciids.h"
|
#include "drm_pciids.h"
|
||||||
|
|
||||||
static int postinit(struct drm_device *dev, unsigned long flags)
|
static int postinit(struct drm_device *dev, unsigned long flags)
|
||||||
|
|
|
@ -24,7 +24,15 @@
|
||||||
#ifndef _VIA_DRV_H_
|
#ifndef _VIA_DRV_H_
|
||||||
#define _VIA_DRV_H_
|
#define _VIA_DRV_H_
|
||||||
|
|
||||||
#include "via_drm.h"
|
#define DRIVER_AUTHOR "VIA"
|
||||||
|
|
||||||
|
#define DRIVER_NAME "via"
|
||||||
|
#define DRIVER_DESC "VIA Unichrome"
|
||||||
|
#define DRIVER_DATE "20041010"
|
||||||
|
|
||||||
|
#define DRIVER_MAJOR 2
|
||||||
|
#define DRIVER_MINOR 0
|
||||||
|
#define DRIVER_PATCHLEVEL 0
|
||||||
|
|
||||||
typedef struct drm_via_ring_buffer {
|
typedef struct drm_via_ring_buffer {
|
||||||
drm_map_t map;
|
drm_map_t map;
|
||||||
|
|
|
@ -22,6 +22,7 @@
|
||||||
* DEALINGS IN THE SOFTWARE.
|
* DEALINGS IN THE SOFTWARE.
|
||||||
*/
|
*/
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
|
#include "via_drm.h"
|
||||||
#include "via_drv.h"
|
#include "via_drv.h"
|
||||||
|
|
||||||
int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
|
int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
|
||||||
|
|
|
@ -77,7 +77,7 @@ int via_agp_init(DRM_IOCTL_ARGS)
|
||||||
|
|
||||||
AgpHeap = via_mmInit(agp.offset, agp.size);
|
AgpHeap = via_mmInit(agp.offset, agp.size);
|
||||||
|
|
||||||
DRM_DEBUG("offset = %lu, size = %lu", agp.offset, agp.size);
|
DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)agp.offset, (unsigned long)agp.size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -93,7 +93,7 @@ int via_fb_init(DRM_IOCTL_ARGS)
|
||||||
|
|
||||||
FBHeap = via_mmInit(fb.offset, fb.size);
|
FBHeap = via_mmInit(fb.offset, fb.size);
|
||||||
|
|
||||||
DRM_DEBUG("offset = %lu, size = %lu", fb.offset, fb.size);
|
DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)fb.offset, (unsigned long)fb.size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
24
shared/via.h
24
shared/via.h
|
@ -26,8 +26,26 @@
|
||||||
|
|
||||||
#define DRM(x) viadrv_##x
|
#define DRM(x) viadrv_##x
|
||||||
|
|
||||||
/* BEAM: Have enabled DMA,DMA_IRQ and VBL_IRQ needed to do this to get standard
|
#define DRIVER_AUTHOR "VIA"
|
||||||
* support for VBL_IRQ.
|
|
||||||
*/
|
#define DRIVER_NAME "via"
|
||||||
|
#define DRIVER_DESC "VIA Unichrome"
|
||||||
|
#define DRIVER_DATE "20041010"
|
||||||
|
|
||||||
|
#define DRIVER_MAJOR 2
|
||||||
|
#define DRIVER_MINOR 0
|
||||||
|
#define DRIVER_PATCHLEVEL 0
|
||||||
|
|
||||||
|
#define DRIVER_IOCTLS \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_ALLOCMEM)] = { via_mem_alloc, 1, 0 }, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FREEMEM)] = { via_mem_free, 1, 0 }, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_AGP_INIT)] = { via_agp_init, 1, 0 }, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FB_INIT)] = { via_fb_init, 1, 0 }, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_MAP_INIT)] = { via_map_init, 1, 0 }, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_DEC_FUTEX)] = { via_decoder_futex, 1, 0}, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_DMA_INIT)] = { via_dma_init, 1, 0}, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_CMDBUFFER)] = { via_cmdbuffer, 1, 0}, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FLUSH)] = { via_flush_ioctl, 1, 0}, \
|
||||||
|
[DRM_IOCTL_NR(DRM_IOCTL_VIA_PCICMD)] = { via_pci_cmdbuffer, 1, 0}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -28,26 +28,4 @@
|
||||||
#include "via_drm.h"
|
#include "via_drm.h"
|
||||||
#include "via_drv.h"
|
#include "via_drv.h"
|
||||||
|
|
||||||
#define DRIVER_AUTHOR "VIA"
|
|
||||||
|
|
||||||
#define DRIVER_NAME "via"
|
|
||||||
#define DRIVER_DESC "VIA Unichrome"
|
|
||||||
#define DRIVER_DATE "20041010"
|
|
||||||
|
|
||||||
#define DRIVER_MAJOR 2
|
|
||||||
#define DRIVER_MINOR 0
|
|
||||||
#define DRIVER_PATCHLEVEL 0
|
|
||||||
|
|
||||||
#define DRIVER_IOCTLS \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_ALLOCMEM)] = { via_mem_alloc, 1, 0 }, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FREEMEM)] = { via_mem_free, 1, 0 }, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_AGP_INIT)] = { via_agp_init, 1, 0 }, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FB_INIT)] = { via_fb_init, 1, 0 }, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_MAP_INIT)] = { via_map_init, 1, 0 }, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_DEC_FUTEX)] = { via_decoder_futex, 1, 0}, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_DMA_INIT)] = { via_dma_init, 1, 0}, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_CMDBUFFER)] = { via_cmdbuffer, 1, 0}, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_FLUSH)] = { via_flush_ioctl, 1, 0}, \
|
|
||||||
[DRM_IOCTL_NR(DRM_IOCTL_VIA_PCICMD)] = { via_pci_cmdbuffer, 1, 0}
|
|
||||||
|
|
||||||
#include "drm_core.h"
|
#include "drm_core.h"
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
*/
|
*/
|
||||||
#include "via.h"
|
#include "via.h"
|
||||||
#include "drmP.h"
|
#include "drmP.h"
|
||||||
|
#include "via_drm.h"
|
||||||
#include "via_drv.h"
|
#include "via_drv.h"
|
||||||
|
|
||||||
int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
|
int via_do_init_map(drm_device_t * dev, drm_via_init_t * init)
|
||||||
|
|
|
@ -78,7 +78,7 @@ int via_agp_init(DRM_IOCTL_ARGS)
|
||||||
|
|
||||||
AgpHeap = via_mmInit(agp.offset, agp.size);
|
AgpHeap = via_mmInit(agp.offset, agp.size);
|
||||||
|
|
||||||
DRM_DEBUG("offset = %lu, size = %lu", agp.offset, agp.size);
|
DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)agp.offset, (unsigned long)agp.size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ int via_fb_init(DRM_IOCTL_ARGS)
|
||||||
|
|
||||||
FBHeap = via_mmInit(fb.offset, fb.size);
|
FBHeap = via_mmInit(fb.offset, fb.size);
|
||||||
|
|
||||||
DRM_DEBUG("offset = %lu, size = %lu", fb.offset, fb.size);
|
DRM_DEBUG("offset = %lu, size = %lu", (unsigned long)fb.offset, (unsigned long)fb.size);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue