drm/amd: drop dependencies on drm_os_linux.h
authorSam Ravnborg <sam@ravnborg.org>
Sun, 9 Jun 2019 22:07:49 +0000 (00:07 +0200)
committerSam Ravnborg <sam@ravnborg.org>
Mon, 10 Jun 2019 20:59:32 +0000 (22:59 +0200)
Fix so no files in drm/amd/ depends on the
deprecated drm_os_linux.h header file.

It was done manually:
- remove drm_os_linux.h from drmP.h
- fix all build errros

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/20190609220757.10862-3-sam@ravnborg.org
36 files changed:
drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vce.c
drivers/gpu/drm/amd/amdgpu/amdgpu_vcn.c
drivers/gpu/drm/amd/amdgpu/cik_sdma.c
drivers/gpu/drm/amd/amdgpu/gfx_v6_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v7_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c
drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v2_4.c
drivers/gpu/drm/amd/amdgpu/sdma_v3_0.c
drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c
drivers/gpu/drm/amd/amdgpu/si_dma.c
drivers/gpu/drm/amd/amdgpu/uvd_v4_2.c
drivers/gpu/drm/amd/amdgpu/uvd_v5_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c
drivers/gpu/drm/amd/amdgpu/uvd_v7_0.c
drivers/gpu/drm/amd/display/dc/core/dc_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/core/dc_stream.c
drivers/gpu/drm/amd/display/dc/dc_helper.c
drivers/gpu/drm/amd/display/dc/dce/dce_aux.c
drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_hw.c
drivers/gpu/drm/amd/display/dc/dce/dce_i2c_sw.c
drivers/gpu/drm/amd/display/dc/dce/dce_link_encoder.c
drivers/gpu/drm/amd/display/dc/dce/dce_stream_encoder.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_compressor.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_opp_regamma_v.c
drivers/gpu/drm/amd/display/dc/dce110/dce110_transform_v.c
drivers/gpu/drm/amd/display/dc/dce112/dce112_compressor.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hubbub.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_link_encoder.c
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_stream_encoder.c
drivers/gpu/drm/amd/display/dc/gpio/hw_ddc.c

index a6e5184d436c9339008e0c62d55dd44c75282181..d2b51bc3f53496d66ee547c718456251aed3d255 100644 (file)
 
 #define pr_fmt(fmt) "kfd2kgd: " fmt
 
+#include <linux/dma-buf.h>
 #include <linux/list.h>
 #include <linux/pagemap.h>
 #include <linux/sched/mm.h>
-#include <linux/dma-buf.h>
+#include <linux/sched/task.h>
+
 #include <drm/drmP.h>
 #include "amdgpu_object.h"
 #include "amdgpu_vm.h"
index 250d9212cc389e4830b08b8ed0eb1e937d21398d..924d83e711efd182f26888e24f9065fd30a58d8c 100644 (file)
@@ -24,6 +24,8 @@
  *
  */
 
+#include <linux/io-64-nonatomic-lo-hi.h>
+
 #include "amdgpu.h"
 
 /**
index 0c52d1f9fe0fc85005cf9c72c1a6602a1d685317..e9ede34dd875f263f6bcccf88cf900c5eb1e0b59 100644 (file)
  *    Thomas Hellstrom <thomas-at-tungstengraphics-dot-com>
  *    Dave Airlie
  */
+
+#include <linux/debugfs.h>
+#include <linux/iommu.h>
+#include <linux/pagemap.h>
+#include <linux/sched/task.h>
+#include <linux/seq_file.h>
+#include <linux/slab.h>
+#include <linux/swap.h>
+#include <linux/swiotlb.h>
+
 #include <drm/ttm/ttm_bo_api.h>
 #include <drm/ttm/ttm_bo_driver.h>
 #include <drm/ttm/ttm_placement.h>
 #include <drm/ttm/ttm_page_alloc.h>
 #include <drm/drmP.h>
 #include <drm/amdgpu_drm.h>
-#include <linux/seq_file.h>
-#include <linux/slab.h>
-#include <linux/swiotlb.h>
-#include <linux/swap.h>
-#include <linux/pagemap.h>
-#include <linux/debugfs.h>
-#include <linux/iommu.h>
 #include "amdgpu.h"
 #include "amdgpu_object.h"
 #include "amdgpu_trace.h"
index c021b114c8a44ec04c6ca3bccc4479c141218232..fa03081c2f78a32c802ee85dcd9da425bb909f6b 100644 (file)
@@ -1090,7 +1090,7 @@ int amdgpu_vce_ring_test_ring(struct amdgpu_ring *ring)
        for (i = 0; i < timeout; i++) {
                if (amdgpu_ring_get_rptr(ring) != rptr)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= timeout)
index ecf6f96df2ad067054389ed3145f6b388f7997b0..7ed5d4e3884d63d2f93cc99cb39983b9a2b4e35e 100644 (file)
@@ -446,7 +446,7 @@ int amdgpu_vcn_dec_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_SCRATCH9));
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
@@ -608,7 +608,7 @@ int amdgpu_vcn_enc_ring_test_ring(struct amdgpu_ring *ring)
        for (i = 0; i < adev->usec_timeout; i++) {
                if (amdgpu_ring_get_rptr(ring) != rptr)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
@@ -767,7 +767,7 @@ int amdgpu_vcn_jpeg_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_SCRATCH9));
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
@@ -841,7 +841,7 @@ int amdgpu_vcn_jpeg_ring_test_ib(struct amdgpu_ring *ring, long timeout)
                tmp = RREG32(SOC15_REG_OFFSET(UVD, 0, mmUVD_SCRATCH9));
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index d42808b059715d8bba4398f7a4a593f0aab3686c..063057ca18be0ea7ea952b9cdb09eed72d3e9c51 100644 (file)
@@ -640,7 +640,7 @@ static int cik_sdma_ring_test_ring(struct amdgpu_ring *ring)
                tmp = le32_to_cpu(adev->wb.wb[index]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index c0cb244f58cd3cb84dd3add9e3da134557bf004c..4f761ebb655eeb97e57ee08df3ff6be4dfa76b81 100644 (file)
@@ -1812,7 +1812,7 @@ static int gfx_v6_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index a59e0fdf5a973dadcf9d27fdd867eb10994ca585..a61325ede1f83bfd34cc7a10b6d50b3735bd711b 100644 (file)
@@ -2080,7 +2080,7 @@ static int gfx_v7_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
        if (i >= adev->usec_timeout)
                r = -ETIMEDOUT;
index 02955e6e9dd9e7dc83d4bad09d1805646116a173..775f6bd4fff6ce2e524232a6f8794956820d2888 100644 (file)
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
+
+#include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/firmware.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_gfx.h"
@@ -855,7 +858,7 @@ static int gfx_v8_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index ba67d10232643cb9963c2b58954fd00cbaaa67ae..f35c1122f12b3fdd83c49c134f7fa34ec503ade9 100644 (file)
  * OTHER DEALINGS IN THE SOFTWARE.
  *
  */
+
+#include <linux/delay.h>
 #include <linux/kernel.h>
 #include <linux/firmware.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_gfx.h"
@@ -417,7 +420,7 @@ static int gfx_v9_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(scratch);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 36196372e8dbdcaa84fd424cd03095d53a760b7b..bd7c8f5cd0e7fbd677d7a95396854e8c62e7fffe 100644 (file)
  *
  * Authors: Alex Deucher
  */
+
+#include <linux/delay.h>
 #include <linux/firmware.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_ucode.h"
@@ -574,7 +577,7 @@ static int sdma_v2_4_ring_test_ring(struct amdgpu_ring *ring)
                tmp = le32_to_cpu(adev->wb.wb[index]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 6d39544e782961bc318d1a47805d72b70b5dab67..346e1910641d78a6480cd8e04bf5788cec0785ed 100644 (file)
  *
  * Authors: Alex Deucher
  */
+
+#include <linux/delay.h>
 #include <linux/firmware.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_ucode.h"
@@ -846,7 +849,7 @@ static int sdma_v3_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = le32_to_cpu(adev->wb.wb[index]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 9c88ce513d78e98642522f77820ed224a43fde5b..08e0f81b87b5d7ab5af5c5056868308fe90b6fe2 100644 (file)
@@ -22,6 +22,8 @@
  */
 
 #include <linux/firmware.h>
+#include <linux/delay.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_ucode.h"
@@ -1207,7 +1209,7 @@ static int sdma_v4_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = le32_to_cpu(adev->wb.wb[index]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 3eeefd40dae0aecc352e36f776cc96a066e3163c..1108eb66277dacd2cc476c745fe60c45f190cb9f 100644 (file)
@@ -230,7 +230,7 @@ static int si_dma_ring_test_ring(struct amdgpu_ring *ring)
                tmp = le32_to_cpu(adev->wb.wb[index]);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index c4fb58667fd451c8157398022735a1c35a568a3d..037606a5f18543c3936c9c5a57df29264f5d2b05 100644 (file)
@@ -491,7 +491,7 @@ static int uvd_v4_2_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(mmUVD_CONTEXT_ID);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 52bd8a6547347e287e18c916ae6e07517f2039a3..c88aa2d6a2b575f4fc11fa2b0539077a53492466 100644 (file)
@@ -22,7 +22,9 @@
  * Authors: Christian König <christian.koenig@amd.com>
  */
 
+#include <linux/delay.h>
 #include <linux/firmware.h>
+
 #include <drm/drmP.h>
 #include "amdgpu.h"
 #include "amdgpu_uvd.h"
@@ -506,7 +508,7 @@ static int uvd_v5_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(mmUVD_CONTEXT_ID);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index c9edddf9f88a8c67ce9742632120287504838b68..50af37d08b9129136ac94cc9dda2d6baea1a0a92 100644 (file)
@@ -183,7 +183,7 @@ static int uvd_v6_0_enc_ring_test_ring(struct amdgpu_ring *ring)
        for (i = 0; i < adev->usec_timeout; i++) {
                if (amdgpu_ring_get_rptr(ring) != rptr)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
@@ -957,7 +957,7 @@ static int uvd_v6_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32(mmUVD_CONTEXT_ID);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 2191d3d0a2190a4cbe5ac93835b2ab753f393c61..e36b69945ea29b12c40265af418d6db94d4ef5fa 100644 (file)
@@ -191,7 +191,7 @@ static int uvd_v7_0_enc_ring_test_ring(struct amdgpu_ring *ring)
        for (i = 0; i < adev->usec_timeout; i++) {
                if (amdgpu_ring_get_rptr(ring) != rptr)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
@@ -1227,7 +1227,7 @@ static int uvd_v7_0_ring_test_ring(struct amdgpu_ring *ring)
                tmp = RREG32_SOC15(UVD, ring->me, mmUVD_CONTEXT_ID);
                if (tmp == 0xDEADBEEF)
                        break;
-               DRM_UDELAY(1);
+               udelay(1);
        }
 
        if (i >= adev->usec_timeout)
index 83d121510ef52d599c3d4840252924d0286dfdd4..9b01078d6ec5cf1d9cff1047ff58ef1812a028b9 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include "core_types.h"
 #include "timing_generator.h"
index 96e97d25d63982c1e7d285872a7b325e8ec430e7..1dc3492f02a1d0be0296d90b13de0980ff42c063 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include "dc.h"
 #include "core_types.h"
index 5e6c5eff49cf7b78cf4bd51799859504f9a40571..eb2d01d1a678d5301767c4b577d5bfba76ed1374 100644 (file)
@@ -26,6 +26,9 @@
  *  Created on: Aug 30, 2016
  *      Author: agrodzov
  */
+
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include <stdarg.h>
 
index bd33c47183fc800c6621dbf7ebf6cf71a0581015..0863719b0c85bf9d39cb56e9f61e0b42212b6065 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include "core_types.h"
 #include "dce_aux.h"
index 818536eea00a7a58cb1160e965ff2631784609f3..a8c2cf260c84fc68c4c32de8deeb580369bb861a 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "core_types.h"
 #include "link_encoder.h"
 #include "dce_dmcu.h"
index cd26161bcc4dcec343691a22cc0429506930dd86..8a236d40d8d004534d03e169723153e19f59e37f 100644 (file)
@@ -22,6 +22,9 @@
  * Authors: AMD
  *
  */
+
+#include <linux/delay.h>
+
 #include "dce_i2c.h"
 #include "dce_i2c_hw.h"
 #include "reg_helper.h"
index f0266694cb5652287abc6310c95f62795be6642b..a5a11c251e257ef120e10e3bd4bbef7628c53d26 100644 (file)
@@ -22,6 +22,9 @@
  * Authors: AMD
  *
  */
+
+#include <linux/delay.h>
+
 #include "dce_i2c.h"
 #include "dce_i2c_sw.h"
 #include "include/gpio_service_interface.h"
index 314c04a915d212b2bcf85f14da72fa5cf0e32cb5..1037d2a72f3fb17d3dbdce27853d3c4d18cb8104 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "reg_helper.h"
 
 #include "core_types.h"
index 14309fe6f2e62e9592d178aee1e1a57823e82159..0c0b41d70f655f3602ecee177e6c98bb4ef9a8dd 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dc_bios_types.h"
 #include "dce_stream_encoder.h"
 #include "reg_helper.h"
index 7b23239d33fedfb164e17b958b8d73255aeae361..12083bb8ef025b81138f92cf8f6e6738ac703995 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 
 #include "dce/dce_11_0_d.h"
index 7ac50ab1b7620804b6e59063efbc288f19b96bcb..54c266e8441672b23eaad7e548f9973db8afb658 100644 (file)
@@ -22,6 +22,9 @@
  * Authors: AMD
  *
  */
+
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include "dc.h"
 #include "dc_bios_types.h"
index 9b65b77e88232c976d41caa6c1e628c657d1831b..34c5e3c7c6d29ac8f3064cda2e3d165db57c8cd4 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 
 /* include DCE11 register header files */
index aa8d6b10d2c3fe3cca25617b545336efb37e6655..b1aaab5590cc6cd185dd9adec41f83dfe4cf765b 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dce110_transform_v.h"
 #include "dm_services.h"
 #include "dc.h"
index faae12cf7968eb9f342660464ef5d1e5328d378e..f9819df1d3e2f1ba0b9509d55909fe63acaba061 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 
 #include "dce/dce_11_2_d.h"
index 0db2a6e96fc08c43a215acb7392239cba239d66b..3d31dadfa012174da13eb900d0f5449e89a8619c 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 #include "dcn10_hubp.h"
 #include "dcn10_hubbub.h"
index 0126a44ba01274155ec6f1b4b4bc323d58a89fe1..102d968a8cd3643ff347fb4a531e4fe76518dd47 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "reg_helper.h"
 
 #include "core_types.h"
index 8ee9f6dc1d62920ac8ac1b8d83ecfc071998e761..c33153d696ac28e56b16671647f25932d63cc047 100644 (file)
@@ -23,6 +23,7 @@
  *
  */
 
+#include <linux/delay.h>
 
 #include "dc_bios_types.h"
 #include "dcn10_stream_encoder.h"
index 310f48965b272143273c56fb29fd4f4a3ffb63df..8ebeabad7bb75e6aa85bb31fe057b680666e5f9a 100644 (file)
@@ -23,6 +23,8 @@
  *
  */
 
+#include <linux/delay.h>
+
 #include "dm_services.h"
 
 #include "include/gpio_types.h"