drm/radeon: drop dependency on drm_os_linux.h
authorSam Ravnborg <sam@ravnborg.org>
Sat, 8 Jun 2019 08:02:37 +0000 (10:02 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 10 Jun 2019 20:30:24 +0000 (22:30 +0200)
The drm_os_linux.h header file is deprecated.
Drop all uses of symbols from this file.
All macros are just opencoded.
A few adjustments to include files was required as the obsolete
drm_os_linux.h included these headers.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: "David (ChunMing) Zhou" <David1.Zhou@amd.com>
Cc: David Airlie <airlied@linux.ie>
Cc: Daniel Vetter <daniel@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20190608080241.4958-4-sam@ravnborg.org
13 files changed:
drivers/gpu/drm/radeon/cik.c
drivers/gpu/drm/radeon/cik_sdma.c
drivers/gpu/drm/radeon/r100.c
drivers/gpu/drm/radeon/r300.c
drivers/gpu/drm/radeon/r520.c
drivers/gpu/drm/radeon/r600.c
drivers/gpu/drm/radeon/r600_dma.c
drivers/gpu/drm/radeon/radeon_fence.c
drivers/gpu/drm/radeon/radeon_vce.c
drivers/gpu/drm/radeon/rs400.c
drivers/gpu/drm/radeon/rs600.c
drivers/gpu/drm/radeon/rv515.c
drivers/gpu/drm/radeon/uvd_v1_0.c

index ab7b4e2ffcd21c353538d3156f729edcc2c0086c..f20bced8ca99e7c5e72c2094e20651bd0caefa51 100644 (file)
@@ -3480,7 +3480,7 @@ int cik_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
@@ -3825,7 +3825,7 @@ int cik_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
index 9c351dc8a9e0487bff0241cbc1d0c8704f1360d2..bbabaa87119bfb4ab214ead780d13aaff1287fc8 100644 (file)
@@ -677,7 +677,7 @@ int cik_sdma_ring_test(struct radeon_device *rdev,
                tmp = le32_to_cpu(rdev->wb.wb[index/4]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i < rdev->usec_timeout) {
@@ -751,7 +751,7 @@ int cik_sdma_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = le32_to_cpu(rdev->wb.wb[index/4]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
index 7d39ed63e5be755e7d3de41899b46663086bf52b..913938808511864c32e1a3a2a9e5e049cd25b7cc 100644 (file)
@@ -2470,7 +2470,7 @@ static int r100_rbbm_fifo_wait_for_entry(struct radeon_device *rdev, unsigned n)
                if (tmp >= n) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
@@ -2488,7 +2488,7 @@ int r100_gui_wait_for_idle(struct radeon_device *rdev)
                if (!(tmp & RADEON_RBBM_ACTIVE)) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
@@ -2504,7 +2504,7 @@ int r100_mc_wait_for_idle(struct radeon_device *rdev)
                if (tmp & RADEON_MC_IDLE) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
@@ -3669,7 +3669,7 @@ int r100_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
                if (tmp == 0xDEADBEEF) {
                        break;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ring test succeeded in %d usecs\n", i);
@@ -3746,7 +3746,7 @@ int r100_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
                if (tmp == 0xDEADBEEF) {
                        break;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ib test succeeded in %u usecs\n", i);
index 652126fd6dd4f4ea5c0899f43a5047b0758db555..6db0a2aa87abe5812bb1d6eccbb3f56accd40c01 100644 (file)
@@ -350,7 +350,7 @@ int r300_mc_wait_for_idle(struct radeon_device *rdev)
                if (tmp & R300_MC_IDLE) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
index 074cf752faef6372a2341e9a810e7244bd63528d..fcc2ba52400701409d0a17b35ed9baf6433c3dcf 100644 (file)
@@ -44,7 +44,7 @@ int r520_mc_wait_for_idle(struct radeon_device *rdev)
                if (tmp & R520_MC_STATUS_IDLE) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
index e06e2d8feab397822361ba18a3e4b420cc2f0c4d..89afce99b634ffb95ea4714a903c874ee60ecf7a 100644 (file)
@@ -2840,7 +2840,7 @@ int r600_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ring test on %d succeeded in %d usecs\n", ring->idx, i);
@@ -3433,7 +3433,7 @@ int r600_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
index fb65e6fb5c4f4da841bf1e97142197614041ff9e..48d4c15852cdb7a4ee4fc386c497e8c691b993f3 100644 (file)
@@ -261,7 +261,7 @@ int r600_dma_ring_test(struct radeon_device *rdev,
                tmp = le32_to_cpu(rdev->wb.wb[index/4]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i < rdev->usec_timeout) {
@@ -382,7 +382,7 @@ int r600_dma_ib_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = le32_to_cpu(rdev->wb.wb[index/4]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i < rdev->usec_timeout) {
                DRM_INFO("ib test on ring %d succeeded in %u usecs\n", ib.fence->ring, i);
index e86f2bd38410ed6c23bc8079c9cf3d6d04a1640c..45d24c71db3eca082b2230a5309cb279d20feb28 100644 (file)
  *    Jerome Glisse <glisse@freedesktop.org>
  *    Dave Airlie
  */
-#include <linux/seq_file.h>
+
 #include <linux/atomic.h>
-#include <linux/wait.h>
+#include <linux/firmware.h>
 #include <linux/kref.h>
+#include <linux/sched/signal.h>
+#include <linux/seq_file.h>
 #include <linux/slab.h>
-#include <linux/firmware.h>
+#include <linux/wait.h>
+
 #include <drm/drmP.h>
+
 #include "radeon_reg.h"
 #include "radeon.h"
 #include "radeon_trace.h"
index c1c619facb476a469246762d9fe9fd0f06440dae..2ef8e9ec67aab54aeb037afc858d5921e0a4c2b3 100644 (file)
@@ -771,7 +771,7 @@ int radeon_vce_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
        for (i = 0; i < rdev->usec_timeout; i++) {
                if (vce_v1_0_get_rptr(rdev, ring) != rptr)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i < rdev->usec_timeout) {
index 4121209c183ec111fcae9d226aa1847490d1e570..842f4924ad77220693e8412339e59c04ce7adf19 100644 (file)
@@ -67,7 +67,7 @@ void rs400_gart_tlb_flush(struct radeon_device *rdev)
                tmp = RREG32_MC(RS480_GART_CACHE_CNTRL);
                if ((tmp & RS480_GART_CACHE_INVALIDATE) == 0)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
                timeout--;
        } while (timeout > 0);
        WREG32_MC(RS480_GART_CACHE_CNTRL, 0);
@@ -245,7 +245,7 @@ int rs400_mc_wait_for_idle(struct radeon_device *rdev)
                if (tmp & RADEON_MC_IDLE) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
index f16af119c688c297210a6813122afedadd46a7c4..f3aa9b7e8b1e802e0d2edb09cfaec8fe26bd7625 100644 (file)
@@ -35,6 +35,9 @@
  * close to the one of the R600 family (R600 likely being an evolution
  * of the RS600 GART block).
  */
+
+#include <linux/io-64-nonatomic-lo-hi.h>
+
 #include <drm/drmP.h>
 #include "radeon.h"
 #include "radeon_asic.h"
index ffbd2c006f60f2eb92cc3e80db923be38af3881c..187032defd7f35c6eec303fea1333f302fb2a7f9 100644 (file)
@@ -138,7 +138,7 @@ int rv515_mc_wait_for_idle(struct radeon_device *rdev)
                if (tmp & MC_STATUS_IDLE) {
                        return 0;
                }
-               DRM_UDELAY(1);
+               udelay(1);
        }
        return -1;
 }
index 0dbeb504a4292778d68b413956fc1c763ae9192a..790ea5b2112f3df9a7c94e7e7d6cf3480832fba3 100644 (file)
@@ -438,7 +438,7 @@ int uvd_v1_0_ring_test(struct radeon_device *rdev, struct radeon_ring *ring)
                tmp = RREG32(UVD_CONTEXT_ID);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i < rdev->usec_timeout) {