]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
drm/amd/display: Move i2c and aux structs into dc_ddc_types.h
authorHarry Wentland <harry.wentland@amd.com>
Wed, 9 May 2018 15:35:21 +0000 (11:35 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 15 Jun 2018 17:23:38 +0000 (12:23 -0500)
We'd like to use some of them in dc_link_ddc and amdgpu_dm and should
have them available in dc_ddc_types.h.

Signed-off-by: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dc_ddc_types.h
drivers/gpu/drm/amd/display/dc/i2caux/aux_engine.h
drivers/gpu/drm/amd/display/dc/i2caux/engine.h

index ee04812b44926a1958cc11ef85e99793564f3413..05c8c31d8b310c1324dbe69c31638a991c1e8a4d 100644 (file)
 #ifndef DC_DDC_TYPES_H_
 #define DC_DDC_TYPES_H_
 
+enum aux_transaction_type {
+       AUX_TRANSACTION_TYPE_DP,
+       AUX_TRANSACTION_TYPE_I2C
+};
+
+
+enum i2caux_transaction_action {
+       I2CAUX_TRANSACTION_ACTION_I2C_WRITE = 0x00,
+       I2CAUX_TRANSACTION_ACTION_I2C_READ = 0x10,
+       I2CAUX_TRANSACTION_ACTION_I2C_STATUS_REQUEST = 0x20,
+
+       I2CAUX_TRANSACTION_ACTION_I2C_WRITE_MOT = 0x40,
+       I2CAUX_TRANSACTION_ACTION_I2C_READ_MOT = 0x50,
+       I2CAUX_TRANSACTION_ACTION_I2C_STATUS_REQUEST_MOT = 0x60,
+
+       I2CAUX_TRANSACTION_ACTION_DP_WRITE = 0x80,
+       I2CAUX_TRANSACTION_ACTION_DP_READ = 0x90
+};
+
+enum aux_channel_operation_result {
+       AUX_CHANNEL_OPERATION_SUCCEEDED,
+       AUX_CHANNEL_OPERATION_FAILED_REASON_UNKNOWN,
+       AUX_CHANNEL_OPERATION_FAILED_INVALID_REPLY,
+       AUX_CHANNEL_OPERATION_FAILED_TIMEOUT,
+       AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON
+};
+
+
+struct aux_request_transaction_data {
+       enum aux_transaction_type type;
+       enum i2caux_transaction_action action;
+       /* 20-bit AUX channel transaction address */
+       uint32_t address;
+       /* delay, in 100-microsecond units */
+       uint8_t delay;
+       uint32_t length;
+       uint8_t *data;
+};
+
+enum aux_transaction_reply {
+       AUX_TRANSACTION_REPLY_AUX_ACK = 0x00,
+       AUX_TRANSACTION_REPLY_AUX_NACK = 0x01,
+       AUX_TRANSACTION_REPLY_AUX_DEFER = 0x02,
+
+       AUX_TRANSACTION_REPLY_I2C_ACK = 0x00,
+       AUX_TRANSACTION_REPLY_I2C_NACK = 0x10,
+       AUX_TRANSACTION_REPLY_I2C_DEFER = 0x20,
+
+       AUX_TRANSACTION_REPLY_HPD_DISCON = 0x40,
+
+       AUX_TRANSACTION_REPLY_INVALID = 0xFF
+};
+
+struct aux_reply_transaction_data {
+       enum aux_transaction_reply status;
+       uint32_t length;
+       uint8_t *data;
+};
+
 struct i2c_payload {
        bool write;
        uint8_t address;
index b9e35d0474c6ad49eb4e671f004efcc3cfad5d69..b01488f710d51dd5a8a2f7b9ff1bd589f99db5f8 100644 (file)
 #ifndef __DAL_AUX_ENGINE_H__
 #define __DAL_AUX_ENGINE_H__
 
-enum aux_transaction_type {
-       AUX_TRANSACTION_TYPE_DP,
-       AUX_TRANSACTION_TYPE_I2C
-};
-
-struct aux_request_transaction_data {
-       enum aux_transaction_type type;
-       enum i2caux_transaction_action action;
-       /* 20-bit AUX channel transaction address */
-       uint32_t address;
-       /* delay, in 100-microsecond units */
-       uint8_t delay;
-       uint32_t length;
-       uint8_t *data;
-};
-
-enum aux_transaction_reply {
-       AUX_TRANSACTION_REPLY_AUX_ACK = 0x00,
-       AUX_TRANSACTION_REPLY_AUX_NACK = 0x01,
-       AUX_TRANSACTION_REPLY_AUX_DEFER = 0x02,
-
-       AUX_TRANSACTION_REPLY_I2C_ACK = 0x00,
-       AUX_TRANSACTION_REPLY_I2C_NACK = 0x10,
-       AUX_TRANSACTION_REPLY_I2C_DEFER = 0x20,
-
-       AUX_TRANSACTION_REPLY_HPD_DISCON = 0x40,
-
-       AUX_TRANSACTION_REPLY_INVALID = 0xFF
-};
-
-struct aux_reply_transaction_data {
-       enum aux_transaction_reply status;
-       uint32_t length;
-       uint8_t *data;
-};
-
-enum aux_channel_operation_result {
-       AUX_CHANNEL_OPERATION_SUCCEEDED,
-       AUX_CHANNEL_OPERATION_FAILED_REASON_UNKNOWN,
-       AUX_CHANNEL_OPERATION_FAILED_INVALID_REPLY,
-       AUX_CHANNEL_OPERATION_FAILED_TIMEOUT,
-       AUX_CHANNEL_OPERATION_FAILED_HPD_DISCON
-};
+#include "dc_ddc_types.h"
 
 struct aux_engine;
 
index c1109706a880840477ff64636f330c2d2e380b1b..1e8a1585e401252e2ffe69155876e2dec5d8db88 100644 (file)
@@ -26,6 +26,8 @@
 #ifndef __DAL_ENGINE_H__
 #define __DAL_ENGINE_H__
 
+#include "dc_ddc_types.h"
+
 enum i2caux_transaction_operation {
        I2CAUX_TRANSACTION_READ,
        I2CAUX_TRANSACTION_WRITE
@@ -76,19 +78,6 @@ enum i2c_default_speed {
        I2CAUX_DEFAULT_I2C_SW_SPEED = 50
 };
 
-enum i2caux_transaction_action {
-       I2CAUX_TRANSACTION_ACTION_I2C_WRITE = 0x00,
-       I2CAUX_TRANSACTION_ACTION_I2C_READ = 0x10,
-       I2CAUX_TRANSACTION_ACTION_I2C_STATUS_REQUEST = 0x20,
-
-       I2CAUX_TRANSACTION_ACTION_I2C_WRITE_MOT = 0x40,
-       I2CAUX_TRANSACTION_ACTION_I2C_READ_MOT = 0x50,
-       I2CAUX_TRANSACTION_ACTION_I2C_STATUS_REQUEST_MOT = 0x60,
-
-       I2CAUX_TRANSACTION_ACTION_DP_WRITE = 0x80,
-       I2CAUX_TRANSACTION_ACTION_DP_READ = 0x90
-};
-
 struct engine;
 
 struct engine_funcs {