drm/tests: hdmi: Fix memory leaks in drm_display_mode_from_cea_vic()
[drm/drm-misc.git] / drivers / accel / ivpu / ivpu_fw_log.h
blob0b2573f6f315198521416130f2c0a186c94f4365
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3 * Copyright (C) 2020-2023 Intel Corporation
4 */
6 #ifndef __IVPU_FW_LOG_H__
7 #define __IVPU_FW_LOG_H__
9 #include <linux/types.h>
11 #include <drm/drm_print.h>
13 #include "ivpu_drv.h"
15 #define IVPU_FW_LOG_DEFAULT 0
16 #define IVPU_FW_LOG_DEBUG 1
17 #define IVPU_FW_LOG_INFO 2
18 #define IVPU_FW_LOG_WARN 3
19 #define IVPU_FW_LOG_ERROR 4
20 #define IVPU_FW_LOG_FATAL 5
22 extern unsigned int ivpu_log_level;
24 #define IVPU_FW_VERBOSE_BUFFER_SMALL_SIZE SZ_1M
25 #define IVPU_FW_VERBOSE_BUFFER_LARGE_SIZE SZ_8M
26 #define IVPU_FW_CRITICAL_BUFFER_SIZE SZ_512K
28 void ivpu_fw_log_print(struct ivpu_device *vdev, bool only_new_msgs, struct drm_printer *p);
29 void ivpu_fw_log_clear(struct ivpu_device *vdev);
31 static inline void ivpu_fw_log_dump(struct ivpu_device *vdev)
33 struct drm_printer p = drm_info_printer(vdev->drm.dev);
35 ivpu_fw_log_print(vdev, false, &p);
38 #endif /* __IVPU_FW_LOG_H__ */