Skip to contentSkip to conversation

drm/radeon/native: Send out the full AUX address

PATCH In review Alex Deucher 3 participants 5 messages Aug 31, 2015 – Sep 1, 2015

Subsystems (3)
lore
Share & tools
lore
#1 lore raw

PATCH 2/2 drm/amdgpu/atom: Send out the full AUX address

In reply to Alex Deucher

AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits.

Port of:
drm/radeon/atom: Send out the full AUX address
to amdgpu

---
 drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +2 -1
index 9ba0a7d..92b6aca 100644
@@ -139,7 +139,8 @@ amdgpu_atombios_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *m
 
 	tx_buf[0] = msg->address & 0xff;
 	tx_buf[1] = msg->address >> 8;
-	tx_buf[2] = msg->request << 4;
+	tx_buf[2] = (msg->request << 4) |
+		((msg->address >> 16) & 0xf);
 	tx_buf[3] = msg->size ? (msg->size - 1) : 0;
 
 	switch (msg->request & ~DP_AUX_I2C_MOT) {
Signature · 1 line
1.8.3.1
#0 lore raw

PATCH 1/2 drm/radeon/native: Send out the full AUX address

AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits.

Port of:
drm/radeon/atom: Send out the full AUX address
to radeon non-atom aux path

---
 drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_dp_auxch.c +2 -2
index fcbd60b..3b0c229 100644
@@ -116,8 +116,8 @@ radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg
 	       AUX_SW_WR_BYTES(bytes));
 
 	/* write the data header into the registers */
-	/* request, addres, msg size */
-	byte = (msg->request << 4);
+	/* request, address, msg size */
+	byte = (msg->request << 4) | ((msg->address >> 16) & 0xf);
 	WREG32(AUX_SW_DATA + aux_offset[instance],
 	       AUX_SW_DATA_MASK(byte) | AUX_SW_AUTOINCREMENT_DISABLE);
 
Signature · 6 lines
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 1/2
#4 lore raw
Quoted 9 lines · Alex Deucher

AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits.

Port of:
drm/radeon/atom: Send out the full AUX address
to radeon non-atom aux path

Quoted 9 lines
---
  drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
drivers/gpu/drm/radeon/radeon_dp_auxch.c +0 -0
index fcbd60b..3b0c229 100644

drivers/gpu/drm/radeon/radeon_dp_auxch.c radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg · line 123

Quoted 10 lines
drivers/gpu/drm/radeon/radeon_dp_auxch.c +2 -2
@@ -116,8 +116,8 @@ radeon_dp_aux_transfer_native(struct drm_dp_aux *aux, struct drm_dp_aux_msg *msg
  	       AUX_SW_WR_BYTES(bytes));
 
  	/* write the data header into the registers */
-	/* request, addres, msg size */
-	byte = (msg->request << 4);
+	/* request, address, msg size */
+	byte = (msg->request << 4) | ((msg->address >> 16) & 0xf);
  	WREG32(AUX_SW_DATA + aux_offset[instance],
  	       AUX_SW_DATA_MASK(byte) | AUX_SW_AUTOINCREMENT_DISABLE);
 

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

RE: [PATCH 2/2] drm/amdgpu/atom: Send out the full AUX address

In reply to Alex Deucher

Patch is Reviewed-by: Jammy Zhou <[email protected]>

I cannot find the first patch in my mailbox, did I miss something?

Regards,
Jammy

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Monday, August 31, 2015 11:19 PM
To: [email protected]
Cc: Deucher, Alexander; [email protected]
Subject: [PATCH 2/2] drm/amdgpu/atom: Send out the full AUX address

AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits.

Port of:
drm/radeon/atom: Send out the full AUX address to amdgpu

---
 drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +2 -1
index 9ba0a7d..92b6aca 100644
@@ -139,7 +139,8 @@ amdgpu_atombios_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *m
 
 	tx_buf[0] = msg->address & 0xff;
 	tx_buf[1] = msg->address >> 8;
-	tx_buf[2] = msg->request << 4;
+	tx_buf[2] = (msg->request << 4) |
+		((msg->address >> 16) & 0xf);
 	tx_buf[3] = msg->size ? (msg->size - 1) : 0;
 
 	switch (msg->request & ~DP_AUX_I2C_MOT) {

--
1.8.3.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Re: [PATCH 2/2] drm/amdgpu/atom: Send out the full AUX address

Quoted 3 lines · Jammy

Patch is Reviewed-by: Jammy Zhou <[email protected]>

I cannot find the first patch in my mailbox, did I miss something?

It was a similar fix for the non-atom aux code in radeon:
http://lists.freedesktop.org/archives/dri-devel/2015-August/089539.html

Alex

Quoted 39 lines

Regards,
Jammy

-----Original Message-----
From: dri-devel [mailto:[email protected]] On Behalf Of Alex Deucher
Sent: Monday, August 31, 2015 11:19 PM
To: [email protected]
Cc: Deucher, Alexander; [email protected]
Subject: [PATCH 2/2] drm/amdgpu/atom: Send out the full AUX address

AUX addresses are 20 bits long. Send out the entire address instead of just the low 16 bits.

Port of:
drm/radeon/atom: Send out the full AUX address to amdgpu

---
 drivers/gpu/drm/amd/amdgpu/atombios_dp.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/atombios_dp.c +2 -2
index 9ba0a7d..92b6aca 100644
@@ -139,7 +139,8 @@ amdgpu_atombios_dp_aux_transfer(struct drm_dp_aux *aux, struct drm_dp_aux_msg *m
 
        tx_buf[0] = msg->address & 0xff;
        tx_buf[1] = msg->address >> 8;
-       tx_buf[2] = msg->request << 4;
+       tx_buf[2] = (msg->request << 4) |
+               ((msg->address >> 16) & 0xf);
        tx_buf[3] = msg->size ? (msg->size - 1) : 0;
 
        switch (msg->request & ~DP_AUX_I2C_MOT) {
--

1.8.3.1

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel