dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Oded Gabbay <oded.gabbay@amd.com>
To: dri-devel@lists.freedesktop.org, alexdeucher@gmail.com
Subject: [PATCH 4/9] drm/amdkfd: Don't include header files from radeon
Date: Thu, 8 Jan 2015 18:15:31 +0200	[thread overview]
Message-ID: <1420733736-13938-5-git-send-email-oded.gabbay@amd.com> (raw)
In-Reply-To: <1420733736-13938-1-git-send-email-oded.gabbay@amd.com>

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>
---
 drivers/gpu/drm/amd/amdkfd/cik_regs.h                 | 13 +++++++++++++
 drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c |  1 -
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c          |  3 +--
 3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdkfd/cik_regs.h b/drivers/gpu/drm/amd/amdkfd/cik_regs.h
index 607fc5c..01ff332 100644
--- a/drivers/gpu/drm/amd/amdkfd/cik_regs.h
+++ b/drivers/gpu/drm/amd/amdkfd/cik_regs.h
@@ -168,6 +168,8 @@
 #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
@@ -188,6 +190,17 @@
 #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)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 6806e64..78b33a9 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@ -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
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
index 678c33f..155e33c 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
@@ -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)
 {
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2015-01-08 16:16 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08 16:15 [PATCH 0/9] drm/amdkfd: initial support for VI APU Oded Gabbay
2015-01-08 16:15 ` [PATCH 1/9] drm/radeon: Don't use relative paths in #include Oded Gabbay
2015-01-08 16:15 ` [PATCH 2/9] drm/amd: Put cik structures in a common place Oded Gabbay
2015-01-08 16:15 ` [PATCH 3/9] drm/radeon: Use new cik_structs.h file Oded Gabbay
2015-01-08 16:15 ` Oded Gabbay [this message]
2015-01-08 16:15 ` [PATCH 5/9] drm/amdkfd: Add new VI-specific queue properties Oded Gabbay
2015-01-08 16:15 ` [PATCH 6/9] drm/amdkfd: Make KFD_MQD_TYPE enum types H/W agnostic Oded Gabbay
2015-01-08 16:15 ` [PATCH 7/9] drm/amdkfd: Add asic property to kfd_device_info Oded Gabbay
2015-01-08 16:15 ` [PATCH 8/9] drm/amdkfd: Change MQD manager to be H/W specific Oded Gabbay
2015-01-08 16:15 ` [PATCH 9/9] MAINTAINERS: Update amdkfd files Oded Gabbay
2015-01-12 21:46 ` [PATCH 0/9] drm/amdkfd: initial support for VI APU Alex Deucher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1420733736-13938-5-git-send-email-oded.gabbay@amd.com \
    --to=oded.gabbay@amd.com \
    --cc=alexdeucher@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox