xref: /openbmc/linux/drivers/gpu/drm/udl/udl_proto.h (revision ed24ed48)
1ff76e82cSThomas Zimmermann /* SPDX-License-Identifier: GPL-2.0-only */
2ff76e82cSThomas Zimmermann 
3ff76e82cSThomas Zimmermann #ifndef UDL_PROTO_H
4ff76e82cSThomas Zimmermann #define UDL_PROTO_H
5ff76e82cSThomas Zimmermann 
6*ed24ed48SThomas Zimmermann /* Color depth */
7*ed24ed48SThomas Zimmermann #define UDL_REG_COLORDEPTH		0x00
8ff76e82cSThomas Zimmermann #define UDL_COLORDEPTH_16BPP		0
9*ed24ed48SThomas Zimmermann #define UDL_COLORDEPTH_24BPP		1
10ff76e82cSThomas Zimmermann 
119869e40dSThomas Zimmermann /* Display-mode settings */
129869e40dSThomas Zimmermann #define UDL_REG_XDISPLAYSTART		0x01
139869e40dSThomas Zimmermann #define UDL_REG_XDISPLAYEND		0x03
149869e40dSThomas Zimmermann #define UDL_REG_YDISPLAYSTART		0x05
159869e40dSThomas Zimmermann #define UDL_REG_YDISPLAYEND		0x07
169869e40dSThomas Zimmermann #define UDL_REG_XENDCOUNT		0x09
179869e40dSThomas Zimmermann #define UDL_REG_HSYNCSTART		0x0b
189869e40dSThomas Zimmermann #define UDL_REG_HSYNCEND		0x0d
199869e40dSThomas Zimmermann #define UDL_REG_HPIXELS			0x0f
209869e40dSThomas Zimmermann #define UDL_REG_YENDCOUNT		0x11
219869e40dSThomas Zimmermann #define UDL_REG_VSYNCSTART		0x13
229869e40dSThomas Zimmermann #define UDL_REG_VSYNCEND		0x15
239869e40dSThomas Zimmermann #define UDL_REG_VPIXELS			0x17
249869e40dSThomas Zimmermann #define UDL_REG_PIXELCLOCK5KHZ		0x1b
259869e40dSThomas Zimmermann 
26ff76e82cSThomas Zimmermann /* On/Off for driving the DisplayLink framebuffer to the display */
27ff76e82cSThomas Zimmermann #define UDL_REG_BLANKMODE		0x1f
28ff76e82cSThomas Zimmermann #define UDL_BLANKMODE_ON		0x00 /* hsync and vsync on, visible */
29ff76e82cSThomas Zimmermann #define UDL_BLANKMODE_BLANKED		0x01 /* hsync and vsync on, blanked */
30ff76e82cSThomas Zimmermann #define UDL_BLANKMODE_VSYNC_OFF		0x03 /* vsync off, blanked */
31ff76e82cSThomas Zimmermann #define UDL_BLANKMODE_HSYNC_OFF		0x05 /* hsync off, blanked */
32ff76e82cSThomas Zimmermann #define UDL_BLANKMODE_POWERDOWN		0x07 /* powered off; requires modeset */
33ff76e82cSThomas Zimmermann 
34ff76e82cSThomas Zimmermann #endif
35