mirror of
https://gitlab.freedesktop.org/mesa/drm.git
synced 2025-12-26 15:50:12 +01:00
Correct a typo in drm.h Move most of <device>_drv.c into <device>.h. Move
linux init code into drm_drv.h with (I am pretty sure) proper
protection from cpp problems.
This commit is contained in:
parent
6f0c4ebd9b
commit
ed692e57b4
22 changed files with 141 additions and 611 deletions
|
|
@ -29,7 +29,6 @@
|
|||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "mga.h"
|
||||
|
|
@ -38,16 +37,6 @@
|
|||
#include "mga_drm.h"
|
||||
#include "mga_drv.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "mga"
|
||||
#define DRIVER_DESC "Matrox G200/G400"
|
||||
#define DRIVER_DATE "20010321"
|
||||
|
||||
#define DRIVER_MAJOR 3
|
||||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
|
|
@ -58,25 +47,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { mga_dma_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)] = { mga_dma_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_dma_flush, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)] = { mga_dma_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)] = { mga_dma_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)] = { mga_dma_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_dma_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)] = { mga_dma_iload, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 },
|
||||
|
||||
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -84,8 +54,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -41,18 +41,8 @@
|
|||
#include "ati_pcigart.h"
|
||||
#endif
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "r128"
|
||||
#define DRIVER_DESC "ATI Rage 128"
|
||||
#define DRIVER_DATE "20010405"
|
||||
|
||||
#define DRIVER_MAJOR 2
|
||||
#define DRIVER_MINOR 2
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
* Please report to eta@lclark.edu inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
drm_chipinfo_t DRM(devicelist)[] = {
|
||||
{0x1002, 0x4c45, 1, "ATI Rage 128 Mobility LE"},
|
||||
|
|
@ -98,35 +88,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { r128_cce_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)] = { r128_cce_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)] = { r128_cce_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)] = { r128_cce_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)] = { r128_cce_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)] = { r128_cce_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)] = { r128_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)] = { r128_cce_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)] = { r128_cce_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)] = { r128_cce_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)] = { r128_cce_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)] = { r128_cce_blit, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)] = { r128_cce_depth, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 },
|
||||
|
||||
|
||||
#if 0
|
||||
/* GH: Count data sent to card via ring or vertex/indirect buffers.
|
||||
*/
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -134,8 +95,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "radeon.h"
|
||||
|
|
@ -40,26 +38,8 @@
|
|||
#include "ati_pcigart.h"
|
||||
#endif
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "radeon"
|
||||
#define DRIVER_DESC "ATI Radeon"
|
||||
#define DRIVER_DATE "20020611"
|
||||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 3
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
*/
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
* Please report to eta@lclark.edu inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
drm_chipinfo_t DRM(devicelist)[] = {
|
||||
{0x1002, 0x5144, 1, "ATI Radeon QD"},
|
||||
|
|
@ -70,38 +50,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
* 1.3 - Add cmdbuf ioctl (keith)
|
||||
* - Add support for new radeon packets (keith)
|
||||
* - Add getparam ioctl (keith)
|
||||
* - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
|
||||
*/
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)] = { radeon_cp_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)] = { radeon_cp_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)] = { radeon_cp_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)] = { radeon_cp_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)] = { radeon_cp_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)] = { radeon_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)] = { radeon_cp_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)] = { radeon_cp_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)] = { radeon_cp_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)] = { radeon_cp_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)] = { radeon_cp_texture, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)] = { radeon_cp_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)] = { radeon_cp_indirect, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)] = { radeon_cp_vertex2, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)] = { radeon_cp_cmdbuf, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)] = { radeon_cp_getparam, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)] = { radeon_cp_flip, 1, 0 },
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -109,8 +57,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
@ -122,4 +68,4 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_scatter.h"
|
||||
#endif
|
||||
|
||||
DRIVER_MODULE(radeon, pci, radeon_driver, radeon_devclass, 0, 0);
|
||||
DRIVER_MODULE(DRIVER_NAME, pci, DRM(driver), DRM(devclass), 0, 0);
|
||||
|
|
|
|||
|
|
@ -29,7 +29,6 @@
|
|||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "mga.h"
|
||||
|
|
@ -38,16 +37,6 @@
|
|||
#include "mga_drm.h"
|
||||
#include "mga_drv.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "mga"
|
||||
#define DRIVER_DESC "Matrox G200/G400"
|
||||
#define DRIVER_DATE "20010321"
|
||||
|
||||
#define DRIVER_MAJOR 3
|
||||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
|
|
@ -58,25 +47,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { mga_dma_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)] = { mga_dma_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_dma_flush, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)] = { mga_dma_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)] = { mga_dma_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)] = { mga_dma_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_dma_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)] = { mga_dma_iload, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 },
|
||||
|
||||
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -84,8 +54,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -41,18 +41,8 @@
|
|||
#include "ati_pcigart.h"
|
||||
#endif
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "r128"
|
||||
#define DRIVER_DESC "ATI Rage 128"
|
||||
#define DRIVER_DATE "20010405"
|
||||
|
||||
#define DRIVER_MAJOR 2
|
||||
#define DRIVER_MINOR 2
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
* Please report to eta@lclark.edu inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
drm_chipinfo_t DRM(devicelist)[] = {
|
||||
{0x1002, 0x4c45, 1, "ATI Rage 128 Mobility LE"},
|
||||
|
|
@ -98,35 +88,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { r128_cce_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)] = { r128_cce_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)] = { r128_cce_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)] = { r128_cce_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)] = { r128_cce_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)] = { r128_cce_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)] = { r128_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)] = { r128_cce_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)] = { r128_cce_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)] = { r128_cce_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)] = { r128_cce_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)] = { r128_cce_blit, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)] = { r128_cce_depth, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 },
|
||||
|
||||
|
||||
#if 0
|
||||
/* GH: Count data sent to card via ring or vertex/indirect buffers.
|
||||
*/
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -134,8 +95,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@
|
|||
* Gareth Hughes <gareth@valinux.com>
|
||||
*/
|
||||
|
||||
|
||||
|
||||
#include <sys/types.h>
|
||||
|
||||
#include "radeon.h"
|
||||
|
|
@ -40,26 +38,8 @@
|
|||
#include "ati_pcigart.h"
|
||||
#endif
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "radeon"
|
||||
#define DRIVER_DESC "ATI Radeon"
|
||||
#define DRIVER_DATE "20020611"
|
||||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 3
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
*/
|
||||
|
||||
/* List acquired from http://www.yourvote.com/pci/pcihdr.h and xc/xc/programs/Xserver/hw/xfree86/common/xf86PciInfo.h
|
||||
* Please report to anholt@teleport.com inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
* Please report to eta@lclark.edu inaccuracies or if a chip you have works that is marked unsupported here.
|
||||
*/
|
||||
drm_chipinfo_t DRM(devicelist)[] = {
|
||||
{0x1002, 0x5144, 1, "ATI Radeon QD"},
|
||||
|
|
@ -70,38 +50,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
{0, 0, 0, NULL}
|
||||
};
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
* 1.3 - Add cmdbuf ioctl (keith)
|
||||
* - Add support for new radeon packets (keith)
|
||||
* - Add getparam ioctl (keith)
|
||||
* - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
|
||||
*/
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)] = { radeon_cp_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)] = { radeon_cp_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)] = { radeon_cp_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)] = { radeon_cp_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)] = { radeon_cp_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)] = { radeon_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)] = { radeon_cp_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)] = { radeon_cp_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)] = { radeon_cp_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)] = { radeon_cp_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)] = { radeon_cp_texture, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)] = { radeon_cp_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)] = { radeon_cp_indirect, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)] = { radeon_cp_vertex2, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)] = { radeon_cp_cmdbuf, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)] = { radeon_cp_getparam, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)] = { radeon_cp_flip, 1, 0 },
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -109,8 +57,6 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
@ -122,4 +68,4 @@ drm_chipinfo_t DRM(devicelist)[] = {
|
|||
#include "drm_scatter.h"
|
||||
#endif
|
||||
|
||||
DRIVER_MODULE(radeon, pci, radeon_driver, radeon_devclass, 0, 0);
|
||||
DRIVER_MODULE(DRIVER_NAME, pci, DRM(driver), DRM(devclass), 0, 0);
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ static int DRM(alloc_queue)(drm_device_t *dev)
|
|||
/* Allocate a new queue */
|
||||
down(&dev->struct_sem);
|
||||
|
||||
queue = gamma_alloc(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
queue = DRM(alloc)(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
memset(queue, 0, sizeof(*queue));
|
||||
atomic_set(&queue->use_count, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,22 @@ static struct file_operations DRM(fops) = { \
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
/* Use an additional macro to avoid preprocessor troubles */
|
||||
#define DRM_OPTIONS_FUNC DRM(options)
|
||||
static int __init DRM(options)( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", DRM_OPTIONS_FUNC );
|
||||
#undef DRM_OPTIONS_FUNC
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The default number of instances (minor numbers) to initialize.
|
||||
|
|
|
|||
|
|
@ -35,36 +35,6 @@
|
|||
#include "drm.h"
|
||||
#include "mga_drm.h"
|
||||
#include "mga_drv.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "mga"
|
||||
#define DRIVER_DESC "Matrox G200/G400"
|
||||
#define DRIVER_DATE "20010321"
|
||||
|
||||
#define DRIVER_MAJOR 3
|
||||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { mga_dma_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)] = { mga_dma_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_dma_flush, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)] = { mga_dma_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)] = { mga_dma_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)] = { mga_dma_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_dma_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)] = { mga_dma_iload, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 },
|
||||
|
||||
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -72,27 +42,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init mga_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", mga_options );
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -37,45 +37,6 @@
|
|||
#include "r128_drv.h"
|
||||
#include "ati_pcigart.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "r128"
|
||||
#define DRIVER_DESC "ATI Rage 128"
|
||||
#define DRIVER_DATE "20010917"
|
||||
|
||||
#define DRIVER_MAJOR 2
|
||||
#define DRIVER_MINOR 2
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { r128_cce_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)] = { r128_cce_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)] = { r128_cce_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)] = { r128_cce_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)] = { r128_cce_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)] = { r128_cce_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)] = { r128_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)] = { r128_cce_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)] = { r128_cce_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)] = { r128_cce_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)] = { r128_cce_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)] = { r128_cce_blit, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)] = { r128_cce_depth, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 },
|
||||
|
||||
|
||||
#if 0
|
||||
/* GH: Count data sent to card via ring or vertex/indirect buffers.
|
||||
*/
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -83,26 +44,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init r128_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", r128_options );
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -35,49 +35,6 @@
|
|||
#include "radeon_drv.h"
|
||||
#include "ati_pcigart.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "radeon"
|
||||
#define DRIVER_DESC "ATI Radeon"
|
||||
#define DRIVER_DATE "20020611"
|
||||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 3
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
* 1.3 - Add cmdbuf ioctl (keith)
|
||||
* - Add support for new radeon packets (keith)
|
||||
* - Add getparam ioctl (keith)
|
||||
* - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
|
||||
*/
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)] = { radeon_cp_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)] = { radeon_cp_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)] = { radeon_cp_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)] = { radeon_cp_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)] = { radeon_cp_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)] = { radeon_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)] = { radeon_cp_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)] = { radeon_cp_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)] = { radeon_cp_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)] = { radeon_cp_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)] = { radeon_cp_texture, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)] = { radeon_cp_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)] = { radeon_cp_indirect, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)] = { radeon_cp_vertex2, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)] = { radeon_cp_cmdbuf, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)] = { radeon_cp_getparam, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)] = { radeon_cp_flip, 1, 0 },
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -85,26 +42,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init radeon_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", radeon_options );
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
z/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
|
||||
*
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
|||
|
|
@ -555,7 +555,7 @@ static int DRM(alloc_queue)(drm_device_t *dev)
|
|||
/* Allocate a new queue */
|
||||
down(&dev->struct_sem);
|
||||
|
||||
queue = gamma_alloc(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
queue = DRM(alloc)(sizeof(*queue), DRM_MEM_QUEUES);
|
||||
memset(queue, 0, sizeof(*queue));
|
||||
atomic_set(&queue->use_count, 1);
|
||||
|
||||
|
|
|
|||
|
|
@ -127,6 +127,22 @@ static struct file_operations DRM(fops) = { \
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
/* Use an additional macro to avoid preprocessor troubles */
|
||||
#define DRM_OPTIONS_FUNC DRM(options)
|
||||
static int __init DRM(options)( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", DRM_OPTIONS_FUNC );
|
||||
#undef DRM_OPTIONS_FUNC
|
||||
#endif
|
||||
|
||||
/*
|
||||
* The default number of instances (minor numbers) to initialize.
|
||||
|
|
|
|||
|
|
@ -35,36 +35,6 @@
|
|||
#include "drm.h"
|
||||
#include "mga_drm.h"
|
||||
#include "mga_drv.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "mga"
|
||||
#define DRIVER_DESC "Matrox G200/G400"
|
||||
#define DRIVER_DATE "20010321"
|
||||
|
||||
#define DRIVER_MAJOR 3
|
||||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { mga_dma_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)] = { mga_dma_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_dma_flush, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)] = { mga_dma_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)] = { mga_dma_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)] = { mga_dma_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_dma_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)] = { mga_dma_iload, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 },
|
||||
|
||||
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -72,27 +42,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init mga_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", mga_options );
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -37,45 +37,6 @@
|
|||
#include "r128_drv.h"
|
||||
#include "ati_pcigart.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "r128"
|
||||
#define DRIVER_DESC "ATI Rage 128"
|
||||
#define DRIVER_DATE "20010917"
|
||||
|
||||
#define DRIVER_MAJOR 2
|
||||
#define DRIVER_MINOR 2
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { r128_cce_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)] = { r128_cce_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)] = { r128_cce_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)] = { r128_cce_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)] = { r128_cce_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)] = { r128_cce_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)] = { r128_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)] = { r128_cce_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)] = { r128_cce_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)] = { r128_cce_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)] = { r128_cce_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)] = { r128_cce_blit, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)] = { r128_cce_depth, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 },
|
||||
|
||||
|
||||
#if 0
|
||||
/* GH: Count data sent to card via ring or vertex/indirect buffers.
|
||||
*/
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
#endif
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -83,26 +44,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init r128_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", r128_options );
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -35,49 +35,6 @@
|
|||
#include "radeon_drv.h"
|
||||
#include "ati_pcigart.h"
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "radeon"
|
||||
#define DRIVER_DESC "ATI Radeon"
|
||||
#define DRIVER_DATE "20020611"
|
||||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 3
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
* 1.3 - Add cmdbuf ioctl (keith)
|
||||
* - Add support for new radeon packets (keith)
|
||||
* - Add getparam ioctl (keith)
|
||||
* - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
|
||||
*/
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)] = { radeon_cp_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)] = { radeon_cp_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)] = { radeon_cp_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)] = { radeon_cp_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)] = { radeon_cp_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)] = { radeon_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)] = { radeon_cp_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)] = { radeon_cp_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)] = { radeon_cp_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)] = { radeon_cp_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)] = { radeon_cp_texture, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)] = { radeon_cp_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)] = { radeon_cp_indirect, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)] = { radeon_cp_vertex2, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)] = { radeon_cp_cmdbuf, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)] = { radeon_cp_getparam, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)] = { radeon_cp_flip, 1, 0 },
|
||||
|
||||
|
||||
#include "drm_agpsupport.h"
|
||||
#include "drm_auth.h"
|
||||
#include "drm_bufs.h"
|
||||
|
|
@ -85,26 +42,6 @@
|
|||
#include "drm_dma.h"
|
||||
#include "drm_drawable.h"
|
||||
#include "drm_drv.h"
|
||||
|
||||
#ifndef MODULE
|
||||
/* DRM(options) is called by the kernel to parse command-line options
|
||||
* passed via the boot-loader (e.g., LILO). It calls the insmod option
|
||||
* routine, drm_parse_drm.
|
||||
*/
|
||||
|
||||
/* JH- We have to hand expand the string ourselves because of the cpp. If
|
||||
* anyone can think of a way that we can fit into the __setup macro without
|
||||
* changing it, then please send the solution my way.
|
||||
*/
|
||||
static int __init radeon_options( char *str )
|
||||
{
|
||||
DRM(parse_options)( str );
|
||||
return 1;
|
||||
}
|
||||
|
||||
__setup( DRIVER_NAME "=", radeon_options );
|
||||
#endif
|
||||
|
||||
#include "drm_fops.h"
|
||||
#include "drm_init.h"
|
||||
#include "drm_ioctl.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
z/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
|
||||
*
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
z/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
/* drm.h -- Header for Direct Rendering Manager -*- linux-c -*-
|
||||
* Created: Mon Jan 4 10:05:05 1999 by faith@precisioninsight.com
|
||||
*
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
|
|
|
|||
27
shared/mga.h
27
shared/mga.h
|
|
@ -41,6 +41,33 @@
|
|||
#define __HAVE_MTRR 1
|
||||
#define __HAVE_CTX_BITMAP 1
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "mga"
|
||||
#define DRIVER_DESC "Matrox G200/G400"
|
||||
#define DRIVER_DATE "20010321"
|
||||
|
||||
#define DRIVER_MAJOR 3
|
||||
#define DRIVER_MINOR 0
|
||||
#define DRIVER_PATCHLEVEL 2
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { mga_dma_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INIT)] = { mga_dma_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_FLUSH)] = { mga_dma_flush, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_RESET)] = { mga_dma_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_SWAP)] = { mga_dma_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_CLEAR)] = { mga_dma_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_VERTEX)] = { mga_dma_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_INDICES)] = { mga_dma_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_ILOAD)] = { mga_dma_iload, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_MGA_BLIT)] = { mga_dma_blit, 1, 0 },
|
||||
|
||||
#define __HAVE_COUNTERS 3
|
||||
#define __HAVE_COUNTER6 _DRM_STAT_IRQ
|
||||
#define __HAVE_COUNTER7 _DRM_STAT_PRIMARY
|
||||
#define __HAVE_COUNTER8 _DRM_STAT_SECONDARY
|
||||
|
||||
/* Driver customization:
|
||||
*/
|
||||
#define DRIVER_PRETAKEDOWN() do { \
|
||||
|
|
|
|||
|
|
@ -43,6 +43,35 @@
|
|||
#define __HAVE_SG 1
|
||||
#define __HAVE_PCI_DMA 1
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "r128"
|
||||
#define DRIVER_DESC "ATI Rage 128"
|
||||
#define DRIVER_DATE "20010917"
|
||||
|
||||
#define DRIVER_MAJOR 2
|
||||
#define DRIVER_MINOR 2
|
||||
#define DRIVER_PATCHLEVEL 0
|
||||
|
||||
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { r128_cce_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INIT)] = { r128_cce_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_START)] = { r128_cce_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_STOP)] = { r128_cce_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_RESET)] = { r128_cce_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CCE_IDLE)] = { r128_cce_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_RESET)] = { r128_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_FULLSCREEN)] = { r128_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_SWAP)] = { r128_cce_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_CLEAR)] = { r128_cce_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_VERTEX)] = { r128_cce_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDICES)] = { r128_cce_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_BLIT)] = { r128_cce_blit, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_DEPTH)] = { r128_cce_depth, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_STIPPLE)] = { r128_cce_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_R128_INDIRECT)] = { r128_cce_indirect, 1, 1 },
|
||||
|
||||
/* Driver customization:
|
||||
*/
|
||||
#define DRIVER_PRERELEASE() do { \
|
||||
|
|
|
|||
|
|
@ -43,6 +43,48 @@
|
|||
#define __HAVE_SG 1
|
||||
#define __HAVE_PCI_DMA 1
|
||||
|
||||
#define DRIVER_AUTHOR "Gareth Hughes, VA Linux Systems Inc."
|
||||
|
||||
#define DRIVER_NAME "radeon"
|
||||
#define DRIVER_DESC "ATI Radeon"
|
||||
#define DRIVER_DATE "20020611"
|
||||
|
||||
#define DRIVER_MAJOR 1
|
||||
#define DRIVER_MINOR 3
|
||||
#define DRIVER_PATCHLEVEL 1
|
||||
|
||||
/* Interface history:
|
||||
*
|
||||
* 1.1 - ??
|
||||
* 1.2 - Add vertex2 ioctl (keith)
|
||||
* - Add stencil capability to clear ioctl (gareth, keith)
|
||||
* - Increase MAX_TEXTURE_LEVELS (brian)
|
||||
* 1.3 - Add cmdbuf ioctl (keith)
|
||||
* - Add support for new radeon packets (keith)
|
||||
* - Add getparam ioctl (keith)
|
||||
* - Add flip-buffers ioctl, deprecate fullscreen foo (keith).
|
||||
*/
|
||||
#define DRIVER_IOCTLS \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_DMA)] = { radeon_cp_buffers, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_INIT)] = { radeon_cp_init, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_START)] = { radeon_cp_start, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_STOP)] = { radeon_cp_stop, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_RESET)] = { radeon_cp_reset, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CP_IDLE)] = { radeon_cp_idle, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_RESET)] = { radeon_engine_reset, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FULLSCREEN)] = { radeon_fullscreen, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_SWAP)] = { radeon_cp_swap, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CLEAR)] = { radeon_cp_clear, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX)] = { radeon_cp_vertex, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDICES)] = { radeon_cp_indices, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_TEXTURE)] = { radeon_cp_texture, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_STIPPLE)] = { radeon_cp_stipple, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_INDIRECT)] = { radeon_cp_indirect, 1, 1 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_VERTEX2)] = { radeon_cp_vertex2, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_CMDBUF)] = { radeon_cp_cmdbuf, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_GETPARAM)] = { radeon_cp_getparam, 1, 0 }, \
|
||||
[DRM_IOCTL_NR(DRM_IOCTL_RADEON_FLIP)] = { radeon_cp_flip, 1, 0 },
|
||||
|
||||
/* Driver customization:
|
||||
*/
|
||||
#define DRIVER_PRERELEASE() do { \
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue