All of lore.kernel.org
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Chris Wilson <chris@chris-wilson.co.uk>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915: Don't write DSPSURF for old chips
Date: Mon, 27 Feb 2012 14:08:28 +0100	[thread overview]
Message-ID: <s5hobsks9tf.wl%tiwai@suse.de> (raw)
In-Reply-To: <d08817$3a28e1@azsmga001.ch.intel.com>

At Mon, 27 Feb 2012 12:17:57 +0000,
Chris Wilson wrote:
> 
> On Mon, 27 Feb 2012 12:39:24 +0100, Takashi Iwai <tiwai@suse.de> wrote:
> > It seems that writing DSPSURF in intel_flush_display_plane() causes
> > the blank screen on some old laptops like Dell D630 with 965GM.
> > Since this operation is needed only for ILK+, make it conditional.
> 
> The specs say that DSPASURF is the latch register for updates of the DSPA
> registers on gen4 (including 965gm) as well. Presumably the bug is that
> we only partially update the DSPA registers prior to the first call to
> intel_flush_display_plane() which this papers over by disabling the
> update until a valid address is written to DSPASURF. And there is such a
> spurious call to intel_enable_plane() prior to us setting a valid
> scanout surface:

Sounds reasonable.  FWIW, the change was first introduced in commit
[b24e7179: drm/i915: add pipe/plane enable/disable functions],
then in commit [efc2924e: drm/i915: Call intel_enable_plane from
i9xx_crtc_mode_set (again)], it's placed into i9xx_crtc_mode_set().

This explains the fact that it was discovered only on old machines
as i9xx_crtc_mode_set() is the only crtc_mode_set op calling
intel_enable_plane().

BTW, the bisection leaded to a merge commit, so the bug is really
depending on the activation path or timing.

I'll ask a tester to try your patch.


thanks,

Takashi

> diff --git a/drivers/gpu/drm/i915/intel_display.c
> b/drivers/gpu/drm/i915/intel_d
> index 66b19d3..ea8e4a1 100644
> --- a/drivers/gpu/drm/i915/intel_display.c
> +++ b/drivers/gpu/drm/i915/intel_display.c
> @@ -5453,7 +5453,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc
> *crtc,
>  
>         I915_WRITE(DSPCNTR(plane), dspcntr);
>         POSTING_READ(DSPCNTR(plane));
> -       intel_enable_plane(dev_priv, plane, pipe);
>  
>         ret = intel_pipe_set_base(crtc, x, y, old_fb);
> 
> -Chris
> 
> -- 
> Chris Wilson, Intel Open Source Technology Centre
> 

  reply	other threads:[~2012-02-27 13:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-27 11:39 [PATCH] drm/i915: Don't write DSPSURF for old chips Takashi Iwai
2012-02-27 12:17 ` Chris Wilson
2012-02-27 13:08   ` Takashi Iwai [this message]
2012-02-28  6:43     ` Takashi Iwai
2012-02-29 23:54       ` Chris Wilson
2012-03-01  6:37         ` Takashi Iwai

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=s5hobsks9tf.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=chris@chris-wilson.co.uk \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.