mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-23 01:50:07 +03:00
gpu: nvgpu: dma_buf_ops map unavailable in upstream
This function op is deprecated after kernel version 5.5. Compile the corresponding code under version check. Bug 2925664 Change-Id: Ice1b02a3d6c7942ec63a609c515436d2622c3575 Signed-off-by: Sagar Kamble <skamble@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2326512 Reviewed-by: automaticguardword <automaticguardword@nvidia.com> Reviewed-by: Vaibhav Kachore <vkachore@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
Alex Waterman
parent
c6908922e5
commit
23d545f250
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2017-2019, NVIDIA CORPORATION. All rights reserved.
|
* Copyright (c) 2017-2020, NVIDIA CORPORATION. All rights reserved.
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or modify it
|
* This program is free software; you can redistribute it and/or modify it
|
||||||
* under the terms and conditions of the GNU General Public License,
|
* under the terms and conditions of the GNU General Public License,
|
||||||
@@ -92,11 +92,13 @@ static void gk20a_vidbuf_release(struct dma_buf *dmabuf)
|
|||||||
nvgpu_put(g);
|
nvgpu_put(g);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 5, 0)
|
||||||
static void *gk20a_vidbuf_kmap(struct dma_buf *dmabuf, unsigned long page_num)
|
static void *gk20a_vidbuf_kmap(struct dma_buf *dmabuf, unsigned long page_num)
|
||||||
{
|
{
|
||||||
WARN_ON("Not supported");
|
WARN_ON("Not supported");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 16, 0)
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 16, 0)
|
||||||
static void *gk20a_vidbuf_kmap_atomic(struct dma_buf *dmabuf,
|
static void *gk20a_vidbuf_kmap_atomic(struct dma_buf *dmabuf,
|
||||||
@@ -143,7 +145,9 @@ static const struct dma_buf_ops gk20a_vidbuf_ops = {
|
|||||||
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 16, 0)
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(4, 16, 0)
|
||||||
.map_atomic = gk20a_vidbuf_kmap_atomic,
|
.map_atomic = gk20a_vidbuf_kmap_atomic,
|
||||||
#endif
|
#endif
|
||||||
|
#if LINUX_VERSION_CODE <= KERNEL_VERSION(5, 5, 0)
|
||||||
.map = gk20a_vidbuf_kmap,
|
.map = gk20a_vidbuf_kmap,
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
.kmap_atomic = gk20a_vidbuf_kmap_atomic,
|
.kmap_atomic = gk20a_vidbuf_kmap_atomic,
|
||||||
.kmap = gk20a_vidbuf_kmap,
|
.kmap = gk20a_vidbuf_kmap,
|
||||||
|
|||||||
Reference in New Issue
Block a user