msm: drm: sde: Add support for FP16 via AHB programming

Introduce support for the FP16 format and FP16 color processing
blocks. This includes support for FP16, FP16 UBWC, and inline
rotation on tiled FP16 pixel data.

Change-Id: I06a70cab5447140598682f687129d4f8662524b2
Signed-off-by: Christopher Braga <cbraga@codeaurora.org>
This commit is contained in:
Christopher Braga
2020-07-13 19:59:50 -04:00
committed by Gerrit - the friendly Code Review server
parent 5eb49ef15d
commit 9a5a42c453
15 changed files with 850 additions and 114 deletions

View File

@@ -1,6 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
/*
* Copyright (c) 2017-2020, The Linux Foundation. All rights reserved.
* Copyright (c) 2017-2021, The Linux Foundation. All rights reserved.
*/
#ifndef _MSM_DRM_PP_H_
@@ -683,4 +683,40 @@ struct drm_msm_rc_mask_cfg {
__u64 cfg_param_09[RC_DATA_SIZE_MAX];
};
#define FP16_SUPPORTED
#define FP16_GC_FLAG_ALPHA_EN (1 << 0)
/* FP16 GC mode options */
#define FP16_GC_MODE_INVALID 0
#define FP16_GC_MODE_SRGB 1
#define FP16_GC_MODE_PQ 2
/**
* struct drm_msm_fp16_gc - FP16 GC configuration structure
* @in flags - Settings flags for FP16 GC
* @in mode - Gamma correction mode to use for FP16 GC
*/
struct drm_msm_fp16_gc {
__u64 flags;
__u64 mode;
};
/**
* struct drm_msm_fp16_csc - FP16 CSC configuration structure
* @in flags - Settings flags for FP16 CSC. Currently unused
* @in cfg_param_0_len - Length of data for cfg_param_0
* @in cfg_param_0 - Data for param 0. Max size is FP16_CSC_CFG0_PARAM_LEN
* @in cfg_param_1_len - Length of data for cfg_param_1
* @in cfg_param_1 - Data for param 1. Max size is FP16_CSC_CFG1_PARAM_LEN
*/
#define FP16_CSC_CFG0_PARAM_LEN 12
#define FP16_CSC_CFG1_PARAM_LEN 8
struct drm_msm_fp16_csc {
__u64 flags;
__u32 cfg_param_0_len;
__u32 cfg_param_0[FP16_CSC_CFG0_PARAM_LEN];
__u32 cfg_param_1_len;
__u32 cfg_param_1[FP16_CSC_CFG1_PARAM_LEN];
};
#endif /* _MSM_DRM_PP_H_ */