Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Paulo Zanoni <przanoni@gmail.com>
Cc: intel-gfx@lists.freedesktop.org, Paulo Zanoni <paulo.r.zanoni@intel.com>
Subject: Re: [PATCH 1/3] drm/i915: add PCH_NONE to enum intel_pch
Date: Wed, 4 Jul 2012 09:49:01 +0200	[thread overview]
Message-ID: <20120704074901.GE5375@phenom.ffwll.local> (raw)
In-Reply-To: <1341352096-19712-1-git-send-email-przanoni@gmail.com>

On Tue, Jul 03, 2012 at 06:48:16PM -0300, Paulo Zanoni wrote:
> From: Paulo Zanoni <paulo.r.zanoni@intel.com>
> 
> And rely on the fact that it's 0 to assume that machines without a PCH
> will have PCH_NONE as dev_priv->pch_type.
> 
> Just today I finally realized that HAS_PCH_IBX is true for machines
> without a PCH. IMHO this is totally counter-intuitive and I don't
> think it's a good idea to assume that we're going to check for
> HAS_PCH_IBX only after we check for HAS_PCH_SPLIT.
> 
> I believe that in the future we'll have more PCH types and checks
> like:
> 
>     if (HAS_PCH_IBX(dev) || HAS_PCH_CPT(dev))
> 
> will become more and more common. There's a good chance that we may
> break non-PCH machines by adding these checks in code that runs on all
> machines. I also believe that the HAS_PCH_SPLIT check will become less
> common as we add more and more different PCH types. We'll probably
> start replacing checks like:
> 
>     if (HAS_PCH_SPLIT(dev))
>         foo();
>     else
>         bar();
> 
> with:
> 
>     if (HAS_PCH_NEW(dev))
>         baz();
>     else if (HAS_PCH_OLD(dev) || HAS_PCH_IBX(dev))
>         foo();
>     else
>         bar();
> 
> and this may break gen 2/3/4.
> 
> As far as we have investigated, this patch will affect the behavior of
> intel_hdmi_dpms and intel_dp_link_down on gen 4. In both functions the
> code inside the HAS_PCH_IBX check is for IBX-specific workarounds, so
> we should be safe. If we start bisecting gen 2/3/4 bugs to this commit
> we should consider replacing the HAS_PCH_IBX checks with something
> else.
> 
> V2: Improve commit message, list possible side effects and solution.
> 
> Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>

All three patches queued for -next, thanks.
-Daniel
-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

      reply	other threads:[~2012-07-04  7:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-03 18:57 [PATCH 1/3] drm/i915: add PCH_NONE to enum intel_pch Paulo Zanoni
2012-07-03 18:57 ` [PATCH 2/3] drm/i915: get rid of dev_priv->info->has_pch_split Paulo Zanoni
2012-07-03 19:15   ` Daniel Vetter
2012-07-03 20:46     ` Paulo Zanoni
2012-07-03 18:57 ` [PATCH 3/3] drm/i915: don't ironlake_init_pch_refclk() on LPT Paulo Zanoni
2012-07-03 19:10 ` [PATCH 1/3] drm/i915: add PCH_NONE to enum intel_pch Daniel Vetter
2012-07-03 20:29   ` Paulo Zanoni
2012-07-03 20:39     ` Daniel Vetter
2012-07-03 21:48 ` Paulo Zanoni
2012-07-04  7:49   ` Daniel Vetter [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=20120704074901.GE5375@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=paulo.r.zanoni@intel.com \
    --cc=przanoni@gmail.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