mirror of
https://github.com/torvalds/linux.git
synced 2026-07-29 18:51:21 +02:00
drm/msm/dpu: Add support for P010 format
Add support for P010 color format. This adds support for both linear and compressed formats. Signed-off-by: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Patchwork: https://patchwork.freedesktop.org/patch/500822/ Link: https://lore.kernel.org/r/20220901203422.217-3-quic_jesszhan@quicinc.com Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
This commit is contained in:
parent
da7716a249
commit
f07c9946cc
|
|
@ -434,6 +434,12 @@ static const struct dpu_format dpu_format_map[] = {
|
|||
DPU_CHROMA_H2V1, DPU_FORMAT_FLAG_YUV,
|
||||
DPU_FETCH_LINEAR, 2),
|
||||
|
||||
PSEUDO_YUV_FMT_LOOSE(P010,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C1_B_Cb, C2_R_Cr,
|
||||
DPU_CHROMA_420, DPU_FORMAT_FLAG_DX | DPU_FORMAT_FLAG_YUV,
|
||||
DPU_FETCH_LINEAR, 2),
|
||||
|
||||
INTERLEAVED_YUV_FMT(VYUY,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C2_R_Cr, C0_G_Y, C1_B_Cb, C0_G_Y,
|
||||
|
|
@ -536,6 +542,14 @@ static const struct dpu_format dpu_format_map_ubwc[] = {
|
|||
DPU_CHROMA_420, DPU_FORMAT_FLAG_YUV |
|
||||
DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 4, DPU_TILE_HEIGHT_NV12),
|
||||
|
||||
PSEUDO_YUV_FMT_TILED(P010,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C1_B_Cb, C2_R_Cr,
|
||||
DPU_CHROMA_420, DPU_FORMAT_FLAG_DX |
|
||||
DPU_FORMAT_FLAG_YUV |
|
||||
DPU_FORMAT_FLAG_COMPRESSED,
|
||||
DPU_FETCH_UBWC, 4, DPU_TILE_HEIGHT_UBWC),
|
||||
};
|
||||
|
||||
/* _dpu_get_v_h_subsample_rate - Get subsample rates for all formats we support
|
||||
|
|
@ -584,7 +598,8 @@ static int _dpu_format_get_media_color_ubwc(const struct dpu_format *fmt)
|
|||
int color_fmt = -1;
|
||||
int i;
|
||||
|
||||
if (fmt->base.pixel_format == DRM_FORMAT_NV12) {
|
||||
if (fmt->base.pixel_format == DRM_FORMAT_NV12 ||
|
||||
fmt->base.pixel_format == DRM_FORMAT_P010) {
|
||||
if (DPU_FORMAT_IS_DX(fmt)) {
|
||||
if (fmt->unpack_tight)
|
||||
color_fmt = COLOR_FMT_NV12_BPP10_UBWC;
|
||||
|
|
|
|||
|
|
@ -210,6 +210,7 @@ static const uint32_t plane_formats_yuv[] = {
|
|||
DRM_FORMAT_RGBX4444,
|
||||
DRM_FORMAT_BGRX4444,
|
||||
|
||||
DRM_FORMAT_P010,
|
||||
DRM_FORMAT_NV12,
|
||||
DRM_FORMAT_NV21,
|
||||
DRM_FORMAT_NV16,
|
||||
|
|
|
|||
|
|
@ -73,6 +73,7 @@ static const uint32_t qcom_compressed_supported_formats[] = {
|
|||
DRM_FORMAT_BGR565,
|
||||
|
||||
DRM_FORMAT_NV12,
|
||||
DRM_FORMAT_P010,
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user