diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2011-10-03 09:13:45 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-10-16 14:14:52 -0700 |
commit | 290771305e6699f3807950f30562781d9bc593df (patch) | |
tree | b8bb1c2ea93639781b89e8458b4c5b88f0a10136 /drivers/gpu | |
parent | 23882c85d97acaf626ace83e2feabd46393a1b6a (diff) | |
download | kernel_samsung_crespo-290771305e6699f3807950f30562781d9bc593df.zip kernel_samsung_crespo-290771305e6699f3807950f30562781d9bc593df.tar.gz kernel_samsung_crespo-290771305e6699f3807950f30562781d9bc593df.tar.bz2 |
drm/radeon/kms: fix regression in DP aux defer handling
commit 109bc10d30f33e84f1d7289f0039e0c858ade82f upstream.
An incorrect ordering in the error checking code lead
to DP aux defer being skipped in the aux native write
path. Move the bytes transferred check (ret == 0)
below the defer check.
Tracked down by: Brad Campbell <brad@fnarfbargle.com>
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=41121
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: Brad Campbell <brad@fnarfbargle.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/atombios_dp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atombios_dp.c b/drivers/gpu/drm/radeon/atombios_dp.c index 7ad43c6..f526fa7 100644 --- a/drivers/gpu/drm/radeon/atombios_dp.c +++ b/drivers/gpu/drm/radeon/atombios_dp.c @@ -158,14 +158,14 @@ static int radeon_dp_aux_native_read(struct radeon_connector *radeon_connector, while (1) { ret = radeon_process_aux_ch(dig_connector->dp_i2c_bus, msg, msg_bytes, recv, recv_bytes, delay, &ack); - if (ret == 0) - return -EPROTO; if (ret < 0) return ret; if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_ACK) return ret; else if ((ack & AUX_NATIVE_REPLY_MASK) == AUX_NATIVE_REPLY_DEFER) udelay(400); + else if (ret == 0) + return -EPROTO; else return -EIO; } |