From: Sam Ravnborg Date: Thu, 18 Jul 2019 16:15:00 +0000 (+0200) Subject: drm/ati_pcigart: drop dependency on drm_os_linux.h X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=03fda35d109b0a175573f2fd9145d622328ae8a0;p=openwrt%2Fstaging%2Fblogic.git drm/ati_pcigart: drop dependency on drm_os_linux.h The drm_os_linux.h header is deprecated. Just opencode the sole DRM_WRITE32(). Signed-off-by: Sam Ravnborg Reviewed-by: Sean Paul Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: David Airlie Cc: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20190718161507.2047-5-sam@ravnborg.org --- diff --git a/drivers/gpu/drm/ati_pcigart.c b/drivers/gpu/drm/ati_pcigart.c index 2a413e291a60..580aa2676358 100644 --- a/drivers/gpu/drm/ati_pcigart.c +++ b/drivers/gpu/drm/ati_pcigart.c @@ -35,7 +35,6 @@ #include #include -#include #include #include @@ -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; }