lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon,  6 Dec 2010 21:07:25 -0500
From:	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
To:	airlied@...ux.ie, tglx@...utronix.de, hpa@...or.com,
	airlied@...hat.com, linux-kernel@...r.kernel.org, konrad@...nel.org
Cc:	Jeremy Fitzhardinge <jeremy@...p.org>,
	Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
Subject: [PATCH 6/7] radeon/nouveau/ttm/AGP: Use dma_addr if TTM has set it.

For the AGP case we are heavily relaying on the AGP API to
setup the GART, and insert the bus addresses of the pages in the
GART. Both radeon and nouveau use this for their AGP cards.

TTM, with the patch titled "ttm: Utilize the dma_addr_t array for
pages that are to in DMA32 pool", can create pages that have
already passed through the DMA API, and the DMA (bus) address
is saved. For this to work properly with the GART we need to
pass in the bus addresses to the AGP API, which we do
by setting the dma_addr field of 'struct agp_memory' with the
dma_address obtained from the TTM.

Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@...cle.com>
---
 drivers/gpu/drm/ttm/ttm_agp_backend.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_agp_backend.c b/drivers/gpu/drm/ttm/ttm_agp_backend.c
index 1c4a72f..df4e1a9 100644
--- a/drivers/gpu/drm/ttm/ttm_agp_backend.c
+++ b/drivers/gpu/drm/ttm/ttm_agp_backend.c
@@ -64,7 +64,7 @@ static int ttm_agp_populate(struct ttm_backend *backend,
 		struct page *page = *cur_page;
 		if (!page)
 			page = dummy_read_page;
-
+		mem->dma_addr[mem->page_count] = dma_addrs[mem->page_count];
 		mem->pages[mem->page_count++] = page;
 	}
 	agp_be->mem = mem;
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ