linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Schwinge <thomas@codesourcery.com>
To: Jerome Glisse <j.glisse@gmail.com>
Cc: "Mel Gorman" <mgorman@suse.de>, "Rik van Riel" <riel@surriel.com>,
	"Andrea Arcangeli" <aarcange@redhat.com>,
	"Zlatko Calusic" <zcalusic@bitsync.net>,
	"Minchan Kim" <minchan@kernel.org>,
	linux-mm@kvack.org, linux-kernel@vger.kernel.org,
	"Andrew Morton" <akpm@linux-foundation.org>,
	"Alex Deucher" <alexander.deucher@amd.com>,
	"Christian König" <christian.koenig@amd.com>,
	dri-devel@lists.freedesktop.org,
	"Johannes Weiner" <hannes@cmpxchg.org>
Subject: Re: radeon: screen garbled after page allocator change, was: Re: [patch v2 3/3] mm: page_alloc: fair zone allocator policy
Date: Mon, 28 Apr 2014 11:09:00 +0200	[thread overview]
Message-ID: <87k3a9q0r7.fsf@schwinge.name> (raw)
In-Reply-To: <87sioxq3rx.fsf@schwinge.name>

[-- Attachment #1: Type: text/plain, Size: 3560 bytes --]

Hi!

On Mon, 28 Apr 2014 10:03:46 +0200, I wrote:
> On Fri, 25 Apr 2014 19:03:22 -0400, Jerome Glisse <j.glisse@gmail.com> wrote:
> > On Fri, Apr 25, 2014 at 05:50:57PM -0400, Jerome Glisse wrote:
> > > On Fri, Apr 25, 2014 at 05:47:48PM -0400, Jerome Glisse wrote:
> > > > On Thu, Apr 24, 2014 at 09:37:22AM -0400, Johannes Weiner wrote:
> > > > > On Wed, Apr 02, 2014 at 04:26:08PM +0200, Thomas Schwinge wrote:
> > > > > > On Fri,  2 Aug 2013 11:37:26 -0400, Johannes Weiner <hannes@cmpxchg.org> wrote:
> > > > > > > Each zone that holds userspace pages of one workload must be aged at a
> > > > > > > speed proportional to the zone size.  [...]
> > > > > > 
> > > > > > > Fix this with a very simple round robin allocator.  [...]
> > > > > > 
> > > > > > This patch, adding NR_ALLOC_BATCH, eventually landed in mainline as
> > > > > > commit 81c0a2bb515fd4daae8cab64352877480792b515 (2013-09-11).
> > > > > > 
> > > > > > I recently upgraded a Debian testing system from a 3.11 kernel to 3.12,
> > > > > > and it started to exhibit "strange" issues, which I then bisected to this
> > > > > > patch.  I'm not saying that the patch is faulty, as it seems to be
> > > > > > working fine for everyone else, so I rather assume that something in a
> > > > > > (vastly?) different corner of the kernel (or my hardware?) is broken.
> > > > > > ;-)
> > > > > > 
> > > > > > The issue is that when X.org/lightdm starts up, there are "garbled"
> > > > > > section on the screen, for example, rectangular boxes that are just black
> > > > > > or otherwise "distorted", and/or sets of glyphs (corresponding to a set
> > > > > > of characters; but not all characters) are displayed as rectangular gray
> > > > > > or black boxes, and/or icons in a GNOME session are not displayed
> > > > > > properly, and so on.  (Can take a snapshot if that helps?)  Switching to
> > > > > > a Linux console, I can use that one fine.  Switching back to X, in the
> > > > > > majority of all cases, the screen will be completely black, but with the
> > > > > > mouse cursor still rendered properly (done in hardware, I assume).
> > > > > > 
> > > > > > Reverting commit 81c0a2bb515fd4daae8cab64352877480792b515, for example on
> > > > > > top of v3.12, and everything is back to normal.  The problem also
> > > > > > persists with a v3.14 kernel that I just built.

> > > > My guess is that the pcie bridge can only remap dma page with 32bit dma
> > > > mask while the gpu is fine with 40bit dma mask. I always thought that the
> > > > pcie/pci code did take care of such thing for us.
> > > 
> > > Forgot to attach patch to test my theory. Does the attached patch fix
> > > the issue ?
> 
> Unfortunately it does not.  :-/

Ha, the following seems to do it: additionally to dma_bits (your patch),
I'm also overriding need_dma32 for later use in
drivers/gpu/drm/ttm/ttm_bo.c:ttm_bo_add_ttm, I assume.  With that hack
applied, I have now rebooted a v3.14 build a few times, and so far things
"look" fine.

diff --git drivers/gpu/drm/radeon/radeon_device.c drivers/gpu/drm/radeon/radeon_device.c
index 044bc98..90baf2f 100644
--- drivers/gpu/drm/radeon/radeon_device.c
+++ drivers/gpu/drm/radeon/radeon_device.c
@@ -1243,6 +1243,8 @@ int radeon_device_init(struct radeon_device *rdev,
 		rdev->need_dma32 = true;
 
 	dma_bits = rdev->need_dma32 ? 32 : 40;
+	dma_bits = 32;
+	rdev->need_dma32 = true;
 	r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
 	if (r) {
 		rdev->need_dma32 = true;


Grüße,
 Thomas

[-- Attachment #2: Type: application/pgp-signature, Size: 489 bytes --]

  reply	other threads:[~2014-04-28  9:16 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-02 15:37 [patch v2 0/3] mm: improve page aging fairness between zones/nodes Johannes Weiner
2013-08-02 15:37 ` [patch v2 1/3] mm: vmscan: fix numa reclaim balance problem in kswapd Johannes Weiner
2013-08-07 14:15   ` Mel Gorman
2013-08-02 15:37 ` [patch v2 2/3] mm: page_alloc: rearrange watermark checking in get_page_from_freelist Johannes Weiner
2013-08-07 14:20   ` Mel Gorman
2013-08-02 15:37 ` [patch v2 3/3] mm: page_alloc: fair zone allocator policy Johannes Weiner
2013-08-02 17:51   ` Rik van Riel
2013-08-05  1:15   ` Minchan Kim
2013-08-05  3:43     ` Johannes Weiner
2013-08-05  4:48       ` Minchan Kim
2013-08-05  5:01         ` Johannes Weiner
2013-08-05 10:34   ` Wanpeng Li
2013-08-05 10:34   ` Wanpeng Li
2013-08-05 11:34     ` Andrea Arcangeli
2013-08-05 13:11       ` Wanpeng Li
2013-08-05 13:11       ` Wanpeng Li
2013-08-07 14:58   ` Mel Gorman
2013-08-07 15:37     ` Johannes Weiner
2013-08-08  4:16       ` Johannes Weiner
2013-08-08  9:21         ` Mel Gorman
2013-08-09 18:45         ` Rik van Riel
2013-08-16 17:07         ` Kevin Hilman
2013-08-16 17:17         ` Kevin Hilman
2013-08-16 20:18           ` Johannes Weiner
2013-08-16 21:24             ` Stephen Warren
2013-08-16 21:52             ` Kevin Hilman
2013-08-19  0:48               ` Stephen Rothwell
2014-04-02 14:26   ` Thomas Schwinge
2014-04-24 13:37     ` radeon: screen garbled after page allocator change, was: " Johannes Weiner
2014-04-25 21:47       ` Jerome Glisse
2014-04-25 21:50         ` Jerome Glisse
2014-04-25 23:03           ` Jerome Glisse
2014-04-28  8:03             ` Thomas Schwinge
2014-04-28  9:09               ` Thomas Schwinge [this message]
2014-04-27  3:31       ` Jerome Glisse
2014-04-27 19:55         ` Jerome Glisse
2014-04-28  7:30           ` Christian König
2014-04-28 12:51             ` Deucher, Alexander
2014-04-28 12:52             ` Deucher, Alexander
2014-04-28  8:09           ` Thomas Schwinge
2014-06-16  7:11             ` Thomas Schwinge
2013-08-02 19:59 ` [patch v2 0/3] mm: improve page aging fairness between zones/nodes Andrea Arcangeli

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=87k3a9q0r7.fsf@schwinge.name \
    --to=thomas@codesourcery.com \
    --cc=aarcange@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexander.deucher@amd.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hannes@cmpxchg.org \
    --cc=j.glisse@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=mgorman@suse.de \
    --cc=minchan@kernel.org \
    --cc=riel@surriel.com \
    --cc=zcalusic@bitsync.net \
    /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;
as well as URLs for NNTP newsgroup(s).