]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/ati_pcigart: drop dependency on drm_os_linux.h
authorSam Ravnborg <sam@ravnborg.org>
Thu, 18 Jul 2019 16:15:00 +0000 (18:15 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Fri, 19 Jul 2019 21:24:16 +0000 (23:24 +0200)
The drm_os_linux.h header is deprecated.
Just opencode the sole DRM_WRITE32().

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Sean Paul <sean@poorly.run>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190718161507.2047-5-sam@ravnborg.org
drivers/gpu/drm/ati_pcigart.c

index 2a413e291a609ff7db80ab072c99435a896ae5d4..580aa2676358e56ab410a15b9b0c6c0b09c10522 100644 (file)
@@ -35,7 +35,6 @@
 
 #include <drm/ati_pcigart.h>
 #include <drm/drm_device.h>
-#include <drm/drm_os_linux.h>
 #include <drm/drm_pci.h>
 #include <drm/drm_print.h>
 
@@ -169,6 +168,7 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
                page_base = (u32) entry->busaddr[i];
 
                for (j = 0; j < (PAGE_SIZE / ATI_PCIGART_PAGE_SIZE); j++) {
+                       u32 offset;
                        u32 val;
 
                        switch(gart_info->gart_reg_if) {
@@ -184,10 +184,12 @@ int drm_ati_pcigart_init(struct drm_device *dev, struct drm_ati_pcigart_info *ga
                                break;
                        }
                        if (gart_info->gart_table_location ==
-                           DRM_ATI_GART_MAIN)
+                           DRM_ATI_GART_MAIN) {
                                pci_gart[gart_idx] = cpu_to_le32(val);
-                       else
-                               DRM_WRITE32(map, gart_idx * sizeof(u32), val);
+                       } else {
+                               offset = gart_idx * sizeof(u32);
+                               writel(val, (void __iomem *)map->handle + offset);
+                       }
                        gart_idx++;
                        page_base += ATI_PCIGART_PAGE_SIZE;
                }