From: Zhenyu Wang <zhenyuw@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH] intel: new blitter ring support from Sandybridge
Date: Tue, 12 Oct 2010 16:13:52 +0800 [thread overview]
Message-ID: <1286871232-1560-2-git-send-email-zhenyuw@linux.intel.com> (raw)
In-Reply-To: <1286871232-1560-1-git-send-email-zhenyuw@linux.intel.com>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
---
include/drm/i915_drm.h | 2 ++
intel/intel_bufmgr_gem.c | 12 +++++++++---
2 files changed, 11 insertions(+), 3 deletions(-)
diff --git a/include/drm/i915_drm.h b/include/drm/i915_drm.h
index 7594413..694fb24 100644
--- a/include/drm/i915_drm.h
+++ b/include/drm/i915_drm.h
@@ -276,6 +276,7 @@ typedef struct drm_i915_irq_wait {
#define I915_PARAM_HAS_PAGEFLIPPING 8
#define I915_PARAM_HAS_EXECBUF2 9
#define I915_PARAM_HAS_BSD 10
+#define I915_PARAM_HAS_BLIT_SPLIT 11
typedef struct drm_i915_getparam {
int param;
@@ -619,6 +620,7 @@ struct drm_i915_gem_execbuffer2 {
__u64 cliprects_ptr;
#define I915_EXEC_RENDER (1<<0)
#define I915_EXEC_BSD (1<<1)
+#define I915_EXEC_BLIT (1<<2)
__u64 flags;
__u64 rsvd1;
__u64 rsvd2;
diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c
index 60174e1..57229e9 100644
--- a/intel/intel_bufmgr_gem.c
+++ b/intel/intel_bufmgr_gem.c
@@ -1545,7 +1545,8 @@ drm_intel_gem_bo_mrb_exec2(drm_intel_bo *bo, int used,
struct drm_i915_gem_execbuffer2 execbuf;
int ret, i;
- if ((ring_flag != I915_EXEC_RENDER) && (ring_flag != I915_EXEC_BSD))
+ if ((ring_flag != I915_EXEC_RENDER) && (ring_flag != I915_EXEC_BSD) &&
+ (ring_flag != I915_EXEC_BLIT))
return -EINVAL;
pthread_mutex_lock(&bufmgr_gem->lock);
@@ -2054,7 +2055,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
struct drm_i915_gem_get_aperture aperture;
drm_i915_getparam_t gp;
int ret;
- int exec2 = 0, has_bsd = 0;
+ int exec2 = 0, has_bsd = 0, blit_split = 0;
bufmgr_gem = calloc(1, sizeof(*bufmgr_gem));
if (bufmgr_gem == NULL)
@@ -2110,6 +2111,11 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
if (!ret)
has_bsd = 1;
+ gp.param = I915_PARAM_HAS_BLIT_SPLIT;
+ ret = drmIoctl(bufmgr_gem->fd, DRM_IOCTL_I915_GETPARAM, &gp);
+ if (!ret)
+ blit_split = *gp.value;
+
if (bufmgr_gem->gen < 4) {
gp.param = I915_PARAM_NUM_FENCES_AVAIL;
gp.value = &bufmgr_gem->available_fences;
@@ -2165,7 +2171,7 @@ drm_intel_bufmgr_gem_init(int fd, int batch_size)
/* Use the new one if available */
if (exec2) {
bufmgr_gem->bufmgr.bo_exec = drm_intel_gem_bo_exec2;
- if (has_bsd)
+ if (has_bsd || blit_split)
bufmgr_gem->bufmgr.bo_mrb_exec = drm_intel_gem_bo_mrb_exec2;
} else
bufmgr_gem->bufmgr.bo_exec = drm_intel_gem_bo_exec;
--
1.7.0.4
next prev parent reply other threads:[~2010-10-12 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-12 8:13 [PATCH] drm/i915: new blitter ring support from Sandybridge Zhenyu Wang
2010-10-12 8:13 ` Zhenyu Wang [this message]
2010-10-12 8:34 ` Chris Wilson
2010-10-12 8:55 ` Zhenyu Wang
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=1286871232-1560-2-git-send-email-zhenyuw@linux.intel.com \
--to=zhenyuw@linux.intel.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 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.