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

Commit 65bd88f4 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: Create cff_dump file only if CONFIG_MSM_KGSL_CFF_DUMP is enabled"

parents a967103e 2c396abe
Loading
Loading
Loading
Loading
+3 −6
Original line number Diff line number Diff line
/* Copyright (c) 2002,2008-2013, The Linux Foundation. All rights reserved.
/* Copyright (c) 2002,2008-2014, The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -21,9 +21,6 @@
#include "adreno.h"
#include "kgsl_cffdump.h"

DEFINE_SIMPLE_ATTRIBUTE(kgsl_cff_dump_enable_fops, kgsl_cff_dump_enable_get,
			kgsl_cff_dump_enable_set, "%llu\n");

static int _active_count_get(void *data, u64 *val)
{
	struct kgsl_device *device = data;
@@ -46,8 +43,8 @@ void adreno_debugfs_init(struct kgsl_device *device)
	if (!device->d_debugfs || IS_ERR(device->d_debugfs))
		return;

	debugfs_create_file("cff_dump", 0644, device->d_debugfs, device,
			    &kgsl_cff_dump_enable_fops);
	kgsl_cffdump_debugfs_create(device);

	debugfs_create_u32("wait_timeout", 0644, device->d_debugfs,
		&adreno_dev->wait_timeout);
	debugfs_create_u32("ib_check", 0644, device->d_debugfs,
+9 −0
Original line number Diff line number Diff line
@@ -744,3 +744,12 @@ done:
	return ret;
}
EXPORT_SYMBOL(kgsl_cffdump_capture_ib_desc);

DEFINE_SIMPLE_ATTRIBUTE(kgsl_cff_dump_enable_fops, kgsl_cff_dump_enable_get,
			kgsl_cff_dump_enable_set, "%llu\n");

void kgsl_cffdump_debugfs_create(struct kgsl_device *device)
{
	debugfs_create_file("cff_dump", 0644, device->d_debugfs, device,
			    &kgsl_cff_dump_enable_fops);
}
+6 −0
Original line number Diff line number Diff line
@@ -52,6 +52,7 @@ void kgsl_cffdump_memory_base(struct kgsl_device *device, unsigned int base,
			      unsigned int range, unsigned int gmemsize);

void kgsl_cffdump_hang(struct kgsl_device *device);
void kgsl_cffdump_debugfs_create(struct kgsl_device *device);
int kgsl_cff_dump_enable_set(void *data, u64 val);
int kgsl_cff_dump_enable_get(void *data, u64 *val);
int kgsl_cffdump_capture_ib_desc(struct kgsl_device *device,
@@ -147,6 +148,11 @@ static inline void kgsl_cffdump_hang(struct kgsl_device *device)
	return;
}

static inline void kgsl_cffdump_debugfs_create(struct kgsl_device *device)
{
	return;
}

static inline void kgsl_cffdump_user_event(struct kgsl_device *device,
		unsigned int cff_opcode, unsigned int op1,
		unsigned int op2, unsigned int op3,