diff options
author | John Harrison <John.C.Harrison@Intel.com> | 2015-05-29 12:44:02 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-06-23 08:02:25 -0400 |
commit | 53fddaf70d08aa6ff59a94ae0578ddc8743e920f (patch) | |
tree | e7f0ecc77c906086cff15e2a3b5488d9a6613b5f /drivers/gpu/drm/i915/intel_ringbuffer.c | |
parent | c4e766389e8b7ce3ceb7f2785d4bb94b82448ff0 (diff) |
drm/i915: Update ring->dispatch_execbuffer() to take a request structure
Updated the various ring->dispatch_execbuffer() implementations to take a
request instead of a ring.
For: VIZ-5115
Signed-off-by: John Harrison <John.C.Harrison@Intel.com>
Reviewed-by: Tomas Elf <tomas.elf@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_ringbuffer.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_ringbuffer.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c index 28d7801a8fa5..44fdfd07d912 100644 --- a/drivers/gpu/drm/i915/intel_ringbuffer.c +++ b/drivers/gpu/drm/i915/intel_ringbuffer.c | |||
@@ -1760,10 +1760,11 @@ gen8_ring_put_irq(struct intel_engine_cs *ring) | |||
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | static int | 1762 | static int |
1763 | i965_dispatch_execbuffer(struct intel_engine_cs *ring, | 1763 | i965_dispatch_execbuffer(struct drm_i915_gem_request *req, |
1764 | u64 offset, u32 length, | 1764 | u64 offset, u32 length, |
1765 | unsigned dispatch_flags) | 1765 | unsigned dispatch_flags) |
1766 | { | 1766 | { |
1767 | struct intel_engine_cs *ring = req->ring; | ||
1767 | int ret; | 1768 | int ret; |
1768 | 1769 | ||
1769 | ret = intel_ring_begin(ring, 2); | 1770 | ret = intel_ring_begin(ring, 2); |
@@ -1786,10 +1787,11 @@ i965_dispatch_execbuffer(struct intel_engine_cs *ring, | |||
1786 | #define I830_TLB_ENTRIES (2) | 1787 | #define I830_TLB_ENTRIES (2) |
1787 | #define I830_WA_SIZE max(I830_TLB_ENTRIES*4096, I830_BATCH_LIMIT) | 1788 | #define I830_WA_SIZE max(I830_TLB_ENTRIES*4096, I830_BATCH_LIMIT) |
1788 | static int | 1789 | static int |
1789 | i830_dispatch_execbuffer(struct intel_engine_cs *ring, | 1790 | i830_dispatch_execbuffer(struct drm_i915_gem_request *req, |
1790 | u64 offset, u32 len, | 1791 | u64 offset, u32 len, |
1791 | unsigned dispatch_flags) | 1792 | unsigned dispatch_flags) |
1792 | { | 1793 | { |
1794 | struct intel_engine_cs *ring = req->ring; | ||
1793 | u32 cs_offset = ring->scratch.gtt_offset; | 1795 | u32 cs_offset = ring->scratch.gtt_offset; |
1794 | int ret; | 1796 | int ret; |
1795 | 1797 | ||
@@ -1848,10 +1850,11 @@ i830_dispatch_execbuffer(struct intel_engine_cs *ring, | |||
1848 | } | 1850 | } |
1849 | 1851 | ||
1850 | static int | 1852 | static int |
1851 | i915_dispatch_execbuffer(struct intel_engine_cs *ring, | 1853 | i915_dispatch_execbuffer(struct drm_i915_gem_request *req, |
1852 | u64 offset, u32 len, | 1854 | u64 offset, u32 len, |
1853 | unsigned dispatch_flags) | 1855 | unsigned dispatch_flags) |
1854 | { | 1856 | { |
1857 | struct intel_engine_cs *ring = req->ring; | ||
1855 | int ret; | 1858 | int ret; |
1856 | 1859 | ||
1857 | ret = intel_ring_begin(ring, 2); | 1860 | ret = intel_ring_begin(ring, 2); |
@@ -2423,10 +2426,11 @@ static int gen6_bsd_ring_flush(struct drm_i915_gem_request *req, | |||
2423 | } | 2426 | } |
2424 | 2427 | ||
2425 | static int | 2428 | static int |
2426 | gen8_ring_dispatch_execbuffer(struct intel_engine_cs *ring, | 2429 | gen8_ring_dispatch_execbuffer(struct drm_i915_gem_request *req, |
2427 | u64 offset, u32 len, | 2430 | u64 offset, u32 len, |
2428 | unsigned dispatch_flags) | 2431 | unsigned dispatch_flags) |
2429 | { | 2432 | { |
2433 | struct intel_engine_cs *ring = req->ring; | ||
2430 | bool ppgtt = USES_PPGTT(ring->dev) && | 2434 | bool ppgtt = USES_PPGTT(ring->dev) && |
2431 | !(dispatch_flags & I915_DISPATCH_SECURE); | 2435 | !(dispatch_flags & I915_DISPATCH_SECURE); |
2432 | int ret; | 2436 | int ret; |
@@ -2446,10 +2450,11 @@ gen8_ring_dispatch_execbuffer(struct intel_engine_cs *ring, | |||
2446 | } | 2450 | } |
2447 | 2451 | ||
2448 | static int | 2452 | static int |
2449 | hsw_ring_dispatch_execbuffer(struct intel_engine_cs *ring, | 2453 | hsw_ring_dispatch_execbuffer(struct drm_i915_gem_request *req, |
2450 | u64 offset, u32 len, | 2454 | u64 offset, u32 len, |
2451 | unsigned dispatch_flags) | 2455 | unsigned dispatch_flags) |
2452 | { | 2456 | { |
2457 | struct intel_engine_cs *ring = req->ring; | ||
2453 | int ret; | 2458 | int ret; |
2454 | 2459 | ||
2455 | ret = intel_ring_begin(ring, 2); | 2460 | ret = intel_ring_begin(ring, 2); |
@@ -2468,10 +2473,11 @@ hsw_ring_dispatch_execbuffer(struct intel_engine_cs *ring, | |||
2468 | } | 2473 | } |
2469 | 2474 | ||
2470 | static int | 2475 | static int |
2471 | gen6_ring_dispatch_execbuffer(struct intel_engine_cs *ring, | 2476 | gen6_ring_dispatch_execbuffer(struct drm_i915_gem_request *req, |
2472 | u64 offset, u32 len, | 2477 | u64 offset, u32 len, |
2473 | unsigned dispatch_flags) | 2478 | unsigned dispatch_flags) |
2474 | { | 2479 | { |
2480 | struct intel_engine_cs *ring = req->ring; | ||
2475 | int ret; | 2481 | int ret; |
2476 | 2482 | ||
2477 | ret = intel_ring_begin(ring, 2); | 2483 | ret = intel_ring_begin(ring, 2); |