diff options
Diffstat (limited to 'drivers/gpu/host1x/dev.h')
-rw-r--r-- | drivers/gpu/host1x/dev.h | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/dev.h b/drivers/gpu/host1x/dev.h index 1a9b4383dc3b..4d16fe92400a 100644 --- a/drivers/gpu/host1x/dev.h +++ b/drivers/gpu/host1x/dev.h @@ -31,6 +31,8 @@ struct host1x_channel; struct host1x_cdma; struct host1x_job; struct push_buffer; +struct output; +struct dentry; struct host1x_channel_ops { int (*init)(struct host1x_channel *channel, struct host1x *host, @@ -54,6 +56,18 @@ struct host1x_pushbuffer_ops { void (*init)(struct push_buffer *pb); }; +struct host1x_debug_ops { + void (*debug_init)(struct dentry *de); + void (*show_channel_cdma)(struct host1x *host, + struct host1x_channel *ch, + struct output *o); + void (*show_channel_fifo)(struct host1x *host, + struct host1x_channel *ch, + struct output *o); + void (*show_mlocks)(struct host1x *host, struct output *output); + +}; + struct host1x_syncpt_ops { void (*restore)(struct host1x_syncpt *syncpt); void (*restore_wait_base)(struct host1x_syncpt *syncpt); @@ -100,6 +114,7 @@ struct host1x { const struct host1x_channel_ops *channel_op; const struct host1x_cdma_ops *cdma_op; const struct host1x_pushbuffer_ops *cdma_pb_op; + const struct host1x_debug_ops *debug_op; struct host1x_syncpt *nop_sp; @@ -107,6 +122,8 @@ struct host1x { struct host1x_channel chlist; unsigned long allocated_channels; unsigned int num_allocated_channels; + + struct dentry *debugfs; }; void host1x_sync_writel(struct host1x *host1x, u32 r, u32 v); @@ -257,4 +274,29 @@ static inline void host1x_hw_pushbuffer_init(struct host1x *host, host->cdma_pb_op->init(pb); } +static inline void host1x_hw_debug_init(struct host1x *host, struct dentry *de) +{ + if (host->debug_op && host->debug_op->debug_init) + host->debug_op->debug_init(de); +} + +static inline void host1x_hw_show_channel_cdma(struct host1x *host, + struct host1x_channel *channel, + struct output *o) +{ + host->debug_op->show_channel_cdma(host, channel, o); +} + +static inline void host1x_hw_show_channel_fifo(struct host1x *host, + struct host1x_channel *channel, + struct output *o) +{ + host->debug_op->show_channel_fifo(host, channel, o); +} + +static inline void host1x_hw_show_mlocks(struct host1x *host, struct output *o) +{ + host->debug_op->show_mlocks(host, o); +} + #endif |