diff mbox

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

Message ID 1441034343-20809-1-git-send-email-alexander.deucher@amd.com (mailing list archive)
State New, archived
Headers show

Commit Message

Alex Deucher Aug. 31, 2015, 3:19 p.m. UTC
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

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Christian König Aug. 31, 2015, 3:25 p.m. UTC | #1
On 31.08.2015 17:19, Alex Deucher wrote:
> 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
>
> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
> Cc: stable@vger.kernel.org

Reviewed-by: Christian König <christian.koenig@amd.com> for both patches.

> ---
>   drivers/gpu/drm/radeon/radeon_dp_auxch.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/radeon/radeon_dp_auxch.c b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> index fcbd60b..3b0c229 100644
> --- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> +++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
> @@ -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);
>
diff mbox

Patch

diff --git a/drivers/gpu/drm/radeon/radeon_dp_auxch.c b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
index fcbd60b..3b0c229 100644
--- a/drivers/gpu/drm/radeon/radeon_dp_auxch.c
+++ b/drivers/gpu/drm/radeon/radeon_dp_auxch.c
@@ -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);