All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Alex Deucher <alexander.deucher-5C7GfCeVMHo@public.gmane.org>,
	Feifei Xu <Feifei.Xu-5C7GfCeVMHo@public.gmane.org>,
	Hawking Zhang <Hawking.Zhang-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 28/42] drm/amdgpu/gfx9: add golden setting for vega12 (v3)
Date: Wed, 21 Mar 2018 08:46:25 -0500	[thread overview]
Message-ID: <20180321134639.18782-28-alexander.deucher@amd.com> (raw)
In-Reply-To: <20180321134639.18782-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>

From: Hawking Zhang <Hawking.Zhang@amd.com>

Add gfx9_2_1 golden setting.

v2: switch to soc15_program_register_sequence for
golden setting programming
v3: squash in additional golden updates

Signed-off-by: Feifei Xu <Feifei.Xu@amd.com>
Reviewed-by: Ken Wang <ken.wang@amd.com>
Signed-off-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 44 +++++++++++++++++++++++++++++++++--
 1 file changed, 42 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
index 9ce1e9e552d9..1ae3de1094f9 100644
--- a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c
@@ -151,7 +151,42 @@ static const struct soc15_reg_golden golden_settings_gc_9_x_common[] =
 	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGRBM_CAM_DATA, 0xffffffff, 0x2544c382)
 };
 
+static const struct soc15_reg_golden golden_settings_gc_9_2_1[] =
+{
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmDB_DEBUG2, 0xf00fffff, 0x00000420),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_GPU_ID, 0x0000000f, 0x00000000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_BINNER_EVENT_CNTL_3, 0x00000003, 0x82400024),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE, 0x3fffffff, 0x00000001),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_LINE_STIPPLE_STATE, 0x0000ff0f, 0x00000000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSH_MEM_CONFIG, 0x00001000, 0x00001000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_RESOURCE_RESERVE_CU_0, 0x0007ffff, 0x00000800),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_RESOURCE_RESERVE_CU_1, 0x0007ffff, 0x00000800),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_RESOURCE_RESERVE_EN_CU_0, 0x01ffffff, 0x0000ff87),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_RESOURCE_RESERVE_EN_CU_1, 0x01ffffff, 0x0000ff8f),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSQC_CONFIG, 0x03000000, 0x020a2000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTA_CNTL_AUX, 0xfffffeef, 0x010b0000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CHAN_STEER_HI, 0xffffffff, 0x4a2c0e68),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CHAN_STEER_LO, 0xffffffff, 0xb5d3f197),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmVGT_CACHE_INVALIDATION, 0x3fff3af3, 0x19200000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmVGT_GS_MAX_WAVE_ID, 0x00000fff, 0x000003ff)
+};
+
+static const struct soc15_reg_golden golden_settings_gc_9_2_1_vg12[] =
+{
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_DCC_CONFIG, 0x00000080, 0x04000080),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL, 0xfffdf3cf, 0x00014104),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmCB_HW_CONTROL_2, 0x0f000000, 0x0a000000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG, 0xffff77ff, 0x24104041),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmGB_ADDR_CONFIG_READ, 0xffff77ff, 0x24104041),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmPA_SC_ENHANCE_1, 0xffffffff, 0x04040000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmSPI_CONFIG_CNTL_1, 0xffff03ff, 0x01000107),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CHAN_STEER_HI, 0xffffffff, 0x00000000),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTCP_CHAN_STEER_LO, 0xffffffff, 0x76325410),
+	SOC15_REG_GOLDEN_VALUE(GC, 0, mmTD_CNTL, 0x01bd9f33, 0x01000000)
+};
+
 #define VEGA10_GB_ADDR_CONFIG_GOLDEN 0x2a114042
+#define VEGA12_GB_ADDR_CONFIG_GOLDEN 0x24104041
 #define RAVEN_GB_ADDR_CONFIG_GOLDEN 0x24000042
 
 static void gfx_v9_0_set_ring_funcs(struct amdgpu_device *adev);
@@ -176,7 +211,12 @@ static void gfx_v9_0_init_golden_registers(struct amdgpu_device *adev)
 						 ARRAY_SIZE(golden_settings_gc_9_0_vg10));
 		break;
 	case CHIP_VEGA12:
-		DRM_ERROR("missing golden settings for gfx9 on vega12!\n");
+		soc15_program_register_sequence(adev,
+						golden_settings_gc_9_2_1,
+						ARRAY_SIZE(golden_settings_gc_9_2_1));
+		soc15_program_register_sequence(adev,
+						golden_settings_gc_9_2_1_vg12,
+						ARRAY_SIZE(golden_settings_gc_9_2_1_vg12));
 		break;
 	case CHIP_RAVEN:
 		soc15_program_register_sequence(adev,
@@ -987,7 +1027,7 @@ static void gfx_v9_0_gpu_early_init(struct amdgpu_device *adev)
 		adev->gfx.config.sc_prim_fifo_size_backend = 0x100;
 		adev->gfx.config.sc_hiz_tile_fifo_size = 0x30;
 		adev->gfx.config.sc_earlyz_tile_fifo_size = 0x4C0;
-		gb_addr_config = VEGA10_GB_ADDR_CONFIG_GOLDEN;
+		gb_addr_config = VEGA12_GB_ADDR_CONFIG_GOLDEN;
 		DRM_INFO("fix gfx.config for vega12\n");
 		break;
 	case CHIP_RAVEN:
-- 
2.13.6

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

  parent reply	other threads:[~2018-03-21 13:46 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-21 13:45 [PATCH 00/42] Add vega12 support Alex Deucher
     [not found] ` <20180321134639.18782-1-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-03-21 13:45   ` [PATCH 02/42] drm/amdgpu: add vega12 to asic_type enum Alex Deucher
2018-03-21 13:46   ` [PATCH 03/42] drm/amdgpu: add gpu_info firmware for vega12 Alex Deucher
2018-03-21 13:46   ` [PATCH 04/42] drm/amdgpu: set asic family and ip blocks " Alex Deucher
2018-03-21 13:46   ` [PATCH 05/42] drm/amdgpu: vega12 to smu firmware Alex Deucher
2018-03-21 13:46   ` [PATCH 06/42] drm/amdgpu/psp: initial vega12 support Alex Deucher
2018-03-21 13:46   ` [PATCH 07/42] drm/amdgpu: initilize vega12 psp firmwares Alex Deucher
2018-03-21 13:46   ` [PATCH 08/42] drm/amdgpu: add vega12 ucode loading method Alex Deucher
2018-03-21 13:46   ` [PATCH 09/42] drm/amdgpu: specify vega12 uvd firmware Alex Deucher
2018-03-21 13:46   ` [PATCH 10/42] drm/amdgpu: specify vega12 vce firmware Alex Deucher
2018-03-21 13:46   ` [PATCH 11/42] drm/amdgpu/virtual_dce: add vega12 support Alex Deucher
2018-03-21 13:46   ` [PATCH 12/42] drm/amd/display/dm: " Alex Deucher
2018-03-21 13:46   ` [PATCH 13/42] drm/amd/display: Add bios firmware info version for VG12 Alex Deucher
     [not found]     ` <20180321134639.18782-13-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-03-22 14:14       ` Harry Wentland
2018-03-21 13:46   ` [PATCH 14/42] drm/amdgpu: add vega12 to dc support check Alex Deucher
2018-03-21 13:46   ` [PATCH 15/42] drm/amdgpu/gmc9: add vega12 support Alex Deucher
2018-03-21 13:46   ` [PATCH 16/42] drm/amdgpu/gmc9: fix vega12's athub&mmhub golden setting Alex Deucher
     [not found]     ` <20180321134639.18782-16-alexander.deucher-5C7GfCeVMHo@public.gmane.org>
2018-03-21 14:19       ` Christian König
     [not found]         ` <10d031de-ed8a-2091-bedd-b7a540c118f7-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2018-03-21 14:44           ` Alex Deucher
2018-03-21 13:46   ` [PATCH 17/42] drm/amdgpu/mmhub: add clockgating support for vega12 Alex Deucher
2018-03-21 13:46   ` [PATCH 18/42] drm/amdgpu/sdma4: specify vega12 firmware Alex Deucher
2018-03-21 13:46   ` [PATCH 19/42] drm/amdgpu/sdma4: Add placeholder for vega12 golden settings Alex Deucher
2018-03-21 13:46   ` [PATCH 20/42] drm/amdgpu/sdma4: add clockgating support for vega12 Alex Deucher
2018-03-21 13:46   ` [PATCH 21/42] drm/amdgpu/sdma4: add sdma4_0_1 support for vega12 (v3) Alex Deucher
2018-03-21 13:46   ` [PATCH 22/42] drm/amdgpu/sdma4: Update vega12 sdma golden setting Alex Deucher
2018-03-21 13:46   ` [PATCH 23/42] drm/amdgpu/gfx9: add support for vega12 firmware Alex Deucher
2018-03-21 13:46   ` [PATCH 24/42] drm/amdgpu/gfx9: Add placeholder for vega12 golden settings Alex Deucher
2018-03-21 13:46   ` [PATCH 25/42] drm/amdgpu/gfx9: add gfx config for vega12 Alex Deucher
2018-03-21 13:46   ` [PATCH 26/42] drm/amdgpu/gfx9: add support " Alex Deucher
2018-03-21 13:46   ` [PATCH 27/42] drm/amdgpu/gfx9: add clockgating " Alex Deucher
2018-03-21 13:46   ` Alex Deucher [this message]
2018-03-21 13:46   ` [PATCH 29/42] drm/amdgpu/soc15: add " Alex Deucher
2018-03-21 13:46   ` [PATCH 30/42] drm/amdgpu/soc15: update vega12 cg_flags Alex Deucher
2018-03-21 13:46   ` [PATCH 31/42] drm/amd/soc15: Add external_rev_id for vega12 Alex Deucher
2018-03-21 13:46   ` [PATCH 32/42] drm/amdgpu/soc15: initialize reg base " Alex Deucher
2018-03-21 13:46   ` [PATCH 33/42] drm/amd/powerplay: add vega12_inc.h Alex Deucher
2018-03-21 13:46   ` [PATCH 34/42] drm/amd/powerplay: update atomfirmware.h (v2) Alex Deucher
2018-03-21 13:46   ` [PATCH 35/42] drm/amd/powerplay: add new smu9_driver_if.h for vega12 (v2) Alex Deucher
2018-03-21 13:46   ` [PATCH 36/42] drm/amd/powerplay: add vega12_ppsmc.h Alex Deucher
2018-03-21 13:46   ` [PATCH 37/42] drm/amd/powerplay: add vega12_pptable.h Alex Deucher
2018-03-21 13:46   ` [PATCH 38/42] drm/amd/powerplay: update ppatomfwctl (v2) Alex Deucher
2018-03-21 13:46   ` [PATCH 39/42] drm/amd/powerplay: add new pp_psm infrastructure for vega12 (v2) Alex Deucher
2018-03-21 13:46   ` [PATCH 40/42] drm/amd/powerplay: add the smu manager for vega12 (v4) Alex Deucher
2018-03-21 13:46   ` [PATCH 41/42] drm/amd/powerplay: add the hw " Alex Deucher
2018-03-21 13:46   ` [PATCH 42/42] drm/amdgpu: add vega12 pci ids (v2) Alex Deucher
2018-03-21 14:24   ` [PATCH 00/42] Add vega12 support 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=20180321134639.18782-28-alexander.deucher@amd.com \
    --to=alexdeucher-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=Feifei.Xu-5C7GfCeVMHo@public.gmane.org \
    --cc=Hawking.Zhang-5C7GfCeVMHo@public.gmane.org \
    --cc=alexander.deucher-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.