From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: Luben Tuikov <luben.tuikov@amd.com>, amd-gfx@lists.freedesktop.org
Cc: Alex Deucher <Alexander.Deucher@amd.com>
Subject: Re: [PATCH] drm/amdgpu: Add "harvest" to IP discovery sysfs
Date: Tue, 15 Feb 2022 17:21:05 +0100 [thread overview]
Message-ID: <ba9088ae-e7ca-ad44-e107-105ff5ec4e1c@gmail.com> (raw)
In-Reply-To: <20220214232154.6421-1-luben.tuikov@amd.com>
Am 15.02.22 um 00:21 schrieb Luben Tuikov:
> Add the "harvest" field to the IP attributes in
> the IP discovery sysfs visualization, as this
> field is present in the binary data.
>
> Cc: Alex Deucher <Alexander.Deucher@amd.com>
> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> index c8dbdb78988ce0..0496d369504641 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
> @@ -393,6 +393,7 @@ struct ip_hw_instance {
> int hw_id;
> u8 num_instance;
> u8 major, minor, revision;
> + u8 harvest;
>
> int num_base_addresses;
> u32 base_addr[];
> @@ -440,6 +441,11 @@ static ssize_t revision_show(struct ip_hw_instance *ip_hw_instance, char *buf)
> return sysfs_emit(buf, "%d\n", ip_hw_instance->revision);
> }
>
> +static ssize_t harvest_show(struct ip_hw_instance *ip_hw_instance, char *buf)
> +{
> + return sysfs_emit(buf, "0x%01X\n", ip_hw_instance->harvest);
> +}
> +
Maybe add a comment regarding Guchun's concern. With that done feel free
to add a Reviewed-by: Christian König <christian.koenig@amd.com>
Regards,
Christian.
> static ssize_t num_base_addresses_show(struct ip_hw_instance *ip_hw_instance, char *buf)
> {
> return sysfs_emit(buf, "%d\n", ip_hw_instance->num_base_addresses);
> @@ -471,6 +477,7 @@ static struct ip_hw_instance_attr ip_hw_attr[] = {
> __ATTR_RO(major),
> __ATTR_RO(minor),
> __ATTR_RO(revision),
> + __ATTR_RO(harvest),
> __ATTR_RO(num_base_addresses),
> __ATTR_RO(base_addr),
> };
> @@ -708,6 +715,7 @@ static int amdgpu_discovery_sysfs_ips(struct amdgpu_device *adev,
> ip_hw_instance->major = ip->major;
> ip_hw_instance->minor = ip->minor;
> ip_hw_instance->revision = ip->revision;
> + ip_hw_instance->harvest = ip->harvest;
> ip_hw_instance->num_base_addresses = ip->num_base_address;
>
> for (kk = 0; kk < ip_hw_instance->num_base_addresses; kk++)
>
> base-commit: d8604f1d237a145db48bae4ea60b85a5875df307
next prev parent reply other threads:[~2022-02-15 16:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 23:18 [PATCH] drm/amdgpu: Add "harvest" to IP discovery sysfs Luben Tuikov
2022-02-14 23:21 ` Luben Tuikov
2022-02-15 8:58 ` Chen, Guchun
2022-02-15 14:15 ` Luben Tuikov
2022-02-15 14:25 ` Christian König
2022-02-15 14:33 ` Luben Tuikov
2022-02-15 14:37 ` Christian König
2022-02-15 14:39 ` Luben Tuikov
2022-02-15 16:21 ` Christian König [this message]
2022-02-15 17:59 ` 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=ba9088ae-e7ca-ad44-e107-105ff5ec4e1c@gmail.com \
--to=ckoenig.leichtzumerken@gmail.com \
--cc=Alexander.Deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=luben.tuikov@amd.com \
/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.