summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/mga/mga_drv.h
diff options
context:
space:
mode:
authorSam Ravnborg <sam@ravnborg.org>2019-06-23 12:35:39 +0200
committerSam Ravnborg <sam@ravnborg.org>2019-06-30 09:48:04 +0200
commit91f85e8feb1b4703d8bad63cda603dacf2a825d4 (patch)
tree50bcf82b1a3841f07295df5c4486e13288550d10 /drivers/gpu/drm/mga/mga_drv.h
parent583bbf46133c726bae277e8f4e32bfba2a528c7f (diff)
drm/mga: drop dependency on drm_os_linux.h
Opencode all macros used from the deprecated drm_os_linux.h header file. The DRM_WAIT_ON used 3 * HZ as timeout. This was translated to 3000 msec. The return value of mga_driver_fence_wait() was not used, so make it return void to simplify code a bit. v2: - fixed timeout to 3000 msec (original value was 3 * Hz) - drop unused return value from mga_driver_fence_wait() Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Daniel Vetter <daniel@ffwll.ch> Cc: David Airlie <airlied@linux.ie> Link: https://patchwork.freedesktop.org/patch/msgid/20190623103542.30697-2-sam@ravnborg.org
Diffstat (limited to 'drivers/gpu/drm/mga/mga_drv.h')
-rw-r--r--drivers/gpu/drm/mga/mga_drv.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/gpu/drm/mga/mga_drv.h b/drivers/gpu/drm/mga/mga_drv.h
index a45bb22275a7..1766c195b397 100644
--- a/drivers/gpu/drm/mga/mga_drv.h
+++ b/drivers/gpu/drm/mga/mga_drv.h
@@ -188,7 +188,7 @@ extern int mga_warp_init(drm_mga_private_t *dev_priv);
extern int mga_enable_vblank(struct drm_device *dev, unsigned int pipe);
extern void mga_disable_vblank(struct drm_device *dev, unsigned int pipe);
extern u32 mga_get_vblank_counter(struct drm_device *dev, unsigned int pipe);
-extern int mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence);
+extern void mga_driver_fence_wait(struct drm_device *dev, unsigned int *sequence);
extern int mga_driver_vblank_wait(struct drm_device *dev, unsigned int *sequence);
extern irqreturn_t mga_driver_irq_handler(int irq, void *arg);
extern void mga_driver_irq_preinstall(struct drm_device *dev);
@@ -199,10 +199,14 @@ extern long mga_compat_ioctl(struct file *filp, unsigned int cmd,
#define mga_flush_write_combine() wmb()
-#define MGA_READ8(reg) DRM_READ8(dev_priv->mmio, (reg))
-#define MGA_READ(reg) DRM_READ32(dev_priv->mmio, (reg))
-#define MGA_WRITE8(reg, val) DRM_WRITE8(dev_priv->mmio, (reg), (val))
-#define MGA_WRITE(reg, val) DRM_WRITE32(dev_priv->mmio, (reg), (val))
+#define MGA_READ8(reg) \
+ readb(((void __iomem *)dev_priv->mmio->handle) + (reg))
+#define MGA_READ(reg) \
+ readl(((void __iomem *)dev_priv->mmio->handle) + (reg))
+#define MGA_WRITE8(reg, val) \
+ writeb(val, ((void __iomem *)dev_priv->mmio->handle) + (reg))
+#define MGA_WRITE(reg, val) \
+ writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg))
#define DWGREG0 0x1c00
#define DWGREG0_END 0x1dff