summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
diff options
context:
space:
mode:
authorWenjing Liu <wenjing.liu@amd.com>2022-12-12 21:52:57 +0300
committerAlex Deucher <alexander.deucher@amd.com>2023-01-13 22:57:40 +0300
commita98cdd8c485600a2cfc15508a38c13c49b551fb1 (patch)
treece743a2a2a846fc831a63ec3f05c211274c7f331 /drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
parent4370f72e3845a1741c6db8ba149c483f57352fd5 (diff)
downloadlinux-a98cdd8c485600a2cfc15508a38c13c49b551fb1.tar.xz
drm/amd/display: refactor ddc logic from dc_link_ddc to link_ddc
[why] 1. Move dd_link_ddc functions to link_ddc. 2. Move link ddc functions declaration exposed in dc to link.h 3. Move link ddc functions declaration exposed in dm to dc_link.h 4. Remove i2caux_interface.h file Tested-by: Daniel Wheeler <Daniel.Wheeler@amd.com> Reviewed-by: Jun Lei <Jun.Lei@amd.com> Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dc_ddc_types.h')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dc_ddc_types.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
index 7769bd099a5a..7b036a772b0c 100644
--- a/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
+++ b/drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
@@ -77,6 +77,32 @@ struct aux_reply_transaction_data {
uint8_t *data;
};
+struct aux_payload {
+ /* set following flag to read/write I2C data,
+ * reset it to read/write DPCD data */
+ bool i2c_over_aux;
+ /* set following flag to write data,
+ * reset it to read data */
+ bool write;
+ bool mot;
+ bool write_status_update;
+
+ uint32_t address;
+ uint32_t length;
+ uint8_t *data;
+ /*
+ * used to return the reply type of the transaction
+ * ignored if NULL
+ */
+ uint8_t *reply;
+ /* expressed in milliseconds
+ * zero means "use default value"
+ */
+ uint32_t defer_delay;
+
+};
+#define DEFAULT_AUX_MAX_DATA_SIZE 16
+
struct i2c_payload {
bool write;
uint8_t address;
@@ -90,6 +116,8 @@ enum i2c_command_engine {
I2C_COMMAND_ENGINE_HW
};
+#define DDC_I2C_COMMAND_ENGINE I2C_COMMAND_ENGINE_SW
+
struct i2c_command {
struct i2c_payload *payloads;
uint8_t number_of_payloads;