Skip to contentSkip to conversation

drm/i915: Don't complain about stolen conflicts on gen3

PATCH Applied Daniel Vetter 4 participants 4 messages Apr 11, 2014 – Dec 8, 2014

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: Don't complain about stolen conflicts on gen3

Apparently stuff works that way on those machines.

I agree with Chris' concern that this is a bit risky but imo worth a shot in -next just for fun. Afaics all these machines have the pci resources allocated like that by the BIOS, so I suspect that it's all ok.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031

---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
drivers/gpu/drm/i915/i915_gem_stolen.c +5 -1
index 62ef55ba061c..99d147af173a 100644
@@ -93,7 +93,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev)
 		r = devm_request_mem_region(dev->dev, base + 1,
 					    dev_priv->gtt.stolen_size - 1,
 					    "Graphics Stolen Memory");
-		if (r == NULL) {
+		/*
+		 * GEN3 firmware likes to smash pci bridges into the stolen
+		 * range. Apparently this works.
+		 */
+		if (r == NULL && !IS_GEN3(dev)) {
 			DRM_ERROR("conflict detected with stolen region: [0x%08x - 0x%08x]\n",
 				  base, base + (uint32_t)dev_priv->gtt.stolen_size);
 			base = 0;
Signature · 1 line
1.8.5.2
Reviewed-by on v1 1/1
#1 lore raw
Quoted 31 lines · On Fri, 11 Apr 2014 15:55:17 +0200 Daniel Vetter <[email protected]> wrote:

Apparently stuff works that way on those machines.

I agree with Chris' concern that this is a bit risky but imo worth a shot in -next just for fun. Afaics all these machines have the pci resources allocated like that by the BIOS, so I suspect that it's all ok.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031

---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_gem_stolen.c index 62ef55ba061c..99d147af173a 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -93,7 +93,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev) r = devm_request_mem_region(dev->dev, base + 1, dev_priv->gtt.stolen_size
- 1, "Graphics Stolen Memory");

drivers/gpu/drm/i915/i915_gem_stolen.c +2 -1
-		if (r == NULL) {
+		/*
+		 * GEN3 firmware likes to smash pci bridges into the

stolen

drivers/gpu/drm/i915/i915_gem_stolen.c +3 -0
+		 * range. Apparently this works.
+		 */
+		if (r == NULL && !IS_GEN3(dev)) {
 			DRM_ERROR("conflict detected with stolen
Quoted 2 lines

region: [0x%08x - 0x%08x]\n", base, base +
(uint32_t)dev_priv->gtt.stolen_size); base = 0;

Yeah just to allay fears: the decode priority on the GMCH is fixed and specific. The stolen range is demarcated by some regs which the GMCH decodes before it tries going out into PCI space. So it's safe to see the stolen range under the bus0 window (probably even under some device window down the range) but does make things messier for us.

Looks like the reporter gave a t-b too.

Jesse
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Tested-by Paul Menzel
#2 lore raw
Quoted 44 lines · Jesse Barnes
Quoted 31 lines · On Fri, 11 Apr 2014 15:55:17 +0200 Daniel Vetter <[email protected]> wrote:

Apparently stuff works that way on those machines.

I agree with Chris' concern that this is a bit risky but imo worth a shot in -next just for fun. Afaics all these machines have the pci resources allocated like that by the BIOS, so I suspect that it's all ok.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031

---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_gem_stolen.c index 62ef55ba061c..99d147af173a 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -93,7 +93,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev) r = devm_request_mem_region(dev->dev, base + 1, dev_priv->gtt.stolen_size
- 1, "Graphics Stolen Memory");

drivers/gpu/drm/i915/i915_gem_stolen.c +2 -1
-		if (r == NULL) {
+		/*
+		 * GEN3 firmware likes to smash pci bridges into the

stolen

drivers/gpu/drm/i915/i915_gem_stolen.c +3 -0
+		 * range. Apparently this works.
+		 */
+		if (r == NULL && !IS_GEN3(dev)) {
 			DRM_ERROR("conflict detected with stolen
Quoted 2 lines

region: [0x%08x - 0x%08x]\n", base, base +
(uint32_t)dev_priv->gtt.stolen_size); base = 0;

Yeah just to allay fears: the decode priority on the GMCH is fixed and specific. The stolen range is demarcated by some regs which the GMCH decodes before it tries going out into PCI space. So it's safe to see the stolen range under the bus0 window (probably even under some device window down the range) but does make things messier for us.

Quoted 3 lines

Looks like the reporter gave a t-b too.

The other t-b from the other bugzilla is missing though:

This regression goes back to

commit eaba1b8f3379b5d100bd146b9a41d28348bdfd09

Author: Chris Wilson <[email protected]>
Date:   Thu Jul 4 12:28:35 2013 +0100

drm/i915: Verify that our stolen memory doesn't conflict

Jani, can you please pick this up for 3.19?

Thanks, Daniel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Applied
#3 lore raw
Quoted 56 lines · Daniel Vetter
Quoted 44 lines · Jesse Barnes
Quoted 31 lines · On Fri, 11 Apr 2014 15:55:17 +0200 Daniel Vetter <[email protected]> wrote:

Apparently stuff works that way on those machines.

I agree with Chris' concern that this is a bit risky but imo worth a shot in -next just for fun. Afaics all these machines have the pci resources allocated like that by the BIOS, so I suspect that it's all ok.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76983
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71031

---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/drivers/gpu/drm/i915/i915_gem_stolen.c index 62ef55ba061c..99d147af173a 100644 --- a/drivers/gpu/drm/i915/i915_gem_stolen.c +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c @@ -93,7 +93,11 @@ static unsigned long i915_stolen_to_physical(struct drm_device *dev) r = devm_request_mem_region(dev->dev, base + 1, dev_priv->gtt.stolen_size
- 1, "Graphics Stolen Memory");

drivers/gpu/drm/i915/i915_gem_stolen.c +2 -1
-		if (r == NULL) {
+		/*
+		 * GEN3 firmware likes to smash pci bridges into the

stolen

drivers/gpu/drm/i915/i915_gem_stolen.c +3 -0
+		 * range. Apparently this works.
+		 */
+		if (r == NULL && !IS_GEN3(dev)) {
 			DRM_ERROR("conflict detected with stolen
Quoted 2 lines

region: [0x%08x - 0x%08x]\n", base, base +
(uint32_t)dev_priv->gtt.stolen_size); base = 0;

Yeah just to allay fears: the decode priority on the GMCH is fixed and specific. The stolen range is demarcated by some regs which the GMCH decodes before it tries going out into PCI space. So it's safe to see the stolen range under the bus0 window (probably even under some device window down the range) but does make things messier for us.

Quoted 3 lines

Looks like the reporter gave a t-b too.

The other t-b from the other bugzilla is missing though:

This regression goes back to

Quoted 7 lines

commit eaba1b8f3379b5d100bd146b9a41d28348bdfd09

Author: Chris Wilson <[email protected]>
Date:   Thu Jul 4 12:28:35 2013 +0100

drm/i915: Verify that our stolen memory doesn't conflict

Jani, can you please pick this up for 3.19?

Pushed to drm-intel-next-fixes, thanks for the patch and review.

BR,
Jani.

Quoted 6 lines

Thanks, Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx