projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
eadc2e5
)
drm/i915: Enforce that CS packets are qword aligned
author
Chris Wilson
<
[email protected]
>
Fri, 21 Jul 2017 16:11:01 +0000
(17:11 +0100)
committer
Daniel Vetter
<
[email protected]
>
Thu, 27 Jul 2017 07:38:57 +0000
(09:38 +0200)
We require the caller to ensure that the packets they wish to emit into
the CS ring are qword aligned (i.e. have an even number of dwords).
Double check this.
Signed-off-by: Chris Wilson <
[email protected]
>
Cc: Tvrtko Ursulin <
[email protected]
>
Cc: Joonas Lahtinen <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
Reviewed-by: Tvrtko Ursulin <
[email protected]
>
Signed-off-by: Daniel Vetter <
[email protected]
>
drivers/gpu/drm/i915/intel_ringbuffer.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/intel_ringbuffer.c
b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 5224b7abb8a3d0a462a2b89ff46edbc1d646def7..cdf084ef5aaeaf5e575d6e607577c2af03b01ab2 100644
(file)
--- a/
drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/
drivers/gpu/drm/i915/intel_ringbuffer.c
@@
-1712,6
+1712,9
@@
u32 *intel_ring_begin(struct drm_i915_gem_request *req,
unsigned int total_bytes;
u32 *cs;
+ /* Packets must be qword aligned. */
+ GEM_BUG_ON(num_dwords & 1);
+
total_bytes = bytes + req->reserved_space;
GEM_BUG_ON(total_bytes > ring->effective_size);