OSDN Git Service

drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc
authorSwati Sharma <swati2.sharma@intel.com>
Mon, 4 Mar 2019 11:56:33 +0000 (17:26 +0530)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 5 Mar 2019 11:47:54 +0000 (12:47 +0100)
commit50bf5d7d595fd0705ef3785f80e679b6da501e5b
treee185af78447c5f56baab444ddf6f667b94ae3e09
parent095b1d0706b9eb8791523d0d366e554bd954da0b
drm: Add Y2xx and Y4xx (xx:10/12/16) format definitions and fourcc

The following pixel formats are packed format that follows 4:2:2
chroma sampling. For memory represenation each component is
allocated 16 bits each. Thus each pixel occupies 32bit.

Y210: For each component, valid data occupies MSB 10 bits.
LSB 6 bits are filled with zeroes.
Y212: For each component, valid data occupies MSB 12 bits.
LSB 4 bits are filled with zeroes.
Y216: For each component valid data occupies 16 bits,
doesn't require any padding bits.

First 16 bits stores the Y value and the next 16 bits stores one
of the chroma samples alternatively. The first luma sample will
be accompanied by first U sample and second luma sample is
accompanied by the first V sample.

The following pixel formats are packed format that follows 4:4:4
chroma sampling. Channels are arranged in the order UYVA in
increasing memory order.

Y410: Each color component occupies 10 bits and X component
takes 2 bits, thus each pixel occupies 32 bits.
Y412:   Each color component is 16 bits where valid data
occupies MSB 12 bits. LSB 4 bits are filled with zeroes.
Thus, each pixel occupies 64 bits.
Y416:   Each color component occupies 16 bits for valid data,
doesn't require any padding bits. Thus, each pixel
occupies 64 bits.

v3: fixed missing tab for XYUV8888 (JP)

Signed-off-by: Swati Sharma <swati2.sharma@intel.com>
Signed-off-by: Vidya Srinivas <vidya.srinivas@intel.com>
Reviewed-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1551700595-21481-5-git-send-email-swati2.sharma@intel.com
drivers/gpu/drm/drm_fourcc.c
include/uapi/drm/drm_fourcc.h