diff mbox

drm/i915: More stolen quirking

Message ID 20170719100043.30851-1-daniel.vetter@ffwll.ch (mailing list archive)
State New, archived
Headers show

Commit Message

Daniel Vetter July 19, 2017, 10 a.m. UTC
I've found a bios with an off-by-one at the other end. There's a pnp
reservation for 0xc5400000-0xc7fffffe and we want stolen in 0xc6000000
through 0xc8000000.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99872
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98683
Cc: Martin Peres <martin.peres@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_gem_stolen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Martin Peres July 19, 2017, 10:05 a.m. UTC | #1
On 19/07/17 13:00, Daniel Vetter wrote:
> I've found a bios with an off-by-one at the other end. There's a pnp
> reservation for 0xc5400000-0xc7fffffe and we want stolen in 0xc6000000
> through 0xc8000000.
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99872
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98683
> Cc: Martin Peres <martin.peres@linux.intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Looks good, and it will reduce the noise in CI. Thanks!

Reviewed-by: Martin Peres <martin.peres@linux.intel.com>

> ---
>   drivers/gpu/drm/i915/i915_gem_stolen.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> index a817b3e0b17e..c11c915382e7 100644
> --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> @@ -254,9 +254,10 @@ static dma_addr_t i915_stolen_to_dma(struct drm_i915_private *dev_priv)
>   		 * This is a BIOS w/a: Some BIOS wrap stolen in the root
>   		 * PCI bus, but have an off-by-one error. Hence retry the
>   		 * reservation starting from 1 instead of 0.
> +		 * There's also BIOS with off-by-one on the other end.
>   		 */
>   		r = devm_request_mem_region(dev_priv->drm.dev, base + 1,
> -					    ggtt->stolen_size - 1,
> +					    ggtt->stolen_size - 2,
>   					    "Graphics Stolen Memory");
>   		/*
>   		 * GEN3 firmware likes to smash pci bridges into the stolen
>
Daniel Vetter July 19, 2017, 12:03 p.m. UTC | #2
On Wed, Jul 19, 2017 at 01:05:45PM +0300, Martin Peres wrote:
> On 19/07/17 13:00, Daniel Vetter wrote:
> > I've found a bios with an off-by-one at the other end. There's a pnp
> > reservation for 0xc5400000-0xc7fffffe and we want stolen in 0xc6000000
> > through 0xc8000000.
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99872
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=98683
> > Cc: Martin Peres <martin.peres@linux.intel.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Looks good, and it will reduce the noise in CI. Thanks!

Well, since this happens always it simply reduced coverage on that
machine. Not being sensitive for dmesg noise for the module reload
testcase makes that one rather useless.
> 
> Reviewed-by: Martin Peres <martin.peres@linux.intel.com>

Thanks for your review, merged.
-Daniel
> 
> > ---
> >   drivers/gpu/drm/i915/i915_gem_stolen.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
> > index a817b3e0b17e..c11c915382e7 100644
> > --- a/drivers/gpu/drm/i915/i915_gem_stolen.c
> > +++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
> > @@ -254,9 +254,10 @@ static dma_addr_t i915_stolen_to_dma(struct drm_i915_private *dev_priv)
> >   		 * This is a BIOS w/a: Some BIOS wrap stolen in the root
> >   		 * PCI bus, but have an off-by-one error. Hence retry the
> >   		 * reservation starting from 1 instead of 0.
> > +		 * There's also BIOS with off-by-one on the other end.
> >   		 */
> >   		r = devm_request_mem_region(dev_priv->drm.dev, base + 1,
> > -					    ggtt->stolen_size - 1,
> > +					    ggtt->stolen_size - 2,
> >   					    "Graphics Stolen Memory");
> >   		/*
> >   		 * GEN3 firmware likes to smash pci bridges into the stolen
> >
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/i915_gem_stolen.c b/drivers/gpu/drm/i915/i915_gem_stolen.c
index a817b3e0b17e..c11c915382e7 100644
--- a/drivers/gpu/drm/i915/i915_gem_stolen.c
+++ b/drivers/gpu/drm/i915/i915_gem_stolen.c
@@ -254,9 +254,10 @@  static dma_addr_t i915_stolen_to_dma(struct drm_i915_private *dev_priv)
 		 * This is a BIOS w/a: Some BIOS wrap stolen in the root
 		 * PCI bus, but have an off-by-one error. Hence retry the
 		 * reservation starting from 1 instead of 0.
+		 * There's also BIOS with off-by-one on the other end.
 		 */
 		r = devm_request_mem_region(dev_priv->drm.dev, base + 1,
-					    ggtt->stolen_size - 1,
+					    ggtt->stolen_size - 2,
 					    "Graphics Stolen Memory");
 		/*
 		 * GEN3 firmware likes to smash pci bridges into the stolen