gpu: nvgpu: move sync_gk20a under common/linux directory

sync_gk20a.* files are no longer used by core code and only invoked
from linux specific implementations of the OS_FENCE framework which are
under the common/linux directory. Hence, sync_gk20a.* files are also
moved under common/linux.

JIRA NVGPU-66

Change-Id: If623524611373d2da39b63cfb3c1e40089bf8d22
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1712900
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Debarshi Dutta
2018-05-11 09:18:48 +05:30
committed by mobile promotions
parent 4dac924aba
commit a51eb9da02
9 changed files with 67 additions and 83 deletions

View File

@@ -160,7 +160,7 @@ nvgpu-$(CONFIG_TEGRA_GK20A) += \
common/linux/platform_gp10b_tegra.o \
common/linux/platform_gv11b_tegra.o
nvgpu-$(CONFIG_SYNC) += gk20a/sync_gk20a.o \
nvgpu-$(CONFIG_SYNC) += common/linux/sync_sema_android.o \
common/linux/os_fence_android.o \
common/linux/os_fence_android_sema.o

View File

@@ -40,7 +40,7 @@
#include <trace/events/gk20a.h>
#include <uapi/linux/nvgpu.h>
#include "gk20a/sync_gk20a.h"
#include "sync_sema_android.h"
u32 nvgpu_submit_gpfifo_user_flags_to_common_flags(u32 user_flags)
{

View File

@@ -21,10 +21,11 @@
#include <nvgpu/linux/os_fence_android.h>
#include <nvgpu/semaphore.h>
#include "gk20a/sync_gk20a.h"
#include "gk20a/channel_sync_gk20a.h"
#include "gk20a/mm_gk20a.h"
#include "sync_sema_android.h"
#include "../drivers/staging/android/sync.h"
int nvgpu_os_fence_sema_wait_gen_cmd(struct nvgpu_os_fence *s,

View File

@@ -24,7 +24,6 @@
#include "gk20a/gk20a.h"
#include "gk20a/channel_gk20a.h"
#include "gk20a/sync_gk20a.h"
#include "gk20a/channel_sync_gk20a.h"
#include "gk20a/mm_gk20a.h"

View File

@@ -1,25 +1,19 @@
/*
* GK20A Sync Framework Integration
* Semaphore Sync Framework Integration
*
* Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
* Copyright (c) 2017-2018, NVIDIA Corporation. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <linux/file.h>
@@ -36,7 +30,7 @@
#include "../drivers/staging/android/sync.h"
#include "sync_gk20a.h"
#include "sync_sema_android.h"
static const struct sync_timeline_ops gk20a_sync_timeline_ops;

View File

@@ -0,0 +1,51 @@
/*
* Semaphore Sync Framework Integration
*
* Copyright (c) 2017-2018, NVIDIA Corporation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms and conditions of the GNU General Public License,
* version 2, as published by the Free Software Foundation.
*
* This program is distributed in the hope it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef _GK20A_SYNC_H_
#define _GK20A_SYNC_H_
struct sync_timeline;
struct sync_fence;
struct sync_pt;
struct nvgpu_semaphore;
struct fence;
#ifdef CONFIG_SYNC
struct sync_timeline *gk20a_sync_timeline_create(const char *name);
void gk20a_sync_timeline_destroy(struct sync_timeline *);
void gk20a_sync_timeline_signal(struct sync_timeline *);
struct sync_fence *gk20a_sync_fence_create(
struct channel_gk20a *c,
struct nvgpu_semaphore *,
const char *fmt, ...);
struct sync_fence *gk20a_sync_fence_fdget(int fd);
struct nvgpu_semaphore *gk20a_sync_pt_sema(struct sync_pt *spt);
#else
static inline void gk20a_sync_timeline_destroy(struct sync_timeline *obj) {}
static inline void gk20a_sync_timeline_signal(struct sync_timeline *obj) {}
static inline struct sync_fence *gk20a_sync_fence_fdget(int fd)
{
return NULL;
}
static inline struct sync_timeline *gk20a_sync_timeline_create(
const char *name) {
return NULL;
}
#endif
#endif

View File

@@ -34,7 +34,6 @@
#include "channel_sync_gk20a.h"
#include "gk20a.h"
#include "fence_gk20a.h"
#include "sync_gk20a.h"
#include "mm_gk20a.h"
#ifdef CONFIG_TEGRA_GK20A_NVHOST

View File

@@ -31,7 +31,6 @@
#include "gk20a.h"
#include "channel_gk20a.h"
#include "sync_gk20a.h"
struct gk20a_fence_ops {
int (*wait)(struct gk20a_fence *, long timeout);

View File

@@ -1,59 +0,0 @@
/*
* drivers/video/tegra/host/gk20a/sync_gk20a.h
*
* GK20A Sync Framework Integration
*
* Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#ifndef _GK20A_SYNC_H_
#define _GK20A_SYNC_H_
struct sync_timeline;
struct sync_fence;
struct sync_pt;
struct nvgpu_semaphore;
struct fence;
#ifdef CONFIG_SYNC
struct sync_timeline *gk20a_sync_timeline_create(const char *name);
void gk20a_sync_timeline_destroy(struct sync_timeline *);
void gk20a_sync_timeline_signal(struct sync_timeline *);
struct sync_fence *gk20a_sync_fence_create(
struct channel_gk20a *c,
struct nvgpu_semaphore *,
const char *fmt, ...);
struct sync_fence *gk20a_sync_fence_fdget(int fd);
struct nvgpu_semaphore *gk20a_sync_pt_sema(struct sync_pt *spt);
#else
static inline void gk20a_sync_timeline_destroy(struct sync_timeline *obj) {}
static inline void gk20a_sync_timeline_signal(struct sync_timeline *obj) {}
static inline struct sync_fence *gk20a_sync_fence_fdget(int fd)
{
return NULL;
}
static inline struct sync_timeline *gk20a_sync_timeline_create(
const char *name) {
return NULL;
}
#endif
#endif