Skip to content

Commit dffe544

Browse files
author
Herton R. Krzesinski
committed
Merge: drm/amd: Delay removal of the firmware framebuffer
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/1906 Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2155886 Upstream Status: v6.2-rc4 commit 1923bc5 Author: Mario Limonciello <mario.limonciello@amd.com> AuthorDate: Tue Dec 27 15:49:17 2022 -0600 Commit: Alex Deucher <alexander.deucher@amd.com> CommitDate: Mon Jan 9 16:50:00 2023 -0500 Removing the firmware framebuffer from the driver means that even if the driver doesn't support the IP blocks in a GPU it will no longer be functional after the driver fails to initialize. This change will ensure that unsupported IP blocks at least cause the driver to work with the EFI framebuffer. Cc: stable@vger.kernel.org Suggested-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Reviewed-by: Lijo Lazar <lijo.lazar@amd.com> Signed-off-by: Mario Limonciello <mario.limonciello@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Michel Dänzer <mdaenzer@redhat.com> Approved-by: Jocelyn Falempe <jfalempe@redhat.com> Approved-by: John B. Wyatt IV <jwyatt@redhat.com> Signed-off-by: Herton R. Krzesinski <herton@redhat.com>
2 parents 9582ebc + 8ba36ca commit dffe544

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include <generated/utsrelease.h>
3737
#include <linux/pci-p2pdma.h>
3838

39+
#include <drm/drm_aperture.h>
3940
#include <drm/drm_atomic_helper.h>
4041
#include <drm/drm_probe_helper.h>
4142
#include <drm/amdgpu_drm.h>
@@ -89,6 +90,8 @@ MODULE_FIRMWARE("amdgpu/navi12_gpu_info.bin");
8990
#define AMDGPU_MAX_RETRY_LIMIT 2
9091
#define AMDGPU_RETRY_SRIOV_RESET(r) ((r) == -EBUSY || (r) == -ETIMEDOUT || (r) == -EINVAL)
9192

93+
static const struct drm_driver amdgpu_kms_driver;
94+
9295
const char *amdgpu_asic_name[] = {
9396
"TAHITI",
9497
"PITCAIRN",
@@ -3666,6 +3669,11 @@ int amdgpu_device_init(struct amdgpu_device *adev,
36663669
if (r)
36673670
return r;
36683671

3672+
/* Get rid of things like offb */
3673+
r = drm_aperture_remove_conflicting_pci_framebuffers(adev->pdev, &amdgpu_kms_driver);
3674+
if (r)
3675+
return r;
3676+
36693677
/* Enable TMZ based on IP_VERSION */
36703678
amdgpu_gmc_tmz_set(adev);
36713679

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323
*/
2424

2525
#include <drm/amdgpu_drm.h>
26-
#include <drm/drm_aperture.h>
2726
#include <drm/drm_drv.h>
2827
#include <drm/drm_gem.h>
2928
#include <drm/drm_vblank.h>
@@ -2072,11 +2071,6 @@ static int amdgpu_pci_probe(struct pci_dev *pdev,
20722071
}
20732072
#endif
20742073

2075-
/* Get rid of things like offb */
2076-
ret = drm_aperture_remove_conflicting_pci_framebuffers(pdev, &amdgpu_kms_driver);
2077-
if (ret)
2078-
return ret;
2079-
20802074
adev = devm_drm_dev_alloc(&pdev->dev, &amdgpu_kms_driver, typeof(*adev), ddev);
20812075
if (IS_ERR(adev))
20822076
return PTR_ERR(adev);

0 commit comments

Comments
 (0)