diff options
author | shengyang.chen <shengyang.chen@starfivetech.com> | 2023-06-12 10:31:38 +0300 |
---|---|---|
committer | Hal Feng <hal.feng@starfivetech.com> | 2024-03-05 10:18:30 +0300 |
commit | c8bc7c051d9fa14bd31c2fa76e0dafdad5b9cc09 (patch) | |
tree | 4b36f4725542ffe8e86e74a30fc66cee9ce731a0 /include/uapi | |
parent | dce2b71254a8b75d9b8531019637947b8564b01b (diff) | |
download | linux-c8bc7c051d9fa14bd31c2fa76e0dafdad5b9cc09.tar.xz |
vout: starfive: Add driver for the StarFive JH7110 display subsystem
Add driver for the StarFive JH7110 display subsystem
Signed-off-by: Shengyang Chen <shengyang.chen@starfivetech.com>
Signed-off-by: Hal Feng <hal.feng@starfivetech.com>
Diffstat (limited to 'include/uapi')
-rw-r--r-- | include/uapi/drm/drm_fourcc.h | 83 | ||||
-rw-r--r-- | include/uapi/drm/vs_drm.h | 50 |
2 files changed, 133 insertions, 0 deletions
diff --git a/include/uapi/drm/drm_fourcc.h b/include/uapi/drm/drm_fourcc.h index 8db7fd3f743e..4c2a5c8f2ceb 100644 --- a/include/uapi/drm/drm_fourcc.h +++ b/include/uapi/drm/drm_fourcc.h @@ -419,6 +419,7 @@ extern "C" { #define DRM_FORMAT_MOD_VENDOR_ARM 0x08 #define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09 #define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a +#define DRM_FORMAT_MOD_VENDOR_VS 0x0b /* add more to the end as needed */ @@ -1562,6 +1563,88 @@ drm_fourcc_canonicalize_nvidia_format_mod(__u64 modifier) #define AMD_FMT_MOD_CLEAR(field) \ (~((__u64)AMD_FMT_MOD_##field##_MASK << AMD_FMT_MOD_##field##_SHIFT)) + +#define DRM_FORMAT_MOD_VS_TYPE_NORMAL 0x00 +#define DRM_FORMAT_MOD_VS_TYPE_COMPRESSED 0x01 +#define DRM_FORMAT_MOD_VS_TYPE_CUSTOM_10BIT 0x02 +#define DRM_FORMAT_MOD_VS_TYPE_MASK ((__u64)0x3 << 54) + +#define fourcc_mod_vs_code(type, val) \ + fourcc_mod_code(VS, ((((__u64)type) << 54) | (val))) + +#define DRM_FORMAT_MOD_VS_DEC_TILE_MODE_MASK 0x3F +#define DRM_FORMAT_MOD_VS_DEC_TILE_8X8_XMAJOR 0x00 +#define DRM_FORMAT_MOD_VS_DEC_TILE_8X8_YMAJOR 0x01 +#define DRM_FORMAT_MOD_VS_DEC_TILE_16X4 0x02 +#define DRM_FORMAT_MOD_VS_DEC_TILE_8X4 0x03 +#define DRM_FORMAT_MOD_VS_DEC_TILE_4X8 0x04 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_16X4 0x06 +#define DRM_FORMAT_MOD_VS_DEC_TILE_64X4 0x07 +#define DRM_FORMAT_MOD_VS_DEC_TILE_32X4 0x08 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_256X1 0x09 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_128X1 0x0A +#define DRM_FORMAT_MOD_VS_DEC_RASTER_64X4 0x0B +#define DRM_FORMAT_MOD_VS_DEC_RASTER_256X2 0x0C +#define DRM_FORMAT_MOD_VS_DEC_RASTER_128X2 0x0D +#define DRM_FORMAT_MOD_VS_DEC_RASTER_128X4 0x0E +#define DRM_FORMAT_MOD_VS_DEC_RASTER_64X1 0x0F +#define DRM_FORMAT_MOD_VS_DEC_TILE_16X8 0x10 +#define DRM_FORMAT_MOD_VS_DEC_TILE_8X16 0x11 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_512X1 0x12 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_32X4 0x13 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_64X2 0x14 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_32X2 0x15 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_32X1 0x16 +#define DRM_FORMAT_MOD_VS_DEC_RASTER_16X1 0x17 +#define DRM_FORMAT_MOD_VS_DEC_TILE_128X4 0x18 +#define DRM_FORMAT_MOD_VS_DEC_TILE_256X4 0x19 +#define DRM_FORMAT_MOD_VS_DEC_TILE_512X4 0x1A +#define DRM_FORMAT_MOD_VS_DEC_TILE_16X16 0x1B +#define DRM_FORMAT_MOD_VS_DEC_TILE_32X16 0x1C +#define DRM_FORMAT_MOD_VS_DEC_TILE_64X16 0x1D +#define DRM_FORMAT_MOD_VS_DEC_TILE_128X8 0x1E +#define DRM_FORMAT_MOD_VS_DEC_TILE_8X4_S 0x1F +#define DRM_FORMAT_MOD_VS_DEC_TILE_16X4_S 0x20 +#define DRM_FORMAT_MOD_VS_DEC_TILE_32X4_S 0x21 +#define DRM_FORMAT_MOD_VS_DEC_TILE_16X4_LSB 0x22 +#define DRM_FORMAT_MOD_VS_DEC_TILE_32X4_LSB 0x23 +#define DRM_FORMAT_MOD_VS_DEC_TILE_32X8 0x24 + +#define DRM_FORMAT_MOD_VS_DEC_ALIGN_32 (0x01 << 6) +#define DRM_FORMAT_MOD_VS_DEC_ALIGN_64 (0x01 << 7) + +#define fourcc_mod_vs_dec_code(tile, align) \ + fourcc_mod_vs_code(DRM_FORMAT_MOD_VS_TYPE_COMPRESSED, \ + ((tile) | (align))) + +#define DRM_FORMAT_MOD_VS_NORM_MODE_MASK 0x1F +#define DRM_FORMAT_MOD_VS_LINEAR 0x00 +#define DRM_FORMAT_MOD_VS_TILED4x4 0x01 +#define DRM_FORMAT_MOD_VS_SUPER_TILED_XMAJOR 0x02 +#define DRM_FORMAT_MOD_VS_SUPER_TILED_YMAJOR 0x03 +#define DRM_FORMAT_MOD_VS_TILE_8X8 0x04 +#define DRM_FORMAT_MOD_VS_TILE_MODE1 0x05 +#define DRM_FORMAT_MOD_VS_TILE_MODE2 0x06 +#define DRM_FORMAT_MOD_VS_TILE_8X4 0x07 +#define DRM_FORMAT_MOD_VS_TILE_MODE4 0x08 +#define DRM_FORMAT_MOD_VS_TILE_MODE5 0x09 +#define DRM_FORMAT_MOD_VS_TILE_MODE6 0x0A +#define DRM_FORMAT_MOD_VS_SUPER_TILED_XMAJOR_8X4 0x0B +#define DRM_FORMAT_MOD_VS_SUPER_TILED_YMAJOR_4X8 0x0C +#define DRM_FORMAT_MOD_VS_TILE_Y 0x0D +#define DRM_FORMAT_MOD_VS_TILE_128X1 0x0F +#define DRM_FORMAT_MOD_VS_TILE_256X1 0x10 +#define DRM_FORMAT_MOD_VS_TILE_32X1 0x11 +#define DRM_FORMAT_MOD_VS_TILE_64X1 0x12 +#define DRM_FORMAT_MOD_VS_TILE_MODE4X4 0x15 + +#define fourcc_mod_vs_norm_code(tile) \ + fourcc_mod_vs_code(DRM_FORMAT_MOD_VS_TYPE_NORMAL, \ + (tile)) + +#define fourcc_mod_vs_custom_code(tile) \ + fourcc_mod_vs_code(DRM_FORMAT_MOD_VS_TYPE_CUSTOM_10BIT, \ + (tile)) #if defined(__cplusplus) } #endif diff --git a/include/uapi/drm/vs_drm.h b/include/uapi/drm/vs_drm.h new file mode 100644 index 000000000000..a66458beecf7 --- /dev/null +++ b/include/uapi/drm/vs_drm.h @@ -0,0 +1,50 @@ +/* SPDX-License-Identifier: GPL-2.0+ WITH Linux-syscall-note */ +/* + * Copyright (C) 2020 VeriSilicon Holdings Co., Ltd. + */ + +#ifndef __VS_DRM_H__ +#define __VS_DRM_H__ + +#include "drm.h" + +enum drm_vs_degamma_mode { + VS_DEGAMMA_DISABLE = 0, + VS_DEGAMMA_BT709 = 1, + VS_DEGAMMA_BT2020 = 2, +}; + +enum drm_vs_sync_dc_mode { + VS_SINGLE_DC = 0, + VS_MULTI_DC_PRIMARY = 1, + VS_MULTI_DC_SECONDARY = 2, +}; + +enum drm_vs_mmu_prefetch_mode { + VS_MMU_PREFETCH_DISABLE = 0, + VS_MMU_PREFETCH_ENABLE = 1, +}; + +struct drm_vs_watermark { + __u32 watermark; + __u8 qos_low; + __u8 qos_high; +}; + +struct drm_vs_color_mgmt { + __u32 colorkey; + __u32 colorkey_high; + __u32 clear_value; + bool clear_enable; + bool transparency; +}; + +struct drm_vs_roi { + bool enable; + __u16 roi_x; + __u16 roi_y; + __u16 roi_w; + __u16 roi_h; +}; + +#endif /* __VS_DRM_H__ */ |