linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jaya Kumar" <jayakumar.lkml@gmail.com>
To: Eric Miao <eric.y.miao@gmail.com>
Cc: linux-fbdev-devel@lists.sourceforge.net, ymiao3@marvell.com,
	Russell King - ARM Linux <linux@arm.linux.org.uk>,
	linux-arm-kernel@lists.arm.linux.org.uk
Subject: Re: [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface
Date: Tue, 29 Jul 2008 23:10:10 -0400	[thread overview]
Message-ID: <45a44e480807292010wf673d2ucecd575d79343caf@mail.gmail.com> (raw)
In-Reply-To: <f17812d70807291941u3617b2e8q3ba0422c1db15b2d@mail.gmail.com>

On Tue, Jul 29, 2008 at 10:41 PM, Eric Miao <eric.y.miao@gmail.com> wrote:
> On Sat, Jul 26, 2008 at 11:30 AM, Jaya Kumar <jayakumar.lkml@gmail.com> wrote:
>>
>> I took a look at doing the above, ie: adjusting bpp instead of
>> custom_xfer_size. I've realized that I would still need to adjust lccr
>> in at least one other place:
>>
>>        fbi->reg_lccr1 =
>>                LCCR1_DisWdth(var->xres) +
>>
>> I'll try to improve my explanation. :-)
>>
>> The reason for this is that metronome requires a different bus width
>> (16 bit) for AMLCD transfers than it requires for its expected bits
>> per pixel ( 8 bits). To get LCDC to use 16 bits on the AMLCD bus, we
>> need to set 16bpp in LCCR3. So we then need to divide down the x
>> resolution in LCCR1. Eg: 800 pixels at 8bpp is the framebuffer. We
>> need 16-bit transfers so we set the desired pixels per line in LCCR to
>> = 800 pixels / ( 16 custom bus bits / 8 bits per pixel ) = 400 pixels
>> per line. So the code would be like:
>>
>> pix_per_line = var->xres / ( inf->custom_lccr_bpp / var->bits_per_pixel )
>>
>> I hope I was able to explain my reasoning for this above.
>>
>
> Sorry for the delay, I begin to understand the way this metronome is
> working, so each transfer is 16-bit wide and contains two 8-bit pixels?

Correct, the AMLCD xfer is 16-bit wide and is treated by Metronome as
2 8-bit pixels.

>
> Then the most simple way is to treat this display as 16-bit, and
> adjust the resolution parameters in the platform data with a nice
> comment.

I originally had it as .bpp = 16 ( in v6 and before) and used
custom_xfer_data to divide down the buffer sizes. The resolution needs
to stay at 800x600 so that the reported resolution for the display is
correct. So've I changed that to .bpp = 8 and used custom_lccr_bpp to
set LCCR3 to 16bpp in v7. Let me know if the implementation in v7 is
consistent with your suggestion.

>
> The problem of doing so is that:
> 1) framebuffer console cann't work anymore, and will show garbage
> instead of showing the nice penguine logo
>
> 2) the framebuffer application has to be aware of this, and handles
> the pixel format correctly.
>
> Provided the fact of this weird organized pixel format, I don't see many
> chances that X window or console can be run on top of this, but a
> specialized application, no?

Deferred IO converts the pixel data organization for the Metronome
controller so the latter is transparent to anything above fbdev. I
have tested with Xfbdev and it works quite well. So no specialized
applications needed. :-) Some video clips of it running here:
http://youtube.com/watch?v=Or3R3Q8oyuE and also a LinuxJournal article
showing the display with dillo and other standard applications.
http://www.linuxjournal.com/article/10110

Thanks,
jaya

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/

  reply	other threads:[~2008-07-30  3:10 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-20  6:10 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v6 Jaya Kumar
2008-07-20  6:10 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-21 11:11   ` Russell King - ARM Linux
2008-07-21 12:32     ` Jaya Kumar
2008-07-21 13:53       ` SSP based framebuffer driver Blaine Booher
2008-07-26  3:30       ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-30  2:41         ` Eric Miao
2008-07-30  3:10           ` Jaya Kumar [this message]
2008-07-20  6:10 ` [RFC 2.6.26-rc9 2/5] gumstix: conversion to MFP support and add bluetooth support Jaya Kumar
2008-07-21  2:13   ` eric miao
2008-07-20  6:10 ` [RFC 2.6.26-rc9 3/5] am200epd: convert to shared fb and use gpio api Jaya Kumar
2008-07-20  6:10 ` [RFC 2.6.26-rc9 4/5] metronomefb: convert printk to dev_dbg/err messages Jaya Kumar
2008-07-20  6:10 ` [RFC 2.6.26-rc9 5/5] metronomefb: changes to use separate framebuffer Jaya Kumar
  -- strict thread matches above, loose matches on Subject: below --
2008-07-26  4:32 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v7 Jaya Kumar
2008-07-26  4:32 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-29 15:28   ` Krzysztof Helt
2008-07-29 16:39     ` Jaya Kumar
2008-07-13 13:26 [RFC 2.6.26-rc9 0/5] am200epd, pxafb, metronomefb changes v5 Jaya Kumar
2008-07-13 13:26 ` [RFC 2.6.26-rc9 1/5] pxafb: add shared framebuffer interface Jaya Kumar
2008-07-16  7:00   ` eric miao
2008-07-16  8:59     ` Jaya Kumar
2008-07-16  9:08       ` eric miao
2008-07-16 11:10         ` Jaya Kumar
2008-07-16  9:38       ` Russell King - ARM Linux
2008-07-16 11:18         ` Jaya Kumar
2008-07-20  2:41           ` Jaya Kumar
2008-07-21  2:10             ` eric miao
2008-07-21  3:38               ` Jaya Kumar

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=45a44e480807292010wf673d2ucecd575d79343caf@mail.gmail.com \
    --to=jayakumar.lkml@gmail.com \
    --cc=eric.y.miao@gmail.com \
    --cc=linux-arm-kernel@lists.arm.linux.org.uk \
    --cc=linux-fbdev-devel@lists.sourceforge.net \
    --cc=linux@arm.linux.org.uk \
    --cc=ymiao3@marvell.com \
    /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).