gma500: Mask out bits not part of the page table base address
Otherwise we can't ioremap the gtt and the screen gets garbled.
Signed-off-by Patrik Jakobsson <[email protected]>
---
drivers/staging/gma500/gtt.c +1 -1
@@ -397,7 +397,7 @@ int psb_gtt_init(struct drm_device *dev, int resume)/* The root resource we allocate address space from */ dev_priv->gtt_initialized =1 ; - pg->gtt_phys_start = dev_priv->pge_ctl; + pg->gtt_phys_start = dev_priv->pge_ctl &PAGE_MASK ;/* * FIXME: video mmu has hw bug to access 0x0D0000000,
Alan Cox
Acked-byQuoted 10 lines · On Fri, 8 Jul 2011 00:06:21 +0200 Patrik Jakobsson…
Otherwise we can't ioremap the gtt and the screen gets garbled.
Signed-off-by Patrik Jakobsson <[email protected]>---
drivers/staging/gma500/gtt.c +0
-0
drivers/staging/gma500/gtt.c int psb_gtt_init(struct drm_device *dev, int resume) · line 400
Quoted 5 lines
drivers/staging/gma500/gtt.c +1
-1@@ -397,7 +397,7 @@ int psb_gtt_init(struct drm_device *dev, int resume)/* The root resource we allocate address space from */ dev_priv->gtt_initialized =1 ; - pg->gtt_phys_start = dev_priv->pge_ctl; + pg->gtt_phys_start = dev_priv->pge_ctl &PAGE_MASK ;
Umm yes I suppose if its already been enabled that'll be slightly important
Acked-by Alan Cox <[email protected]>
Quoted 2 lines
Umm yes I suppose if its already been enabled that'll be slightly important
Yes :) and I guess that the size (bits 3:1) of the gtt could theoretically be something other than 512KB. Is it safe to just look at the pci resource length or should one perhaps cross-check it against the control register?
Maybe I just worry too much