All of lore.kernel.org
 help / color / mirror / Atom feed
From: Archit Taneja <architt@codeaurora.org>
To: Brian Norris <briannorris@chromium.org>,
	Philippe Cornu <philippe.cornu@st.com>
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	David Airlie <airlied@linux.ie>,
	Benjamin Gaignard <benjamin.gaignard@linaro.org>,
	Bhumika Goyal <bhumirks@gmail.com>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Sandy Huang <hjc@rock-chips.com>, Heiko Stubner <heiko@sntech.de>,
	linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	Yannick Fertre <yannick.fertre@st.com>,
	Vincent Abriou <vincent.abriou@st.com>,
	Alexandre Torgue <alexandre.torgue@st.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Ludovic Barre <ludovic.barre@st.com>,
	Mickael Reulier <mickael.reulier@st.com>
Subject: Re: [PATCH v2 2/2] drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value
Date: Tue, 30 Jan 2018 19:39:26 +0530	[thread overview]
Message-ID: <70cae8dd-ee9e-0313-6518-504ee5ec32ca@codeaurora.org> (raw)
In-Reply-To: <20180126004628.fbrady7twf7ys2qx@ban.mtv.corp.google.com>



On 01/26/2018 06:16 AM, Brian Norris wrote:
> On Thu, Jan 25, 2018 at 11:38:00AM +0100, Philippe Cornu wrote:
>> The dw_mipi_dsi_host_transfer() must return the number of
>> bytes transmitted/received on success instead of 0.
>> Note: As the read feature is not implemented, only the
>> transmitted number of bytes is returned for the moment.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> 
> Assuming we're going with the current documented semantics (where we
> return # of TX bytes for writes), then:
> 
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> 
> I believe Archit was suggesting maybe changing that sometime, but that's
> no excuse for not matching documentation now.

Queued to drm-misc-next.

Thanks,
Archit

> 
>> ---
>>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 ++++++++++-
>>   1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> index 72ecaeb40822..090bf62d1ea8 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> @@ -419,7 +419,16 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host,
>>   
>>   	dw_mipi_message_config(dsi, msg);
>>   
>> -	return dw_mipi_dsi_write(dsi, &packet);
>> +	ret = dw_mipi_dsi_write(dsi, &packet);
>> +	if (ret)
>> +		return ret;
>> +
>> +	/*
>> +	 * TODO Only transmitted size is returned as actual driver does
>> +	 * not support dcs/generic reads. Please update return value when
>> +	 * delivering the read feature.
>> +	 */
>> +	return packet.size;
> 
> You're really holding my hand here, I see :) Thanks I guess.
> 
>>   }
>>   
>>   static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = {
>> -- 
>> 2.15.1
>>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

WARNING: multiple messages have this Message-ID (diff)
From: architt@codeaurora.org (Archit Taneja)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/2] drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value
Date: Tue, 30 Jan 2018 19:39:26 +0530	[thread overview]
Message-ID: <70cae8dd-ee9e-0313-6518-504ee5ec32ca@codeaurora.org> (raw)
In-Reply-To: <20180126004628.fbrady7twf7ys2qx@ban.mtv.corp.google.com>



On 01/26/2018 06:16 AM, Brian Norris wrote:
> On Thu, Jan 25, 2018 at 11:38:00AM +0100, Philippe Cornu wrote:
>> The dw_mipi_dsi_host_transfer() must return the number of
>> bytes transmitted/received on success instead of 0.
>> Note: As the read feature is not implemented, only the
>> transmitted number of bytes is returned for the moment.
>>
>> Signed-off-by: Philippe Cornu <philippe.cornu@st.com>
> 
> Assuming we're going with the current documented semantics (where we
> return # of TX bytes for writes), then:
> 
> Reviewed-by: Brian Norris <briannorris@chromium.org>
> 
> I believe Archit was suggesting maybe changing that sometime, but that's
> no excuse for not matching documentation now.

Queued to drm-misc-next.

Thanks,
Archit

> 
>> ---
>>   drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 11 ++++++++++-
>>   1 file changed, 10 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> index 72ecaeb40822..090bf62d1ea8 100644
>> --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c
>> @@ -419,7 +419,16 @@ static ssize_t dw_mipi_dsi_host_transfer(struct mipi_dsi_host *host,
>>   
>>   	dw_mipi_message_config(dsi, msg);
>>   
>> -	return dw_mipi_dsi_write(dsi, &packet);
>> +	ret = dw_mipi_dsi_write(dsi, &packet);
>> +	if (ret)
>> +		return ret;
>> +
>> +	/*
>> +	 * TODO Only transmitted size is returned as actual driver does
>> +	 * not support dcs/generic reads. Please update return value when
>> +	 * delivering the read feature.
>> +	 */
>> +	return packet.size;
> 
> You're really holding my hand here, I see :) Thanks I guess.
> 
>>   }
>>   
>>   static const struct mipi_dsi_host_ops dw_mipi_dsi_host_ops = {
>> -- 
>> 2.15.1
>>

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2018-01-30 14:09 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-25 10:37 [PATCH v2 0/2] drm/bridge/synopsys: dsi: Add fix & warning in dsi_host_transfer() Philippe Cornu
2018-01-25 10:37 ` Philippe Cornu
2018-01-25 10:37 ` Philippe Cornu
2018-01-25 10:37 ` [PATCH v2 1/2] drm/bridge/synopsys: dsi: Add a warning msg on dsi read requests Philippe Cornu
2018-01-25 10:37   ` Philippe Cornu
2018-01-25 10:37   ` Philippe Cornu
2018-01-26  0:44   ` Brian Norris
2018-01-26  0:44     ` Brian Norris
2018-01-30 14:09     ` Archit Taneja
2018-01-30 14:09       ` Archit Taneja
2018-01-30 14:29       ` Philippe CORNU
2018-01-30 14:29         ` Philippe CORNU
2018-01-30 14:29         ` Philippe CORNU
2018-01-25 10:38 ` [PATCH v2 2/2] drm/bridge/synopsys: dsi: Fix dsi_host_transfer() return value Philippe Cornu
2018-01-25 10:38   ` Philippe Cornu
2018-01-25 10:38   ` Philippe Cornu
2018-01-26  0:46   ` Brian Norris
2018-01-26  0:46     ` Brian Norris
2018-01-30 14:09     ` Archit Taneja [this message]
2018-01-30 14:09       ` Archit Taneja

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=70cae8dd-ee9e-0313-6518-504ee5ec32ca@codeaurora.org \
    --to=architt@codeaurora.org \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=a.hajda@samsung.com \
    --cc=airlied@linux.ie \
    --cc=alexandre.torgue@st.com \
    --cc=benjamin.gaignard@linaro.org \
    --cc=bhumirks@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=heiko@sntech.de \
    --cc=hjc@rock-chips.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=ludovic.barre@st.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mickael.reulier@st.com \
    --cc=philippe.cornu@st.com \
    --cc=vincent.abriou@st.com \
    --cc=yannick.fertre@st.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.