Re: [RFC 2/2] drm/i915: Remove PAT hack from i915_gem_object_can_bypass_llc

2023-07-17 Thread Tvrtko Ursulin
On 15/07/2023 01:20, Matt Roper wrote: On Fri, Jul 14, 2023 at 11:11:30AM +0100, Tvrtko Ursulin wrote: On 14/07/2023 06:43, Yang, Fei wrote: From: Tvrtko Ursulin According to the comment in i915_gem_object_can_bypass_llc the purpose of the function is to return false if the platform

Re: [RFC 2/2] drm/i915: Remove PAT hack from i915_gem_object_can_bypass_llc

2023-07-14 Thread Tvrtko Ursulin
On 14/07/2023 06:43, Yang, Fei wrote: From: Tvrtko Ursulin According to the comment in i915_gem_object_can_bypass_llc the purpose of the function is to return false if the platform/object has a caching mode where GPU can bypass the LLC. So far the only platforms which allegedly can do

Re: [RFC 1/2] drm/i915: Refactor PAT/object cache handling

2023-07-14 Thread Tvrtko Ursulin
On 14/07/2023 06:36, Yang, Fei wrote: [snip] @@ -326,10 +330,10 @@ int i915_gem_get_caching_ioctl(struct drm_device *dev, void *data, goto out; } - if (i915_gem_object_has_cache_level(obj, I915_CACHE_LLC) || - i915_gem_object_has_cache_level(obj,

Re: [Freedreno] [PATCH RFC v1 00/52] drm/crtc: Rename struct drm_crtc::dev to drm_dev

2023-07-14 Thread Tvrtko Ursulin
On 13/07/2023 16:09, Thomas Zimmermann wrote: Hi Am 13.07.23 um 16:41 schrieb Sean Paul: On Thu, Jul 13, 2023 at 9:04 AM Uwe Kleine-König wrote: hello Sean, On Wed, Jul 12, 2023 at 02:31:02PM -0400, Sean Paul wrote: I'd really prefer this patch (series or single) is not accepted. This

[RFC 1/2] drm/i915: Refactor PAT/object cache handling

2023-07-13 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

[RFC 2/2] drm/i915: Remove PAT hack from i915_gem_object_can_bypass_llc

2023-07-13 Thread Tvrtko Ursulin
From: Tvrtko Ursulin According to the comment in i915_gem_object_can_bypass_llc the purpose of the function is to return false if the platform/object has a caching mode where GPU can bypass the LLC. So far the only platforms which allegedly can do this are Jasperlake and Elkhartlake

Re: [Intel-gfx] [PATCH v4] drm/i915/selftest/gsc: Ensure GSC Proxy init completes before selftests

2023-07-13 Thread Tvrtko Ursulin
On 12/07/2023 18:49, Teres Alexis, Alan Previn wrote: On Wed, 2023-07-12 at 10:19 +0100, Tvrtko Ursulin wrote: On 11/07/2023 23:02, Alan Previn wrote: On MTL, if the GSC Proxy init flows haven't completed, submissions to the GSC engine will fail. Those init flows are dependent on the mei's

[PULL] drm-intel-fixes

2023-07-13 Thread Tvrtko Ursulin
buffer boundary when zeroing out reports [perf] (Umesh Nerlige Ramappa) - Remove dead code from gen8_pte_encode (Tvrtko Ursulin) - Fix one wrong caching mode enum usage (Tvrtko Ursulin) The following changes since commit 06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5: Linux 6.5-rc1 (2023-07-09 13:53:13

[PATCH 17/17] drm/i915: Wire up to the drm cgroup memory stats

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Simply refactor the existing helpers which collate the data for fdinfo and share them with thin drm cgroup controller callbacks. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_driver.c | 4 + drivers/gpu/drm/i915/i915_drm_client.c | 183

[PATCH 16/17] cgroup/drm: Expose memory stats

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin With a few DRM drivers exposing per client memory stats via the fdinfo interface already, we can add support for exposing the same data (albeit aggregated for cgroup hierarchies) via the drm cgroup controller. Add some driver callbacks and controller code to use them

[PATCH 15/17] cgroup/drm: Expose GPU utilisation

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To support container use cases where external orchestrators want to make deployment and migration decisions based on GPU load and capacity, we can expose the GPU load as seen by the controller in a new drm.active_us field. This field contains a monotonic cumulative time

[PATCH 14/17] drm/i915: Implement cgroup controller over budget throttling

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin When notified by the drm core we are over our allotted time budget, i915 instance will check if any of the GPU engines it is reponsible for is fully saturated. If it is, and the client in question is using that engine, it will throttle it. For now throttling is done

[PATCH 12/17] cgroup/drm: Introduce weight based drm cgroup control

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Similar to CPU scheduling, implement a concept of weight in the drm cgroup controller. Uses the same range and default as the CPU controller - CGROUP_WEIGHT_MIN, CGROUP_WEIGHT_DFL and CGROUP_WEIGHT_MAX. Later each cgroup is assigned a time budget proportionaly based

[PATCH 10/17] drm/cgroup: Add over budget signalling callback

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Add a new callback via which the drm cgroup controller is notifying the drm core that a certain process is above its allotted GPU time. Signed-off-by: Tvrtko Ursulin --- include/drm/drm_drv.h | 8 kernel/cgroup/drm.c | 16 2 files changed, 24

[PATCH 13/17] drm/i915: Wire up with drm controller GPU time query

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Implement the drm_cgroup_ops->active_time_us callback. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_driver.c | 8 ++ drivers/gpu/drm/i915/i915_drm_client.c | 116 ++--- drivers/gpu/drm/i915/i915_drm_client.h | 2 + 3 fi

[PATCH 11/17] drm/cgroup: Only track clients which are providing drm_cgroup_ops

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To reduce the number of tracking going on, especially with drivers which will not support any sort of control from the drm cgroup controller side, lets express the funcionality as opt-in and use the presence of drm_cgroup_ops as activation criteria. Signed-off-by: Tvrtko

[PATCH 09/17] drm/cgroup: Add ability to query drm cgroup GPU time

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Add a driver callback and core helper which allow querying the time spent on GPUs for processes belonging to a group. Signed-off-by: Tvrtko Ursulin --- include/drm/drm_drv.h | 28 kernel/cgroup/drm.c | 20 2 files

[PATCH 08/17] drm/cgroup: Track DRM clients per cgroup

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable propagation of settings from the cgroup DRM controller to DRM and vice-versa, we need to start tracking to which cgroups DRM clients belong. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/drm_file.c | 6 include/drm/drm_file.h | 6 include

[PATCH 07/17] cgroup: Add the DRM cgroup controller

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Skeleton controller without any functionality. Signed-off-by: Tvrtko Ursulin --- include/linux/cgroup_drm.h| 9 ++ include/linux/cgroup_subsys.h | 4 +++ init/Kconfig | 7 kernel/cgroup/Makefile| 1 + kernel/cgroup/drm.c

[PATCH 02/17] drm/i915: Record which client owns a VM

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11

[PATCH 06/17] drm: Update file owner during use

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin With the typical model where the display server opens the file descriptor and then hands it over to the client(*), we were showing stale data in debugfs. Fix it by updating the drm_file->pid on ioctl access from a different process. The field is also made RCU protec

[PATCH 05/17] drm/i915: Implement fdinfo memory stats printing

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH 03/17] drm/i915: Track page table backing store usage

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt

[PATCH 04/17] drm/i915: Account ring buffer and context state storage

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin Reviewed-by: Aravind Iddamsetty --- drivers/gpu/drm/i915/gt/intel_context.c | 14 ++ drivers/gpu/drm/i915/i915_drm_client.c | 10

[PATCH 01/17] drm/i915: Add ability for tracking buffer objects per client

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per client lock and to support delayed destruction (post client exit) we make tracked objects hold

[RFC v5 00/17] DRM cgroup controller with scheduling control and memory stats

2023-07-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin This series contains a proposal for a DRM cgroup controller which implements a weight based hierarchical GPU usage budget based controller similar in concept to some of the existing controllers and also exposes GPU memory usage as a read- only field. Motivation mostly comes

Re: [Intel-gfx] [PATCH v4] drm/i915/selftest/gsc: Ensure GSC Proxy init completes before selftests

2023-07-12 Thread Tvrtko Ursulin
On 11/07/2023 23:02, Alan Previn wrote: On MTL, if the GSC Proxy init flows haven't completed, submissions to the GSC engine will fail. Those init flows are dependent on the mei's gsc_proxy component that is loaded in parallel with i915 and a worker that could potentially start after i915

Re: [Intel-gfx] [PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-07-11 Thread Tvrtko Ursulin
On 11/07/2023 10:29, Iddamsetty, Aravind wrote: On 07-07-2023 18:32, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 13

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-11 Thread Tvrtko Ursulin
On 11/07/2023 08:48, Iddamsetty, Aravind wrote: On 10-07-2023 18:50, Tvrtko Ursulin wrote: On 10/07/2023 11:44, Iddamsetty, Aravind wrote: On 07-07-2023 18:32, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-10 Thread Tvrtko Ursulin
On 10/07/2023 11:44, Iddamsetty, Aravind wrote: On 07-07-2023 18:32, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per

Re: [Intel-gfx] [PATCH] drm/i915: Remove dead code from gen8_pte_encode

2023-07-10 Thread Tvrtko Ursulin
On 07/07/2023 15:17, Rodrigo Vivi wrote: On Fri, Jul 07, 2023 at 01:46:44PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") added a dedicated gen12_pte_encode but forgot to remove the Gen12 specifi

Re: [Intel-gfx] [PATCH] drm/i915: Fix one wrong caching mode enum usage

2023-07-10 Thread Tvrtko Ursulin
On 07/07/2023 14:23, Upadhyay, Tejas wrote: -Original Message- From: Intel-gfx On Behalf Of Tvrtko Ursulin Sent: Friday, July 7, 2023 6:25 PM To: intel-...@lists.freedesktop.org; dri-devel@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: Fix one wrong caching mode enum

[PATCH 3/5] drm/i915: Track page table backing store usage

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt

[PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 13 + drivers/gpu/drm/i915/i915_drm_client.c | 10 ++ drivers/gpu/drm/i915

[PATCH v5 0/5] fdinfo memory stats

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin I added tracking of most classes of objects which contribute to client's memory footprint and accouting along the similar lines as in Rob's msm code. Then printing it out to fdinfo using the drm helper Rob added. Accounting by keeping per client lists may not be the most

[PATCH 5/5] drm/i915: Implement fdinfo memory stats printing

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per client lock and to support delayed destruction (post client exit) we make tracked objects hold

[PATCH 2/5] drm/i915: Record which client owns a VM

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 --- drivers/gpu/drm/i915

[PATCH] drm/i915: Fix one wrong caching mode enum usage

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit a4d86249c773 ("drm/i915/gt: Provide a utility to create a scratch buffer") mistakenly passed in uapi I915_CACHING_CACHED as argument to i915_gem_object_set_cache_coherency(), which actually takes internal enum i915_cache_level. No functional issue since

[PATCH] drm/i915: Remove dead code from gen8_pte_encode

2023-07-07 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") added a dedicated gen12_pte_encode but forgot to remove the Gen12 specific bit from gen8_pte_encode. Signed-off-by: Tvrtko Ursulin Fixes: 9275277d5324 ("drm/i915: use pat_index instead

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

2023-07-06 Thread Tvrtko Ursulin
On 05/07/2023 01:09, Yang, Fei wrote: >>> From: Tvrtko Ursulin >>> >>> Informal commit message for now. >>> >>> I got a bit impatient and curious to see if the idea we discussed would >>> work so sketched something out. I think it is

Re: [PATCH] drm/i915: Remove some dead "code"

2023-07-06 Thread Tvrtko Ursulin
On 05/07/2023 13:08, Jani Nikula wrote: On Wed, 05 Jul 2023, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Commit 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset") removed the temporary implementation of a reset under stop machine but forgot

[PULL] drm-intel-next-fixes

2023-07-06 Thread Tvrtko Ursulin
Hi Dave, Daniel, A weekly collection of fixes for the drm-next/6.5 merge window. Mostly small display fixups, one for GuC/SLPC and one header file tidy. I see last week did not get pulled so this week contains those ones plus two more fixups - one code tidy actually and one fixup. Regards,

[PATCH] drm/i915: Remove some dead "code"

2023-07-05 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit 2caffbf11762 ("drm/i915: Revoke mmaps and prevent access to fence registers across reset") removed the temporary implementation of a reset under stop machine but forgot to remove this one commented out define. Signed-off-by: Tvrtko Ursulin --- drivers/gp

[PATCH] drm/i915: Do not disable preemption for resets

2023-07-05 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit ade8a0f59844 ("drm/i915: Make all GPU resets atomic") added a preempt disable section over the hardware reset callback to prepare the driver for being able to reset from atomic contexts. In retrospect I can see that the work item at a time was abou

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

2023-07-03 Thread Tvrtko Ursulin
On 30/06/2023 07:55, Yang, Fei wrote: > From: Tvrtko Ursulin > > Informal commit message for now. > > I got a bit impatient and curious to see if the idea we discussed would > work so sketched something out. I think it is what I was describing back > then.. &g

Re: [Intel-gfx] [PATCH v3] drm/i915/selftest/gsc: Ensure GSC Proxy init completes before selftests

2023-06-29 Thread Tvrtko Ursulin
On 29/06/2023 21:42, Alan Previn wrote: On MTL, if the GSC Proxy init flows haven't completed, submissions to the GSC engine will fail. Those init flows are dependent on the mei's gsc_proxy component that is loaded in parallel with i915 and a worker that could potentially start after i915

[PATCH v2] drm/i915: Refactor PAT/cache handling

2023-06-29 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Informal commit message for now. I got a bit impatient and curious to see if the idea we discussed would work so sketched something out. I think it is what I was describing back then.. So high level idea is to teach the driver what caching modes are hidden behind PAT

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

2023-06-29 Thread Tvrtko Ursulin
On 29/06/2023 06:39, Yang, Fei wrote: > From: Tvrtko Ursulin > > Informal commit message for now. > > I got a bit impatient and curious to see if the idea we discussed would > work so sketched something out. I think it is what I was describing back > then

[PULL] drm-intel-next-fixes

2023-06-29 Thread Tvrtko Ursulin
Hi Dave, Daniel, A weekly collection of fixes for the drm-next/6.5 merge window. Mostly small display fixups, one for GuC/SLPC and one header file tidy. Regards, Tvrtko drm-intel-next-fixes-2023-06-29: - Allow DC states along with PW2 only for PWB functionality [adlp+] (Imre Deak) - Fix SSC

[RFC] drm/i915: Refactor PAT/cache handling

2023-06-28 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Informal commit message for now. I got a bit impatient and curious to see if the idea we discussed would work so sketched something out. I think it is what I was describing back then.. So high level idea is to teach the driver what caching modes are hidden behind PAT

Re: [PATCH v8 1/2] drm/i915: preparation for using PAT index

2023-06-27 Thread Tvrtko Ursulin
On 27/06/2023 14:28, Jani Nikula wrote: On Tue, 09 May 2023, fei.y...@intel.com wrote: From: Fei Yang This patch is a preparation for replacing enum i915_cache_level with PAT index. Caching policy for buffer objects is set through the PAT index in PTE, the old i915_cache_level is not

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-26 Thread Tvrtko Ursulin
On 20/06/2023 14:23, Ira Weiny wrote: Sumitra Sharma wrote: On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-22 Thread Tvrtko Ursulin
On 21/06/2023 19:51, Thomas Hellström (Intel) wrote: On 6/21/23 18:35, Ira Weiny wrote: Thomas Hellström (Intel) wrote: I think one thing worth mentioning in the context of this patch is that IIRC kmap_local_page() will block offlining of the mapping CPU until kunmap_local(), so while I

[PULL] drm-intel-next-fixes

2023-06-21 Thread Tvrtko Ursulin
Hi Dave, Daniel, A weekly collection of fixes for the drm-next/6.5 merge window: One fix for incorrect error handling in the frame buffer mmap callback, HuC init error handling fix, missing wakeref during GSC init and a build fix when !CONFIG_PROC_FS. Regards, Tvrtko

[PATCH v2] drm: Update file owner during use

2023-06-21 Thread Tvrtko Ursulin
From: Tvrtko Ursulin With the typical model where the display server opens the file descriptor and then hands it over to the client(*), we were showing stale data in debugfs. Fix it by updating the drm_file->pid on ioctl access from a different process. The field is also made RCU protec

Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again

2023-06-19 Thread Tvrtko Ursulin
On 16/06/2023 12:17, Tvrtko Ursulin wrote: On 16/06/2023 11:16, Andi Shyti wrote: Hi Arnd, On Fri, Jun 16, 2023 at 11:31:47AM +0200, Arnd Bergmann wrote: From: Arnd Bergmann The function is only defined if CONFIG_PROC_FS is enabled: ld.lld: error: undefined symbol

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Tvrtko Ursulin
On 19/06/2023 08:59, Thomas Hellström (Intel) wrote: On 6/18/23 20:11, Ira Weiny wrote: Sumitra Sharma wrote: kmap() has been deprecated in favor of the kmap_local_page() due to high cost, restricted mapping space, the overhead of a global lock for synchronization, and making the process

Re: [PATCH] drm/i915: make i915_drm_client_fdinfo() reference conditional again

2023-06-16 Thread Tvrtko Ursulin
On 16/06/2023 11:16, Andi Shyti wrote: Hi Arnd, On Fri, Jun 16, 2023 at 11:31:47AM +0200, Arnd Bergmann wrote: From: Arnd Bergmann The function is only defined if CONFIG_PROC_FS is enabled: ld.lld: error: undefined symbol: i915_drm_client_fdinfo referenced by i915_driver.c

Re: [PATCH] drm/i915: Call page_address() on page acquired with GFP_KERNEL flag

2023-06-14 Thread Tvrtko Ursulin
On 14/06/2023 13:35, Sumitra Sharma wrote: Pages allocated with GFP_KERNEL cannot come from Highmem. That is why there is no need to call kmap() on them. Are you sure it is GFP_KERNEL backed and not tmpfs? I am not sure myself so let me copy Matt and Thomas if they happen to know off hand.

[PATCH 5/5] drm/i915: Implement fdinfo memory stats printing

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_context.c | 8 drivers/gpu/drm/i915/i915_drm_client.c | 10 ++ drivers/gpu/drm/i915

[PATCH 3/5] drm/i915: Track page table backing store usage

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt

[PATCH 2/5] drm/i915: Record which client owns a VM

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 --- drivers/gpu/drm/i915

[PATCH 1/5] drm/i915: Add ability for tracking buffer objects per client

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets add some infrastructure which enables tracking buffer objects owned by clients. We add a per client list protected by a new per client lock and to support delayed destruction (post client exit) we make tracked objects hold

[PATCH v4 0/5] fdinfo memory stats

2023-06-12 Thread Tvrtko Ursulin
From: Tvrtko Ursulin I added tracking of most classes of objects which contribute to client's memory footprint and accouting along the similar lines as in Rob's msm code. Then printing it out to fdinfo using the drm helper Rob added. Accounting by keeping per client lists may not be the most

Re: [PATCH 6/8] drm: Add drm_gem_prime_fd_to_handle_obj

2023-06-12 Thread Tvrtko Ursulin
On 09/06/2023 18:09, Rob Clark wrote: On Fri, Jun 9, 2023 at 7:12 AM Tvrtko Ursulin wrote: On 09/06/2023 13:44, Iddamsetty, Aravind wrote: On 09-06-2023 17:41, Tvrtko Ursulin wrote: From: Tvrtko Ursulin I need a new flavour of the drm_gem_prime_fd_to_handle helper, one which

Re: [PATCH 6/8] drm: Add drm_gem_prime_fd_to_handle_obj

2023-06-09 Thread Tvrtko Ursulin
On 09/06/2023 13:44, Iddamsetty, Aravind wrote: On 09-06-2023 17:41, Tvrtko Ursulin wrote: From: Tvrtko Ursulin I need a new flavour of the drm_gem_prime_fd_to_handle helper, one which will return a reference to a newly created GEM objects (if created), in order to enable tracking

Re: [PATCH] dma-fence: Bypass signaling annotation from dma_fence_is_signaled

2023-06-09 Thread Tvrtko Ursulin
On 09/06/2023 13:52, Christian König wrote: Am 09.06.23 um 14:09 schrieb Tvrtko Ursulin: On 09/06/2023 07:32, Christian König wrote: Am 08.06.23 um 16:30 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin For dma_fence_is_signaled signaling critical path annotations are an annoying cause

[PATCH 8/8] drm/i915: Implement fdinfo memory stats printing

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH 6/8] drm: Add drm_gem_prime_fd_to_handle_obj

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin I need a new flavour of the drm_gem_prime_fd_to_handle helper, one which will return a reference to a newly created GEM objects (if created), in order to enable tracking of imported i915 GEM objects in the following patch. Minor code reshuffule and only trivial additions

[PATCH 7/8] drm/i915: Track imported dma-buf objects in memory stats

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin We want to be able to show memory usage of imported dma-buf opjects in the fdinfo stats. To achieve this we wrap drm_gem_prime_fd_to_handle(_obj) in i915_gem_prime_fd_to_handle and append some client management at the end. Signed-off-by: Tvrtko Ursulin Cc: Aravind

[PATCH 4/8] drm/i915: Track page table backing store usage

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt

[PATCH 5/8] drm/i915: Account ring buffer and context state storage

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 ++ drivers/gpu/drm/i915/i915_drm_client.c | 10 ++ drivers/gpu/drm/i915

[PATCH 2/8] drm/i915: Track buffer objects belonging to clients

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets start tracking which objects belong to which clients. We start with objects explicitly created by object creation UAPI and track it on a new per client lists, protected by a new per client lock. In order for delayed destruction

[PATCH 3/8] drm/i915: Record which clients own a VM

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 --- drivers/gpu/drm/i915

[PATCH 1/8] dma-fence: Bypass signaling annotation from dma_fence_is_signaled

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin For dma_fence_is_signaled signaling critical path annotations are an annoying cause of false positives when using dma_fence_is_signaled and indirectly higher level helpers such as dma_resv_test_signaled etc. Drop the critical path annotation since the "is signaled"

[PATCH v3 0/8] fdinfo memory stats

2023-06-09 Thread Tvrtko Ursulin
From: Tvrtko Ursulin I added tracking of most classes of objects which contribute to client's memory footprint and accouting along the similar lines as in Rob's msm code. Then printing it out to fdinfo using the drm helper Rob added. Accounting by keeping per client lists may not be the most

Re: [PATCH] dma-fence: Bypass signaling annotation from dma_fence_is_signaled

2023-06-09 Thread Tvrtko Ursulin
On 09/06/2023 07:32, Christian König wrote: Am 08.06.23 um 16:30 schrieb Tvrtko Ursulin: From: Tvrtko Ursulin For dma_fence_is_signaled signaling critical path annotations are an annoying cause of false positives when using dma_fence_is_signaled and indirectly higher level helpers

Re: [Intel-gfx] [PATCH 1/5] drm/i915: Track buffer objects belonging to clients

2023-06-09 Thread Tvrtko Ursulin
On 09/06/2023 05:16, Iddamsetty, Aravind wrote: On 08-06-2023 20:21, Tvrtko Ursulin wrote: From: Tvrtko Ursulin In order to show per client memory usage lets start tracking which objects belong to which clients. We start with objects explicitly created by object creation UAPI and track

[PULL] drm-intel-gt-next

2023-06-08 Thread Tvrtko Ursulin
in gmch_ggtt_insert_{entries, page}() (Nathan Chancellor) - Fix size_t format specifier in gsccs_send_message() (Nathan Chancellor) - Use the fdinfo helper (Tvrtko Ursulin) - Add some missing error propagation (Tvrtko Ursulin) - Reduce I915_MAX_GT to 2 (Matt Atwood) - Rename I915_PMU_MAX_GTS to I915_PMU_MAX_GT (Matt

[PATCH 5/5] drm/i915: Implement fdinfo memory stats printing

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH 4/5] drm/i915: Account ring buffer and context state storage

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account ring buffers and logical context space against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 6 ++ drivers/gpu/drm/i915/i915_drm_client.c | 10 ++ drivers/gpu/drm/i915

[PATCH 3/5] drm/i915: Track page table backing store usage

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Account page table backing store against the owning client memory usage stats. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_gtt.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gtt.c b/drivers/gpu/drm/i915/gt

[PATCH 1/5] drm/i915: Track buffer objects belonging to clients

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin In order to show per client memory usage lets start tracking which objects belong to which clients. We start with objects explicitly created by object creation UAPI and track it on a new per client lists, protected by a new per client lock. In order for delayed destruction

[PATCH v2 0/5] fdinfo memory stats

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Second try, this time actually per client! :) I added tracking of most classes of objects which contribute to clients memory footprint and accouting along the similar lines as in Rob's msm code. Then printing it out to fdinfo using the drm helper Rob added. Example fdinfo

[PATCH 2/5] drm/i915: Record which clients own a VM

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin To enable accounting of indirect client memory usage (such as page tables) in the following patch, lets start recording the creator of each PPGTT. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 --- drivers/gpu/drm/i915

[PATCH] dma-fence: Bypass signaling annotation from dma_fence_is_signaled

2023-06-08 Thread Tvrtko Ursulin
From: Tvrtko Ursulin For dma_fence_is_signaled signaling critical path annotations are an annoying cause of false positives when using dma_fence_is_signaled and indirectly higher level helpers such as dma_resv_test_signaled etc. Drop the critical path annotation since the "is signaled"

Re: [RFC 02/10] drm: Update file owner during use

2023-06-08 Thread Tvrtko Ursulin
On 21/04/2023 13:13, Emil Velikov wrote: Greetings everyone, Above all - hell yeah. Thank you Tvrtko, this has been annoying the hell out of me for ages. Yay! On Tue, 14 Mar 2023 at 14:19, Tvrtko Ursulin wrote: From: Tvrtko Ursulin With the typical model where the display server

Re: [Intel-gfx] [PATCH] drm/i915: Implement fdinfo memory stats printing

2023-06-06 Thread Tvrtko Ursulin
On 06/06/2023 10:47, Tvrtko Ursulin wrote: On 05/06/2023 23:22, Andi Shyti wrote: Hi Tvrtko, On Mon, Jun 05, 2023 at 03:37:20PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver

Re: [PATCH v17 1/1] drm/i915: Allow user to set cache at BO creation

2023-06-06 Thread Tvrtko Ursulin
Acked-by: Jordan Justen Tested-by: Jordan Justen Acked-by: Carl Zhang Tested-by: Lihao Gu Signed-off-by: Andi Shyti Acked-by: Tvrtko Ursulin Regards, Tvrtko --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 40 + drivers/gpu/drm/i915/gem/i915_gem_object.c | 6

Re: [Intel-gfx] [PATCH] drm/i915: Implement fdinfo memory stats printing

2023-06-06 Thread Tvrtko Ursulin
On 05/06/2023 23:22, Andi Shyti wrote: Hi Tvrtko, On Mon, Jun 05, 2023 at 03:37:20PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we

Re: [PATCH] drm/i915/selftests: Add some missing error propagation

2023-06-06 Thread Tvrtko Ursulin
. which I did :/ But I guess you are right and it's not necessary. Signed-off-by: Tvrtko Ursulin Reported-by: Dan Carpenter Cc: Andi Shyti --- .../gpu/drm/i915/gem/selftests/i915_gem_context.c | 14 ++ 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

Re: [Intel-gfx] [PATCH] drm/i915: Use the fdinfo helper

2023-06-06 Thread Tvrtko Ursulin
On 05/06/2023 23:07, Andi Shyti wrote: Hi Tvrtko, On Mon, Jun 05, 2023 at 01:32:24PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Use the common fdinfo helper for printing the basics. Remove now unused client id allocation code. Signed-off-by: Tvrtko Ursulin Cc: Rob Clark looks

Re: [PATCH] drm/i915/selftests: Add some missing error propagation

2023-06-05 Thread Tvrtko Ursulin
On 05/06/2023 14:43, Dan Carpenter wrote: On Mon, Jun 05, 2023 at 02:11:35PM +0100, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Add some missing error propagation in live_parallel_switch. To avoid needlessly burdening the various backport processes, note I am not marking it as a fix against

[PATCH] drm/i915: Implement fdinfo memory stats printing

2023-06-05 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the newly added drm_print_memory_stats helper to show memory utilisation of our objects in drm/driver specific fdinfo output. To collect the stats we walk the per memory regions object lists and accumulate object size into the respective drm_memory_stats categories

[PATCH] drm/i915/selftests: Add some missing error propagation

2023-06-05 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Add some missing error propagation in live_parallel_switch. To avoid needlessly burdening the various backport processes, note I am not marking it as a fix against any patches and not copying stable since it is debug/selftests only code. Signed-off-by: Tvrtko Ursulin

[PATCH] drm/i915: Use the fdinfo helper

2023-06-05 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Use the common fdinfo helper for printing the basics. Remove now unused client id allocation code. Signed-off-by: Tvrtko Ursulin Cc: Rob Clark --- drivers/gpu/drm/i915/i915_driver.c | 6 +-- drivers/gpu/drm/i915/i915_drm_client.c | 65

Re: [Intel-gfx] [PATCH v15 0/1] drm/i915: Allow user to set cache at BO creation

2023-06-05 Thread Tvrtko Ursulin
On 05/06/2023 09:53, Tvrtko Ursulin wrote: On 31/05/2023 18:10, fei.y...@intel.com wrote: From: Fei Yang This series introduce a new extension for GEM_CREATE, 1. end support for set caching ioctl [PATCH 1/2] 2. add set_pat extension for gem_create [PATCH 2/2] v2: drop one patch

Re: [Intel-gfx] [PATCH v15 1/1] drm/i915: Allow user to set cache at BO creation

2023-06-05 Thread Tvrtko Ursulin
On 31/05/2023 18:10, fei.y...@intel.com wrote: From: Fei Yang To comply with the design that buffer objects shall have immutable cache setting through out their life cycle, {set, get}_caching ioctl's are no longer supported from MTL onward. With that change caching policy can only be set at

<    1   2   3   4   5   6   7   8   9   10   >