Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Damien Lespiau <damien.lespiau@intel.com>
To: dri-devel@lists.freedesktop.org
Cc: intel-gfx@lists.freedesktop.org
Subject: [PATCH 21/22] drm/i915: Prefer crtc_{h|v}display for pipe src dimensions
Date: Wed, 25 Sep 2013 16:45:39 +0100	[thread overview]
Message-ID: <1380123940-14340-22-git-send-email-damien.lespiau@intel.com> (raw)
In-Reply-To: <1380123940-14340-1-git-send-email-damien.lespiau@intel.com>

Now that we ask to adjust the crtc timings for stereo modes, the correct
pipe_src_w and pipe_src_h can be found in crtc_vdisplay and crtc_hdisplay.

v2: Add comment about why pipe_src_w/h need to be set afert
    set_crtcinfo() (Daniel Vetter)

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
---
 drivers/gpu/drm/i915/intel_display.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index c25622d..c94fe38 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -8400,9 +8400,6 @@ intel_modeset_pipe_config(struct drm_crtc *crtc,
 	drm_mode_copy(&pipe_config->adjusted_mode, mode);
 	drm_mode_copy(&pipe_config->requested_mode, mode);
 
-	pipe_config->pipe_src_w = mode->hdisplay;
-	pipe_config->pipe_src_h = mode->vdisplay;
-
 	pipe_config->cpu_transcoder =
 		(enum transcoder) to_intel_crtc(crtc)->pipe;
 	pipe_config->shared_dpll = DPLL_ID_PRIVATE;
@@ -8437,6 +8434,10 @@ encoder_retry:
 	/* Fill in default crtc timings, allow encoders to overwrite them. */
 	drm_mode_set_crtcinfo(&pipe_config->adjusted_mode, CRTC_STEREO_DOUBLE);
 
+	/* set_crtcinfo() may have adjusted hdisplay/vdisplay */
+	pipe_config->pipe_src_w = pipe_config->adjusted_mode.crtc_hdisplay;
+	pipe_config->pipe_src_h = pipe_config->adjusted_mode.crtc_vdisplay;
+
 	/* Pass our mode to the connectors and the CRTC to give them a chance to
 	 * adjust it according to limitations or connector properties, and also
 	 * a chance to reject the mode entirely.
-- 
1.8.3.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2013-09-25 15:45 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-25 15:45 HDMI stereo support v6 Damien Lespiau
2013-09-25 15:45 ` [PATCH 01/22] drm: Move the GET_CAP macros next to the corresponding ioctl structure Damien Lespiau
2013-09-25 15:45 ` [PATCH 02/22] drm: Add a SET_CLIENT_CAP ioctl Damien Lespiau
2013-09-25 15:45 ` [PATCH 03/22] drm: Add HDMI stereo 3D flags to struct drm_mode_modeinfo Damien Lespiau
2013-09-25 15:45 ` [PATCH 04/22] drm: Add a STEREO_3D capability to the SET_CLIENT_CAP ioctl Damien Lespiau
2013-09-25 15:45 ` [PATCH 05/22] drm/edid: Expose mandatory stereo modes for HDMI sinks Damien Lespiau
2013-09-25 15:45 ` [PATCH 06/22] drm: Extract add_hdmi_mode() out of do_hdmi_vsdb_modes() Damien Lespiau
2013-09-25 15:45 ` [PATCH 07/22] drm: Reject modes with more than 1 stereo flags set Damien Lespiau
2013-09-25 15:45 ` [PATCH 08/22] drm: Set the relevant infoframe field when scanning out a 3D mode Damien Lespiau
2013-09-25 15:45 ` [PATCH 09/22] drm: Make drm_match_cea_mode() return the underlying 2D VIC for 3d modes Damien Lespiau
2013-09-25 15:45 ` [PATCH 10/22] drm: Carry over the stereo flags when adding the alternate mode Damien Lespiau
2013-09-25 15:45 ` [PATCH 11/22] drm: Make exposing stereo modes a per-connector opt-in Damien Lespiau
2013-09-25 15:45 ` [PATCH 12/22] drm: Factor out common CRTC viewport checking code Damien Lespiau
2013-09-25 15:45 ` [PATCH 13/22] drm: Check the fb size against the adjusted v/hdisplay for stereo modes Damien Lespiau
2013-09-25 15:45 ` [PATCH 14/22] drm: Remove clock_index from struct drm_display_mode Damien Lespiau
2013-09-25 15:45 ` [PATCH 15/22] drm: Remove synth_clock " Damien Lespiau
2013-09-25 15:45 ` [PATCH 16/22] drm: Introduce a crtc_clock for " Damien Lespiau
2013-09-25 15:45 ` [PATCH 17/22] drm: Implement timings adjustments for frame packing Damien Lespiau
2013-09-25 15:45 ` [PATCH 18/22] drm/i915: Use crtc_clock in intel_dump_crtc_timings() Damien Lespiau
2013-09-25 15:45 ` [PATCH 19/22] drm/i915: Use crtc_clock with the adjusted mode Damien Lespiau
2013-09-25 15:45 ` [PATCH 20/22] drm/i915: Ask the DRM core do make stereo timings adjustements Damien Lespiau
2013-09-25 15:45 ` Damien Lespiau [this message]
2013-09-25 15:45 ` [PATCH 22/22] drm/i915: Allow stereo modes on HDMI Damien Lespiau
2013-09-25 16:47 ` Upstreaming the stereo v6 series Damien Lespiau
2013-09-26  9:40   ` 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=1380123940-14340-22-git-send-email-damien.lespiau@intel.com \
    --to=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