mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-22 23:04:43 +00:00
gpu: host1x: Improve debug disassembly formatting
The host1x driver prints out "disassembly" dumps of the command FIFO and gather contents on submission timeouts. However, the output has been quite difficult to read with unnecessary newlines and occasional missing parentheses. Fix these problems by using pr_cont to remove unnecessary newlines and by fixing other small issues. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Reviewed-by: Dmitry Osipenko <digetx@gmail.com> Tested-by: Dmitry Osipenko <digetx@gmail.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
This commit is contained in:
parent
2316f29fb5
commit
eb2ee1a28d
5 changed files with 61 additions and 30 deletions
|
@ -24,22 +24,28 @@
|
|||
struct host1x;
|
||||
|
||||
struct output {
|
||||
void (*fn)(void *ctx, const char *str, size_t len);
|
||||
void (*fn)(void *ctx, const char *str, size_t len, bool cont);
|
||||
void *ctx;
|
||||
char buf[256];
|
||||
};
|
||||
|
||||
static inline void write_to_seqfile(void *ctx, const char *str, size_t len)
|
||||
static inline void write_to_seqfile(void *ctx, const char *str, size_t len,
|
||||
bool cont)
|
||||
{
|
||||
seq_write((struct seq_file *)ctx, str, len);
|
||||
}
|
||||
|
||||
static inline void write_to_printk(void *ctx, const char *str, size_t len)
|
||||
static inline void write_to_printk(void *ctx, const char *str, size_t len,
|
||||
bool cont)
|
||||
{
|
||||
pr_info("%s", str);
|
||||
if (cont)
|
||||
pr_cont("%s", str);
|
||||
else
|
||||
pr_info("%s", str);
|
||||
}
|
||||
|
||||
void __printf(2, 3) host1x_debug_output(struct output *o, const char *fmt, ...);
|
||||
void __printf(2, 3) host1x_debug_cont(struct output *o, const char *fmt, ...);
|
||||
|
||||
extern unsigned int host1x_debug_trace_cmdbuf;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue