[PATCH V2 6/8] accel/amdxdna: Enhance power management settings
Jeffrey Hugo
quic_jhugo at quicinc.com
Fri Dec 13 16:55:42 UTC 2024
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
> + */
> +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?
> + */
> +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.
More information about the dri-devel
mailing list