Message ID | 20180730120544.20784-1-matthew.auld@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm/i915/gtt: remove px_page | expand |
Quoting Matthew Auld (2018-07-30 13:05:44) > Entries will either be pointing to scratch or real PD, making the > px_page(pd) check pointless. Also since there are no other users of > px_page, just remove it. > > Signed-off-by: Matthew Auld <matthew.auld@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Michel Thierry <michel.thierry@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> QoD: how tough would it be to use the faultinjection to cause a setup failure? -Chris
Matthew Auld <matthew.auld@intel.com> writes: > Entries will either be pointing to scratch or real PD, making the > px_page(pd) check pointless. Also since there are no other users of > px_page, just remove it. > Yup. Callsites return enomem and free the struct so we should not leak any partially setup structs. Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com> > Signed-off-by: Matthew Auld <matthew.auld@intel.com> > Cc: Chris Wilson <chris@chris-wilson.co.uk> > Cc: Michel Thierry <michel.thierry@intel.com> > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 3 --- > drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - > 2 files changed, 4 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c > index 87219870d559..4137af4bd8f5 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.c > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c > @@ -1251,9 +1251,6 @@ static void gen8_free_page_tables(struct i915_address_space *vm, > { > int i; > > - if (!px_page(pd)) > - return; > - > for (i = 0; i < I915_PDES; i++) { > if (pd->page_table[i] != vm->scratch_pt) > free_pt(vm, pd->page_table[i]); > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h > index ce945bf78a89..dd161c187a68 100644 > --- a/drivers/gpu/drm/i915/i915_gem_gtt.h > +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h > @@ -229,7 +229,6 @@ struct i915_page_dma { > }; > > #define px_base(px) (&(px)->base) > -#define px_page(px) (px_base(px)->page) > #define px_dma(px) (px_base(px)->daddr) > > struct i915_page_table { > -- > 2.17.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoting Patchwork (2018-07-30 15:19:10) > == Series Details == > > Series: drm/i915/gtt: remove px_page > URL : https://patchwork.freedesktop.org/series/47421/ > State : success > > == Summary == > > = CI Bug Log - changes from CI_DRM_4594_full -> Patchwork_9806_full = > > == Summary - SUCCESS == > > No regressions found. And pushed to keep CI fed. Thanks for the patch and review, -Chris
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 87219870d559..4137af4bd8f5 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -1251,9 +1251,6 @@ static void gen8_free_page_tables(struct i915_address_space *vm, { int i; - if (!px_page(pd)) - return; - for (i = 0; i < I915_PDES; i++) { if (pd->page_table[i] != vm->scratch_pt) free_pt(vm, pd->page_table[i]); diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.h b/drivers/gpu/drm/i915/i915_gem_gtt.h index ce945bf78a89..dd161c187a68 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.h +++ b/drivers/gpu/drm/i915/i915_gem_gtt.h @@ -229,7 +229,6 @@ struct i915_page_dma { }; #define px_base(px) (&(px)->base) -#define px_page(px) (px_base(px)->page) #define px_dma(px) (px_base(px)->daddr) struct i915_page_table {
Entries will either be pointing to scratch or real PD, making the px_page(pd) check pointless. Also since there are no other users of px_page, just remove it. Signed-off-by: Matthew Auld <matthew.auld@intel.com> Cc: Chris Wilson <chris@chris-wilson.co.uk> Cc: Michel Thierry <michel.thierry@intel.com> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 3 --- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 - 2 files changed, 4 deletions(-)