[PATCH 4/8] drm/amdgpu: init zfb start address and size

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

 



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 <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>
> ---
>   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);
>   }
>   



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

  Powered by Linux