static int osd_shutdown_flag;
unsigned int osd_log_level;
+unsigned int osd_log_module = 1;
+
int int_viu_vsync = -ENXIO;
int int_viu2_vsync = -ENXIO;
int int_rdma = INT_RDMA;
|| (var->blue.length == 0) ||
var->bits_per_pixel != (var->red.length + var->green.length +
var->blue.length + var->transp.length)) {
- osd_log_dbg("not provide color length, use default color\n");
+ osd_log_dbg(MODULE_BASE, "not provide color length, use default color\n");
found = &default_color_format_array[upper_margin];
} else {
for (i = upper_margin; i >= lower_margin; i--) {
if (color_format_pt == NULL || color_format_pt->color_index == 0)
return -EFAULT;
- osd_log_dbg("select color format :index %d, bpp %d\n",
+ osd_log_dbg(MODULE_BASE, "select color format :index %d, bpp %d\n",
color_format_pt->color_index,
color_format_pt->bpp);
fbdev->color = color_format_pt;
var->transp.length = color_format_pt->transp_length;
var->transp.msb_right = color_format_pt->transp_msb_right;
var->bits_per_pixel = color_format_pt->bpp;
- osd_log_dbg("rgba(L/O):%d/%d-%d/%d-%d/%d-%d/%d\n",
+ osd_log_dbg(MODULE_BASE, "rgba(L/O):%d/%d-%d/%d-%d/%d-%d/%d\n",
var->red.length, var->red.offset,
var->green.length, var->green.offset,
var->blue.length, var->blue.offset,
fix->visual = color_format_pt->color_type;
/* adjust memory length. */
fix->line_length = var->xres_virtual * var->bits_per_pixel / 8;
- osd_log_dbg("xvirtual=%d, bpp:%d, line_length=%d\n",
+ osd_log_dbg(MODULE_BASE, "xvirtual=%d, bpp:%d, line_length=%d\n",
var->xres_virtual, var->bits_per_pixel, fix->line_length);
if (var->xres_virtual < var->xres)
case COLOR_INDEX_24_888_B:
case COLOR_INDEX_24_RGB:
case COLOR_INDEX_YUV_422:
- osd_log_dbg("set osd color key 0x%x\n", src_colorkey);
+ osd_log_dbg(MODULE_BASE,
+ "set osd color key 0x%x\n", src_colorkey);
fbdev->color_key = src_colorkey;
osd_set_color_key_hw(info->node,
fbdev->color->color_index, src_colorkey);
case COLOR_INDEX_24_888_B:
case COLOR_INDEX_24_RGB:
case COLOR_INDEX_YUV_422:
- osd_log_dbg("set osd color key %s\n",
+ osd_log_dbg(MODULE_BASE, "set osd color key %s\n",
srckey_enable ? "enable" : "disable");
if (srckey_enable != 0) {
fbdev->enable_key_flag |= KEYCOLOR_FLAG_TARGET;
osd_log_err("fb[%d] ioremap error", fb_index);
pr_info("%s, reserved mem\n", __func__);
#endif
- osd_log_dbg("fb_index=%d dma_alloc=%zu\n",
+ osd_log_dbg(MODULE_BASE, "fb_index=%d dma_alloc=%zu\n",
fb_index, fb_rmem_size[fb_index]);
}
} else {
fbdev = (struct osd_fb_dev_s *)info->par;
fbdev->open_count++;
- osd_log_dbg("osd_open index=%d,open_count=%d\n",
+ osd_log_dbg(MODULE_BASE, "osd_open index=%d,open_count=%d\n",
fbdev->fb_index, fbdev->open_count);
if (info->screen_base != NULL)
return 0;
struct fb_info *fbi)
{
osd_pan_display_hw(fbi->node, var->xoffset, var->yoffset);
- osd_log_dbg("osd_pan_display:=>osd%d xoff=%d, yoff=%d\n",
+ osd_log_dbg(MODULE_BASE, "osd_pan_display:=>osd%d xoff=%d, yoff=%d\n",
fbi->node, var->xoffset, var->yoffset);
return 0;
}
*/
fb_dev->osd_ctl.disp_start_x = disp_rect->x;
fb_dev->osd_ctl.disp_start_y = disp_rect->y;
- osd_log_dbg("set disp axis: x:%d y:%d w:%d h:%d\n",
+ osd_log_dbg(MODULE_BASE, "set disp axis: x:%d y:%d w:%d h:%d\n",
disp_rect->x, disp_rect->y,
disp_rect->w, disp_rect->h);
if (disp_rect->x + disp_rect->w > vinfo->width)
fb_dev->osd_ctl.disp_start_y +
disp_rect->h - 1;
disp_rect++;
- osd_log_dbg("new disp axis: x0:%d y0:%d x1:%d y1:%d\n",
+ osd_log_dbg(MODULE_BASE, "new disp axis: x0:%d y0:%d x1:%d y1:%d\n",
fb_dev->osd_ctl.disp_start_x,
fb_dev->osd_ctl.disp_start_y,
fb_dev->osd_ctl.disp_end_x,
*/
fb_dev->osd_ctl.disp_start_x = disp_rect->x;
fb_dev->osd_ctl.disp_start_y = disp_rect->y;
- osd_log_dbg("set disp axis: x:%d y:%d w:%d h:%d\n",
+ osd_log_dbg(MODULE_BASE, "set disp axis: x:%d y:%d w:%d h:%d\n",
disp_rect->x, disp_rect->y,
disp_rect->w, disp_rect->h);
if (disp_rect->x + disp_rect->w > vinfo->width)
fb_dev->osd_ctl.disp_end_y =
fb_dev->osd_ctl.disp_start_y +
disp_rect->h - 1;
- osd_log_dbg("new disp axis: x0:%d y0:%d x1:%d y1:%d\n",
+ osd_log_dbg(MODULE_BASE, "new disp axis: x0:%d y0:%d x1:%d y1:%d\n",
fb_dev->osd_ctl.disp_start_x,
fb_dev->osd_ctl.disp_start_y,
fb_dev->osd_ctl.disp_end_x,
return count;
}
+static ssize_t show_log_module(struct device *device,
+ struct device_attribute *attr,
+ char *buf)
+{
+ return snprintf(buf, 40, "0x%x\n", osd_log_module);
+}
+
+static ssize_t store_log_module(struct device *device,
+ struct device_attribute *attr,
+ const char *buf, size_t count)
+{
+ int res = 0;
+ int ret = 0;
+
+ ret = kstrtoint(buf, 0, &res);
+ osd_log_info("log_module: 0x%x->0x%x\n", osd_log_module, res);
+ osd_log_module = res;
+
+ return count;
+}
+
static ssize_t store_order(struct device *device, struct device_attribute *attr,
const char *buf, size_t count)
{
show_debug, store_debug),
__ATTR(log_level, 0644,
show_log_level, store_log_level),
+ __ATTR(log_module, 0644,
+ show_log_module, store_log_module),
__ATTR(window_axis, 0664,
show_window_axis, store_window_axis),
__ATTR(freescale_mode, 0664,
show_debug, store_debug),
__ATTR(log_level, 0644,
show_log_level, store_log_level),
+ __ATTR(log_module, 0644,
+ show_log_module, store_log_module),
__ATTR(flush_rate, 0444,
show_flush_rate, NULL),
__ATTR(osd_reverse, 0644,
} else
osd_log_info("viu2 vsync irq: %d\n", int_viu2_vsync);
}
-
if (osd_meson_dev.has_rdma) {
int_rdma = platform_get_irq_byname(pdev, "rdma");
if (int_viu_vsync == -ENXIO) {
pr_err("allocate buffer failed:%d\n",
fb_memsize[0]);
}
- osd_log_dbg("logo dma_alloc=%d\n",
+ osd_log_dbg(MODULE_BASE, "logo dma_alloc=%d\n",
fb_memsize[0]);
}
} else
#define OSD_TYPE_BOT_FIELD 1
#define OSD_DISP_DEBUG 1
-#define ENCP_LINE_VSYNC 15
-#define ENCP_LINE 16
#define OSD_OLD_HWC (0x01 << 0)
#define OSD_OTHER_NEW_HWC (0x01 << 1)
#define OSD_G12A_NEW_HWC (0x01 << 2)
fence_map->layer_map[index].out_fd =
out_fence_create(&out_fence_fd);
mutex_unlock(&post_fence_list_lock);
- osd_log_dbg("sync_render_layers_fence:osd%d: ind_fd=%d,out_fd=%d\n",
+ osd_log_dbg(MODULE_FENCE, "sync_render_layers_fence:osd%d: ind_fd=%d,out_fd=%d\n",
fence_map->layer_map[index].fb_index,
fence_map->layer_map[index].in_fd,
fence_map->layer_map[index].out_fd);
cnt++;
line = get_encp_line();
- if (osd_hw.osd_display_debug == ENCP_LINE)
- osd_log_info(
+ osd_log_dbg2(MODULE_RENDER,
"enter osd_sync_request_render:cnt=%d,encp line=%d\n",
cnt, line);
if (request->magic == FB_SYNC_REQUEST_RENDER_MAGIC_V1)
int line;
line = get_encp_line();
- if (osd_hw.osd_display_debug == ENCP_LINE)
- osd_log_info(
- "enter osd_sync_do_hwc:cnt=%d,encp line=%d\n",
- cnt, line);
+ osd_log_dbg2(MODULE_RENDER,
+ "enter osd_sync_do_hwc:cnt=%d,encp line=%d\n",
+ cnt, line);
fence_map = kzalloc(
sizeof(struct osd_layers_fence_map_s), GFP_KERNEL);
if (!fence_map)
set_logo_loaded();
}
}
- osd_log_dbg("osd_sync_do_hwc :out_fence_fd=%d\n",
+ osd_log_dbg(MODULE_FENCE, "osd_sync_do_hwc :out_fence_fd=%d\n",
out_fence_fd);
return out_fence_fd;
}
else
ret = 1;
- osd_log_dbg("osd_wait_buf_ready_combine:osd%d,in_fd=%d\n",
+ osd_log_dbg(MODULE_FENCE, "osd_wait_buf_ready_combine:osd%d,in_fd=%d\n",
layer_map->fb_index, layer_map->in_fd);
return ret;
}
map_layers.layer_map[index].enable = enable;
map_layers.cmd = BLANK_CMD;
mutex_unlock(&post_fence_list_lock);
- osd_log_dbg("osd_set_enable_hw: osd%d,enable=%d\n",
+ osd_log_dbg(MODULE_BASE, "osd_set_enable_hw: osd%d,enable=%d\n",
index, enable);
#endif
}
status = VSYNCOSD_RD_MPEG_REG(VPU_MAFBC_IRQ_RAW_STATUS);
if (status & 0x3c) {
- osd_log_dbg("afbc error happened\n");
+ osd_log_dbg(MODULE_BASE, "afbc error happened\n");
osd_hw.afbc_err_cnt++;
error = true;
}
data32 = r << 24 | g << 16 | b << 8 | a;
if (osd_hw.color_key[index] != data32) {
osd_hw.color_key[index] = data32;
- osd_log_dbg2("bpp:%d--r:0x%x g:0x%x b:0x%x ,a:0x%x\n",
- color_index, r, g, b, a);
+ osd_log_dbg2(MODULE_BASE,
+ "bpp:%d--r:0x%x g:0x%x b:0x%x ,a:0x%x\n",
+ color_index, r, g, b, a);
add_to_update_list(index, OSD_COLOR_KEY);
osd_wait_vsync_hw();
}
osd_hw.pandata[OSD2].y_end = offset + height_osd1 - 1;
if (osd_hw.angle[OSD2]) {
if (debug_flag)
- osd_log_dbg("++ osd_clone_pan start when enable clone\n");
+ osd_log_dbg(MODULE_BASE, "++ osd_clone_pan start when enable clone\n");
osd_clone_update_pan(osd0_buffer_number);
}
add_to_update_list(OSD2, DISP_GEOMETRY);
osd_set_dummy_data(index, 0);
else
osd_set_dummy_data(index, 0xff);
- osd_log_dbg("direct pandata x=%d,x_end=%d,y=%d,y_end=%d,width=%d,height=%d\n",
+ osd_log_dbg(MODULE_BASE,
+ "direct pandata x=%d,x_end=%d,y=%d,y_end=%d,width=%d,height=%d\n",
osd_hw.pandata[index].x_start,
osd_hw.pandata[index].x_end,
osd_hw.pandata[index].y_start,
osd_hw.pandata[index].y_end,
fence_map->width,
fence_map->height);
- osd_log_dbg("fence_map:xoffset=%d,yoffset=%d\n",
+ osd_log_dbg(MODULE_BASE,
+ "fence_map:xoffset=%d,yoffset=%d\n",
fence_map->xoffset,
fence_map->yoffset);
- osd_log_dbg("fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d,byte_stride=%d\n",
+ osd_log_dbg(MODULE_BASE,
+ "fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d,byte_stride=%d\n",
fence_map->dst_x,
fence_map->dst_y,
fence_map->dst_w,
if (timeline_created) { /* out fence created success. */
ret = osd_wait_buf_ready(fence_map);
if (ret < 0)
- osd_log_dbg("fence wait ret %d\n", ret);
+ osd_log_dbg(MODULE_BASE, "fence wait ret %d\n", ret);
}
if (ret) {
osd_hw.buffer_alloc[index] = 1;
&osd_hw.free_dst_data_backup[index],
sizeof(struct pandata_s));
osd_set_dummy_data(index, 0xff);
- osd_log_dbg("switch back dispdata_backup x=%d,x_end=%d,y=%d,y_end=%d\n",
+ osd_log_dbg(MODULE_BASE,
+ "switch back dispdata_backup x=%d,x_end=%d,y=%d,y_end=%d\n",
osd_hw.dispdata_backup[index].x_start,
osd_hw.dispdata_backup[index].x_end,
osd_hw.dispdata_backup[index].y_start,
&& (fence_map->cmd == LAYER_SYNC)) {
ret = osd_wait_buf_ready_combine(layer_map);
if (ret < 0)
- osd_log_dbg("fence wait ret %d\n", ret);
+ osd_log_dbg(MODULE_FENCE,
+ "fence wait ret %d\n", ret);
}
osd_pan_display_update_info(layer_map);
save_layer_info(layer_map);
/* single step mode */
if (osd_hw.osd_debug.osd_single_step > 0) {
osd_timeline_increase();
- osd_log_dbg("signal out fence\n");
+ osd_log_dbg(MODULE_FENCE, "signal out fence\n");
osd_hw.osd_debug.osd_single_step--;
} else
osd_hw.osd_debug.wait_fence_release = true;
#ifdef CONFIG_AMLOGIC_MEDIA_FB_EXT
osd_ext_clone_pan(index);
#endif
- osd_log_dbg2("offset[%d-%d]x[%d-%d]y[%d-%d]\n",
+ osd_log_dbg2(MODULE_BASE, "offset[%d-%d]x[%d-%d]y[%d-%d]\n",
xoffset, yoffset,
osd_hw.pandata[index].x_start,
osd_hw.pandata[index].x_end,
{
int temp1 = 0, temp2 = 0;
- osd_log_dbg("need exchange osd din0 and din2 order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange osd din0 and din2 order\n");
temp1 = blending->din_reoder_sel & 0x000f;
temp2 = blending->din_reoder_sel & 0x0f00;
blending->din_reoder_sel &= ~0x0f0f;
temp2 = blending->osd_to_bdin_table[2];
blending->osd_to_bdin_table[2] = temp1;
blending->osd_to_bdin_table[0] = temp2;
- osd_log_dbg("din_reoder_sel%x\n",
+ osd_log_dbg(MODULE_BLEND, "din_reoder_sel%x\n",
blending->din_reoder_sel);
}
{
int temp1 = 0, temp2 = 0;
- osd_log_dbg("need exchange osd din2 and din3 order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange osd din2 and din3 order\n");
temp1 = blending->din_reoder_sel & 0x0f00;
temp2 = blending->din_reoder_sel & 0xf000;
blending->din_reoder_sel &= ~0xff00;
temp2 = blending->osd_to_bdin_table[3];
blending->osd_to_bdin_table[3] = temp1;
blending->osd_to_bdin_table[2] = temp2;
- osd_log_dbg("din_reoder_sel%x\n",
+ osd_log_dbg(MODULE_BLEND, "din_reoder_sel%x\n",
blending->din_reoder_sel);
}
static void exchange_vpp_order(struct hw_osd_blending_s *blending)
{
blending->b_exchange_blend_in = true;
- osd_log_dbg("need exchange vpp order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange vpp order\n");
}
static void generate_blend_din_table(struct hw_osd_blending_s *blending)
j++;
}
}
- osd_log_dbg("blend_din4==%d\n",
+ osd_log_dbg(MODULE_BLEND, "blend_din4==%d\n",
blending->reorder[temp_index[0]]);
- osd_log_dbg("blend_din1==%d\n",
+ osd_log_dbg(MODULE_BLEND, "blend_din1==%d\n",
blending->reorder[temp_index[1]]);
/* mode A_C */
if (blending->osd_blend_mode == OSD_BLEND_A_C) {
if (blending->reorder[temp_index[0]] <
blending->reorder[temp_index[1]]) {
blending->b_exchange_blend_in = true;
- osd_log_dbg("need exchange vpp order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange vpp order\n");
}
} else {
if (blending->reorder[temp_index[0]] <
/* blend_din1 -- osdx */
blending->osd_to_bdin_table[0] = temp_index[1];
blending->b_exchange_din = true;
- osd_log_dbg("need exchange osd din order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange osd din order\n");
} else {
/* blend_din1 */
blending->din_reoder_sel |=
}
case 3:
/* blend_din1 is bottom, blend_din4 is top layer */
- osd_log_dbg("reorder:%d,%d,%d\n",
+ osd_log_dbg(MODULE_BLEND, "reorder:%d,%d,%d\n",
blending->reorder[OSD1],
blending->reorder[OSD2],
blending->reorder[OSD3]);
if ((blending->reorder[OSD1] == LAYER_3)
&& (blending->reorder[OSD2] == LAYER_2)
&& (blending->reorder[OSD3] == LAYER_1)) {
- osd_log_dbg2("use default order\n");
+ osd_log_dbg2(MODULE_BLEND,
+ "use default order\n");
} else if ((blending->reorder[OSD1] == LAYER_2)
&& (blending->reorder[OSD2] == LAYER_3)
&& (blending->reorder[OSD3] == LAYER_1)) {
temp2 |= (0x04 << (i*4));
}
blending->din_reoder_sel |= temp2;
- osd_log_dbg("osd_to_bdin_table[i]=[%x,%x,%x,%x]\n",
+ osd_log_dbg(MODULE_BLEND, "osd_to_bdin_table[i]=[%x,%x,%x,%x]\n",
blending->osd_to_bdin_table[0],
blending->osd_to_bdin_table[1],
blending->osd_to_bdin_table[2],
j++;
}
}
- osd_log_dbg("blend_din4==%d\n",
+ osd_log_dbg(MODULE_BLEND, "blend_din4==%d\n",
blending->reorder[temp_index[0]]);
- osd_log_dbg("blend_din1==%d\n",
+ osd_log_dbg(MODULE_BLEND, "blend_din1==%d\n",
blending->reorder[temp_index[1]]);
/* mode A_C */
if (blending->osd_blend_mode == OSD_BLEND_A_C) {
if (blending->reorder[temp_index[0]] <
blending->reorder[temp_index[1]]) {
blending->b_exchange_blend_in = true;
- osd_log_dbg("need exchange vpp order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange vpp order\n");
}
} else {
if (blending->reorder[temp_index[0]] <
/* blend_din1 -- osdx */
blending->osd_to_bdin_table[0] = temp_index[1];
blending->b_exchange_din = true;
- osd_log_dbg("need exchange osd din order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange osd din order\n");
} else {
/* blend_din1 */
blending->din_reoder_sel |=
if (blending->reorder[OSD1] < blending->reorder[OSD3]) {
if (blending->osd_blend_mode == OSD_BLEND_A_BC) {
blending->b_exchange_blend_in = true;
- osd_log_dbg("need exchange vpp order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange vpp order\n");
} else {
u32 temp1, temp2;
blending->b_exchange_din = true;
- osd_log_dbg("need exchange osd din order\n");
+ osd_log_dbg(MODULE_BLEND, "need exchange osd din order\n");
temp1 = blending->osd_to_bdin_table[2];
temp2 = blending->osd_to_bdin_table[3];
blending->osd_to_bdin_table[3] =
}
break;
}
- osd_log_dbg("osd_to_bdin_table[i]=[%x,%x,%x,%x]\n",
+ osd_log_dbg(MODULE_BLEND, "osd_to_bdin_table[i]=[%x,%x,%x,%x]\n",
blending->osd_to_bdin_table[0],
blending->osd_to_bdin_table[1],
blending->osd_to_bdin_table[2],
osd_hw.dst_data[index].y +
osd_hw.dst_data[index].h - 1;
- osd_log_dbg("osd%d_hw.dst_data:%d,%d,%d,%d\n",
+ osd_log_dbg(MODULE_BLEND, "osd%d_hw.dst_data:%d,%d,%d,%d\n",
index,
osd_hw.dst_data[index].x,
osd_hw.dst_data[index].y,
osd_hw.dst_data[index].w,
osd_hw.dst_data[index].h);
- osd_log_dbg("h,v axis:%d,%d,%d,%d\n",
+ osd_log_dbg(MODULE_BLEND, "h,v axis:%d,%d,%d,%d\n",
bld_osd_h_start,
bld_osd_h_end,
bld_osd_v_start,
u32 osd1_h_start = 0, osd1_h_end = 0;
u32 osd1_v_start = 0, osd1_v_end = 0;
- osd_log_dbg("vpp_blend_setting_default\n");
+ osd_log_dbg(MODULE_BASE, "vpp_blend_setting_default\n");
if (index > OSD3) {
osd_log_err("error osd index=%d\n", index);
}
insert_sort(order, osd_count);
//check_order_continuous(order);
- osd_log_dbg2("after sort:zorder:%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "after sort:zorder:%d,%d,%d\n",
order[0], order[1], order[2]);
/* reorder[i] = osd[i]'s display layer */
}
}
}
- osd_log_dbg2("after reorder:zorder:%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "after reorder:zorder:%d,%d,%d\n",
blending->reorder[0],
blending->reorder[1],
blending->reorder[2]);
break;
}
blending->osd_blend_mode = osd_blend_mode;
- osd_log_dbg2("osd_blend_mode=%d\n",
+ osd_log_dbg2(MODULE_BLEND, "osd_blend_mode=%d\n",
blending->osd_blend_mode);
}
if (!blending)
return;
layer_blend = &(blending->layer_blend);
- osd_log_dbg2("calc_max_output input1_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "calc_max_output input1_data:%d,%d,%d,%d\n",
layer_blend->input1_data.x,
layer_blend->input1_data.y,
layer_blend->input1_data.w,
layer_blend->input1_data.h);
- osd_log_dbg2("calc_max_output input2_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "calc_max_output input2_data:%d,%d,%d,%d\n",
layer_blend->input2_data.x,
layer_blend->input2_data.y,
layer_blend->input2_data.w,
+ layer_blend->input1_data.w;
layer_blend->output_data.h = layer_blend->input1_data.y
+ layer_blend->input1_data.h;
- osd_log_dbg2("blend0:input1_data[osd%d]:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend0:input1_data[osd%d]:%d,%d,%d,%d\n",
index,
layer_blend->input1_data.x,
layer_blend->input1_data.y,
layer_blend->input1_data.w,
layer_blend->input1_data.h);
- osd_log_dbg2("blend0:layer_blend->output_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend0:layer_blend->output_data:%d,%d,%d,%d\n",
layer_blend->output_data.x,
layer_blend->output_data.y,
layer_blend->output_data.w,
bld_osd_h_end << 16 | bld_osd_h_start;
blend_reg->osd_blend_din_scope_v[index] =
bld_osd_v_end << 16 | bld_osd_v_start;
- osd_log_dbg2("blend1:input1_data(osd%d):%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend1:input1_data(osd%d):%d,%d,%d,%d\n",
index,
layer_blend->input1_data.x,
layer_blend->input1_data.y,
bld_osd_h_end << 16 | bld_osd_h_start;
blend_reg->osd_blend_din_scope_v[index] =
bld_osd_v_end << 16 | bld_osd_v_start;
- osd_log_dbg2("layer_blend->input2_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "layer_blend->input2_data:%d,%d,%d,%d\n",
layer_blend->input2_data.x,
layer_blend->input2_data.y,
layer_blend->input2_data.w,
blend_reg->osd_blend_blend1_size =
blend_vsize << 16 | blend_hsize;
- osd_log_dbg2("layer_blend1->output_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "layer_blend1->output_data:%d,%d,%d,%d\n",
layer_blend->output_data.x,
layer_blend->output_data.y,
layer_blend->output_data.w,
blend_reg->osd_blend_blend0_size;
#endif
}
- osd_log_dbg2("layer_blend2->output_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "layer_blend2->output_data:%d,%d,%d,%d\n",
layer_blend->output_data.x,
layer_blend->output_data.y,
layer_blend->output_data.w,
blend_reg->postbld_osd2_premult = 0;
break;
}
- osd_log_dbg2("vpp_osd1_blend_h_scope=%x, vpp_osd1_blend_v_scope=%x\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "vpp_osd1_blend_h_scope=%x, vpp_osd1_blend_v_scope=%x\n",
blend_reg->vpp_osd1_blend_h_scope,
blend_reg->vpp_osd1_blend_v_scope);
- osd_log_dbg2("vpp_osd2_blend_h_scope=%x, vpp_osd2_blend_v_scope=%x\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "vpp_osd2_blend_h_scope=%x, vpp_osd2_blend_v_scope=%x\n",
blend_reg->vpp_osd2_blend_h_scope,
blend_reg->vpp_osd2_blend_v_scope);
}
if (width > FREE_SCALE_MAX_WIDTH)
width = FREE_SCALE_MAX_WIDTH;
} else if (blending->osd_blend_mode == OSD_BLEND_AB_C) {
- osd_log_dbg("blending->blend_din=%d\n",
+ osd_log_dbg(MODULE_BLEND, "blending->blend_din=%d\n",
blending->blend_din);
if (blending->blend_din != BLEND_DIN4) {
/* combine mode, need uniformization */
osd_hw.osd_meson_dev.dummy_data = 0x808000;
osd_set_dummy_data(index, 0xff);
}
- osd_log_dbg2("osd%d:free_src_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "osd%d:free_src_data:%d,%d,%d,%d\n",
index,
osd_hw.free_src_data[index].x_start,
osd_hw.free_src_data[index].y_start,
osd_hw.free_src_data[index].x_end,
osd_hw.free_src_data[index].y_end);
- osd_log_dbg2("osd%d:free_dst_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "osd%d:free_dst_data:%d,%d,%d,%d\n",
index,
osd_hw.free_dst_data[index].x_start,
osd_hw.free_dst_data[index].y_start,
osd_hw.free_dst_data[index].y_end -
osd_hw.free_dst_data[index].y_start + 1;
}
- osd_log_dbg2("blend0_input:input0_data[osd%d]:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend0_input:input0_data[osd%d]:%d,%d,%d,%d\n",
index,
layer_blend->input1_data.x,
layer_blend->input1_data.y,
osd_hw.free_dst_data[index].y_end -
osd_hw.free_dst_data[index].y_start + 1;
}
- osd_log_dbg2("blend1_input:input_data[osd%d]:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend1_input:input_data[osd%d]:%d,%d,%d,%d\n",
index,
layer_blend->output_data.x,
layer_blend->output_data.y,
osd_setting_blend2(blending);
}
/* osd1 freescale,output is vinfo.w/h */
- osd_log_dbg2("after blend: set osd%d freescale\n",
- index);
+ osd_log_dbg2(MODULE_BLEND,
+ "after blend: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
layer_blend->input1 = BLEND2_DIN;
osd_hw.free_dst_data[index].y_end -
osd_hw.free_dst_data[index].y_start + 1;
} else {
- osd_log_dbg2("first: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "first: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
osd_hw.free_dst_data[index].x_start +=
osd_hw.disp_info.position_x;
#endif
if (index != OSD1) {
/* here used freescale osd1/osd2 */
- osd_log_dbg2("before blend0: set osd%d freescale\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend0: set osd%d freescale\n",
index);
osd_set_freescale(index, blending);
}
if (index >= OSD_MAX)
return;
if (index != OSD1) {
- osd_log_dbg2("before blend1: set osd%d freescale\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend1: set osd%d freescale\n",
index);
osd_set_freescale(index, blending);
}
osd_setting_blend2(blending);
}
/* here freescale osd0 used */
- osd_log_dbg2("after blend: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "after blend: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
/* save freescale output */
output1_data.x =
osd_hw.free_dst_data[index].y_end -
osd_hw.free_dst_data[index].y_start + 1;
- osd_log_dbg2("position_x=%d, y=%d\n",
+ osd_log_dbg2(MODULE_BLEND, "position_x=%d, y=%d\n",
osd_hw.disp_info.position_x,
osd_hw.disp_info.position_y);
if (index >= OSD_MAX)
return;
/* here freescale osd1/osd2 used */
- osd_log_dbg2("before blend1: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend1: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
#ifdef OSD_BLEND_SHIFT_WORKAROUND
layer_blend->input1 = BLEND_NO_DIN;
if (index >= OSD_MAX)
return;
if (index != OSD1) {
- osd_log_dbg2("index=%d, need set freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "index=%d, need set freescale\n", index);
osd_set_freescale(index, blending);
}
osd_setting_blend0_input(index, blending);
layer_blend->input2 = input2;
index = blend_din_to_osd(layer_blend->input1, blending);
if (index != OSD1) {
- osd_log_dbg2("blend1 input1: set osd%d freescale\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend1 input1: set osd%d freescale\n",
index);
osd_set_freescale(index, blending);
}
if (index >= OSD_MAX)
return;
if (index != OSD1) {
- osd_log_dbg2("blend1 input2: set osd%d freescale\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "blend1 input2: set osd%d freescale\n",
index);
osd_set_freescale(index, blending);
}
osd_setting_blend2(blending);
}
- osd_log_dbg("after blend2: set osd%d freescale\n", index);
+ osd_log_dbg(MODULE_BLEND,
+ "after blend2: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
/* save freescale output */
output1_data.x =
index = blend_din_to_osd(BLEND_DIN3, blending);
if (index >= OSD_MAX)
return;
- osd_log_dbg2("before blend1: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend1: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
layer_blend->input1_data.x =
osd_hw.free_dst_data[index].x_start +
index = blend_din_to_osd(BLEND_DIN4, blending);
if (index >= OSD_MAX)
return;
- osd_log_dbg2("before blend1: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend1: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
layer_blend->input2_data.x =
osd_hw.free_dst_data[index].x_start +
blending->blend_din = BLEND_DIN3;
index = blend_din_to_osd(BLEND_DIN3, blending);
if (index != OSD1) {
- osd_log_dbg2("before blend1: set osd%d freescale\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "before blend1: set osd%d freescale\n",
index);
osd_set_freescale(index, blending);
}
output1_data.h =
osd_hw.free_dst_data[OSD1].y_end -
osd_hw.free_dst_data[OSD1].y_start + 1;
- osd_log_dbg2("output1_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND, "output1_data:%d,%d,%d,%d\n",
output1_data.x,
output1_data.w,
output1_data.y,
/* din4 ==> vpp */
index = blend_din_to_osd(BLEND_DIN4, blending);
blending->blend_din = BLEND_DIN4;
- osd_log_dbg2("bypass blend1: set osd%d freescale\n", index);
+ osd_log_dbg2(MODULE_BLEND,
+ "bypass blend1: set osd%d freescale\n", index);
osd_set_freescale(index, blending);
layer_blend->input2_data.x =
blending->dst_data.w + blending->dst_data.x,
osd_hw.disp_info.background_w);
}
- osd_log_dbg2("uniformization:osd%d:dst_data:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "uniformization:osd%d:dst_data:%d,%d,%d,%d\n",
index,
blending->dst_data.x,
blending->dst_data.y,
osd_hw.dst_data[i].x = 0;
if (osd_hw.dst_data[i].y < 0)
osd_hw.dst_data[i].y = 0;
- osd_log_dbg2("adjust dst_data:osd%d:%d,%d,%d,%d\n",
+ osd_log_dbg2(MODULE_BLEND,
+ "adjust dst_data:osd%d:%d,%d,%d,%d\n",
i,
osd_hw.dst_data[i].x,
osd_hw.dst_data[i].y,
blending->layer_cnt = get_available_layers();
set_blend_order(blending);
- osd_log_dbg("layer_cnt:%d\n", blending->layer_cnt);
+ osd_log_dbg(MODULE_BLEND, "layer_cnt:%d\n",
+ blending->layer_cnt);
blending->b_exchange_din = false;
blending->b_exchange_blend_in = false;
vinfo_height = osd_hw.field_out_en ?
(osd_hw.vinfo_height * 2) : osd_hw.vinfo_height;
if (line1 >= vinfo_height) {
- if (osd_hw.osd_display_debug == ENCP_LINE_VSYNC)
- osd_log_info(
- "enter osd_setting_order:cnt=%d,encp line=%d\n",
- cnt, line1);
+ osd_log_dbg(MODULE_RENDER,
+ "enter osd_setting_order:cnt=%d,encp line=%d\n",
+ cnt, line1);
osd_wait_vsync_hw();
line1 = get_enter_encp_line();
}
save_blend_reg(blend_reg);
spin_unlock_irqrestore(&osd_lock, lock_flags);
line2 = get_exit_encp_line();
- if (osd_hw.osd_display_debug == ENCP_LINE)
- osd_log_info(
- "enter osd_setting_order:cnt=%d,encp line=%d\n",
- cnt, line2);
+ osd_log_dbg2(MODULE_RENDER,
+ "enter osd_setting_order:cnt=%d,encp line=%d\n",
+ cnt, line2);
if (line2 < line1)
osd_log_info("osd line %d,%d\n", line1, line2);
osd_wait_vsync_hw();
u32 postbld_src3_sel = 3, postbld_src4_sel = 0;
u32 postbld_osd1_premult = 0, postbld_osd2_premult = 0;
- osd_log_dbg("osd_setting_default_hwc\n");
+ osd_log_dbg(MODULE_BASE, "osd_setting_default_hwc\n");
/* depend on din0_premult_en */
postbld_osd1_premult = 1;
/* depend on din_premult_en bit 4 */
osd_hw.free_dst_data[index].y_start = y_start;
osd_hw.free_dst_data[index].y_end = y_end;
}
- osd_log_dbg("free_dst_data: %x,%x,%x,%x\n",
- osd_hw.free_dst_data[index].x_start,
- osd_hw.free_dst_data[index].x_end,
- osd_hw.free_dst_data[index].y_start,
- osd_hw.free_dst_data[index].y_end);
-
/* set dummy_data alpha */
height_dst = osd_hw.free_dst_data[index].y_end -
osd_hw.free_dst_data[index].y_start + 1;
if (index != 1)
return;
- osd_log_dbg2("cursor: x=%d, y=%d, x0=%d, y0=%d, w=%d, h=%d\n",
+ osd_log_dbg(MODULE_CURSOR, "cursor: x=%d, y=%d, x0=%d, y0=%d, w=%d, h=%d\n",
x, y, xstart, ystart, osd_w, osd_h);
if (osd_hw.free_scale_mode[OSD1]) {
osd_hw.pandata[OSD2].y_end = osd_h - 1;
x -= osd_w;
y -= osd_h;
- osd_log_dbg2("x=%d,y=%d\n", x, y);
+ osd_log_dbg(MODULE_CURSOR, "x=%d,y=%d\n", x, y);
}
/*
* Use pandata to show a partial cursor when it is at the edge because
osd_hw.pandata[OSD2].y_end - osd_hw.pandata[OSD2].y_start;
add_to_update_list(OSD2, OSD_COLOR_MODE);
add_to_update_list(OSD2, DISP_GEOMETRY);
- osd_log_dbg2("dispdata: %d,%d,%d,%d\n",
+ osd_log_dbg(MODULE_CURSOR, "dispdata: %d,%d,%d,%d\n",
osd_hw.dispdata[OSD2].x_start, osd_hw.dispdata[OSD2].x_end,
osd_hw.dispdata[OSD2].y_start, osd_hw.dispdata[OSD2].y_end);
}
if (index != 1)
return;
- osd_log_dbg2("cursor: x=%d, y=%d, x0=%d, y0=%d, w=%d, h=%d\n",
+ osd_log_dbg(MODULE_CURSOR, "cursor: x=%d, y=%d, x0=%d, y0=%d, w=%d, h=%d\n",
x, y, xstart, ystart, osd_w, osd_h);
if (osd_hw.free_scale_mode[OSD1]) {
osd_hw.pandata[OSD2].y_end = osd_h - 1;
x -= osd_w;
y -= osd_h;
- osd_log_dbg2("x=%d,y=%d\n", x, y);
+ osd_log_dbg(MODULE_CURSOR, "x=%d,y=%d\n", x, y);
}
osd_hw.pandata[OSD2].y_end - osd_hw.pandata[OSD2].y_start;
add_to_update_list(OSD2, OSD_COLOR_MODE);
add_to_update_list(OSD2, DISP_GEOMETRY);
- osd_log_dbg2("dispdata: %d,%d,%d,%d\n",
+ osd_log_dbg(MODULE_CURSOR, "dispdata: %d,%d,%d,%d\n",
osd_hw.dispdata[OSD2].x_start, osd_hw.dispdata[OSD2].x_end,
osd_hw.dispdata[OSD2].y_start, osd_hw.dispdata[OSD2].y_end);
}
memset(vaddr, 0x0,
plane_map->byte_stride*plane_map->src_h);
}
- osd_log_dbg("canvas_id=%x, phy_addr=%x\n",
+ osd_log_dbg(MODULE_RENDER, "canvas_id=%x, phy_addr=%x\n",
osd_hw.fb_gem[index].canvas_idx, phy_addr);
canvas_config(osd_hw.fb_gem[index].canvas_idx,
phy_addr,
osd_hw.dst_data[index].y = plane_map->dst_y;
osd_hw.dst_data[index].w = plane_map->dst_w;
osd_hw.dst_data[index].h = plane_map->dst_h;
- osd_log_dbg2("index=%d\n", index);
- osd_log_dbg2("order=%d\n", osd_hw.order[index]);
- osd_log_dbg2("premult_en=%d\n", osd_hw.premult_en[index]);
- osd_log_dbg2("osd_afbcd_en=%d\n",
+ osd_log_dbg2(MODULE_RENDER, "index=%d\n", index);
+ osd_log_dbg2(MODULE_RENDER, "order=%d\n",
+ osd_hw.order[index]);
+ osd_log_dbg2(MODULE_RENDER, "premult_en=%d\n",
+ osd_hw.premult_en[index]);
+ osd_log_dbg2(MODULE_RENDER, "osd_afbcd_en=%d\n",
osd_hw.osd_afbcd[index].enable);
- osd_log_dbg2("osd_afbcd_inter_format=%d\n",
+ osd_log_dbg2(MODULE_RENDER, "osd_afbcd_inter_format=%d\n",
osd_hw.osd_afbcd[index].inter_format);
return 0;
}
else
osd_set_dummy_data(index, 0xff);
}
- osd_log_dbg2("pandata x=%d,x_end=%d,y=%d,y_end=%d\n",
+ osd_log_dbg2(MODULE_RENDER,
+ "pandata x=%d,x_end=%d,y=%d,y_end=%d\n",
osd_hw.pandata[index].x_start,
osd_hw.pandata[index].x_end,
osd_hw.pandata[index].y_start,
osd_hw.pandata[index].y_end);
- osd_log_dbg2("plane_map:src_x=%d,src_y=%d,src_w=%d,src_h=%d\n",
+ osd_log_dbg2(MODULE_RENDER,
+ "plane_map:src_x=%d,src_y=%d,src_w=%d,src_h=%d\n",
plane_map->src_x,
plane_map->src_y,
plane_map->src_w,
plane_map->src_h);
- osd_log_dbg2("fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d\n",
+ osd_log_dbg2(MODULE_RENDER,
+ "fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d\n",
plane_map->dst_x,
plane_map->dst_y,
plane_map->dst_w,
osd_hw.dispdata[index].y_start = y_start;
osd_hw.dispdata[index].y_end = y_end;
}
- osd_log_dbg2("plane_map:src_x=%d,src_y=%d,src_w=%d,src_h=%d\n",
+ osd_log_dbg2(MODULE_CURSOR,
+ "plane_map:src_x=%d,src_y=%d,src_w=%d,src_h=%d\n",
plane_map->src_x,
plane_map->src_y,
plane_map->src_w,
plane_map->src_h);
- osd_log_dbg2("fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d\n",
+ osd_log_dbg2(MODULE_CURSOR,
+ "fence_map:dst_x=%d,dst_y=%d,dst_w=%d,dst_h=%d\n",
plane_map->dst_x,
plane_map->dst_y,
plane_map->dst_w,
plane_map->dst_h);
- osd_log_dbg2("cursor pandata x=%d,x_end=%d,y=%d,y_end=%d\n",
+ osd_log_dbg2(MODULE_CURSOR,
+ "cursor pandata x=%d,x_end=%d,y=%d,y_end=%d\n",
osd_hw.pandata[index].x_start,
osd_hw.pandata[index].x_end,
osd_hw.pandata[index].y_start,
osd_hw.pandata[index].y_end);
- osd_log_dbg2("cursor dispdata x=%d,x_end=%d,y=%d,y_end=%d\n",
+ osd_log_dbg2(MODULE_CURSOR,
+ "cursor dispdata x=%d,x_end=%d,y=%d,y_end=%d\n",
osd_hw.dispdata[index].x_start,
osd_hw.dispdata[index].x_end,
osd_hw.dispdata[index].y_start,