Re: [PATCH] drm/amdgpu: fix a compiling error in old kernels

2022-09-26 Thread Christian König
Am 27.09.22 um 05:37 schrieb Asher Song: This patch is used to fix following compiling error that occurs in some old kernels. error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) { Signed-off-by: Asher Song Reviewed-b

Re: [PATCH v3 5/5] drm/amdgpu: switch workload context to/from compute

2022-09-26 Thread Christian König
Am 26.09.22 um 23:40 schrieb Shashank Sharma: This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Feel free to add my acked-by, but Felix should probably take a look as well. Christian.

Re: [PATCH v3 4/5] drm/amdgpu: switch GPU workload profile

2022-09-26 Thread Christian König
Am 26.09.22 um 23:40 schrieb Shashank Sharma: This patch and switches the GPU workload based profile based on the workload hint information saved in the workload context. The workload profile is reset to NONE when the job is done. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma Re

Re: [PATCH v3 3/5] drm/amdgpu: set GPU workload via ctx IOCTL

2022-09-26 Thread Christian König
Am 26.09.22 um 23:40 schrieb Shashank Sharma: This patch adds new IOCTL flags in amdgpu_context_IOCTL to set GPU workload profile. These calls will allow a user to switch to a GPU power profile which might be better suitable to its workload type. The currently supported workload types are: "

Re: [PATCH v3 2/5] drm/amdgpu: add new functions to set GPU power profile

2022-09-26 Thread Christian König
Am 26.09.22 um 23:40 schrieb Shashank Sharma: This patch adds new functions which will allow a user to change the GPU power profile based a GPU workload hint flag. Cc: Alex Deucher Signed-off-by: Shashank Sharma Alex needs to take a closer look at this stuff, but feel free to add my acked-b

Re: [PATCH v3 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Christian König
Am 26.09.22 um 23:40 schrieb Shashank Sharma: Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for improved performance. V3: Create only set() workload UAPI (Christian) Signed-off-by: Alex Deucher Signed-off-by:

Re: [PATCH 4/4] drm/amdgpu: MCBP based on DRM scheduler (v6)

2022-09-26 Thread Christian König
Hey Michel, JIadong is working on exposing high/low priority gfx queues for gfx9 and older hw generations by using mid command buffer preemption. I know that you have been working on Gnome Mutter to make use from userspace for this. Do you have time to run some tests with that? Thanks, Chri

RE: [PATCH] drm/amdgpu: fix a compiling error in old kernels

2022-09-26 Thread Chen, Guchun
Reviewed-by: Guchun Chen Regards, Guchun -Original Message- From: Song, Asher Sent: Tuesday, September 27, 2022 11:38 AM To: Chen, Guchun ; Cui, Flora ; Shi, Leslie ; Ma, Jun ; amd-gfx@lists.freedesktop.org Cc: Song, Asher Subject: [PATCH] drm/amdgpu: fix a compiling error in old ke

[PATCH] drm/amdgpu: fix a compiling error in old kernels

2022-09-26 Thread Asher Song
This patch is used to fix following compiling error that occurs in some old kernels. error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) { Signed-off-by: Asher Song --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c

RE: [PATCH 4/4] drm/amdgpu: MCBP based on DRM scheduler (v6)

2022-09-26 Thread Zhu, Jiadong
[AMD Official Use Only - General] >I need more time for an in deep review of this, but form the one mile high >view it looks correct to me now. >Can we do some pre-commit qa testing with this? I changed drm test "Command submission Test (GFX)" to send high priority ibs meanwhile running Manhat

RE: [PATCH] drm/amdgpu: add rlc_sr_cntl_list to firmware array

2022-09-26 Thread Gao, Likun
[AMD Official Use Only - General] Reviewed-by: Likun Gao . Regards, Likun -Original Message- From: Zhang, Hawking Sent: Tuesday, September 27, 2022 10:31 AM To: amd-gfx@lists.freedesktop.org; Gao, Likun ; Deucher, Alexander Cc: Zhang, Hawking Subject: [PATCH] drm/amdgpu: add rlc_sr_

RE: [PATCH] drm/amdgpu: make rlc fw loading backward compatible with fw

2022-09-26 Thread Gao, Likun
[AMD Official Use Only - General] Reviewed-by: Likun Gao . Regards, Likun -Original Message- From: Zhang, Hawking Sent: Tuesday, September 27, 2022 10:30 AM To: amd-gfx@lists.freedesktop.org; Gao, Likun ; Deucher, Alexander Cc: Zhang, Hawking Subject: [PATCH] drm/amdgpu: make rlc fw

[PATCH] drm/amdgpu: add rlc_sr_cntl_list to firmware array

2022-09-26 Thread Hawking Zhang
To allow upload the list via psp Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c index 13675b3aa218..792333206362 100644 --- a/d

[PATCH] drm/amdgpu: make rlc fw loading backward compatible with fw

2022-09-26 Thread Hawking Zhang
To allow kernel change drm/amdgpu/gfx10: switch to amdgpu_gfx_rlc_init_microcode backward compatible with old rlc firmware Signed-off-by: Hawking Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_rlc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/a

RE: [PATCH v3 2/5] drm/amdgpu: add new functions to set GPU power profile

2022-09-26 Thread Quan, Evan
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of > Shashank Sharma > Sent: Tuesday, September 27, 2022 5:40 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Somalapuram, > Amaranath ; Koenig, Christian > ; Sharma, Shashank > > Subject

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Felix Kuehling
On 2022-09-26 17:35, Lyude Paul wrote: On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: When the module is unloaded or a GPU is unbound from the module it is possible for device private pages to be left mapped in currently running processes. This leads to a kernel crash when the pages

[PATCH v2] drm/amdkfd: Fix UBSAN shift-out-of-bounds warning

2022-09-26 Thread Felix Kuehling
This was fixed in initialize_cpsch before, but not in initialize_nocpsch. Factor sdma bitmap initialization into a helper function to apply the correct implementation in both cases without duplicating it. v2: Added a range check Reported-by: Ellis Michael Signed-off-by: Felix Kuehling --- .../

Re: [REGRESSION] Graphical issues on Lenovo Yoga 7 14ARB7 laptop since v6.0-rc1 (bisected)

2022-09-26 Thread Leo Li
Hi August, thanks for the log. It seems the eDP panel does not fully satisfy the amdgpu requirements for enabling PSR SU, but we're enabling it anyways. I suspect it may be due to the "DP_FORCE_PSRSU_CAPABILITY" bit being set in it's DPCD registers, I'm checking with some devs to see if that i

Re: [PATCH v3 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-26 Thread Felix Kuehling
On 2022-09-26 15:40, Philip Yang wrote: Unified memory usage with xnack off is tracked to avoid oversubscribe system memory. When switching xnack mode from off to on, subsequent free ranges allocated with xnack off will not unreserve memory when xnack is on, cause memory accounting unbalanced.

Re: [PATCH] drm/amdgpu: Add amdgpu suspend-resume code path under SRIOV

2022-09-26 Thread Alex Deucher
On Mon, Sep 26, 2022 at 4:21 PM Bokun Zhang wrote: > > - Under SRIOV, we need to send REQ_GPU_FINI to the hypervisor > during the suspend time. Furthermore, we cannot request a > mode 1 reset under SRIOV as VF. Therefore, we will skip it > as it is called in suspend_noirq() function. > > - I

[PATCH v3 5/5] drm/amdgpu: switch workload context to/from compute

2022-09-26 Thread Shashank Sharma
This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v3 4/5] drm/amdgpu: switch GPU workload profile

2022-09-26 Thread Shashank Sharma
This patch and switches the GPU workload based profile based on the workload hint information saved in the workload context. The workload profile is reset to NONE when the job is done. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH v3 3/5] drm/amdgpu: set GPU workload via ctx IOCTL

2022-09-26 Thread Shashank Sharma
This patch adds new IOCTL flags in amdgpu_context_IOCTL to set GPU workload profile. These calls will allow a user to switch to a GPU power profile which might be better suitable to its workload type. The currently supported workload types are: "None": Default workload profile "3D": Workloa

[PATCH v3 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Shashank Sharma
Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for improved performance. V3: Create only set() workload UAPI (Christian) Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- include/uapi/drm/amdgpu_dr

[PATCH v3 2/5] drm/amdgpu: add new functions to set GPU power profile

2022-09-26 Thread Shashank Sharma
This patch adds new functions which will allow a user to change the GPU power profile based a GPU workload hint flag. Cc: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_ctx_workload.c | 97 +++

[PATCH v3 0/5] GPU workload hints for better performance

2022-09-26 Thread Shashank Sharma
AMDGPU SOCs supports dynamic workload based power profiles, which can provide fine-tuned performance for a particular type of workload. This patch series adds an interface to set/reset these power profiles based on the workload type hints. A user can set a hint of workload type being submistted to

Re: [PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Lyude Paul
On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: > When the module is unloaded or a GPU is unbound from the module it is > possible for device private pages to be left mapped in currently running > processes. This leads to a kernel crash when the pages are either freed > or accessed from t

Re: [PATCH 5/7] nouveau/dmem: Refactor nouveau_dmem_fault_copy_one()

2022-09-26 Thread Lyude Paul
On Mon, 2022-09-26 at 16:03 +1000, Alistair Popple wrote: > nouveau_dmem_fault_copy_one() is used during handling of CPU faults via > the migrate_to_ram() callback and is used to copy data from GPU to CPU > memory. It is currently specific to fault handling, however a future > patch implementing ev

[PATCH] drm/amdgpu: Add amdgpu suspend-resume code path under SRIOV

2022-09-26 Thread Bokun Zhang
- Under SRIOV, we need to send REQ_GPU_FINI to the hypervisor during the suspend time. Furthermore, we cannot request a mode 1 reset under SRIOV as VF. Therefore, we will skip it as it is called in suspend_noirq() function. - In the resume code path, we need to send REQ_GPU_INIT to the hyp

[PATCH v3 1/1] drm/amdkfd: Track unified memory when switching xnack mode

2022-09-26 Thread Philip Yang
Unified memory usage with xnack off is tracked to avoid oversubscribe system memory. When switching xnack mode from off to on, subsequent free ranges allocated with xnack off will not unreserve memory when xnack is on, cause memory accounting unbalanced. When switching xnack mode from on to off, n

RE: [PATCH] drm/amdkfd: Fix UBSAN shift-out-of-bounds warning

2022-09-26 Thread Sider, Graham
[AMD Official Use Only - General] > -Original Message- > From: amd-gfx On Behalf Of Felix > Kuehling > Sent: Wednesday, September 21, 2022 6:30 PM > To: amd-gfx@lists.freedesktop.org > Cc: Ellis Michael > Subject: [PATCH] drm/amdkfd: Fix UBSAN shift-out-of-bounds warning > > Caution: Th

Re: [PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-26 Thread Jason Gunthorpe
On Mon, Sep 26, 2022 at 04:03:06PM +1000, Alistair Popple wrote: > Since 27674ef6c73f ("mm: remove the extra ZONE_DEVICE struct page > refcount") device private pages have no longer had an extra reference > count when the page is in use. However before handing them back to the > owning device drive

Re: [PATCH v2 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Sharma, Shashank
On 9/26/2022 5:19 PM, Christian König wrote: Am 26.09.22 um 17:14 schrieb Sharma, Shashank: Hello Christian, On 9/26/2022 5:10 PM, Christian König wrote: Am 26.09.22 um 17:02 schrieb Shashank Sharma: Allow the user to specify a workload hint to the kernel. We can use these to tweak the dp

Re: [PATCH v2 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Christian König
Am 26.09.22 um 17:14 schrieb Sharma, Shashank: Hello Christian, On 9/26/2022 5:10 PM, Christian König wrote: Am 26.09.22 um 17:02 schrieb Shashank Sharma: Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for imp

Re: [PATCH v2 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Sharma, Shashank
Hello Christian, On 9/26/2022 5:10 PM, Christian König wrote: Am 26.09.22 um 17:02 schrieb Shashank Sharma: Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for improved performance. Signed-off-by: Alex Deucher

Re: [PATCH v2 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Christian König
Am 26.09.22 um 17:02 schrieb Shashank Sharma: Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for improved performance. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- include/uapi/drm/amdgpu_dr

Re: [PATCH v3] drm/amdgpu: Fix VRAM BO swap issue

2022-09-26 Thread Christian König
Am 26.09.22 um 17:04 schrieb Arunpravin Paneer Selvam: On 9/26/2022 12:01 PM, Christian König wrote: Am 26.09.22 um 07:25 schrieb Arunpravin Paneer Selvam: DRM buddy manager allocates the contiguous memory requests in a single block or multiple blocks. So for the ttm move operation (incase of

Re: [PATCH v3] drm/amdgpu: Fix VRAM BO swap issue

2022-09-26 Thread Arunpravin Paneer Selvam
On 9/26/2022 12:01 PM, Christian König wrote: Am 26.09.22 um 07:25 schrieb Arunpravin Paneer Selvam: DRM buddy manager allocates the contiguous memory requests in a single block or multiple blocks. So for the ttm move operation (incase of low vram memory) we should consider all the blocks to

[PATCH v2 5/5] drm/amdgpu: switch workload context to/from compute

2022-09-26 Thread Shashank Sharma
This patch switches the GPU workload mode to/from compute mode, while submitting compute workload. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c | 14 +++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/driver

[PATCH v2 1/5] drm/amdgpu: add UAPI for workload hints to ctx ioctl

2022-09-26 Thread Shashank Sharma
Allow the user to specify a workload hint to the kernel. We can use these to tweak the dpm heuristics to better match the workload for improved performance. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- include/uapi/drm/amdgpu_drm.h | 18 ++ 1 file changed, 18 i

[PATCH v2 4/5] drm/amdgpu: switch GPU workload profile

2022-09-26 Thread Shashank Sharma
This patch and switches the GPU workload based profile based on the workload hint information saved in the workload context. The workload profile is reset to NONE when the job is done. Signed-off-by: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH v2 2/5] drm/amdgpu: add new functions to set GPU power profile

2022-09-26 Thread Shashank Sharma
This patch adds new functions which will allow a user to change the GPU power profile based a GPU workload hint flag. Cc: Alex Deucher Signed-off-by: Shashank Sharma --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- .../gpu/drm/amd/amdgpu/amdgpu_ctx_workload.c | 97 +++

[PATCH v2 3/5] drm/amdgpu: set GPU workload via ctx IOCTL

2022-09-26 Thread Shashank Sharma
This patch adds new IOCTL flags in amdgpu_context_IOCTL to get and set GPU workload profile. These calls will allow a user to switch to a GPU power profile which might be better suitable to its workload type. The currently supported workload types are: "None": Default workload profile "3D":

[PATCH v2 0/5] GPU workload hints for better performance

2022-09-26 Thread Shashank Sharma
AMDGPU SOCs supports dynamic workload based power profiles, which can provide fine-tuned performance for a particular type of workload. This patch series adds an interface to set/reset these power profiles based on the workload type hints. A user can set a hint of workload type being submistted to

Re: [PATCH] drm/amdgpu: fix a compiling error

2022-09-26 Thread Christian König
Am 26.09.22 um 11:22 schrieb Asher Song: The patch fix following compiling error: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) { Newer kernels are compiled in C99 mode, so this in now legal. We should probably

[PATCH] drm/amdgpu: fix a compiling error

2022-09-26 Thread Asher Song
The patch fix following compiling error: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < dc->res_pool->res_cap->num_dsc; i++) { Signed-off-by: Asher Song --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_hwseq.c | 4 ++-- 1 file changed, 2 insertions(+), 2

Re: [PATCH] drm/amdgpu: Always align dumb buffer at PAGE_SIZE

2022-09-26 Thread Christian König
I was thinking about that as well, yes. Might be a good idea to just change the alignment check in amdgpu_bo_create():     /* Memory should be aligned at least to a page size. */     page_align = ALIGN(bp->byte_align, PAGE_SIZE) >> PAGE_SHIFT; Something like ALIGN(b

[PATCH 4/7] mm/migrate_device.c: Add migrate_device_range()

2022-09-26 Thread Alistair Popple
Device drivers can use the migrate_vma family of functions to migrate existing private anonymous mappings to device private pages. These pages are backed by memory on the device with drivers being responsible for copying data to and from device memory. Device private pages are freed via the pgmap-

[PATCH 0/7] Fix several device private page reference counting issues

2022-09-26 Thread Alistair Popple
This series aims to fix a number of page reference counting issues in drivers dealing with device private ZONE_DEVICE pages. These result in use-after-free type bugs, either from accessing a struct page which no longer exists because it has been removed or accessing fields within the struct page wh

[PATCH 7/7] hmm-tests: Add test for migrate_device_range()

2022-09-26 Thread Alistair Popple
Signed-off-by: Alistair Popple --- lib/test_hmm.c | 119 +- lib/test_hmm_uapi.h| 1 +- tools/testing/selftests/vm/hmm-tests.c | 49 +++- 3 files changed, 148 insertions(+), 21 deletions(-) diff --git a/lib/test_hmm.c

[PATCH 3/7] mm/migrate_device.c: Refactor migrate_vma and migrate_deivce_coherent_page()

2022-09-26 Thread Alistair Popple
migrate_device_coherent_page() reuses the existing migrate_vma family of functions to migrate a specific page without providing a valid mapping or vma. This looks a bit odd because it means we are calling migrate_vma_*() without setting a valid vma, however it was considered acceptable at the time

Re: [PATCH v7 0/9] dyndbg: drm.debug adaptation

2022-09-26 Thread Greg KH
On Sun, Sep 11, 2022 at 11:28:43PM -0600, Jim Cromie wrote: > hi Greg, Dan, Jason, DRM-folk, > > heres follow-up to V6: > rebased on driver-core/driver-core-next for -v6 applied bits (thanks) > rework drm_debug_enabled{_raw,_instrumented,} per Dan. > > It excludes: > nouveau parts (immature

[PATCH v2] drivers/amd/pm: check the return value of amdgpu_bo_kmap

2022-09-26 Thread Li Zhong
amdgpu_bo_kmap() returns error when fails to map buffer object. Add the error check and propagate the error. Signed-off-by: Li Zhong --- v2: revise the compile error drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 5 - drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 5 - 2 files

Re: [PATCH v1] drivers/amd/kv_dpm: check the return value of amdgpu_kv_smc_bapm_enable

2022-09-26 Thread Li Zhong
On Thu, Sep 22, 2022 at 8:04 PM Lazar, Lijo wrote: > > > > On 9/23/2022 1:36 AM, Li Zhong wrote: > > Check the return value of amdgpu_kv_smc_bapm_enable() and log the error > > when it fails. > > > > Signed-off-by: Li Zhong > > --- > > drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c | 5 - > >

Re: [PATCH v4 09/21] drm/etnaviv: Prepare to dynamic dma-buf locking specification

2022-09-26 Thread cco
To whoom it may belong: Deepest sorrow to inform you that my husband Helmut passed by on July 21. This access will be cleared in a view days. Irene Ursprüngliche Nachricht Von: Christian König Datum: 01.09.22 08:50 (GMT+01:00) An: Dmitry Osipenko , David Airlie , Gerd Hoffma

Re: [PATCH v5 02/31] drm/i915: Don't register backlight when another backlight should be used (v2)

2022-09-26 Thread Dmitry Osipenko
25.08.2022 17:36, Hans de Goede пишет: > Before this commit when we want userspace to use the acpi_video backlight > device we register both the GPU's native backlight device and acpi_video's > firmware acpi_video# backlight device. This relies on userspace preferring > firmware type backlight devi

[PATCH 1/7] mm/memory.c: Fix race when faulting a device private page

2022-09-26 Thread Alistair Popple
When the CPU tries to access a device private page the migrate_to_ram() callback associated with the pgmap for the page is called. However no reference is taken on the faulting page. Therefore a concurrent migration of the device private page can free the page and possibly the underlying pgmap. Thi

Re: [REGRESSION] Graphical issues on Lenovo Yoga 7 14ARB7 laptop since v6.0-rc1 (bisected)

2022-09-26 Thread August Wikerfors
Hi Leo, On 2022-09-23 20:41, Leo Li wrote: Hi August, Can you provide a dmesg log with drm.debug=0x16 enabled in kernel cmdline? Log is available here: https://files.augustwikerfors.se/dmesg.2022-09-23.txt This is what I did during that log: 1. Boot the system 2. Type into the password field

[PATCH 6/7] nouveau/dmem: Evict device private memory during release

2022-09-26 Thread Alistair Popple
When the module is unloaded or a GPU is unbound from the module it is possible for device private pages to be left mapped in currently running processes. This leads to a kernel crash when the pages are either freed or accessed from the CPU because the GPU and associated data structures and callback

[PATCH 5/7] nouveau/dmem: Refactor nouveau_dmem_fault_copy_one()

2022-09-26 Thread Alistair Popple
nouveau_dmem_fault_copy_one() is used during handling of CPU faults via the migrate_to_ram() callback and is used to copy data from GPU to CPU memory. It is currently specific to fault handling, however a future patch implementing eviction of data during teardown needs similar functionality. Refac

[PATCH 2/7] mm: Free device private pages have zero refcount

2022-09-26 Thread Alistair Popple
Since 27674ef6c73f ("mm: remove the extra ZONE_DEVICE struct page refcount") device private pages have no longer had an extra reference count when the page is in use. However before handing them back to the owning device driver we add an extra reference count such that free pages have a reference c