summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/radeon/atombios_i2c.c
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2013-08-07 19:34:53 -0400
committerAlex Deucher <alexander.deucher@amd.com>2013-08-30 16:30:38 -0400
commit4543eda52113d1e2cc0e9bf416f79597e6ef1ec7 (patch)
tree16ea2493eb505eaedd2c933348a1440d5e82aa7d /drivers/gpu/drm/radeon/atombios_i2c.c
parent1bd4cff651350380f9fb6847313cb78e84c03846 (diff)
downloadblackbird-op-linux-4543eda52113d1e2cc0e9bf416f79597e6ef1ec7.tar.gz
blackbird-op-linux-4543eda52113d1e2cc0e9bf416f79597e6ef1ec7.zip
drm/radeon: fix endian bugs in hw i2c atom routines
Need to swap the data fetched over i2c properly. This is the same fix as the endian fix for aux channel transactions. Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/radeon/atombios_i2c.c')
-rw-r--r--drivers/gpu/drm/radeon/atombios_i2c.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_i2c.c b/drivers/gpu/drm/radeon/atombios_i2c.c
index 082338df708a..2ca389d19258 100644
--- a/drivers/gpu/drm/radeon/atombios_i2c.c
+++ b/drivers/gpu/drm/radeon/atombios_i2c.c
@@ -27,6 +27,8 @@
#include "radeon.h"
#include "atom.h"
+extern void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le);
+
#define TARGET_HW_I2C_CLOCK 50
/* these are a limitation of ProcessI2cChannelTransaction not the hw */
@@ -77,7 +79,7 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
}
if (!(flags & HW_I2C_WRITE))
- memcpy(buf, base, num);
+ radeon_atom_copy_swap(buf, base, num, false);
return 0;
}
OpenPOWER on IntegriCloud