All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Chunming Zhou <David1.Zhou-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 02/10] drm/amdgpu: implement gart late_init/fini
Date: Tue, 2 Aug 2016 16:00:32 +0800	[thread overview]
Message-ID: <1470124840-26170-3-git-send-email-David1.Zhou@amd.com> (raw)
In-Reply-To: <1470124840-26170-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>

add recovery entity to gart.

Change-Id: Ieb400c8a731ef25619ea3c0b5198a6e7ce56580e
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu.h      |  3 +++
 drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 18 ++++++++++++++++++
 2 files changed, 21 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
index daf07ff..419a33b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu.h
@@ -646,6 +646,7 @@ struct amdgpu_gart {
 #endif
 	bool				ready;
 	const struct amdgpu_gart_funcs *gart_funcs;
+	struct amd_sched_entity         recover_entity;
 };
 
 int amdgpu_gart_table_ram_alloc(struct amdgpu_device *adev);
@@ -656,6 +657,8 @@ int amdgpu_gart_table_vram_pin(struct amdgpu_device *adev);
 void amdgpu_gart_table_vram_unpin(struct amdgpu_device *adev);
 int amdgpu_gart_init(struct amdgpu_device *adev);
 void amdgpu_gart_fini(struct amdgpu_device *adev);
+int amdgpu_gart_late_init(struct amdgpu_device *adev);
+void amdgpu_gart_late_fini(struct amdgpu_device *adev);
 void amdgpu_gart_unbind(struct amdgpu_device *adev, unsigned offset,
 			int pages);
 int amdgpu_gart_bind(struct amdgpu_device *adev, unsigned offset,
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
index 921bce2..c1f226b 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c
@@ -363,3 +363,21 @@ void amdgpu_gart_fini(struct amdgpu_device *adev)
 #endif
 	amdgpu_dummy_page_fini(adev);
 }
+
+int amdgpu_gart_late_init(struct amdgpu_device *adev)
+{
+	struct amd_sched_rq *rq;
+	struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
+
+	rq = &ring->sched.sched_rq[AMD_SCHED_PRIORITY_RECOVER];
+	return amd_sched_entity_init(&ring->sched, &adev->gart.recover_entity,
+				     rq, amdgpu_sched_jobs);
+
+}
+
+void amdgpu_gart_late_fini(struct amdgpu_device *adev)
+{
+	struct amdgpu_ring *ring = adev->mman.buffer_funcs_ring;
+
+	amd_sched_entity_fini(&ring->sched, &adev->gart.recover_entity);
+}
-- 
1.9.1

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

  parent reply	other threads:[~2016-08-02  8:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-02  8:00 [PATCH 00/10] GART table recovery Chunming Zhou
     [not found] ` <1470124840-26170-1-git-send-email-David1.Zhou-5C7GfCeVMHo@public.gmane.org>
2016-08-02  8:00   ` [PATCH 01/10] drm/amdgpu: make need_backup generic Chunming Zhou
2016-08-02  8:00   ` Chunming Zhou [this message]
2016-08-02  8:00   ` [PATCH 03/10] drm/amdgpu: add gart_late_init/fini to gmc V7/8 Chunming Zhou
2016-08-02  8:00   ` [PATCH 04/10] drm/amdgpu: abstract amdgpu_bo_create_shadow Chunming Zhou
2016-08-02  8:00   ` [PATCH 05/10] drm/amdgpu: shadow gart table support Chunming Zhou
2016-08-02  8:00   ` [PATCH 06/10] drm/amdgpu: make recover_bo_from_shadow be generic Chunming Zhou
2016-08-02  8:00   ` [PATCH 07/10] drm/amdgpu: implement gart recovery Chunming Zhou
2016-08-02  8:00   ` [PATCH 08/10] drm/amdgpu: recover gart table first when full reset Chunming Zhou
2016-08-02  8:00   ` [PATCH 09/10] drm/amdgpu: sync gart table before initialization completed Chunming Zhou
2016-08-02  8:00   ` [PATCH 10/10] drm/amdgpu: fix memory leak of sched fence Chunming Zhou
2016-08-02 15:15   ` [PATCH 00/10] GART table recovery Christian König
     [not found]     ` <f1b6c786-7e9c-ff61-1de9-299bc4daed15-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-03  1:33       ` zhoucm1
2016-08-03 14:01   ` Christian König
     [not found]     ` <54bb3255-2dda-f6ad-3682-8e4396ec932a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-04  3:35       ` zhoucm1
     [not found]         ` <57A2B810.6050209-5C7GfCeVMHo@public.gmane.org>
2016-08-04  9:58           ` Christian König
     [not found]             ` <077bb11d-957d-c6f2-2f87-248fbc19304a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2016-08-18  8:50               ` zhoucm1
     [not found]                 ` <57B576BB.4030400-5C7GfCeVMHo@public.gmane.org>
2016-08-18  9:03                   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1470124840-26170-3-git-send-email-David1.Zhou@amd.com \
    --to=david1.zhou-5c7gfcevmho@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.