Google
  Web www.spinics.net

Re: [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On Wed, Jul 16, 2008 at 7:18 AM, Jaya Kumar <jayakumar.lkml@xxxxxxxxx> wrote:
> On Wed, Jul 16, 2008 at 5:38 PM, Russell King - ARM Linux
> <linux@xxxxxxxxxxxxxxxx> wrote:
>> On Wed, Jul 16, 2008 at 01:59:42AM -0700, Jaya Kumar wrote:
>>> On Wed, Jul 16, 2008 at 12:00 AM, eric miao <eric.y.miao@xxxxxxxxx> wrote:
>>> > On Sun, Jul 13, 2008 at 9:26 PM, Jaya Kumar <jayakumar.lkml@xxxxxxxxx> wrote:
>>> >> These changes are to make it possible for a secondary driver to share the
>>> >> pxafb framebuffer. The changes include:
>>> >> - adding clkdev entry in pxafb_mach_info so that a driver can pass in the
>>> >>  correct struct device owner for the LCDCLK.
>>> >
>>> > Is it possible that LCDCLK being requested by device other than
>>> > pxa_device_fb?? Could you give an example and we may work out
>>> > a better solution.
>>>
>>> You're right. I think LCDCLK is only ever requested by pxa_device_fb.
>>>
>>> I see now that instead of doing:
>>> -       fbi->clk = clk_get(dev, "LCDCLK");
>>> +       fbi->clk = clk_get(inf->clkdev, "LCDCLK");
>>>
>>> a better solution would be to directly use pxa_device_fb:
>>> -       fbi->clk = clk_get(dev, "LCDCLK");
>>> +       fbi->clk = clk_get(pxa_device_fb.dev, "LCDCLK");
>>>
>>> and then I can avoid doing the clkdev ugliness.
>>
>> PXA devices (intentionally) aren't exported.  Nor are they going to be,
>> so the above will fail if built as a module.
>>
>
> Ah... I think this may be the cause of all my troubles. I've been
> trying to support am200epd working as a module, and allow it to rmmod
> cleanly, hence the inability to use pxa_device_fb through
> set_pxa_fb_info. If module support isn't important then I can happily
> take out unload support from am200epd and probably can then use
> set_pxa_fb_info and also reduce complexity in other parts of the
> metronomefb, am200epd, pxafb code.
>

Hi Eric,

I've run into some difficulties. set_pxa_fb_info is:

void __init set_pxa_fb_info(struct pxafb_mach_info *info)

and not exported. Therefore am200epd can't be built as a module now
that it depends on set_pxa_fb_info. That is fine, I switched am200epd
to a built-in. But then because set_pxa_fb_info is __init, it
disappears before am200epd is ready to call it. This is because
am200epd needs metronomefb's framebuffer size and info which it only
finds out after full boot into userspace when it gets its firmware
from a udev script. I think this means that I would also need to make
metronomefb a built-in and figure out how to compile in metronome's
firmware. I haven't figured out how to do the latter yet.

I started thinking about maybe creating something different, like
maybe set_mod_pxa_fb_info that would work more dynamically (ie: alloc
a platform_device dynamically, thus making it possible for
device_release to work, rather than using a static struct
pxa_device_fb) and allow for module support without requiring any
exports other than itself. Is this something that's of interest  or
should I focus on the former?

Thanks,
jaya

-------------------------------------------------------------------
List admin: http://lists.arm.linux.org.uk/mailman/listinfo/linux-arm-kernel
FAQ:        http://www.arm.linux.org.uk/mailinglists/faq.php
Etiquette:  http://www.arm.linux.org.uk/mailinglists/etiquette.php

[Site Home]     [Linux Arm]     [Fedora ARM]     [Gcc Help]     [Git]     [DCCP]     [IETF Announce]     [Security]     [PDAs]     [Linux]     [Linux Book List]     [Linux MIPS]     [Yosemite Campsites]     [Photos]

Add to Google Google PageRank Checking tool