[PATCH 1/2] drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()

2022-11-22 Thread Xiongfeng Wang
t. Add the missing pci_dev_put() to avoid refcount leak. Fixes: d8ade3526b2a ("drm/radeon: handle non-VGA class pci devices with ATRM") Fixes: c61e2775873f ("drm/radeon: split ATRM support out from the ATPX handler (v3)") Signed-off-by: Xiongfeng Wang --- drivers/gpu/drm/rade

[PATCH 0/2] drm: Fix PCI device refcount leak

2022-11-22 Thread Xiongfeng Wang
loop, the refcount of the found PCI device is increased. When finish using the PCI device, we need to call pci_dev_put() to decrease the refcount. Xiongfeng Wang (2): drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios() drm/amdgpu: Fix PCI device refcount leak in

[PATCH 2/2] drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()

2022-11-22 Thread Xiongfeng Wang
t. Add the missing pci_dev_put() to avoid refcount leak. Fixes: d38ceaf99ed0 ("drm/amdgpu: add core driver (v4)") Signed-off-by: Xiongfeng Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b

[PATCH] drm/amd: Use pci_dev_id() to simplify the code

2023-08-07 Thread Xiongfeng Wang
PCI core API pci_dev_id() can be used to get the BDF number for a pci device. We don't need to compose it mannually. Use pci_dev_id() to simplify the code a little bit. Signed-off-by: Xiongfeng Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 8 1 file changed, 4 insertions(