All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Iddamsetty, Aravind" <aravind.iddamsetty@intel.com>
To: Matt Roper <matthew.d.roper@intel.com>
Cc: Pallavi Mishra <pallavi.mishra@intel.com>,
	intel-gfx@lists.freedesktop.org,
	Lucas De Marchi <lucas.demarchi@intel.com>
Subject: Re: [Intel-gfx] [PATCH v2 4/4] drm/i915/mtl/UAPI: Disable GET/SET_CACHING IOCTL for MTL+
Date: Thu, 15 Dec 2022 13:46:29 +0530	[thread overview]
Message-ID: <d87268d4-afff-9941-3209-884f17b505ca@intel.com> (raw)
In-Reply-To: <Y4/U+F4pu5L9L3bP@mdroper-desk1.amr.corp.intel.com>



On 07-12-2022 05:19, Matt Roper wrote:
> On Tue, Dec 06, 2022 at 01:57:39PM +0530, Aravind Iddamsetty wrote:
>> From: Pallavi Mishra <pallavi.mishra@intel.com>
>>
>> It's a noop on all new platforms starting from MTL.
> 
> To me, saying "it's a noop" implies that the ioctl will succeed and
> silently do nothing, which isn't the case in this patch.  We're
> explicitly rejecting attempts by userspace to use these ioctls.
> 
>> Refer: (e7737b67ab46) drm/i915/uapi: reject caching ioctls for discrete
> 
> While killing set_caching/get_caching is the way we want to go, I think
> we need a lot more explanation of how cache behavior in general is
> supposed to work now.  I believe the plan is that userspace will supply
> the specific PAT index that corresponds to the behavior they want via a
> vm_bind extension?  I'm not familiar with the details of how that will
> work...does that mean that the caching behavior will also be tied to the
> specific mapping of an object in the GTT rather than being tied to the
> object itself?  I.e., you can map the same object twice with two
> different caching behaviors?
Like i mentioned in other email part of this series. The current plan
atleast is to set the caching for an object during creation time
depending on the platform so for MTL it would be UNCACHED. The PAT index
setting via VM_BIND is yet not planned.

Thanks,
Aravind.
> 
> Is there a uapi RFC document available yet that describes the high-level
> view of how all this stuff fits together now?  If so, a reference to
> that would be good to include.
> 
> 
> Matt
> 
>>
>> v2:
>> 1. block get caching ioctl
>> 2. return ENODEV similar to DGFX
>> 3. update the doc in i915_drm.h
>>
>> Cc: Lucas De Marchi <lucas.demarchi@intel.com>
>> Cc: Matt Roper <matthew.d.roper@intel.com>
>> Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
>>
>> Signed-off-by: Pallavi Mishra <pallavi.mishra@intel.com>
>> Signed-off-by: Aravind Iddamsetty <aravind.iddamsetty@intel.com>
>> ---
>>  drivers/gpu/drm/i915/gem/i915_gem_domain.c | 4 ++--
>>  include/uapi/drm/i915_drm.h                | 3 +++
>>  2 files changed, 5 insertions(+), 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
>> index d44a152ce680..cf817ee0aa01 100644
>> --- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
>> +++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
>> @@ -291,7 +291,7 @@ int i915_gem_get_caching_ioctl(struct drm_device *dev, void *data,
>>  	struct drm_i915_gem_object *obj;
>>  	int err = 0;
>>  
>> -	if (IS_DGFX(to_i915(dev)))
>> +	if (IS_DGFX(to_i915(dev)) || GRAPHICS_VER_FULL(to_i915(dev)) >= IP_VER(12, 70))
>>  		return -ENODEV;
>>  
>>  	rcu_read_lock();
>> @@ -329,7 +329,7 @@ int i915_gem_set_caching_ioctl(struct drm_device *dev, void *data,
>>  	enum i915_cache_level level;
>>  	int ret = 0;
>>  
>> -	if (IS_DGFX(i915))
>> +	if (IS_DGFX(i915) || GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70))
>>  		return -ENODEV;
>>  
>>  	switch (args->caching) {
>> diff --git a/include/uapi/drm/i915_drm.h b/include/uapi/drm/i915_drm.h
>> index 8df261c5ab9b..3467fd879427 100644
>> --- a/include/uapi/drm/i915_drm.h
>> +++ b/include/uapi/drm/i915_drm.h
>> @@ -1626,6 +1626,9 @@ struct drm_i915_gem_busy {
>>   *     - Everything else is always allocated and mapped as write-back, with the
>>   *       guarantee that everything is also coherent with the GPU.
>>   *
>> + * Starting from MTL even on integrated platforms set/get caching is no longer
>> + * supported and object will be mapped as write-combined only.
>> + *
>>   * Note that this is likely to change in the future again, where we might need
>>   * more flexibility on future devices, so making this all explicit as part of a
>>   * new &drm_i915_gem_create_ext extension is probable.
>> -- 
>> 2.25.1
>>
> 

  parent reply	other threads:[~2022-12-15  8:16 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-28 10:13 [Intel-gfx] [PATCH 1/3] drm/i915/mtl: Define MOCS and PAT tables for MTL Aravind Iddamsetty
2022-11-28 10:13 ` [Intel-gfx] [PATCH 2/3] drm/i915/mtl: Define new PTE encode " Aravind Iddamsetty
2022-11-28 19:52   ` Yang, Fei
2022-11-28 23:58     ` Iddamsetty, Aravind
2022-11-28 20:27   ` Lucas De Marchi
2022-11-29  4:28     ` Iddamsetty, Aravind
2022-11-29  6:51       ` Lucas De Marchi
2022-11-28 10:13 ` [Intel-gfx] [PATCH 3/3] drm/i915/mtl/UAPI: Disable SET_CACHING IOCTL for MTL+ Aravind Iddamsetty
2022-11-28 20:19   ` Lucas De Marchi
2022-11-29  5:07     ` Iddamsetty, Aravind
2022-11-29 11:16     ` Iddamsetty, Aravind
2022-11-28 12:12 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915/mtl: Define MOCS and PAT tables for MTL Patchwork
2022-11-28 12:32 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-11-28 15:44 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2022-12-06  7:37 ` [Intel-gfx] [PATCH 1/4] " Aravind Iddamsetty
2022-12-06  8:27   ` Aravind Iddamsetty
2022-12-06  7:37   ` [Intel-gfx] [PATCH 2/4] drm/i915: Reference pte_encode through vm pointer Aravind Iddamsetty
2022-12-06  8:27     ` Aravind Iddamsetty
2022-12-06 22:51     ` Matt Roper
2022-12-07  6:28       ` Iddamsetty, Aravind
2022-12-06  7:37   ` [Intel-gfx] [PATCH 3/4] drm/i915/mtl: Define new PTE encode for MTL Aravind Iddamsetty
2022-12-06  8:27     ` Aravind Iddamsetty
2022-12-06 23:39     ` Matt Roper
2022-12-07  7:26       ` Iddamsetty, Aravind
2022-12-07 18:11         ` Matt Roper
2022-12-14 12:07           ` Iddamsetty, Aravind
2022-12-15 13:02     ` Das, Nirmoy
2022-12-06  7:37   ` [Intel-gfx] [PATCH 4/4] drm/i915/mtl/UAPI: Disable GET/SET_CACHING IOCTL for MTL+ Aravind Iddamsetty
2022-12-06  8:27     ` [Intel-gfx] [PATCH v2 " Aravind Iddamsetty
2022-12-06 16:58     ` Matthew Auld
2022-12-06 23:49     ` Matt Roper
2022-12-06 23:51       ` Matt Roper
2022-12-15  8:16       ` Iddamsetty, Aravind [this message]
2022-12-06  8:08   ` [Intel-gfx] [PATCH 1/4] drm/i915/mtl: Define MOCS and PAT tables for MTL Iddamsetty, Aravind
2022-12-06 18:39     ` Lucas De Marchi
2022-12-07  6:20       ` Iddamsetty, Aravind
2022-12-06 22:37   ` Matt Roper

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=d87268d4-afff-9941-3209-884f17b505ca@intel.com \
    --to=aravind.iddamsetty@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=lucas.demarchi@intel.com \
    --cc=matthew.d.roper@intel.com \
    --cc=pallavi.mishra@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.