History

drm/arm/malidp: Add modifier definitions for describing Arm Framebuffer Compression (AFBC).

AFBC is a proprietary lossless image compression protocol and format. It provides fine-grained random access and minimizes the amount of data transferred between IP blocks. AFBC has several features which may be supported and/or used, which are represented using bits in the modifier. Not all combinations are valid, and different devices or use-cases may support different combinations. Changes from v2:- - Added ack by Maarten Lankhorst

Ayan Kumar Halder committed 8 years ago

Commit ce605801 parent 90a460d1 file · +83 −0Browse files

Unified · Split

include/uapi/drm/drm_fourcc.h+83−0
@@ -183,6 +183,7 @@ extern "C" { · 182 unmodified lines
183#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05183#define DRM_FORMAT_MOD_VENDOR_QCOM 0x05
184#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06184#define DRM_FORMAT_MOD_VENDOR_VIVANTE 0x06
185#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07185#define DRM_FORMAT_MOD_VENDOR_BROADCOM 0x07
186#define DRM_FORMAT_MOD_VENDOR_ARM 0x08
186/* add more to the end as needed */187/* add more to the end as needed */
187 188
188#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)189#define DRM_FORMAT_RESERVED ((1ULL << 56) - 1)
@@ -485,6 +486,88 @@ extern "C" { · 296 unmodified lines
485 */486 */
486#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6)487#define DRM_FORMAT_MOD_BROADCOM_UIF fourcc_mod_code(BROADCOM, 6)
487 488
489/*
490 * Arm Framebuffer Compression (AFBC) modifiers
491 *
492 * AFBC is a proprietary lossless image compression protocol and format.
493 * It provides fine-grained random access and minimizes the amount of data
494 * transferred between IP blocks.
495 *
496 * AFBC has several features which may be supported and/or used, which are
497 * represented using bits in the modifier. Not all combinations are valid,
498 * and different devices or use-cases may support different combinations.
499 */
500#define DRM_FORMAT_MOD_ARM_AFBC(__afbc_mode) fourcc_mod_code(ARM, __afbc_mode)
501
502/*
503 * AFBC superblock size
504 *
505 * Indicates the superblock size(s) used for the AFBC buffer. The buffer
506 * size (in pixels) must be aligned to a multiple of the superblock size.
507 * Four lowest significant bits(LSBs) are reserved for block size.
508 */
509#define AFBC_FORMAT_MOD_BLOCK_SIZE_MASK 0xf
510#define AFBC_FORMAT_MOD_BLOCK_SIZE_16x16 (1ULL)
511#define AFBC_FORMAT_MOD_BLOCK_SIZE_32x8 (2ULL)
512
513/*
514 * AFBC lossless colorspace transform
515 *
516 * Indicates that the buffer makes use of the AFBC lossless colorspace
517 * transform.
518 */
519#define AFBC_FORMAT_MOD_YTR (1ULL << 4)
520
521/*
522 * AFBC block-split
523 *
524 * Indicates that the payload of each superblock is split. The second
525 * half of the payload is positioned at a predefined offset from the start
526 * of the superblock payload.
527 */
528#define AFBC_FORMAT_MOD_SPLIT (1ULL << 5)
529
530/*
531 * AFBC sparse layout
532 *
533 * This flag indicates that the payload of each superblock must be stored at a
534 * predefined position relative to the other superblocks in the same AFBC
535 * buffer. This order is the same order used by the header buffer. In this mode
536 * each superblock is given the same amount of space as an uncompressed
537 * superblock of the particular format would require, rounding up to the next
538 * multiple of 128 bytes in size.
539 */
540#define AFBC_FORMAT_MOD_SPARSE (1ULL << 6)
541
542/*
543 * AFBC copy-block restrict
544 *
545 * Buffers with this flag must obey the copy-block restriction. The restriction
546 * is such that there are no copy-blocks referring across the border of 8x8
547 * blocks. For the subsampled data the 8x8 limitation is also subsampled.
548 */
549#define AFBC_FORMAT_MOD_CBR (1ULL << 7)
550
551/*
552 * AFBC tiled layout
553 *
554 * The tiled layout groups superblocks in 8x8 or 4x4 tiles, where all
555 * superblocks inside a tile are stored together in memory. 8x8 tiles are used
556 * for pixel formats up to and including 32 bpp while 4x4 tiles are used for
557 * larger bpp formats. The order between the tiles is scan line.
558 * When the tiled layout is used, the buffer size (in pixels) must be aligned
559 * to the tile size.
560 */
561#define AFBC_FORMAT_MOD_TILED (1ULL << 8)
562
563/*
564 * AFBC solid color blocks
565 *
566 * Indicates that the buffer makes use of solid-color blocks, whereby bandwidth
567 * can be reduced if a whole superblock is a single color.
568 */
569#define AFBC_FORMAT_MOD_SC (1ULL << 9)
570
488#if defined(__cplusplus)571#if defined(__cplusplus)
489}572}
490#endif573#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t