[PATCH 3/7] drm/amdgpu: init zfb start address and size

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Feifei Xu <Feifei.Xu@xxxxxxx>

Use module parameter passed from user to initialize zfb start address
and size.

Signed-off-by: Feifei Xu <Feifei.Xu at amd.com>
Signed-off-by: Hawking Zhang <Hawking.Zhang at amd.com>
Acked-by: John Bridgman <john.bridgman at amd.com>
Reviewed-by: Alex Deucher <alexander.deucher at amd.com>
Signed-off-by: Alex Deucher <alexander.deucher at amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index 887f7c9e84e0..b175178345aa 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1010,6 +1010,15 @@ static void amdgpu_device_check_arguments(struct amdgpu_device *adev)
 	}
 
 	adev->firmware.load_type = amdgpu_ucode_get_load_type(adev, amdgpu_fw_load_type);
+
+	if (amdgpu_zfb[0] > 0) {
+		dev_warn(adev->dev, "Zero Fram Buffer is enabled\n");
+		adev->gmc.zfb_phys_addr = amdgpu_zfb[1] << 20;
+		adev->gmc.zfb_size = amdgpu_zfb[0] << 20;
+	} else {
+		adev->gmc.zfb_phys_addr = 0;
+		adev->gmc.zfb_size = 0;
+	}
 }
 
 /**
-- 
2.13.6



[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux