On Fri, May 24, 2013 at 12:05:15PM -0300, Paulo Zanoni wrote: > 2013/5/22 Ville Syrjälä <ville.syrj...@linux.intel.com>: > > On Tue, May 21, 2013 at 06:24:38PM -0300, Paulo Zanoni wrote: > >> Hi > >> > >> 2013/5/20 Ville Syrjälä <ville.syrj...@linux.intel.com>: > >> > On Thu, May 09, 2013 at 05:13:41PM -0300, Paulo Zanoni wrote: > >> >> From: Paulo Zanoni <paulo.r.zan...@intel.com> > >> >> + /* We only use IF-ID interlacing. If we ever use PF-ID we'll need > >> >> to > >> >> + * adjust the pixel_rate here. */ > >> >> + > >> >> + pfit_size = intel_crtc->config.pch_pfit.size; > >> >> + if (pfit_size) { > >> >> + int x, y, crtc_x, crtc_y, hscale, vscale, totscale; > >> >> + > >> >> + x = (pfit_size >> 16) & 0xFFFF; > >> >> + y = pfit_size & 0xFFFF; > >> >> + crtc_x = intel_crtc->config.adjusted_mode.hdisplay; > >> >> + crtc_y = intel_crtc->config.adjusted_mode.vdisplay; > >> >> + > >> >> + hscale = crtc_x * 1000 / x; > >> >> + vscale = 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 _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx