Skip to contentSkip to conversation

some clean up to intel-gtt.c

PATCH In review Jan Beulich 2 participants 2 messages Sep 24, 2010 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 some clean up to intel-gtt.c

In commit e517a5e97080bbe52857bd0d7df9b66602d53c4d the call to map_page_into_agp() got removed from intel_i830_setup_flush(), but the counterpart call from intel_i830_fini_flush() to unmap_page_from_agp() was left in place.

Additionally, the page allocated here never gets its physical address used for sending to hardware, so there's no need to allocate it with GFP_DMA32. Nor is __GFP_ZERO really necessary, as the page is used only to store data to force flushing of some internal processor state.

---
 drivers/char/agp/intel-gtt.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/char/agp/intel-gtt.c +1 -2
@@ -768,7 +768,6 @@ static void intel_i830_fini_flush(void)
 {
 	kunmap(intel_private.i8xx_page);
 	intel_private.i8xx_flush_page = NULL;
-	unmap_page_from_agp(intel_private.i8xx_page);
 
 	__free_page(intel_private.i8xx_page);
 	intel_private.i8xx_page = NULL;
@@ -780,7 +779,7 @@ static void intel_i830_setup_flush(void)
 	if (intel_private.i8xx_page)
 		return;
 
-	intel_private.i8xx_page = alloc_page(GFP_KERNEL | __GFP_ZERO | GFP_DMA32);
+	intel_private.i8xx_page = alloc_page(GFP_KERNEL);
 	if (!intel_private.i8xx_page)
 		return;
 
#1 lore raw
Quoted 4 lines · Jan Beulich

In commit e517a5e97080bbe52857bd0d7df9b66602d53c4d the call to map_page_into_agp() got removed from intel_i830_setup_flush(), but the counterpart call from intel_i830_fini_flush() to unmap_page_from_agp() was left in place.

Thanks, those flags do look redundant. Applied to -next. -Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre