linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ryan Mallon <ryan@bluewatersys.com>
To: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: d.venzano@motronica.com, linux-fbdev-devel@lists.sourceforge.net,
	arm kernel <linux-arm-kernel@lists.arm.linux.org.uk>
Subject: Re: [PATCH v2 2/2] ep93xx video driver
Date: Sun, 19 Jul 2009 22:46:01 +1200	[thread overview]
Message-ID: <4A62F969.2030602@bluewatersys.com> (raw)
In-Reply-To: <BD79186B4FD85F4B8E60E381CAEE190901AC2033@mi8nycmail19.Mi8.com>

H Hartley Sweeten wrote:
> On Friday, July 17, 2009 1:23 PM, Ryan Mallon wrote:
>   
>> +static int __init ep93xxfb_alloc_videomem(struct fb_info *info)
>> +{
>> +	struct ep93xx_fbi *fbi = info->par;
>> +	char __iomem *virt_addr;
>> +	dma_addr_t phys_addr;
>> +	unsigned int fb_size;
>> +
>> +	fb_size = ep93xxfb_calc_fbsize(fbi->mach_info);
>> +	virt_addr = dma_alloc_writecombine(info->dev, fb_size,
>> +					   &phys_addr, GFP_KERNEL);
>> +	if (!virt_addr)
>> +		return -ENOMEM;
>> +	
>> +	/*
>> +	 * There is a bug in the ep93xx framebuffer which causes problems
>> +	 * if bit 27 of the physical address is set.
>> +	 * See: http://marc.info/?l=linux-arm-kernel&m=110061245502000&w=2
>> +	 * There does not seem to be any offical errata for this, but I
>> +	 * have confirmed the problem exists on my hardware (ep9315) at
>> +	 * least.
>> +	 */
>> +	if (check_screenpage_bug && phys_addr & (1 << 27)) {
>> +		dev_err(info->dev, "ep93xx framebuffer bug. phys addr (0x%x) "
>> +			"has bit 27 set: cannot init framebuffer\n", 
>> +			phys_addr);
>> +		
>> +		dma_free_coherent(info->dev, fb_size, virt_addr, phys_addr);
>> +		return -ENOMEM;
>> +	}
>> +
>> +	info->fix.smem_start = phys_addr;
>> +	info->fix.smem_len = fb_size;
>> +	info->screen_base = virt_addr;
>> +
>> +	return 0;
>> +}
>>     
>
> Were you able to test the SROMLL bit?  If that "fixes" the bit 27 bug maybe
> this should be added to the comment.  As far as I can tell, if the SROMLL bit
> is set it is impossbile to have an SDRAM physical address that would have
> bit 27 set.  With it cleared there are a number of memory configurations that
> might have it set.
>
>   
I tried the different memory layout you suggested, but I got a massive
kernel panic in the memory manager near the end of the boot process. I
haven't looked into it too much yet, one of my workmates seemed to think
that the way our SDRAM is wired up means that we can only use the memory
layout we have.

~Ryan


------------------------------------------------------------------------------
Enter the BlackBerry Developer Challenge  
This is your chance to win up to $100,000 in prizes! For a limited time, 
vendors submitting new applications to BlackBerry App World(TM) will have
the opportunity to enter the BlackBerry Developer Challenge. See full prize  
details at: http://p.sf.net/sfu/Challenge

  reply	other threads:[~2009-07-18 22:46 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 19:54 [PATCH v2 1/2] ep93xx video platform support Ryan Mallon
2009-07-17 20:23 ` [PATCH v2 2/2] ep93xx video driver Ryan Mallon
2009-07-17 18:19   ` H Hartley Sweeten
2009-07-19 10:46     ` Ryan Mallon [this message]
2009-07-19 11:53     ` Ryan Mallon
2009-07-19 11:55 ` [PATCH v2 1/2] ep93xx video platform support Ryan Mallon
2009-07-20 20:42   ` H Hartley Sweeten
2009-07-20 20:55     ` Ryan Mallon
2009-07-20 21:01       ` H Hartley Sweeten
2009-07-20 22:18         ` Russell King - ARM Linux
2009-07-20 22:15     ` Russell King - ARM Linux
2009-07-20 22:22       ` H Hartley Sweeten
2009-07-20 21:31 ` [PATCH v2 3/2] ep93xx video driver documentation Ryan Mallon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4A62F969.2030602@bluewatersys.com \
    --to=ryan@bluewatersys.com \
    --cc=d.venzano@motronica.com \
    --cc=hartleys@visionengravers.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).