[Intel-gfx] [RFC PATCH 1/4] drm/i915: use same define size for wa_bb pin/allocation

Chris Wilson chris at chris-wilson.co.uk
Wed Aug 30 18:55:20 UTC 2017


Quoting Lionel Landwerlin (2017-08-30 19:20:03)
> If we have CTX_WA_BB_OBJ_SIZE we should use it everywhere we want to
> refer to the workaround batchbuffer object rather than using
> PAGE_SIZE.
> 
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
>  drivers/gpu/drm/i915/intel_lrc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c
> index 3758ff81928d..5b96b1e2353d 100644
> --- a/drivers/gpu/drm/i915/intel_lrc.c
> +++ b/drivers/gpu/drm/i915/intel_lrc.c
> @@ -1141,7 +1141,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, CTX_WA_BB_OBJ_SIZE, PIN_GLOBAL | PIN_HIGH);

It shouldn't be passed there at all; that parameter is for overriding
the vma->size.
-Chris


More information about the Intel-gfx mailing list