public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Hugh Dickins <hughd@google.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>,
	linux-kernel@vger.kernel.org,
	Daniel Vetter <daniel.vetter@ffwll.ch>,
	Arnd Bergmann <arnd@arndb.de>, Jiri Olsa <jolsa@redhat.com>,
	Chris Clayton <chris2553@googlemail.com>
Subject: Re: [PATCH] drm/i915,agp/intel: Do not clear stolen entries
Date: Mon, 24 Jan 2011 10:10:20 +0000	[thread overview]
Message-ID: <849307$b9dvii@azsmga001.ch.intel.com> (raw)
In-Reply-To: <alpine.LSU.2.00.1101232246380.3691@sister.anvils>

On Sun, 23 Jan 2011 23:40:41 -0800 (PST), Hugh Dickins <hughd@google.com> wrote:
> It improved matters for me (on a two-year-old Aspire One which had been
> showing the same few characters of text repeated a large number of times
> across the screen with 2.6.38-rc1 and rc2): the VESA framebuffer showing
> good text at last.  But crashed once I tried startx, netconsole showing:

[snip]
 
> But your comment above on clear_range was very helpful: your latest
> patch fixed one call, but left two others unfixed.  Please fold in:
> 
> --- a/drivers/gpu/drm/i915/i915_gem_gtt.c	2011-01-23 11:52:47.350395154 -0800
> +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c	2011-01-23 20:13:01.457805176 -0800
> @@ -36,7 +36,7 @@ void i915_gem_restore_gtt_mappings(struc
>  
>  	/* First fill with scratch pages */
>  	intel_gtt_clear_range(dev_priv->mm.gtt_start / PAGE_SIZE,
> -			      dev_priv->mm.gtt_end / PAGE_SIZE);
> +		(dev_priv->mm.gtt_end - dev_priv->mm.gtt_start) / PAGE_SIZE);
>  
>  	list_for_each_entry(obj, &dev_priv->mm.gtt_list, gtt_list) {
>  		i915_gem_clflush_object(obj);
> --- a/drivers/gpu/drm/i915/i915_gem.c	2011-01-23 11:52:47.346395154 -0800
> +++ b/drivers/gpu/drm/i915/i915_gem.c	2011-01-23 20:10:58.081193280 -0800
> @@ -149,7 +149,7 @@ void i915_gem_do_init(struct drm_device
>  	dev_priv->mm.mappable_gtt_total = min(end, mappable_end) - start;
>  
>  	/* Take over this portion of the GTT */
> -	intel_gtt_clear_range(start / PAGE_SIZE, end / PAGE_SIZE);
> +	intel_gtt_clear_range(start / PAGE_SIZE, (end - start) / PAGE_SIZE);
>  }

The patch I finally applied did include those fixes. After making the
mistake once, I had to double check the other call sites.

> On this laptop I'm typing from (GM965 with KMS), I've had no trouble
> getting X up; but when typing in one of the xterms, typed characters
> often stop echoing, until I shift to a different window, whereupon
> they appear.  This condition cleared (for a while) by switching to
> VESA fb console and back; no such problem observed on that console.
> 
> Does that sound familiar?  I have no evidence whatever that i915 is
> to blame here.  Several times I tried bisecting last week, but each
> attempt ended up in a nonsensical place, because the effect does not
> occur to order.  So I'd sometimes mark a bisection point as good when
> I guess it must actually have been bad.  Perhaps it's a matter of
> timing or an uninitialized variable.  But while I'm here, worth asking
> if that behaviour sounds like anything you might be responsible for?

Sounds suspiciously like the batch buffer is not being dispatched and
flushed to the scanout. A very similar bug was recently fixed for
xf86-video-intel 2.14.0 which was causing deferred output. 
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

  reply	other threads:[~2011-01-24 10:10 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-20 18:12 [BISECTED] agp/intel: revert "Remove confusion of stolen entries not stolen memory" Arnd Bergmann
2010-12-20 18:53 ` Chris Wilson
2010-12-20 19:47   ` Arnd Bergmann
2010-12-20 19:52     ` Chris Wilson
2010-12-20 20:52       ` Arnd Bergmann
2010-12-20 21:06         ` Chris Wilson
2010-12-20 21:54           ` Arnd Bergmann
2010-12-20 22:08             ` Dave Airlie
2011-01-20 23:24           ` Frederic Weisbecker
2011-01-21 10:58             ` [PATCH] drm/i915,agp/intel: Do not clear stolen entries Chris Wilson
2011-01-21 16:26               ` Jiri Olsa
2011-01-23  1:12               ` Frederic Weisbecker
2011-01-23 11:01                 ` Chris Wilson
2011-01-23 17:59                   ` Frederic Weisbecker
2011-01-24  7:40                     ` Hugh Dickins
2011-01-24 10:10                       ` Chris Wilson [this message]
2011-01-26 21:39                         ` Arnd Bergmann
2011-01-28 22:00                         ` Hugh Dickins
2011-01-29  2:59                           ` Mario Kleiner
2011-01-30  0:28                             ` Hugh Dickins
2011-01-30  4:13                               ` Mario Kleiner
2011-01-30  9:55                                 ` Chris Wilson
2011-01-31 10:57                                   ` [PATCH] drm/i915: Suppress spurious vblank interrupts Chris Wilson
2011-02-01 17:34                                     ` Hugh Dickins
2011-02-01 17:46                                       ` Chris Wilson
2011-02-01 17:46                                       ` Jesse Barnes
2011-02-01 18:08                                         ` Jesse Barnes
2011-02-01 18:46                                           ` Hugh Dickins
2011-02-01 19:32                                             ` Jesse Barnes
2011-02-02  3:37                                               ` Hugh Dickins
2011-02-02 17:18                                                 ` Jesse Barnes
2011-02-08 19:52                                                   ` Hugh Dickins
2011-02-10 10:16                                                     ` [PATCH] drm/i915/tv: Use polling rather than interrupt-based hotplug Chris Wilson
2011-02-11  6:34                                                       ` Hugh Dickins
2011-02-11 18:21                                                     ` [PATCH] drm/i915: Suppress spurious vblank interrupts Mario Kleiner
2011-02-14 17:41                                                       ` Hugh Dickins
2011-06-18  4:40                                                         ` Hugh Dickins
2011-01-30  8:52                               ` [PATCH] drm/i915,agp/intel: Do not clear stolen entries Chris Clayton
2011-01-21 16:05             ` [BISECTED] agp/intel: revert "Remove confusion of stolen entries not stolen memory" Jiri Olsa

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='849307$b9dvii@azsmga001.ch.intel.com' \
    --to=chris@chris-wilson.co.uk \
    --cc=arnd@arndb.de \
    --cc=chris2553@googlemail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=fweisbec@gmail.com \
    --cc=hughd@google.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.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