forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-01-04 1543e317f1da31b75942316931e8f491a8920811
kernel/drivers/gpu/drm/sis/sis_drv.h
....@@ -28,7 +28,9 @@
2828 #ifndef _SIS_DRV_H_
2929 #define _SIS_DRV_H_
3030
31
+#include <drm/drm_ioctl.h>
3132 #include <drm/drm_legacy.h>
33
+#include <drm/drm_mm.h>
3234
3335 /* General customization:
3436 */
....@@ -46,12 +48,8 @@
4648 SIS_CHIP_315 = 1,
4749 };
4850
49
-#include <drm/drm_mm.h>
50
-
51
-
52
-#define SIS_BASE (dev_priv->mmio)
53
-#define SIS_READ(reg) DRM_READ32(SIS_BASE, reg)
54
-#define SIS_WRITE(reg, val) DRM_WRITE32(SIS_BASE, reg, val)
51
+#define SIS_READ(reg) readl(((void __iomem *)dev_priv->mmio->handle) + (reg))
52
+#define SIS_WRITE(reg, val) writel(val, ((void __iomem *)dev_priv->mmio->handle) + (reg))
5553
5654 typedef struct drm_sis_private {
5755 drm_local_map_t *mmio;