[Intel-gfx] [PATCH 2/6] drm/i915: reference ppgtt->base.dev directly
Joonas Lahtinen
joonas.lahtinen at linux.intel.com
Fri Apr 8 10:05:22 UTC 2016
On pe, 2016-04-08 at 10:32 +0100, Matthew Auld wrote:
> Remove dev local and use to_i915() in gen8_ppgtt_notify_vgt.
>
> Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> ---
> drivers/gpu/drm/i915/i915_gem_gtt.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c
> index da6e3a5..066d5aead 100644
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c
> @@ -905,11 +905,10 @@ static int gen8_init_scratch(struct i915_address_space *vm)
> static int gen8_ppgtt_notify_vgt(struct i915_hw_ppgtt *ppgtt, bool create)
> {
> enum vgt_g2v_type msg;
> - struct drm_device *dev = ppgtt->base.dev;
> - struct drm_i915_private *dev_priv = dev->dev_private;
> + struct drm_i915_private *dev_priv = to_i915(ppgtt->base.dev);
> int i;
>
> - if (USES_FULL_48BIT_PPGTT(dev)) {
> + if (USES_FULL_48BIT_PPGTT(ppgtt->base.dev)) {
All the QUESTION_MACROS() want dev_priv (they can figure it out from
dev too), so just pass it directly when it is available.
Regards, Joonas
> u64 daddr = px_dma(&ppgtt->pml4);
>
> I915_WRITE(vgtif_reg(pdp[0].lo), lower_32_bits(daddr));
--
Joonas Lahtinen
Open Source Technology Center
Intel Corporation
More information about the Intel-gfx
mailing list