mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: Daniel Haid <d.haid@gogi.tv>,
	linux-kernel@vger.kernel.org, Andi Kleen <andi@firstfloor.org>,
	airlied@linux.ie
Subject: Re: [PATCH] tentative fix for radeon on systems >4GB without hardware iommu
Date: Fri, 3 Jun 2011 19:13:50 -0400	[thread overview]
Message-ID: <20110603231350.GA20316@dumpdata.com> (raw)
In-Reply-To: <BANLkTik+p65G5f08RfxiYojvAax_nrDiqg@mail.gmail.com>

On Fri, Jun 03, 2011 at 04:44:59PM -0400, Alex Deucher wrote:
> On Fri, Jun 3, 2011 at 1:31 PM, Daniel Haid <d.haid@gogi.tv> wrote:
> > On my x86_64 system with >4GB of ram and swiotlb instead of
> > a hardware iommu (because I have a VIA chipset), the call
> > to pci_set_dma_mask (see below) with 40bits returns an error.
> >
> > But it seems that the radeon driver is designed to have
> > need_dma32 = true exactly if pci_set_dma_mask is called
> > with 32 bits and false if it is called with 40 bits.
> >
> > I have read somewhere that the default are 32 bits. So if the
> > call fails I suppose that need_dma32 should be set to true.
> >
> > And indeed the patch fixes the problem I have had before
> > and which I had described here:
> > http://choon.net/forum/read.php?21,106131,115940
> 
> This looks like the correct fix. rdev->need_dma32 is used when we init
> ttm for memory management later.
> 
> Alex

<nods>

Daniel, did you find other graphic drivers that forget to set need_dma32
after failing to set the dma_mask ?

> 
> Acked-by: Alex Deucher <alexdeucher@gmail.com>
> 
> >
> > --- linux-2.6.39-gentoo/drivers/gpu/drm/radeon/radeon_device.c.old
> >  2011-06-03 19:11:33.208891994 +0200
> > +++ linux-2.6.39-gentoo/drivers/gpu/drm/radeon/radeon_device.c  2011-06-03
> > 19:21:10.240337986 +0200
> > @@ -752,6 +752,7 @@ int radeon_device_init(struct radeon_dev
> >        dma_bits = rdev->need_dma32 ? 32 : 40;
> >        r = pci_set_dma_mask(rdev->pdev, DMA_BIT_MASK(dma_bits));
> >        if (r) {
> > +               rdev->need_dma32 = true;
> >                printk(KERN_WARNING "radeon: No suitable DMA available.\n");
> >        }
> >
> >

  reply	other threads:[~2011-06-03 23:14 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-05-22 21:56 Question about iommu on x86_64 and radeon driver Daniel Haid
2011-05-23 22:05 ` Konrad Rzeszutek Wilk
2011-05-23 23:45   ` Daniel Haid
2011-05-24 15:50     ` Konrad Rzeszutek Wilk
2011-05-24 21:33       ` Daniel Haid
2011-05-25 12:58         ` Konrad Rzeszutek Wilk
2011-05-25 14:28           ` Daniel Haid
2011-05-24 22:48     ` Andi Kleen
2011-05-25 10:00       ` Daniel Haid
2011-05-25 12:57         ` Konrad Rzeszutek Wilk
2011-05-25 14:51           ` Daniel Haid
2011-05-25 20:21           ` Daniel Haid
2011-05-25 23:05             ` Andi Kleen
2011-05-27 15:48           ` Daniel Haid
2011-05-27 15:55             ` Konrad Rzeszutek Wilk
2011-05-27 22:20               ` Daniel Haid
2011-05-31 13:45                 ` Konrad Rzeszutek Wilk
2011-05-31 15:34                   ` Daniel Haid
2011-05-31 16:02                     ` Konrad Rzeszutek Wilk
     [not found]                       ` <0a8cb4bcad7fcf091a6bbe158323bba0@admin.gogi.tv>
2011-05-31 16:20                         ` Daniel Haid
     [not found]                         ` <20110531190412.GA21245@dumpdata.com>
2011-05-31 19:57                           ` Daniel Haid
2011-06-01 13:24                             ` Konrad Rzeszutek Wilk
2011-06-01 16:10                               ` Daniel Haid
2011-06-01 21:51                                 ` Andi Kleen
2011-06-01 21:58                                 ` Daniel Haid
2011-06-01 22:22                                   ` Andi Kleen
2011-06-03 17:31                                     ` [PATCH] tentative fix for radeon on systems >4GB without hardware iommu Daniel Haid
2011-06-03 20:44                                       ` Alex Deucher
2011-06-03 23:13                                         ` Konrad Rzeszutek Wilk [this message]
2011-06-06 17:45                                           ` Daniel Haid
2011-06-06 17:41                                         ` Daniel Haid
2011-06-06 19:08                                           ` Alex Deucher

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=20110603231350.GA20316@dumpdata.com \
    --to=konrad.wilk@oracle.com \
    --cc=airlied@linux.ie \
    --cc=alexdeucher@gmail.com \
    --cc=andi@firstfloor.org \
    --cc=d.haid@gogi.tv \
    --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

Powered by JetHome