From: jintao xu Date: Thu, 5 Nov 2020 04:06:25 +0000 (+0800) Subject: vdec: av1 add sidebind interface for decoder [2/2] X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=360b33c0d12e9b7dc35d5a9c1865eb8349c8483c;p=GitHub%2FLineageOS%2FG12%2Fandroid_hardware_amlogic_kernel-modules_media.git vdec: av1 add sidebind interface for decoder [2/2] PD#SWPL-34152 Problem: decoder receive sidebind type id and set to vf Solution: add this new feature Verify: AH-212 Change-Id: I093f5ae7ac5dce506947d7e92158700f7b774581 Signed-off-by: jintao xu --- diff --git a/drivers/frame_provider/decoder/vav1/vav1.c b/drivers/frame_provider/decoder/vav1/vav1.c index 853c2e2..e53a7c4 100644 --- a/drivers/frame_provider/decoder/vav1/vav1.c +++ b/drivers/frame_provider/decoder/vav1/vav1.c @@ -805,6 +805,8 @@ struct AV1HW_s { struct vframe_s vframe_dummy; u32 res_ch_flag; int buffer_wrap[FRAME_BUFFERS]; + int sidebind_type; + int sidebind_channel_id; }; static void av1_dump_state(struct vdec_s *vdec); @@ -5603,6 +5605,9 @@ static void set_frame_info(struct AV1HW_s *hw, struct vframe_s *vf) hdr.color_parms = hw->vf_dp; vdec_v4l_set_hdr_infos(ctx, &hdr); } + + vf->sidebind_type = hw->sidebind_type; + vf->sidebind_channel_id = hw->sidebind_channel_id; } static int vav1_vf_states(struct vframe_states *states, void *op_arg) @@ -10254,6 +10259,14 @@ static int ammvdec_av1_probe(struct platform_device *pdev) av1_print(hw, 0, "use buf resolution\n"); } + if (get_config_int(pdata->config, "sidebind_type", + &config_val) == 0) + hw->sidebind_type = config_val; + + if (get_config_int(pdata->config, "sidebind_channel_id", + &config_val) == 0) + hw->sidebind_channel_id = config_val; + if (get_config_int(pdata->config, "parm_v4l_codec_enable", &config_val) == 0)