[Intel-gfx] [PATCH] drm/i915/gt: Prune inlines
Jani Nikula
jani.nikula at intel.com
Wed Jan 13 15:29:19 UTC 2021
On Wed, 13 Jan 2021, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> Remove all the manual inlines from non-critical sections in gt/
>
> add/remove: 2/0 grow/shrink: 0/3 up/down: 762/-1473 (-711)
> Function old new delta
> mi_set_context.isra - 602 +602
> write_dma_entry - 160 +160
> __set_pd_entry 214 69 -145
> clear_pd_entry 190 42 -148
> ring_request_alloc 2021 841 -1180
> Total: Before=1605086, After=1604375, chg -0.04%
>
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Jani Nikula <jani.nikula at intel.com>
> @@ -98,13 +98,13 @@ static inline void __timeline_mark_unlock(struct intel_context *ce,
>
> #else
>
> -static inline unsigned long __timeline_mark_lock(struct intel_context *ce)
> +static unsigned long __timeline_mark_lock(struct intel_context *ce)
> {
> return 0;
> }
>
> -static inline void __timeline_mark_unlock(struct intel_context *ce,
> - unsigned long flags)
> +static void __timeline_mark_unlock(struct intel_context *ce,
> + unsigned long flags)
> {
> }
I don't mind inlines for stubs, but probably doesn't make a difference.
> @@ -113,9 +114,10 @@ clear_pd_entry(struct i915_page_directory * const pd,
> {
> GEM_BUG_ON(atomic_read(px_used(pd)) == 0);
>
> - write_dma_entry(px_base(pd), idx, scratch->encode);
> - pd->entry[idx] = NULL;
> atomic_dec(px_used(pd));
> + pd->entry[idx] = NULL;
> +
> + write_dma_entry(px_base(pd), idx, scratch->encode);
With the changes in this hunk removed,
Reviewed-by: Jani Nikula <jani.nikula at intel.com>
--
Jani Nikula, Intel Open Source Graphics Center
More information about the Intel-gfx
mailing list