mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-19 13:56:23 +00:00
lib/igt_kms: rip out custom verbose loggin support
Instead just piggy-pack on top of igt_log. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
parent
523d909834
commit
1e9e1baba3
@ -823,7 +823,7 @@ igt_display_log(igt_display_t *display, const char *fmt, ...)
|
||||
va_list args;
|
||||
int n, i;
|
||||
|
||||
if (!display->verbose)
|
||||
if (igt_log_level > IGT_LOG_DEBUG)
|
||||
return 0;
|
||||
|
||||
va_start(args, fmt);
|
||||
@ -883,23 +883,8 @@ void igt_display_init(igt_display_t *display, int drm_fd)
|
||||
{
|
||||
drmModeRes *resources;
|
||||
drmModePlaneRes *plane_resources;
|
||||
bool verbose;
|
||||
char *env;
|
||||
int i;
|
||||
|
||||
/*
|
||||
* It's valid to set verbose before the init so we can get debugging
|
||||
* output for the init() itself.
|
||||
*/
|
||||
verbose = display->verbose;
|
||||
memset(display, 0, sizeof(igt_display_t));
|
||||
display->verbose = verbose;
|
||||
|
||||
/* allow a verbose override from an env variable */
|
||||
env = getenv("IGT_DISPLAY_VERBOSE");
|
||||
if (env)
|
||||
display->verbose = atoi(env) != 0;
|
||||
|
||||
LOG_INDENT(display, "init");
|
||||
|
||||
display->drm_fd = drm_fd;
|
||||
@ -993,11 +978,6 @@ void igt_display_init(igt_display_t *display, int drm_fd)
|
||||
LOG_UNINDENT(display);
|
||||
}
|
||||
|
||||
void igt_display_set_verbose(igt_display_t *display, bool verbose)
|
||||
{
|
||||
display->verbose = verbose;
|
||||
}
|
||||
|
||||
int igt_display_get_n_pipes(igt_display_t *display)
|
||||
{
|
||||
return display->n_pipes;
|
||||
|
@ -155,7 +155,6 @@ typedef struct {
|
||||
|
||||
struct igt_display {
|
||||
int drm_fd;
|
||||
unsigned int verbose : 1;
|
||||
int log_shift;
|
||||
int n_pipes;
|
||||
int n_outputs;
|
||||
@ -167,7 +166,6 @@ struct igt_display {
|
||||
void igt_display_init(igt_display_t *display, int drm_fd);
|
||||
void igt_display_fini(igt_display_t *display);
|
||||
int igt_display_commit(igt_display_t *display);
|
||||
void igt_display_set_verbose(igt_display_t *display, bool verbose);
|
||||
int igt_display_get_n_pipes(igt_display_t *display);
|
||||
|
||||
const char *igt_output_name(igt_output_t *output);
|
||||
|
Loading…
x
Reference in New Issue
Block a user