Skip to contentSkip to conversation

intel_agp: fix stolen mem range on G33

PATCH In review Zhenyu Wang 4 participants 6 messages Sep 5, 2007 – Sep 11, 2007 Agpgart driver

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 intel_agp: fix stolen mem range on G33

Subject: [PATCH] [AGPGART] intel_agp: fix stolen mem range on G33

G33 GTT stolen memory is below graphics data
stolen memory and be seperate, so don't subtract
it in stolen mem counting.

---
 drivers/char/agp/intel-agp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +5 -0
index 2c9ca2c..20d50d0 100644
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
 			break;
 		}
 	} else {
+		/* G33's GTT stolen memory is seperate from gfx data
+		 * stolen memory.
+		 */
+	        if (IS_G33)
+		    size = 0;
 		switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
 		case I855_GMCH_GMS_STOLEN_1M:
 			gtt_entries = MB(1) - KB(size);
Signature · 1 line
1.5.2.3
#1 lore raw

drivers/char/agp/intel-agp.c static void intel_i830_init_gtt_entries(void) · line 509

Quoted 12 lines · On Wed, 5 Sep 2007 15:11:52 +0800 Zhenyu Wang wrote:
 drivers/char/agp/intel-agp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +1 -0
index 2c9ca2c..20d50d0 100644
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
 			break;
 		}
 	} else {
+		/* G33's GTT stolen memory is seperate from gfx data

separate

drivers/char/agp/intel-agp.c static void intel_i830_init_gtt_entries(void) · line 516

Quoted 7 lines
drivers/char/agp/intel-agp.c +4 -0
+		 * stolen memory.
+		 */
+	        if (IS_G33)
+		    size = 0;
 		switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
 		case I855_GMCH_GMS_STOLEN_1M:
 			gtt_entries = MB(1) - KB(size);

---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***

#2 lore raw
Quoted 1 line · Randy Dunlap

*** Remember to use Documentation/SubmitChecklist when testing your code ***

Thanks Randy. Here's updated patch with typo and tab style fixed. I misused x style.

Subject: [PATCH] [AGPGART] intel_agp: fix stolen mem range on G33

G33 GTT stolen memory is below graphics data stolen memory and be seperate, so don't subtract it in stolen mem counting.

---
 drivers/char/agp/intel-agp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +5 -0
index 2c9ca2c..581f922 100644
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
 			break;
 		}
 	} else {
+		/* G33's GTT stolen memory is separate from gfx data
+		 * stolen memory.
+		 */
+		if (IS_G33)
+			size = 0;
 		switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
 		case I855_GMCH_GMS_STOLEN_1M:
 			gtt_entries = MB(1) - KB(size);
Signature · 1 line
1.5.2.3
#3 lore raw
Quoted 23 lines · On Thu, 6 Sep 2007 09:28:52 +0800 Zhenyu Wang <[email protected]> wrote:
Quoted 1 line · Randy Dunlap

*** Remember to use Documentation/SubmitChecklist when testing your code ***

Thanks Randy. Here's updated patch with typo and tab style fixed. I misused x style.

Subject: [PATCH] [AGPGART] intel_agp: fix stolen mem range on G33

G33 GTT stolen memory is below graphics data stolen memory and be seperate, so don't subtract it in stolen mem counting.

---
 drivers/char/agp/intel-agp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +0 -0
index 2c9ca2c..581f922 100644
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
 			break;

drivers/char/agp/intel-agp.c static void intel_i830_init_gtt_entries(void) · line 516

Quoted 10 lines
drivers/char/agp/intel-agp.c +5 -0
 		}
 	} else {
+		/* G33's GTT stolen memory is separate from gfx data
+		 * stolen memory.
+		 */
+		if (IS_G33)
+			size = 0;
 		switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
 		case I855_GMCH_GMS_STOLEN_1M:
 			gtt_entries = MB(1) - KB(size);

When looking at a "fix" I need to work out whether it might be needed in 2.6.23. But your description of this patch didn't describe the problem which it fixes in a way which allows me to decide this.

Acked-by
#4 lore raw
Quoted 8 lines
Quoted 8 lines

Subject: [PATCH] [AGPGART] intel_agp: fix stolen mem range on G33

G33 GTT stolen memory is below graphics data
stolen memory and be seperate, so don't subtract
it in stolen mem counting.

Andrew I meant to upstream these for 2.6.23 but travelling is still in progress, so if you could send them to Linus...

Quoted 27 lines
Quoted 10 lines
---
 drivers/char/agp/intel-agp.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
drivers/char/agp/intel-agp.c +0 -0
index 2c9ca2c..581f922 100644
@@ -506,6 +506,11 @@ static void intel_i830_init_gtt_entries(void)
 			break;

drivers/char/agp/intel-agp.c static void intel_i830_init_gtt_entries(void) · line 516

Quoted 10 lines
drivers/char/agp/intel-agp.c +5 -0
 		}
 	} else {
+		/* G33's GTT stolen memory is separate from gfx data
+		 * stolen memory.
+		 */
+		if (IS_G33)
+			size = 0;
 		switch (gmch_ctrl & I830_GMCH_GMS_MASK) {
 		case I855_GMCH_GMS_STOLEN_1M:
 			gtt_entries = MB(1) - KB(size);

When looking at a "fix" I need to work out whether it might be needed in 2.6.23. But your description of this patch didn't describe the problem which it fixes in a way which allows me to decide this.