2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-28 07:04:00 +08:00
linux-next/drivers/gpu/drm/bridge/analogix
Jianqun Xu 19423ba710 drm/bridge: analogix_dp: return error if transfer none byte
Reference from drm_dp_aux description (about transfer):
Upon success, the implementation should return the number of payload bytes
that were transferred, or a negative error-code on failure. Helpers
propagate errors from the .transfer() function, with the exception of
the -EBUSY error, which causes a transaction to be retried. On a short,
helpers will return -EPROTO to make it simpler to check for failure.

The analogix_dp_transfer will return num_transferred, but if there is none
byte been transferred, the return value will be 0, which means success, we
should return error-code if transfer none byte.

for (retry = 0; retry < 32; retry++) {
	err = aux->transfer(aux, &msg);
	if (err < 0) {
		if (err == -EBUSY)
			continue;

		goto unlock;
	}
}

Cc: zain wang <wzz@rock-chips.com>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: http://patchwork.freedesktop.org/patch/msgid/1479255219-7243-1-git-send-email-jay.xu@rock-chips.com
2016-11-16 11:16:13 +05:30
..
analogix_dp_core.c drm/bridge: Drop drm_connector_unregister and call drm_connector_cleanup directly 2016-10-10 11:19:42 +02:00
analogix_dp_core.h drm/bridge: analogix_dp: Remove duplicated code 2016-09-24 11:56:34 +05:30
analogix_dp_reg.c drm/bridge: analogix_dp: return error if transfer none byte 2016-11-16 11:16:13 +05:30
analogix_dp_reg.h drm/bridge: analogix_dp: add the PSR function support 2016-08-23 11:44:33 -04:00
Kconfig drm: bridge: analogix/dp: split exynos dp driver to bridge directory 2016-04-05 10:11:48 +08:00
Makefile drm: bridge: analogix/dp: split exynos dp driver to bridge directory 2016-04-05 10:11:48 +08:00