Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[cris-mirror.git] / drivers / gpu / drm / stm / ltdc.h
blobedd1c0a446d1ecd9997b987b9b88047852afb92b
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3 * Copyright (C) STMicroelectronics SA 2017
5 * Authors: Philippe Cornu <philippe.cornu@st.com>
6 * Yannick Fertre <yannick.fertre@st.com>
7 * Fabien Dessenne <fabien.dessenne@st.com>
8 * Mickael Reulier <mickael.reulier@st.com>
9 */
11 #ifndef _LTDC_H_
12 #define _LTDC_H_
14 struct ltdc_caps {
15 u32 hw_version; /* hardware version */
16 u32 nb_layers; /* number of supported layers */
17 u32 reg_ofs; /* register offset for applicable regs */
18 u32 bus_width; /* bus width (32 or 64 bits) */
19 const u32 *pix_fmt_hw; /* supported pixel formats */
22 struct ltdc_device {
23 void __iomem *regs;
24 struct clk *pixel_clk; /* lcd pixel clock */
25 struct mutex err_lock; /* protecting error_status */
26 struct ltdc_caps caps;
27 u32 error_status;
28 u32 irq_status;
31 int ltdc_crtc_enable_vblank(struct drm_device *dev, unsigned int pipe);
32 void ltdc_crtc_disable_vblank(struct drm_device *dev, unsigned int pipe);
33 int ltdc_load(struct drm_device *ddev);
34 void ltdc_unload(struct drm_device *ddev);
36 #endif