All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel.vetter@ffwll.ch>
To: intel-gfx@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 11/23] intel-gtt: s/i8[13]0/fake_agp for generic functions
Date: Wed,  1 Sep 2010 22:29:58 +0200	[thread overview]
Message-ID: <1283373010-1314-12-git-send-email-daniel.vetter@ffwll.ch> (raw)
In-Reply-To: <1283373010-1314-1-git-send-email-daniel.vetter@ffwll.ch>

Start to separate the fake agp driver from the rest of intel-gtt.c

Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/char/agp/intel-gtt.c |   57 +++++++++++++++++++++--------------------
 1 files changed, 29 insertions(+), 28 deletions(-)

diff --git a/drivers/char/agp/intel-gtt.c b/drivers/char/agp/intel-gtt.c
index 0ba7349..6dd6415 100644
--- a/drivers/char/agp/intel-gtt.c
+++ b/drivers/char/agp/intel-gtt.c
@@ -278,7 +278,7 @@ static void intel_i810_cleanup(void)
 	iounmap(intel_private.registers);
 }
 
-static void intel_i810_agp_enable(struct agp_bridge_data *bridge, u32 mode)
+static void intel_fake_agp_enable(struct agp_bridge_data *bridge, u32 mode)
 {
 	return;
 }
@@ -491,7 +491,7 @@ static unsigned long intel_i810_mask_memory(struct agp_bridge_data *bridge,
 	return addr | bridge->driver->masks[type].mask;
 }
 
-static struct aper_size_info_fixed intel_i830_sizes[] =
+static struct aper_size_info_fixed intel_fake_agp_sizes[] =
 {
 	{128, 32768, 5},
 	/* The 64M mode still requires a 128k gatt */
@@ -780,14 +780,14 @@ static int intel_fake_agp_fetch_size(void)
 {
 	unsigned int aper_size;
 	int i;
-	int num_sizes = ARRAY_SIZE(intel_i830_sizes);
+	int num_sizes = ARRAY_SIZE(intel_fake_agp_sizes);
 
 	aper_size = (intel_private.base.gtt_mappable_entries << PAGE_SHIFT)
 		    / MB(1);
 
 	for (i = 0; i < num_sizes; i++) {
-		if (aper_size == intel_i830_sizes[i].size) {
-			agp_bridge->current_size = intel_i830_sizes + i;
+		if (aper_size == intel_fake_agp_sizes[i].size) {
+			agp_bridge->current_size = intel_fake_agp_sizes + i;
 			return aper_size;
 		}
 	}
@@ -881,7 +881,7 @@ static int intel_i830_create_gatt_table(struct agp_bridge_data *bridge)
 /* Return the gatt table to a sane state. Use the top of stolen
  * memory for the GTT.
  */
-static int intel_i830_free_gatt_table(struct agp_bridge_data *bridge)
+static int intel_fake_agp_free_gatt_table(struct agp_bridge_data *bridge)
 {
 	return 0;
 }
@@ -1002,7 +1002,8 @@ static int intel_i830_remove_entries(struct agp_memory *mem, off_t pg_start,
 	return 0;
 }
 
-static struct agp_memory *intel_i830_alloc_by_type(size_t pg_count, int type)
+static struct agp_memory *intel_fake_agp_alloc_by_type(size_t pg_count,
+						       int type)
 {
 	if (type == AGP_PHYS_MEMORY)
 		return alloc_agpphysmem_i8xx(pg_count, type);
@@ -1451,7 +1452,7 @@ static const struct agp_bridge_driver intel_810_driver = {
 	.cleanup		= intel_i810_cleanup,
 	.mask_memory		= intel_i810_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= agp_generic_create_gatt_table,
 	.free_gatt_table	= agp_generic_free_gatt_table,
@@ -1468,7 +1469,7 @@ static const struct agp_bridge_driver intel_810_driver = {
 
 static const struct agp_bridge_driver intel_830_driver = {
 	.owner			= THIS_MODULE,
-	.aperture_sizes		= intel_i830_sizes,
+	.aperture_sizes		= intel_fake_agp_sizes,
 	.size_type		= FIXED_APER_SIZE,
 	.num_aperture_sizes	= 4,
 	.needs_scratch_page	= true,
@@ -1477,13 +1478,13 @@ static const struct agp_bridge_driver intel_830_driver = {
 	.cleanup		= intel_i830_cleanup,
 	.mask_memory		= intel_i810_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= intel_i830_create_gatt_table,
-	.free_gatt_table	= intel_i830_free_gatt_table,
+	.free_gatt_table	= intel_fake_agp_free_gatt_table,
 	.insert_memory		= intel_i830_insert_entries,
 	.remove_memory		= intel_i830_remove_entries,
-	.alloc_by_type		= intel_i830_alloc_by_type,
+	.alloc_by_type		= intel_fake_agp_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
 	.agp_alloc_pages        = agp_generic_alloc_pages,
@@ -1495,7 +1496,7 @@ static const struct agp_bridge_driver intel_830_driver = {
 
 static const struct agp_bridge_driver intel_915_driver = {
 	.owner			= THIS_MODULE,
-	.aperture_sizes		= intel_i830_sizes,
+	.aperture_sizes		= intel_fake_agp_sizes,
 	.size_type		= FIXED_APER_SIZE,
 	.num_aperture_sizes	= 4,
 	.needs_scratch_page	= true,
@@ -1504,13 +1505,13 @@ static const struct agp_bridge_driver intel_915_driver = {
 	.cleanup		= intel_i915_cleanup,
 	.mask_memory		= intel_i810_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= intel_i915_create_gatt_table,
-	.free_gatt_table	= intel_i830_free_gatt_table,
+	.free_gatt_table	= intel_fake_agp_free_gatt_table,
 	.insert_memory		= intel_i915_insert_entries,
 	.remove_memory		= intel_i915_remove_entries,
-	.alloc_by_type		= intel_i830_alloc_by_type,
+	.alloc_by_type		= intel_fake_agp_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
 	.agp_alloc_pages        = agp_generic_alloc_pages,
@@ -1528,7 +1529,7 @@ static const struct agp_bridge_driver intel_915_driver = {
 
 static const struct agp_bridge_driver intel_i965_driver = {
 	.owner			= THIS_MODULE,
-	.aperture_sizes		= intel_i830_sizes,
+	.aperture_sizes		= intel_fake_agp_sizes,
 	.size_type		= FIXED_APER_SIZE,
 	.num_aperture_sizes	= 4,
 	.needs_scratch_page	= true,
@@ -1537,13 +1538,13 @@ static const struct agp_bridge_driver intel_i965_driver = {
 	.cleanup		= intel_i915_cleanup,
 	.mask_memory		= intel_i965_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= intel_i965_create_gatt_table,
-	.free_gatt_table	= intel_i830_free_gatt_table,
+	.free_gatt_table	= intel_fake_agp_free_gatt_table,
 	.insert_memory		= intel_i915_insert_entries,
 	.remove_memory		= intel_i915_remove_entries,
-	.alloc_by_type		= intel_i830_alloc_by_type,
+	.alloc_by_type		= intel_fake_agp_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
 	.agp_alloc_pages        = agp_generic_alloc_pages,
@@ -1561,7 +1562,7 @@ static const struct agp_bridge_driver intel_i965_driver = {
 
 static const struct agp_bridge_driver intel_gen6_driver = {
 	.owner			= THIS_MODULE,
-	.aperture_sizes		= intel_i830_sizes,
+	.aperture_sizes		= intel_fake_agp_sizes,
 	.size_type		= FIXED_APER_SIZE,
 	.num_aperture_sizes	= 4,
 	.needs_scratch_page	= true,
@@ -1570,13 +1571,13 @@ static const struct agp_bridge_driver intel_gen6_driver = {
 	.cleanup		= intel_i915_cleanup,
 	.mask_memory		= intel_gen6_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= intel_i965_create_gatt_table,
-	.free_gatt_table	= intel_i830_free_gatt_table,
+	.free_gatt_table	= intel_fake_agp_free_gatt_table,
 	.insert_memory		= intel_i915_insert_entries,
 	.remove_memory		= intel_i915_remove_entries,
-	.alloc_by_type		= intel_i830_alloc_by_type,
+	.alloc_by_type		= intel_fake_agp_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
 	.agp_alloc_pages        = agp_generic_alloc_pages,
@@ -1594,7 +1595,7 @@ static const struct agp_bridge_driver intel_gen6_driver = {
 
 static const struct agp_bridge_driver intel_g33_driver = {
 	.owner			= THIS_MODULE,
-	.aperture_sizes		= intel_i830_sizes,
+	.aperture_sizes		= intel_fake_agp_sizes,
 	.size_type		= FIXED_APER_SIZE,
 	.num_aperture_sizes	= 4,
 	.needs_scratch_page	= true,
@@ -1603,13 +1604,13 @@ static const struct agp_bridge_driver intel_g33_driver = {
 	.cleanup		= intel_i915_cleanup,
 	.mask_memory		= intel_i965_mask_memory,
 	.masks			= intel_i810_masks,
-	.agp_enable		= intel_i810_agp_enable,
+	.agp_enable		= intel_fake_agp_enable,
 	.cache_flush		= global_cache_flush,
 	.create_gatt_table	= intel_i915_create_gatt_table,
-	.free_gatt_table	= intel_i830_free_gatt_table,
+	.free_gatt_table	= intel_fake_agp_free_gatt_table,
 	.insert_memory		= intel_i915_insert_entries,
 	.remove_memory		= intel_i915_remove_entries,
-	.alloc_by_type		= intel_i830_alloc_by_type,
+	.alloc_by_type		= intel_fake_agp_alloc_by_type,
 	.free_by_type		= intel_i810_free_by_type,
 	.agp_alloc_page		= agp_generic_alloc_page,
 	.agp_alloc_pages        = agp_generic_alloc_pages,
-- 
1.7.2.2

  parent reply	other threads:[~2010-09-01 20:28 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-01 20:29 [PATCH 00/23] intel gtt rework, part 1: initialization Daniel Vetter
2010-09-01 20:29 ` [PATCH 01/23] agp/intel: split out gmch/gtt probe, part 2 Daniel Vetter
2010-09-01 20:29 ` [PATCH 02/23] agp/intel: make intel-gtt.c into a real source file Daniel Vetter
2010-09-01 20:29 ` [PATCH 03/23] intel-gtt: introduce drm/intel-gtt.h Daniel Vetter
2010-09-01 20:29 ` [PATCH 04/23] intel-gtt: store a local pointer to the bridge pci dev Daniel Vetter
2010-09-01 20:29 ` [PATCH 05/23] intel-gtt: s/intel_i830_init_gtt_entries/intel_gtt_stolen_entries Daniel Vetter
2010-09-01 20:29 ` [PATCH 06/23] intel-gtt: new function intel_gtt_mappable_entries Daniel Vetter
2010-09-01 20:29 ` [PATCH 07/23] intel-gtt: generic intel_fake_agp_fetch_size Daniel Vetter
2010-09-01 20:29 ` [PATCH 08/23] intel-gtt: sane variable names for intel_gtt_stolen_entries Daniel Vetter
2010-09-01 20:29 ` [PATCH 09/23] intel-gtt: drop unnecessary conditions in intel_gtt_stolen_entries Daniel Vetter
2010-09-01 20:29 ` [PATCH 10/23] intel-gtt: adjust overhead entries " Daniel Vetter
2010-09-01 20:29 ` Daniel Vetter [this message]
2010-09-01 20:29 ` [PATCH 12/23] intel-gtt: fix gtt_total_entries detection Daniel Vetter
2010-09-01 20:30 ` [PATCH 13/23] intel-gtt: introduce intel_gtt_driver Daniel Vetter
2010-09-01 20:30 ` [PATCH 14/23] intel-gtt: i915: use detected gtt size for mapping Daniel Vetter
2010-09-01 20:30 ` [PATCH 15/23] intel-gtt: i965: " Daniel Vetter
2010-09-01 20:30 ` [PATCH 16/23] intel-gtt: i830: adjust ioremap of regs and gtt to i9xx Daniel Vetter
2010-09-01 20:30 ` [PATCH 17/23] intel-gtt: consolidate the gtt ioremap calls Daniel Vetter
2010-09-01 20:30 ` [PATCH 18/23] intel-gtt: consolidate i830 setup Daniel Vetter
2010-09-01 20:30 ` [PATCH 19/23] intel-gtt: consolidate i9xx setup Daniel Vetter
2010-09-01 20:30 ` [PATCH 20/23] intel-gtt: call init_gtt_init in probe function Daniel Vetter
2010-09-01 20:30 ` [PATCH 21/23] intel-gtt: use chipset generation number some more Daniel Vetter
2010-09-01 20:30 ` [PATCH 22/23] drm/i915: drop prealloc_start from i915_dma.c gtt init Daniel Vetter
2010-09-01 20:30 ` [PATCH 23/23] drm/i915: die, i915_probe_agp, die Daniel Vetter
2010-09-05 16:10   ` Chris Wilson
2010-09-02  1:19 ` [PATCH 00/23] intel gtt rework, part 1: initialization Dave Airlie
2010-09-02 11:20 ` Chris Wilson

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=1283373010-1314-12-git-send-email-daniel.vetter@ffwll.ch \
    --to=daniel.vetter@ffwll.ch \
    --cc=intel-gfx@lists.freedesktop.org \
    --subject='Re: [PATCH 11/23] intel-gtt: s/i8[13]0/fake_agp for generic functions' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.