Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c031a9b3 authored by Lynus Vaz's avatar Lynus Vaz
Browse files

msm: kgsl: Use the new fence APIs for server side sync



The Android sync framework has been mainlined, with some changes in
the API. Update kgsl to use the fence and sync file APIs as required
instead of the older APIs.

Change-Id: Ia443dd3e5520c86b3b66c0cae1780dbe263b8aad
Signed-off-by: default avatarLynus Vaz <lvaz@codeaurora.org>
parent f5f72c64
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -9,7 +9,6 @@ config QCOM_KGSL
	select DEVFREQ_GOV_PERFORMANCE
	select DEVFREQ_GOV_QCOM_ADRENO_TZ
	select DEVFREQ_GOV_QCOM_GPUBW_MON
	select ONESHOT_SYNC if SYNC
	---help---
	  3D graphics driver for the Adreno family of GPUs from QTI.
	  Required to use hardware accelerated OpenGL, compute and Vulkan
+2 −2
Original line number Diff line number Diff line
ccflags-y := -Idrivers/staging/android
ccflags-y := -Iinclude/linux

msm_kgsl_core-y = \
	kgsl.o \
@@ -17,7 +17,7 @@ msm_kgsl_core-y = \

msm_kgsl_core-$(CONFIG_QCOM_KGSL_IOMMU) += kgsl_iommu.o
msm_kgsl_core-$(CONFIG_DEBUG_FS) += kgsl_debugfs.o
msm_kgsl_core-$(CONFIG_SYNC) += kgsl_sync.o
msm_kgsl_core-$(CONFIG_SYNC_FILE) += kgsl_sync.o
msm_kgsl_core-$(CONFIG_COMPAT) += kgsl_compat.o

msm_adreno-y += \
+7 −4
Original line number Diff line number Diff line
@@ -136,11 +136,14 @@ static void sync_event_print(struct seq_file *s,
				sync_event->context->id, sync_event->timestamp);
		break;
	}
	case KGSL_CMD_SYNCPOINT_TYPE_FENCE:
		seq_printf(s, "sync: [%pK] %s", sync_event->handle,
		(sync_event->handle && sync_event->handle->fence)
				? sync_event->handle->fence->name : "NULL");
	case KGSL_CMD_SYNCPOINT_TYPE_FENCE: {
		char fence_str[128];

		kgsl_dump_fence(sync_event->handle,
				fence_str, sizeof(fence_str));
		seq_printf(s, "sync: [%pK] %s", sync_event->handle, fence_str);
		break;
	}
	default:
		seq_printf(s, "sync: type: %d", sync_event->type);
		break;
+4 −2
Original line number Diff line number Diff line
@@ -628,6 +628,8 @@ static void kgsl_context_detach(struct kgsl_context *context)
	/* Remove the event group from the list */
	kgsl_del_event_group(&context->events);

	kgsl_sync_timeline_put(context->ktimeline);

	kgsl_context_put(context);
}

@@ -962,7 +964,7 @@ static void process_release_sync_sources(struct kgsl_process_private *private)
		if (syncsource == NULL)
			break;

		kgsl_syncsource_put(syncsource);
		kgsl_syncsource_cleanup(private, syncsource);
		next = next + 1;
	}
}
@@ -1928,7 +1930,7 @@ static void gpuobj_free_fence_func(void *priv)
static long gpuobj_free_on_fence(struct kgsl_device_private *dev_priv,
		struct kgsl_mem_entry *entry, struct kgsl_gpuobj_free *param)
{
	struct kgsl_sync_fence_waiter *handle;
	struct kgsl_sync_fence_cb *handle;
	struct kgsl_gpu_event_fence event;
	long ret;

+1 −1
Original line number Diff line number Diff line
@@ -382,7 +382,7 @@ struct kgsl_context {
	unsigned long priv;
	struct kgsl_device *device;
	unsigned int reset_status;
	struct sync_timeline *timeline;
	struct kgsl_sync_timeline *ktimeline;
	struct kgsl_event_group events;
	unsigned int flags;
	struct kgsl_pwr_constraint pwr_constraint;
Loading