The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] [AGPGART] intel_agp: fix GTT map size on G33
@ 2007-09-05  7:13 Zhenyu Wang
  2007-09-11  5:15 ` Andrew Morton
  0 siblings, 1 reply; 3+ messages in thread
From: Zhenyu Wang @ 2007-09-05  7:13 UTC (permalink / raw)
  To: Dave Airlie; +Cc: LKML


Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33

G33 has 1MB GTT table range. Fix GTT mapping
in case like 512MB aperture size.

Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
---
 drivers/char/agp/intel-agp.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
index 20d50d0..6a5c555 100644
--- a/drivers/char/agp/intel-agp.c
+++ b/drivers/char/agp/intel-agp.c
@@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	struct aper_size_info_fixed *size;
 	int num_entries;
 	u32 temp, temp2;
+	int gtt_map_size = 256 * 1024;
 
 	size = agp_bridge->current_size;
 	page_order = size->page_order;
@@ -928,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
 	pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
 	pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
 
-	intel_private.gtt = ioremap(temp2, 256 * 1024);
+	if (IS_G33)
+	    gtt_map_size = 1024 * 1024; /* 1M on G33 */
+	intel_private.gtt = ioremap(temp2, gtt_map_size);
 	if (!intel_private.gtt)
 		return -ENOMEM;
 
-- 
1.5.2.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33
  2007-09-05  7:13 [PATCH] [AGPGART] intel_agp: fix GTT map size on G33 Zhenyu Wang
@ 2007-09-11  5:15 ` Andrew Morton
  2007-09-11  8:09   ` Dave Airlie
  0 siblings, 1 reply; 3+ messages in thread
From: Andrew Morton @ 2007-09-11  5:15 UTC (permalink / raw)
  To: Zhenyu Wang; +Cc: Dave Airlie, LKML

On Wed, 5 Sep 2007 15:13:07 +0800 Zhenyu Wang <zhenyu.z.wang@intel.com> wrote:

> 
> Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33
> 
> G33 has 1MB GTT table range. Fix GTT mapping
> in case like 512MB aperture size.
> 
> Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>
> ---
>  drivers/char/agp/intel-agp.c |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/char/agp/intel-agp.c b/drivers/char/agp/intel-agp.c
> index 20d50d0..6a5c555 100644
> --- a/drivers/char/agp/intel-agp.c
> +++ b/drivers/char/agp/intel-agp.c
> @@ -919,6 +919,7 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
>  	struct aper_size_info_fixed *size;
>  	int num_entries;
>  	u32 temp, temp2;
> +	int gtt_map_size = 256 * 1024;
>  
>  	size = agp_bridge->current_size;
>  	page_order = size->page_order;
> @@ -928,7 +929,9 @@ static int intel_i915_create_gatt_table(struct agp_bridge_data *bridge)
>  	pci_read_config_dword(intel_private.pcidev, I915_MMADDR, &temp);
>  	pci_read_config_dword(intel_private.pcidev, I915_PTEADDR,&temp2);
>  
> -	intel_private.gtt = ioremap(temp2, 256 * 1024);
> +	if (IS_G33)
> +	    gtt_map_size = 1024 * 1024; /* 1M on G33 */
> +	intel_private.gtt = ioremap(temp2, gtt_map_size);
>  	if (!intel_private.gtt)
>  		return -ENOMEM;
>  

Ditto.  What happens if this patch isn't in 2.6.23?  And is it applicable to
and needed in 2.6.22?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33
  2007-09-11  5:15 ` Andrew Morton
@ 2007-09-11  8:09   ` Dave Airlie
  0 siblings, 0 replies; 3+ messages in thread
From: Dave Airlie @ 2007-09-11  8:09 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Zhenyu Wang, LKML

>> Subject: [PATCH] [AGPGART] intel_agp: fix GTT map size on G33
>>
>> G33 has 1MB GTT table range. Fix GTT mapping
>> in case like 512MB aperture size.
>>
>> Signed-off-by: Zhenyu Wang <zhenyu.z.wang@intel.com>

Acked-by: Dave Airlie <airlied@linux.ie>

> Ditto.  What happens if this patch isn't in 2.6.23?  And is it applicable to
> and needed in 2.6.22?

It's support for new hardware enablement, so maybe stable requires it, but 
I'm not sure how widespread this hw is yet..

Dave.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2007-09-11  8:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-09-05  7:13 [PATCH] [AGPGART] intel_agp: fix GTT map size on G33 Zhenyu Wang
2007-09-11  5:15 ` Andrew Morton
2007-09-11  8:09   ` Dave Airlie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox