Re: DSS2 failure with current linux-omap head

2010-05-25 Thread Tony Lindgren
* Tomi Valkeinen tomi.valkei...@nokia.com [100521 01:03]:
 On Thu, 2010-05-20 at 00:33 +0200, ext Steve Sakoman wrote:
  I did a quick test build of the current linux-omap head and get a
  failure very early on in the boot process in
  drivers/video/omap2/vram.c code:
  
  Illegal SDRAM size for VRAM
  
  It is generated by the following code:
  
  bdata = NODE_DATA(0)-bdata;
  sdram_start = bdata-node_min_pfn  PAGE_SHIFT;
  sdram_size = (bdata-node_low_pfn  PAGE_SHIFT) - sdram_start;
  
  if (paddr) {
  if ((paddr  ~PAGE_MASK) || paddr  sdram_start ||
  paddr + size  sdram_start + sdram_size) {
  pr_err(Illegal SDRAM region for VRAM\n);
  return;
  }
  
  if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE)  0) {
  pr_err(FB: failed to reserve VRAM\n);
  return;
  }
  } else {
  if (size  sdram_size) {
  pr_err(Illegal SDRAM size for VRAM\n);
  return;
  }
  
  paddr = virt_to_phys(alloc_bootmem_pages(size));
  BUG_ON(paddr  ~PAGE_MASK);
  }
  
  
  I modified the error pr_error to display the two values that are
  compared to generate this error:
  
  Illegal SDRAM size for VRAM: size=0xc0 sdram_size=0x0
  
  So it appears that the method used to get the sdram size no longer
  works since it returns a size of 0!
 
 I copied the method from the older omapfb driver, and I have to say that
 I've never looked at what it actually does. Perhaps there's a proper way
 to get the RAM starts and sizes somewhere...

FYI, Russell has several interesting omapfb patches in his lmb branch.
Please take a look at that, might make your life easier :)

Regards,

Tony
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: DSS2 failure with current linux-omap head

2010-05-24 Thread Raghu

On 05/21/2010 03:07 AM, Tomi Valkeinen wrote:

On Thu, 2010-05-20 at 00:33 +0200, ext Steve Sakoman wrote:

I did a quick test build of the current linux-omap head and get a
failure very early on in the boot process in
drivers/video/omap2/vram.c code:

Illegal SDRAM size for VRAM

It is generated by the following code:

bdata = NODE_DATA(0)-bdata;
sdram_start = bdata-node_min_pfn  PAGE_SHIFT;
sdram_size = (bdata-node_low_pfn  PAGE_SHIFT) - sdram_start;

if (paddr) {
if ((paddr  ~PAGE_MASK) || paddr  sdram_start ||
paddr + size  sdram_start + sdram_size) {
pr_err(Illegal SDRAM region for VRAM\n);
return;
}

if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE)  0) {
pr_err(FB: failed to reserve VRAM\n);
return;
}
} else {
if (size  sdram_size) {
pr_err(Illegal SDRAM size for VRAM\n);
return;
}

paddr = virt_to_phys(alloc_bootmem_pages(size));
BUG_ON(paddr  ~PAGE_MASK);
}


I modified the error pr_error to display the two values that are
compared to generate this error:

Illegal SDRAM size for VRAM: size=0xc0 sdram_size=0x0

So it appears that the method used to get the sdram size no longer
works since it returns a size of 0!


I copied the method from the older omapfb driver, and I have to say that
I've never looked at what it actually does. Perhaps there's a proper way
to get the RAM starts and sizes somewhere...

  Tomi


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


when i enable bootmem debug, I can see its trying to reserve VRAM memory 
way before bootmem setup.


VRAM: vram size = 12582912
VRAM: min page frame #: 0
VRAM: low page frame #: 0
VRAM: SDRM start: 0
VRAM: SDRAM size = 0
Illegal SDRAM size for VRAM
bootmem::init_bootmem_core nid=0 start=8 map=87fff end=88000 
mapsize=1000

bootmem::mark_bootmem_node nid=0 start=8 end=88000 reserve=0 flags=0
bootmem::__free nid=0 start=8 end=88000
bootmem::mark_bootmem_node nid=0 start=80004 end=80432 reserve=1 flags=0
bootmem::__reserve nid=0 start=80004 end=80432 flags=0
bootmem::mark_bootmem_node nid=0 start=81ffd end=82000 reserve=1 flags=0
bootmem::__reserve nid=0 start=81ffd end=82000 flags=0
bootmem::mark_bootmem_node nid=0 start=87fff end=88000 reserve=1 flags=0
bootmem::__reserve nid=0 start=87fff end=88000 flags=0
On node 0 totalpages: 32768
bootmem::alloc_bootmem_core nid=0 size=10 [256 pages] align=40 
goal=bfff

 limit=0
bootmem::__reserve nid=0 start=80432 end=80532 flags=1
free_area_init_node: node 0, pgdat c0415d3c, node_mem_map c0432000
  Normal zone: 256 pages used for memmap
  Normal zone: 0 pages reserved
  Normal zone: 32512 pages, LIFO batch:7
bootmem::alloc_bootmem_core nid=0 size=c [1 pages] align=40 
goal=bfff limit=

0
bootmem::__reserve nid=0 start=80532 end=80533 flags=1
bootmem::alloc_bootmem_core nid=0 size=400 [1 pages] align=40 
goal=bfff limi

t=0
bootmem::__reserve nid=0 start=80533 end=80533 flags=1
bootmem::alloc_bootmem_core nid=0 size=1c [1 pages] align=40 goal=0 
limit=ff

ff
bootmem::__reserve nid=0 start=80533 end=80533 flags=1
bootmem::alloc_bootmem_core nid=0 size=d5 [1 pages] align=40 goal=0 limit=0
bootmem::__reserve nid=0 start=80533 end=80533 flags=1
bootmem::alloc_bootmem_core nid=0 size=d5 [1 pages] align=40 goal=0 limit=0
bootmem::__reserve nid=0 start=80533 end=80533 flags=1
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512

bootmem::alloc_bootmem_core nid=0 size=800 [1 pages] align=40 goal=0 limit=0
bootmem::__reserve nid=0 start=80533 end=80533 flags=1
PID hash table entries: 512 (order: -1, 2048 bytes)
bootmem::alloc_bootmem_core nid=0 size=1 [16 pages] align=40 goal=0 
limit=0

bootmem::__reserve nid=0 start=80533 end=80543 flags=1
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
bootmem::alloc_bootmem_core nid=0 size=8000 [8 pages] align=40 goal=0 
limit=0

bootmem::__reserve nid=0 start=80543 end=8054b flags=1
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
bootmem::free_all_bootmem_core nid=0 start=8 end=88000 aligned=1
bootmem::free_all_bootmem_core nid=0 released=7ab6
Memory: 128MB = 128MB total

--
Best Regards,
Ragha
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: DSS2 failure with current linux-omap head

2010-05-21 Thread Tomi Valkeinen
On Thu, 2010-05-20 at 00:33 +0200, ext Steve Sakoman wrote:
 I did a quick test build of the current linux-omap head and get a
 failure very early on in the boot process in
 drivers/video/omap2/vram.c code:
 
   Illegal SDRAM size for VRAM
 
 It is generated by the following code:
 
   bdata = NODE_DATA(0)-bdata;
   sdram_start = bdata-node_min_pfn  PAGE_SHIFT;
   sdram_size = (bdata-node_low_pfn  PAGE_SHIFT) - sdram_start;
 
   if (paddr) {
   if ((paddr  ~PAGE_MASK) || paddr  sdram_start ||
   paddr + size  sdram_start + sdram_size) {
   pr_err(Illegal SDRAM region for VRAM\n);
   return;
   }
 
   if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE)  0) {
   pr_err(FB: failed to reserve VRAM\n);
   return;
   }
   } else {
   if (size  sdram_size) {
   pr_err(Illegal SDRAM size for VRAM\n);
   return;
   }
 
   paddr = virt_to_phys(alloc_bootmem_pages(size));
   BUG_ON(paddr  ~PAGE_MASK);
   }
 
 
 I modified the error pr_error to display the two values that are
 compared to generate this error:
 
 Illegal SDRAM size for VRAM: size=0xc0 sdram_size=0x0
 
 So it appears that the method used to get the sdram size no longer
 works since it returns a size of 0!

I copied the method from the older omapfb driver, and I have to say that
I've never looked at what it actually does. Perhaps there's a proper way
to get the RAM starts and sizes somewhere...

 Tomi


--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


DSS2 failure with current linux-omap head

2010-05-19 Thread Steve Sakoman
I did a quick test build of the current linux-omap head and get a
failure very early on in the boot process in
drivers/video/omap2/vram.c code:

Illegal SDRAM size for VRAM

It is generated by the following code:

bdata = NODE_DATA(0)-bdata;
sdram_start = bdata-node_min_pfn  PAGE_SHIFT;
sdram_size = (bdata-node_low_pfn  PAGE_SHIFT) - sdram_start;

if (paddr) {
if ((paddr  ~PAGE_MASK) || paddr  sdram_start ||
paddr + size  sdram_start + sdram_size) {
pr_err(Illegal SDRAM region for VRAM\n);
return;
}

if (reserve_bootmem(paddr, size, BOOTMEM_EXCLUSIVE)  0) {
pr_err(FB: failed to reserve VRAM\n);
return;
}
} else {
if (size  sdram_size) {
pr_err(Illegal SDRAM size for VRAM\n);
return;
}

paddr = virt_to_phys(alloc_bootmem_pages(size));
BUG_ON(paddr  ~PAGE_MASK);
}


I modified the error pr_error to display the two values that are
compared to generate this error:

Illegal SDRAM size for VRAM: size=0xc0 sdram_size=0x0

So it appears that the method used to get the sdram size no longer
works since it returns a size of 0!

I won't be able to spend more time on this till tomorrow.  Perhaps
someone else can take a look in the meantime.

Steve
--
To unsubscribe from this list: send the line unsubscribe linux-omap in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html