All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/dp_helper: don't return EPROTO for defers
@ 2014-04-04  1:35 Dave Airlie
  2014-04-04  5:50 ` Jani Nikula
  0 siblings, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2014-04-04  1:35 UTC (permalink / raw)
  To: dri-devel

From: Dave Airlie <airlied@redhat.com>

If we get a msg.reply of REPLY_DEFER, we also get an err of 0
so we fail reads with 0 < size and return -EPROTO instead of trying
again.

Found writing MST support.

Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index f4babed..725354f 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -386,11 +386,11 @@ static int drm_dp_dpcd_access(struct drm_dp_aux *aux, u8 request,
 			return err;
 		}
 
-		if (err < size)
-			return -EPROTO;
 
 		switch (msg.reply & DP_AUX_NATIVE_REPLY_MASK) {
 		case DP_AUX_NATIVE_REPLY_ACK:
+			if (err < size)
+				return -EPROTO;
 			return err;
 
 		case DP_AUX_NATIVE_REPLY_NACK:
-- 
1.8.5.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-04-04  6:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-04  1:35 [PATCH] drm/dp_helper: don't return EPROTO for defers Dave Airlie
2014-04-04  5:50 ` Jani Nikula
2014-04-04  6:00   ` Jani Nikula
2014-04-04  6:33     ` Thierry Reding

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.