From: Daniel Vetter Subject: Re: [PATCH] drm/i915: Compute WR PLL dividers dynamically Date: Wed, 8 May 2013 21:37:14 +0200 Message-ID: <20130508193714.GY5763@phenom.ffwll.local> References: <1368018520-24556-1-git-send-email-damien.lespiau@intel.com> <20130508191354.GX5763@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-ee0-f45.google.com (mail-ee0-f45.google.com [74.125.83.45]) by gabe.freedesktop.org (Postfix) with ESMTP id AB679E5C57 for ; Wed, 8 May 2013 12:34:07 -0700 (PDT) Received: by mail-ee0-f45.google.com with SMTP id l10so1221021eei.32 for ; Wed, 08 May 2013 12:34:06 -0700 (PDT) Content-Disposition: inline In-Reply-To: <20130508191354.GX5763@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+gcfxdi-intel-gfx=m.gmane.org@lists.freedesktop.org To: Paulo Zanoni Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Wed, May 08, 2013 at 09:13:54PM +0200, Daniel Vetter wrote: > On Wed, May 08, 2013 at 01:07:23PM -0300, Paulo Zanoni wrote: > > Hi > > > > 2013/5/8 Damien Lespiau : > > > Up to now, we were using a static table to match the clock frequency > > > with a (r2,n2,p) triplet. Despite this table being big, it's by no mean > > > comprehensive and we had to fall back to the closest frequency when the > > > requested TMDS clock wasn't in the table. > > > > > > This patch computes (r2,n2,p) dynamically and get rid of The Big Table. > > > > > > > There are 2 minor optional bikesheds below. I "reviewed" your patch, > > it looks correct, but I have to admit I didn't really check the math > > too hard (and there's no definitive documentation we can check your > > math against...). > > > > So the real work I did was testing. I discovered I don't have any > > monitors with modes that are not on the big wrpll_tmds_clock_table, so > > I couldn't test that case. In one of my monitors I tested all the > > modes and they all work. In another monitor I tested some modes, they > > work, and I also checked whether the p/n/r values match the table and > > they do match. I also checked on the monitor's menu if it thinks its > > frequency is the correct one. All looks correct. > > > > Reviewed-by: Paulo Zanoni > > Tested-by: Paulo Zanoni > > Queued for -next, thanks for the patch. > > > I also looked briefly to your i-g-t patches. They look fine, but my > > concern is that the code inside the Kernel will get out-of-sync with > > the code in i-g-t, so we won't really be able to catch regressions. > > OTOH, I do have an idea for a different i-g-t test: you read our > > registers (WRPLL_1, WRPLL_2, Link M) in order to check which > > frequency/r/n/p we're using inside the Kernel, then you look at the > > old wrpll_tmds_clock_table and check if the values used on the Kernel > > match the values on the table. Maybe this should be incorporated at > > testdisplay. Maybe my idea is just a bad idea and should be ignored. > > Feel free to do whatever you prefer for the i-g-t patches. > > Yeah, I'm not too sure about what we should do with the i-g-t. Commit it > as-is certainly won't hurt, but I'm not sure whether it can provide > additional value now that the conversion is done. Oops, blows up on 32bit machines. I guess the igt will be useful once more to check that the 32bit version is solid, too. Dropped from dinq for now. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch