diff options
Diffstat (limited to 'common/recipes-kernel/linux/files/0862-drm-amd-dal-fix-HW-I2C-channel-status.patch')
-rw-r--r-- | common/recipes-kernel/linux/files/0862-drm-amd-dal-fix-HW-I2C-channel-status.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/common/recipes-kernel/linux/files/0862-drm-amd-dal-fix-HW-I2C-channel-status.patch b/common/recipes-kernel/linux/files/0862-drm-amd-dal-fix-HW-I2C-channel-status.patch new file mode 100644 index 00000000..9e04042d --- /dev/null +++ b/common/recipes-kernel/linux/files/0862-drm-amd-dal-fix-HW-I2C-channel-status.patch @@ -0,0 +1,54 @@ +From d2e4c6dfe706e0608cc6fedbd312fe5120bf8986 Mon Sep 17 00:00:00 2001 +From: Mykola Lysenko <Mykola.Lysenko@amd.com> +Date: Thu, 25 Feb 2016 06:01:25 -0500 +Subject: [PATCH 0862/1110] drm/amd/dal: fix HW I2C channel status + +Original code was incorrectly ported from DAL2 +Zero I2C status value does not mean an error + +Signed-off-by: Mykola Lysenko <Mykola.Lysenko@amd.com> +Acked-by: Harry Wentland <harry.wentland@amd.com> +--- + drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c | 7 +++++-- + drivers/gpu/drm/amd/dal/dc/i2caux/dce80/i2c_hw_engine_dce80.c | 7 +++++-- + 2 files changed, 10 insertions(+), 4 deletions(-) + +diff --git a/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c b/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c +index b43a431..a27dbe7 100644 +--- a/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c ++++ b/drivers/gpu/drm/amd/dal/dc/i2caux/dce110/i2c_hw_engine_dce110.c +@@ -748,8 +748,11 @@ static enum i2c_channel_operation_result get_channel_status( + else if (value & DC_I2C_SW_STATUS__DC_I2C_SW_DONE_MASK) + return I2C_CHANNEL_OPERATION_SUCCEEDED; + +- /* in DAL2, I2C_RESULT_OK was returned */ +- return I2C_CHANNEL_OPERATION_NOT_STARTED; ++ /* ++ * this is the case when HW used for communication, I2C_SW_STATUS ++ * could be zero ++ */ ++ return I2C_CHANNEL_OPERATION_SUCCEEDED; + } + + static uint8_t get_hw_buffer_available_size( +diff --git a/drivers/gpu/drm/amd/dal/dc/i2caux/dce80/i2c_hw_engine_dce80.c b/drivers/gpu/drm/amd/dal/dc/i2caux/dce80/i2c_hw_engine_dce80.c +index bce2b94..bc94433 100644 +--- a/drivers/gpu/drm/amd/dal/dc/i2caux/dce80/i2c_hw_engine_dce80.c ++++ b/drivers/gpu/drm/amd/dal/dc/i2caux/dce80/i2c_hw_engine_dce80.c +@@ -742,8 +742,11 @@ static enum i2c_channel_operation_result get_channel_status( + else if (value & DC_I2C_SW_STATUS__DC_I2C_SW_DONE_MASK) + return I2C_CHANNEL_OPERATION_SUCCEEDED; + +- /* in DAL2, I2C_RESULT_OK was returned */ +- return I2C_CHANNEL_OPERATION_NOT_STARTED; ++ /* ++ * this is the case when HW used for communication, I2C_SW_STATUS ++ * could be zero ++ */ ++ return I2C_CHANNEL_OPERATION_SUCCEEDED; + } + + static uint8_t get_hw_buffer_available_size( +-- +2.7.4 + |