public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: "Yang, Fei" <fei.yang@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Cc: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v2 0/5] drm/i915: Allow user to set cache at BO creation
Date: Thu, 27 Apr 2023 15:33:33 +0100	[thread overview]
Message-ID: <7d5d497d-b552-d8d9-e58c-20f4b0ded76c@linux.intel.com> (raw)
In-Reply-To: <BYAPR11MB2567F72C44D485E628A574069A659@BYAPR11MB2567.namprd11.prod.outlook.com>


On 26/04/2023 16:41, Yang, Fei wrote:
>  > On 26/04/2023 07:24, fei.yang@intel.com wrote:
>  >> From: Fei Yang <fei.yang@intel.com>
>  >>
>  >> The first three patches in this series are taken from
>  >> https://patchwork.freedesktop.org/series/116868/
>  >> These patches are included here because the last patch
>  >> has dependency on the pat_index refactor.
>  >>
>  >> This series is focusing on uAPI changes,
>  >> 1. end support for set caching ioctl [PATCH 4/5]
>  >> 2. add set_pat extension for gem_create [PATCH 5/5]
>  >>
>  >> v2: drop one patch that was merged separately
>  >>      341ad0e8e254 drm/i915/mtl: Add PTE encode function
>  >
>  > Are the re-sends for stabilizing the series, or focusing on merge?
> 
> v2 was sent just to drop one of patches that has already been merged.
> 
>  > If the latter then opens are:
>  >
>  > 1) Link to Mesa MR reviewed and ready to merge.
>  >
>  > 2) IGT reviewed.
>  >
>  > 3) I raised an open that get/set_caching should not "lie" but return an
>  > error if set pat extension has been used. I don't see a good reason not
>  > to do that.
> 
> I don't think it's "lying" to the userspace. the comparison is only valid
> for objects created by KMD because only such object uses the pat_index
> from the cachelevel_to_pat table.

Lets double check my understanding is correct. Userspace sequence of 
operations:

1)
obj = gem_create()+set_pat(PAT_UC)

2a)
get_caching(obj)

What gets reported?

2b)
set_caching(obj, I915_CACHE_LLC)

What is the return code?

If answer to 2a is I915_CACHING_CACHED and to 2b) success, then please 
state a good reason why both shouldn't return an error.

> 
>  > + Joonas on this one.
>  >
>  > 4) Refactoring as done is not very pretty and I proposed an idea for a
>  > nicer approach. Feasible or not, open for discussion.
> 
> Still digesting your proposal. but not sure how would you define things
> like PAT_UC as that is platform dependent, not a constant.

"PAT_UC" in my outline was purely a driver specific value, similarly as 
I915_CACHE_... are. With the whole point that driver can ask if 
something is uncached, WT or whatever. Using the platform specific 
mapping table which converts platform specific obj->pat_index to driver 
representation of caching modes (PAT_UC etc).

Quite possible I missed some detail, but if I haven't then it could be 
a neat and lightweight solution.

Regards,

Tvrtko

  reply	other threads:[~2023-04-27 14:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-26  6:24 [Intel-gfx] [PATCH v2 0/5] drm/i915: Allow user to set cache at BO creation fei.yang
2023-04-26  6:24 ` [Intel-gfx] [PATCH v2 1/5] drm/i915: preparation for using PAT index fei.yang
2023-04-26  6:24 ` [Intel-gfx] [PATCH v2 2/5] drm/i915: use pat_index instead of cache_level fei.yang
2023-04-26  6:24 ` [Intel-gfx] [PATCH v2 3/5] drm/i915: make sure correct pte encode is used fei.yang
2023-04-26  6:24 ` [Intel-gfx] [PATCH v2 4/5] drm/i915/mtl: end support for set caching ioctl fei.yang
2023-04-26  6:24 ` [Intel-gfx] [PATCH v2 5/5] drm/i915: Allow user to set cache at BO creation fei.yang
2023-04-26  7:42 ` [Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Allow user to set cache at BO creation (rev2) Patchwork
2023-04-26  7:53 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2023-04-26 10:38 ` [Intel-gfx] [PATCH v2 0/5] drm/i915: Allow user to set cache at BO creation Tvrtko Ursulin
2023-04-26 15:41   ` Yang, Fei
2023-04-27 14:33     ` Tvrtko Ursulin [this message]
2023-04-27 16:07       ` Yang, Fei
2023-04-28  9:43         ` Tvrtko Ursulin
2023-04-28 19:51           ` Yang, Fei

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=7d5d497d-b552-d8d9-e58c-20f4b0ded76c@linux.intel.com \
    --to=tvrtko.ursulin@linux.intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=fei.yang@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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