Re: [PATCH v2] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Mario Limonciello
On 12/19/22 20:30, Tim Huang wrote: MES is part of gfxoff and MES suspend and resume are skipped for S0i3. But the mes_self_test call path is still in the amdgpu_device_ip_late_init. it's should also be skipped for s0ix as no hardware re-initialization happened. Besides, mes_self_test will free

RE: drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Huang, Tim
[AMD Official Use Only - General] Hi Mario, Comments inline. Thanks. -Original Message- From: Limonciello, Mario Sent: Monday, December 19, 2022 11:22 PM To: Huang, Tim ; amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Ma, Li ; Du, Xiaojian Subject: Re: drm/amdg

[PATCH v2] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Tim Huang
MES is part of gfxoff and MES suspend and resume are skipped for S0i3. But the mes_self_test call path is still in the amdgpu_device_ip_late_init. it's should also be skipped for s0ix as no hardware re-initialization happened. Besides, mes_self_test will free the BO that triggers a lot of warning

[PATCH v3] drm: Only select I2C_ALGOBIT for drivers that actually need it

2022-12-19 Thread Uwe Kleine-König
While working on a drm driver that doesn't need the i2c algobit stuff I noticed that DRM selects this code even though only 8 drivers actually use it. While also only some drivers use i2c, keep the select for I2C for the next cleanup patch. Still prepare this already by also selecting I2C for the i

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2022-12-19 Thread Borislav Petkov
On Mon, Dec 19, 2022 at 11:47:18AM +0100, Christian König wrote: > That function consumes the reference. > > Signed-off-by: Christian König > Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates") > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 ++ > 1 file changed

[PATCH] drm/amd/display: Remove the unused function dmub_outbox_irq_info_funcs

2022-12-19 Thread Jiapeng Chong
The function dmub_outbox_irq_info_funcs is defined in the irq_service_dcn201.c file, but not called elsewhere, so remove this unused function. drivers/gpu/drm/amd/amdgpu/../display/dc/irq/dcn201/irq_service_dcn201.c:139:43: warning: unused variable 'dmub_outbox_irq_info_funcs'. Link: https://bug

[PATCH 17/18] fbdev/vga16fb: Do not use struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/vga16fb.c | 15 +

[PATCH 13/18] fbdev/offb: Do not use struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/offb.c | 20

[PATCH 14/18] fbdev/simplefb: Do not use struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/simplefb.c | 19

[PATCH 16/18] fbdev/vesafb: Do not use struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/vesafb.c | 27 ++

[PATCH 09/18] vfio-mdev/mdpy-fb: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in mdpy-fb. Signed-off-by: Thomas Zimmermann --- samples/vfio-mdev/mdpy-fb.c | 8 1 file changed, 8 deletions(-) diff --git a/sample

[PATCH 07/18] fbdev/clps711x-fb: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in clps711x-fb. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/clps711x-fb.c | 10 +- 1 file changed, 1 insertion(+), 9 dele

[PATCH 12/18] fbdev/offb: Allocate struct offb_par with framebuffer_alloc()

2022-12-19 Thread Thomas Zimmermann
Move the palette array into struct offb_par and allocate both via framebuffer_alloc(), as intended by fbdev. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/offb.c | 13 + 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/video/fbde

[PATCH 10/18] fbdev/efifb: Add struct efifb_par for driver data

2022-12-19 Thread Thomas Zimmermann
The efifb_par structure holds the palette for efifb. It will also be useful for storing the device's aperture range. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/efifb.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/video/fbdev/efifb.c b/driv

[PATCH 15/18] fbdev/vesafb: Remove trailing whitespaces

2022-12-19 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/vesafb.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/video/fbdev/vesafb.c b/drivers/video/fbdev/vesafb.c index 929d4775cb4b..47ce244e4bb8 100644 --- a/driv

[PATCH 03/18] drm/gma500: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in gma500. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/gma500/framebuffer.c | 5 - 1 file changed, 5 deletions(-) diff --git a/d

[PATCH 01/18] fbcon: Remove trailing whitespaces

2022-12-19 Thread Thomas Zimmermann
Fix coding style. No functional changes. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/core/fbcon.c | 24 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/drivers/video/fbdev/core/fbcon.c b/drivers/video/fbdev/core/fbcon.c index c0143d38df83..50

[PATCH 06/18] drm/fb-helper: Do not allocate unused apertures structure

2022-12-19 Thread Thomas Zimmermann
The apertures field in struct fb_info is not used by DRM drivers. Do not allocate it. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_fb_helper.c | 20 ++-- 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/drm_fb_helper.c b/drivers/gpu/drm/d

[PATCH 00/18] drm, fbdev: Remove apertures structure and FBINFO_MISC_FIRMWARE

2022-12-19 Thread Thomas Zimmermann
Remove struct fb_info.apertures and FBINFO_MISC_FIRMWARE from fbdev and handle the aperture ownership without involving the fbdev core. The apertures field in struct fb_info is a remnant from earlier ownership management for framebuffer apertures. When fbdev core code still handled ownership of th

[PATCH 11/18] fbdev/efifb: Do not use struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Acquire ownership of the firmware scanout buffer by calling Linux' aperture helpers. Remove the use of struct fb_info.apertures and do not set FBINFO_MISC_FIRMWARE; both of which previously configured buffer ownership. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/efifb.c | 24 +++

[PATCH 18/18] drm/fbdev: Remove aperture handling and FBINFO_MISC_FIRMWARE

2022-12-19 Thread Thomas Zimmermann
There are no users left of struct fb_info.apertures and the flag FBINFO_MISC_FIRMWARE. Remove both and the aperture-ownership code in the fbdev core. All code for aperture ownership is now located in the fbdev drivers. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/core/fbmem.c | 33

[PATCH 04/18] drm/i915: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in i915. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/i915/display/intel_fbdev.c | 7 --- 1 file changed, 7 deletions(-) diff --g

[PATCH 08/18] fbdev/hyperv-fb: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in hyperv-fb. Signed-off-by: Thomas Zimmermann --- drivers/video/fbdev/hyperv_fb.c | 17 ++--- 1 file changed, 6 insertions(+), 11

[PATCH 05/18] drm/radeon: Do not set struct fb_info.apertures

2022-12-19 Thread Thomas Zimmermann
Generic fbdev drivers use the apertures field in struct fb_info to control ownership of the framebuffer memory and graphics device. Do not set the values in radeon. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon_fb.c | 4 1 file changed, 4 deletions(-) diff --git a/driv

[PATCH 02/18] Revert "fbcon: don't lose the console font across generic->chip driver switch"

2022-12-19 Thread Thomas Zimmermann
This reverts commit ae1287865f5361fa138d4d3b1b6277908b54eac9. Always free the console font when deinitializing the framebuffer console. Subsequent framebuffer consoles will then use the default font. Rely on userspace to load any user-configured font for these consoles. Commit ae1287865f53 ("fbco

Re: drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Limonciello, Mario
On 12/19/2022 06:12, Tim Huang wrote: MES is part of gfxoff for S0i3 and does not require self-test after S0i3. Besides, self-test will free the BO that triggers a wraning while in the suspend state. [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdg

Re: [PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2022-12-19 Thread Luben Tuikov
Reviewed-by: Luben Tuikov Regards, Luben On 2022-12-19 05:47, Christian König wrote: > That function consumes the reference. > > Signed-off-by: Christian König > Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates") > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c |

[PATCH] drm/amdgpu: skip mes self test after s0i3 resume for MES IP v11.0

2022-12-19 Thread Tim Huang
MES is part of gfxoff for S0i3 and does not require self-test after S0i3. Besides, self-test will free the BO that triggers a wraning while in the suspend state. [ 81.656085] WARNING: CPU: 2 PID: 1550 at drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:425 amdgpu_bo_free_kernel+0xfc/0x110 [amdgpu] [

[PATCH] drm/amdgpu: grab extra fence reference for drm_sched_job_add_dependency

2022-12-19 Thread Christian König
That function consumes the reference. Signed-off-by: Christian König Fixes: aab9cf7b6954 ("drm/amdgpu: use scheduler dependencies for VM updates") --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/

Re: [PATCH v3] drm: Only select I2C_ALGOBIT for drivers that actually need it

2022-12-19 Thread Javier Martinez Canillas
Hello Uwe, On 12/19/22 09:36, Uwe Kleine-König wrote: > While working on a drm driver that doesn't need the i2c algobit stuff I > noticed that DRM selects this code even though only 8 drivers actually use > it. While also only some drivers use i2c, keep the select for I2C for the > next cleanup pa

Re: [PATCH v6] drm: Optimise for continuous memory allocation

2022-12-19 Thread Christian König
Am 18.12.22 um 07:57 schrieb xinhui pan: Optimise a little when continuous memory request fails. There are memory holes and continuous memory request usually fails when order is too big. Currently buddy only look for exactly order memory for such request. Now we can try again to look for several

Re: DRM scheduler & amdgpu splats followed by GPU hang

2022-12-19 Thread Christian König
Hi Michel, yeah that's a known issue. I'm already working on that, looks like I've just forgotten to add a dma_fence_get() somewhere. Going to send around a bug fix later today. Thanks for the report, Christian. Am 17.12.22 um 13:12 schrieb Michel Dänzer: With the drm-next-2022-12-13 change

Re: amdgpu refcount saturation

2022-12-19 Thread Christian König
Thanks for the notice, going to take a look today. Regards, Christian. Am 17.12.22 um 12:53 schrieb Borislav Petkov: Hi folks, this is with Linus' tree from Wed: 041fae9c105a ("Merge tag 'f2fs-for-6.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs") on a CZ laptop: [