aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2018-07-27 05:18:55 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2018-07-27 06:05:28 -0400
commit7a859c655d8f9e83d95ad8e4722c0da6b29590d6 (patch)
tree6ada293e484fb5a50d854b92c19fee69b5c7a2e6 /drivers
parent6dc17d69f83ec315157b76fbf47d4379e1266cef (diff)
drm/i915: Eliminate use of PAGE_SIZE as a virtual alignment
Using PAGE_SIZE for virtual offset alignment is superfluous as it is equal to the minimum gtt alignment and so equivalent to 0. It is also the wrong value to use as we stopped using physical page constructs for the virtual GTT, i.e. it would be preferrable to use I915_GTT_PAGE_SIZE and in these cases merely imply I915_GTT_MIN_ALIGNMENT. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Matthew Auld <matthew.auld@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180727091855.1879-1-chris@chris-wilson.co.uk
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/i915/intel_engine_cs.c4
-rw-r--r--drivers/gpu/drm/i915/intel_guc.c2
-rw-r--r--drivers/gpu/drm/i915/intel_lrc.c2
-rw-r--r--drivers/gpu/drm/i915/intel_ringbuffer.c5
4 files changed, 6 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_engine_cs.c b/drivers/gpu/drm/i915/intel_engine_cs.c
index 734a789688da..67c4fc5d737c 100644
--- a/drivers/gpu/drm/i915/intel_engine_cs.c
+++ b/drivers/gpu/drm/i915/intel_engine_cs.c
@@ -513,7 +513,7 @@ int intel_engine_create_scratch(struct intel_engine_cs *engine,
513 goto err_unref; 513 goto err_unref;
514 } 514 }
515 515
516 ret = i915_vma_pin(vma, 0, 4096, PIN_GLOBAL | PIN_HIGH); 516 ret = i915_vma_pin(vma, 0, 0, PIN_GLOBAL | PIN_HIGH);
517 if (ret) 517 if (ret)
518 goto err_unref; 518 goto err_unref;
519 519
@@ -586,7 +586,7 @@ static int init_status_page(struct intel_engine_cs *engine)
586 flags |= PIN_MAPPABLE; 586 flags |= PIN_MAPPABLE;
587 else 587 else
588 flags |= PIN_HIGH; 588 flags |= PIN_HIGH;
589 ret = i915_vma_pin(vma, 0, 4096, flags); 589 ret = i915_vma_pin(vma, 0, 0, flags);
590 if (ret) 590 if (ret)
591 goto err; 591 goto err;
592 592
diff --git a/drivers/gpu/drm/i915/intel_guc.c b/drivers/gpu/drm/i915/intel_guc.c
index 3082d7670f05..97460982985c 100644
--- a/drivers/gpu/drm/i915/intel_guc.c
+++ b/drivers/gpu/drm/i915/intel_guc.c
@@ -659,7 +659,7 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size)
659 if (IS_ERR(vma)) 659 if (IS_ERR(vma))
660 goto err; 660 goto err;
661 661
662 ret = i915_vma_pin(vma, 0, PAGE_SIZE, 662 ret = i915_vma_pin(vma, 0, 0,
663 PIN_GLOBAL | PIN_OFFSET_BIAS | guc->ggtt_pin_bias); 663 PIN_GLOBAL | PIN_OFFSET_BIAS | guc->ggtt_pin_bias);
664 if (ret) { 664 if (ret) {
665 vma = ERR_PTR(ret); 665 vma = ERR_PTR(ret);
diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index c52ef2817c96..986f84920290 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1643,7 +1643,7 @@ static int lrc_setup_wa_ctx(struct intel_engine_cs *engine)
1643 goto err; 1643 goto err;
1644 } 1644 }
1645 1645
1646 err = i915_vma_pin(vma, 0, PAGE_SIZE, PIN_GLOBAL | PIN_HIGH); 1646 err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL | PIN_HIGH);
1647 if (err) 1647 if (err)
1648 goto err; 1648 goto err;
1649 1649
diff --git a/drivers/gpu/drm/i915/intel_ringbuffer.c b/drivers/gpu/drm/i915/intel_ringbuffer.c
index 33faad3197fe..27b24000412f 100644
--- a/drivers/gpu/drm/i915/intel_ringbuffer.c
+++ b/drivers/gpu/drm/i915/intel_ringbuffer.c
@@ -1035,7 +1035,7 @@ int intel_ring_pin(struct intel_ring *ring,
1035 return ret; 1035 return ret;
1036 } 1036 }
1037 1037
1038 ret = i915_vma_pin(vma, 0, PAGE_SIZE, flags); 1038 ret = i915_vma_pin(vma, 0, 0, flags);
1039 if (unlikely(ret)) 1039 if (unlikely(ret))
1040 return ret; 1040 return ret;
1041 1041
@@ -1220,8 +1220,7 @@ static int __context_pin(struct intel_context *ce)
1220 return err; 1220 return err;
1221 } 1221 }
1222 1222
1223 err = i915_vma_pin(vma, 0, I915_GTT_MIN_ALIGNMENT, 1223 err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL | PIN_HIGH);
1224 PIN_GLOBAL | PIN_HIGH);
1225 if (err) 1224 if (err)
1226 return err; 1225 return err;
1227 1226