#define dump_enable \
((debug_dolby_frame >= 0xffff) || \
(debug_dolby_frame + 1 == frame_count))
-static int is_graphics_output_off(void)
-{
- if (is_meson_g12() || is_meson_tm2_stbmode())
- return !(READ_VPP_REG(OSD1_BLEND_SRC_CTRL) & (0xf<<8))
- && !(READ_VPP_REG(OSD2_BLEND_SRC_CTRL) & (0xf<<8));
- else
- return (!(READ_VPP_REG(VPP_MISC) & (1<<12)));
-}
+
#define single_step_enable \
(((debug_dolby_frame >= 0xffff) || \
((debug_dolby_frame + 1) == frame_count)) && \
static bool mel_mode;
#define MAX_PARAM 8
-bool is_meson_gxm(void)
+static bool is_meson_gxm(void)
{
if (dv_meson_dev.cpu_id == _CPU_MAJOR_ID_GXM)
return true;
else
return false;
}
-bool is_meson_g12(void)
+
+static bool is_meson_g12(void)
{
if (dv_meson_dev.cpu_id == _CPU_MAJOR_ID_G12)
return true;
return false;
}
-bool is_meson_box(void)
+static bool is_meson_box(void)
{
if (is_meson_gxm() || is_meson_g12())
return true;
return false;
}
-bool is_meson_txlx(void)
+static bool is_meson_txlx(void)
{
if (dv_meson_dev.cpu_id == _CPU_MAJOR_ID_TXLX)
return true;
return false;
}
-bool is_meson_txlx_tvmode(void)
+static bool is_meson_txlx_tvmode(void)
{
if ((is_meson_txlx()) && (tv_mode == 1))
return true;
else
return false;
}
-bool is_meson_txlx_stbmode(void)
+
+static bool is_meson_txlx_stbmode(void)
{
if ((is_meson_txlx()) && (tv_mode == 0))
return true;
else
return false;
}
-bool is_meson_tm2(void)
+
+static bool is_meson_tm2(void)
{
if (dv_meson_dev.cpu_id == _CPU_MAJOR_ID_TM2)
return true;
return false;
}
-bool is_meson_tm2_tvmode(void)
+static bool is_meson_tm2_tvmode(void)
{
if ((is_meson_tm2()) && (tv_mode == 1))
return true;
return false;
}
-bool is_meson_tm2_stbmode(void)
+static bool is_meson_tm2_stbmode(void)
{
if ((is_meson_tm2()) && (tv_mode == 0))
return true;
return false;
}
-bool is_meson_tvmode(void)
+static bool is_meson_tvmode(void)
{
if (is_meson_tm2_tvmode() ||
is_meson_txlx_tvmode())
return false;
}
+static int is_graphics_output_off(void)
+{
+ if (is_meson_g12() || is_meson_tm2_stbmode())
+ return !(READ_VPP_REG(OSD1_BLEND_SRC_CTRL) & (0xf << 8)) &&
+ !(READ_VPP_REG(OSD2_BLEND_SRC_CTRL) & (0xf << 8));
+ else
+ return (!(READ_VPP_REG(VPP_MISC) & (1 << 12)));
+}
+
static u32 CORE1_BASE;
static u32 CORE1_1_BASE;
static u32 CORE2A_BASE;
size = 8 * STB_DMA_TBL_SIZE;
memcpy(dma_vaddr, dma_data, size);
}
- if (size && (debug_dolby & 0x8)) {
+ if (size && (debug_dolby & 0x800)) {
p = (uint64_t *)dma_vaddr;
pr_info("dma size = %d\n", STB_DMA_TBL_SIZE);
for (i = 0; i < size / 8; i += 2)
max_lin = (max_lin / 100) * 100 + 500;
max_pq = L2PQ_500_4000[(max_lin - 500) / 100];
}
- pr_dolby_dbg("panel max lumin changed from %d(%d) to %d(%d)\n",
- tv_max_lin, tv_max_pq, max_lin, max_pq);
+ if (debug_dolby & 2)
+ pr_dolby_dbg("panel max lumin changed from %d(%d) to %d(%d)\n",
+ tv_max_lin, tv_max_pq, max_lin, max_pq);
tv_max_lin = max_lin;
tv_max_pq = max_pq;
config->max_lin =
if (sink_changed || policy_changed || format_changed ||
(video_status == 1) || (graphic_status & 2) ||
(dolby_vision_flags & FLAG_FORCE_HDMI_PKT)) {
- pr_dolby_dbg("sink %s, cap 0x%x, video %s, osd %s, vf %p, toggle mode %d\n",
- current_sink_available ? "on" : "off",
- current_hdr_cap,
- video_turn_off ? "off" : "on",
- is_graphics_output_off() ? "off" : "on",
- vf, toggle_mode);
+ if (debug_dolby & 1)
+ pr_dolby_dbg("sink %s,cap 0x%x,video %s,osd %s,vf %p,toggle %d\n",
+ current_sink_available ? "on" : "off",
+ current_hdr_cap,
+ video_turn_off ? "off" : "on",
+ is_graphics_output_off() ? "off" : "on",
+ vf, toggle_mode);
if (vf &&
!dolby_vision_parse_metadata(
vf, toggle_mode, false, false)) {
memset(&hdr_mtx_param, 0, sizeof(struct hdr_proc_mtx_param_s));
memset(&hdr_lut_param, 0, sizeof(struct hdr_proc_lut_param_s));
- if ((module_sel == OSD1_HDR)
- && (is_meson_g12() || is_meson_sm1_cpu() || is_meson_tl1_cpu())) {
+ if ((module_sel == OSD1_HDR) &&
+ (is_meson_g12a_cpu() ||
+ is_meson_g12b_cpu() ||
+ is_meson_sm1_cpu() ||
+ is_meson_tl1_cpu())) {
/* turn off OSD mtx and use HDR for g12, sm1, tl1 */
VSYNC_WR_MPEG_REG(
VPP_WRAP_OSD1_MATRIX_EN_CTRL, 0);
memset(&hdr_lut_param, 0, sizeof(struct hdr_proc_lut_param_s));
if ((module_sel == OSD1_HDR) &&
- (is_meson_g12() ||
+ (is_meson_g12a_cpu() ||
+ is_meson_g12b_cpu() ||
is_meson_sm1_cpu() ||
is_meson_tl1_cpu())) {
/* turn off OSD mtx and use HDR for g12, sm1, tl1 */