From: Oded Gabbay <oded.gabbay@amd.com>
To: dri-devel@lists.freedesktop.org, alexdeucher@gmail.com
Subject: [PATCH 7/9] drm/amdkfd: Add asic property to kfd_device_info
Date: Thu, 8 Jan 2015 18:15:34 +0200 [thread overview]
Message-ID: <1420733736-13938-8-git-send-email-oded.gabbay@amd.com> (raw)
In-Reply-To: <1420733736-13938-1-git-send-email-oded.gabbay@amd.com>
From: Ben Goz <ben.goz@amd.com>
This patch adds a new property to kfd_device_info structure. That structure
holds information that is H/W specific.
The new property is called asic_family and its purpose is to distinguish
between different asic families in amdkfd operations, mainly in QCM (queue
control & management)
This patch also adds a new enum, to select different ASICs. We set the current
kfd_device_info instance as Kaveri and create a new instance which describes
the new AMD APU, codenamed 'Carrizo'.
Signed-off-by: Ben Goz <ben.goz@amd.com>
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
---
drivers/gpu/drm/amd/amdkfd/kfd_device.c | 10 +++++++++-
drivers/gpu/drm/amd/amdkfd/kfd_priv.h | 6 ++++++
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 994a9c1..24b37ff 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -31,6 +31,14 @@
#define MQD_SIZE_ALIGNED 768
static const struct kfd_device_info kaveri_device_info = {
+ .asic_family = CHIP_KAVERI,
+ .max_pasid_bits = 16,
+ .ih_ring_entry_size = 4 * sizeof(uint32_t),
+ .mqd_size_aligned = MQD_SIZE_ALIGNED
+};
+
+static const struct kfd_device_info carrizo_device_info = {
+ .asic_family = CHIP_CARRIZO,
.max_pasid_bits = 16,
.ih_ring_entry_size = 4 * sizeof(uint32_t),
.num_of_watch_points = 4,
@@ -65,7 +73,7 @@ static const struct kfd_deviceid supported_devices[] = {
{ 0x1318, &kaveri_device_info }, /* Kaveri */
{ 0x131B, &kaveri_device_info }, /* Kaveri */
{ 0x131C, &kaveri_device_info }, /* Kaveri */
- { 0x131D, &kaveri_device_info }, /* Kaveri */
+ { 0x131D, &kaveri_device_info } /* Kaveri */
};
static int kfd_gtt_sa_init(struct kfd_dev *kfd, unsigned int buf_size,
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
index a4e0ddd..872a1da 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_priv.h
@@ -104,7 +104,13 @@ enum cache_policy {
cache_policy_noncoherent
};
+enum asic_family_type {
+ CHIP_KAVERI = 0,
+ CHIP_CARRIZO
+};
+
struct kfd_device_info {
+ unsigned int asic_family;
unsigned int max_pasid_bits;
size_t ih_ring_entry_size;
uint8_t num_of_watch_points;
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next prev 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 ` [PATCH 4/9] drm/amdkfd: Don't include header files from radeon Oded Gabbay
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 ` Oded Gabbay [this message]
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-8-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