Commit 8e461123 authored by Alex Deucher's avatar Alex Deucher Committed by Dave Airlie

drm/radeon/kms: fix bad shift in atom iio table parser

Noticed by Patrick Lowry.
Signed-off-by: default avatarAlex Deucher <alexdeucher@gmail.com>
Cc: stable@kernel.org
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 2582b6ef
...@@ -135,7 +135,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, ...@@ -135,7 +135,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
case ATOM_IIO_MOVE_INDEX: case ATOM_IIO_MOVE_INDEX:
temp &= temp &=
~((0xFFFFFFFF >> (32 - CU8(base + 1))) << ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
CU8(base + 2)); CU8(base + 3));
temp |= temp |=
((index >> CU8(base + 2)) & ((index >> CU8(base + 2)) &
(0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base + (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
...@@ -145,7 +145,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, ...@@ -145,7 +145,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
case ATOM_IIO_MOVE_DATA: case ATOM_IIO_MOVE_DATA:
temp &= temp &=
~((0xFFFFFFFF >> (32 - CU8(base + 1))) << ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
CU8(base + 2)); CU8(base + 3));
temp |= temp |=
((data >> CU8(base + 2)) & ((data >> CU8(base + 2)) &
(0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base + (0xFFFFFFFF >> (32 - CU8(base + 1)))) << CU8(base +
...@@ -155,7 +155,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base, ...@@ -155,7 +155,7 @@ static uint32_t atom_iio_execute(struct atom_context *ctx, int base,
case ATOM_IIO_MOVE_ATTR: case ATOM_IIO_MOVE_ATTR:
temp &= temp &=
~((0xFFFFFFFF >> (32 - CU8(base + 1))) << ~((0xFFFFFFFF >> (32 - CU8(base + 1))) <<
CU8(base + 2)); CU8(base + 3));
temp |= temp |=
((ctx-> ((ctx->
io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 - io_attr >> CU8(base + 2)) & (0xFFFFFFFF >> (32 -
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment