From: Kenneth Graunke <kenneth@whitecape.org>
To: rong.r.yang@intel.com
Cc: mesa-dev <mesa-dev@lists.freedesktop.org>,
Ben Widawsky <ben@bwidawsk.net>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [rong.r.yang@intel.com: [Intel-gfx] How user space applications load registers on HSW?]
Date: Tue, 06 May 2014 11:57:24 -0700 [thread overview]
Message-ID: <53693094.5060504@whitecape.org> (raw)
In-Reply-To: <20140506181145.GA25374@bwidawsk.net>
[-- Attachment #1.1.1: Type: text/plain, Size: 1392 bytes --]
On 05/06/2014 08:26:15 AM, Yang, Rong R wrote:
> Hi,
>
> I am developing the HSW’s OCL driver in the linux. I encounter a LRI
> problem on HSW.
>
>
> Some gpgpu's applications, which use the shared local memory, must load
> the L3CTRLREG2 and L3CTRLREG3 registers to allocate the SLM in the L3
> cache.
>
> So I add L3CTRLREG2 and L3CTRLREG3 to the gen7_render_regs to pass the
> cmds parse when exec buffer. But it still don’t work.
>
> I notice that, on HSW, the commands that load the register, such as
> MI_LOAD_REGISTER_IMM, will be converted to NOOP by the GPU if the batch
> buffer's MI_BATCH_NON_SECURE_HSW bit is set. And after parse cmd, the
> MI_BATCH_NON_SECURE_HSW still set in the kernel. So HSW don’t accept
> LRI commands.
>
>
> Can I load these registers in the user space? Or should I hack the
> kernel?
>
>
> Yang Rong
I've been asking the kernel developers for the ability to LRI/LRM from
userspace batches for around 1.5 years. Unfortunately, we're still
waiting, and I honestly have no idea when they're going to finish it.
In the meantime, you can apply the attached patch to your kernel tree to
disable the hardware scanner, letting you run whatever commands you
want. Obviously, we can't ship this on production systems, but it will
allow you to do your development without having to wait for the kernel team.
--Ken
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1.2: disable-batchbuffer-security.patch --]
[-- Type: text/x-patch; name="disable-batchbuffer-security.patch", Size: 497 bytes --]
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index a3ba9a8..86c173b 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -995,6 +995,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
return ret;
flags = 0;
+ flags |= I915_DISPATCH_SECURE;
if (args->flags & I915_EXEC_SECURE) {
if (!file->is_master || !capable(CAP_SYS_ADMIN))
return -EPERM;
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
[-- Attachment #2: Type: text/plain, Size: 156 bytes --]
_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev
next parent reply other threads:[~2014-05-06 18:57 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20140506181145.GA25374@bwidawsk.net>
2014-05-06 18:57 ` Kenneth Graunke [this message]
2014-05-12 8:02 ` [Mesa-dev] [rong.r.yang@intel.com: How user space applications load registers on HSW?] Yang, Rong R
2014-05-12 18:04 ` [Mesa-dev] How user space applications load registers on HSW? Kenneth Graunke
2014-05-13 6:11 ` [rong.r.yang@intel.com: [Intel-gfx] How user space applications load registers on HSW?] Daniel Vetter
2014-05-13 7:47 ` Zou, Nanhai
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=53693094.5060504@whitecape.org \
--to=kenneth@whitecape.org \
--cc=ben@bwidawsk.net \
--cc=intel-gfx@lists.freedesktop.org \
--cc=mesa-dev@lists.freedesktop.org \
--cc=rong.r.yang@intel.com \
/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