Go to the documentation of this file.
13 #ifndef __MGAG200_DRV_H__
14 #define __MGAG200_DRV_H__
25 #include <linux/i2c.h>
30 #define DRIVER_AUTHOR "Matthew Garrett"
32 #define DRIVER_NAME "mgag200"
33 #define DRIVER_DESC "MGA G200 SE"
34 #define DRIVER_DATE "20110418"
36 #define DRIVER_MAJOR 1
37 #define DRIVER_MINOR 0
38 #define DRIVER_PATCHLEVEL 0
40 #define MGAG200FB_CONN_LIMIT 1
42 #define RREG8(reg) ioread8(((void __iomem *)mdev->rmmio) + (reg))
43 #define WREG8(reg, v) iowrite8(v, ((void __iomem *)mdev->rmmio) + (reg))
44 #define RREG32(reg) ioread32(((void __iomem *)mdev->rmmio) + (reg))
45 #define WREG32(reg, v) iowrite32(v, ((void __iomem *)mdev->rmmio) + (reg))
47 #define ATTR_INDEX 0x1fc0
48 #define ATTR_DATA 0x1fc1
50 #define WREG_ATTR(reg, v) \
53 WREG8(ATTR_INDEX, reg); \
54 WREG8(ATTR_DATA, v); \
57 #define WREG_SEQ(reg, v) \
59 WREG8(MGAREG_SEQ_INDEX, reg); \
60 WREG8(MGAREG_SEQ_DATA, v); \
63 #define WREG_CRT(reg, v) \
65 WREG8(MGAREG_CRTC_INDEX, reg); \
66 WREG8(MGAREG_CRTC_DATA, v); \
70 #define WREG_ECRT(reg, v) \
72 WREG8(MGAREG_CRTCEXT_INDEX, reg); \
73 WREG8(MGAREG_CRTCEXT_DATA, v); \
76 #define GFX_INDEX 0x1fce
77 #define GFX_DATA 0x1fcf
79 #define WREG_GFX(reg, v) \
81 WREG8(GFX_INDEX, reg); \
85 #define DAC_INDEX 0x3c00
86 #define DAC_DATA 0x3c0a
88 #define WREG_DAC(reg, v) \
90 WREG8(DAC_INDEX, reg); \
94 #define MGA_MISC_OUT 0x1fc2
95 #define MGA_MISC_IN 0x1fcc
97 #define MGAG200_MAX_FB_HEIGHT 4096
98 #define MGAG200_MAX_FB_WIDTH 4096
100 #define MATROX_DPMS_CLEARED (-1)
102 #define to_mga_crtc(x) container_of(x, struct mga_crtc, base)
103 #define to_mga_encoder(x) container_of(x, struct mga_encoder, base)
104 #define to_mga_connector(x) container_of(x, struct mga_connector, base)
105 #define to_mga_framebuffer(x) container_of(x, struct mga_framebuffer, base)
109 struct drm_gem_object *
obj;
167 #define IS_G200_SE(mdev) (mdev->type == G200_SE_A || mdev->type == G200_SE_B)
208 struct drm_gem_object
gem;
212 #define gem_to_mga_bo(gobj) container_of((gobj), struct mgag200_bo, gem)
237 struct drm_gem_object *obj);
244 struct drm_gem_object **obj);
262 #define DRM_FILE_PAGE_OFFSET (0x100000000ULL >> PAGE_SHIFT)