From: Huang Rui <ray.huang@amd.com>
To: "Liu, Aaron" <Aaron.Liu@amd.com>
Cc: "Deucher, Alexander" <Alexander.Deucher@amd.com>,
"amd-gfx@lists.freedesktop.org" <amd-gfx@lists.freedesktop.org>
Subject: Re: [PATCH] drm/amdgpu: modify system reference clock source for navi+
Date: Tue, 18 May 2021 16:04:07 +0800 [thread overview]
Message-ID: <20210518080407.GA1853643@hr-amd> (raw)
In-Reply-To: <20210518062603.1357891-1-aaron.liu@amd.com>
On Tue, May 18, 2021 at 02:26:03PM +0800, Liu, Aaron wrote:
> Starting from Navi+, the rlc reference clock is used for system clock
> from vbios gfx_info table. It is incorrect to use core_refclk_10khz of
> vbios smu_info table as system clock.
>
> Signed-off-by: Aaron Liu <aaron.liu@amd.com>
Acked-by: Huang Rui <ray.huang@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 15 +++++++++++++++
> 1 file changed, 15 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> index 8c417014ca89..83ca58426139 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c
> @@ -546,6 +546,21 @@ int amdgpu_atomfirmware_get_clock_info(struct amdgpu_device *adev)
> ret = 0;
> }
>
> + /* if asic is Navi+, the rlc reference clock is used for system clock
> + * from vbios gfx_info table */
> + if (adev->asic_type >= CHIP_NAVI10) {
> + index = get_index_into_master_table(atom_master_list_of_data_tables_v2_1,
> + gfx_info);
> + if (amdgpu_atom_parse_data_header(mode_info->atom_context, index, NULL,
> + &frev, &crev, &data_offset)) {
> + struct atom_gfx_info_v2_2 *gfx_info = (struct atom_gfx_info_v2_2*)
> + (mode_info->atom_context->bios + data_offset);
> + if ((frev >= 2) && (crev >= 2))
> + spll->reference_freq = le32_to_cpu(gfx_info->rlc_gpu_timer_refclk);
> + ret = 0;
> + }
> + }
> +
> return ret;
> }
>
> --
> 2.25.1
>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2021-05-18 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-18 6:26 [PATCH] drm/amdgpu: modify system reference clock source for navi+ Aaron Liu
2021-05-18 8:04 ` Huang Rui [this message]
2021-05-18 9:36 ` Wang, Kevin(Yang)
2021-05-18 12:55 ` 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=20210518080407.GA1853643@hr-amd \
--to=ray.huang@amd.com \
--cc=Aaron.Liu@amd.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.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.