gpu: nvgpu: Add flag checking for ZCULL code

Add NVGPU_GRAPHICS flag checking for ZCULL specific codes.
Define NVGPU_GRAPHICS flag for ZCULL support.
This flag is disabled for safety build now.

Jira NVGPU-3550

Change-Id: Ifd571a5e64e8fb2dfe02a87458a2986681900a6b
Signed-off-by: Vinod G <vinodg@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127515
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Vinod G
2019-05-29 16:14:30 -07:00
committed by mobile promotions
parent 05ed37ae3a
commit 61fb688f1a
31 changed files with 165 additions and 62 deletions

View File

@@ -760,6 +760,7 @@ notif_clean_up:
return ret;
}
#ifdef NVGPU_GRAPHICS
static int gk20a_channel_zcull_bind(struct nvgpu_channel *ch,
struct nvgpu_zcull_bind_args *args)
{
@@ -770,6 +771,7 @@ static int gk20a_channel_zcull_bind(struct nvgpu_channel *ch,
return g->ops.gr.setup.bind_ctxsw_zcull(g, ch,
args->gpu_va, args->mode);
}
#endif
static int gk20a_ioctl_channel_submit_gpfifo(
struct nvgpu_channel *ch,
@@ -1226,6 +1228,7 @@ long gk20a_channel_ioctl(struct file *filp,
gk20a_idle(ch->g);
break;
#ifdef NVGPU_GRAPHICS
case NVGPU_IOCTL_CHANNEL_ZCULL_BIND:
err = gk20a_busy(ch->g);
if (err) {
@@ -1238,6 +1241,7 @@ long gk20a_channel_ioctl(struct file *filp,
(struct nvgpu_zcull_bind_args *)buf);
gk20a_idle(ch->g);
break;
#endif
case NVGPU_IOCTL_CHANNEL_SET_ERROR_NOTIFIER:
err = gk20a_busy(ch->g);
if (err) {