From: alexdeucher@gmail.com
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Cc: Alex Deucher <alexander.deucher@amd.com>
Subject: [PATCH 4/4] drm/radeon: enable the async DMA rings in the CS ioctl
Date: Thu, 13 Dec 2012 12:57:51 -0500 [thread overview]
Message-ID: <1355421471-6166-4-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1355421471-6166-1-git-send-email-alexdeucher@gmail.com>
From: Alex Deucher <alexander.deucher@amd.com>
This enables the functionality added in the previous
patches. Userspace acceleration drivers can use the
CS ioctl to submit command buffers to the async DMA
rings.
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
drivers/gpu/drm/radeon/radeon_cs.c | 12 ++++++++++++
include/uapi/drm/radeon_drm.h | 1 +
2 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_cs.c b/drivers/gpu/drm/radeon/radeon_cs.c
index 1b32a5a..396baba 100644
--- a/drivers/gpu/drm/radeon/radeon_cs.c
+++ b/drivers/gpu/drm/radeon/radeon_cs.c
@@ -112,6 +112,18 @@ static int radeon_cs_get_ring(struct radeon_cs_parser *p, u32 ring, s32 priority
} else
p->ring = RADEON_RING_TYPE_GFX_INDEX;
break;
+ case RADEON_CS_RING_DMA:
+ if (p->rdev->family >= CHIP_CAYMAN) {
+ if (p->priority > 0)
+ p->ring = R600_RING_TYPE_DMA_INDEX;
+ else
+ p->ring = CAYMAN_RING_TYPE_DMA1_INDEX;
+ } else if (p->rdev->family >= CHIP_R600) {
+ p->ring = R600_RING_TYPE_DMA_INDEX;
+ } else {
+ return -EINVAL;
+ }
+ break;
}
return 0;
}
diff --git a/include/uapi/drm/radeon_drm.h b/include/uapi/drm/radeon_drm.h
index 5645a87..eeda917 100644
--- a/include/uapi/drm/radeon_drm.h
+++ b/include/uapi/drm/radeon_drm.h
@@ -917,6 +917,7 @@ struct drm_radeon_gem_va {
/* The second dword of RADEON_CHUNK_ID_FLAGS is a uint32 that sets the ring type */
#define RADEON_CS_RING_GFX 0
#define RADEON_CS_RING_COMPUTE 1
+#define RADEON_CS_RING_DMA 2
/* The third dword of RADEON_CHUNK_ID_FLAGS is a sint32 that sets the priority */
/* 0 = normal, + = higher priority, - = lower priority */
--
1.7.7.5
next prev parent reply other threads:[~2012-12-13 17:58 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-12-13 17:57 [PATCH 1/4] drm/radeon/kms: add 6xx/7xx CS parser for async DMA alexdeucher
2012-12-13 17:57 ` [PATCH 2/4] drm/radeon/kms: add evergreen/cayman " alexdeucher
2012-12-13 17:57 ` [PATCH 3/4] drm/radeon: add VM CS parser support for async DMA on cayman/TN/SI alexdeucher
2012-12-13 17:57 ` alexdeucher [this message]
2012-12-13 18:12 ` [PATCH 1/4] drm/radeon/kms: add 6xx/7xx CS parser for async DMA Christian König
2012-12-13 23:49 ` [PATCH 1/4] drm/radeon/kms: add 6xx/7xx CS parser for async DMA (v2) alexdeucher
2012-12-13 23:49 ` [PATCH 2/4] drm/radeon/kms: add evergreen/cayman " alexdeucher
2012-12-13 23:49 ` [PATCH 3/4] drm/radeon: add VM CS parser support for async DMA on cayman/TN/SI alexdeucher
2012-12-13 23:50 ` [PATCH 4/4] drm/radeon: enable the async DMA rings in the CS ioctl alexdeucher
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=1355421471-6166-4-git-send-email-alexdeucher@gmail.com \
--to=alexdeucher@gmail.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.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