How do I use omap_dss_driver?

Hey Beaglers,

I got an LCD. This LCD has a software driver for Beagleboard which is
in the form of an omap_dss_driver
static struct omap_dss_driver ozlcd_driver = {
   .probe = ozlcd_panel_probe,
   .remove = ozlcd_panel_remove,
   .enable = ozlcd_panel_enable,
   .disable = ozlcd_panel_disable,
   .suspend = ozlcd_panel_suspend,
   .resume = ozlcd_panel_resume,
   .driver = {
      .name = "ozlcd_panel",
      .owner = THIS_MODULE,
   }
};

Since this driver comes as a module, I insmoded it on my Beagleboard.
But nothing comes up on the LCD. The part I can't figure out is how do
I tell the omapdss to use this driver after the insmod?

-Fred

From your driver sources, what is the value of the “name” member of the “omap_dss_device” struct?

Btw, could you provide a link to the panel you are using

Lioric

LCD drivers do not declare any omap_dss_device structure. Eg: beagle
has only 2 omap_dss_device.

static struct omap_dss_device beagle_dvi_device = {
  .type = OMAP_DISPLAY_TYPE_DPI,
  .name = "dvi",
  .driver_name = "generic_panel",
  .phy.dpi.data_lines = 24,
  .reset_gpio = 170,
  .platform_enable = beagle_enable_dvi,
  .platform_disable = beagle_disable_dvi,
};

static struct omap_dss_device beagle_tv_device = {
  .name = "tv",
  .driver_name = "venc",
  .type = OMAP_DISPLAY_TYPE_VENC,
  .phy.venc.type = OMAP_DSS_VENC_TYPE_SVIDEO,
  .platform_enable = beagle_panel_enable_tv,
  .platform_disable = beagle_panel_disable_tv,
};

static struct omap_dss_device *beagle_dss_devices[] = {
  &beagle_dvi_device,
  &beagle_tv_device,
};

So you see "dvi", "tv" as the plane. Above shows the default LCD
driver_name like "generic_panel" which uses omap_dss_driver. For
example, if you had other LCDs:

drivers/video/omap2/displays/panel-sharp-lq043t1dg01.c- .name =
"sharp_lq_panel",
drivers/video/omap2/displays/panel-sharp-ls037v7dw01.c- .name =
"sharp_ls_panel",

then my question applies to above. If you built sharp_ls as a module
and then insmoded it, then how do you switch from generic_panel to
sharp_ls_panel?

Can you paste what you do?

Then you need to add the omap_dss_device struc to arch/arm/mach-omap2/board-omap3beagle.c, the “.name” member will be what you use in the bootarg params to identify the driver

static struct omap_dss_device your_lcd_device = {
.type = OMAP_DISPLAY_TYPE_DPI,
.name = “wheteverNameIs used”,
.driver_name = “ozlcd_panel”,
.phy.dpi.data_lines = 18,
.platform_enable = ozlcd_panel_enable,
.platform_disable = ozlcd_panel_disable,

};

Additionally add this struct to the “beagle_dss_devices” static struct:

static struct omap_dss_device *blueshark_dss_devices[] = {
&dvi_device,
&tv_device,
&your_lcd_device,

};

Then you have to modify your boot script (or whatever boot args are you using) to read something like this:

omapfb.mode=theNameOfYourDevice:800x480MR-16@60 (or the resolution you want)

Basically that is what you need, of course it depends on your configuration, you might need to modify the kernel displays/kconfig and makefile files, but it seems that you already have the module compiled, so this is not needed in that situation

On a different note, it is polite that if you expect answers to your questions, at least you do the same when the questions are directed to you

Lioric

This approach works for you?