drm/amdkfd: Don't include header files from radeon
authorOded Gabbay <oded.gabbay@amd.com>
Fri, 2 Jan 2015 21:18:54 +0000 (23:18 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Fri, 2 Jan 2015 21:18:54 +0000 (23:18 +0200)
Because amdkfd will need to work both with radeon and amdgpu, don't include
header files that are in radeon's folder.

Instead, use the common amd include folder and move amdkfd specific defines to
amdkfd header files.

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/cik_regs.h
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c

index 607fc5ceadbeffcb0e5682c4bdb4a2b7d6a2d078..01ff332fabd4b81fdd84b2cb0f547870978d362b 100644 (file)
 #define        IB_ATC_EN                                       (1U << 23)
 #define        DEFAULT_MIN_IB_AVAIL_SIZE                       (3U << 20)
 
+#define        AQL_ENABLE                                      1
+
 #define CP_HQD_DEQUEUE_REQUEST                         0xC974
 #define        DEQUEUE_REQUEST_DRAIN                           1
 #define DEQUEUE_REQUEST_RESET                          2
 #define        MQD_VMID_MASK                                   (0xf << 0)
 #define        MQD_CONTROL_PRIV_STATE_EN                       (1U << 8)
 
+#define        SDMA_RB_VMID(x)                                 (x << 24)
+#define        SDMA_RB_ENABLE                                  (1 << 0)
+#define        SDMA_RB_SIZE(x)                                 ((x) << 1) /* log2 */
+#define        SDMA_RPTR_WRITEBACK_ENABLE                      (1 << 12)
+#define        SDMA_RPTR_WRITEBACK_TIMER(x)                    ((x) << 16) /* log2 */
+#define        SDMA_OFFSET(x)                                  (x << 0)
+#define        SDMA_DB_ENABLE                                  (1 << 28)
+#define        SDMA_ATC                                        (1 << 0)
+#define        SDMA_VA_PTR32                                   (1 << 4)
+#define        SDMA_VA_SHARED_BASE(x)                          (x << 8)
+
 #define GRBM_GFX_INDEX                                 0x30800
 #define        INSTANCE_INDEX(x)                               ((x) << 0)
 #define        SH_INDEX(x)                                     ((x) << 8)
index 60f4ccbbb30165d9b33c0f7107623f597486ff87..fead2d7c087775ffaba144e80e9b9ce017803d9a 100644 (file)
@@ -31,7 +31,6 @@
 #include "kfd_mqd_manager.h"
 #include "cik_regs.h"
 #include "kfd_kernel_queue.h"
-#include "../../radeon/cik_reg.h"
 
 /* Size of the per-pipe EOP queue */
 #define CIK_HPD_EOP_BYTES_LOG2 11
index 678c33f0a1b8ee766b643b1e2ba07713d545f9fb..155e33ceda9ac373797e30fc4eb24be94a7db300 100644 (file)
@@ -26,8 +26,7 @@
 #include "kfd_priv.h"
 #include "kfd_mqd_manager.h"
 #include "cik_regs.h"
-#include "../../radeon/cikd.h"
-#include "../../radeon/cik_reg.h"
+#include "cik_structs.h"
 
 inline void busy_wait(unsigned long ms)
 {