gpu: nvgpu: enable stencil zbc

The implementation already exists. This change
adds NVGPU_GR_ZBC_TYPE_STENCIL and plumbs through
the stencil value from NvRmGpuDeviceZbcAddStencil
through NVGPU_GPU_IOCTL_ZBC_SET_TABLE.

Adds cases for querying the stencil values,
enabling NvRmGpuDeviceZbcGetStencilTableEntry.

Bug 3403523
Bug 3395601

Change-Id: I42c9a2967d0433e0bb08343aabeff0fe465f231e
Signed-off-by: Pyarelal Knowles <pknowles@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2554963
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Pyarelal Knowles
2021-06-04 13:26:28 -07:00
committed by mobile promotions
parent d90c5ed371
commit 99a664bda0
4 changed files with 23 additions and 4 deletions

View File

@@ -49,22 +49,25 @@ struct nvgpu_gpu_zcull_get_info_args {
#define NVGPU_ZBC_TYPE_INVALID 0
#define NVGPU_ZBC_TYPE_COLOR 1
#define NVGPU_ZBC_TYPE_DEPTH 2
#define NVGPU_ZBC_TYPE_STENCIL 3
struct nvgpu_gpu_zbc_set_table_args {
__u32 color_ds[NVGPU_ZBC_COLOR_VALUE_SIZE];
__u32 color_l2[NVGPU_ZBC_COLOR_VALUE_SIZE];
__u32 depth;
__u32 stencil;
__u32 format;
__u32 type; /* color or depth */
__u32 type; /* color, depth or stencil */
};
struct nvgpu_gpu_zbc_query_table_args {
__u32 color_ds[NVGPU_ZBC_COLOR_VALUE_SIZE];
__u32 color_l2[NVGPU_ZBC_COLOR_VALUE_SIZE];
__u32 depth;
__u32 stencil;
__u32 ref_cnt;
__u32 format;
__u32 type; /* color or depth */
__u32 type; /* color, depth or stencil */
__u32 index_size; /* [out] size, [in] index */
};