[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <13381637-486b-fe43-06f0-b6fe80b8ae6d@amd.com>
Date: Fri, 13 Dec 2024 09:31:41 -0800
From: Lizhi Hou <lizhi.hou@....com>
To: Jeffrey Hugo <quic_jhugo@...cinc.com>, <ogabbay@...nel.org>,
<dri-devel@...ts.freedesktop.org>
CC: <linux-kernel@...r.kernel.org>, <min.ma@....com>, <max.zhen@....com>,
<sonal.santan@....com>, <king.tam@....com>, <mario.limonciello@....com>,
Narendra Gutta <VenkataNarendraKumar.Gutta@....com>, George Yang
<George.Yang@....com>
Subject: Re: [PATCH V2 6/8] accel/amdxdna: Enhance power management settings
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.
>
Powered by blists - more mailing lists