From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Kumar, Shobhit" Subject: Re: [PATCH 4/4] drm/i915: Add support for Generic MIPI panel driver Date: Thu, 22 May 2014 13:15:19 +0530 Message-ID: <537DAB0F.3010101@intel.com> References: <1397454507-10273-1-git-send-email-shobhit.kumar@intel.com> <1397454507-10273-5-git-send-email-shobhit.kumar@intel.com> <20140519142340.GA9961@strange.amr.corp.intel.com> <537B7FC1.3060807@intel.com> <20140520205508.GA7703@strange.amr.corp.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; Format="flowed" Content-Transfer-Encoding: 7bit Return-path: Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 8C1AD6EB73 for ; Thu, 22 May 2014 00:45:24 -0700 (PDT) In-Reply-To: <20140520205508.GA7703@strange.amr.corp.intel.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" To: Damien Lespiau Cc: Jani Nikula , Daniel Vetter , intel-gfx , arjan.van.de.ven@intel.com List-Id: intel-gfx@lists.freedesktop.org On 5/21/2014 2:25 AM, Damien Lespiau wrote: > On Tue, May 20, 2014 at 09:46:01PM +0530, Shobhit Kumar wrote: >>> - UI is a period, so is homogeneous to time (s), but ui_num being in >>> s^-1 and ui_den a constant, ui_num/ui_den looks like a frequency. Or >>> could it be that UI = ui_den / ui_num? would be confusing, but the >>> code below would make more sense. In which case could we have UI = >>> ui_num / ui_den? >> >> I just kept ui_num and ui_den separately to take care of precision >> loss, but I see how it is adding to confusion. Actually it is ui_den >> / ui_num and we have all computations as 1/UI so it works. I think I >> will compute UI directly as UI = (NS_KHZ_RATIO * 1000) /bitrate and >> divide by 1000 wherever we use to maintain precision. Sounds ok ? > > I think just exchanging the two variable names (ui_num and ui_den) > should be less work for you and should be enough. It's really just about > having ui_num being the UI numerator so the reader is not too surprised Yeah. Will fix this > >>>> + /* B044 */ >>>> + intel_dsi->hs_to_lp_count = >>>> + CEIL_DIV( >>>> + 4 * tlpx_ui + prepare_cnt * 2 + >>>> + exit_zero_cnt * 2 + 10, >>>> + 8); >>> >>> The previous was before I tried to look at the spec too closely. Mind >>> explaining why we don't look at the HS to LP switch count? ie why HS to >>> LP switch cound is always smaller than the LP to HS one? >> >> Because LP to HS uses exit_zero_count which is generally higher than >> clk_zero_count. So just directly used LP to HS which amounts to >> saying that switching from HS to LP takes lesser time than switching >> from LP to HS. I can/should add code to compute max of the two. > > This could go to a separate task if you don't have time right now, > Most likely I can do this as well. Will push the updated patch by sometime tomorrow. Regards Shobhit