linux/drivers/gpu/drm/udl/udl_proto.h

/* SPDX-License-Identifier: GPL-2.0-only */

#ifndef UDL_PROTO_H
#define UDL_PROTO_H

#include <linux/bits.h>

#define UDL_MSG_BULK

/* Register access */
#define UDL_CMD_WRITEREG

/* Framebuffer access */
#define UDL_CMD_WRITERAW8
#define UDL_CMD_WRITERL8
#define UDL_CMD_WRITECOPY8
#define UDL_CMD_WRITERLX8
#define UDL_CMD_WRITERAW16
#define UDL_CMD_WRITERL16
#define UDL_CMD_WRITECOPY16
#define UDL_CMD_WRITERLX16

/* Color depth */
#define UDL_REG_COLORDEPTH
#define UDL_COLORDEPTH_16BPP
#define UDL_COLORDEPTH_24BPP

/* Display-mode settings */
#define UDL_REG_XDISPLAYSTART
#define UDL_REG_XDISPLAYEND
#define UDL_REG_YDISPLAYSTART
#define UDL_REG_YDISPLAYEND
#define UDL_REG_XENDCOUNT
#define UDL_REG_HSYNCSTART
#define UDL_REG_HSYNCEND
#define UDL_REG_HPIXELS
#define UDL_REG_YENDCOUNT
#define UDL_REG_VSYNCSTART
#define UDL_REG_VSYNCEND
#define UDL_REG_VPIXELS
#define UDL_REG_PIXELCLOCK5KHZ

/* On/Off for driving the DisplayLink framebuffer to the display */
#define UDL_REG_BLANKMODE
#define UDL_BLANKMODE_ON
#define UDL_BLANKMODE_BLANKED
#define UDL_BLANKMODE_VSYNC_OFF
#define UDL_BLANKMODE_HSYNC_OFF
#define UDL_BLANKMODE_POWERDOWN

/* Framebuffer address */
#define UDL_REG_BASE16BPP_ADDR2
#define UDL_REG_BASE16BPP_ADDR1
#define UDL_REG_BASE16BPP_ADDR0
#define UDL_REG_BASE8BPP_ADDR2
#define UDL_REG_BASE8BPP_ADDR1
#define UDL_REG_BASE8BPP_ADDR0

#define UDL_BASE_ADDR0_MASK
#define UDL_BASE_ADDR1_MASK
#define UDL_BASE_ADDR2_MASK

/* Lock/unlock video registers */
#define UDL_REG_VIDREG
#define UDL_VIDREG_LOCK
#define UDL_VIDREG_UNLOCK

#endif