Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-21 Thread Matt Roper
On Thu, Jul 20, 2023 at 09:28:56PM -0700, Yang, Fei wrote: > >>> [snip] > > @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct > > drm_i915_gem_object *obj) > > The code change here looks accurate, but while we're here, I have a > side question about this function

Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-21 Thread Tvrtko Ursulin
On 21/07/2023 05:28, Yang, Fei wrote: [snip] @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) The code change here looks accurate, but while we're here, I have a side question about this function in general...it was originally introduced in commit

RE: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-20 Thread Yang, Fei
>>> [snip] > @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct > drm_i915_gem_object *obj) The code change here looks accurate, but while we're here, I have a side question about this function in general...it was originally introduced in commit 48004881f693

Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-20 Thread Tvrtko Ursulin
[Here let me just focus on the points which did not get further discussion in follow ups yet.] On 19/07/2023 23:31, Matt Roper wrote: On Wed, Jul 19, 2023 at 01:37:30PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level")

Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-20 Thread Tvrtko Ursulin
On 20/07/2023 01:22, Matt Roper wrote: On Wed, Jul 19, 2023 at 05:07:15PM -0700, Yang, Fei wrote: [snip] @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct drm_i915_gem_object *obj) The code change here looks accurate, but while we're here, I have a side question about this

Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-19 Thread Matt Roper
On Wed, Jul 19, 2023 at 05:07:15PM -0700, Yang, Fei wrote: > [snip] > >> @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct > >> drm_i915_gem_object *obj) > > > > The code change here looks accurate, but while we're here, I have a side > > question about this function in general...it

RE: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-19 Thread Yang, Fei
[snip] >> @@ -27,15 +28,8 @@ static bool gpu_write_needs_clflush(struct >> drm_i915_gem_object *obj) > > The code change here looks accurate, but while we're here, I have a side > question about this function in general...it was originally introduced > in commit 48004881f693 ("drm/i915: Mark CPU

Re: [PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-19 Thread Matt Roper
On Wed, Jul 19, 2023 at 01:37:30PM +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

[PATCH v3] drm/i915: Refactor PAT/object cache handling

2023-07-19 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 questionable design decisions which this patch tries to improve