This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM35xx DSS display driver for 320x240

Other Parts Discussed in Thread: AM3505, AM3517

I apologize if this has been posted before and I imagine it has but can't find it.  I am implementing a custom board with the AM3505 processor.  I have built a Linux kernel using the 2.6.37 source in PSP04.02 without issues,  I have developed a display driver for the panel and placed it in drivers/video/omap2/displays and configured the kernel to build with it.  That all works fine.  The probem I am having is that when I use the framebuffer device, the image is pushed off to the right and appears to wrap around.  I am assuming this has something to do with the overlays, etc. but I can't seem to get the framebuffer configured correctly.  I have tried setting the omapfb.mode=320x240MR-24@60, but it doesn't change a thing.  Are there other changes that need to be made to the dss driver to work with a display of this small of a resolution.  I can see that others have accomplished this but it is alluding me.  Any help would be appreciated.

Thanks

Bob

  • did you set up correctly leftmargin rightmargin?

  • I am not sure where you would do that for an fbdev device.  I think that is for V4L2 devices?

  • Sorry I just realized you meant through fbset - the margins are 0,0.

  • your margins are wrong anyway. They just can't be zero.

    so, what driver did you write? When I wrote drivers for TFT panels for omap3 that driver had a structure where all TFT parameters were described

    please read my post to beagleboard group and have a look at a attached patch

    https://groups.google.com/d/msg/beagleboard/JwRQphtJ8mU/L70srR_V2fQJ

  • I wrote a panel driver in the display directory of the drivers/video/omap2 directory in linux for a FEMA GM320240D panel.  This panel uses an HX8238 controller, so I set the interface for 24 data lines and the timings per the data sheet for the panel.  

    static const struct omap_video_timings fema_gm320240d_timings = {
    .x_res = 320,
    .y_res = 240,

    .pixel_clock = 6000,

    .hsw = 1,
    .hfp = 19,
    .hbp = 67,
    .vsw = 1,
    .vfp = 4,
    .vbp = 18,
    };

    and

    static struct omap_dss_device fema_lcd_device = {
    .type = OMAP_DISPLAY_TYPE_DPI,
    .name = "lcd",
    .driver_name = "fema_gm320240d_panel",
    .phy.dpi.data_lines = 24,
    .reset_gpio = LCD_RESET,
    .platform_enable = am3517_dssdummy_enable,
    .platform_disable = am3517_dssdummy_disable,
    };

    The enable and disable are dummy functions that don't really do anything.  The enable returns a 0, the disable is a void.  The default DSS driver is set to the LCD device, so I don't set the omapfb variables in the UBoot boot string.  I did try omapfb.mode=320x240MR-24@60 but it didn't change anything.  It seems that the indent is about 1/4 of the screen so I am beginning to believe it has to do with the 32 to 24 bit mapping somewhere?


  • where did you get these numbers?

    .hsw = 1,
    .hfp = 19,
    .hbp = 67,
    .vsw = 1,
    .vfp = 4,
    .vbp = 18,

    here are margins digged in

    hbp = horisontal back porch

    hfp = horisontal front porch

    etc..

  • Those numbers are directly from the FEMA data sheet, and therefore from the HX8238 controller data sheet.  I have used this controller in another board I designed using an ATMEL AT91SAM9263 with the same timings and it works perfectly.  Of course the display subsystem on the ATMEL chip is much different and the fb driver I wrote was very straightforward (single module fbdev).  I can't seem to decipher the DSS driver with all of its parts so I was hoping there was something obvious.  I don't understand why the margins are coming up blank in the fbdev ioctl but they are clearly being set in the driver.

  • You are right! There is somethig else: in your bootargs parameters remove everything about resolution and all DSS stuff. Just have something like this:

    setenv bootargs console=${console} mpurate=${mpurate} vram=${vram} omapdss.def_disp=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype}

    so, only omapdss.def_disp=${defaultdisplay} is ebout a display. No a kernel will let your own driver to rule things, not DSS. Just try and you will be convinced. I spent about 3 days on this problem a yeah ago :)
  • I added the omapdss.def_display to the bootargs.  I didn't originally include anything in the bootargs for DSS.  Still doing the same thing.  It seems that something isn't getting set in the DSS stack correctly.  When I do an FBIOGET_VSCREENINFO ioctl and check the pixclock value I get 0.  I wrote a little app that loads color bars into the frame buffer, each of them is 1/8 of the screen width.  The colors are accurate, but the last bar comes out in the beginning and is repeated once so instead of being on the end it takes up the first 1/4 of the screen.  It seems like an indexing issue or an overlay?

  • Bob,

    Where you able to solve your problem? I have exact same issue.

    Could you help me resolve this!

    Thanks

    Ahmad

  • I fixed it about 2.5 years ago but I don't remember what I did. It may have been that I was trying to use a 24bbp when the display module otherwise wants to be 16bpp but I'm not really certain. What panel are you using? I can send you the FEMA panel code if you like.
  • Thanks for the reply,
    I am using HX8238 based 3.5" LCD
    http://www.buydisplay.com/default/3-5-inch-tft-lcd-color-module-in-320x240-touch-screen-lq035nc111

    When I increased the vsync period (way to 700+) I could see the other content (but for short flashes due to refresh). I got that from another forum but I do not have a clue on how to proceed.

    I put all the values (vbp, vfp, hbp, hfp, dclk, ... etc) from the datasheet but did not work (same as you described).

    Regards,
    Ahmad
  • Thanks. I managed to solve it.

    You have to disable the DE signal (LCD_RDY). Either through software or hardware. It can be either hi or gnd.

  • Hi !

    I have same problem but i don't understand what you say.

    When i pull de to 1 or to 0, screen is blinking, changing color beetween rgb...

    Can you help me please?

  • Sorry for late reply.
    Just make DE signal open on LCD side.

    Regard,