[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <ba2f3125-372d-3127-7508-5a86539a8ca4@rock-chips.com>
Date: Mon, 20 Feb 2017 10:13:42 +0800
From: Zain Wang <wzz@...k-chips.com>
To: Sean Paul <seanpaul@...omium.org>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Inki Dae <inki.dae@...sung.com>,
David Airlie <airlied@...ux.ie>
Cc: Tomeu Vizoso <tomeu.vizoso@...labora.com>,
Mika Kahola <mika.kahola@...el.com>,
Stéphane Marchesin <marcheu@...omium.org>,
Tomasz Figa <tfiga@...omium.org>, dianders@...omium.org,
Thierry Reding <treding@...dia.com>,
Heiko Stuebner <heiko@...ech.de>,
Jingoo Han <jingoohan1@...il.com>,
Javier Martinez Canillas <javier@....samsung.com>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org,
linux-samsung-soc@...r.kernel.org,
linux-rockchip@...ts.infradead.org
Subject: Re: [PATCH] drm/bridge: analogix_dp: Don't return -EBUSY when
msg->size is 0 in aux transaction
Hi Sean,
Could you give some comments for this patch?
Thanks
Zain
在 2017/2/13 17:27, zain wang 写道:
> The analogix_dp_transfer() will return -EBUSY if num_transferred is zero.
> But sometimes we will send a bare address packet to start the transaction,
> like drm_dp_i2c_xfer() show:
> ......
> /* Send a bare address packet to start the transaction.
> * Zero sized messages specify an address only (bare
> * address) transaction.
> */
> msg.buffer = NULL;
> msg.size = 0;
> err = drm_dp_i2c_do_msg(aux, &msg);
> ......
>
> In this case, the msg->size is zero, so the num_transferred will be zero too.
> We can't return -EBUSY here, let's we return num_transferred if num_transferred
> equals msg->size.
>
> Signed-off-by: zain wang <wzz@...k-chips.com>
> ---
> drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> index 303083a..5384aca 100644
> --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_reg.c
> @@ -1162,5 +1162,5 @@ ssize_t analogix_dp_transfer(struct analogix_dp_device *dp,
> (msg->request & ~DP_AUX_I2C_MOT) == DP_AUX_NATIVE_READ)
> msg->reply = DP_AUX_NATIVE_REPLY_ACK;
>
> - return num_transferred > 0 ? num_transferred : -EBUSY;
> + return (num_transferred == msg->size) ? num_transferred : -EBUSY;
> }
Powered by blists - more mailing lists