All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Andrey Smirnov <andrew.smirnov@gmail.com>,
	Andrey Gusakov <andrey.gusakov@cogentembedded.com>,
	dri-devel@lists.freedesktop.org,
	Peter Ujfalusi <peter.ujfalusi@ti.com>,
	Jyri Sarha <jsarha@ti.com>
Subject: Re: [PATCHv2 08/22] drm/bridge: tc358767: split stream enable/disable
Date: Fri, 3 May 2019 12:20:49 +0300	[thread overview]
Message-ID: <c5b5ca05-2c0a-7cb2-e916-e655138f3e58@ti.com> (raw)
In-Reply-To: <20190420212913.GK4964@pendragon.ideasonboard.com>

On 21/04/2019 00:29, Laurent Pinchart wrote:
> Hi Tomi,
> 
> Thank you for the patch.
> 
> On Tue, Mar 26, 2019 at 12:31:32PM +0200, Tomi Valkeinen wrote:
>> It is nicer to have enable/disable functions instead of set(bool enable)
>> style function.
> 
> When the two functions have nothing in common, yes.
> 
>> Split tc_main_link_stream into tc_stream_enable and tc_stream_disable.
> 
> Should you keep the tc_main_link_ prefix ? I suppose it is implied in a
> way, as the stream is carried over the main link.

It sounds a bit redundant, only making the functions names longer.

>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
>> ---
>>  drivers/gpu/drm/bridge/tc358767.c | 81 +++++++++++++++++--------------
>>  1 file changed, 45 insertions(+), 36 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c
>> index 86b272422281..bfc673bd5986 100644
>> --- a/drivers/gpu/drm/bridge/tc358767.c
>> +++ b/drivers/gpu/drm/bridge/tc358767.c
>> @@ -1013,47 +1013,56 @@ static int tc_main_link_setup(struct tc_data *tc)
>>  	return ret;
>>  }
>>  
>> -static int tc_main_link_stream(struct tc_data *tc, int state)
>> +static int tc_stream_enable(struct tc_data *tc)
>>  {
>>  	int ret;
>>  	u32 value;
>>  
>> -	dev_dbg(tc->dev, "stream: %d\n", state);
>> +	dev_dbg(tc->dev, "stream enable\n");
> 
> Maybe "enable video stream\n" (and similarly for the tc_stream_disable()
> function) ?

Ok.

>>  
>> -	if (state) {
>> -		ret = tc_set_video_mode(tc, tc->mode);
>> -		if (ret)
>> -			goto err;
>> +	ret = tc_set_video_mode(tc, tc->mode);
>> +	if (ret)
>> +		goto err;
> 
> Let's return ret directly and remove the err label.

Can't remove the err label, because of the tc_write() calls...

 Tomi

-- 
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-05-03  9:21 UTC|newest]

Thread overview: 103+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-26 10:31 [PATCHv2 00/22] drm/bridge: tc358767: DP support Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 01/22] drm/bridge: tc358767: fix tc_aux_get_status error handling Tomi Valkeinen
2019-04-15  7:20   ` Andrzej Hajda
2019-04-20 20:14   ` Laurent Pinchart
2019-04-26 14:08     ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 02/22] drm/bridge: tc358767: reset voltage-swing & pre-emphasis Tomi Valkeinen
2019-04-15  7:20   ` Andrzej Hajda
2019-04-20 20:30   ` Laurent Pinchart
2019-04-26 14:14     ` Tomi Valkeinen
2019-04-26 23:46       ` Laurent Pinchart
2019-04-26 23:54       ` Andrey Smirnov
2019-03-26 10:31 ` [PATCHv2 03/22] drm/bridge: tc358767: fix ansi 8b10b use Tomi Valkeinen
2019-04-15  7:29   ` Andrzej Hajda
2019-04-20 21:13   ` Laurent Pinchart
2019-04-23  8:19     ` Andrey Gusakov
2019-04-23 14:56       ` Laurent Pinchart
2019-04-24 13:52         ` Andrey Gusakov
2019-05-03 11:43         ` Tomi Valkeinen
2019-05-03 12:48           ` Laurent Pinchart
2019-05-03 13:17             ` Tomi Valkeinen
2019-05-03 17:11               ` Laurent Pinchart
2019-05-06  9:58                 ` Tomi Valkeinen
2019-05-21  7:21                   ` Andrey Smirnov
2019-03-26 10:31 ` [PATCHv2 04/22] drm/bridge: tc358767: cleanup spread & scrambler_dis Tomi Valkeinen
2019-04-15  7:31   ` Andrzej Hajda
2019-04-20 21:16   ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 05/22] drm/bridge: tc358767: remove unused swing & preemp Tomi Valkeinen
2019-04-15  7:31   ` Andrzej Hajda
2019-04-20 21:16   ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 06/22] drm/bridge: tc358767: cleanup aux_link_setup Tomi Valkeinen
2019-04-15  7:38   ` Andrzej Hajda
2019-04-15  7:52     ` Tomi Valkeinen
2019-04-20 21:20       ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 07/22] drm/bridge: tc358767: move video stream setup to tc_main_link_stream Tomi Valkeinen
2019-04-15  7:48   ` Andrzej Hajda
2019-04-20 21:25   ` Laurent Pinchart
2019-05-03  9:12     ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 08/22] drm/bridge: tc358767: split stream enable/disable Tomi Valkeinen
2019-04-15  8:26   ` Andrzej Hajda
2019-04-20 21:29   ` Laurent Pinchart
2019-05-03  9:20     ` Tomi Valkeinen [this message]
2019-05-03 12:55       ` Laurent Pinchart
2019-05-03 13:08         ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 09/22] drm/bridge: tc358767: move PXL PLL enable/disable to " Tomi Valkeinen
2019-04-15  8:28   ` Andrzej Hajda
2019-04-20 21:33   ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 10/22] drm/bridge: tc358767: add link disable function Tomi Valkeinen
2019-04-15  8:36   ` Andrzej Hajda
2019-04-15 11:39     ` Tomi Valkeinen
2019-04-20 21:39       ` Laurent Pinchart
2019-05-03  9:36         ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 11/22] drm/bridge: tc358767: ensure DP is disabled before LT Tomi Valkeinen
2019-04-15  8:49   ` Andrzej Hajda
2019-04-15 11:26     ` Tomi Valkeinen
2019-04-20 21:41       ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 12/22] drm/bridge: tc358767: remove unnecessary msleep Tomi Valkeinen
2019-04-15  8:50   ` Andrzej Hajda
2019-04-20 21:43   ` Laurent Pinchart
2019-04-23  7:52     ` Andrey Gusakov
2019-03-26 10:31 ` [PATCHv2 13/22] drm/bridge: tc358767: use more reliable seq when finishing LT Tomi Valkeinen
2019-04-15  8:51   ` Andrzej Hajda
2019-04-20 21:44   ` Laurent Pinchart
2019-05-03 11:04     ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 14/22] drm/bridge: tc358767: cleanup LT result check Tomi Valkeinen
2019-04-15  8:53   ` Andrzej Hajda
2019-04-20 22:06   ` Laurent Pinchart
2019-05-03 11:00     ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 15/22] drm/bridge: tc358767: clean-up link training Tomi Valkeinen
2019-04-15  9:54   ` Andrzej Hajda
2019-04-15 11:03     ` Tomi Valkeinen
2019-04-20 22:13   ` Laurent Pinchart
2019-05-03  8:37     ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 16/22] drm/bridge: tc358767: remove check for video mode in link enable Tomi Valkeinen
2019-04-15  9:55   ` Andrzej Hajda
2019-04-20 22:14   ` Laurent Pinchart
2019-05-03  8:10     ` Tomi Valkeinen
2019-05-03 13:00       ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 17/22] drm/bridge: tc358767: use bridge mode_valid Tomi Valkeinen
2019-04-15  9:56   ` Andrzej Hajda
2019-04-20 22:15   ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 18/22] drm/bridge: tc358767: remove tc_connector_best_encoder Tomi Valkeinen
2019-04-15  9:57   ` Andrzej Hajda
2019-04-20 22:18   ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 19/22] drm/bridge: tc358767: copy the mode data, instead of storing the pointer Tomi Valkeinen
2019-04-15 10:09   ` Andrzej Hajda
2019-04-15 11:19     ` Tomi Valkeinen
2019-04-15 12:12       ` Andrzej Hajda
2019-04-20 22:20         ` Laurent Pinchart
2019-03-26 10:31 ` [PATCHv2 20/22] drm/bridge: tc358767: add GPIO & interrupt registers Tomi Valkeinen
2019-04-15 10:09   ` Andrzej Hajda
2019-03-26 10:31 ` [PATCHv2 21/22] drm/bridge: tc358767: add IRQ and HPD support Tomi Valkeinen
2019-04-02  2:16   ` Andrey Smirnov
2019-04-03 11:34     ` Tomi Valkeinen
2019-04-12  8:02       ` Tomi Valkeinen
2019-04-12 18:17         ` Andrey Smirnov
2019-04-15 10:42   ` Andrzej Hajda
2019-04-15 10:59     ` Tomi Valkeinen
2019-04-17  7:32       ` Andrzej Hajda
2019-04-29  9:27         ` Tomi Valkeinen
2019-03-26 10:31 ` [PATCHv2 22/22] dt-bindings: tc358767: add IRQ & " Tomi Valkeinen
2019-03-31  6:42   ` Rob Herring
2019-04-01 10:13   ` [PATCHv2.1 22/22] dt-bindings: tc358767: add " Tomi Valkeinen
2019-04-06  6:06     ` Rob Herring

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=c5b5ca05-2c0a-7cb2-e916-e655138f3e58@ti.com \
    --to=tomi.valkeinen@ti.com \
    --cc=andrew.smirnov@gmail.com \
    --cc=andrey.gusakov@cogentembedded.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jsarha@ti.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=peter.ujfalusi@ti.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.