From: Ben Widawsky <bwidawsk@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 1/9] drm/i915/context: context switch, and PPGTT params
Date: Tue, 1 Feb 2011 10:16:18 -0800 [thread overview]
Message-ID: <1296584186-20446-2-git-send-email-bwidawsk@gmail.com> (raw)
In-Reply-To: <1296584186-20446-1-git-send-email-bwidawsk@gmail.com>
Adding parameters for userspace to query what features the
driver/hardware supports. In the future context and ppgtt will always go
together, but for now we will use hardware contexts without ppgtt since
there are some issues with ppgtt on the current generation.
---
drivers/gpu/drm/i915/i915_dma.c | 6 ++++++
drivers/gpu/drm/i915/i915_drv.h | 3 +++
include/drm/i915_drm.h | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_dma.c b/drivers/gpu/drm/i915/i915_dma.c
index 17bd766..bbaf60c 100644
--- a/drivers/gpu/drm/i915/i915_dma.c
+++ b/drivers/gpu/drm/i915/i915_dma.c
@@ -771,6 +771,12 @@ static int i915_getparam(struct drm_device *dev, void *data,
case I915_PARAM_HAS_EXEC_CONSTANTS:
value = INTEL_INFO(dev)->gen >= 4;
break;
+ case I915_PARAM_HAS_CONTEXTS:
+ value = HAS_HW_CONTEXTS(dev);
+ break;
+ case I915_PARAM_HAS_PPGTT:
+ value = HAS_PPGTT(dev);
+ break;
default:
DRM_DEBUG_DRIVER("Unknown parameter %d\n",
param->param);
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index a0149c6..caf0a28 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -950,6 +950,9 @@ enum intel_chip_family {
#define HAS_PCH_CPT(dev) (INTEL_PCH_TYPE(dev) == PCH_CPT)
#define HAS_PCH_IBX(dev) (INTEL_PCH_TYPE(dev) == PCH_IBX)
+#define HAS_HW_CONTEXTS(dev) (INTEL_INFO(dev)->gen >= 4)
+#define HAS_PPGTT(dev) (INTEL_INFO(dev)->gen >= 7)
+
#include "i915_trace.h"
extern struct drm_ioctl_desc i915_ioctls[];
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 0039f1f..26759a8 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -290,6 +290,8 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_RELAXED_FENCING 12
#define I915_PARAM_HAS_COHERENT_RINGS 13
#define I915_PARAM_HAS_EXEC_CONSTANTS 14
+#define I915_PARAM_HAS_CONTEXTS 15
+#define I915_PARAM_HAS_PPGTT 16
typedef struct drm_i915_getparam {
int param;
--
1.7.3.4
next prev parent reply other threads:[~2011-02-01 18:17 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 18:16 [PATCH 0/9] drm/1915/context (i915HW Context support, early) Ben Widawsky
2011-02-01 18:16 ` Ben Widawsky [this message]
2011-02-01 18:31 ` [PATCH 1/9] drm/i915/context: context switch, and PPGTT params Jesse Barnes
2011-02-01 18:16 ` [PATCH 2/9] drm/i915/context: basic implementation context ioctls Ben Widawsky
2011-02-01 18:45 ` Chris Wilson
2011-02-01 18:16 ` [PATCH 3/9] drm/i915/context: context initialization/destruction Ben Widawsky
2011-02-01 18:16 ` [PATCH 4/9] drm/i915/context: whitespace cleanup, and warning cleanup Ben Widawsky
2011-02-01 18:16 ` [PATCH 5/9] drm/i915/context: switch context support query to variable Ben Widawsky
2011-02-01 18:16 ` [PATCH 6/9] drm/i915/context: minimal support for contexts in execbuffer2 Ben Widawsky
2011-02-01 18:16 ` [PATCH 7/9] drm/i915/context: context validation for execbuffer2 Ben Widawsky
2011-02-01 18:16 ` [PATCH 8/9] drm/i915/context: enable calling context_switch Ben Widawsky
2011-02-01 18:16 ` [PATCH 9/9] drm/i915/context: Insert MI_SET_CONTEXT in ringbuffer context switch Ben Widawsky
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=1296584186-20446-2-git-send-email-bwidawsk@gmail.com \
--to=bwidawsk@gmail.com \
--cc=intel-gfx@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