From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v2 03/12] drm/sun4i: sun6i_mipi_dsi: Setup burst mode timings Date: Tue, 27 Nov 2018 11:07:24 +0100 Message-ID: <20181127100724.od5rm7vxdn7qemdv@flea> References: <20181116163916.29621-1-jagan@amarulasolutions.com> <20181116163916.29621-4-jagan@amarulasolutions.com> <20181119083036.riydru5xefao3xte@flea> <20181120154532.mykbbrc3homwf2fi@flea> Reply-To: maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="ljkfb22ybl2pyuox" Return-path: Sender: linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Content-Disposition: inline In-Reply-To: List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , To: Jagan Teki Cc: Maarten Lankhorst , Sean Paul , David Airlie , Rob Herring , Chen-Yu Tsai , Icenowy Zheng , Jernej Skrabec , Vasily Khoruzhick , Thierry Reding , Mark Rutland , dri-devel , devicetree , linux-kernel , linux-arm-kernel , Michael Trimarchi , TL Lim , linux-sunxi-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org, linux-amarula-dyjBcgdgk7Pe9wHmmfpqLFaTQe2KTcn/@public.gmane.org List-Id: devicetree@vger.kernel.org --ljkfb22ybl2pyuox Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline On Tue, Nov 20, 2018 at 09:52:23PM +0530, Jagan Teki wrote: > On Tue, Nov 20, 2018 at 9:15 PM Maxime Ripard wrote: > > > > On Mon, Nov 19, 2018 at 04:30:37PM +0530, Jagan Teki wrote: > > > On Mon, Nov 19, 2018 at 2:00 PM Maxime Ripard wrote: > > > > > > > > On Fri, Nov 16, 2018 at 10:09:07PM +0530, Jagan Teki wrote: > > > > > Burst mode display timings are different from convectional > > > > > video mode so update the horizontal and vertical timings. > > > > > > > > > > Reference code taken from BSP (from linux-sunxi/ > > > > > drivers/video/sunxi/disp2/disp/de/lowlevel_sun50iw1/de_dsi.c) > > > > > > > > > > dsi_hsa = 0; > > > > > dsi_hbp = 0; > > > > > dsi_hact = x*dsi_pixel_bits[format]/8; > > > > > dsi_hblk = dsi_hact; > > > > > dsi_hfp = 0; > > > > > dsi_vblk = 0; > > > > > > > > > > Signed-off-by: Jagan Teki > > > > > > > > How is that matching the code you have in the rest of your patch? > > > > > > + if (device->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) > > > + timings.hblk = (mode->hdisplay * Bpp); > > > + else > > > + sun6i_dsi_get_timings(dsi, mode, &timings); > > > > > > It's again your request to "keep the couple of function to make more > > > readable" > > > > That function in particular doesn't make it much more readable, but > > more importantly, your commit log doesn't match what you code does. > > May be I can update the commit message if the function is OK. for > burst most of the timings are 0 so I used structure with memset to > keep not assigning 0's explicitly. otherwise do you have any > suggestions, please let me know. Drop the part that move the timings setup to another function in this patch. Thanks! Maxime -- Maxime Ripard, Bootlin Embedded Linux and Kernel engineering https://bootlin.com --ljkfb22ybl2pyuox--