* [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error()
@ 2011-04-27 5:34 Aurelien Jarno
2011-04-27 5:34 ` [PATCH 2/2] drm/nouveau: " Aurelien Jarno
2011-04-27 7:49 ` [PATCH 1/2] drm/radeon: " Dave Airlie
0 siblings, 2 replies; 4+ messages in thread
From: Aurelien Jarno @ 2011-04-27 5:34 UTC (permalink / raw)
To: David Airlie, dri-devel; +Cc: linux-kernel, Aurelien Jarno
... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
drivers/gpu/drm/radeon/radeon_gart.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/radeon/radeon_gart.c b/drivers/gpu/drm/radeon/radeon_gart.c
index 8a955bb..d96f5ea 100644
--- a/drivers/gpu/drm/radeon/radeon_gart.c
+++ b/drivers/gpu/drm/radeon/radeon_gart.c
@@ -183,7 +183,7 @@ int radeon_gart_bind(struct radeon_device *rdev, unsigned offset,
for (i = 0; i < pages; i++, p++) {
/* On TTM path, we only use the DMA API if TTM_PAGE_FLAG_DMA32
* is requested. */
- if (dma_addr[i] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(rdev->pdev, dma_addr[i])) {
rdev->gart.ttm_alloced[p] = true;
rdev->gart.pages_addr[p] = dma_addr[i];
} else {
--
1.7.2.3
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH 2/2] drm/nouveau: Use pci_dma_mapping_error()
2011-04-27 5:34 [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error() Aurelien Jarno
@ 2011-04-27 5:34 ` Aurelien Jarno
2011-04-27 7:49 ` [PATCH 1/2] drm/radeon: " Dave Airlie
1 sibling, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2011-04-27 5:34 UTC (permalink / raw)
To: David Airlie, dri-devel; +Cc: linux-kernel, Aurelien Jarno
... instead of comparing with DMA_ERROR_CODE, which will only work on
powerpc/sparc/x86.
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
---
drivers/gpu/drm/nouveau/nouveau_sgdma.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/nouveau_sgdma.c b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
index 4bce801..b038de9 100644
--- a/drivers/gpu/drm/nouveau/nouveau_sgdma.c
+++ b/drivers/gpu/drm/nouveau/nouveau_sgdma.c
@@ -42,7 +42,8 @@ nouveau_sgdma_populate(struct ttm_backend *be, unsigned long num_pages,
nvbe->nr_pages = 0;
while (num_pages--) {
- if (dma_addrs[nvbe->nr_pages] != DMA_ERROR_CODE) {
+ if (pci_dma_mapping_error(dev->pdev,
+ dma_addrs[nvbe->nr_pages])) {
nvbe->pages[nvbe->nr_pages] =
dma_addrs[nvbe->nr_pages];
nvbe->ttm_alloced[nvbe->nr_pages] = true;
--
1.7.2.3
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error()
2011-04-27 5:34 [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error() Aurelien Jarno
2011-04-27 5:34 ` [PATCH 2/2] drm/nouveau: " Aurelien Jarno
@ 2011-04-27 7:49 ` Dave Airlie
2011-04-27 10:08 ` Aurelien Jarno
1 sibling, 1 reply; 4+ messages in thread
From: Dave Airlie @ 2011-04-27 7:49 UTC (permalink / raw)
To: Aurelien Jarno; +Cc: David Airlie, dri-devel, linux-kernel
On Wed, Apr 27, 2011 at 3:34 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> ... instead of comparing with DMA_ERROR_CODE, which will only work on
> powerpc/sparc/x86.
>
So you wrote a patch that breaks it everwhere?
You might want to actually boot this sort of thing before I do, or
read the interface for pci_dma_mapping_error, it doesn't seem to
return what you seem to think it does.
Dave.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error()
2011-04-27 7:49 ` [PATCH 1/2] drm/radeon: " Dave Airlie
@ 2011-04-27 10:08 ` Aurelien Jarno
0 siblings, 0 replies; 4+ messages in thread
From: Aurelien Jarno @ 2011-04-27 10:08 UTC (permalink / raw)
To: Dave Airlie; +Cc: David Airlie, dri-devel, linux-kernel
On Wed, Apr 27, 2011 at 05:49:50PM +1000, Dave Airlie wrote:
> On Wed, Apr 27, 2011 at 3:34 PM, Aurelien Jarno <aurelien@aurel32.net> wrote:
> > ... instead of comparing with DMA_ERROR_CODE, which will only work on
> > powerpc/sparc/x86.
> >
>
> So you wrote a patch that breaks it everwhere?
It seems I inverted the condition yes.
> You might want to actually boot this sort of thing before I do, or
> read the interface for pci_dma_mapping_error, it doesn't seem to
> return what you seem to think it does.
I tried, but I don't have such a card, so it doesn't trigger the bug.
I'll send a v2 soon.
--
Aurelien Jarno GPG: 1024D/F1BCDB73
aurelien@aurel32.net http://www.aurel32.net
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-04-27 10:08 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-27 5:34 [PATCH 1/2] drm/radeon: Use pci_dma_mapping_error() Aurelien Jarno
2011-04-27 5:34 ` [PATCH 2/2] drm/nouveau: " Aurelien Jarno
2011-04-27 7:49 ` [PATCH 1/2] drm/radeon: " Dave Airlie
2011-04-27 10:08 ` Aurelien Jarno
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®