drm/msm/sde: add tp10 compressed format support
Add MOD_QCOM_TIGHT modifier on top of DRM_FORMAT_NV12 base pixel format and update plane size calculation to support compressed tp10 buffers. Change-Id: I12eb9fecfd34d488eda92f6217b6ca51e466c6f6 Signed-off-by: Alexander Beykun <abeykun@codeaurora.org>
This commit is contained in:
parent
be55dab201
commit
bedc84f4f8
2 changed files with 23 additions and 0 deletions
|
@ -467,6 +467,14 @@ static const struct sde_format sde_format_map_p010_ubwc[] = {
|
|||
SDE_FETCH_UBWC, 4),
|
||||
};
|
||||
|
||||
static const struct sde_format sde_format_map_tp10_ubwc[] = {
|
||||
PSEUDO_YUV_FMT(NV12,
|
||||
0, COLOR_8BIT, COLOR_8BIT, COLOR_8BIT,
|
||||
C1_B_Cb, C2_R_Cr,
|
||||
SDE_CHROMA_420, (SDE_FORMAT_FLAG_YUV | SDE_FORMAT_FLAG_DX),
|
||||
SDE_FETCH_UBWC, 4),
|
||||
};
|
||||
|
||||
/* _sde_get_v_h_subsample_rate - Get subsample rates for all formats we support
|
||||
* Note: Not using the drm_format_*_subsampling since we have formats
|
||||
*/
|
||||
|
@ -987,6 +995,13 @@ const struct sde_format *sde_get_sde_format_ext(
|
|||
map_size = ARRAY_SIZE(sde_format_map_p010_ubwc);
|
||||
DBG("found fmt 0x%X DRM_FORMAT_MOD_QCOM_COMPRESSED/DX", format);
|
||||
break;
|
||||
case (DRM_FORMAT_MOD_QCOM_DX | DRM_FORMAT_MOD_QCOM_COMPRESSED |
|
||||
DRM_FORMAT_MOD_QCOM_TIGHT):
|
||||
map = sde_format_map_tp10_ubwc;
|
||||
map_size = ARRAY_SIZE(sde_format_map_tp10_ubwc);
|
||||
DBG("found fmt 0x%X DRM_FORMAT_MOD_QCOM_COMPRESSED/DX/TIGHT",
|
||||
format);
|
||||
break;
|
||||
default:
|
||||
DRM_ERROR("unsupported format modifier %llX\n", mod0);
|
||||
return NULL;
|
||||
|
|
|
@ -249,6 +249,14 @@ extern "C" {
|
|||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_DX fourcc_mod_code(QCOM, 0x2)
|
||||
|
||||
/*
|
||||
* QTI Tight Format
|
||||
*
|
||||
* Refers to a tightly packed variant of the base format.
|
||||
* Implementation may be platform and base-format specific.
|
||||
*/
|
||||
#define DRM_FORMAT_MOD_QCOM_TIGHT fourcc_mod_code(QCOM, 0x4)
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Reference in a new issue