Am 15.03.2018 um 07:12 schrieb Feifei Xu:
Use module parameter passed from user to initialize zfb start address
and size.
Change-Id: I3d786e863114a217f89ff7c3d4ffdabf000f31a4
Signed-off-by: Feifei Xu <[email protected]>
Signed-off-by: Hawking Zhang <[email protected]>
Acked-by: John Bridgman <[email protected]>
Reviewed-by: Alex Deucher <[email protected]>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 2188763..b88cb4b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -859,6 +859,16 @@ static void amdgpu_device_check_arguments(struct
amdgpu_device *adev)
amdgpu_lockup_timeout = 10000;
}
+ if (amdgpu_zfb[0] > 0) {
+ dev_warn(adev->dev,
+ "Zero Frame Buffer is enabled.\n");
+ adev->gmc.zfb_phys_addr = amdgpu_zfb[1] << 20;
+ adev->gmc.zfb_size = amdgpu_zfb[0] << 20;
As discussed please use dma_alloc_coherent() to allocate from CMA here
instead of specifying the DMA address manually.
Christian.
+ } else {
+ adev->gmc.zfb_phys_addr = 0;
+ adev->gmc.zfb_size = 0;
+ }
+
adev->firmware.load_type = amdgpu_ucode_get_load_type(adev,
amdgpu_fw_load_type);
}
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx