From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH v2] drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch]
Date: Thu, 17 Mar 2022 09:27:23 +0000 [thread overview]
Message-ID: <fc7edb8e-d6af-67d0-8e0c-b3fabdb22797@linux.intel.com> (raw)
In-Reply-To: <20220316095018.137998-1-jani.nikula@intel.com>
On 16/03/2022 09:50, Jani Nikula wrote:
> Move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] as a
> i915_gem_object function related to tiling. Also un-inline while at it;
> does not seem like this is a function needed in hot paths.
>
> v2: i915_gem_tiling.[ch] instead of intel_ggtt_fencing.[ch] (Chris)
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Regards,
Tvrtko
> Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_phys.c | 1 +
> drivers/gpu/drm/i915/gem/i915_gem_shmem.c | 3 ++-
> drivers/gpu/drm/i915/gem/i915_gem_tiling.c | 8 ++++++++
> drivers/gpu/drm/i915/gem/i915_gem_tiling.h | 2 ++
> drivers/gpu/drm/i915/i915_drv.h | 9 ---------
> 5 files changed, 13 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_phys.c b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
> index ca6faffcc496..0d0e46dae559 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_phys.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_phys.c
> @@ -14,6 +14,7 @@
> #include "i915_drv.h"
> #include "i915_gem_object.h"
> #include "i915_gem_region.h"
> +#include "i915_gem_tiling.h"
> #include "i915_scatterlist.h"
>
> static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> index 3a1c782ed791..c7541dc687c1 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_shmem.c
> @@ -12,8 +12,9 @@
>
> #include "gem/i915_gem_region.h"
> #include "i915_drv.h"
> -#include "i915_gemfs.h"
> #include "i915_gem_object.h"
> +#include "i915_gem_tiling.h"
> +#include "i915_gemfs.h"
> #include "i915_scatterlist.h"
> #include "i915_trace.h"
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> index d6adda5bf96b..80ac0db1ae8c 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_tiling.c
> @@ -219,6 +219,14 @@ i915_gem_object_fence_prepare(struct drm_i915_gem_object *obj,
> return ret;
> }
>
> +bool i915_gem_object_needs_bit17_swizzle(struct drm_i915_gem_object *obj)
> +{
> + struct drm_i915_private *i915 = to_i915(obj->base.dev);
> +
> + return to_gt(i915)->ggtt->bit_6_swizzle_x == I915_BIT_6_SWIZZLE_9_10_17 &&
> + i915_gem_object_is_tiled(obj);
> +}
> +
> int
> i915_gem_object_set_tiling(struct drm_i915_gem_object *obj,
> unsigned int tiling, unsigned int stride)
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_tiling.h b/drivers/gpu/drm/i915/gem/i915_gem_tiling.h
> index 9924196a8139..6bd5751abf28 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_tiling.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_tiling.h
> @@ -8,8 +8,10 @@
>
> #include <linux/types.h>
>
> +struct drm_i915_gem_object;
> struct drm_i915_private;
>
> +bool i915_gem_object_needs_bit17_swizzle(struct drm_i915_gem_object *obj);
> u32 i915_gem_fence_size(struct drm_i915_private *i915, u32 size,
> unsigned int tiling, unsigned int stride);
> u32 i915_gem_fence_alignment(struct drm_i915_private *i915, u32 size,
> diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> index 26df561a4e94..a9aceb08fcd1 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -1486,15 +1486,6 @@ void i915_gem_driver_release(struct drm_i915_private *dev_priv);
>
> int i915_gem_open(struct drm_i915_private *i915, struct drm_file *file);
>
> -/* i915_gem_tiling.c */
> -static inline bool i915_gem_object_needs_bit17_swizzle(struct drm_i915_gem_object *obj)
> -{
> - struct drm_i915_private *i915 = to_i915(obj->base.dev);
> -
> - return to_gt(i915)->ggtt->bit_6_swizzle_x == I915_BIT_6_SWIZZLE_9_10_17 &&
> - i915_gem_object_is_tiled(obj);
> -}
> -
> /* intel_device_info.c */
> static inline struct intel_device_info *
> mkwrite_device_info(struct drm_i915_private *dev_priv)
prev parent reply other threads:[~2022-03-17 9:27 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-16 9:50 [Intel-gfx] [PATCH v2] drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] Jani Nikula
2022-03-16 10:11 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for " Patchwork
2022-03-16 10:42 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2022-03-16 18:00 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: move i915_gem_object_needs_bit17_swizzle() to i915_gem_tiling.[ch] (rev2) Patchwork
2022-03-16 18:35 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-03-16 21:31 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-03-17 9:27 ` Tvrtko Ursulin [this message]
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=fc7edb8e-d6af-67d0-8e0c-b3fabdb22797@linux.intel.com \
--to=tvrtko.ursulin@linux.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