diff mbox

[3/8] drm/i915: don't specify pinned size for wa_bb pin/allocation

Message ID 20180425114521.7524-4-lionel.g.landwerlin@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Lionel Landwerlin April 25, 2018, 11:45 a.m. UTC
We can rely on the i915_vma_pin() to use vma->size instead.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 drivers/gpu/drm/i915/intel_lrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chris Wilson April 25, 2018, 11:52 a.m. UTC | #1
Quoting Lionel Landwerlin (2018-04-25 12:45:16)
> We can rely on the i915_vma_pin() to use vma->size instead.

But that's the alignment parameter. I didn't change it as I have no idea
why it was set to PAGE_SIZE. i915_vma_pin() treats it as 0 anyway.
-Chris
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
index 407a44a341b9..3ca5a1d33fe9 100644
--- a/drivers/gpu/drm/i915/intel_lrc.c
+++ b/drivers/gpu/drm/i915/intel_lrc.c
@@ -1602,7 +1602,7 @@  static int lrc_setup_wa_ctx(struct intel_engine_cs *engine)
 		goto err;
 	}
 
-	err = i915_vma_pin(vma, 0, PAGE_SIZE, PIN_GLOBAL | PIN_HIGH);
+	err = i915_vma_pin(vma, 0, 0, PIN_GLOBAL | PIN_HIGH);
 	if (err)
 		goto err;