mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 07:13:54 -06:00
linux headers: sync to 5.9-rc4
Update against Linux 5.9-rc4. Cc: Cornelia Huck <cohuck@redhat.com> Cc: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20200907104903.31551-2-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
74504514b1
commit
e6546342a8
26 changed files with 308 additions and 41 deletions
|
@ -235,6 +235,12 @@ extern "C" {
|
|||
#define DRM_FORMAT_NV61 fourcc_code('N', 'V', '6', '1') /* 2x1 subsampled Cb:Cr plane */
|
||||
#define DRM_FORMAT_NV24 fourcc_code('N', 'V', '2', '4') /* non-subsampled Cr:Cb plane */
|
||||
#define DRM_FORMAT_NV42 fourcc_code('N', 'V', '4', '2') /* non-subsampled Cb:Cr plane */
|
||||
/*
|
||||
* 2 plane YCbCr
|
||||
* index 0 = Y plane, [39:0] Y3:Y2:Y1:Y0 little endian
|
||||
* index 1 = Cr:Cb plane, [39:0] Cr1:Cb1:Cr0:Cb0 little endian
|
||||
*/
|
||||
#define DRM_FORMAT_NV15 fourcc_code('N', 'V', '1', '5') /* 2x2 subsampled Cr:Cb plane */
|
||||
|
||||
/*
|
||||
* 2 plane YCbCr MSB aligned
|
||||
|
@ -264,6 +270,22 @@ extern "C" {
|
|||
*/
|
||||
#define DRM_FORMAT_P016 fourcc_code('P', '0', '1', '6') /* 2x2 subsampled Cr:Cb plane 16 bits per channel */
|
||||
|
||||
/* 3 plane non-subsampled (444) YCbCr
|
||||
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
||||
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
||||
* index 1: Cb plane, [15:0] Cb:x [10:6] little endian
|
||||
* index 2: Cr plane, [15:0] Cr:x [10:6] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_Q410 fourcc_code('Q', '4', '1', '0')
|
||||
|
||||
/* 3 plane non-subsampled (444) YCrCb
|
||||
* 16 bits per component, but only 10 bits are used and 6 bits are padded
|
||||
* index 0: Y plane, [15:0] Y:x [10:6] little endian
|
||||
* index 1: Cr plane, [15:0] Cr:x [10:6] little endian
|
||||
* index 2: Cb plane, [15:0] Cb:x [10:6] little endian
|
||||
*/
|
||||
#define DRM_FORMAT_Q401 fourcc_code('Q', '4', '0', '1')
|
||||
|
||||
/*
|
||||
* 3 plane YCbCr
|
||||
* index 0: Y plane, [7:0] Y
|
||||
|
@ -308,6 +330,7 @@ extern "C" {
|
|||
#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
|
||||
#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
|
||||
#define DRM_FORMAT_MOD_VENDOR_ALLWINNER 0x09
|
||||
#define DRM_FORMAT_MOD_VENDOR_AMLOGIC 0x0a
|
||||
|
||||
/* add more to the end as needed */
|
||||
|
||||
|
@ -322,8 +345,33 @@ extern "C" {
|
|||
* When adding a new token please document the layout with a code comment,
|
||||
* similar to the fourcc codes above. drm_fourcc.h is considered the
|
||||
* authoritative source for all of these.
|
||||
*
|
||||
* Generic modifier names:
|
||||
*
|
||||
* DRM_FORMAT_MOD_GENERIC_* definitions are used to provide vendor-neutral names
|
||||
* for layouts which are common across multiple vendors. To preserve
|
||||
* compatibility, in cases where a vendor-specific definition already exists and
|
||||
* a generic name for it is desired, the common name is a purely symbolic alias
|
||||
* and must use the same numerical value as the original definition.
|
||||
*
|
||||
* Note that generic names should only be used for modifiers which describe
|
||||
* generic layouts (such as pixel re-ordering), which may have
|
||||
* independently-developed support across multiple vendors.
|
||||
*
|
||||
* In future cases where a generic layout is identified before merging with a
|
||||
* vendor-specific modifier, a new 'GENERIC' vendor or modifier using vendor
|
||||
* 'NONE' could be considered. This should only be for obvious, exceptional
|
||||
* cases to avoid polluting the 'GENERIC' namespace with modifiers which only
|
||||
* apply to a single vendor.
|
||||
*
|
||||
* Generic names should not be used for cases where multiple hardware vendors
|
||||
* have implementations of the same standardised compression scheme (such as
|
||||
* AFBC). In those cases, all implementations should use the same format
|
||||
* modifier(s), reflecting the vendor of the standard.
|
||||
*/
|
||||
|
||||
#define DRM_FORMAT_MOD_GENERIC_16_16_TILE DRM_FORMAT_MOD_SAMSUNG_16_16_TILE
|
||||
|
||||
/*
|
||||
* Invalid Modifier
|
||||
*
|
||||
|
@ -891,6 +939,18 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
|
|||
*/
|
||||
#define AFBC_FORMAT_MOD_BCH (1ULL << 11)
|
||||
|
||||
/* AFBC uncompressed storage mode
|
||||
*
|
||||
* Indicates that the buffer is using AFBC uncompressed storage mode.
|
||||
* In this mode all superblock payloads in the buffer use the uncompressed
|
||||
* storage mode, which is usually only used for data which cannot be compressed.
|
||||
* The buffer layout is the same as for AFBC buffers without USM set, this only
|
||||
* affects the storage mode of the individual superblocks. Note that even a
|
||||
* buffer without USM set may use uncompressed storage mode for some or all
|
||||
* superblocks, USM just guarantees it for all.
|
||||
*/
|
||||
#define AFBC_FORMAT_MOD_USM (1ULL << 12)
|
||||
|
||||
/*
|
||||
* Arm 16x16 Block U-Interleaved modifier
|
||||
*
|
||||
|
@ -915,6 +975,86 @@ drm_fourcc_canonicalize_nvidia_format_mod(uint64_t modifier)
|
|||
*/
|
||||
#define DRM_FORMAT_MOD_ALLWINNER_TILED fourcc_mod_code(ALLWINNER, 1)
|
||||
|
||||
/*
|
||||
* Amlogic Video Framebuffer Compression modifiers
|
||||
*
|
||||
* Amlogic uses a proprietary lossless image compression protocol and format
|
||||
* for their hardware video codec accelerators, either video decoders or
|
||||
* video input encoders.
|
||||
*
|
||||
* It considerably reduces memory bandwidth while writing and reading
|
||||
* frames in memory.
|
||||
*
|
||||
* The underlying storage is considered to be 3 components, 8bit or 10-bit
|
||||
* per component YCbCr 420, single plane :
|
||||
* - DRM_FORMAT_YUV420_8BIT
|
||||
* - DRM_FORMAT_YUV420_10BIT
|
||||
*
|
||||
* The first 8 bits of the mode defines the layout, then the following 8 bits
|
||||
* defines the options changing the layout.
|
||||
*
|
||||
* Not all combinations are valid, and different SoCs may support different
|
||||
* combinations of layout and options.
|
||||
*/
|
||||
#define __fourcc_mod_amlogic_layout_mask 0xf
|
||||
#define __fourcc_mod_amlogic_options_shift 8
|
||||
#define __fourcc_mod_amlogic_options_mask 0xf
|
||||
|
||||
#define DRM_FORMAT_MOD_AMLOGIC_FBC(__layout, __options) \
|
||||
fourcc_mod_code(AMLOGIC, \
|
||||
((__layout) & __fourcc_mod_amlogic_layout_mask) | \
|
||||
(((__options) & __fourcc_mod_amlogic_options_mask) \
|
||||
<< __fourcc_mod_amlogic_options_shift))
|
||||
|
||||
/* Amlogic FBC Layouts */
|
||||
|
||||
/*
|
||||
* Amlogic FBC Basic Layout
|
||||
*
|
||||
* The basic layout is composed of:
|
||||
* - a body content organized in 64x32 superblocks with 4096 bytes per
|
||||
* superblock in default mode.
|
||||
* - a 32 bytes per 128x64 header block
|
||||
*
|
||||
* This layout is transferrable between Amlogic SoCs supporting this modifier.
|
||||
*/
|
||||
#define AMLOGIC_FBC_LAYOUT_BASIC (1ULL)
|
||||
|
||||
/*
|
||||
* Amlogic FBC Scatter Memory layout
|
||||
*
|
||||
* Indicates the header contains IOMMU references to the compressed
|
||||
* frames content to optimize memory access and layout.
|
||||
*
|
||||
* In this mode, only the header memory address is needed, thus the
|
||||
* content memory organization is tied to the current producer
|
||||
* execution and cannot be saved/dumped neither transferrable between
|
||||
* Amlogic SoCs supporting this modifier.
|
||||
*
|
||||
* Due to the nature of the layout, these buffers are not expected to
|
||||
* be accessible by the user-space clients, but only accessible by the
|
||||
* hardware producers and consumers.
|
||||
*
|
||||
* The user-space clients should expect a failure while trying to mmap
|
||||
* the DMA-BUF handle returned by the producer.
|
||||
*/
|
||||
#define AMLOGIC_FBC_LAYOUT_SCATTER (2ULL)
|
||||
|
||||
/* Amlogic FBC Layout Options Bit Mask */
|
||||
|
||||
/*
|
||||
* Amlogic FBC Memory Saving mode
|
||||
*
|
||||
* Indicates the storage is packed when pixel size is multiple of word
|
||||
* boudaries, i.e. 8bit should be stored in this mode to save allocation
|
||||
* memory.
|
||||
*
|
||||
* This mode reduces body layout to 3072 bytes per 64x32 superblock with
|
||||
* the basic layout and 3200 bytes per 64x32 superblock combined with
|
||||
* the scatter layout.
|
||||
*/
|
||||
#define AMLOGIC_FBC_OPTION_MEM_SAVING (1ULL << 0)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue