[PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2)

Deucher, Alexander Alexander.Deucher at amd.com
Thu Feb 9 04:05:18 UTC 2017



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces at lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Wednesday, February 08, 2017 10:50 PM
> To: amd-gfx at lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2)
> 
> ib_pool init should prior to fbdev_init, otherwise
> there will be error from amdgpu_sa_bo_new
> (amdgpu_sa.c:323)
> 
> fbdev_init will call ttm_validate which further call
> amdgpu_sa_bo_new.
> 
> v2:
> move fbdev_init behind ib test.
> 
> Change-Id: I3a969570d443f61a44f67b0d76b3871ca5c3ea81
> Signed-off-by: Monk Liu <Monk.Liu at amd.com>

Reviewed-by: Alex Deucher <alexander.deucher at amd.com>

> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index afcae15..abd7e15 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1918,8 +1918,6 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	/* Get a log2 for easy divisions. */
>  	adev->mm_stats.log2_max_MBps = ilog2(max(1u, max_MBps));
> 
> -	amdgpu_fbdev_init(adev);
> -
>  	r = amdgpu_ib_pool_init(adev);
>  	if (r) {
>  		dev_err(adev->dev, "IB initialization failed (%d).\n", r);
> @@ -1930,6 +1928,8 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	if (r)
>  		DRM_ERROR("ib ring test failed (%d).\n", r);
> 
> +	amdgpu_fbdev_init(adev);
> +
>  	r = amdgpu_gem_debugfs_init(adev);
>  	if (r) {
>  		DRM_ERROR("registering gem debugfs failed (%d).\n", r);
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx


More information about the amd-gfx mailing list