aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/radeon/atombios_dp.c6
-rw-r--r--drivers/gpu/drm/radeon/atombios_i2c.c4
2 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c
index 32501f6ec991..16023986d301 100644
--- a/drivers/gpu/drm/radeon/atombios_dp.c
+++ b/drivers/gpu/drm/radeon/atombios_dp.c
@@ -50,7 +50,7 @@ static char *pre_emph_names[] = {
50 * or from atom. Note that atom operates on 50 * or from atom. Note that atom operates on
51 * dw units. 51 * dw units.
52 */ 52 */
53static void radeon_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le) 53void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le)
54{ 54{
55#ifdef __BIG_ENDIAN 55#ifdef __BIG_ENDIAN
56 u8 src_tmp[20], dst_tmp[20]; /* used for byteswapping */ 56 u8 src_tmp[20], dst_tmp[20]; /* used for byteswapping */
@@ -100,7 +100,7 @@ static int radeon_process_aux_ch(struct radeon_i2c_chan *chan,
100 100
101 base = (unsigned char *)(rdev->mode_info.atom_context->scratch + 1); 101 base = (unsigned char *)(rdev->mode_info.atom_context->scratch + 1);
102 102
103 radeon_copy_swap(base, send, send_bytes, true); 103 radeon_atom_copy_swap(base, send, send_bytes, true);
104 104
105 args.v1.lpAuxRequest = cpu_to_le16((u16)(0 + 4)); 105 args.v1.lpAuxRequest = cpu_to_le16((u16)(0 + 4));
106 args.v1.lpDataOut = cpu_to_le16((u16)(16 + 4)); 106 args.v1.lpDataOut = cpu_to_le16((u16)(16 + 4));
@@ -137,7 +137,7 @@ static int radeon_process_aux_ch(struct radeon_i2c_chan *chan,
137 recv_bytes = recv_size; 137 recv_bytes = recv_size;
138 138
139 if (recv && recv_size) 139 if (recv && recv_size)
140 radeon_copy_swap(recv, base + 16, recv_bytes, false); 140 radeon_atom_copy_swap(recv, base + 16, recv_bytes, false);
141 141
142 return recv_bytes; 142 return recv_bytes;
143} 143}
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 @@
27#include "radeon.h" 27#include "radeon.h"
28#include "atom.h" 28#include "atom.h"
29 29
30extern void radeon_atom_copy_swap(u8 *dst, u8 *src, u8 num_bytes, bool to_le);
31
30#define TARGET_HW_I2C_CLOCK 50 32#define TARGET_HW_I2C_CLOCK 50
31 33
32/* these are a limitation of ProcessI2cChannelTransaction not the hw */ 34/* these are a limitation of ProcessI2cChannelTransaction not the hw */
@@ -77,7 +79,7 @@ static int radeon_process_i2c_ch(struct radeon_i2c_chan *chan,
77 } 79 }
78 80
79 if (!(flags & HW_I2C_WRITE)) 81 if (!(flags & HW_I2C_WRITE))
80 memcpy(buf, base, num); 82 radeon_atom_copy_swap(buf, base, num, false);
81 83
82 return 0; 84 return 0;
83} 85}