public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Damien Lespiau <damien.lespiau@intel.com>
Cc: intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 2/2] drm: Check the fb size against the adjusted v/hdisplay for stereo modes
Date: Mon, 23 Sep 2013 21:39:28 +0300	[thread overview]
Message-ID: <20130923183928.GX4531@intel.com> (raw)
In-Reply-To: <1379948260-21846-3-git-send-email-damien.lespiau@intel.com>

On Mon, Sep 23, 2013 at 03:57:40PM +0100, Damien Lespiau wrote:
> Some stereo modes, like frame packing, need a larger CRTC viewport than
> the "natural" underlying 2D mode and thus drm_crtc_check_viewport()
> needs to query the adjusted mode to use the correct h/vdisplay.
> 
> Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
> ---
>  drivers/gpu/drm/drm_crtc.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index db05864..807309f 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -2078,6 +2078,14 @@ static int drm_crtc_check_viewport(const struct drm_crtc *crtc,
>  	hdisplay = mode->hdisplay;
>  	vdisplay = mode->vdisplay;
>  
> +	if (drm_mode_is_stereo(mode)) {
> +		struct drm_display_mode adjusted = *mode;
> +
> +		drm_mode_set_crtcinfo(&adjusted, CRTC_STEREO_DOUBLE);
> +		hdisplay = adjusted.crtc_hdisplay;
> +		vdisplay = adjusted.crtc_vdisplay;
> +	}

Yeah, I think this is as good as we can do in generic code. Normally
the driver is free to adjust the non-visible portion of the timings,
but with frame packing the non-visible part also affects the viewport
size, so drivers supporting frame packing simply have to be more
careful how they adjust the timings, or they need to do another check
after the adjustments are done.

For the series:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> +
>  	if (crtc->invert_dimensions)
>  		swap(hdisplay, vdisplay);
>  
> -- 
> 1.8.3.1
> 
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx

-- 
Ville Syrjälä
Intel OTC

  reply	other threads:[~2013-09-23 18:39 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-23 14:57 Check the fb size against the correct CRTC viewport for stereo modes Damien Lespiau
2013-09-23 14:57 ` [PATCH 1/2] drm: Factor out common CRTC viewport checking code Damien Lespiau
2013-09-23 14:57 ` [PATCH 2/2] drm: Check the fb size against the adjusted v/hdisplay for stereo modes Damien Lespiau
2013-09-23 18:39   ` Ville Syrjälä [this message]
2013-09-24  9:18     ` [Intel-gfx] " Daniel Vetter

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=20130923183928.GX4531@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=damien.lespiau@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /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