From: Lizhi Hou <lizhi.hou@amd.com>
To: Jeffrey Hugo <quic_jhugo@quicinc.com>, <ogabbay@kernel.org>,
<dri-devel@lists.freedesktop.org>
Cc: <linux-kernel@vger.kernel.org>, <min.ma@amd.com>,
<max.zhen@amd.com>, <sonal.santan@amd.com>, <king.tam@amd.com>,
<mario.limonciello@amd.com>,
Narendra Gutta <VenkataNarendraKumar.Gutta@amd.com>,
George Yang <George.Yang@amd.com>
Subject: Re: [PATCH V2 6/8] accel/amdxdna: Enhance power management settings
Date: Fri, 13 Dec 2024 09:31:41 -0800 [thread overview]
Message-ID: <13381637-486b-fe43-06f0-b6fe80b8ae6d@amd.com> (raw)
In-Reply-To: <58715579-1dc4-acc7-0cd4-870f1cd1f579@quicinc.com>
On 12/13/24 08:55, Jeffrey Hugo wrote:
> On 12/6/2024 2:59 PM, Lizhi Hou wrote:
>> +/**
>> + * struct amdxdna_drm_get_power_mode - Get the configured power mode
>> + * @power_mode: The mode type from enum amdxdna_power_mode_type
>> + * @pad: MBZ.
>
> I don't see a check for zero in the implementation
We discussed the 'pad' field in uapi structures. Because the driver is
not released yet, we would create a patch to change all 'pad' to MBZ and
check them in the ioctl.
>
>> + */
>> +struct amdxdna_drm_get_power_mode {
>> + __u8 power_mode;
>> + __u8 pad[7];
>> +};
>> +
>> /**
>> * struct amdxdna_drm_query_firmware_version - Query the firmware
>> version
>> * @major: The major version number
>> @@ -397,6 +416,7 @@ enum amdxdna_drm_get_param {
>> DRM_AMDXDNA_QUERY_SENSORS,
>> DRM_AMDXDNA_QUERY_HW_CONTEXTS,
>> DRM_AMDXDNA_QUERY_FIRMWARE_VERSION = 8,
>> + DRM_AMDXDNA_GET_POWER_MODE,
>> };
>> /**
>> @@ -411,6 +431,34 @@ struct amdxdna_drm_get_info {
>> __u64 buffer; /* in/out */
>> };
>> +enum amdxdna_drm_set_param {
>> + DRM_AMDXDNA_SET_POWER_MODE,
>> + DRM_AMDXDNA_WRITE_AIE_MEM,
>> + DRM_AMDXDNA_WRITE_AIE_REG,
>> +};
>> +
>> +/**
>> + * struct amdxdna_drm_set_state - Set the state of the AIE hardware.
>> + * @param: Value in enum amdxdna_drm_set_param.
>> + * @buffer_size: Size of the input param.
>> + * @buffer: Input param.
>
> Is this a pointer address? Maybe clarify that?
Yes, it is. I will add comment for it.
Thanks,
Lizhi
>
>> + */
>> +struct amdxdna_drm_set_state {
>> + __u32 param; /* in */
>> + __u32 buffer_size; /* in */
>> + __u64 buffer; /* in */
>> +};
>> +
>> +/**
>> + * struct amdxdna_drm_set_power_mode - Set the power mode of the AIE
>> hardware
>> + * @power_mode: The sensor type from enum amdxdna_power_mode_type
>> + * @pad: MBZ.
>
> I don't see a check for zero in the implementation.
>
next prev parent reply other threads:[~2024-12-13 17:31 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-06 21:59 [PATCH V2 0/8] AMD NPU driver improvements Lizhi Hou
2024-12-06 21:59 ` [PATCH V2 1/8] accel/amdxdna: Add device status for aie2 devices Lizhi Hou
2024-12-11 0:31 ` Mario Limonciello
2024-12-13 16:31 ` Jeffrey Hugo
2024-12-06 21:59 ` [PATCH V2 2/8] accel/amdxdna: Replace mmput with mmput_async to avoid dead lock Lizhi Hou
2024-12-13 16:33 ` Jeffrey Hugo
2024-12-06 21:59 ` [PATCH V2 3/8] accel/amdxdna: Add RyzenAI-npu6 support Lizhi Hou
2024-12-11 0:30 ` Mario Limonciello
2024-12-13 16:37 ` Jeffrey Hugo
2024-12-13 16:47 ` Lizhi Hou
2024-12-06 21:59 ` [PATCH V2 4/8] accel/amdxdna: Replace idr api with xarray Lizhi Hou
2024-12-13 16:42 ` Jeffrey Hugo
2024-12-13 16:50 ` Lizhi Hou
2024-12-06 21:59 ` [PATCH V2 5/8] accel/amdxdna: Add query firmware version Lizhi Hou
2024-12-11 0:28 ` Mario Limonciello
2024-12-13 16:48 ` Jeffrey Hugo
2024-12-06 21:59 ` [PATCH V2 6/8] accel/amdxdna: Enhance power management settings Lizhi Hou
2024-12-11 0:28 ` Mario Limonciello
2024-12-11 5:28 ` Lizhi Hou
2024-12-11 20:55 ` Mario Limonciello
2024-12-13 16:55 ` Jeffrey Hugo
2024-12-13 17:31 ` Lizhi Hou [this message]
2024-12-06 22:00 ` [PATCH V2 7/8] accel/amdxdna: Read firmware interface version from registers Lizhi Hou
2024-12-11 0:20 ` Mario Limonciello
2024-12-11 5:32 ` Lizhi Hou
2024-12-13 16:58 ` Jeffrey Hugo
2024-12-13 17:02 ` Lizhi Hou
2024-12-13 17:11 ` Jeffrey Hugo
2024-12-06 22:00 ` [PATCH V2 8/8] accel/amdxdna: Add include interrupt.h to amdxdna_mailbox.c Lizhi Hou
2024-12-10 20:54 ` Mario Limonciello
2024-12-13 16:20 ` Jeffrey Hugo
2024-12-13 16:42 ` Lizhi Hou
2024-12-13 17:00 ` [PATCH V2 0/8] AMD NPU driver improvements Jeffrey Hugo
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=13381637-486b-fe43-06f0-b6fe80b8ae6d@amd.com \
--to=lizhi.hou@amd.com \
--cc=George.Yang@amd.com \
--cc=VenkataNarendraKumar.Gutta@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=king.tam@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mario.limonciello@amd.com \
--cc=max.zhen@amd.com \
--cc=min.ma@amd.com \
--cc=ogabbay@kernel.org \
--cc=quic_jhugo@quicinc.com \
--cc=sonal.santan@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®