// SPDX-License-Identifier: GPL-2.0-only /* * linux/drivers/video/omap2/dss/display.c * * Copyright (C) 2009 Nokia Corporation * Author: Tomi Valkeinen <tomi.valkeinen@nokia.com> * * Some code and ideas taken from drivers/video/omap/ driver * by Imre Deak.
*/
int omapdss_default_get_recommended_bpp(struct omap_dss_device *dssdev)
{ switch (dssdev->type) { case OMAP_DISPLAY_TYPE_DPI: if (dssdev->phy.dpi.data_lines == 24) return 24; else return 16;
case OMAP_DISPLAY_TYPE_DBI: if (dssdev->ctrl.pixel_size == 24) return 24; else return 16; case OMAP_DISPLAY_TYPE_DSI: if (dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) > 16) return 24; else return 16; case OMAP_DISPLAY_TYPE_VENC: case OMAP_DISPLAY_TYPE_SDI: case OMAP_DISPLAY_TYPE_HDMI: case OMAP_DISPLAY_TYPE_DVI: return 24; default:
BUG(); return 0;
}
}
EXPORT_SYMBOL(omapdss_default_get_recommended_bpp);
int omapdss_register_display(struct omap_dss_device *dssdev)
{ struct omap_dss_driver *drv = dssdev->driver; int id;
/* * Note: this presumes all the displays are either using DT or non-DT, * which normally should be the case. This also presumes that all * displays either have an DT alias, or none has.
*/
if (dssdev->dev->of_node) {
id = of_alias_get_id(dssdev->dev->of_node, "display");
if (id < 0)
id = disp_num_counter++;
} else {
id = disp_num_counter++;
}
/* * ref count of the found device is incremented. * ref count of from-device is decremented.
*/ struct omap_dss_device *omap_dss_get_next_device(struct omap_dss_device *from)
{ struct list_head *l; struct omap_dss_device *dssdev;
mutex_lock(&panel_list_mutex);
if (list_empty(&panel_list)) {
dssdev = NULL; goto out;
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.