gpu: nvgpu: move nvgpu_has_syncpoints

nvgpu_has_syncpoints is more general than a channel synchronization
related, so move it to nvhost.c from channel_sync.c. Move the
declaration from gk20a.h to nvhost.h.

As the debugfs knob is Linux related, move it from struct gk20a to
struct nvgpu_os_linux.

Jira NVGPU-4548

Change-Id: I4236086744993c3daac042f164de30939c01ee77
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2318814
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-03-26 12:07:41 +02:00
committed by Alex Waterman
parent db9c1b1f97
commit d0ffb335dc
13 changed files with 53 additions and 30 deletions

View File

@@ -424,7 +424,6 @@ done:
return ret;
}
#define F_SYNC_GLOBAL_DISABLE_SYNCPT 0
#define F_SYNC_SYNCPT_ALLOC_FAILED 1
#define F_SYNC_USER_MANAGED 2
#define F_SYNC_STRADD_FAIL 3
@@ -451,10 +450,6 @@ static void clear_test_params(struct gk20a *g,
bool *fault_injection_enabled, u32 branch,
struct nvgpu_posix_fault_inj *kmem_fi)
{
if (g->disable_syncpoints) {
g->disable_syncpoints = false;
}
if (ch->vm->guest_managed) {
ch->vm->guest_managed = false;
}
@@ -491,9 +486,7 @@ int test_sync_create_fail(struct unit_module *m, struct gk20a *g, void *args)
*/
g->nvhost->syncpt_id = 0U;
if (branches == F_SYNC_GLOBAL_DISABLE_SYNCPT) {
g->disable_syncpoints = true;
} else if (branches == F_SYNC_SYNCPT_ALLOC_FAILED) {
if (branches == F_SYNC_SYNCPT_ALLOC_FAILED) {
/* fail first kzalloc call */
nvgpu_posix_enable_fault_injection(kmem_fi, true, 0);
fault_injection_enabled = true;