diff options
author | Josip Pavic <josip.pavic@amd.com> | 2024-05-10 16:57:48 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2024-06-14 22:17:16 +0200 |
commit | fd279d8f45c96886786d7fb5452489efad97093b (patch) | |
tree | 251c3d71375cf9b34e93a2d52d065b2d1ddd9c79 | |
parent | drm/amd/display: Refactor function dm_dp_mst_is_port_support_mode() (diff) | |
download | linux-fd279d8f45c96886786d7fb5452489efad97093b.tar.xz linux-fd279d8f45c96886786d7fb5452489efad97093b.zip |
drm/amd/display: define abm debug interface
[Why & How]
Define debug interface to dmub for reading back abm data.
Reviewed-by: Anthony Koo <anthony.koo@amd.com>
Acked-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Signed-off-by: Josip Pavic <josip.pavic@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r-- | drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h | 60 |
1 files changed, 60 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 7fea9bec7b64..87f2e4e38f9a 100644 --- a/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h +++ b/drivers/gpu/drm/amd/display/dmub/inc/dmub_cmd.h @@ -3960,6 +3960,11 @@ enum dmub_cmd_abm_type { * Set ABM Events */ DMUB_CMD__ABM_SET_EVENT = 9, + + /** + * Get the current ACE curve. + */ + DMUB_CMD__ABM_GET_ACE_CURVE = 10, }; struct abm_ace_curve { @@ -4489,6 +4494,55 @@ struct dmub_rb_cmd_abm_query_caps { }; /** + * enum dmub_abm_ace_curve_type - ACE curve type. + */ +enum dmub_abm_ace_curve_type { + /** + * ACE curve as defined by the SW layer. + */ + ABM_ACE_CURVE_TYPE__SW = 0, + /** + * ACE curve as defined by the SW to HW translation interface layer. + */ + ABM_ACE_CURVE_TYPE__SW_IF = 1, +}; + +/** + * Definition of a DMUB_CMD__ABM_GET_ACE_CURVE command. + */ +struct dmub_rb_cmd_abm_get_ace_curve { + /** + * Command header. + */ + struct dmub_cmd_header header; + + /** + * Address where ACE curve should be copied. + */ + union dmub_addr dest; + + /** + * Type of ACE curve being queried. + */ + enum dmub_abm_ace_curve_type ace_type; + + /** + * Indirect buffer length. + */ + uint16_t bytes; + + /** + * eDP panel instance. + */ + uint8_t panel_inst; + + /** + * Explicit padding to 4 byte boundary. + */ + uint8_t pad; +}; + +/** * Definition of a DMUB_CMD__ABM_SAVE_RESTORE command. */ struct dmub_rb_cmd_abm_save_restore { @@ -4521,6 +4575,7 @@ struct dmub_rb_cmd_abm_save_restore { /** * Data passed from driver to FW in a DMUB_CMD__ABM_SET_EVENT command. */ + struct dmub_cmd_abm_set_event_data { /** @@ -5103,6 +5158,11 @@ union dmub_rb_cmd { struct dmub_rb_cmd_abm_query_caps abm_query_caps; /** + * Definition of a DMUB_CMD__ABM_GET_ACE_CURVE command. + */ + struct dmub_rb_cmd_abm_get_ace_curve abm_get_ace_curve; + + /** * Definition of a DMUB_CMD__ABM_SET_EVENT command. */ struct dmub_rb_cmd_abm_set_event abm_set_event; |