<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<p style="font-family:Arial;font-size:10pt;color:#0078D7;margin:15pt;" align="Left">
[AMD Official Use Only - Internal Distribution Only]<br>
</p>
<br>
<div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Thanks very much Luben!</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Rico<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Tuikov, Luben <Luben.Tuikov@amd.com><br>
<b>Sent:</b> Wednesday, July 29, 2020 2:29<br>
<b>To:</b> Yin, Tianci (Rico) <Tianci.Yin@amd.com>; amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org><br>
<b>Cc:</b> Deucher, Alexander <Alexander.Deucher@amd.com>; Zhang, Hawking <Hawking.Zhang@amd.com>; Xu, Feifei <Feifei.Xu@amd.com>; Hesik, Christopher <Christopher.Hesik@amd.com>; Swamy, Manjunatha <Manjunatha.Swamy@amd.com>; Quan, Evan <Evan.Quan@amd.com>;
Feng, Kenneth <Kenneth.Feng@amd.com><br>
<b>Subject:</b> Re: [PATCH 1/2] drm/amdgpu: add interface amdgpu_gfx_init_spm_golden for Navi1x</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On 2020-07-28 1:27 a.m., Tianci Yin wrote:<br>
> From: "Tianci.Yin" <tianci.yin@amd.com><br>
> <br>
> On Navi1x, the SPM golden settings will be lost after GFXOFF enter/exit,<br>
<br>
Use present tense:............... " are lost after "<br>
<br>
> reconfiguration is needed. Make the configuration code as an interface for<br>
<br>
Add "so a reconfiguration is needed. "<br>
<br>
> future use.<br>
> <br>
<br>
If the lines of your commit message are too long, then "git push" complains<br>
about them. Sixty char wide is perfect, since "git log" indents them when<br>
displaying them.<br>
<br>
With this fixed, then Reviewed-by: Luben Tuikov <luben.tuikov@amd.com><br>
<br>
Regards,<br>
Luben<br>
<br>
> Change-Id: I172f3dc7f59da69b0364052dcad75a9c9aab019e<br>
> Signed-off-by: Tianci.Yin <tianci.yin@amd.com><br>
> ---<br>
> drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 2 ++<br>
> drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 34 ++++++++++++++++++-------<br>
> 2 files changed, 27 insertions(+), 9 deletions(-)<br>
> <br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h<br>
> index 1e7a2b0997c5..a611e78dd4ba 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h<br>
> @@ -216,6 +216,7 @@ struct amdgpu_gfx_funcs {<br>
> int (*ras_error_inject)(struct amdgpu_device *adev, void *inject_if);<br>
> int (*query_ras_error_count) (struct amdgpu_device *adev, void *ras_error_status);<br>
> void (*reset_ras_error_count) (struct amdgpu_device *adev);<br>
> + void (*init_spm_golden)(struct amdgpu_device *adev);<br>
> };<br>
> <br>
> struct sq_work {<br>
> @@ -324,6 +325,7 @@ struct amdgpu_gfx {<br>
> #define amdgpu_gfx_get_gpu_clock_counter(adev) (adev)->gfx.funcs->get_gpu_clock_counter((adev))<br>
> #define amdgpu_gfx_select_se_sh(adev, se, sh, instance) (adev)->gfx.funcs->select_se_sh((adev), (se), (sh), (instance))<br>
> #define amdgpu_gfx_select_me_pipe_q(adev, me, pipe, q, vmid) (adev)->gfx.funcs->select_me_pipe_q((adev), (me), (pipe), (q), (vmid))<br>
> +#define amdgpu_gfx_init_spm_golden(adev) (adev)->gfx.funcs->init_spm_golden((adev))<br>
> <br>
> /**<br>
> * amdgpu_gfx_create_bitmask - create a bitmask<br>
> diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
> index db9f1e89a0f8..da21ad04ac0f 100644<br>
> --- a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
> +++ b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c<br>
> @@ -3307,6 +3307,29 @@ static void gfx_v10_0_set_kiq_pm4_funcs(struct amdgpu_device *adev)<br>
> adev->gfx.kiq.pmf = &gfx_v10_0_kiq_pm4_funcs;<br>
> }<br>
> <br>
> +static void gfx_v10_0_init_spm_golden_registers(struct amdgpu_device *adev)<br>
> +{<br>
> + switch (adev->asic_type) {<br>
> + case CHIP_NAVI10:<br>
> + soc15_program_register_sequence(adev,<br>
> + golden_settings_gc_rlc_spm_10_0_nv10,<br>
> + (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_0_nv10));<br>
> + break;<br>
> + case CHIP_NAVI14:<br>
> + soc15_program_register_sequence(adev,<br>
> + golden_settings_gc_rlc_spm_10_1_nv14,<br>
> + (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_nv14));<br>
> + break;<br>
> + case CHIP_NAVI12:<br>
> + soc15_program_register_sequence(adev,<br>
> + golden_settings_gc_rlc_spm_10_1_2_nv12,<br>
> + (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_2_nv12));<br>
> + break;<br>
> + default:<br>
> + break;<br>
> + }<br>
> +}<br>
> +<br>
> static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)<br>
> {<br>
> switch (adev->asic_type) {<br>
> @@ -3317,9 +3340,6 @@ static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)<br>
> soc15_program_register_sequence(adev,<br>
> golden_settings_gc_10_0_nv10,<br>
> (const u32)ARRAY_SIZE(golden_settings_gc_10_0_nv10));<br>
> - soc15_program_register_sequence(adev,<br>
> - golden_settings_gc_rlc_spm_10_0_nv10,<br>
> - (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_0_nv10));<br>
> break;<br>
> case CHIP_NAVI14:<br>
> soc15_program_register_sequence(adev,<br>
> @@ -3328,9 +3348,6 @@ static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)<br>
> soc15_program_register_sequence(adev,<br>
> golden_settings_gc_10_1_nv14,<br>
> (const u32)ARRAY_SIZE(golden_settings_gc_10_1_nv14));<br>
> - soc15_program_register_sequence(adev,<br>
> - golden_settings_gc_rlc_spm_10_1_nv14,<br>
> - (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_nv14));<br>
> break;<br>
> case CHIP_NAVI12:<br>
> soc15_program_register_sequence(adev,<br>
> @@ -3339,9 +3356,6 @@ static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)<br>
> soc15_program_register_sequence(adev,<br>
> golden_settings_gc_10_1_2_nv12,<br>
> (const u32)ARRAY_SIZE(golden_settings_gc_10_1_2_nv12));<br>
> - soc15_program_register_sequence(adev,<br>
> - golden_settings_gc_rlc_spm_10_1_2_nv12,<br>
> - (const u32)ARRAY_SIZE(golden_settings_gc_rlc_spm_10_1_2_nv12));<br>
> break;<br>
> case CHIP_SIENNA_CICHLID:<br>
> soc15_program_register_sequence(adev,<br>
> @@ -3360,6 +3374,7 @@ static void gfx_v10_0_init_golden_registers(struct amdgpu_device *adev)<br>
> default:<br>
> break;<br>
> }<br>
> + gfx_v10_0_init_spm_golden_registers(adev);<br>
> }<br>
> <br>
> static void gfx_v10_0_scratch_init(struct amdgpu_device *adev)<br>
> @@ -4147,6 +4162,7 @@ static const struct amdgpu_gfx_funcs gfx_v10_0_gfx_funcs = {<br>
> .read_wave_sgprs = &gfx_v10_0_read_wave_sgprs,<br>
> .read_wave_vgprs = &gfx_v10_0_read_wave_vgprs,<br>
> .select_me_pipe_q = &gfx_v10_0_select_me_pipe_q,<br>
> + .init_spm_golden = &gfx_v10_0_init_spm_golden_registers,<br>
> };<br>
> <br>
> static void gfx_v10_0_gpu_early_init(struct amdgpu_device *adev)<br>
> <br>
<br>
</div>
</span></font></div>
</div>
</body>
</html>