Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp842585yba; Wed, 3 Apr 2019 22:03:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw+2eSkp6+BOnzp/gOy4+Kyeg0Sqnpi+EPc9RwhSGQHNnP80wzI3+kn2dlazy9tsAXAScUT X-Received: by 2002:a63:2c4a:: with SMTP id s71mr3483644pgs.373.1554354233779; Wed, 03 Apr 2019 22:03:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554354233; cv=none; d=google.com; s=arc-20160816; b=bd759/pZQdwSO1qKXT3X+J2x0scVBygwZ0vZ0I6J6I+8llW4wDboUGE9dLLm013ZFb Yn6oqjFdOpKROkfDQJ2pPlyJNkWz2s0sqKvlzZVBvWrN93wiWyv8x+GEjVK8u0vUStQn hj0emL1n7lv+vzunLxNMwCVGMmCHm/TrMBJUfcIUwK5V7lI29XRTfBV8cJ4Shl/dZhuj neslzfJc8rmHhVCIrjzSaNk2dzLfE8bW15FuCIvWBmNQO0t8Nv9VQDrYPN8OJGk66flZ /1/6jV0F73RSnPXTZFVP45c0RtnZngtwGARCXgMGf4P0gKL9BKVKhPXChaVLIq4GNvJc KJQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=r41SckyeRHnOOYzBeVi+k9jaNJP2oR5e9whjIno/5S4=; b=JPUJ7WbImKbWhC+QXwUC6iNCpTwYw0vt2a5Ak7P9L6MHgZZThWCmPvqhquwdeBdJrK 2X6XBaBd/hEtznzB2472kgkS87NKcxQ5XOiB8XtYsYIpFA0zLA8xJzBZHfgDdEf51qIX /LJzVXyutnYI8G0geaXOI4xDsDXWRJl4a718ogYa4JcZHT6arBezcZyko8x49hOK6GpQ vTh1lQZws5COVvdR6vOvH5XVYEBCRXPlu2O3hOQeEQhiyd9UFAL12WNG4o91OGHPoh60 oHxucuHQNcQVYh1REwoZZi67SfR/zE5mf6RngmtWqMLyNM5XZgtnnc19CTbyeitLwRLC TkBA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l73si2612384pge.333.2019.04.03.22.03.26; Wed, 03 Apr 2019 22:03:53 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726222AbfDDFC0 (ORCPT + 99 others); Thu, 4 Apr 2019 01:02:26 -0400 Received: from smtprelay0130.hostedemail.com ([216.40.44.130]:50037 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725904AbfDDFC0 (ORCPT ); Thu, 4 Apr 2019 01:02:26 -0400 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 4A1D4100E86C4; Thu, 4 Apr 2019 05:02:24 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:599:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2110:2194:2198:2199:2200:2393:2559:2562:2731:2828:2895:3138:3139:3140:3141:3142:3353:3622:3865:3867:3868:3870:3871:3872:3874:4250:4321:4470:5007:6742:8531:8603:10004:10400:10848:11026:11232:11658:11914:12043:12438:12555:12679:12740:12760:12895:13069:13311:13357:13439:14096:14097:14180:14659:14721:21060:21080:21451:21627:30012:30054:30070:30091,0,RBL:47.151.153.53:@perches.com:.lbl8.mailshell.net-62.8.0.100 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:30,LUA_SUMMARY:none X-HE-Tag: spoon02_14868edfea734 X-Filterd-Recvd-Size: 3217 Received: from XPS-9350.home (unknown [47.151.153.53]) (Authenticated sender: joe@perches.com) by omf17.hostedemail.com (Postfix) with ESMTPA; Thu, 4 Apr 2019 05:02:20 +0000 (UTC) Message-ID: Subject: Re: [PATCH v5 0/3] drm/panel: Support Rocktech jh057n00900 DSI panel From: Joe Perches To: Sam Ravnborg Cc: Thierry Reding , Guido =?ISO-8859-1?Q?G=FCnther?= , David Airlie , Daniel Vetter , Rob Herring , Mark Rutland , Kevin Hilman , Manivannan Sadhasivam , Shawn Guo , Jagan Teki , Martin Blumenstingl , Johan Hovold , "David S. Miller" , Mauro Carvalho Chehab , Greg Kroah-Hartman , Nicolas Ferre , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 03 Apr 2019 22:02:19 -0700 In-Reply-To: <20190403210738.GA9173@ravnborg.org> References: <20190403161735.GN5238@ulmo> <1ed5eb3af4df6b2dd1544c7b696e034ed5c94f06.camel@perches.com> <20190403210738.GA9173@ravnborg.org> Content-Type: text/plain; charset="ISO-8859-1" User-Agent: Evolution 3.30.1-1build1 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2019-04-03 at 23:07 +0200, Sam Ravnborg wrote: > Hi Joe. > > Thanks for your patch. > > > --- > > drivers/gpu/drm/panel/panel-rocktech-jh057n00900.c | 210 +++++++++++++-------- > > 1 file changed, 136 insertions(+), 74 deletions(-) > > Hmmm, add more lines than it deletes. Yeah, I said that too. > > -#define dsi_generic_write_seq(dsi, seq...) do { \ > > - static const u8 d[] = { seq }; \ > > - int ret; \ > > - ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \ > > - if (ret < 0) \ > > - return ret; \ > > - } while (0) > The above macro was the one triggering this patch. > And frankly it looks nice and simple. > > The old code is IMO more readable. > - We have all the commands listed in the order they > are used and in a rahter compatch format. This too. > - It is obvious when we need delays. Here too, also it allows an easy way to update if there is another delay needed between 2 uses. > - We have traditional #defines for the constants we know And the values for the data for those constants are separated from the constants themselves as well as at least 1 missing constant. > This is all to some extent bikeshedding, Yup. Still, I think what I suggested is more readable ;) > but I suggest > to keep the current code. > It is simple and it is tested. btw: The object code for either is the same size on x86-64 > Thanks for trying to come up with a better solution. n/c. cheers, Joe