drm/sis: drop drmP.h use
authorSam Ravnborg <sam@ravnborg.org>
Wed, 5 Jun 2019 13:55:39 +0000 (15:55 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Wed, 5 Jun 2019 18:29:57 +0000 (20:29 +0200)
Drop use of the deprecated drmP.h header.
Repalced with relevant header files and sorted header files in all files
touched.

Replaced DRM_{READ,WRITE} to avoid the drm_os_linux header.

Build tested with allyesconfig, allmodconfig on various architectures.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@linux.ie>
Link: https://patchwork.freedesktop.org/patch/msgid/20190605135539.12940-2-sam@ravnborg.org
drivers/gpu/drm/sis/sis_drv.c
drivers/gpu/drm/sis/sis_drv.h
drivers/gpu/drm/sis/sis_mm.c

index e04a92658cd74c239a467114d5f38132afc8e6e1..ee3801201ecc1707334aae456a5416108ae80807 100644 (file)
 
 #include <linux/module.h>
 
-#include <drm/drmP.h>
+#include <drm/drm_drv.h>
+#include <drm/drm_file.h>
+#include <drm/drm_pci.h>
+#include <drm/drm_pciids.h>
 #include <drm/sis_drm.h>
-#include "sis_drv.h"
 
-#include <drm/drm_pciids.h>
+#include "sis_drv.h"
 
 static struct pci_device_id pciidlist[] = {
        sisdrv_PCI_IDS
index 328f8a750976fda4d1435124535299a3350691cc..81339443b3b1988274e3a441d57ad3e99b98f2a5 100644 (file)
@@ -28,7 +28,9 @@
 #ifndef _SIS_DRV_H_
 #define _SIS_DRV_H_
 
+#include <drm/drm_ioctl.h>
 #include <drm/drm_legacy.h>
+#include <drm/drm_mm.h>
 
 /* General customization:
  */
@@ -46,12 +48,8 @@ enum sis_family {
        SIS_CHIP_315 = 1,
 };
 
-#include <drm/drm_mm.h>
-
-
-#define SIS_BASE (dev_priv->mmio)
-#define SIS_READ(reg)         DRM_READ32(SIS_BASE, reg)
-#define SIS_WRITE(reg, val)   DRM_WRITE32(SIS_BASE, reg, val)
+#define SIS_READ(reg)         readl(((void __iomem *)dev_priv->mmio->handle) + (reg))
+#define SIS_WRITE(reg, val)   writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg))
 
 typedef struct drm_sis_private {
        drm_local_map_t *mmio;
index 1622db24cd394266bff0d00001e1f4bd271ade0a..e51d4289a3d03e6b9924c313e546a0c50f6dd332 100644 (file)
  *    Thomas Hellström <thomas-at-tungstengraphics-dot-com>
  */
 
-#include <drm/drmP.h>
+#include <video/sisfb.h>
+
+#include <drm/drm_device.h>
+#include <drm/drm_file.h>
 #include <drm/sis_drm.h>
+
 #include "sis_drv.h"
 
-#include <video/sisfb.h>
 
 #define VIDEO_TYPE 0
 #define AGP_TYPE 1