Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 1/4] drm/i915: fixup interlaced vertical timings confusion
Date: Thu, 26 Jan 2012 22:03:02 +0000	[thread overview]
Message-ID: <d08817$2vgfea@azsmga001.ch.intel.com> (raw)
In-Reply-To: <1327611693-27294-2-git-send-email-daniel.vetter@ffwll.ch>

On Thu, 26 Jan 2012 22:01:30 +0100, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> -	/* XXX some encoders set the crtcinfo, others don't.
> -	 * Obviously we need some form of conflict resolution here...
> -	 */
> -	if (adjusted_mode->crtc_htotal == 0)
> +	/* gen2 needs vertical crtc timing information in fields because that's
> +	 * what dvo outputs want - the chip itself can't do interlaced. All
> +	 * later generations can do interlaced natively and want timings in
> +	 * full frames. */
> +	if (IS_GEN2(dev))
> +		drm_mode_set_crtcinfo(adjusted_mode, CRTC_INTERLACE_HALVE_V);
> +	else
>  		drm_mode_set_crtcinfo(adjusted_mode, 0);
>  
> diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
> index 6eda1b5..020a7d7 100644
> --- a/drivers/gpu/drm/i915/intel_dvo.c
> +++ b/drivers/gpu/drm/i915/intel_dvo.c
> @@ -157,7 +157,6 @@ static bool intel_dvo_mode_fixup(struct drm_encoder *encoder,
>  		C(vsync_end);
>  		C(vtotal);
>  		C(clock);
> -		drm_mode_set_crtcinfo(adjusted_mode, CRTC_INTERLACE_HALVE_V);
>  #undef C
>  	}

Removing drm_mode_set_crtcinfo() scares me because of the above comment.
We need to make sure that the adjusted_mode is initialised along
some path, and the fixup in intel_crtc_mode_fixup is just a hack.

commit 897493504addc5609f04a2c4f73c37ab972c29b2
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sun Sep 12 18:25:19 2010 +0100

    drm/i915: Ensure that the crtcinfo is populated during mode_fixup()
    
    This should fix the mysterious mode setting failures reported during
    boot up and after resume, generally for i8xx class machines.
    
    Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16478
    Reported-and-tested-by: Xavier Chantry <chantry.xavier@gmail.com>
    Buzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29413
    Tested-by: Daniel Vetter <daniel@ffwll.ch>
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    Cc: stable@kernel.org

If you can work out exactly where it should be initialised, you'll be my
hero!
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2012-01-26 22:03 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-26 21:01 [PATCH 0/4] [CFT] interlaced support Daniel Vetter
2012-01-26 21:01 ` [PATCH 1/4] drm/i915: fixup interlaced vertical timings confusion Daniel Vetter
2012-01-26 22:03   ` Chris Wilson [this message]
2012-01-26 22:11     ` Daniel Vetter
2012-01-27 19:08       ` Daniel Vetter
2012-01-26 21:01 ` [PATCH 2/4] drm/i915: fixup interlaced support on ilk+ Daniel Vetter
2012-01-26 21:01 ` [PATCH 3/4] drm/i915: allow interlaced mode output on the SDVO connector Daniel Vetter
2012-01-26 21:01 ` [PATCH 4/4] drm/i915: allow interlaced mode output on the HDMI connector Daniel Vetter
2012-01-26 21:38 ` [PATCH 0/4] [CFT] interlaced support Alfonso Fiore
2012-01-26 21:50   ` Daniel Vetter
2012-01-26 22:10     ` Alfonso Fiore
2012-01-26 22:22       ` Daniel Vetter
2012-01-26 23:34         ` Alfonso Fiore
2012-01-27 17:02           ` Daniel Vetter
2012-01-27 17:20             ` Alfonso Fiore
2012-01-26 21:45 ` Paul Menzel
2012-01-27  2:56 ` Paulo Zanoni
2012-01-27 10:22   ` Daniel Vetter
2012-01-27 16:25     ` Paulo Zanoni
2012-01-27 17:43       ` Daniel Vetter
2012-01-27 21:41         ` Daniel Vetter
2012-01-28  1:52           ` Alfonso Fiore
2012-01-28 11:13             ` Daniel Vetter
2012-01-28 10:21         ` Peter Ross
2012-01-28 10:46           ` Alfonso Fiore
2012-01-28 14:08             ` 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='d08817$2vgfea@azsmga001.ch.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=daniel.vetter@ffwll.ch \
    --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