Sharp Display Driver Software

Hi,
   I am trying to set up the display software for a Sharp LQ0431DG01
on a Rev C board. I am very new at the whole process of writing
drivers and so need help with a few things. I have done what I could
look around to avoid having to ask noob questions but I still need
clarification about a few things. Basically I need verification as to
what support is offered by the kernel in terms of display drivers as
well as the steps that need to be taken to get this thing up and
running. I am strictly dealing with the software side of things.

Here are the steps that I understand need to be taken:

1) Turn on .../drivers/video/omap2 driver by making sure it was
enabled in the config.
2) Append the additions described in this thread
http://groups.google.com/group/beagleboard/browse_thread/thread/66e3b2cb6a9299a6
to .../drviers/video/omap2/omapfb/omapfb-main.c. Recompile kernel. (We
can now see /dev/fb, /dev/fb0 etc on the beagle).
3) Write a userspace application that interfaces the kernel and
userspace using the ioctl commands given in .../drivers/video/omap2/
omapfb/omapfb_ioctl.c. Doing so appropriately would all me to paint
the screen.

My problem is with step (2). Does this modification appropriately make
all of the connections to the J4 and J5 display ports? What else might
I have to do to get this all wired up correctly? What else do I need
to do to initialize the screen properly?

Another note: the modification in (2) fails to compile and needs to be
modified to work properly. That's fine, I am more interested in
understanding the process than getting all the syntax right.

I am sorry for the noob question, I haven't done much with writing
drivers before. I very much appreciate any help you guys can offer.

Thanks!
Bob

Bob wrote:

Hi,
   I am trying to set up the display software for a Sharp LQ0431DG01
on a Rev C board. I am very new at the whole process of writing
drivers and so need help with a few things. I have done what I could
look around to avoid having to ask noob questions but I still need
clarification about a few things. Basically I need verification as to
what support is offered by the kernel in terms of display drivers as
well as the steps that need to be taken to get this thing up and
running. I am strictly dealing with the software side of things.

Here are the steps that I understand need to be taken:

1) Turn on .../drivers/video/omap2 driver by making sure it was
enabled in the config.
2) Append the additions described in this thread
http://groups.google.com/group/beagleboard/browse_thread/thread/66e3b2cb6a9299a6
to .../drviers/video/omap2/omapfb/omapfb-main.c. Recompile kernel. (We
can now see /dev/fb, /dev/fb0 etc on the beagle).
3) Write a userspace application that interfaces the kernel and
userspace using the ioctl commands given in .../drivers/video/omap2/
omapfb/omapfb_ioctl.c. Doing so appropriately would all me to paint
the screen.

My problem is with step (2). Does this modification appropriately make
all of the connections to the J4 and J5 display ports? What else might
I have to do to get this all wired up correctly? What else do I need
to do to initialize the screen properly?

  It's been a while since I was in that bit of code, but if you
use the dss2 (um, I think - second version of the dss driver) from
the head of the omap kernel repository (again, can dig the URL out
for you if you're interested), all of this turns into echoing files
into sysfs somewhere and it all seems to behave perfectly sensibly,
as per Documentation/arm/OMAP/DSS. I can probably come up with some
grotty hacks to the beagle board file if you need them.

  You still need to ioctl() for a couple of things - changing the
sizes of and mapping framebuffers, for example - but otherwise it all
seems to 'just work' - at least for conventional graphics modes.
I was driving an Si9022 (HDMI chip) so I've not attempted to engage
RFB or other such wonders.

  The one problem I did have was some kind of power monitoring
occasionally killing clock to dss - it leaves traces in dmesg as it
does so. I never got to the bottom of that.

  J4 and J5 should 'just work'. You can see them wiggle on a
scope. You may, of course, need to do other things to provoke the
LCD into any sort of life at all, but google doesn't understand your
version number so I fear I can't help you there...

  Blank screens under these circumstances are commonly caused by
slightly invalid video modes (syncs in the wrong place, wrong
blanking period, slightly-wrong dot clock - note that OMAP's display
hardware will give you 'the closest clock I can find', not
'the clock you asked for').

  Um, hope that helps in some way,

Richard.

Richard Watts wrote:

Bob wrote:

[snip]

Blank screens under these circumstances are commonly caused by
slightly invalid video modes (syncs in the wrong place, wrong
blanking period, slightly-wrong dot clock - note that OMAP's display
hardware will give you 'the closest clock I can find', not
'the clock you asked for').

  .. also by not having set up your planes correctly.

  .. oh, and of course the screen actually being blank.

dd if=/dev/urandom of=/dev/fb0 bs=1024 count=2000

  is commonly your friend.. (on which subject, if you're debugging
with a monitor into the DVI port bear in mind that many monitors and
even more TVs are surprisingly scabby about what odd modes they will
deign to display. Some will give you 'signal present' and a blank
screen if they don't understand what you're spitting at them, giving
you the impression that your screen writes are failing)

Richard.

Thanks for the help! I'll let you know if I have any more questions.

Also I had a typo: my display is the Sharp LQ043T1DG01 NOT LQ0431DG01.

Hi bob,

you might want to look at this patch and try it out.
http://patchwork.kernel.org/patch/68541/

KP

Bob wrote:

Also I had a typo: my display is the Sharp LQ043T1DG01 NOT LQ0431DG01.

  Ah! Makes a lot more sense :slight_smile:

  FWIW, a quick look at the datasheet suggests nothing bad, though
it's worth double-checking the polarities and timings on your
sync signals. Also, check your voltage levels - the Beagle's
display outputs are 1.8V, your display requires 3.3V (by the
looks of it),

R