summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
diff options
context:
space:
mode:
authorTaimur Hassan <Syed.Hassan@amd.com>2025-09-26 16:15:01 -0400
committerAlex Deucher <alexander.deucher@amd.com>2025-10-13 14:14:32 -0400
commit6d40b93194a0fdeb07fa63e92227940fde04e527 (patch)
tree8169aebf9245fcbca1d62b6aee3aa357fb27a798 /drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
parent8e8691ecee8239634dd9a5f87655fba9bb1ee874 (diff)
drm/amd/display: [FW Promotion] Release 0.1.30.0
Add new SMART_POWER_HDR commands to optimize power consumption on certain OLED LED panels by sending MaxCLL per frame to TCON. Reviewed-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Taimur Hassan <Syed.Hassan@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h')
-rw-r--r--drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
index 0a250699999c..be6151d529d8 100644
--- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
+++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h
@@ -1725,6 +1725,11 @@ enum dmub_cmd_type {
DMUB_CMD__CURSOR_OFFLOAD = 92,
/**
+ * Command type used for all SMART_POWER_HDR commands.
+ */
+ DMUB_CMD__SMART_POWER_HDR = 93,
+
+ /**
* Command type use for VBIOS shared commands.
*/
DMUB_CMD__VBIOS = 128,
@@ -4393,6 +4398,45 @@ enum replay_enable {
};
/**
+ * Data passed from driver to FW in a DMUB_CMD__SMART_POWER_HDR_ENABLE command.
+ */
+struct dmub_rb_cmd_smart_power_hdr_enable_data {
+ /**
+ * SMART_POWER_HDR enable or disable.
+ */
+ uint8_t enable;
+ /**
+ * Panel Instance.
+ * Panel isntance to identify which replay_state to use
+ * Currently the support is only for 0 or 1
+ */
+ uint8_t panel_inst;
+
+ uint16_t peak_nits;
+ /**
+ * OTG HW instance.
+ */
+ uint8_t otg_inst;
+ /**
+ * DIG FE HW instance.
+ */
+ uint8_t digfe_inst;
+ /**
+ * DIG BE HW instance.
+ */
+ uint8_t digbe_inst;
+ uint8_t debugcontrol;
+ /*
+ * vertical interrupt trigger line
+ */
+ uint32_t triggerline;
+
+ uint16_t fixed_max_cll;
+
+ uint8_t pad[2];
+};
+
+/**
* Data passed from driver to FW in a DMUB_CMD__REPLAY_ENABLE command.
*/
struct dmub_rb_cmd_replay_enable_data {
@@ -4726,6 +4770,58 @@ union dmub_replay_cmd_set {
};
/**
+ * SMART POWER HDR command sub-types.
+ */
+enum dmub_cmd_smart_power_hdr_type {
+
+ /**
+ * Enable/Disable SMART_POWER_HDR.
+ */
+ DMUB_CMD__SMART_POWER_HDR_ENABLE = 1,
+ /**
+ * Get current MaxCLL value if SMART POWER HDR is enabled.
+ */
+ DMUB_CMD__SMART_POWER_HDR_GETMAXCLL = 2,
+};
+
+/**
+ * Definition of a DMUB_CMD__SMART_POWER_HDR command.
+ */
+struct dmub_rb_cmd_smart_power_hdr_enable {
+ /**
+ * Command header.
+ */
+ struct dmub_cmd_header header;
+
+ struct dmub_rb_cmd_smart_power_hdr_enable_data data;
+};
+
+struct dmub_cmd_smart_power_hdr_getmaxcll_input {
+ uint8_t panel_inst;
+ uint8_t pad[3];
+};
+
+struct dmub_cmd_smart_power_hdr_getmaxcll_output {
+ uint16_t current_max_cll;
+ uint8_t pad[2];
+};
+
+/**
+ * Definition of a DMUB_CMD__SMART_POWER_HDR command.
+ */
+struct dmub_rb_cmd_smart_power_hdr_getmaxcll {
+ struct dmub_cmd_header header; /**< Command header */
+ /**
+ * Data passed from driver to FW in a DMUB_CMD__SMART_POWER_HDR_GETMAXCLL command.
+ */
+ union dmub_cmd_smart_power_hdr_getmaxcll_data {
+ struct dmub_cmd_smart_power_hdr_getmaxcll_input input; /**< Input */
+ struct dmub_cmd_smart_power_hdr_getmaxcll_output output; /**< Output */
+ uint32_t output_raw; /**< Raw data output */
+ } data;
+};
+
+/**
* Set of HW components that can be locked.
*
* Note: If updating with more HW components, fields
@@ -6594,6 +6690,14 @@ union dmub_rb_cmd {
* - DMUB_CMD__CURSOR_OFFLOAD_STREAM_UPDATE_DRR
*/
struct dmub_rb_cmd_cursor_offload_stream_cntl cursor_offload_stream_ctnl;
+ /**
+ * Definition of a DMUB_CMD__SMART_POWER_HDR_ENABLE command.
+ */
+ struct dmub_rb_cmd_smart_power_hdr_enable smart_power_hdr_enable;
+ /**
+ * Definition of a DMUB_CMD__DMUB_CMD__SMART_POWER_HDR_GETMAXCLL command.
+ */
+ struct dmub_rb_cmd_smart_power_hdr_getmaxcll smart_power_hdr_getmaxcll;
};
/**