[PATCH v3 2/6] drm/radeon: remove load callback from kms_driver

Wu Hoi Pok wuhoipok at gmail.com
Sun Jun 30 16:59:18 UTC 2024


The ".load" callback in "struct drm_driver" is deprecated. In order to remove
the callback, we have to manually call "radeon_driver_load_kms" instead.

Signed-off-by: Wu Hoi Pok <wuhoipok at gmail.com>
---
 drivers/gpu/drm/radeon/radeon_drv.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c
index 739bb1da9dcc..88d3de2a79f8 100644
--- a/drivers/gpu/drm/radeon/radeon_drv.c
+++ b/drivers/gpu/drm/radeon/radeon_drv.c
@@ -310,6 +310,10 @@ static int radeon_pci_probe(struct pci_dev *pdev,
 
 	pci_set_drvdata(pdev, ddev);
 
+	ret = radeon_driver_load_kms(ddev, flags);
+	if (ret)
+		goto err_agp;
+
 	ret = drm_dev_register(ddev, ent->driver_data);
 	if (ret)
 		goto err_agp;
@@ -569,7 +573,6 @@ static const struct drm_ioctl_desc radeon_ioctls_kms[] = {
 static const struct drm_driver kms_driver = {
 	.driver_features =
 	    DRIVER_GEM | DRIVER_RENDER | DRIVER_MODESET,
-	.load = radeon_driver_load_kms,
 	.open = radeon_driver_open_kms,
 	.postclose = radeon_driver_postclose_kms,
 	.unload = radeon_driver_unload_kms,
-- 
2.45.2



More information about the amd-gfx mailing list