Re: [PATCH V2 6/8] accel/amdxdna: Enhance power management settings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux