From: alexdeucher@gmail.com
To: airlied@gmail.com, dri-devel@lists.freedesktop.org
Subject: [PATCH 01/48] drm/radeon/kms: add info query for max pipes
Date: Tue, 20 Mar 2012 17:17:55 -0400 [thread overview]
Message-ID: <1332278322-12875-2-git-send-email-alexdeucher@gmail.com> (raw)
In-Reply-To: <1332278322-12875-1-git-send-email-alexdeucher@gmail.com>
From: Tom Stellard <tstellar@gmail.com>
The maximum number of pipes is needed by the user space compute
driver to calculate the number of wavefronts per thread group.
Signed-off-by: Tom Stellard <thomas.stellard@amd.com>
---
drivers/gpu/drm/radeon/radeon_drv.c | 3 ++-
drivers/gpu/drm/radeon/radeon_kms.c | 13 +++++++++++++
include/drm/radeon_drm.h | 2 ++
3 files changed, 17 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 498d21d..ef7bb3f 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -56,9 +56,10 @@
* 2.12.0 - RADEON_CS_KEEP_TILING_FLAGS
* 2.13.0 - virtual memory support, streamout
* 2.14.0 - add evergreen tiling informations
+ * 2.15.0 - add max_pipes query
*/
#define KMS_DRIVER_MAJOR 2
-#define KMS_DRIVER_MINOR 14
+#define KMS_DRIVER_MINOR 15
#define KMS_DRIVER_PATCHLEVEL 0
int radeon_driver_load_kms(struct drm_device *dev, unsigned long flags);
int radeon_driver_unload_kms(struct drm_device *dev);
diff --git a/drivers/gpu/drm/radeon/radeon_kms.c b/drivers/gpu/drm/radeon/radeon_kms.c
index 1986eba..72d70eb 100644
--- a/drivers/gpu/drm/radeon/radeon_kms.c
+++ b/drivers/gpu/drm/radeon/radeon_kms.c
@@ -264,6 +264,19 @@ int radeon_info_ioctl(struct drm_device *dev, void *data, struct drm_file *filp)
return -EINVAL;
value = RADEON_IB_VM_MAX_SIZE;
break;
+ case RADEON_INFO_MAX_PIPES:
+ if (rdev->family >= CHIP_CAYMAN)
+ value = rdev->config.cayman.max_pipes_per_simd;
+ else if (rdev->family >= CHIP_CEDAR)
+ value = rdev->config.evergreen.max_pipes;
+ else if (rdev->family >= CHIP_RV770)
+ value = rdev->config.rv770.max_pipes;
+ else if (rdev->family >= CHIP_R600)
+ value = rdev->config.r600.max_pipes;
+ else {
+ return -EINVAL;
+ }
+ break;
default:
DRM_DEBUG_KMS("Invalid request %d\n", info->request);
return -EINVAL;
diff --git a/include/drm/radeon_drm.h b/include/drm/radeon_drm.h
index cb2f0c3..6cde931 100644
--- a/include/drm/radeon_drm.h
+++ b/include/drm/radeon_drm.h
@@ -962,6 +962,8 @@ struct drm_radeon_cs {
#define RADEON_INFO_VA_START 0x0e
/* maximum size of ib using the virtual memory cs */
#define RADEON_INFO_IB_VM_MAX_SIZE 0x0f
+/* max pipes - needed for compute shaders */
+#define RADEON_INFO_MAX_PIPES 0x10
struct drm_radeon_info {
uint32_t request;
--
1.7.7.5
next prev parent reply other threads:[~2012-03-20 21:18 UTC|newest]
Thread overview: 54+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-20 21:17 [PATCH 00/48] Add SI, TN support alexdeucher
2012-03-20 21:17 ` alexdeucher [this message]
2012-03-20 21:17 ` [PATCH 02/48] drm/radeon/kms: Upstream ObjectID.h updates alexdeucher
2012-03-20 21:17 ` [PATCH 03/48] drm/radeon/kms: upstream atombios.h updates alexdeucher
2012-03-20 21:17 ` [PATCH 04/48] drm/radeon/kms: upstream power table updates alexdeucher
2012-03-20 21:17 ` [PATCH 05/48] drm/radeon/kms: add SI chip families alexdeucher
2012-03-20 21:18 ` [PATCH 06/48] drm/radeon/kms: add initial DCE6 display watermark support alexdeucher
2012-03-20 23:18 ` Jerome Glisse
2012-03-20 21:18 ` [PATCH 07/48] drm/radeon/kms: fix up atom HPD gpio parsing for DCE6 alexdeucher
2012-03-20 21:18 ` [PATCH 08/48] drm/radeon/kms/atom: DCE6 no longer has crtcmemreq bits alexdeucher
2012-03-20 21:18 ` [PATCH 09/48] drm/radeon/kms/atom: add support for crtc power gating alexdeucher
2012-03-20 21:18 ` [PATCH 10/48] drm/radeon/kms: DCE6 disp eng pll updates alexdeucher
2012-03-20 21:18 ` [PATCH 11/48] drm/radeon/kms/atom: add support for DCE6.x dig transmitters alexdeucher
2012-03-20 21:18 ` [PATCH 12/48] drm/radeon/kms: DP aux updates for DCE6 alexdeucher
2012-03-20 21:18 ` [PATCH 13/48] drm/radeon/kms: update comments about dig encoders/transmitters alexdeucher
2012-03-20 21:18 ` [PATCH 14/48] drm/radeon/kms/atom: add support for SI SetVoltage table alexdeucher
2012-03-20 21:18 ` [PATCH 15/48] drm/radeon/kms: update power table parsing for SI alexdeucher
2012-03-20 21:18 ` [PATCH 16/48] drm/radeon/kms: add support for internal thermal sensor on SI alexdeucher
2012-03-20 21:18 ` [PATCH 17/48] drm/radeon/kms: add gpu init support for SI alexdeucher
2012-03-20 23:16 ` Jerome Glisse
2012-03-20 21:18 ` [PATCH 18/48] drm/radeon/kms: Add support for SI GPU reset alexdeucher
2012-03-20 21:18 ` [PATCH 19/48] drm/radeon/kms: add support for MC/VM setup on SI alexdeucher
2012-03-20 23:20 ` Jerome Glisse
2012-03-20 21:18 ` [PATCH 20/48] drm/radeon/kms: add support for the CONST IB to the CS ioctl alexdeucher
2012-03-20 21:18 ` [PATCH 21/48] drm/radeon/kms: add VM CS checker for SI alexdeucher
2012-03-20 21:18 ` [PATCH 22/48] drm/radeon/kms: Only VM CS ioctl is supported on SI (v2) alexdeucher
2012-03-20 21:18 ` [PATCH 23/48] drm/radeon/kms: add ucode loading for SI alexdeucher
2012-03-20 21:18 ` [PATCH 24/48] drm/radeon/kms: add support for MC ucode loading on SI alexdeucher
2012-03-20 21:18 ` [PATCH 25/48] drm/radeon/kms: add support for CP setup " alexdeucher
2012-03-20 21:18 ` [PATCH 26/48] drm/radeon/kms: add IB and fence dispatch functions for SI alexdeucher
2012-03-20 21:18 ` [PATCH 27/48] drm/radeon/kms: Add support for RLC init on SI alexdeucher
2012-03-20 21:18 ` [PATCH 28/48] drm/radeon/kms: add support for interrupts " alexdeucher
2012-03-20 21:18 ` [PATCH 29/48] drm/radeon/kms: fill in startup/shutdown callbacks for SI alexdeucher
2012-03-20 21:18 ` [PATCH 30/48] drm/radeon/kms: add support for compute rings in CS ioctl on SI alexdeucher
2012-03-20 21:18 ` [PATCH 31/48] drm/radeon/kms: add radeon_asic struct for SI alexdeucher
2012-03-20 21:18 ` [PATCH 32/48] drm/radeon: Update radeon_info_ioctl for SI. (v2) alexdeucher
2012-03-20 21:18 ` [PATCH 33/48] drm/radeon/kms: Add SI pci ids alexdeucher
2012-03-20 21:18 ` [PATCH 34/48] drm/radeon/kms: add trinity (TN) chip family alexdeucher
2012-03-20 21:18 ` [PATCH 35/48] drm/radeon/kms: no support for internal thermal sensor on TN yet alexdeucher
2012-03-20 21:18 ` [PATCH 36/48] drm/radeon/kms: DCE6.1 watermark updates for TN alexdeucher
2012-03-20 21:18 ` [PATCH 37/48] drm/radeon/kms: DCE6.1 disp eng pll updates alexdeucher
2012-03-20 21:18 ` [PATCH 38/48] drm/radeon/kms: Adjust pll picker for DCE6.1 alexdeucher
2012-03-20 21:18 ` [PATCH 39/48] drm/radeon/kms: disable PPLL0 on DCE6.1 when not in use alexdeucher
2012-03-20 21:18 ` [PATCH 40/48] drm/radeon/kms/DCE6.1: ss is not supported on the internal pplls alexdeucher
2012-03-20 21:18 ` [PATCH 41/48] drm/radeon/kms: Add checks for TN in the DP bridge code alexdeucher
2012-03-20 21:18 ` [PATCH 42/48] drm/radeon/kms: cayman gpu init updates for trinity alexdeucher
2012-03-20 21:18 ` [PATCH 43/48] drm/radeon/kms: Update evergreen functions " alexdeucher
2012-03-20 21:18 ` [PATCH 44/48] drm/radeon/kms/vm: set vram base offset properly for TN alexdeucher
2012-03-20 21:18 ` [PATCH 45/48] drm/radeon/kms: add support for ucode loading on trinity (v2) alexdeucher
2012-03-20 21:18 ` [PATCH 46/48] drm/radeon/kms: add radeon_asic struct for trinity alexdeucher
2012-03-20 21:18 ` [PATCH 47/48] drm/radeon/kms: add trinity pci ids alexdeucher
2012-03-20 21:18 ` [PATCH 48/48] drm/radeon/kms: update duallink checks for DCE6 alexdeucher
2012-03-20 23:17 ` [PATCH 00/48] Add SI, TN support Jerome Glisse
2012-03-21 11:18 ` Christian König
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=1332278322-12875-2-git-send-email-alexdeucher@gmail.com \
--to=alexdeucher@gmail.com \
--cc=airlied@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.