All of lore.kernel.org
 help / color / mirror / Atom feed
From: Oak Zeng <ozeng-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Zeng, Oak" <Oak.Zeng-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 2/7] drm/amdgpu: Vega10 doorbell index initialization
Date: Wed, 21 Nov 2018 22:00:30 +0000	[thread overview]
Message-ID: <1542837620-13571-2-git-send-email-ozeng@amd.com> (raw)
In-Reply-To: <1542837620-13571-1-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>

v2: Use enum definition instead of hardcoded value

Change-Id: Ib72058337f0aa53adfc6c6aae5341a7cd665111a
Signed-off-by: Oak Zeng <ozeng@amd.com>
Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Suggested-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/soc15.h           |  1 +
 drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c | 28 ++++++++++++++++++++++++++++
 2 files changed, 29 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.h b/drivers/gpu/drm/amd/amdgpu/soc15.h
index f8ad780..d37c57d 100644
--- a/drivers/gpu/drm/amd/amdgpu/soc15.h
+++ b/drivers/gpu/drm/amd/amdgpu/soc15.h
@@ -58,4 +58,5 @@ void soc15_program_register_sequence(struct amdgpu_device *adev,
 int vega10_reg_base_init(struct amdgpu_device *adev);
 int vega20_reg_base_init(struct amdgpu_device *adev);
 
+void vega10_doorbell_index_init(struct amdgpu_device *adev);
 #endif
diff --git a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
index c5c9b2b..9ba8e02 100644
--- a/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
+++ b/drivers/gpu/drm/amd/amdgpu/vega10_reg_init.c
@@ -56,4 +56,32 @@ int vega10_reg_base_init(struct amdgpu_device *adev)
 	return 0;
 }
 
+void vega10_doorbell_index_init(struct amdgpu_device *adev)
+{
+	adev->doorbell_index.kiq = AMDGPU_DOORBELL64_KIQ;
+	adev->doorbell_index.mec_ring0 = AMDGPU_DOORBELL64_MEC_RING0;
+	adev->doorbell_index.mec_ring1 = AMDGPU_DOORBELL64_MEC_RING1;
+	adev->doorbell_index.mec_ring2 = AMDGPU_DOORBELL64_MEC_RING2;
+	adev->doorbell_index.mec_ring3 = AMDGPU_DOORBELL64_MEC_RING3;
+	adev->doorbell_index.mec_ring4 = AMDGPU_DOORBELL64_MEC_RING4;
+	adev->doorbell_index.mec_ring5 = AMDGPU_DOORBELL64_MEC_RING5;
+	adev->doorbell_index.mec_ring6 = AMDGPU_DOORBELL64_MEC_RING6;
+	adev->doorbell_index.mec_ring7 = AMDGPU_DOORBELL64_MEC_RING7;
+	adev->doorbell_index.userqueue_start = AMDGPU_DOORBELL64_USERQUEUE_START;
+	adev->doorbell_index.userqueue_end = AMDGPU_DOORBELL64_USERQUEUE_END;
+	adev->doorbell_index.gfx_ring0 = AMDGPU_DOORBELL64_GFX_RING0;
+	adev->doorbell_index.sdma_engine0 = AMDGPU_VEGA10_DOORBELL64_sDMA_ENGINE0;
+	adev->doorbell_index.sdma_engine1 = AMDGPU_VEGA10_DOORBELL64_sDMA_ENGINE1;
+	adev->doorbell_index.ih = AMDGPU_DOORBELL64_IH;
+	adev->doorbell_index.uvd_vce.uvd_ring0_1 = AMDGPU_DOORBELL64_UVD_RING0_1;
+	adev->doorbell_index.uvd_vce.uvd_ring2_3 = AMDGPU_DOORBELL64_UVD_RING2_3;
+	adev->doorbell_index.uvd_vce.uvd_ring4_5 = AMDGPU_DOORBELL64_UVD_RING4_5;
+	adev->doorbell_index.uvd_vce.uvd_ring6_7 = AMDGPU_DOORBELL64_UVD_RING6_7;
+	adev->doorbell_index.uvd_vce.vce_ring0_1 = AMDGPU_DOORBELL64_VCE_RING0_1;
+	adev->doorbell_index.uvd_vce.vce_ring2_3 = AMDGPU_DOORBELL64_VCE_RING2_3;
+	adev->doorbell_index.uvd_vce.vce_ring4_5 = AMDGPU_DOORBELL64_VCE_RING4_5;
+	adev->doorbell_index.uvd_vce.vce_ring6_7 = AMDGPU_DOORBELL64_VCE_RING6_7;
+	/* In unit of dword doorbell */
+	adev->doorbell_index.max_assignment = AMDGPU_DOORBELL64_MAX_ASSIGNMENT << 1;
+}
 
-- 
2.7.4

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

  parent reply	other threads:[~2018-11-21 22:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-21 22:00 [PATCH 1/7] drm/amdgpu: Add field in amdgpu_dev to hold reserved doorbell index Oak Zeng
     [not found] ` <1542837620-13571-1-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:00   ` Oak Zeng [this message]
     [not found]     ` <1542837620-13571-2-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:29       ` [PATCH 2/7] drm/amdgpu: Vega10 doorbell index initialization Alex Deucher
2018-11-21 22:00   ` [PATCH 3/7] drm/amdgpu: Vega12 " Oak Zeng
     [not found]     ` <1542837620-13571-3-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:30       ` Alex Deucher
2018-11-21 22:00   ` [PATCH 4/7] drm/amdgpu: Doorbell index initialization for ASICs before vega10 Oak Zeng
     [not found]     ` <1542837620-13571-4-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:40       ` Alex Deucher
     [not found]         ` <CADnq5_OUGOecJAvQiCEcdBsk9DmjZkd-yd6aEyGvPMc1+4MsXg@mail.gmail.com>
     [not found]           ` <CADnq5_OUGOecJAvQiCEcdBsk9DmjZkd-yd6aEyGvPMc1+4MsXg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-11-26 17:20             ` Zeng, Oak
     [not found]               ` <BN6PR12MB165126A9513105183F63194880D70-/b2+HYfkarRSqX7PDniLCgdYzm3356FpvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-11-26 18:05                 ` Deucher, Alexander
2018-11-21 22:00   ` [PATCH 5/7] drm/amdgpu: Call doorbell index init on device initialization Oak Zeng
     [not found]     ` <1542837620-13571-5-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:38       ` Alex Deucher
2018-11-21 22:00   ` [PATCH 6/7] drm/amdgpu: Use asic specific doorbell index instead of macro definition Oak Zeng
     [not found]     ` <1542837620-13571-6-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:35       ` Alex Deucher
2018-11-21 22:00   ` [PATCH 7/7] drm/amdgpu: Use new doorbell layout for vega20 and future asic Oak Zeng
     [not found]     ` <1542837620-13571-7-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 22:34       ` Alex Deucher
2018-11-22 19:19       ` Zeng, Oak
2018-11-21 22:28   ` [PATCH 1/7] drm/amdgpu: Add field in amdgpu_dev to hold reserved doorbell index Alex Deucher
  -- strict thread matches above, loose matches on Subject: below --
2018-11-21 15:52 Oak Zeng
     [not found] ` <1542815518-8124-1-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 15:52   ` [PATCH 2/7] drm/amdgpu: Vega10 doorbell index initialization Oak Zeng
     [not found]     ` <1542815518-8124-2-git-send-email-ozeng-5C7GfCeVMHo@public.gmane.org>
2018-11-21 16:14       ` Alex Deucher

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=1542837620-13571-2-git-send-email-ozeng@amd.com \
    --to=ozeng-5c7gfcevmho@public.gmane.org \
    --cc=Oak.Zeng-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.