Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Bryan Freed <bfreed@chromium.org>,
	jbarnes@virtuousgeek.org, intel-gfx@lists.freedesktop.org,
	Mark Hayter <mdhayter@chromium.org>,
	Olof Johansson <olofj@chromium.org>
Subject: Re: [PATCH] i915: Modify for pineview clock source and lvds sync polarity
Date: Wed, 08 Dec 2010 22:49:47 +0000	[thread overview]
Message-ID: <5b55a1$it3poq@fmsmga002.fm.intel.com> (raw)
In-Reply-To: <AANLkTimLCt9Jbg7x=hYDYsisc6TvOwjHd9vybswR=7aC@mail.gmail.com>

On Wed, 8 Dec 2010 13:46:38 -0800, Bryan Freed <bfreed@chromium.org> wrote:
> The i915 driver normally assumes the video bios has configured several
> of the LVDS panel registers, and it just inherits the values. If the
> vbios has not run, several of these will need to be setup.
> 
> intel_bios.c: default clock source selection on pineview to use the SSC
> source
> intel_display.c: ensures the sync polarity to the panel is correct.

Once again I am astounded that we haven't set the polarities correctly.
Can you split this up into two patches (adjusting the defaults and setting
the sync flags).

> + /* Only tested on pineview, should work on IS_9XX */
> + if (IS_PINEVIEW(dev)) {
> + /* Set sync polarity for case when vbios did not */
> + if (adjusted_mode->flags & DRM_MODE_FLAG_NHSYNC)
> + lvds |= LVDS_HSYNC_POLARITY;
> + if (adjusted_mode->flags & DRM_MODE_FLAG_PHSYNC)
> + lvds &= ~LVDS_HSYNC_POLARITY;
> + if (adjusted_mode->flags & DRM_MODE_FLAG_NVSYNC)
> + lvds |= LVDS_VSYNC_POLARITY;
> + if (adjusted_mode->flags & DRM_MODE_FLAG_PVSYNC)
> + lvds &= ~LVDS_VSYNC_POLARITY;
> + }

Aside from being white-space mangled, experience suggests that if we are
going to set some flags, then we should just unconditionally clear them
first. Sooner or later there will be a BIOS that sets conflicting flags.
Furthermore, we should record what the BIOS (as we are currently trusting
the BIOS to set up the internal graphics correctly) set them to and print
a warning if they differ. I forsee bug reports... ;-)
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

      reply	other threads:[~2010-12-08 22:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-08 21:46 [PATCH] i915: Modify for pineview clock source and lvds sync polarity Bryan Freed
2010-12-08 22:49 ` Chris Wilson [this message]

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='5b55a1$it3poq@fmsmga002.fm.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=bfreed@chromium.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=mdhayter@chromium.org \
    --cc=olofj@chromium.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