Re: [PATCH v5 0/3] drm/panel: Support Rocktech jh057n00900 DSI panel

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux