summaryrefslogtreecommitdiff
path: root/drivers/gpu/arm/midgard/mali_kbase.h
diff options
context:
space:
mode:
authorchenzhen <chenzhen@rock-chips.com>2016-10-17 19:38:36 +0800
committerHuang, Tao <huangtao@rock-chips.com>2017-02-20 14:27:24 +0800
commit3054c50dd886faa349ca38c9ad8c2162f9706d5a (patch)
tree75bb90efbf0cee54e590835e41c2c55087548c74 /drivers/gpu/arm/midgard/mali_kbase.h
parenta90cb0ed3e287c16785f2da19ed122f40dc1a7ef (diff)
MALI: rockchip: upgrade midgard DDK to r14p0-01rel0
Along with a slight modification in mali_kbase_core_linux.c, for building in rk Linux 4.4: -#if KERNEL_VERSION(4, 6, 0) > LINUX_VERSION_CODE +#if KERNEL_VERSION(4, 4, 0) > LINUX_VERSION_CODE Change-Id: I34565cb975866b46c5e3a4d8e2ac5e350dcceb80 Signed-off-by: chenzhen <chenzhen@rock-chips.com>
Diffstat (limited to 'drivers/gpu/arm/midgard/mali_kbase.h')
-rw-r--r--drivers/gpu/arm/midgard/mali_kbase.h66
1 files changed, 62 insertions, 4 deletions
diff --git a/drivers/gpu/arm/midgard/mali_kbase.h b/drivers/gpu/arm/midgard/mali_kbase.h
index b6d28fea9987..443d4b13a4fb 100644
--- a/drivers/gpu/arm/midgard/mali_kbase.h
+++ b/drivers/gpu/arm/midgard/mali_kbase.h
@@ -45,10 +45,15 @@
#include <mali_kbase_uku.h>
#include <mali_kbase_linux.h>
+/*
+ * Include mali_kbase_defs.h first as this provides types needed by other local
+ * header files.
+ */
+#include "mali_kbase_defs.h"
+
+#include "mali_kbase_context.h"
#include "mali_kbase_strings.h"
-#include "mali_kbase_pm.h"
#include "mali_kbase_mem_lowlevel.h"
-#include "mali_kbase_defs.h"
#include "mali_kbase_trace_timeline.h"
#include "mali_kbase_js.h"
#include "mali_kbase_mem.h"
@@ -105,7 +110,6 @@ u32 kbase_get_profiling_control(struct kbase_device *kbdev, u32 control);
struct kbase_context *
kbase_create_context(struct kbase_device *kbdev, bool is_compat);
void kbase_destroy_context(struct kbase_context *kctx);
-int kbase_context_set_create_flags(struct kbase_context *kctx, u32 flags);
int kbase_jd_init(struct kbase_context *kctx);
void kbase_jd_exit(struct kbase_context *kctx);
@@ -163,7 +167,7 @@ void kbase_gpu_cacheclean(struct kbase_device *kbdev,
* than @katom will be soft stopped and put back in the queue, so that atoms
* with higher priority can run.
*
- * The js_data.runpool_irq.lock must be held when calling this function.
+ * The hwaccess_lock must be held when calling this function.
*/
void kbase_job_slot_ctx_priority_check_locked(struct kbase_context *kctx,
struct kbase_jd_atom *katom);
@@ -546,4 +550,58 @@ void kbasep_trace_dump(struct kbase_device *kbdev);
void kbase_set_driver_inactive(struct kbase_device *kbdev, bool inactive);
#endif /* CONFIG_MALI_DEBUG */
+
+#if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_MALI_NO_MALI)
+
+/* kbase_io_history_init - initialize data struct for register access history
+ *
+ * @kbdev The register history to initialize
+ * @n The number of register accesses that the buffer could hold
+ *
+ * @return 0 if successfully initialized, failure otherwise
+ */
+int kbase_io_history_init(struct kbase_io_history *h, u16 n);
+
+/* kbase_io_history_term - uninit all resources for the register access history
+ *
+ * @h The register history to terminate
+ */
+void kbase_io_history_term(struct kbase_io_history *h);
+
+/* kbase_io_history_dump - print the register history to the kernel ring buffer
+ *
+ * @kbdev Pointer to kbase_device containing the register history to dump
+ */
+void kbase_io_history_dump(struct kbase_device *kbdev);
+
+/**
+ * kbase_io_history_resize - resize the register access history buffer.
+ *
+ * @h: Pointer to a valid register history to resize
+ * @new_size: Number of accesses the buffer could hold
+ *
+ * A successful resize will clear all recent register accesses.
+ * If resizing fails for any reason (e.g., could not allocate memory, invalid
+ * buffer size) then the original buffer will be kept intact.
+ *
+ * @return 0 if the buffer was resized, failure otherwise
+ */
+int kbase_io_history_resize(struct kbase_io_history *h, u16 new_size);
+
+#else /* CONFIG_DEBUG_FS */
+
+#define kbase_io_history_init(...) ((int)0)
+
+#define kbase_io_history_term CSTD_NOP
+
+#define kbase_io_history_dump CSTD_NOP
+
+#define kbase_io_history_resize CSTD_NOP
+
+#endif /* CONFIG_DEBUG_FS */
+
+
#endif
+
+
+