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

Commit bfd49369 authored by Jordan Crouse's avatar Jordan Crouse
Browse files

msm: kgsl: Use the correct method for exporting trace event functions



Use EXPORT_TRACEPOINT_SYMBOL instead of my lazy "trace" wrappers for
trace_kgsl_regwrite and trace_kgsl_issueibcmds thus saving lots of
code and a shred or two of dignity along the way.

Change-Id: Ic0dedbad4f54a7522edd2f9c3d017ba1e9dba505
Signed-off-by: default avatarJordan Crouse <jcrouse@codeaurora.org>
parent cadcc68d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@
#include "kgsl_cffdump.h"
#include "kgsl_sharedmem.h"
#include "kgsl_iommu.h"
#include "kgsl_trace.h"

#include "adreno.h"
#include "adreno_pm4types.h"
@@ -2807,7 +2808,7 @@ static void adreno_regwrite(struct kgsl_device *device,
	if (!in_interrupt())
		kgsl_pre_hwaccess(device);

	kgsl_trace_regwrite(device, offsetwords, value);
	trace_kgsl_regwrite(device, offsetwords, value);

	kgsl_cffdump_regwrite(device, offsetwords << 2, value);
	reg = (unsigned int *)(device->reg_virt + (offsetwords << 2));
+2 −1
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@
#include "kgsl.h"
#include "kgsl_sharedmem.h"
#include "kgsl_cffdump.h"
#include "kgsl_trace.h"

#include "adreno.h"
#include "adreno_pm4types.h"
@@ -1223,7 +1224,7 @@ int adreno_ringbuffer_submitcmd(struct adreno_device *adreno_dev,

done:
	device->pwrctrl.irq_last = 0;
	kgsl_trace_issueibcmds(device, context->id, cmdbatch,
	trace_kgsl_issueibcmds(device, context->id, cmdbatch,
		cmdbatch->timestamp, cmdbatch->flags, ret,
		drawctxt->type);

+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@
#define TRACE_SYSTEM kgsl
#undef TRACE_INCLUDE_PATH
#define TRACE_INCLUDE_PATH .
#undef TRACE_INCLUDE_FILE
#define TRACE_INCLUDE_FILE adreno_trace

#include <linux/tracepoint.h>
+0 −38
Original line number Diff line number Diff line
@@ -65,44 +65,6 @@ static void kgsl_mem_entry_detach_process(struct kgsl_mem_entry *entry);
static void
kgsl_put_process_private(struct kgsl_device *device,
			 struct kgsl_process_private *private);
/**
 * kgsl_trace_issueibcmds() - Call trace_issueibcmds by proxy
 * device: KGSL device
 * id: ID of the context submitting the command
 * cmdbatch: Pointer to kgsl_cmdbatch describing these commands
 * timestamp: Timestamp assigned to the command batch
 * flags: Flags sent by the user
 * result: Result of the submission attempt
 * type: Type of context issuing the command
 *
 * Wrap the issueibcmds ftrace hook into a function that can be called from the
 * GPU specific modules.
 */
void kgsl_trace_issueibcmds(struct kgsl_device *device, int id,
		struct kgsl_cmdbatch *cmdbatch,
		unsigned int timestamp, unsigned int flags,
		int result, unsigned int type)
{
	trace_kgsl_issueibcmds(device, id, cmdbatch,
		timestamp, flags, result, type);
}
EXPORT_SYMBOL(kgsl_trace_issueibcmds);

/**
 * kgsl_trace_regwrite - call regwrite ftrace function by proxy
 * device: KGSL device
 * offset: dword offset of the register being written
 * value: Value of the register being written
 *
 * Wrap the regwrite ftrace hook into a function that can be called from the
 * GPU specific modules.
 */
void kgsl_trace_regwrite(struct kgsl_device *device, unsigned int offset,
		unsigned int value)
{
	trace_kgsl_regwrite(device, offset, value);
}
EXPORT_SYMBOL(kgsl_trace_regwrite);

static int kgsl_memfree_hist_init(void)
{
+0 −8
Original line number Diff line number Diff line
@@ -291,14 +291,6 @@ extern const struct dev_pm_ops kgsl_pm_ops;
int kgsl_suspend_driver(struct platform_device *pdev, pm_message_t state);
int kgsl_resume_driver(struct platform_device *pdev);

void kgsl_trace_regwrite(struct kgsl_device *device, unsigned int offset,
		unsigned int value);

void kgsl_trace_issueibcmds(struct kgsl_device *device, int id,
		struct kgsl_cmdbatch *cmdbatch,
		unsigned int timestamp, unsigned int flags,
		int result, unsigned int type);

#ifdef CONFIG_MSM_KGSL_DRM
extern int kgsl_drm_init(struct platform_device *dev);
extern void kgsl_drm_exit(void);
Loading