@@ -43,6 +43,8 @@ struct panel_config {
/* Unit: line clocks */
int acb; /* ac-bias pin frequency */
+ int recommended_bpp; /* overrides the default bpp */
+
enum omap_panel_config config;
int power_on_delay;
@@ -331,6 +333,17 @@ static int generic_dpi_panel_check_timings(struct omap_dss_device *dssdev,
return dpi_check_timings(dssdev, timings);
}
+static int generic_dpi_panel_get_bpp(struct omap_dss_device *dssdev)
+{
+ struct panel_drv_data *drv_data = dev_get_drvdata(&dssdev->dev);
+ struct panel_config *panel_config = drv_data->panel_config;
+
+ if (panel_config->recommended_bpp != 0)
+ return panel_config->recommended_bpp;
+
+ return omapdss_default_get_recommended_bpp(dssdev);
+}
+
static struct omap_dss_driver dpi_driver = {
.probe = generic_dpi_panel_probe,
.remove = generic_dpi_panel_remove,
@@ -344,6 +357,8 @@ static struct omap_dss_driver dpi_driver = {
.get_timings = generic_dpi_panel_get_timings,
.check_timings = generic_dpi_panel_check_timings,
+ .get_recommended_bpp = generic_dpi_panel_get_bpp,
+
.driver = {
.name = "generic_dpi_panel",
.owner = THIS_MODULE,