int msm_debugfs_late_init(struct drm_device *dev);
int msm_rd_debugfs_init(struct drm_minor *minor);
void msm_rd_debugfs_cleanup(struct msm_drm_private *priv);
-void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit);
+void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
+ const char *fmt, ...);
int msm_perf_debugfs_init(struct drm_minor *minor);
void msm_perf_debugfs_cleanup(struct msm_drm_private *priv);
#else
list_add_tail(&submit->node, &ring->submits);
- msm_rd_dump_submit(priv->rd, submit);
+ msm_rd_dump_submit(priv->rd, submit, NULL);
update_sw_cntrs(gpu);
}
/* called under struct_mutex */
-void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit)
+void msm_rd_dump_submit(struct msm_rd_state *rd, struct msm_gem_submit *submit,
+ const char *fmt, ...)
{
struct drm_device *dev = submit->dev;
struct task_struct *task;
- char msg[128];
+ char msg[256];
int i, n;
if (!rd->open)
*/
WARN_ON(!mutex_is_locked(&dev->struct_mutex));
+ if (fmt) {
+ va_list args;
+
+ va_start(args, fmt);
+ n = vsnprintf(msg, sizeof(msg), fmt, args);
+ va_end(args);
+
+ rd_write_section(rd, RD_CMD, msg, ALIGN(n, 4));
+ }
+
rcu_read_lock();
task = pid_task(submit->pid, PIDTYPE_PID);
if (task) {