drm/radeon/kms: clean up gart dummy page handling
Subsystems (2)
PATCH 1/1 drm/radeon/kms: clean up gart dummy page handling
As per Konrad's original patch, the dummy page used by the gart code and allocated in radeon_gart_init() was not freed properly in radeon_gart_fini().
At the same time r6xx and newer allocated and freed the dummy page on their own. So to do Konrad's patch one better, just remove the allocation and freeing of the dummy page in the r6xx, 7xx, evergreen, and ni code and allocate and free in the gart_init/fini() functions for all asics.
--- drivers/gpu/drm/radeon/evergreen.c | 4 ---- drivers/gpu/drm/radeon/r600.c | 4 ---- drivers/gpu/drm/radeon/radeon_gart.c | 2 ++ drivers/gpu/drm/radeon/rv770.c | 4 ---- 4 files changed, 2 insertions(+), 12 deletions(-)
drivers/gpu/drm/radeon/evergreen.c +0 -4
@@ -3036,9 +3036,6 @@ int evergreen_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;/* This don't do much */ r =radeon_gem_init (rdev);if (r)
@@ -3150,7 +3147,6 @@ void evergreen_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }static void evergreen_pcie_gen2_enable (struct radeon_device *rdev)
drivers/gpu/drm/radeon/r600.c +0 -4
@@ -2509,9 +2509,6 @@ int r600_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;if (r600_debugfs_mc_info_init (rdev)) {DRM_ERROR ("Failed to register debugfs file for mc !\n" ); }
@@ -2625,7 +2622,6 @@ void r600_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }
drivers/gpu/drm/radeon/radeon_gart.c +2 -0
@@ -285,4 +285,6 @@ void radeon_gart_fini(struct radeon_device *rdev) rdev->gart.pages =NULL ; rdev->gart.pages_addr =NULL ; rdev->gart.ttm_alloced =NULL ; + +radeon_dummy_page_fini (rdev); }
drivers/gpu/drm/radeon/rv770.c +0 -4
@@ -1255,9 +1255,6 @@ int rv770_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;/* This don't do much */ r =radeon_gem_init (rdev);if (r)
@@ -1372,7 +1369,6 @@ void rv770_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }static void rv770_pcie_gen2_enable (struct radeon_device *rdev)
Signature · 1 line
1.7.1.1
Quoted 11 lines · Alex Deucher
As per Konrad's original patch, the dummy page used by the gart code and allocated in
radeon_gart_init()was not freed properly inradeon_gart_fini().At the same time r6xx and newer allocated and freed the dummy page on their own. So to do Konrad's patch one better, just remove the allocation and freeing of the dummy page in the r6xx, 7xx, evergreen, and ni code and allocate and free in the gart_init/fini() functions for all asics.
Quoted 3 lines
Cc Konrad Rzeszutek Wilk <[email protected]>Cc Jerome Glisse <[email protected]>Signed-off-by Alex Deucher <[email protected]>
Signature · 6 lines
Earthling Michel Dänzer | http://www.vmware.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 4 lines · Alex Deucher
As per Konrad's original patch, the dummy page used by the gart code and allocated in
radeon_gart_init()was not freed properly inradeon_gart_fini().
Quoted 8 lines
At the same time r6xx and newer allocated and freed the dummy page on their own. So to do Konrad's patch one better, just remove the allocation and freeing of the dummy page in the r6xx, 7xx, evergreen, and ni code and allocate and free in the gart_init/fini() functions for all asics.
Cc Konrad Rzeszutek Wilk <[email protected]>
You can convert that to Acked-by. Been running with this patch for a couple of weeks (months?) with no ill effects.
Quoted 88 lines
Cc Jerome Glisse <[email protected]>Signed-off-by Alex Deucher <[email protected]>--- drivers/gpu/drm/radeon/evergreen.c | 4 ---- drivers/gpu/drm/radeon/r600.c | 4 ---- drivers/gpu/drm/radeon/radeon_gart.c | 2 ++ drivers/gpu/drm/radeon/rv770.c | 4 ---- 4 files changed, 2 insertions(+), 12 deletions(-)drivers/gpu/drm/radeon/evergreen.c +0
-4@@ -3036,9 +3036,6 @@ int evergreen_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;/* This don't do much */ r =radeon_gem_init (rdev);if (r)@@ -3150,7 +3147,6 @@ void evergreen_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }static void evergreen_pcie_gen2_enable (struct radeon_device *rdev)drivers/gpu/drm/radeon/r600.c +0
-4@@ -2509,9 +2509,6 @@ int r600_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;if (r600_debugfs_mc_info_init (rdev)) {DRM_ERROR ("Failed to register debugfs file for mc !\n" ); }@@ -2625,7 +2622,6 @@ void r600_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }drivers/gpu/drm/radeon/radeon_gart.c +2
-0@@ -285,4 +285,6 @@ void radeon_gart_fini(struct radeon_device *rdev) rdev->gart.pages =NULL ; rdev->gart.pages_addr =NULL ; rdev->gart.ttm_alloced =NULL ; + +radeon_dummy_page_fini (rdev); }drivers/gpu/drm/radeon/rv770.c +0
-4@@ -1255,9 +1255,6 @@ int rv770_init(struct radeon_device *rdev) {int r; - r =radeon_dummy_page_init (rdev); -if (r) -return r;/* This don't do much */ r =radeon_gem_init (rdev);if (r)@@ -1372,7 +1369,6 @@ void rv770_fini(struct radeon_device *rdev)radeon_atombios_fini (rdev);kfree (rdev->bios); rdev->bios =NULL ; -radeon_dummy_page_fini (rdev); }static void rv770_pcie_gen2_enable (struct radeon_device *rdev)Signature · 1 line
1.7.1.1