All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2)
@ 2017-02-09  3:50 Monk Liu
       [not found] ` <1486612206-2379-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Monk Liu @ 2017-02-09  3:50 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu

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@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@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [PATCH 2/2] drm/amdgpu:cleanup
       [not found] ` <1486612206-2379-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-09  3:50   ` Monk Liu
       [not found]     ` <1486612206-2379-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  2017-02-09  4:05   ` [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2) Deucher, Alexander
  1 sibling, 1 reply; 4+ messages in thread
From: Monk Liu @ 2017-02-09  3:50 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Monk Liu

1)remove braces not needed
2)don't return failure on debugfs_firmware_init failed

Change-Id: I90ec3197184d0fdda54575bfbad7b705aa178698
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
index abd7e15..0d33bc9 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
@@ -1931,20 +1931,16 @@ int amdgpu_device_init(struct amdgpu_device *adev,
 	amdgpu_fbdev_init(adev);
 
 	r = amdgpu_gem_debugfs_init(adev);
-	if (r) {
+	if (r)
 		DRM_ERROR("registering gem debugfs failed (%d).\n", r);
-	}
 
 	r = amdgpu_debugfs_regs_init(adev);
-	if (r) {
+	if (r)
 		DRM_ERROR("registering register debugfs failed (%d).\n", r);
-	}
 
 	r = amdgpu_debugfs_firmware_init(adev);
-	if (r) {
+	if (r)
 		DRM_ERROR("registering firmware debugfs failed (%d).\n", r);
-		return r;
-	}
 
 	if ((amdgpu_testing & 1)) {
 		if (adev->accel_working)
-- 
2.7.4

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* RE: [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2)
       [not found] ` <1486612206-2379-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
  2017-02-09  3:50   ` [PATCH 2/2] drm/amdgpu:cleanup Monk Liu
@ 2017-02-09  4:05   ` Deucher, Alexander
  1 sibling, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2017-02-09  4:05 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Monk



> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Wednesday, February 08, 2017 10:50 PM
> To: amd-gfx@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@amd.com>

Reviewed-by: Alex Deucher <alexander.deucher@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@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH 2/2] drm/amdgpu:cleanup
       [not found]     ` <1486612206-2379-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
@ 2017-02-09  4:06       ` Deucher, Alexander
  0 siblings, 0 replies; 4+ messages in thread
From: Deucher, Alexander @ 2017-02-09  4:06 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW; +Cc: Liu, Monk

> -----Original Message-----
> From: amd-gfx [mailto:amd-gfx-bounces@lists.freedesktop.org] On Behalf
> Of Monk Liu
> Sent: Wednesday, February 08, 2017 10:50 PM
> To: amd-gfx@lists.freedesktop.org
> Cc: Liu, Monk
> Subject: [PATCH 2/2] drm/amdgpu:cleanup
> 
> 1)remove braces not needed
> 2)don't return failure on debugfs_firmware_init failed

I'd split these in two, one that is pure cleanup, and the second which drops the early return.  With that fixed:
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> 
> Change-Id: I90ec3197184d0fdda54575bfbad7b705aa178698
> Signed-off-by: Monk Liu <Monk.Liu@amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 10 +++-------
>  1 file changed, 3 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> index abd7e15..0d33bc9 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
> @@ -1931,20 +1931,16 @@ int amdgpu_device_init(struct amdgpu_device
> *adev,
>  	amdgpu_fbdev_init(adev);
> 
>  	r = amdgpu_gem_debugfs_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering gem debugfs failed (%d).\n", r);
> -	}
> 
>  	r = amdgpu_debugfs_regs_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering register debugfs failed (%d).\n", r);
> -	}
> 
>  	r = amdgpu_debugfs_firmware_init(adev);
> -	if (r) {
> +	if (r)
>  		DRM_ERROR("registering firmware debugfs failed (%d).\n",
> r);
> -		return r;
> -	}
> 
>  	if ((amdgpu_testing & 1)) {
>  		if (adev->accel_working)
> --
> 2.7.4
> 
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-02-09  4:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-09  3:50 [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2) Monk Liu
     [not found] ` <1486612206-2379-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-09  3:50   ` [PATCH 2/2] drm/amdgpu:cleanup Monk Liu
     [not found]     ` <1486612206-2379-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-02-09  4:06       ` Deucher, Alexander
2017-02-09  4:05   ` [PATCH 1/2] drm/amdgpu:fix amdgpu_sa_bo_new error(v2) Deucher, Alexander

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.