dv: fixed dolbyvision video cannot play [2/2]
authorshihong.zheng <shihong.zheng@amlogic.com>
Thu, 5 Jul 2018 03:07:04 +0000 (11:07 +0800)
committerYixun Lan <yixun.lan@amlogic.com>
Tue, 10 Jul 2018 07:25:28 +0000 (00:25 -0700)
PD#169274: dv: merge some dv code from 3.14, add a dolbyvision
bypass el define and metadata parser return val check.

Change-Id: I2a687d0e3187d1f56880508b4d4a3263edcdc071
Signed-off-by: shihong.zheng <shihong.zheng@amlogic.com>
drivers/amlogic/media/enhancement/amdolby_vision/amdolby_vision.c
include/linux/amlogic/media/vfm/vframe_provider.h

index 88d14c401c62395d858c2d465fae21cdc7fafa53..c484708fe8b3a56dbe3fa53de1fcf8c9e82729e1 100644 (file)
@@ -3584,6 +3584,7 @@ static int parse_sei_and_meta(
        unsigned long flags;
        bool parser_overflow = false;
        int nextId;
+       int rpu_ret = 0;
 
        nextId = currentId ^ 1;
        if ((req->aux_buf == NULL)
@@ -3659,13 +3660,14 @@ static int parse_sei_and_meta(
                        }
 
                        md_size = comp_size = 0;
-                       if (p_funcs->metadata_parser_process(
+                       rpu_ret = p_funcs->metadata_parser_process(
                                meta_buf, size + 2,
                                comp_buf[nextId] + *total_comp_size,
                                &comp_size,
                                md_buf[nextId] + *total_md_size,
                                &md_size,
-                               true)) {
+                               true);
+                       if (rpu_ret < 0) {
                                pr_dolby_error(
                                        "meta(%d), pts(%lld) -> metadata parser process fail\n",
                                        size, vf->pts_us64);
index 6efa59fe2905c7763f998eb09bfdd815dfa9d98f..157359a5a021380e9bb6d2e28796a1c07e16e4e3 100644 (file)
@@ -34,11 +34,12 @@ struct vframe_states {
 #define VFRAME_EVENT_RECEIVER_PUT               0x02
 #define VFRAME_EVENT_RECEIVER_FRAME_WAIT        0x04
 #define VFRAME_EVENT_RECEIVER_POS_CHANGED       0x08
-#define VFRAME_EVENT_RECEIVER_PARAM_SET        0x10
+#define VFRAME_EVENT_RECEIVER_PARAM_SET                        0x10
 #define VFRAME_EVENT_RECEIVER_RESET                            0x20
 #define VFRAME_EVENT_RECEIVER_FORCE_UNREG                      0x40
 #define VFRAME_EVENT_RECEIVER_GET_AUX_DATA                     0x80
 #define VFRAME_EVENT_RECEIVER_DISP_MODE                                0x100
+#define VFRAME_EVENT_RECEIVER_DOLBY_BYPASS_EL          0x200
 
        /* for VFRAME_EVENT_RECEIVER_GET_AUX_DATA*/
 struct provider_aux_req_s {