Lines Matching +full:display +full:- +full:timings

1 // SPDX-License-Identifier: GPL-2.0-only
3 * linux/drivers/video/omap2/dss/display.c
12 #define DSS_SUBSYS_NAME "DISPLAY"
27 *xres = dssdev->panel.timings.x_res; in omapdss_default_get_resolution()
28 *yres = dssdev->panel.timings.y_res; in omapdss_default_get_resolution()
34 switch (dssdev->type) { in omapdss_default_get_recommended_bpp()
36 if (dssdev->phy.dpi.data_lines == 24) in omapdss_default_get_recommended_bpp()
42 if (dssdev->ctrl.pixel_size == 24) in omapdss_default_get_recommended_bpp()
47 if (dsi_get_pixel_size(dssdev->panel.dsi_pix_fmt) > 16) in omapdss_default_get_recommended_bpp()
64 struct omap_video_timings *timings) in omapdss_default_get_timings() argument
66 *timings = dssdev->panel.timings; in omapdss_default_get_timings()
75 if (!dssdev->driver) in dss_suspend_all_devices()
78 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) { in dss_suspend_all_devices()
79 dssdev->driver->disable(dssdev); in dss_suspend_all_devices()
80 dssdev->activate_after_resume = true; in dss_suspend_all_devices()
82 dssdev->activate_after_resume = false; in dss_suspend_all_devices()
94 if (!dssdev->driver) in dss_resume_all_devices()
97 if (dssdev->activate_after_resume) { in dss_resume_all_devices()
98 dssdev->driver->enable(dssdev); in dss_resume_all_devices()
99 dssdev->activate_after_resume = false; in dss_resume_all_devices()
111 if (!dssdev->driver) in dss_disable_all_devices()
114 if (dssdev->state == OMAP_DSS_DISPLAY_ACTIVE) in dss_disable_all_devices()
115 dssdev->driver->disable(dssdev); in dss_disable_all_devices()
125 struct omap_dss_driver *drv = dssdev->driver; in omapdss_register_display()
129 * Note: this presumes all the displays are either using DT or non-DT, in omapdss_register_display()
134 if (dssdev->dev->of_node) { in omapdss_register_display()
135 id = of_alias_get_id(dssdev->dev->of_node, "display"); in omapdss_register_display()
143 snprintf(dssdev->alias, sizeof(dssdev->alias), "display%d", id); in omapdss_register_display()
146 if (dssdev->dev->of_node) in omapdss_register_display()
147 of_property_read_string(dssdev->dev->of_node, "label", in omapdss_register_display()
148 &dssdev->name); in omapdss_register_display()
150 if (dssdev->name == NULL) in omapdss_register_display()
151 dssdev->name = dssdev->alias; in omapdss_register_display()
153 if (drv && drv->get_resolution == NULL) in omapdss_register_display()
154 drv->get_resolution = omapdss_default_get_resolution; in omapdss_register_display()
155 if (drv && drv->get_recommended_bpp == NULL) in omapdss_register_display()
156 drv->get_recommended_bpp = omapdss_default_get_recommended_bpp; in omapdss_register_display()
157 if (drv && drv->get_timings == NULL) in omapdss_register_display()
158 drv->get_timings = omapdss_default_get_timings; in omapdss_register_display()
161 list_add_tail(&dssdev->panel_list, &panel_list); in omapdss_register_display()
170 list_del(&dssdev->panel_list); in omapdss_unregister_display()
177 if (!try_module_get(dssdev->owner)) in omap_dss_get_device()
180 if (get_device(dssdev->dev) == NULL) { in omap_dss_get_device()
181 module_put(dssdev->owner); in omap_dss_get_device()
191 put_device(dssdev->dev); in omap_dss_put_device()
192 module_put(dssdev->owner); in omap_dss_put_device()
198 * ref count of from-device is decremented.
229 dssdev = list_entry(l->next, struct omap_dss_device, in omap_dss_get_next_device()
264 ovt->pixelclock = vm->pixelclock; in videomode_to_omap_video_timings()
265 ovt->x_res = vm->hactive; in videomode_to_omap_video_timings()
266 ovt->hbp = vm->hback_porch; in videomode_to_omap_video_timings()
267 ovt->hfp = vm->hfront_porch; in videomode_to_omap_video_timings()
268 ovt->hsw = vm->hsync_len; in videomode_to_omap_video_timings()
269 ovt->y_res = vm->vactive; in videomode_to_omap_video_timings()
270 ovt->vbp = vm->vback_porch; in videomode_to_omap_video_timings()
271 ovt->vfp = vm->vfront_porch; in videomode_to_omap_video_timings()
272 ovt->vsw = vm->vsync_len; in videomode_to_omap_video_timings()
274 ovt->vsync_level = vm->flags & DISPLAY_FLAGS_VSYNC_HIGH ? in videomode_to_omap_video_timings()
277 ovt->hsync_level = vm->flags & DISPLAY_FLAGS_HSYNC_HIGH ? in videomode_to_omap_video_timings()
280 ovt->de_level = vm->flags & DISPLAY_FLAGS_DE_HIGH ? in videomode_to_omap_video_timings()
283 ovt->data_pclk_edge = vm->flags & DISPLAY_FLAGS_PIXDATA_POSEDGE ? in videomode_to_omap_video_timings()
287 ovt->sync_pclk_edge = ovt->data_pclk_edge; in videomode_to_omap_video_timings()
296 vm->pixelclock = ovt->pixelclock; in omap_video_timings_to_videomode()
298 vm->hactive = ovt->x_res; in omap_video_timings_to_videomode()
299 vm->hback_porch = ovt->hbp; in omap_video_timings_to_videomode()
300 vm->hfront_porch = ovt->hfp; in omap_video_timings_to_videomode()
301 vm->hsync_len = ovt->hsw; in omap_video_timings_to_videomode()
302 vm->vactive = ovt->y_res; in omap_video_timings_to_videomode()
303 vm->vback_porch = ovt->vbp; in omap_video_timings_to_videomode()
304 vm->vfront_porch = ovt->vfp; in omap_video_timings_to_videomode()
305 vm->vsync_len = ovt->vsw; in omap_video_timings_to_videomode()
307 if (ovt->hsync_level == OMAPDSS_SIG_ACTIVE_HIGH) in omap_video_timings_to_videomode()
308 vm->flags |= DISPLAY_FLAGS_HSYNC_HIGH; in omap_video_timings_to_videomode()
310 vm->flags |= DISPLAY_FLAGS_HSYNC_LOW; in omap_video_timings_to_videomode()
312 if (ovt->vsync_level == OMAPDSS_SIG_ACTIVE_HIGH) in omap_video_timings_to_videomode()
313 vm->flags |= DISPLAY_FLAGS_VSYNC_HIGH; in omap_video_timings_to_videomode()
315 vm->flags |= DISPLAY_FLAGS_VSYNC_LOW; in omap_video_timings_to_videomode()
317 if (ovt->de_level == OMAPDSS_SIG_ACTIVE_HIGH) in omap_video_timings_to_videomode()
318 vm->flags |= DISPLAY_FLAGS_DE_HIGH; in omap_video_timings_to_videomode()
320 vm->flags |= DISPLAY_FLAGS_DE_LOW; in omap_video_timings_to_videomode()
322 if (ovt->data_pclk_edge == OMAPDSS_DRIVE_SIG_RISING_EDGE) in omap_video_timings_to_videomode()
323 vm->flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE; in omap_video_timings_to_videomode()
325 vm->flags |= DISPLAY_FLAGS_PIXDATA_NEGEDGE; in omap_video_timings_to_videomode()