]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/radeon/atombios_i2c.c
drm/radeon: fix endian bugs in hw i2c atom routines
[karo-tx-linux.git] / drivers / gpu / drm / radeon / atombios_i2c.c
index 082338df708a11e5daed465bbd563b8164ddea85..2ca389d19258dceedcf0f6461fc7ac646b1e495a 100644 (file)
@@ -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;
 }