From: Jani Nikula <jani.nikula@linux.intel.com>
To: Dipam Turkar <dipamt1729@gmail.com>
Cc: joonas.lahtinen@linux.intel.com, rodrigo.vivi@intel.com,
tvrtko.ursulin@linux.intel.com, airlied@gmail.com,
daniel@ffwll.ch, intel-gfx@lists.freedesktop.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Dipam Turkar <dipamt1729@gmail.com>
Subject: Re: [PATCH v2] Remove custom dumb_map_offset implementations in i915 driver
Date: Mon, 13 Nov 2023 19:53:01 +0200 [thread overview]
Message-ID: <875y25tu9u.fsf@intel.com> (raw)
In-Reply-To: <20231110184126.712310-1-dipamt1729@gmail.com>
On Sat, 11 Nov 2023, Dipam Turkar <dipamt1729@gmail.com> wrote:
> Making i915 use drm_gem_create_mmap_offset() instead of its custom
> implementations for associating GEM object with a fake offset.
It would probably help a lot if your commit messages explained what you
are trying to achieve and, especially, why. This only describes the
patch in English.
BR,
Jani.
>
> Signed-off-by: Dipam Turkar <dipamt1729@gmail.com>
> ---
> drivers/gpu/drm/i915/gem/i915_gem_mman.c | 21 ---------------------
> drivers/gpu/drm/i915/gem/i915_gem_mman.h | 4 ----
> drivers/gpu/drm/i915/i915_driver.c | 3 ++-
> 3 files changed, 2 insertions(+), 26 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> index aa4d842d4c5a..71d621a1f249 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.c
> @@ -771,27 +771,6 @@ __assign_mmap_offset_handle(struct drm_file *file,
> return err;
> }
>
> -int
> -i915_gem_dumb_mmap_offset(struct drm_file *file,
> - struct drm_device *dev,
> - u32 handle,
> - u64 *offset)
> -{
> - struct drm_i915_private *i915 = to_i915(dev);
> - enum i915_mmap_type mmap_type;
> -
> - if (HAS_LMEM(to_i915(dev)))
> - mmap_type = I915_MMAP_TYPE_FIXED;
> - else if (pat_enabled())
> - mmap_type = I915_MMAP_TYPE_WC;
> - else if (!i915_ggtt_has_aperture(to_gt(i915)->ggtt))
> - return -ENODEV;
> - else
> - mmap_type = I915_MMAP_TYPE_GTT;
> -
> - return __assign_mmap_offset_handle(file, handle, mmap_type, offset);
> -}
> -
> /**
> * i915_gem_mmap_offset_ioctl - prepare an object for GTT mmap'ing
> * @dev: DRM device
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.h b/drivers/gpu/drm/i915/gem/i915_gem_mman.h
> index 196417fd0f5c..253435795caf 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_mman.h
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_mman.h
> @@ -20,10 +20,6 @@ struct mutex;
> int i915_gem_mmap_gtt_version(void);
> int i915_gem_mmap(struct file *filp, struct vm_area_struct *vma);
>
> -int i915_gem_dumb_mmap_offset(struct drm_file *file_priv,
> - struct drm_device *dev,
> - u32 handle, u64 *offset);
> -
> void __i915_gem_object_release_mmap_gtt(struct drm_i915_gem_object *obj);
> void i915_gem_object_release_mmap_gtt(struct drm_i915_gem_object *obj);
>
> diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c
> index d50347e5773a..48d7e53c49d6 100644
> --- a/drivers/gpu/drm/i915/i915_driver.c
> +++ b/drivers/gpu/drm/i915/i915_driver.c
> @@ -42,6 +42,7 @@
> #include <drm/drm_aperture.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_ioctl.h>
> +#include <drm/drm_gem.h>
> #include <drm/drm_managed.h>
> #include <drm/drm_probe_helper.h>
>
> @@ -1826,7 +1827,7 @@ static const struct drm_driver i915_drm_driver = {
> .gem_prime_import = i915_gem_prime_import,
>
> .dumb_create = i915_gem_dumb_create,
> - .dumb_map_offset = i915_gem_dumb_mmap_offset,
> + .dumb_map_offset = drm_gem_dumb_map_offset,
>
> .ioctls = i915_ioctls,
> .num_ioctls = ARRAY_SIZE(i915_ioctls),
--
Jani Nikula, Intel
prev parent reply other threads:[~2023-11-13 17:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-10 18:41 [PATCH v2] Remove custom dumb_map_offset implementations in i915 driver Dipam Turkar
2023-11-13 7:25 ` kernel test robot
2023-11-13 17:53 ` Jani Nikula [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=875y25tu9u.fsf@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=airlied@gmail.com \
--cc=daniel@ffwll.ch \
--cc=dipamt1729@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=joonas.lahtinen@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rodrigo.vivi@intel.com \
--cc=tvrtko.ursulin@linux.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