From: Rodrigo Vivi <rodrigo.vivi@intel.com>
To: Jani Nikula <jani.nikula@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915/gem: remove inlines from i915_gem_execbuffer.c
Date: Thu, 21 Sep 2023 16:33:14 -0400 [thread overview]
Message-ID: <ZQyoiuuJtwOuNTu2@intel.com> (raw)
In-Reply-To: <20230921160637.3862597-1-jani.nikula@intel.com>
On Thu, Sep 21, 2023 at 07:06:37PM +0300, Jani Nikula wrote:
> Just let the compiler decide what's best. Turns out absolutely nothing
> changes in the output with the inlines removed.
>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>
> ---
>
> The same should really be done for most inlines in .c files. *wink wink*
Indeed!
> ---
> .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 20 +++++++++----------
> 1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> index 7d04ec740fd1..683fd8d3151c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c
> @@ -321,7 +321,7 @@ static int eb_pin_engine(struct i915_execbuffer *eb, bool throttle);
> static void eb_unpin_engine(struct i915_execbuffer *eb);
> static void eb_capture_release(struct i915_execbuffer *eb);
>
> -static inline bool eb_use_cmdparser(const struct i915_execbuffer *eb)
> +static bool eb_use_cmdparser(const struct i915_execbuffer *eb)
> {
> return intel_engine_requires_cmd_parser(eb->context->engine) ||
> (intel_engine_using_cmd_parser(eb->context->engine) &&
> @@ -433,7 +433,7 @@ static u64 eb_pin_flags(const struct drm_i915_gem_exec_object2 *entry,
> return pin_flags;
> }
>
> -static inline int
> +static int
> eb_pin_vma(struct i915_execbuffer *eb,
> const struct drm_i915_gem_exec_object2 *entry,
> struct eb_vma *ev)
> @@ -486,7 +486,7 @@ eb_pin_vma(struct i915_execbuffer *eb,
> return 0;
> }
>
> -static inline void
> +static void
> eb_unreserve_vma(struct eb_vma *ev)
> {
> if (unlikely(ev->flags & __EXEC_OBJECT_HAS_FENCE))
> @@ -548,7 +548,7 @@ eb_validate_vma(struct i915_execbuffer *eb,
> return 0;
> }
>
> -static inline bool
> +static bool
> is_batch_buffer(struct i915_execbuffer *eb, unsigned int buffer_idx)
> {
> return eb->args->flags & I915_EXEC_BATCH_FIRST ?
> @@ -628,8 +628,8 @@ eb_add_vma(struct i915_execbuffer *eb,
> return 0;
> }
>
> -static inline int use_cpu_reloc(const struct reloc_cache *cache,
> - const struct drm_i915_gem_object *obj)
> +static int use_cpu_reloc(const struct reloc_cache *cache,
> + const struct drm_i915_gem_object *obj)
> {
> if (!i915_gem_object_has_struct_page(obj))
> return false;
> @@ -1107,7 +1107,7 @@ static void eb_destroy(const struct i915_execbuffer *eb)
> kfree(eb->buckets);
> }
>
> -static inline u64
> +static u64
> relocation_target(const struct drm_i915_gem_relocation_entry *reloc,
> const struct i915_vma *target)
> {
> @@ -1128,19 +1128,19 @@ static void reloc_cache_init(struct reloc_cache *cache,
> cache->node.flags = 0;
> }
>
> -static inline void *unmask_page(unsigned long p)
> +static void *unmask_page(unsigned long p)
> {
> return (void *)(uintptr_t)(p & PAGE_MASK);
> }
>
> -static inline unsigned int unmask_flags(unsigned long p)
> +static unsigned int unmask_flags(unsigned long p)
> {
> return p & ~PAGE_MASK;
> }
>
> #define KMAP 0x4 /* after CLFLUSH_FLAGS */
>
> -static inline struct i915_ggtt *cache_to_ggtt(struct reloc_cache *cache)
> +static struct i915_ggtt *cache_to_ggtt(struct reloc_cache *cache)
> {
> struct drm_i915_private *i915 =
> container_of(cache, struct i915_execbuffer, reloc_cache)->i915;
> --
> 2.39.2
>
next prev parent reply other threads:[~2023-09-21 20:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-21 16:06 [Intel-gfx] [PATCH] drm/i915/gem: remove inlines from i915_gem_execbuffer.c Jani Nikula
2023-09-21 20:33 ` Rodrigo Vivi [this message]
2023-09-22 4:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-09-23 0:08 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-09-25 14:19 ` [Intel-gfx] [PATCH] " Andi Shyti
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZQyoiuuJtwOuNTu2@intel.com \
--to=rodrigo.vivi@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=jani.nikula@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox