All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amdgpu: use adev_to_drm to get drm_device
@ 2021-06-09  9:23 Guchun Chen
  2021-06-09 14:01 ` Felix Kuehling
  2021-06-09 15:38 ` Alex Deucher
  0 siblings, 2 replies; 10+ messages in thread
From: Guchun Chen @ 2021-06-09  9:23 UTC (permalink / raw)
  To: amd-gfx, luben.tuikov, felix.kuehling; +Cc: Guchun Chen

Fixes:
9faf262c32d3 drm/amdgpu: Add DMA mapping of GTT BOs
090f3a60d7e8 drm/amdgpu: Use delayed work to collect RAS error counters

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c          | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
index 016815b7a773..fb6bcc386de1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c
@@ -639,7 +639,7 @@ kfd_mem_attach_dmabuf(struct amdgpu_device *adev, struct kgd_mem *mem,
 		}
 	}
 
-	gobj = amdgpu_gem_prime_import(&adev->ddev, mem->dmabuf);
+	gobj = amdgpu_gem_prime_import(adev_to_drm(adev), mem->dmabuf);
 	if (IS_ERR(gobj))
 		return PTR_ERR(gobj);
 
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index ec936cde2726..bfbcb9ff2453 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
@@ -2122,7 +2122,7 @@ static void amdgpu_ras_counte_dw(struct work_struct *work)
 	struct amdgpu_ras *con = container_of(work, struct amdgpu_ras,
 					      ras_counte_delay_work.work);
 	struct amdgpu_device *adev = con->adev;
-	struct drm_device *dev = &adev->ddev;
+	struct drm_device *dev = adev_to_drm(adev->ddev);
 	unsigned long ce_count, ue_count;
 	int res;
 
-- 
2.17.1

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

^ permalink raw reply related	[flat|nested] 10+ messages in thread
* [PATCH] drm/amdgpu: use adev_to_drm to get drm device
@ 2022-08-25  7:48 Guchun Chen
  2022-08-25  8:13 ` Christian König
  0 siblings, 1 reply; 10+ messages in thread
From: Guchun Chen @ 2022-08-25  7:48 UTC (permalink / raw)
  To: amd-gfx, alexander.deucher, hawking.zhang, evan.quan, christian.koenig
  Cc: Guchun Chen

adev_to_drm is used everywhere in amdgpu code, so modify
it to keep consistency.

Signed-off-by: Guchun Chen <guchun.chen@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
index 8ee4e8491f39..6ea8980c8ad7 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
@@ -402,7 +402,7 @@ static void amdgpu_ctx_fini(struct kref *ref)
 		}
 	}
 
-	if (drm_dev_enter(&adev->ddev, &idx)) {
+	if (drm_dev_enter(adev_to_drm(adev), &idx)) {
 		amdgpu_ctx_set_stable_pstate(ctx, ctx->stable_pstate);
 		drm_dev_exit(idx);
 	}
-- 
2.25.1


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

end of thread, other threads:[~2022-08-25  8:13 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-09  9:23 [PATCH] drm/amdgpu: use adev_to_drm to get drm_device Guchun Chen
2021-06-09 14:01 ` Felix Kuehling
2021-06-09 15:20   ` Luben Tuikov
2021-06-09 15:32     ` Felix Kuehling
2021-06-09 15:36       ` Deucher, Alexander
2021-06-09 15:38 ` Alex Deucher
2021-06-09 17:05   ` Luben Tuikov
2021-06-10  2:06     ` Chen, Guchun
2022-08-25  7:48 [PATCH] drm/amdgpu: use adev_to_drm to get drm device Guchun Chen
2022-08-25  8:13 ` Christian König

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.