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

Commit 620f9ec5 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "msm: kgsl: Do not take active_cnt for events and waittimestamp"

parents 6117b718 99e397b0
Loading
Loading
Loading
Loading
+2 −4
Original line number Original line Diff line number Diff line
@@ -1695,10 +1695,8 @@ static int kgsl_cmdbatch_add_sync_timestamp(struct kgsl_device *device,
	spin_unlock(&cmdbatch->lock);
	spin_unlock(&cmdbatch->lock);


	mutex_lock(&device->mutex);
	mutex_lock(&device->mutex);
	kgsl_active_count_get(device);
	ret = kgsl_add_event(device, context->id, sync->timestamp,
	ret = kgsl_add_event(device, context->id, sync->timestamp,
		kgsl_cmdbatch_sync_func, event, NULL);
		kgsl_cmdbatch_sync_func, event, NULL);
	kgsl_active_count_put(device);
	mutex_unlock(&device->mutex);
	mutex_unlock(&device->mutex);


	if (ret) {
	if (ret) {
@@ -3230,10 +3228,10 @@ static const struct {
			KGSL_IOCTL_LOCK),
			KGSL_IOCTL_LOCK),
	KGSL_IOCTL_FUNC(IOCTL_KGSL_DEVICE_WAITTIMESTAMP,
	KGSL_IOCTL_FUNC(IOCTL_KGSL_DEVICE_WAITTIMESTAMP,
			kgsl_ioctl_device_waittimestamp,
			kgsl_ioctl_device_waittimestamp,
			KGSL_IOCTL_LOCK | KGSL_IOCTL_WAKE),
			KGSL_IOCTL_LOCK),
	KGSL_IOCTL_FUNC(IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID,
	KGSL_IOCTL_FUNC(IOCTL_KGSL_DEVICE_WAITTIMESTAMP_CTXTID,
			kgsl_ioctl_device_waittimestamp_ctxtid,
			kgsl_ioctl_device_waittimestamp_ctxtid,
			KGSL_IOCTL_LOCK | KGSL_IOCTL_WAKE),
			KGSL_IOCTL_LOCK),
	KGSL_IOCTL_FUNC(IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS,
	KGSL_IOCTL_FUNC(IOCTL_KGSL_RINGBUFFER_ISSUEIBCMDS,
			kgsl_ioctl_rb_issueibcmds, 0),
			kgsl_ioctl_rb_issueibcmds, 0),
	KGSL_IOCTL_FUNC(IOCTL_KGSL_SUBMIT_COMMANDS,
	KGSL_IOCTL_FUNC(IOCTL_KGSL_SUBMIT_COMMANDS,
+0 −14
Original line number Original line Diff line number Diff line
@@ -57,8 +57,6 @@ static inline void _do_signal_event(struct kgsl_device *device,
	list_del(&event->list);
	list_del(&event->list);
	kgsl_context_put(event->context);
	kgsl_context_put(event->context);
	kfree(event);
	kfree(event);

	kgsl_active_count_put(device);
}
}


static void _retire_events(struct kgsl_device *device,
static void _retire_events(struct kgsl_device *device,
@@ -211,7 +209,6 @@ EXPORT_SYMBOL(kgsl_signal_events);
int kgsl_add_event(struct kgsl_device *device, u32 id, u32 ts,
int kgsl_add_event(struct kgsl_device *device, u32 id, u32 ts,
	kgsl_event_func func, void *priv, void *owner)
	kgsl_event_func func, void *priv, void *owner)
{
{
	int ret;
	struct kgsl_event *event;
	struct kgsl_event *event;
	unsigned int queued, cur_ts;
	unsigned int queued, cur_ts;
	struct kgsl_context *context = NULL;
	struct kgsl_context *context = NULL;
@@ -257,17 +254,6 @@ int kgsl_add_event(struct kgsl_device *device, u32 id, u32 ts,
		return -ENOMEM;
		return -ENOMEM;
	}
	}


	/*
	 * Increase the active count on the device to avoid going into power
	 * saving modes while events are pending
	 */
	ret = kgsl_active_count_get(device);
	if (ret < 0) {
		kgsl_context_put(context);
		kfree(event);
		return ret;
	}

	event->context = context;
	event->context = context;
	event->timestamp = ts;
	event->timestamp = ts;
	event->priv = priv;
	event->priv = priv;
+7 −3
Original line number Original line Diff line number Diff line
@@ -862,9 +862,13 @@ static int z180_waittimestamp(struct kgsl_device *device,
	if (msecs == -1)
	if (msecs == -1)
		msecs = Z180_IDLE_TIMEOUT;
		msecs = Z180_IDLE_TIMEOUT;


	status = kgsl_active_count_get(device);
	if (!status) {
		mutex_unlock(&device->mutex);
		mutex_unlock(&device->mutex);
		status = z180_wait(device, context, timestamp, msecs);
		status = z180_wait(device, context, timestamp, msecs);
		mutex_lock(&device->mutex);
		mutex_lock(&device->mutex);
		kgsl_active_count_put(device);
	}


	return status;
	return status;
}
}