drm/i915: Preallocate request before access of the ring
Subsystems (2)
PATCH 1/1 drm/i915: Preallocate request before access of the ring
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/gpu/drm/i915/intel_lrc.c +3 -3
@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t )); +/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));
drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 33 lines · Dave Gordon
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;Reviewed-by Dave Gordon <[email protected]>
Quoted 5 lines
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
Do we need this for execlist in general, i.e. cc: stable? Where's the bug report/igt testcase?
For serious-looking bugs please add more details like that to the commit message, otherwise maintainers have no idea where to apply a patch.
Thanks, Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 40 lines · Daniel Vetter
Quoted 33 lines · Dave Gordon
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;Reviewed-by Dave Gordon <[email protected]>Quoted 5 lines
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
Quoted 5 lines
Do we need this for execlist in general, i.e. cc: stable? Where's the bug report/igt testcase?
For serious-looking bugs please add more details like that to the commit message, otherwise maintainers have no idea where to apply a patch.
And due to no reply, the maintainers have forgotten about patches like this. Dropping from my fixes queue.
BR,
Jani.
Quoted 6 lines
Thanks, Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 43 lines · Jani Nikula
Quoted 42 lines · Daniel Vetter
Quoted 32 lines · Dave Gordon
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;Reviewed-by Dave Gordon <[email protected]>Quoted 5 lines
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
Do we need this for execlist in general, i.e. cc: stable? Where's the bug report/igt testcase?
Quoted 8 lines
Quoted 2 lines
For serious-looking bugs please add more details like that to the commit message, otherwise maintainers have no idea where to apply a patch.
And due to no reply, the maintainers have forgotten about patches like this. Dropping from my fixes queue.
BR,
Jani.
This became obsolete with the merge of John Harrison's patchset
"Remove the outstanding_lazy_request"
.Dave.
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Jani Nikula
maintainerQuoted 47 lines · Dave Gordon
Quoted 46 lines · Jani Nikula
Quoted 44 lines · Daniel Vetter
Quoted 32 lines · Dave Gordon
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;Reviewed-by Dave Gordon <[email protected]>Quoted 5 lines
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
Do we need this for execlist in general, i.e. cc: stable? Where's the bug report/igt testcase?
For serious-looking bugs please add more details like that to the commit message, otherwise maintainers have no idea where to apply a patch.
Quoted 8 lines
Quoted 5 lines
And due to no reply, the maintainers have forgotten about patches like this. Dropping from my fixes queue.
BR,
Jani.This became obsolete with the merge of John Harrison's patchset
"Remove theoutstanding_lazy_request"
Thanks.
BR,
Jani.
Quoted 2 lines
.Dave.
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 51 lines · Jani Nikula
Quoted 50 lines · Dave Gordon
Quoted 49 lines · Jani Nikula
Quoted 39 lines · Daniel Vetter
Quoted 32 lines · Dave Gordon
Quoted 19 lines · On 29/04/15 17:10, [email protected] wrote:
From: Alex Dai <[email protected]>
This is to avoid bad IO access caused by writing NOOP to wrap the ring buffer whilst ring is unpinned.
Signed-off-by Alex Dai <[email protected]>--- drivers/gpu/drm/i915/intel_lrc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)drivers/gpu/drm/i915/intel_lrc.c +0
-1@@ -803,12 +803,12 @@ static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf,if (ret)return ret; - ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));drivers/gpu/drm/i915/intel_lrc.c static int intel_logical_ring_begin(struct intel_ringbuffer *ringbuf, · line 813
Quoted 10 lines
drivers/gpu/drm/i915/intel_lrc.c +3
-2+/* Preallocate the olr before touching the ring */ + ret =i915_gem_request_alloc (ring, ctx);if (ret)return ret; -/* Preallocate the olr before touching the ring */ - ret =i915_gem_request_alloc (ring, ctx); + ret =logical_ring_prepare (ringbuf, ctx, num_dwords *sizeof (uint32_t ));if (ret)return ret;Reviewed-by Dave Gordon <[email protected]>Quoted 5 lines
with input also from John Harrison <[email protected]>, who would like to point out that this will be superceded by the Anti-OLR patches already posted. (In that model, the request will be allocated much earlier, and passed around explicitly rather than dangling from the context).
Quoted 5 lines
Do we need this for execlist in general, i.e. cc: stable? Where's the bug report/igt testcase?
For serious-looking bugs please add more details like that to the commit message, otherwise maintainers have no idea where to apply a patch.
And due to no reply, the maintainers have forgotten about patches like this. Dropping from my fixes queue.
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
BR,
Jani.This became obsolete with the merge of John Harrison's patchset
"Remove theoutstanding_lazy_request"Thanks.
It only became obsolete for dinq/4.3, I think we still need this for any other kernels shipping with execlist. Dave, can you please confirm?
I tried to digg out when exactly we enabled execlist, but there's a module options loop and so I got lost in the recursion ...
-Daniel
Signature · 7 lines
Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Task id: 6292 -------------------------------------Summary-------------------------------------
Platform Delta drm-intel-nightly Series Applied
PNV 276/276 276/276 ILK 302/302 302/302 SNB 316/316 316/316 IVB 264/264 264/264
BYT -3 227/227 224/227
BDW 318/318 318/318
-------------------------------------Detailed-------------------------------------
Platform Test drm-intel-nightly Series Applied
*BYT igt@gem_dummy_reloc_loop@render FAIL(1)PASS(13) TIMEOUT(1)PASS(1)
*BYT igt@gem_exec_parse@bitmasks FAIL(1)PASS(6) DMESG_WARN(1)PASS(1)
(dmesg patch applied)drm:check_crtc_state[i915]]*ERROR*mismatch_in_has_infoframe(expected#,found#)@mismatch in has_infoframe .* found WARNING:at_drivers/gpu/drm/i915/intel_display.c:#check_crtc_state[i915]()@WARNING:.* at .* check_crtc_state+0x
BYT igt@gem_pipe_control_store_loop@fresh-buffer FAIL(1)TIMEOUT(7)PASS(7) TIMEOUT(1)PASS(1)
Note: You need to pay more attention to line start with '*'
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx