gpu: nvgpu: add internal CONFIG_SYNC wrapper

The sync file support in Linux has been stabilized and the new config is
called CONFIG_SYNC_FILE. Even if maybe not so intended, both the
stabilized version and the legacy CONFIG_SYNC can coexist; to begin with
supporting the stabilized version, add CONFIG_NVGPU_SYNCFD_ANDROID and
CONFIG_NVGPU_SYNCFD_NONE as choice configs of which one will be set. A
later patch will extend this with a choice for CONFIG_SYNC_FILE.

Jira NVGPU-5353

Change-Id: I67582b68d700b16c46e1cd090f1b938067a364e3
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2336118
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2020-05-04 10:04:39 +03:00
committed by Alex Waterman
parent 068e00749b
commit e5b23f33b9
13 changed files with 84 additions and 43 deletions

View File

@@ -291,7 +291,7 @@ static int nvgpu_channel_alloc_linux(struct gk20a *g, struct nvgpu_channel *ch)
ch->os_priv = priv;
priv->ch = ch;
#ifdef CONFIG_SYNC
#ifndef CONFIG_NVGPU_SYNCFD_NONE
ch->has_os_fence_framework_support = true;
#endif
@@ -311,7 +311,7 @@ static void nvgpu_channel_free_linux(struct gk20a *g, struct nvgpu_channel *ch)
ch->os_priv = NULL;
#ifdef CONFIG_SYNC
#ifndef CONFIG_NVGPU_SYNCFD_NONE
ch->has_os_fence_framework_support = false;
#endif
}