History

drm/i915: Support 64b execbuf

Previously, our code only had a 32b offset value for where the batchbuffer starts. With full PPGTT, and 64b canonical GPU address space, that is an insufficient value. The code to expand is pretty straight forward, and only one platform needs to do anything with the extra bits.

Ben Widawsky committed 12 years ago

Commit 9bcb1441 parent 192d47a3 files · +10 −10Browse files

Unified · Split

3 files
  1. drivers/gpu/drm/i915/i915_gem_execbuffer.c +1 −1
  2. drivers/gpu/drm/i915/intel_ringbuffer.c +8 −8
  3. drivers/gpu/drm/i915/intel_ringbuffer.h +1 −1
drivers/gpu/drm/i915/i915_gem_execbuffer.c+1−1
@@ -1049,7 +1049,7 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data, · 1048 unmodified lines
10491049 struct i915_hw_context *ctx;
10501050 struct i915_address_space *vm;
10511051 const u32 ctx_id = i915_execbuffer2_get_context_id(*args);
1052− u32 exec_start = args->batch_start_offset, exec_len;
1052+ u64 exec_start = args->batch_start_offset, exec_len;
10531053 u32 mask, flags;
10541054 int ret, mode, i;
10551055 bool need_relocs;
drivers/gpu/drm/i915/intel_ringbuffer.c+8−8
@@ -1210,7 +1210,7 @@ gen8_ring_put_irq(struct intel_ring_buffer *ring) · 1209 unmodified lines
12101210
12111211 static int
12121212 i965_dispatch_execbuffer(struct intel_ring_buffer *ring,
1213− u32 offset, u32 length,
1213+ u64 offset, u32 length,
12141214 unsigned flags)
12151215 {
12161216 int ret;
@@ -1233,7 +1233,7 @@ i965_dispatch_execbuffer(struct intel_ring_buffer *ring, · 16 unmodified lines
12331233 #define I830_BATCH_LIMIT (256*1024)
12341234 static int
12351235 i830_dispatch_execbuffer(struct intel_ring_buffer *ring,
1236− u32 offset, u32 len,
1236+ u64 offset, u32 len,
12371237 unsigned flags)
12381238 {
12391239 int ret;
@@ -1284,7 +1284,7 @@ i830_dispatch_execbuffer(struct intel_ring_buffer *ring, · 44 unmodified lines
12841284
12851285 static int
12861286 i915_dispatch_execbuffer(struct intel_ring_buffer *ring,
1287− u32 offset, u32 len,
1287+ u64 offset, u32 len,
12881288 unsigned flags)
12891289 {
12901290 int ret;
@@ -1797,7 +1797,7 @@ static int gen6_bsd_ring_flush(struct intel_ring_buffer *ring, · 506 unmodified lines
17971797
17981798 static int
17991799 gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
1800− u32 offset, u32 len,
1800+ u64 offset, u32 len,
18011801 unsigned flags)
18021802 {
18031803 struct drm_i915_private *dev_priv = ring->dev->dev_private;
@@ -1811,8 +1811,8 @@ gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring, · 7 unmodified lines
18111811
18121812 /* FIXME(BDW): Address space and security selectors. */
18131813 intel_ring_emit(ring, MI_BATCH_BUFFER_START_GEN8 | (ppgtt<<8));
1814− intel_ring_emit(ring, offset);
1815− intel_ring_emit(ring, 0);
1814+ intel_ring_emit(ring, lower_32_bits(offset));
1815+ intel_ring_emit(ring, upper_32_bits(offset));
18161816 intel_ring_emit(ring, MI_NOOP);
18171817 intel_ring_advance(ring);
18181818
@@ -1821,7 +1821,7 @@ gen8_ring_dispatch_execbuffer(struct intel_ring_buffer *ring, · 2 unmodified lines
18211821
18221822 static int
18231823 hsw_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
1824− u32 offset, u32 len,
1824+ u64 offset, u32 len,
18251825 unsigned flags)
18261826 {
18271827 int ret;
@@ -1842,7 +1842,7 @@ hsw_ring_dispatch_execbuffer(struct intel_ring_buffer *ring, · 14 unmodified lines
18421842
18431843 static int
18441844 gen6_ring_dispatch_execbuffer(struct intel_ring_buffer *ring,
1845− u32 offset, u32 len,
1845+ u64 offset, u32 len,
18461846 unsigned flags)
18471847 {
18481848 int ret;
drivers/gpu/drm/i915/intel_ringbuffer.h+1−1
@@ -112,7 +112,7 @@ struct intel_ring_buffer { · 111 unmodified lines
112112 void (*set_seqno)(struct intel_ring_buffer *ring,
113113 u32 seqno);
114114 int (*dispatch_execbuffer)(struct intel_ring_buffer *ring,
115− u32 offset, u32 length,
115+ u64 offset, u32 length,
116116 unsigned flags);
117117 #define I915_DISPATCH_SECURE 0x1
118118 #define I915_DISPATCH_PINNED 0x2

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t