.. | .. |
---|
31 | 31 | #ifndef __MGA_DRV_H__ |
---|
32 | 32 | #define __MGA_DRV_H__ |
---|
33 | 33 | |
---|
| 34 | +#include <linux/irqreturn.h> |
---|
| 35 | +#include <linux/pci.h> |
---|
| 36 | +#include <linux/slab.h> |
---|
| 37 | + |
---|
| 38 | +#include <drm/drm_agpsupport.h> |
---|
| 39 | +#include <drm/drm_device.h> |
---|
| 40 | +#include <drm/drm_file.h> |
---|
| 41 | +#include <drm/drm_ioctl.h> |
---|
| 42 | +#include <drm/drm_irq.h> |
---|
34 | 43 | #include <drm/drm_legacy.h> |
---|
| 44 | +#include <drm/drm_print.h> |
---|
| 45 | +#include <drm/drm_sarea.h> |
---|
| 46 | +#include <drm/drm_vblank.h> |
---|
| 47 | +#include <drm/mga_drm.h> |
---|
35 | 48 | |
---|
36 | 49 | /* General customization: |
---|
37 | 50 | */ |
---|
.. | .. |
---|
188 | 201 | extern int mga_enable_vblank(struct drm_device *dev, unsigned int pipe); |
---|
189 | 202 | extern void mga_disable_vblank(struct drm_device *dev, unsigned int pipe); |
---|
190 | 203 | extern u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int pipe); |
---|
191 | | -extern int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence); |
---|
| 204 | +extern void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence); |
---|
192 | 205 | extern int mga_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence); |
---|
193 | 206 | extern irqreturn_t mga_driver_irq_handler(int irq, void *arg); |
---|
194 | 207 | extern void mga_driver_irq_preinstall(struct drm_device *dev); |
---|
.. | .. |
---|
199 | 212 | |
---|
200 | 213 | #define mga_flush_write_combine() wmb() |
---|
201 | 214 | |
---|
202 | | -#define MGA_READ8(reg) DRM_READ8(dev_priv->mmio, (reg)) |
---|
203 | | -#define MGA_READ(reg) DRM_READ32(dev_priv->mmio, (reg)) |
---|
204 | | -#define MGA_WRITE8(reg, val) DRM_WRITE8(dev_priv->mmio, (reg), (val)) |
---|
205 | | -#define MGA_WRITE(reg, val) DRM_WRITE32(dev_priv->mmio, (reg), (val)) |
---|
| 215 | +#define MGA_READ8(reg) \ |
---|
| 216 | + readb(((void __iomem *)dev_priv->mmio->handle) + (reg)) |
---|
| 217 | +#define MGA_READ(reg) \ |
---|
| 218 | + readl(((void __iomem *)dev_priv->mmio->handle) + (reg)) |
---|
| 219 | +#define MGA_WRITE8(reg, val) \ |
---|
| 220 | + writeb(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) |
---|
| 221 | +#define MGA_WRITE(reg, val) \ |
---|
| 222 | + writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg)) |
---|
206 | 223 | |
---|
207 | 224 | #define DWGREG0 0x1c00 |
---|
208 | 225 | #define DWGREG0_END 0x1dff |
---|