1074 lines
49 KiB
C
1074 lines
49 KiB
C
|
/*
|
||
|
* Samsung Exynos5 SoC series FIMC-IS driver
|
||
|
*
|
||
|
* exynos5 fimc-is video functions
|
||
|
*
|
||
|
* Copyright (c) 2011 Samsung Electronics Co., Ltd
|
||
|
*
|
||
|
* This program is free software; you can redistribute it and/or modify
|
||
|
* it under the terms of the GNU General Public License version 2 as
|
||
|
* published by the Free Software Foundation.
|
||
|
*/
|
||
|
|
||
|
#include <linux/debugfs.h>
|
||
|
#include <linux/delay.h>
|
||
|
|
||
|
#include "fimc-is-config.h"
|
||
|
#include "fimc-is-debug.h"
|
||
|
#include "fimc-is-device-ischain.h"
|
||
|
|
||
|
struct fimc_is_debug fimc_is_debug;
|
||
|
EXPORT_SYMBOL(fimc_is_debug);
|
||
|
|
||
|
struct fimc_is_debug_event fimc_is_debug_event;
|
||
|
|
||
|
#define DEBUG_FS_ROOT_NAME "fimc-is"
|
||
|
#define DEBUG_FS_LOGFILE_NAME "isfw-msg"
|
||
|
#define DEBUG_FS_EVENT_DIR_NAME "event"
|
||
|
#define DEBUG_FS_EVENT_FILTER "filter"
|
||
|
#define DEBUG_FS_EVENT_LOGFILE "log"
|
||
|
#define DEBUG_FS_EVENT_LOGEN "log_enable"
|
||
|
|
||
|
static const struct file_operations debug_log_fops;
|
||
|
static const struct file_operations debug_img_fops;
|
||
|
static const struct file_operations debug_event_fops;
|
||
|
|
||
|
#ifdef DBG_DRAW_DIGIT
|
||
|
unsigned char fimc_is_digits[10][DBG_DIGIT_H][DBG_DIGIT_W] = {
|
||
|
{
|
||
|
/* 0 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||
|
},
|
||
|
{
|
||
|
/* 1 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||
|
},
|
||
|
{
|
||
|
/* 2 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
},
|
||
|
{
|
||
|
/* 3 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
},
|
||
|
{
|
||
|
/* 4 */
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00, 0x00}
|
||
|
},
|
||
|
{
|
||
|
/* 5 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
},
|
||
|
{
|
||
|
/* 6 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
},
|
||
|
{
|
||
|
/* 7 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00}
|
||
|
},
|
||
|
{
|
||
|
/* 8 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
},
|
||
|
{
|
||
|
/* 9 */
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00},
|
||
|
{0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x00},
|
||
|
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}
|
||
|
}
|
||
|
};
|
||
|
|
||
|
void fimc_is_draw_digit(ulong addr, int width, int height, u32 pixelformat,
|
||
|
u32 bitwidth, int row_index, int col_index, u64 digit)
|
||
|
{
|
||
|
u32 i, j;
|
||
|
u32 draw_digit;
|
||
|
u32 pixel_byte;
|
||
|
u64 byte_line_width;
|
||
|
u64 start_addr, tmp_addr;
|
||
|
u32 each_digit_pos_idx = 1;
|
||
|
u64 divided_digit = digit;
|
||
|
unsigned long min_byte_w, min_pixel_h;
|
||
|
|
||
|
dbg("[DBG] addr:0x%08lx, size:(%dx%d), idx:(%d/%d), fmt:(0x%08X), digit:%llu\n",
|
||
|
addr, width, height, row_index, col_index, pixelformat, digit);
|
||
|
|
||
|
/*
|
||
|
* 1. calc start address
|
||
|
* : The digits will be drawed in the top of the most right side.
|
||
|
* It depends on index(height).
|
||
|
* Below picture is a example
|
||
|
* DBG_DIGIT_MARGIN_H_INIT : 1
|
||
|
* DBG_DIGIT_MARGIN_H : 1
|
||
|
* Digit Height : 32
|
||
|
*
|
||
|
* DBG_DIGIT_MARGIN_W DBG_DIGIT_MARGIN_W_INIT
|
||
|
* | |
|
||
|
* IMG Buf colindex(1) _|_ colindex(0) _|_
|
||
|
* ---------------------------------------------
|
||
|
* 0| | | <-- DBG_DIGIT_MARGIN_H_INIT
|
||
|
* 1| Digits(0/1) Digits(0/0) | <-- rawindex(0)
|
||
|
* 2| ************* ************* |
|
||
|
* 3| ************* ************* |
|
||
|
* .| ************* ************* |
|
||
|
* 32| ************* ************* |
|
||
|
* 33| ************* ************* |
|
||
|
* 34| | | <-- DBG_DIGIT_MARGIN_H
|
||
|
* 35| Digits(1/1) Digits(0/1) | <--- rawindex(1)
|
||
|
* 36| ************* ************* |
|
||
|
* 37| ************* ************* |
|
||
|
* .| ************* ************* |
|
||
|
* 65| ************* ************* |
|
||
|
* 66| ************* ************* |
|
||
|
*/
|
||
|
|
||
|
switch(pixelformat) {
|
||
|
case V4L2_PIX_FMT_SBGGR10:
|
||
|
pixel_byte = (bitwidth / 8) + 1;
|
||
|
byte_line_width = ALIGN((width * 5) >> 2, 16);
|
||
|
break;
|
||
|
case V4L2_PIX_FMT_SBGGR12:
|
||
|
pixel_byte = (bitwidth / 8) + 1;
|
||
|
byte_line_width = ALIGN((width * 3) >> 1, 16);
|
||
|
break;
|
||
|
default:
|
||
|
pixel_byte = bitwidth / 8;
|
||
|
byte_line_width = ALIGN(width * pixel_byte, 16);
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
/* calc minimum byte width to draw digit */
|
||
|
min_byte_w = ((col_index * pixel_byte * DBG_DIGIT_CNT * (DBG_DIGIT_W + DBG_DIGIT_MARGIN_W)) + DBG_DIGIT_MARGIN_W_INIT);
|
||
|
/* calc minimum pixel height to draw digit */
|
||
|
min_pixel_h = ((row_index * (DBG_DIGIT_H + DBG_DIGIT_MARGIN_H)) + DBG_DIGIT_MARGIN_H_INIT);
|
||
|
|
||
|
|
||
|
if (byte_line_width < min_byte_w || height < min_pixel_h) {
|
||
|
warn("[DBG][%d,%d] too short width/height to draw digits(%lld/%d)", col_index, row_index,
|
||
|
byte_line_width, height);
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
/* calc base address by minimum pixel height */
|
||
|
start_addr = addr + byte_line_width * min_pixel_h;
|
||
|
/* calc base address by minimum byte width */
|
||
|
start_addr += (byte_line_width - min_byte_w);
|
||
|
|
||
|
/*
|
||
|
* 2. draw the number
|
||
|
* Drawing the number right -> left order.
|
||
|
* For example of 142, it draw 2 -> 4 -> 1.
|
||
|
*/
|
||
|
do {
|
||
|
draw_digit = divided_digit % 10;
|
||
|
|
||
|
/* calc each character position */
|
||
|
tmp_addr = start_addr + (byte_line_width - ((DBG_DIGIT_W + DBG_DIGIT_MARGIN_W) * each_digit_pos_idx * pixel_byte));
|
||
|
each_digit_pos_idx++;
|
||
|
|
||
|
switch(pixelformat) {
|
||
|
case V4L2_PIX_FMT_YUYV:
|
||
|
case V4L2_PIX_FMT_SBGGR10:
|
||
|
case V4L2_PIX_FMT_SBGGR12:
|
||
|
case V4L2_PIX_FMT_SBGGR16:
|
||
|
for (i = 0; i < DBG_DIGIT_H; i++) {
|
||
|
unsigned char *src_buf = (unsigned char *)tmp_addr;
|
||
|
for (j = 0; j < DBG_DIGIT_W; j++) {
|
||
|
int src_idx = (j * 2);
|
||
|
src_buf[src_idx] = fimc_is_digits[draw_digit][i][j];
|
||
|
if (pixelformat == V4L2_PIX_FMT_YUYV)
|
||
|
src_buf[src_idx + 1] = 0;
|
||
|
else
|
||
|
src_buf[src_idx + 1] = fimc_is_digits[draw_digit][i][j];
|
||
|
}
|
||
|
tmp_addr += byte_line_width;
|
||
|
}
|
||
|
break;
|
||
|
default:
|
||
|
for (i = 0; i < DBG_DIGIT_H; i++) {
|
||
|
memcpy((void *)tmp_addr,
|
||
|
(void *)&fimc_is_digits[draw_digit][i][0],
|
||
|
DBG_DIGIT_W * sizeof(unsigned char));
|
||
|
tmp_addr += byte_line_width;
|
||
|
}
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
divided_digit /= 10;
|
||
|
} while (divided_digit > 0);
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
void fimc_is_dmsg_init(void)
|
||
|
{
|
||
|
fimc_is_debug.dsentence_pos = 0;
|
||
|
memset(fimc_is_debug.dsentence, 0x0, DEBUG_SENTENCE_MAX);
|
||
|
}
|
||
|
|
||
|
void fimc_is_dmsg_concate(const char *fmt, ...)
|
||
|
{
|
||
|
va_list ap;
|
||
|
char term[50];
|
||
|
u32 copy_len;
|
||
|
|
||
|
va_start(ap, fmt);
|
||
|
vsnprintf(term, sizeof(term), fmt, ap);
|
||
|
va_end(ap);
|
||
|
|
||
|
copy_len = (u32)min((DEBUG_SENTENCE_MAX - fimc_is_debug.dsentence_pos), strlen(term));
|
||
|
strncpy(fimc_is_debug.dsentence + fimc_is_debug.dsentence_pos, term, copy_len);
|
||
|
fimc_is_debug.dsentence_pos += copy_len;
|
||
|
}
|
||
|
|
||
|
char *fimc_is_dmsg_print(void)
|
||
|
{
|
||
|
return fimc_is_debug.dsentence;
|
||
|
}
|
||
|
|
||
|
void fimc_is_print_buffer(char *buffer, size_t len)
|
||
|
{
|
||
|
u32 sentence_i;
|
||
|
size_t read_cnt;
|
||
|
char sentence[250];
|
||
|
char letter;
|
||
|
|
||
|
FIMC_BUG_VOID(!buffer);
|
||
|
|
||
|
sentence_i = 0;
|
||
|
|
||
|
for (read_cnt = 0; read_cnt < len; read_cnt++) {
|
||
|
letter = buffer[read_cnt];
|
||
|
if (letter) {
|
||
|
sentence[sentence_i] = letter;
|
||
|
if (sentence_i >= 247) {
|
||
|
sentence[sentence_i + 1] = '\n';
|
||
|
sentence[sentence_i + 2] = 0;
|
||
|
printk(KERN_DEBUG "%s", sentence);
|
||
|
sentence_i = 0;
|
||
|
} else if (letter == '\n') {
|
||
|
sentence[sentence_i + 1] = 0;
|
||
|
printk(KERN_DEBUG "%s", sentence);
|
||
|
sentence_i = 0;
|
||
|
} else {
|
||
|
sentence_i++;
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
int fimc_is_debug_probe(void)
|
||
|
{
|
||
|
fimc_is_debug.read_vptr = 0;
|
||
|
fimc_is_debug.minfo = NULL;
|
||
|
|
||
|
fimc_is_debug.dsentence_pos = 0;
|
||
|
memset(fimc_is_debug.dsentence, 0x0, DEBUG_SENTENCE_MAX);
|
||
|
|
||
|
|
||
|
#ifdef ENABLE_DBG_FS
|
||
|
fimc_is_debug.root = debugfs_create_dir(DEBUG_FS_ROOT_NAME, NULL);
|
||
|
if (fimc_is_debug.root)
|
||
|
probe_info("%s is created\n", DEBUG_FS_ROOT_NAME);
|
||
|
|
||
|
fimc_is_debug.logfile = debugfs_create_file(DEBUG_FS_LOGFILE_NAME, S_IRUSR,
|
||
|
fimc_is_debug.root, &fimc_is_debug, &debug_log_fops);
|
||
|
if (fimc_is_debug.logfile)
|
||
|
probe_info("%s is created\n", DEBUG_FS_LOGFILE_NAME);
|
||
|
|
||
|
fimc_is_debug.event_dir = debugfs_create_dir(DEBUG_FS_EVENT_DIR_NAME, fimc_is_debug.root);
|
||
|
fimc_is_debug_event.logfilter = debugfs_create_u32(DEBUG_FS_EVENT_FILTER, 0644,
|
||
|
fimc_is_debug.event_dir,
|
||
|
&fimc_is_debug_event.log_filter);
|
||
|
fimc_is_debug_event.log = debugfs_create_file(DEBUG_FS_EVENT_LOGFILE, 0644,
|
||
|
fimc_is_debug.event_dir,
|
||
|
&fimc_is_debug_event,
|
||
|
&debug_event_fops);
|
||
|
fimc_is_debug_event.logenable = debugfs_create_u32(DEBUG_FS_EVENT_LOGEN, 0644,
|
||
|
fimc_is_debug.event_dir,
|
||
|
&fimc_is_debug_event.log_enable);
|
||
|
|
||
|
fimc_is_debug_event.log_enable = 1;
|
||
|
fimc_is_debug_event.log_filter = (0x1 << FIMC_IS_EVENT_ALL) - 1;
|
||
|
|
||
|
#ifdef ENABLE_DBG_EVENT_PRINT
|
||
|
atomic_set(&fimc_is_debug_event.event_index, -1);
|
||
|
atomic_set(&fimc_is_debug_event.critical_log_tail, -1);
|
||
|
atomic_set(&fimc_is_debug_event.normal_log_tail, -1);
|
||
|
#endif
|
||
|
#endif
|
||
|
clear_bit(FIMC_IS_DEBUG_OPEN, &fimc_is_debug.state);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int fimc_is_debug_open(struct fimc_is_minfo *minfo)
|
||
|
{
|
||
|
/*
|
||
|
* debug control should be reset on camera entrance
|
||
|
* because firmware doesn't update this area after reset
|
||
|
*/
|
||
|
*((int *)(minfo->kvaddr_debug_cnt)) = 0;
|
||
|
fimc_is_debug.read_vptr = 0;
|
||
|
fimc_is_debug.minfo = minfo;
|
||
|
|
||
|
set_bit(FIMC_IS_DEBUG_OPEN, &fimc_is_debug.state);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
int fimc_is_debug_close(void)
|
||
|
{
|
||
|
clear_bit(FIMC_IS_DEBUG_OPEN, &fimc_is_debug.state);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* fimc_is_debug_dma_dump: dump buffer by fimc_is_queue.
|
||
|
* should be enable DBG_IMAGE_KMAPPING for kernel addr
|
||
|
* @queue: buffer info
|
||
|
* @index: buffer index
|
||
|
* @vid: video node id for filename
|
||
|
* @type: enum dbg_dma_dump_type
|
||
|
**/
|
||
|
int fimc_is_debug_dma_dump(struct fimc_is_queue *queue, u32 index, u32 vid, u32 type)
|
||
|
{
|
||
|
int i = 0;
|
||
|
int ret = 0;
|
||
|
u32 flags = 0;
|
||
|
int total_size = 0;
|
||
|
u32 framecount = 0;
|
||
|
char *filename;
|
||
|
struct vb2_buffer *buf;
|
||
|
struct fimc_is_binary bin;
|
||
|
buf = queue->vbq->bufs[index];
|
||
|
framecount = queue->framemgr.frames[index].fcount;
|
||
|
|
||
|
#ifdef DBG_DMA_DUMP_VID_COND
|
||
|
if (!DBG_DMA_DUMP_VID_COND(vid))
|
||
|
return 0;
|
||
|
#endif
|
||
|
/* manipulateed the count for dump */
|
||
|
if (((framecount - 1) % DBG_DMA_DUMP_INTEVAL) != 0)
|
||
|
return 0;
|
||
|
|
||
|
switch (type) {
|
||
|
case DBG_DMA_DUMP_IMAGE:
|
||
|
filename = __getname();
|
||
|
|
||
|
if (unlikely(!filename))
|
||
|
return -ENOMEM;
|
||
|
|
||
|
snprintf(filename, PATH_MAX, "%s/V%02d_F%08d_I%02d.raw",
|
||
|
DBG_DMA_DUMP_PATH, vid, framecount, index);
|
||
|
|
||
|
for (i = 0; i < (buf->num_planes - 1); i++) {
|
||
|
bin.data = (void *)queue->buf_kva[index][i];
|
||
|
bin.size = queue->framecfg.size[i];
|
||
|
|
||
|
if (!i) {
|
||
|
/* first plane for image */
|
||
|
flags = O_TRUNC | O_CREAT | O_EXCL | O_WRONLY | O_APPEND;
|
||
|
total_size += bin.size;
|
||
|
} else {
|
||
|
/* after first plane for image */
|
||
|
flags = O_WRONLY | O_APPEND;
|
||
|
total_size += bin.size;
|
||
|
}
|
||
|
|
||
|
ret = put_filesystem_binary(filename, &bin, flags);
|
||
|
if (ret) {
|
||
|
err("failed to dump %s (%d)", filename, ret);
|
||
|
__putname(filename);
|
||
|
return -EINVAL;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
info("[V%d][F%d] img dumped..(%s, %d)\n", vid, framecount, filename, total_size);
|
||
|
__putname(filename);
|
||
|
|
||
|
break;
|
||
|
case DBG_DMA_DUMP_META:
|
||
|
filename = __getname();
|
||
|
|
||
|
if (unlikely(!filename))
|
||
|
return -ENOMEM;
|
||
|
|
||
|
snprintf(filename, PATH_MAX, "%s/V%02d_F%08d_I%02d.meta",
|
||
|
DBG_DMA_DUMP_PATH, vid, framecount, index);
|
||
|
|
||
|
bin.data = (void *)queue->buf_kva[index][buf->num_planes - 1];
|
||
|
bin.size = queue->framecfg.size[buf->num_planes - 1];
|
||
|
|
||
|
/* last plane for meta */
|
||
|
flags = O_TRUNC | O_CREAT | O_EXCL | O_WRONLY;
|
||
|
total_size = bin.size;
|
||
|
|
||
|
ret = put_filesystem_binary(filename, &bin, flags);
|
||
|
if (ret) {
|
||
|
err("failed to dump %s (%d)", filename, ret);
|
||
|
__putname(filename);
|
||
|
return -EINVAL;
|
||
|
}
|
||
|
|
||
|
info("[V%d][F%d] meta dumped..(%s, %d)\n", vid, framecount, filename, total_size);
|
||
|
__putname(filename);
|
||
|
|
||
|
break;
|
||
|
default:
|
||
|
err("invalid type(%d)", type);
|
||
|
break;
|
||
|
}
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
static int isfw_debug_open(struct inode *inode, struct file *file)
|
||
|
{
|
||
|
if (inode->i_private)
|
||
|
file->private_data = inode->i_private;
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
#ifdef ENABLE_IS_CORE
|
||
|
static ssize_t isfw_debug_read(struct file *file, char __user *user_buf,
|
||
|
size_t buf_len, loff_t *ppos)
|
||
|
{
|
||
|
int ret = 0;
|
||
|
void *read_ptr;
|
||
|
size_t write_vptr, read_vptr, buf_vptr;
|
||
|
size_t read_cnt, read_cnt1, read_cnt2;
|
||
|
struct fimc_is_minfo *minfo;
|
||
|
|
||
|
if (!test_bit(FIMC_IS_DEBUG_OPEN, &fimc_is_debug.state))
|
||
|
return 0;
|
||
|
|
||
|
minfo = fimc_is_debug.minfo;
|
||
|
|
||
|
CALL_BUFOP(minfo->pb_fw, sync_for_cpu, minfo->pb_fw,
|
||
|
DEBUG_REGION_OFFSET, DEBUG_REGION_SIZE + 4, DMA_FROM_DEVICE);
|
||
|
|
||
|
write_vptr = *((int *)(minfo->kvaddr + DEBUGCTL_OFFSET)) - DEBUG_REGION_OFFSET;
|
||
|
read_vptr = fimc_is_debug.read_vptr;
|
||
|
buf_vptr = buf_len;
|
||
|
|
||
|
if (write_vptr >= read_vptr) {
|
||
|
read_cnt1 = write_vptr - read_vptr;
|
||
|
read_cnt2 = 0;
|
||
|
} else {
|
||
|
read_cnt1 = DEBUG_REGION_SIZE - read_vptr;
|
||
|
read_cnt2 = write_vptr;
|
||
|
}
|
||
|
|
||
|
if (buf_vptr && read_cnt1) {
|
||
|
read_ptr = (void *)(minfo->kvaddr + DEBUG_REGION_OFFSET + fimc_is_debug.read_vptr);
|
||
|
|
||
|
if (read_cnt1 > buf_vptr)
|
||
|
read_cnt1 = buf_vptr;
|
||
|
|
||
|
ret = copy_to_user(user_buf, read_ptr, read_cnt1);
|
||
|
if (ret) {
|
||
|
err("[DBG] failed copying %d bytes of debug log\n", ret);
|
||
|
return ret;
|
||
|
}
|
||
|
fimc_is_debug.read_vptr += read_cnt1;
|
||
|
buf_vptr -= read_cnt1;
|
||
|
}
|
||
|
|
||
|
if (fimc_is_debug.read_vptr >= DEBUG_REGION_SIZE) {
|
||
|
if (fimc_is_debug.read_vptr > DEBUG_REGION_SIZE)
|
||
|
err("[DBG] read_vptr(%zd) is invalid", fimc_is_debug.read_vptr);
|
||
|
fimc_is_debug.read_vptr = 0;
|
||
|
}
|
||
|
|
||
|
if (buf_vptr && read_cnt2) {
|
||
|
read_ptr = (void *)(minfo->kvaddr + DEBUG_REGION_OFFSET + fimc_is_debug.read_vptr);
|
||
|
|
||
|
if (read_cnt2 > buf_vptr)
|
||
|
read_cnt2 = buf_vptr;
|
||
|
|
||
|
ret = copy_to_user(user_buf, read_ptr, read_cnt2);
|
||
|
if (ret) {
|
||
|
err("[DBG] failed copying %d bytes of debug log\n", ret);
|
||
|
return ret;
|
||
|
}
|
||
|
fimc_is_debug.read_vptr += read_cnt2;
|
||
|
buf_vptr -= read_cnt2;
|
||
|
}
|
||
|
|
||
|
read_cnt = buf_len - buf_vptr;
|
||
|
|
||
|
/* info("[DBG] FW_READ : read_vptr(%zd), write_vptr(%zd) - dump(%zd)\n", read_vptr, write_vptr, read_cnt); */
|
||
|
|
||
|
return read_cnt;
|
||
|
}
|
||
|
#else
|
||
|
static ssize_t isfw_debug_read(struct file *file, char __user *user_buf,
|
||
|
size_t buf_len, loff_t *ppos)
|
||
|
{
|
||
|
int ret = 0;
|
||
|
void *read_ptr;
|
||
|
size_t write_vptr, read_vptr, buf_vptr;
|
||
|
size_t read_cnt, read_cnt1, read_cnt2;
|
||
|
struct fimc_is_minfo *minfo;
|
||
|
|
||
|
if (!test_bit(FIMC_IS_DEBUG_OPEN, &fimc_is_debug.state))
|
||
|
return 0;
|
||
|
|
||
|
minfo = fimc_is_debug.minfo;
|
||
|
|
||
|
write_vptr = *((int *)(minfo->kvaddr_debug_cnt));
|
||
|
read_vptr = fimc_is_debug.read_vptr;
|
||
|
buf_vptr = buf_len;
|
||
|
|
||
|
if (write_vptr >= read_vptr) {
|
||
|
read_cnt1 = write_vptr - read_vptr;
|
||
|
read_cnt2 = 0;
|
||
|
} else {
|
||
|
read_cnt1 = DEBUG_REGION_SIZE - read_vptr;
|
||
|
read_cnt2 = write_vptr;
|
||
|
}
|
||
|
|
||
|
if (buf_vptr && read_cnt1) {
|
||
|
read_ptr = (void *)(minfo->kvaddr_debug + fimc_is_debug.read_vptr);
|
||
|
|
||
|
if (read_cnt1 > buf_vptr)
|
||
|
read_cnt1 = buf_vptr;
|
||
|
|
||
|
ret = copy_to_user(user_buf, read_ptr, read_cnt1);
|
||
|
if (ret) {
|
||
|
err("[DBG] failed copying %d bytes of debug log\n", ret);
|
||
|
return ret;
|
||
|
}
|
||
|
fimc_is_debug.read_vptr += read_cnt1;
|
||
|
buf_vptr -= read_cnt1;
|
||
|
}
|
||
|
|
||
|
if (fimc_is_debug.read_vptr >= DEBUG_REGION_SIZE) {
|
||
|
if (fimc_is_debug.read_vptr > DEBUG_REGION_SIZE)
|
||
|
err("[DBG] read_vptr(%zd) is invalid", fimc_is_debug.read_vptr);
|
||
|
fimc_is_debug.read_vptr = 0;
|
||
|
}
|
||
|
|
||
|
if (buf_vptr && read_cnt2) {
|
||
|
read_ptr = (void *)(minfo->kvaddr_debug + fimc_is_debug.read_vptr);
|
||
|
|
||
|
if (read_cnt2 > buf_vptr)
|
||
|
read_cnt2 = buf_vptr;
|
||
|
|
||
|
ret = copy_to_user(user_buf, read_ptr, read_cnt2);
|
||
|
if (ret) {
|
||
|
err("[DBG] failed copying %d bytes of debug log\n", ret);
|
||
|
return ret;
|
||
|
}
|
||
|
fimc_is_debug.read_vptr += read_cnt2;
|
||
|
buf_vptr -= read_cnt2;
|
||
|
}
|
||
|
|
||
|
read_cnt = buf_len - buf_vptr;
|
||
|
|
||
|
/* info("[DBG] FW_READ : read_vptr(%zd), write_vptr(%zd) - dump(%zd)\n", read_vptr, write_vptr, read_cnt); */
|
||
|
|
||
|
return read_cnt;
|
||
|
}
|
||
|
|
||
|
#endif
|
||
|
|
||
|
static const struct file_operations debug_log_fops = {
|
||
|
.open = isfw_debug_open,
|
||
|
.read = isfw_debug_read,
|
||
|
.llseek = default_llseek
|
||
|
};
|
||
|
|
||
|
struct seq_file *seq_f;
|
||
|
|
||
|
/* this func for print seq_msg
|
||
|
in fimc_is_debug_event_add(callfunc) */
|
||
|
void fimc_is_dbg_print(char *fmt, ...)
|
||
|
{
|
||
|
char buf[512] = {0, };
|
||
|
va_list ap;
|
||
|
|
||
|
va_start(ap, fmt);
|
||
|
vsprintf(buf, fmt, ap);
|
||
|
va_end(ap);
|
||
|
seq_printf(seq_f, buf);
|
||
|
}
|
||
|
|
||
|
static int fimc_is_event_show(struct seq_file *s, void *unused)
|
||
|
{
|
||
|
struct fimc_is_debug_event *event_log = s->private;
|
||
|
|
||
|
fimc_is_debug_info_dump(s, event_log);
|
||
|
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
static int fimc_is_debug_event_open(struct inode *inode, struct file *file)
|
||
|
{
|
||
|
return single_open(file, fimc_is_event_show, inode->i_private);
|
||
|
}
|
||
|
|
||
|
#ifdef ENABLE_DBG_EVENT_PRINT
|
||
|
void fimc_is_debug_event_print(fimc_is_event_store_type_t event_store_type,
|
||
|
void (*callfunc)(void *),
|
||
|
void *ptrdata,
|
||
|
size_t datasize,
|
||
|
const char *fmt, ...)
|
||
|
{
|
||
|
int index;
|
||
|
struct fimc_is_debug_event_log *event_log;
|
||
|
unsigned int log_num;
|
||
|
va_list args;
|
||
|
|
||
|
if (fimc_is_debug_event.log_enable == 0)
|
||
|
return;
|
||
|
|
||
|
switch (event_store_type) {
|
||
|
case FIMC_IS_EVENT_CRITICAL:
|
||
|
index = atomic_inc_return(&fimc_is_debug_event.critical_log_tail);
|
||
|
if (index >= FIMC_IS_EVENT_MAX_NUM - 1) {
|
||
|
if (index % LOG_INTERVAL_OF_WARN == 0)
|
||
|
warn("critical event log buffer full...!");
|
||
|
|
||
|
return;
|
||
|
}
|
||
|
event_log = &fimc_is_debug_event.event_log_critical[index];
|
||
|
break;
|
||
|
case FIMC_IS_EVENT_NORMAL:
|
||
|
index = atomic_inc_return(&fimc_is_debug_event.normal_log_tail) &
|
||
|
(FIMC_IS_EVENT_MAX_NUM - 1);
|
||
|
|
||
|
event_log = &fimc_is_debug_event.event_log_normal[index];
|
||
|
break;
|
||
|
default:
|
||
|
warn("invalid event type(%d)", event_store_type);
|
||
|
goto p_err;
|
||
|
}
|
||
|
|
||
|
log_num = atomic_inc_return(&fimc_is_debug_event.event_index);
|
||
|
|
||
|
event_log->time = ktime_get();
|
||
|
va_start(args, fmt);
|
||
|
vsnprintf(event_log->dbg_msg, sizeof(event_log->dbg_msg), fmt, args);
|
||
|
va_end(args);
|
||
|
event_log->log_num = log_num;
|
||
|
event_log->event_store_type = event_store_type;
|
||
|
event_log->callfunc = callfunc;
|
||
|
event_log->cpu = raw_smp_processor_id();
|
||
|
|
||
|
/* ptrdata should be used in non-atomic context */
|
||
|
if (!in_atomic()) {
|
||
|
if (event_log->ptrdata) {
|
||
|
vfree(event_log->ptrdata);
|
||
|
event_log->ptrdata = NULL;
|
||
|
}
|
||
|
|
||
|
if (datasize) {
|
||
|
event_log->ptrdata = vmalloc(datasize);
|
||
|
if (event_log->ptrdata)
|
||
|
memcpy(event_log->ptrdata, ptrdata, datasize);
|
||
|
else
|
||
|
warn("couldn't allocate ptrdata");
|
||
|
}
|
||
|
}
|
||
|
|
||
|
p_err:
|
||
|
return;
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
void fimc_is_debug_event_count(fimc_is_event_store_type_t event_store_type)
|
||
|
{
|
||
|
|
||
|
switch (event_store_type) {
|
||
|
case FIMC_IS_EVENT_OVERFLOW_CSI:
|
||
|
atomic_inc(&fimc_is_debug_event.overflow_csi);
|
||
|
break;
|
||
|
case FIMC_IS_EVENT_OVERFLOW_3AA:
|
||
|
atomic_inc(&fimc_is_debug_event.overflow_3aa);
|
||
|
break;
|
||
|
default:
|
||
|
warn("invalid event type(%d)", event_store_type);
|
||
|
goto p_err;
|
||
|
}
|
||
|
|
||
|
p_err:
|
||
|
return;
|
||
|
}
|
||
|
|
||
|
int fimc_is_debug_info_dump(struct seq_file *s, struct fimc_is_debug_event *debug_event)
|
||
|
{
|
||
|
seq_f = s;
|
||
|
seq_printf(s, "------------------- FIMC-IS EVENT LOGGER - START --------------\n");
|
||
|
|
||
|
#ifdef ENABLE_DBG_EVENT_PRINT
|
||
|
{
|
||
|
int index_normal = 0;
|
||
|
int latest_normal = atomic_read(&fimc_is_debug_event.normal_log_tail);
|
||
|
int index_critical = 0;
|
||
|
int latest_critical = atomic_read(&fimc_is_debug_event.critical_log_tail);
|
||
|
bool normal_done = 0;
|
||
|
bool critical_done = 0;
|
||
|
struct timeval tv;
|
||
|
struct fimc_is_debug_event_log *log_critical;
|
||
|
struct fimc_is_debug_event_log *log_normal;
|
||
|
struct fimc_is_debug_event_log *log_print;
|
||
|
|
||
|
if ((latest_normal < 0) || !(fimc_is_debug_event.log_filter & FIMC_IS_EVENT_NORMAL))
|
||
|
normal_done = 1; /* normal log empty */
|
||
|
else if (latest_normal > FIMC_IS_EVENT_MAX_NUM - 1)
|
||
|
index_normal = (latest_normal % FIMC_IS_EVENT_MAX_NUM) + 1;
|
||
|
else
|
||
|
index_normal = 0;
|
||
|
|
||
|
latest_normal = latest_normal % FIMC_IS_EVENT_MAX_NUM;
|
||
|
|
||
|
if ((latest_critical < 0) || !(fimc_is_debug_event.log_filter & FIMC_IS_EVENT_CRITICAL))
|
||
|
critical_done = 1; /* critical log empty */
|
||
|
|
||
|
while (!(normal_done) || !(critical_done)) {
|
||
|
index_normal = index_normal % FIMC_IS_EVENT_MAX_NUM;
|
||
|
index_critical = index_critical % FIMC_IS_EVENT_MAX_NUM;
|
||
|
log_normal = &fimc_is_debug_event.event_log_normal[index_normal];
|
||
|
log_critical = &fimc_is_debug_event.event_log_critical[index_critical];
|
||
|
|
||
|
if (!normal_done && !critical_done) {
|
||
|
if (log_normal->log_num < log_critical->log_num) {
|
||
|
log_print = log_normal;
|
||
|
index_normal++;
|
||
|
} else {
|
||
|
log_print = log_critical;
|
||
|
index_critical++;
|
||
|
}
|
||
|
} else if (!normal_done) {
|
||
|
log_print = log_normal;
|
||
|
index_normal++;
|
||
|
} else if (!critical_done) {
|
||
|
log_print = log_critical;
|
||
|
index_critical++;
|
||
|
}
|
||
|
|
||
|
if (latest_normal == index_normal)
|
||
|
normal_done = 1;
|
||
|
|
||
|
if (latest_critical == index_critical)
|
||
|
critical_done = 1;
|
||
|
|
||
|
tv = ktime_to_timeval(log_print->time);
|
||
|
seq_printf(s, "[%d][%6ld.%06ld] num(%d) ", log_print->cpu,
|
||
|
tv.tv_sec, tv.tv_usec, log_print->log_num);
|
||
|
seq_printf(s, "%s\n", log_print->dbg_msg);
|
||
|
|
||
|
if (log_print->callfunc != NULL)
|
||
|
log_print->callfunc(log_print->ptrdata);
|
||
|
|
||
|
}
|
||
|
}
|
||
|
#endif
|
||
|
|
||
|
seq_printf(s, "overflow: csi(%d), 3aa(%d)\n",
|
||
|
atomic_read(&debug_event->overflow_csi),
|
||
|
atomic_read(&debug_event->overflow_3aa));
|
||
|
|
||
|
seq_printf(s, "------------------- FIMC-IS EVENT LOGGER - END ----------------\n");
|
||
|
return 0;
|
||
|
}
|
||
|
|
||
|
static const struct file_operations debug_event_fops = {
|
||
|
.open = fimc_is_debug_event_open,
|
||
|
.read = seq_read,
|
||
|
.llseek = seq_lseek,
|
||
|
.release = seq_release,
|
||
|
};
|