/*----omx_info bit0: keep_last_frame, bit1~31: unused----*/
static u32 omx_info = 0x1;
+#define ENABLE_UPDATE_HDR_FROM_USER 0
+#if ENABLE_UPDATE_HDR_FROM_USER
static struct vframe_master_display_colour_s vf_hdr;
static bool has_hdr_info;
+#endif
static DEFINE_MUTEX(omx_mutex);
#define DURATION_GCD 750
static DEFINE_MUTEX(video_module_mutex);
static DEFINE_MUTEX(video_inuse_mutex);
static DEFINE_SPINLOCK(lock);
+#if ENABLE_UPDATE_HDR_FROM_USER
static DEFINE_SPINLOCK(omx_hdr_lock);
-
+#endif
static u32 frame_par_ready_to_set, frame_par_force_to_set;
static u32 vpts_remainder;
static int video_property_changed;
/* TODO: if el len is 0, need disable bl */
}
}
-
+#if ENABLE_UPDATE_HDR_FROM_USER
void set_hdr_to_frame(struct vframe_s *vf)
{
unsigned long flags;
}
spin_unlock_irqrestore(&omx_hdr_lock, flags);
}
+#endif
#ifdef FIQ_VSYNC
void vsync_fisr_in(void)
&& dolby_vision_need_wait())
break;
#endif
+#if ENABLE_UPDATE_HDR_FROM_USER
set_hdr_to_frame(vf);
+#endif
#if defined(CONFIG_AMLOGIC_MEDIA_ENHANCEMENT_VECM)
refresh_on_vs(vf);
return 0;
}
-
+#if ENABLE_UPDATE_HDR_FROM_USER
void init_hdr_info(void)
{
unsigned long flags;
spin_unlock_irqrestore(&omx_hdr_lock, flags);
}
+#endif
static int video_receiver_event_fun(int type, void *data, void *private_data)
{
#ifdef CONFIG_AM_VIDEO2
video_property_changed = true;
}
}
+#if ENABLE_UPDATE_HDR_FROM_USER
static void config_hdr_info(const struct vframe_master_display_colour_s p)
{
struct vframe_master_display_colour_s tmp = {0};
pr_debug("has_hdr_info %d\n", has_hdr_info);
}
+#endif
static void set_omx_pts(u32 *p)
{
u32 tmp_pts = p[0];
switch (cmd) {
case AMSTREAM_IOC_SET_HDR_INFO:{
+#if ENABLE_UPDATE_HDR_FROM_USER
struct vframe_master_display_colour_s tmp;
-
if (copy_from_user(&tmp, argp, sizeof(tmp)) == 0)
config_hdr_info(tmp);
+#endif
}
break;
case AMSTREAM_IOC_SET_OMX_VPTS:{