From mboxrd@z Thu Jan 1 00:00:00 1970 From: Daniel Vetter Subject: Re: [PATCH] drm/i915: replace snb_update_wm with haswell_update_wm on HSW Date: Fri, 24 May 2013 18:07:45 +0200 Message-ID: <20130524160745.GI15743@phenom.ffwll.local> References: <1367872696-4617-1-git-send-email-przanoni@gmail.com> <1368130422-15392-1-git-send-email-przanoni@gmail.com> <20130520155607.GL14974@intel.com> <20130522072519.GA28346@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Return-path: Received: from mail-ee0-f54.google.com (mail-ee0-f54.google.com [74.125.83.54]) by gabe.freedesktop.org (Postfix) with ESMTP id 0E650E6025 for ; Fri, 24 May 2013 09:07:49 -0700 (PDT) Received: by mail-ee0-f54.google.com with SMTP id e50so2722875eek.41 for ; Fri, 24 May 2013 09:07:49 -0700 (PDT) Content-Disposition: inline In-Reply-To: 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, Paulo Zanoni List-Id: intel-gfx@lists.freedesktop.org On Fri, May 24, 2013 at 12:05:15PM -0300, Paulo Zanoni wrote: > 2013/5/22 Ville Syrj=E4l=E4 : > > On Tue, May 21, 2013 at 06:24:38PM -0300, Paulo Zanoni wrote: > >> Hi > >> > >> 2013/5/20 Ville Syrj=E4l=E4 : > >> > On Thu, May 09, 2013 at 05:13:41PM -0300, Paulo Zanoni wrote: > >> >> From: Paulo Zanoni > >> >> + /* We only use IF-ID interlacing. If we ever use PF-ID we'll = need to > >> >> + * adjust the pixel_rate here. */ > >> >> + > >> >> + pfit_size =3D intel_crtc->config.pch_pfit.size; > >> >> + if (pfit_size) { > >> >> + int x, y, crtc_x, crtc_y, hscale, vscale, totscale; > >> >> + > >> >> + x =3D (pfit_size >> 16) & 0xFFFF; > >> >> + y =3D pfit_size & 0xFFFF; > >> >> + crtc_x =3D intel_crtc->config.adjusted_mode.hdisplay; > >> >> + crtc_y =3D intel_crtc->config.adjusted_mode.vdisplay; > >> >> + > >> >> + hscale =3D crtc_x * 1000 / x; > >> >> + vscale =3D crtc_y * 1000 / y; > >> > > >> > That should be 'requested_mode / pfit_size' > >> > >> Why? What's wrong with the current code? > > > > pfit_size is the panel fitter output size, requested_mode is the input > > size (pipesrc). > = > If we use adjusted_mode we'll get the panel's native mode, if we use > requested_mode we'll get the mode seen by xrandr. My interpretation by > checking Haswell Watermarks Calculator and the BSpec description is > that I should use adjusted_mode. And I'm already using pfit_size, so > no need to discuss it. Besides this, I believe I have implemented all > the other suggestions. pfit_size stores the request mode, which matches crtc->config.requested mode. Instead of jumping through hoops I think I'd be better to directly use those values ... -Daniel -- = Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch