public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: akash.goel@intel.com, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v4 2/4] drm/i915: New drm crtc property for varying the Pipe Src size
Date: Tue, 29 Apr 2014 16:38:19 +0200	[thread overview]
Message-ID: <20140429143819.GA20800@phenom.ffwll.local> (raw)
In-Reply-To: <20140429140659.GF18465@intel.com>

On Tue, Apr 29, 2014 at 05:06:59PM +0300, Ville Syrjälä wrote:
> On Sun, Apr 20, 2014 at 04:14:18PM +0530, akash.goel@intel.com wrote:
> > From: Akash Goel <akash.goel@intel.com>
> > 
> > This patch adds a new drm crtc property for varying the Pipe Src size
> > or the Panel fitter input size. Pipe Src controls the size that is
> > scaled from.
> > This will allow to dynamically flip (without modeset) the frame buffers
> > of different resolutions
> > 
> > v2: Added a check to fail the set property call if Panel fitter is
> > disabled & new PIPESRC programming do not match with PIPE timings.
> > Removed the pitch mismatch check on frame buffer, when being flipped.
> > This is currently done only for VLV/HSW.
> > 
> > v3: Modified the check, added in v2, to consider the platforms having
> > Split PCH.
> > 
> > v4: Refactored based on latest codebase.
> > Used 'UINT_MAX' macro in place of constant.
> > 
> > Testcase: igt/kms_panel_fitter_test
> > 
> > Signed-off-by: Akash Goel <akash.goel@intel.com>
> > ---
> >  drivers/gpu/drm/i915/i915_drv.h      |  6 +++
> >  drivers/gpu/drm/i915/intel_display.c | 76 +++++++++++++++++++++++++++++++++++-
> >  2 files changed, 80 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
> > index 7d6acb4..104a232 100644
> > --- a/drivers/gpu/drm/i915/i915_drv.h
> > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > @@ -1441,6 +1441,12 @@ struct drm_i915_private {
> >  	struct drm_property *broadcast_rgb_property;
> >  	struct drm_property *force_audio_property;
> >  
> > +	/*
> > +	 * Property to dynamically vary the size of the
> > +	 * PIPESRC or Panel fitter input size
> > +	 */
> > +	struct drm_property *input_size_property;
> > +
> >  	uint32_t hw_context_size;
> >  	struct list_head context_list;
> >  
> > diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
> > index f26be4e..5484ae2 100644
> > --- a/drivers/gpu/drm/i915/intel_display.c
> > +++ b/drivers/gpu/drm/i915/intel_display.c
> > @@ -8902,8 +8902,18 @@ static int intel_crtc_page_flip(struct drm_crtc *crtc,
> >  	 * Note that pitch changes could also affect these register.
> >  	 */
> >  	if (INTEL_INFO(dev)->gen > 3 &&
> > -	    (fb->offsets[0] != crtc->primary->fb->offsets[0] ||
> > -	     fb->pitches[0] != crtc->primary->fb->pitches[0]))
> > +	    (fb->offsets[0] != crtc->primary->fb->offsets[0]))
> > +		return -EINVAL;
> > +
> > +	/*
> > +	 * Bypassing the fb pitch check for VLV/HSW, as purportedly there
> > +	 * is a dynamic flip support in VLV/HSW. This will allow to
> > +	 * flip fbs of different resolutions without doing a modeset.
> > +	 * TBD, confirm the same for other newer gen platforms also.
> > +	 */
> > +	if (INTEL_INFO(dev)->gen > 3 &&
> > +	    !IS_VALLEYVIEW(dev) && !IS_HASWELL(dev) &&
> > +	    (fb->pitches[0] != crtc->primary->fb->pitches[0]))
> 
> NAK. Please read the comment above the check to understand why we can't
> just change the stride here. I guess on HSW+ it might be possible since
> it uses the x/y offsets even with linear FBs so stride changes don't
> affect the offset. Also such changes sould be in separate patches
> anyway.
> 
> I guess one option would be update the linear offset with LRI, but
> since the offset register gets latched independently of the DSPSURF
> write the changes aren't guaranteed to happen atomically. Also on
> VLV LRI to display registers is apparently busted.
> 
> If you do find a way to make this work on some platforms, then we
> need to have a test for it to make sure it does the right thing.

Note that even on hsw we update the linear offset if it's out of range for
the x/y tiled offsets. Which can happen with very wide/high virtual
desktops.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

  reply	other threads:[~2014-04-29 14:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailto:1394542461-22198-3-git-send-email-akash.goel@intel.com>
2014-03-26  3:49 ` [PATCH v3 2/3] drm/i915: New drm crtc property for varying the Pipe Src size akash.goel
2014-04-20 10:44   ` [PATCH v4 2/4] " akash.goel
2014-04-20 10:52     ` [PATCH 4/4] drm/i915: Changed the return type from 'void', so as to return an error akash.goel
2014-04-29 13:33       ` Ville Syrjälä
2014-05-04  9:24         ` Akash Goel
2014-04-29 14:06     ` [PATCH v4 2/4] drm/i915: New drm crtc property for varying the Pipe Src size Ville Syrjälä
2014-04-29 14:38       ` Daniel Vetter [this message]
2014-05-04 10:21       ` Akash Goel
2014-06-01  6:49         ` Akash Goel
2014-06-17 13:58         ` Ville Syrjälä

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140429143819.GA20800@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=akash.goel@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=ville.syrjala@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox