[PATCH] drm/amd/display: Don't leak dc_stream_state.

2017-09-09 Thread Darren Salt
Noticed while playing “Valley”, which was causing some 8MB of leakage per second. kmemleak listed many entries looking like this: unreferenced object 0x8802c2951800 (size 1024): comm "Xorg", pid 2982, jiffies 4297410155 (age 392.787s) hex dump (first 32 bytes): 00 50

[PATCH xf86-video-amdgpu] Clarify when TearFree is automatically enabled.

2017-09-12 Thread Darren Salt
--- man/amdgpu.man | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/man/amdgpu.man b/man/amdgpu.man index c38defe..0d9dd93 100644 --- a/man/amdgpu.man +++ b/man/amdgpu.man @@ -80,8 +80,8 @@ separate scanout buffers need to be allocated for each CRTC with TearFree on. If

Re: [PATCH] drm/amd/display: Don't leak dc_stream_state.

2017-09-12 Thread Darren Salt
I demand that Alex Deucher may or may not have written... > On Fri, Sep 8, 2017 at 11:41 AM, Darren Salt <devs...@moreofthesa.me.uk> wrote: >> Noticed while playing “Valley”, which was causing some 8MB of leakage per >> second. kmemleak listed many

[PATCH v2] drm/amd/display: Don't leak dc_stream_state.

2017-09-12 Thread Darren Salt
Signed-off-by: Darren Salt <devs...@moreofthesa.me.uk> --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/a

[PATCH] drm/amdgpu: fix a possible NULL dereference when attempting reset

2017-10-17 Thread Darren Salt
_reset+0x3c/0x9a RSP: c9147de8 CR2: 00d8 Signed-off-by: Darren Salt <devs...@moreofthesa.me.uk> --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers

[PATCH] radeon, amdgpu: allow for symbolic errno output when reporting drm_edid_to_sad errors

2020-02-20 Thread Darren Salt
This fixes some kernel log text when CONFIG_SYMBOLIC_ERRNAMES=Y. Signed-off-by: Darren Salt amd-dc-errname.patch Description: Binary data ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH] amdgpu: don't treat BAR resize failure due to unsupported requested size as an error

2020-12-09 Thread Darren Salt
[drm:amdgpu_device_resize_fb_bar] *ERROR* Problem resizing BAR0 (-22). Signed-off-by: Darren Salt --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 355fa0057c26..d80ba03913a7 100644

[PATCH] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM

2020-12-09 Thread Darren Salt
This allows BAR0 resizing to be done for cards which don't advertise support for a size large enough to cover the VRAM but which do advertise at least one size larger than the default. For example, my RX 5600 XT, which advertises 256MB, 512MB and 1GB. Signed-off-by: Darren Salt --- drivers/gpu

Re: [PATCH] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM

2020-12-11 Thread Darren Salt
I demand that Christian König may or may not have written... > Am 11.12.20 um 02:42 schrieb Darren Salt: >> I demand that Christian König may or may not have written... > [SNIP] > Well I did wrote that :) “did write”, surely… >> I used dd: >> # dd if=/sys/kernel

Re: [PATCH 3/7] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v2)

2020-12-11 Thread Darren Salt
I demand that Christian König may or may not have written... > Am 11.12.20 um 01:55 schrieb Darren Salt: [snip] >> +rbar_size = pci_rebar_bytes_to_size(adev->gmc.real_vram_size); >> +current_size = pci_rebar_get_current_size(adev->pdev, 0); >> + >> +

Re: [PATCH] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM

2020-12-10 Thread Darren Salt
I demand that Christian König may or may not have written... > Am 10.12.20 um 01:57 schrieb Darren Salt: >> This allows BAR0 resizing to be done for cards which don't advertise >> support for a size large enough to cover the VRAM but which do advertise >> at least one size la

[PATCH 7/7] amdgpu: allow overriding of the GPU's list of supported BAR sizes

2020-12-10 Thread Darren Salt
Some cards don't advertise a BAR size which covers all of the VRAM. Mine, a Sapphire RX 5600 XT Pulse, advertises only 256MB, 512MB and 1GB. Despite this, it works fine with the full 6GB visible via an 8GB BAR. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 +-

[PATCH 6/7] pci: allow for overriding the list of advertised BAR sizes

2020-12-10 Thread Darren Salt
This is intended for devices which are known to work with BAR sizes other than those which they advertise; usually larger. --- drivers/pci/setup-res.c | 4 ++-- include/linux/pci.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/pci/setup-res.c

[PATCH 2/7] pci: add BAR bytes->size helper & expose size->bytes helper

2020-12-10 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.h | 4 include/linux/pci.h | 9 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 8373d94414e9..9a3837a30369 100644

[PATCH 1/7] pci: export PCI BAR size-reading functions

2020-12-10 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.c | 2 ++ drivers/pci/pci.h | 2 -- include/linux/pci.h | 4 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e578d34095e9

[PATCH 4/7] amdgpu: module option controlling whether BAR0 resizing is done

2020-12-10 Thread Darren Salt
--- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 9 + 3 files changed, 13 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h index

[PATCH 5/7] amdgpu: limit maximum FB BAR size when attempting to enlarge

2020-12-10 Thread Darren Salt
This is coarse, applying to all dGPUs. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 9 + 3 files changed, 17 insertions(+), 1 deletion(-) diff --git

[PATCH 3/7] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v2)

2020-12-10 Thread Darren Salt
; some extra log text. Signed-off-by: Darren Salt --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 53 ++ 1 file changed, 43 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 6637b84aeb85

[PATCH 0/7] amdgpu, pci: improved BAR resizing support

2020-12-10 Thread Darren Salt
dGPUs driven by amdgpu. The override is to cope with GPU VBIOSes which don't properly advertise supported BAR sizes. This should be quirked somehow; I have yet to determine how this should be arranged. Darren Salt (7): pci: export PCI BAR size-reading functions pci: add BAR bytes->size hel

Re: [PATCH] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM

2020-12-10 Thread Darren Salt
I demand that Christian König may or may not have written... > Am 10.12.20 um 14:59 schrieb Darren Salt: > > I demand that Christian König may or may not have written... > > [snip] >> My current kernel has another patch, applied on top of this patch, which >> al

Re: [PATCH 3/7] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v2)

2020-12-14 Thread Darren Salt
I demand that Christian König may or may not have written... > Am 11.12.20 um 18:31 schrieb Darren Salt: >< [SNIP] >>> If that isn't the case use fls() to get the highest set bit < 13. >> That suggests that it'll be easiest to clear each bit after the >> corre

[PATCH 7/8] amdgpu: implement a BAR size quirks list

2020-12-14 Thread Darren Salt
Intended for devices which are misreporting available/supported BAR sizes. This may be insufficient to identify some devices. The inclusion of the reported BAR sizes bitmap is to assist with identification. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 -- 1 file

[PATCH 2/8] pci: add BAR bytes->size helper & expose size->bytes helper

2020-12-14 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.h | 4 include/linux/pci.h | 9 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index 640ae7d74fc3..0fa31ff3d4e4 100644

[PATCH 5/8] pci: allow for overriding the list of advertised BAR sizes

2020-12-14 Thread Darren Salt
This is intended for devices which are known to work with BAR sizes other than those which they advertise; usually larger. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/pci/setup-res.c| 4 ++-- include/linux/pci.h| 2 +- 3 files

[PATCH 6/8] amdgpu: allow overriding of the GPU's list of supported BAR sizes (v3)

2020-12-14 Thread Darren Salt
Some cards don't advertise a BAR size which covers all of the VRAM. Mine, a Sapphire RX 5600 XT Pulse, advertises only 256MB, 512MB and 1GB. Despite this, it appears to work fine with the full 6GB visible via an 8GB BAR. v3: changed implementation due to changes in preceding patches. v2:

[PATCH 4/8] amdgpu: limit maximum BAR0 size when attempting to enlarge (v3)

2020-12-14 Thread Darren Salt
This is coarse, applying to all dGPUs. [v3] On -ENOSPC, include the size attempted in the logged error. [v2] If there are no advertised sizes small enough, limit to the smallest available. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 32

[PATCH 8/8] amdgpu: add a BAR size quirk for Sapphire RX 5600 XT Pulse.

2020-12-14 Thread Darren Salt
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index fde1dfdacd04..b4f3e5a2763e 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++

[PATCH 0/8] amdgpu, pci: improved BAR resizing support

2020-12-14 Thread Darren Salt
don't properly advertise supported BAR sizes. Mine appears to be one such. Darren Salt (8): pci: export pci_rebar_get_possible_sizes pci: add BAR bytes->size helper & expose size->bytes helper amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v5

[PATCH 3/8] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v5)

2020-12-14 Thread Darren Salt
to find sizes to try. [v3] Don't use pci_rebar_get_current_size(). [v2] Rewritten to use PCI helper functions; some extra log text. Signed-off-by: Darren Salt --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 38 +- 1 file changed, 29 insertions(+), 9 deletions(-) diff --git

[PATCH 1/8] pci: export pci_rebar_get_possible_sizes

2020-12-14 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.c | 1 + drivers/pci/pci.h | 1 - include/linux/pci.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index e578d34095e9

Re: [PATCH 0/8] amdgpu, pci: improved BAR resizing support

2020-12-13 Thread Darren Salt
I forgot the Signed-Off-By for some patches. So, for all in this series: Signed-Off-By: Darren Salt ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

[PATCH 5/8] pci: allow for overriding the list of advertised BAR sizes

2020-12-13 Thread Darren Salt
This is intended for devices which are known to work with BAR sizes other than those which they advertise; usually larger. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- drivers/pci/setup-res.c| 4 ++-- include/linux/pci.h| 2 +- 3 files

[PATCH 7/8] amdgpu: implement a BAR size quirks list

2020-12-13 Thread Darren Salt
Intended for devices which are misreporting available/supported BAR sizes. This may be insufficient to identify some devices. The inclusion of the reported BAR sizes bitmap is to assist with identification. --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 43 -- 1 file

[PATCH 6/8] amdgpu: allow overriding of the GPU's list of supported BAR sizes (v3)

2020-12-13 Thread Darren Salt
Some cards don't advertise a BAR size which covers all of the VRAM. Mine, a Sapphire RX 5600 XT Pulse, advertises only 256MB, 512MB and 1GB. Despite this, it appears to work fine with the full 6GB visible via an 8GB BAR. v3: changed implementation due to changes in preceding patches. v2:

[PATCH 4/8] amdgpu: limit maximum BAR0 size when attempting to enlarge (v2)

2020-12-13 Thread Darren Salt
This is coarse, applying to all dGPUs. v2: If there are no advertised sizes small enough, limit to the smallest available. --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 31 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c|

[PATCH 0/8] amdgpu, pci: improved BAR resizing support

2020-12-13 Thread Darren Salt
; there is no support for applying limits to specific GPUs in multi-GPU systems. The override and the quirks list (which uses it) are to cope with GPU VBIOSes which don't properly advertise supported BAR sizes. Mine appears to be one such. Darren Salt (8): pci: export pci_rebar_get_possible_sizes pci: add BAR

[PATCH 3/8] amdgpu: resize BAR0 to the maximum available size, even if it doesn't cover VRAM (v4)

2020-12-13 Thread Darren Salt
] don't use pci_rebar_get_current_size() [v2] rewritten to use PCI helper functions; some extra log text. Signed-off-by: Darren Salt --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 54 ++ 1 file changed, 44 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/8] pci: add BAR bytes->size helper & expose size->bytes helper

2020-12-13 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.h | 4 include/linux/pci.h | 9 + 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/pci/pci.h b/drivers/pci/pci.h index dd1398aec6c8..4127b6d54f26 100644

[PATCH 8/8] amdgpu: add a BAR size quirk for Sapphire RX 5600 XT Pulse.

2020-12-13 Thread Darren Salt
--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 442eca5fc6a4..efd6a1d80da2 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++

[PATCH 1/8] pci: export pci_rebar_get_possible_sizes

2020-12-13 Thread Darren Salt
This is to assist driver modules which do BAR resizing. Signed-off-by: Darren Salt --- drivers/pci/pci.c | 1 + drivers/pci/pci.h | 1 - include/linux/pci.h | 1 + 3 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c index b2fed944903e