Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Matt Roper
On Fri, Jul 28, 2023 at 01:39:06PM +0100, Tvrtko Ursulin wrote: > > Forgot one part of your reply: > > On 28/07/2023 00:57, Matt Roper wrote: > > On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: > > > From: Tvrtko Ursulin > > > > > > Commit 9275277d5324 ("drm/i915: use pat_index

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Tvrtko Ursulin
On 28/07/2023 08:14, Yang, Fei wrote: [snip] @@ -41,14 +42,17 @@ static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) return false; /* - * For objects created by userspace through GEM_CREATE with pat_index - * set by set_pat extension, i915_gem

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Tvrtko Ursulin
Forgot one part of your reply: On 28/07/2023 00:57, Matt Roper wrote: On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 internal APIs, partially repla

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Tvrtko Ursulin
On 28/07/2023 01:17, Matt Roper wrote: On Thu, Jul 27, 2023 at 04:57:53PM -0700, Matt Roper wrote: On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 i

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Tvrtko Ursulin
On 28/07/2023 00:57, Matt Roper wrote: On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 internal APIs, partially replacing the usage of driver interna

RE: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-28 Thread Yang, Fei
[snip] > @@ -41,14 +42,17 @@ static bool gpu_write_needs_clflush(struct > drm_i915_gem_object *obj) > return false; > > /* > - * For objects created by userspace through GEM_CREATE with pat_index > - * set by set_pat extension, i915_gem_object_has_cache_level() will >

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 04:57:53PM -0700, Matt Roper wrote: > On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin > > > > Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has > > introduced PAT indices to i915 internal APIs, partially rep

Re: [RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Matt Roper
On Thu, Jul 27, 2023 at 03:55:00PM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has > introduced PAT indices to i915 internal APIs, partially replacing the > usage of driver internal cache_level, but has also added

[RFC 4/8] drm/i915: Refactor PAT/object cache handling

2023-07-27 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 internal APIs, partially replacing the usage of driver internal cache_level, but has also added a few sub- optimal design decisions which this patch tries to improve upon