[Nouveau] [PATCH v2 2/3] drm/fb-helper: Set framebuffer for vga-switcheroo clients

2023-05-04 Thread Thomas Zimmermann
Set the framebuffer info for drivers that support VGA switcheroo. Only affects the amdgpu and nouveau drivers, which use VGA switcheroo and generic fbdev emulation. For other drivers, this does nothing. This fixes a potential regression in the console code. Both, amdgpu and nouveau, invoked

Re: [Nouveau] [PATCH] drm/nouveau: Add support to control backlight using bl_power for nva3.

2023-05-04 Thread Bagas Sanjaya
On 10/31/22 23:32, antoniospg wrote: > Summary: > > * Add support to turn on/off backlight when changing values in bl_power > file. This is achieved by using function backlight_get_brightness() > in nva3_set_intensity to get current brightness. > This is [PATCH v2], right? If so, next time

Re: [Nouveau] Fans ramping up randomly when idle

2023-05-04 Thread Ajay Gupta
Hi > -Original Message- > From: Karol Herbst > Sent: Monday, November 7, 2022 3:42 AM > To: Timothy Madden > Cc: nouveau@lists.freedesktop.org; Ajay Gupta > Subject: Re: [Nouveau] Fans ramping up randomly when idle > > External email: Use caution opening links or attachments > > > On

[Nouveau] [PATCH 3/5] drm/nouveau/fifo: make nvkm_engn_cgrp_get static

2023-05-04 Thread Jiapeng Chong
This symbol is not used outside of runl.c, so marks it static. drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:34:1: warning: no previous prototype for ‘nvkm_engn_cgrp_get’. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3022 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong ---

Re: [Nouveau] [PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-05-04 Thread Baolu Lu
On 2023/1/19 2:00, Jason Gunthorpe wrote: These contexts are sleepable, so use the proper annotation. The GFP_ATOMIC was added mechanically in the prior patches. Signed-off-by: Jason Gunthorpe Reviewed-by: Lu Baolu Best regards, baolu

[Nouveau] [PATCH] drm/nouveau/mmu: fix Use after Free bug in nvkm_vmm_node_split

2023-05-04 Thread Zheng Wang
Here is a function call chain. nvkm_vmm_pfn_map->nvkm_vmm_pfn_split_merge->nvkm_vmm_node_split If nvkm_vma_tail return NULL in nvkm_vmm_node_split, it will finally invoke nvkm_vmm_node_merge->nvkm_vmm_node_delete, which will free the vma. However, nvkm_vmm_pfn_map didn't notice that. It goes into

[Nouveau] [PATCH] drm/nouveau/mmu: fix use-after-free bug in nvkm_vmm_pfn_map

2023-05-04 Thread Zheng Wang
If it failed in kzalloc, vma will be freed in nvkm_vmm_node_merge. The later use of vma will casue use after free. Reported-by: Zheng Wang Reported-by: Zhuorao Yang Fix it by returning to upper caller as soon as error occurs. Signed-off-by: Zheng Wang ---

Re: [Nouveau] Fans ramping up randomly when idle

2023-05-04 Thread Timothy Madden
On 11/10/22 00:50, Ajay Gupta wrote: On Sat, Nov 5, 2022 at 8:36 PM Timothy Madden wrote: Hello My Msi Gaming X Trio 2080 Ti randomly ramps up the fans with no way to recover (I have to reboot) even when the card is idle or is only showing the desktop. This issue happens even when the

[Nouveau] [PATCH v3] drm/ttm: rework on ttm_resource to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Change ttm_resource structure from num_pages to size_t size in bytes. v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages v1 -> v2: change bo->resource->size to bo->base.size at some places v1 -> v2: remove the local variable v1 -> v2: cleanup cmp_size_smaller_first() v2 -> v3: adding missing

[Nouveau] [PATCH] drm/nouveau/acr: make wpr_generic_header_dump static

2023-05-04 Thread Ben Dooks
Make wpr_generic_header_dump static to avoid the following sparse warning: drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:49:1: warning: symbol 'wpr_generic_header_dump' was not declared. Should it be static? Signed-off-by: Ben Dooks --- drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c | 2 +- 1 file

Re: [Nouveau] linux-6.2-rc4+ hangs on poweroff/reboot: Bisected

2023-05-04 Thread Chris Clayton
[Resend because the mail client on my phone decided to turn HTML on behind my back, so my reply got bounced.] Thanks Thorsten. I did try to revert but it didnt revert cleanly and I don't have the knowledge to fix it up. The patch was part of a merge that included a number of related patches.

[Nouveau] [PATCH 23/37] drm/nouveau/nvkm/engine/fifo/gf100: Staticify local function gf100_fifo_nonstall_block()

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/engine/fifo/gf100.c:451:1: warning: no previous prototype for ‘gf100_fifo_nonstall_block’ [-Wmissing-prototypes] Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc:

[Nouveau] Reminder: Last day (!) to nominate candidates for the 2023 X.Org Board of Directors Elections

2023-05-04 Thread Ricardo Garcia
Final reminder that the nomination period for the X.Org Board of Director elections finishes today, March 19th. Please send your nominations or self-nominations as soon as possible following the instructions below. Thanks again for your attention. On Mon, 2023-03-13 at 16:27 +0100, Ricardo

[Nouveau] [PATCH 0/2] drm/nouveau: avoid usage of list iterator after loop

2023-05-04 Thread Jakob Koschel
This patch set includes two instances where the list iterator variable 'pstate' is implicitly assumed to be valid after the iterator loop. While in pratice that is most likely the case (if 'pstatei'/'args->v0.state' is <= the elements in clk->states), we should explicitly only allow 'pstate' to

[Nouveau] [PATCH v2] drm/ttm: Change the meaning of the fields in the ttm_place structure from pfn to bytes

2023-05-04 Thread Somalapuram Amaranath
The ttm_plac structure allows page-based allocation, to support byte-based allocation using default or custom ttm_resource_manager_func function like ttm_range_man_alloc, amdgpu_gtt_mgr_new, i915_ttm_buddy_man_alloc,nouveau_vram_manager_new etc. Change the ttm_place structure member fpfn, lpfn,

Re: [Nouveau] linux-6.2-rc4+ hangs on poweroff/reboot: Bisected

2023-05-04 Thread Chris Clayton
Hi. I'm assuming that we are not going to see a fix for this regression before 6.2 is released. Consequently, I've implemented a (very simple) workaround. All that happens is that in the (sysv) init script that starts and stops SDDM, the nouveau module is removed once SDDM is stopped. With

Re: [Nouveau] [PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings

2023-05-04 Thread Liam R. Howlett
* Danilo Krummrich [230222 13:13]: > On 2/21/23 19:20, Liam R. Howlett wrote: > > * Danilo Krummrich [230217 08:45]: > > > Add infrastructure to keep track of GPU virtual address (VA) mappings > > > with a decicated VA space manager implementation. > > > > > > New UAPIs, motivated by Vulkan

Re: [Nouveau] [PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings

2023-05-04 Thread Liam R. Howlett
* Danilo Krummrich [230306 10:46]: > On 3/2/23 03:38, Liam R. Howlett wrote: > > * Danilo Krummrich [230227 08:17]: > > > > ... > > > > > Would this variant be significantly more efficient? > > > > > > > > Well, what you are doing is walking the tree to see if there's anything > > > > there...

[Nouveau] [PATCH 5/6] drm/radeon: fix’s on ttm_resource rework to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/radeon/radeon_cs.c | 4 ++-- drivers/gpu/drm/radeon/radeon_object.c | 4 ++-- drivers/gpu/drm/radeon/radeon_trace.h | 2 +- drivers/gpu/drm/radeon/radeon_ttm.c| 4 ++-- 4 files

[Nouveau] 2023 X.Org Foundation Membership deadline for voting in the election

2023-05-04 Thread Ricardo Garcia
The 2023 X.Org Foundation elections are rapidly approaching. We will be forwarding the election schedule and nominating process to the membership shortly. Please note that only current members can vote in the upcoming election, and that the deadline for new memberships or renewals to vote in the

Re: [Nouveau] [PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings

2023-05-04 Thread Liam R. Howlett
* Danilo Krummrich [230313 19:46]: > On 3/7/23 23:43, Liam R. Howlett wrote: > > * Danilo Krummrich [230306 10:46]: > > > On 3/2/23 03:38, Liam R. Howlett wrote: > > > > * Danilo Krummrich [230227 08:17]: > > > > > > > > ... > > > > > > > Would this variant be significantly more efficient? > >

[Nouveau] Reminder: Only 2 days left to nominate candidates for the 2023 X.Org Board of Directors Elections

2023-05-04 Thread Ricardo Garcia
Further reminder that the nomination period for the X.Org Board of Director elections finishes in only 2 days, on March 19th. Please send your nominations or self-nominations as soon as possible following the instructions below. Thanks again for your attention. On Mon, 2023-03-13 at 16:27

[Nouveau] [PATCH 1/6] drm/gem: Remove BUG_ON in drm_gem_private_object_init

2023-05-04 Thread Somalapuram Amaranath
ttm_resource can allocate size in bytes to support less than page size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/drm_gem.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 59a0bb5ebd85..ee8b5c2b6c60 100644 ---

[Nouveau] [PATCH] drm/nouveau/fb: fix pci device refcount leak in nv1a_ram_new()

2023-05-04 Thread Yang Yingliang
As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). So call it after using to avoid refcount leak. Fixes: 6ee738610f41 ("drm/nouveau: Add DRM driver for

Re: [Nouveau] [PATCH] drm/nouveau: Fix bug in buffer relocs for Nouveau

2023-05-04 Thread John Ogness
On 2023-01-19, Tanmay Bhushan <0070472...@gmail.com> wrote: > dma_resv_wait_timeout returns greater than zero on success > as opposed to ttm_bo_wait_ctx. As a result of that relocs > will fail and give failure even when it was a success. Today I switched my workstation from 6.2 to 6.3-rc3 and

[Nouveau] 2023 X.Org Foundation Membership deadline extended

2023-05-04 Thread Ricardo Garcia
Several people reported getting multiple membership and election emails recently for the first time when we flushed the queue of messages which had been unfortunately held in moderation in the eve...@lists.x.org mailing list queue. Thanks Luc, Laurent and Harald for getting in touch! Thanks to

[Nouveau] 2023 X.Org Foundation Election vote results

2023-05-04 Thread Ricardo Garcia
The Board of Directors election and the vote on the By-laws concluded at 14:00 UTC on May 1st 2023 and these are the results: - We had 75 members this year, of which 55 cast a vote, so the turnout is 73.3%. - On the question "Do you accept the proposed By-Law changes to make SFC the new fiscal

Re: [Nouveau] 2023 X.Org Foundation Membership deadline for voting in the election

2023-05-04 Thread Harald Koenig
On Apr 17, Laurent Pinchart wrote: > I don't know if I'm the only one affected by this issue, but I've just > received today two months of e-mails from x.org, including all the > reminders aboud membership renewal and election nomination period. This > isn't the first time this happens, and the

Re: [Nouveau] [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-05-04 Thread Diogo Ivo
On Mon, Jan 16, 2023 at 07:45:05AM +1000, David Airlie wrote: > On Thu, Dec 29, 2022 at 12:58 AM Diogo Ivo > wrote: > As a quick check can you try changing > > drivers/gpu/drm/nouveau/nvkm/core/firmware.c:nvkm_firmware_mem_target > from NVKM_MEM_TARGET_HOST to NVKM_MEM_TARGET_NCOH ? Hello!

[Nouveau] [PATCH] drm/nouveau/gr/gv100-: unlock on error in gf100_gr_chan_new()

2023-05-04 Thread Dan Carpenter
Drop the "gr->fecs.mutex" lock before returning on this error path. Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 + 1 file changed, 1 insertion(+) diff --git

[Nouveau] [PATCH] drm/nouveau/fifo: make nvkm_runl_new() return error pointers

2023-05-04 Thread Dan Carpenter
All six callers expect error pointers instead of NULL so make the nvkm_runl_new() return error pointers as expected. Fixes: d94470e9d150 ("drm/nouveau/fifo: add common runlist/engine topology") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c | 4 ++-- 1 file

[Nouveau] [PATCH -next] drm/nouveau/gr/gv100-: fix missing unlock on error in gf100_gr_chan_new()

2023-05-04 Thread Yang Yingliang
Add the missing unlock before return from function gf100_gr_chan_new() in the error handling case. Fixes: ca081fff6ecc ("drm/nouveau/gr/gf100-: generate golden context during first object alloc") Signed-off-by: Yang Yingliang --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 1 + 1 file

[Nouveau] [PATCH v4 1/4] drm/amdgpu: Use cursor start instead of ttm resource start

2023-05-04 Thread Somalapuram Amaranath
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. v1 -> v2: reorder patch sequence v2 -> v3: addressing review comment v2 v3 -> v4: addressing review comment v3 Signed-off-by: Somalapuram Amaranath ---

[Nouveau] [PATCH v2 1/4] drm/amdgpu: Use cursor start instead of ttm resource start

2023-05-04 Thread Somalapuram Amaranath
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[Nouveau] [PATCH -next] drm/nouveau/gr/gf100-: Remove unneeded semicolon

2023-05-04 Thread Yang Li
./drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:423:31-32: Unneeded semicolon Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3013 Fixes: 78a43c7e3b2f ("drm/nouveau/gr/gf100-: make global attrib_cb actually global") Reported-by: Abaci Robot Signed-off-by: Yang Li ---

[Nouveau] [PATCH] drm/nouveau: Fix bug in buffer relocs for Nouveau

2023-05-04 Thread Tanmay Bhushan
dma_resv_wait_timeout returns greater than zero on success as opposed to ttm_bo_wait_ctx. As a result of that relocs will fail and give failure even when it was a success. Signed-off-by: Tanmay Bhushan <0070472...@gmail.com> --- drivers/gpu/drm/nouveau/nouveau_gem.c | 3 +-- 1 file changed, 1

[Nouveau] [PATCH 3/4] drm/amdgpu: Use cursor start instead of ttm resource start

2023-05-04 Thread Somalapuram Amaranath
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 11 --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c| 10 +++--- 2 files

[Nouveau] [PATCH v3] drm/nouveau: fix incorrect conversion to dma_resv_wait_timeout()

2023-05-04 Thread John Ogness
Commit 41d351f29528 ("drm/nouveau: stop using ttm_bo_wait") converted from ttm_bo_wait_ctx() to dma_resv_wait_timeout(). However, dma_resv_wait_timeout() returns greater than zero on success as opposed to ttm_bo_wait_ctx(). As a result, relocs will fail and log errors even when it was a success.

[Nouveau] [PATCH] $drm/nouveau: Fix kernel-doc

2023-05-04 Thread Jiapeng Chong
No functional modification involved. drivers/gpu/drm/nouveau/nouveau_ioc32.c:52: warning: expecting prototype for Called whenever a 32-bit process running under a 64(). Prototype was for nouveau_compat_ioctl() instead. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=2730 Reported-by:

Re: [Nouveau] [PATCH 03/21] drm/ingenic: Don't set struct drm_driver.lastclose

2023-05-04 Thread Sergey Shtylyov
Hello! On 10/20/22 1:37 PM, Thomas Zimmermann wrote: > Don't set struct drm_mode_config.output_poll_changed. It's used to > inform the fbdev console about conncetor changes. But as ingenic Connector. :-) > uses generic fbdev emulation, the console is being informed by the > DRM client

[Nouveau] [PATCH] drm/nouveau/devinit: Convert function disable() to be void

2023-05-04 Thread Deepak R Varma
The current design of callback function disable() of struct nvkm_devinit_func is defined to return a u64 value. In its implementation in the driver modules, the function always returns a fixed value 0. Hence the design and implementation of this function should be enhanced to return void instead

[Nouveau] [PATCH] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype

2023-05-04 Thread Jiri Slaby (SUSE)
gcc-13 warns about mismatching types for enums. That revealed switched arguments of nv50_wndw_new_(): drivers/gpu/drm/nouveau/dispnv50/wndw.c:696:1: error: conflicting types for 'nv50_wndw_new_' due to enum/integer mismatch; have 'int(const struct nv50_wndw_func *, struct drm_device *, enum

[Nouveau] [PATCH] drm/nouveau: remove unused tu102_gr_load() function

2023-05-04 Thread Arnd Bergmann
From: Arnd Bergmann tu102_gr_load() is completely unused and can be removed to address this warning: drivers/gpu/drm/nouveau/dispnv50/disp.c:2517:1: error: no previous prototype for 'nv50_display_create' Fixes: 1cd97b5490c8 ("drm/nouveau/gr/tu102-: use sw_veid_bundle_init from firmware")

[Nouveau] [PATCH v4 2/4] drm/ttm: Clean up page shift operation

2023-05-04 Thread Somalapuram Amaranath
Remove page shift operations as ttm_resource moved from num_pages to size_t size in bytes. v1 -> v2: fix missing page shift to fpfn and lpfn v2 -> v3: separate patches based on driver module Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/ttm/ttm_range_manager.c | 13 ++--- 1

[Nouveau] [PATCH 1/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
To support GTT manager amdgpu_res_first, amdgpu_res_next from pages to bytes and clean up PAGE_SHIFT operation. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git

Re: [Nouveau] linux-6.2-rc4+ hangs on poweroff/reboot: Bisected

2023-05-04 Thread Chris Clayton
[Resend because the mail client on my phone dedcided to turn HTML on behinf my back, so my repluy got bounced.] Thanks Karol. I sent the original report to Ben and LKML. Thorsten then added you, Lyude Paul and the dri-devel and nouveau mail lists. So you should have received this report on or

Re: [Nouveau] [PATCH drm-next v2 00/16] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-05-04 Thread Boris Brezillon
Hi Danilo, On Fri, 17 Feb 2023 14:44:06 +0100 Danilo Krummrich wrote: > Changes in V2: > == > Nouveau: > - Reworked the Nouveau VM_BIND UAPI to avoid memory allocations in fence > signalling critical sections. Updates to the VA space are split up in > three >

Re: [Nouveau] [PATCH drm-next 03/14] drm: manager to keep track of GPUs VA mappings

2023-05-04 Thread Bagas Sanjaya
On Wed, Jan 18, 2023 at 07:12:45AM +0100, Danilo Krummrich wrote: > This adds the infrastructure for a manager implementation to keep track > of GPU virtual address (VA) mappings. "Add infrastructure for ..." > + * Analogue to drm_gpuva_sm_map_ops_create() drm_gpuva_sm_unmap_ops_create() > + *

[Nouveau] [PATCH v4 3/4] drm/amdgpu: GDS/GWS/OA cleanup the page shift operation

2023-05-04 Thread Somalapuram Amaranath
Remove page shift operations as ttm_resource moved from num_pages to size_t size in bytes. v1 – v4: adding missing related to amdgpu_ttm_init_on_chip Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c| 12 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c

[Nouveau] [PATCH v2 4/4] drm/amdgpu: Support allocate of amdgpu_gtt_mgr from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
Change the GTT manager init and allocate from pages to bytes v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[Nouveau] [PATCH 2/4] drm/amdgpu: Support allocate of amdgpu_gtt_mgr from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
Change the GTT manager init and allocate from pages to bytes Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c

[Nouveau] [PATCH v3 3/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
To support GTT manager amdgpu_res_first, amdgpu_res_next from pages to bytes and clean up PAGE_SHIFT operation. v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

Re: [Nouveau] linux-6.2-rc4+ hangs on poweroff/reboot: Bisected

2023-05-04 Thread Chris Clayton
On 15/02/2023 11:09, Karol Herbst wrote: > On Wed, Feb 15, 2023 at 11:36 AM Linux regression tracking #update > (Thorsten Leemhuis) wrote: >> >> On 13.02.23 10:14, Chris Clayton wrote: >>> On 13/02/2023 02:57, Dave Airlie wrote: On Sun, 12 Feb 2023 at 00:43, Chris Clayton wrote:

[Nouveau] [PATCH] drm/nouveau/fifo: small cleanup in nvkm_chan_cctx_get()

2023-05-04 Thread Dan Carpenter
The ">cgrp->mutex" and ">mutex" variables refer to the same thing. Use ">mutex" consistently. Signed-off-by: Dan Carpenter --- drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c

[Nouveau] [PATCH v2 1/2] drm/nouveau/device: avoid usage of list iterator after loop

2023-05-04 Thread Jakob Koschel
If potentially no valid element is found, 'pstate' would contain an invalid pointer past the iterator loop. To ensure 'pstate' is always valid, we only set it if the correct element was found. That allows adding a WARN_ON() in case the code works incorrectly, exposing currently undetectable

Re: [Nouveau] [PATCH v2 0/8] Fix several device private page reference counting issues

2023-05-04 Thread Vlastimil Babka (SUSE)
On 9/28/22 14:01, Alistair Popple wrote: > 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

Re: [Nouveau] [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and > __domain_mapping(). > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

Re: [Nouveau] [PATCH drm-next 13/14] drm/nouveau: implement new VM_BIND UAPI

2023-05-04 Thread Intel
On 1/18/23 07:12, Danilo Krummrich wrote: This commit provides the implementation for the new uapi motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl for UMDs to specify the portion

[Nouveau] [PATCH v4 2/4] drm/amdkfd: Use cursor start instead of ttm resource start

2023-05-04 Thread Somalapuram Amaranath
cleanup PAGE_SHIFT operation and replacing ttm_resource resource->start with cursor start using amdgpu_res_first API. v1 -> v2: reorder patch sequence v2 -> v3: addressing review comment v2 Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 +-

Re: [Nouveau] [PATCH v2 08/10] iommu/intel: Use GFP_KERNEL in sleepable contexts

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > These contexts are sleepable, so use the proper annotation. The > GFP_ATOMIC > was added mechanically in the prior patches. > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

Re: [Nouveau] [PATCH v2 01/10] iommu: Add a gfp parameter to iommu_map()

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > The internal mechanisms support this, but instead of exposting the gfp to > the caller it wrappers it into iommu_map() and iommu_map_atomic() > > Fix this instead of adding more variants for GFP_KERNEL_ACCOUNT. > >

[Nouveau] [PATCH 10/37] drm/nouveau/nvkm/nvfw/acr: Make local function ‘wpr_generic_header_dump’ static

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/nvfw/acr.c:49:1: warning: no previous prototype for ‘wpr_generic_header_dump’ [-Wmissing-prototypes] Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc: Gourav Samaiya Cc:

[Nouveau] [PATCH 1/2] drm/nouveau/device: avoid usage of list iterator after loop

2023-05-04 Thread Jakob Koschel
If potentially no valid element is found, 'pstate' would contain an invalid pointer past the iterator loop. To ensure 'pstate' is always valid, we only set it if the correct element was found. That allows adding a BUG_ON in case the code works incorrectly, exposing currently undetectable potential

Re: [Nouveau] linux-6.2-rc4+ hangs on poweroff/reboot: Bisected

2023-05-04 Thread Chris Clayton
Hi. Is it likely that this fix will be sumbmitted to mainline during the ongoing 6.3 development cycle? Chris On 20/02/2023 22:16, Ben Skeggs wrote: > On Mon, 20 Feb 2023 at 21:27, Karol Herbst wrote: >> >> On Mon, Feb 20, 2023 at 11:51 AM Chris Clayton >> wrote: >>> >>> >>> >>> On

[Nouveau] [PATCH 21/37] drm/nouveau/nvkm/subdev/volt/gk20a: Demote kerneldoc abuses

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:49: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst drivers/gpu/drm/nouveau/nvkm/subdev/volt/gk20a.c:62: warning: This

[Nouveau] [PATCH v2] drm/ttm: rework on ttm_resource to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Change ttm_resource structure from num_pages to size_t size in bytes. v1 -> v2: change PFN_UP(dst_mem->size) to ttm->num_pages v1 -> v2: change bo->resource->size to bo->base.size at some places v1 -> v2: remove the local variable v1 -> v2: cleanup cmp_size_smaller_first() Signed-off-by:

[Nouveau] [PATCH -next] drm/nouveau/fifo: Remove duplicated include in chan.c

2023-05-04 Thread Yang Li
./drivers/gpu/drm/nouveau/nvkm/engine/fifo/chan.c: chid.h is included more than once. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3014 Fixes: 67059b9fb899 ("drm/nouveau/fifo: add chan start()/stop()") Reported-by: Abaci Robot Signed-off-by: Yang Li ---

[Nouveau] [PATCH v2 3/4] drm/amdgpu: Movie the amdgpu_gtt_mgr start and size from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
To support GTT manager amdgpu_res_first, amdgpu_res_next from pages to bytes and clean up PAGE_SHIFT operation. v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_res_cursor.h | 8 1 file changed, 4 insertions(+), 4 deletions(-)

[Nouveau] [PATCH] drm/nouveau/gr/gf100-: remove unnecessary semicolon

2023-05-04 Thread Deepak R Varma
Remove extra unnecessary semicolon. Issue identified using semcolon.cocci Coccinelle semantic patch. Signed-off-by: Deepak R Varma --- drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[Nouveau] [PATCH 1/6] drm/ttm: rework on ttm_resource to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Change ttm_resource structure from num_pages to size_t size in bytes. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/ttm/ttm_bo.c| 4 ++-- drivers/gpu/drm/ttm/ttm_bo_util.c | 6 +++--- drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 ++--

Re: [Nouveau] [PATCH v2 02/10] iommu: Remove iommu_map_atomic()

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > There is only one call site and it can now just pass the GFP_ATOMIC to the > normal iommu_map(). > > Signed-off-by: Jason Gunthorpe Reviewed-by: Kevin Tian

Re: [Nouveau] [PATCH 7/8] iommu/intel: Support the gfp argument to the map_pages op

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Saturday, January 7, 2023 12:43 AM > > @@ -2368,7 +2372,7 @@ static int iommu_domain_identity_map(struct > dmar_domain *domain, > > return __domain_mapping(domain, first_vpfn, > first_vpfn, last_vpfn - first_vpfn + 1, > -

Re: [Nouveau] Fans ramping up randomly when idle

2023-05-04 Thread Timothy Madden
On 11/10/22 00:50, Ajay Gupta wrote: This issue happens even when the card is not connected to a monitor. My dmesg output from nouveau is included below, I think the last 2 lines are the relevant ones: [ 9426.768449] nvidia-gpu :0b:00.3: Unable to change power state from D3hot to D0,

[Nouveau] [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-05-04 Thread Diogo Ivo
Hello, Commit 2541626cfb79 breaks GM20B probe with the following kernel log: [2.153892] [ cut here ] [2.153897] WARNING: CPU: 1 PID: 36 at drivers/gpu/drm/nouveau/nvkm/subdev/mmu/vmmgf100.c:273 gf100_vmm_valid+0x2c4/0x390 [2.153916] Modules linked in: [

[Nouveau] 2023 X.Org Board of Directors Elections Nomination period is NOW

2023-05-04 Thread Ricardo Garcia
We are seeking nominations for candidates for election to the X.Org Foundation Board of Directors. All X.Org Foundation members are eligible for election to the board. Nominations for the 2023 election are now open and will remain open until 23:59 UTC on 19 March 2023. The Board consists of

Re: [Nouveau] [PATCH 6/8] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Saturday, January 7, 2023 12:43 AM > > @@ -2676,7 +2676,7 @@ static int copy_context_table(struct intel_iommu > *iommu, > if (!old_ce) > goto out; > > - new_ce =

[Nouveau] [PATCH] drm/nouveau/kms/nv04: fix pci device refcount leak

2023-05-04 Thread Yang Yingliang
As comment of pci_get_domain_bus_and_slot() says, it returns a pci device with refcount increment, when finish using it, the caller must decrement the reference count by calling pci_dev_put(). In nv04_update_arb() and nouveau_hw_get_clock(), after using pci_dev_put() is called to avoid refcount

Re: [Nouveau] [Intel-gfx] [PATCH v2 2/3] drm/fb-helper: Set framebuffer for vga-switcheroo clients

2023-05-04 Thread Rodrigo Vivi
On Thu, Jan 19, 2023 at 09:06:54AM +0100, Thomas Zimmermann wrote: > Hi > > Am 18.01.23 um 20:21 schrieb Rodrigo Vivi: > > On Thu, Jan 12, 2023 at 09:11:55PM +0100, Thomas Zimmermann wrote: > > > Set the framebuffer info for drivers that support VGA switcheroo. Only > > > affects the amdgpu and

Re: [Nouveau] [PATCH drm-next v2 05/16] drm: manager to keep track of GPUs VA mappings

2023-05-04 Thread Liam R. Howlett
* Danilo Krummrich [230227 21:17]: > On Tue, Feb 21, 2023 at 01:20:50PM -0500, Liam R. Howlett wrote: > > * Danilo Krummrich [230217 08:45]: > > > Add infrastructure to keep track of GPU virtual address (VA) mappings > > > with a decicated VA space manager implementation. > > > > > > New UAPIs,

[Nouveau] [PATCH 3/6] drm/i915: fix’s on ttm_resource rework to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 2 +- drivers/gpu/drm/i915/i915_scatterlist.c | 4 ++-- drivers/gpu/drm/i915/i915_ttm_buddy_manager.c | 12 ++--

Re: [Nouveau] [PATCH 7/8] iommu/intel: Support the gfp argument to the map_pages op

2023-05-04 Thread Baolu Lu
On 2023/1/17 11:38, Tian, Kevin wrote: From: Jason Gunthorpe Sent: Saturday, January 7, 2023 12:43 AM @@ -2368,7 +2372,7 @@ static int iommu_domain_identity_map(struct dmar_domain *domain, return __domain_mapping(domain, first_vpfn, first_vpfn, last_vpfn

[Nouveau] [PATCH] drm/nouveau/svm: Remove set but unused variable 'priority'

2023-05-04 Thread Jiapeng Chong
Variable priority is not effectively used in the function, so delete it. drivers/gpu/drm/nouveau/nouveau_svm.c:115:24: warning: variable 'priority' set but not used. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3028 Reported-by: Abaci Robot Signed-off-by: Jiapeng Chong ---

Re: [Nouveau] [PATCH 6/8] iommu/intel: Add a gfp parameter to alloc_pgtable_page()

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Tuesday, January 17, 2023 9:30 PM > > On Tue, Jan 17, 2023 at 03:35:08AM +, Tian, Kevin wrote: > > > From: Jason Gunthorpe > > > Sent: Saturday, January 7, 2023 12:43 AM > > > > > > @@ -2676,7 +2676,7 @@ static int copy_context_table(struct > intel_iommu > >

Re: [Nouveau] [PATCH] drm/nouveau/mmu: Fix an UAF issue in NVKM

2023-05-04 Thread Xinghui Li
hi all friendly ping... 于2023年1月12日周四 15:18写道: > > From: Xinghui Li > > In nvkm_mem_new_host, the mem is be alloced. And mem->memory is > assigned to pmemory. During this process, the mem will be free if > the error occurs. But the *pmemory still points to the >memory > which has been

[Nouveau] [PATCH 22/37] drm/nouveau/nvkm/engine/fifo/runl: Staticify local function nvkm_engn_cgrp_get()

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/engine/fifo/runl.c:34:1: warning: no previous prototype for ‘nvkm_engn_cgrp_get’ [-Wmissing-prototypes] Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc: Daniel Vetter Cc:

[Nouveau] [PATCH v3 4/4] drm/amdgpu: Support allocate of amdgpu_gtt_mgr from pages to bytes

2023-05-04 Thread Somalapuram Amaranath
Change the GTT manager init and allocate from pages to bytes v1 -> v2: reorder patch sequence Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git

[Nouveau] [PATCH -resend] drm/nouveau/kms/nv50- (gcc13): fix nv50_wndw_new_ prototype

2023-05-04 Thread Jiri Slaby (SUSE)
gcc-13 warns about mismatching types for enums. That revealed switched arguments of nv50_wndw_new_(): drivers/gpu/drm/nouveau/dispnv50/wndw.c:696:1: error: conflicting types for 'nv50_wndw_new_' due to enum/integer mismatch; have 'int(const struct nv50_wndw_func *, struct drm_device *, enum

[Nouveau] Separate TTYs on a Single Dual Head G94 Card

2023-05-04 Thread Shahab Vahedi
I have two monitors attached to my G94 graphic card. One is connected through the HDMI output and the other through DVI. When the kernel fully boots to its virtual console (getty), both monitors duplicate the same output. Please see [0] for the log and setup. I'd like to assign separate TTYs to

Re: [Nouveau] [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-05-04 Thread Diogo Ivo
On Wed, Jan 18, 2023 at 11:28:49AM +1000, Ben Skeggs wrote: > On Mon, 16 Jan 2023 at 22:27, Diogo Ivo wrote: > > On Mon, Jan 16, 2023 at 07:45:05AM +1000, David Airlie wrote: > > > As a quick check can you try changing > > > > > >

[Nouveau] [PATCH] nouveau: fix nv50_wndw_new_() prototype

2023-05-04 Thread Arnd Bergmann
From: Arnd Bergmann gcc-13 complains about a mismatched function declaration: drivers/gpu/drm/nouveau/dispnv50/wndw.c:696:1: error: conflicting types for 'nv50_wndw_new_' due to enum/integer mismatch; have 'int(const struct nv50_wndw_func *, struct drm_device *, enum drm_plane_type, const

Re: [Nouveau] [Intel-gfx] [PATCH v2 2/3] drm/fb-helper: Set framebuffer for vga-switcheroo clients

2023-05-04 Thread Thomas Zimmermann
Hi Am 18.01.23 um 20:21 schrieb Rodrigo Vivi: On Thu, Jan 12, 2023 at 09:11:55PM +0100, Thomas Zimmermann wrote: Set the framebuffer info for drivers that support VGA switcheroo. Only affects the amdgpu and nouveau drivers, which use VGA switcheroo and generic fbdev emulation. For other

[Nouveau] [PATCH 5/5] drm/nouveau/gr/tu102: Remove the unused function tu102_gr_load()

2023-05-04 Thread Jiapeng Chong
The function tu102_gr_load() is defined in the tu102.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/nouveau/nvkm/engine/gr/tu102.c:210:1: warning: no previous prototype for ‘tu102_gr_load’. Link: https://bugzilla.openanolis.cn/show_bug.cgi?id=3020 Reported-by:

Re: [Nouveau] [PATCH v2 04/10] iommu/dma: Use the gfp parameter in __iommu_dma_alloc_noncontiguous()

2023-05-04 Thread Tian, Kevin
> From: Jason Gunthorpe > Sent: Thursday, January 19, 2023 2:01 AM > > Change the sg_alloc_table_from_pages() allocation that was hardwired to > GFP_KERNEL to use the gfp parameter like the other allocations in this > function. > > Auditing says this is never called from an atomic context, so

Re: [Nouveau] [PATCH v2 07/10] iommu/intel: Support the gfp argument to the map_pages op

2023-05-04 Thread Baolu Lu
On 2023/1/19 2:00, Jason Gunthorpe wrote: Flow it down to alloc_pgtable_page() via pfn_to_dma_pte() and __domain_mapping(). Signed-off-by: Jason Gunthorpe Irrelevant to this patch, GFP_ATOMIC could be changed to GFP_KERNEL in some places. I will follow up further to clean it up. For this

[Nouveau] [PATCH 6/6] drm/vmwgfx: fix’s on ttm_resource rework to use size_t type

2023-05-04 Thread Somalapuram Amaranath
Fix the ttm_resource from num_pages to size_t size. Signed-off-by: Somalapuram Amaranath --- drivers/gpu/drm/vmwgfx/vmwgfx_blit.c | 4 ++-- drivers/gpu/drm/vmwgfx/vmwgfx_bo.c| 6 +++--- drivers/gpu/drm/vmwgfx/vmwgfx_cotable.c | 2 +-

[Nouveau] [PATCH] drm/nouveau: Remove unused variable

2023-05-04 Thread Zack Rusin
From: Zack Rusin Trivial removal of an unused variable. Not sure how it snuck by me and build bots in the 7c99616e3fe7. Fixes: 7c99616e3fe7 ("drm: Remove drm_mode_config::fb_base") Reported-by: Stephen Rothwell Cc: Laurent Pinchart Cc: Thomas Zimmermann Cc: Christian König Cc: Ben Skeggs

[Nouveau] [PATCH 12/37] drm/nouveau/nvkm/subdev/bios/init: Demote a bunch of kernel-doc abuses

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:584: warning: Function parameter or member 'init' not described in 'init_reserved' drivers/gpu/drm/nouveau/nvkm/subdev/bios/init.c:611: warning: expecting prototype for INIT_DONE(). Prototype was

[Nouveau] [PATCH linux-next] drm/nouveau/nvkm/core/firmware: replace strncpy() with strscpy()

2023-05-04 Thread yang.yang29
From: Xu Panda The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Xu Panda Signed-off-by: Yang Yang --- drivers/gpu/drm/nouveau/nvkm/core/firmware.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)

[Nouveau] [PATCH 24/37] drm/nouveau/nvkm/engine/gr/gf100: Demote kerneldoc abuse

2023-05-04 Thread Lee Jones
Fixes the following W=1 kernel build warning(s): drivers/gpu/drm/nouveau/nvkm/engine/gr/gf100.c:1044: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Cc: David Airlie Cc:

Re: [Nouveau] [REGRESSION] GM20B probe fails after commit 2541626cfb79

2023-05-04 Thread Diogo Ivo
On Fri, Jan 13, 2023 at 02:19:06PM +0100, Linux kernel regression tracking (Thorsten Leemhuis) wrote: > Diogo, for that it would be really helpful to known: is the issue still > happening with latest mainline? Is it possible to revert 2541626cfb79 > easily? And if so: do things work afterwards

  1   2   >