summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/display/dc/i2caux
diff options
context:
space:
mode:
authorAndrey Grodzovsky2017-03-28 22:57:52 +0200
committerAlex Deucher2017-09-26 23:22:17 +0200
commit7c7f5b15be6528b33d825ead6acb739d7d061a2e (patch)
tree93336895662530093c76410b81c728eec0377f8c /drivers/gpu/drm/amd/display/dc/i2caux
parentdrm/amd/display: Fix i2c write flag. (diff)
downloadkernel-qcow2-linux-7c7f5b15be6528b33d825ead6acb739d7d061a2e.tar.gz
kernel-qcow2-linux-7c7f5b15be6528b33d825ead6acb739d7d061a2e.tar.xz
kernel-qcow2-linux-7c7f5b15be6528b33d825ead6acb739d7d061a2e.zip
drm/amd/display: Refactor edid read.
Allow Linux to use DRM provided EDID read functioality by moving DAL edid implementation to module hence removing this code from DC by this cleaning up DC code for upstream. v2: Removing ddc_service. No more need for it. Signed-off-by: Andrey Grodzovsky <Andrey.Grodzovsky@amd.com> Acked-by: Harry Wentland <Harry.Wentland@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/i2caux')
-rw-r--r--drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
index bd84b932aaae..0743265e933c 100644
--- a/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
+++ b/drivers/gpu/drm/amd/display/dc/i2caux/i2caux.c
@@ -185,6 +185,7 @@ bool dal_i2caux_submit_aux_command(
struct aux_engine *engine;
uint8_t index_of_payload = 0;
bool result;
+ bool mot;
if (!ddc) {
BREAK_TO_DEBUGGER();
@@ -207,12 +208,14 @@ bool dal_i2caux_submit_aux_command(
result = true;
while (index_of_payload < cmd->number_of_payloads) {
- bool mot = (index_of_payload != cmd->number_of_payloads - 1);
-
struct aux_payload *payload = cmd->payloads + index_of_payload;
-
struct i2caux_transaction_request request = { 0 };
+ if (cmd->mot == I2C_MOT_UNDEF)
+ mot = (index_of_payload != cmd->number_of_payloads - 1);
+ else
+ mot = (cmd->mot == I2C_MOT_TRUE);
+
request.operation = payload->write ?
I2CAUX_TRANSACTION_WRITE :
I2CAUX_TRANSACTION_READ;