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

Commit d8e42048 authored by Jordan Crouse's avatar Jordan Crouse Committed by Jeremy Gebben
Browse files

msm: kgsl: Remove the deprecated snapshot trigger sysfs file



Manual snapshot triggering is no longer a thing.  Get rid of the
support infrastructure.

Change-Id: Ic0dedbad76cfb1154f538cadb5b004228832f151
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent 86453e34
Loading
Loading
Loading
Loading
+0 −22
Original line number Original line Diff line number Diff line
@@ -864,22 +864,6 @@ static ssize_t timestamp_show(struct kgsl_device *device, char *buf)
	return snprintf(buf, PAGE_SIZE, "%d\n", device->snapshot_timestamp);
	return snprintf(buf, PAGE_SIZE, "%d\n", device->snapshot_timestamp);
}
}


/* manually trigger a new snapshot to be collected */
static ssize_t trigger_store(struct kgsl_device *device, const char *buf,
	size_t count)
{
	if (device && count > 0) {
		mutex_lock(&device->mutex);
		if (!kgsl_active_count_get(device)) {
				kgsl_device_snapshot(device, 0);
				kgsl_active_count_put(device);
		}
		mutex_unlock(&device->mutex);
	}

	return count;
}

static struct bin_attribute snapshot_attr = {
static struct bin_attribute snapshot_attr = {
	.attr.name = "dump",
	.attr.name = "dump",
	.attr.mode = 0444,
	.attr.mode = 0444,
@@ -894,7 +878,6 @@ struct kgsl_snapshot_attribute attr_##_name = { \
	.store = _store, \
	.store = _store, \
}
}


static SNAPSHOT_ATTR(trigger, 0600, NULL, trigger_store);
static SNAPSHOT_ATTR(timestamp, 0444, timestamp_show, NULL);
static SNAPSHOT_ATTR(timestamp, 0444, timestamp_show, NULL);
static SNAPSHOT_ATTR(faultcount, 0644, faultcount_show, faultcount_store);
static SNAPSHOT_ATTR(faultcount, 0644, faultcount_show, faultcount_store);


@@ -982,10 +965,6 @@ int kgsl_device_snapshot_init(struct kgsl_device *device)
	if (ret)
	if (ret)
		goto done;
		goto done;


	ret  = sysfs_create_file(&device->snapshot_kobj, &attr_trigger.attr);
	if (ret)
		goto done;

	ret  = sysfs_create_file(&device->snapshot_kobj, &attr_timestamp.attr);
	ret  = sysfs_create_file(&device->snapshot_kobj, &attr_timestamp.attr);
	if (ret)
	if (ret)
		goto done;
		goto done;
@@ -1007,7 +986,6 @@ EXPORT_SYMBOL(kgsl_device_snapshot_init);
void kgsl_device_snapshot_close(struct kgsl_device *device)
void kgsl_device_snapshot_close(struct kgsl_device *device)
{
{
	sysfs_remove_bin_file(&device->snapshot_kobj, &snapshot_attr);
	sysfs_remove_bin_file(&device->snapshot_kobj, &snapshot_attr);
	sysfs_remove_file(&device->snapshot_kobj, &attr_trigger.attr);
	sysfs_remove_file(&device->snapshot_kobj, &attr_timestamp.attr);
	sysfs_remove_file(&device->snapshot_kobj, &attr_timestamp.attr);


	kobject_put(&device->snapshot_kobj);
	kobject_put(&device->snapshot_kobj);