From patchwork Fri Jan 15 09:26:04 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 364910 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 24F2FC43332 for ; Fri, 15 Jan 2021 09:28:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id EA91F23403 for ; Fri, 15 Jan 2021 09:28:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728246AbhAOJ1p (ORCPT ); Fri, 15 Jan 2021 04:27:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55466 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727099AbhAOJ1n (ORCPT ); Fri, 15 Jan 2021 04:27:43 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4CAADC061795 for ; Fri, 15 Jan 2021 01:26:25 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id hs11so9985807ejc.1 for ; Fri, 15 Jan 2021 01:26:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=t+LIjSQQZkRT5kA7Y1VVVn+LaJzyPGxbVa/mAnWmpfM=; b=Msso7NqhPhEB4q0UnUA8XAPok6JM03bozuMhwDOETKKxRwPjxCwRautZMeGgx5AsdV lJSzMqlyjQBcrcJgp95PfoEI2Q6fRp28H1lGx72DAu/EKKMjuf5hDuDVSAdcze/LajF5 35/Tg8PdCZNZx9klkRPJrkGaBym+hZM/W9FDqYaRYe0Qw2YbSeMoM0S+rY/NFp/XyFgv jFc1wRHx2I55nWpib5/zg7V+aRYN25LHx/tD27UgnUYxCi887GcM3n3UFftH+ijkrGKY TIlANhAGkBILk0j01SuWILKsjurPq5GzAdGBTiwvGryMi5xAqY9dhVR/C/dzmj+igDEj d9MA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=t+LIjSQQZkRT5kA7Y1VVVn+LaJzyPGxbVa/mAnWmpfM=; b=G2S0OE19id4MFxIakdzqUbzPShEKkfzhln3xdddQfIqXYLsNrArUsA93aVABQkof8G gbshImMz/M27o0f7t2J0cCz4b6B4W5XAD5oxcbr0p1xo7JgKO0MdxSC7i3BMBxBVeRs0 ovBZcDJxDqrpDVXP/gM9fESVCsTtVSimxeReDcnf4Sci57CwVYB0P1Pf/jFdyVdON36t QoKP6IjgUvmcbb+5Apky/OcFNrecXwzNBiyqd1I7KBBOAFzjyAP/jN3NSY6qcrg/5H/4 2gW/J9euJGetiAVAw/NCdQHHEEgLcDrkvwDE6hHrCl6UK8EZwu03NgZjEaV8KDDAKRID t+kA== X-Gm-Message-State: AOAM533xRtwbdaThenAzzyGZYMBIUcaXqw/lU030DIkv6TaubHAqTd4Z 8YKOCgIWk88a1DONCRUNoe5QODIwr/H/a3V5 X-Google-Smtp-Source: ABdhPJxn30W4zKu9VCJ3o50F75dE3Sw6KR6uluS9N0XbHTzNL1rLZMcI1H9C7ygMJOID9q/CeST6DQ== X-Received: by 2002:a17:906:94d2:: with SMTP id d18mr8129364ejy.94.1610702783791; Fri, 15 Jan 2021 01:26:23 -0800 (PST) Received: from localhost.localdomain (hst-221-63.medicom.bg. [84.238.221.63]) by smtp.gmail.com with ESMTPSA id u24sm3004140eje.71.2021.01.15.01.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 01:26:23 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Hans Verkuil , Stanimir Varbanov Subject: [PATCH v2 1/4] v4l2-ctrl: Make display delay and display enable std controls Date: Fri, 15 Jan 2021 11:26:04 +0200 Message-Id: <20210115092607.29849-2-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210115092607.29849-1-stanimir.varbanov@linaro.org> References: <20210115092607.29849-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Make display delay and display delay enable MFC controls standard v4l controls. This will allow reuse of the controls for other decoder drivers. Also the new proposed controls are now codec agnostic because they could be used for any codec. Signed-off-by: Stanimir Varbanov Acked-by: Hans Verkuil --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 15 +++++++++++++++ drivers/media/v4l2-core/v4l2-ctrls.c | 4 ++++ include/uapi/linux/v4l2-controls.h | 3 +++ 3 files changed, 22 insertions(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 00944e97d638..5d7c47837035 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -679,6 +679,21 @@ enum v4l2_mpeg_video_frame_skip_mode - otherwise the decoder expects a single frame in per buffer. Applicable to the decoder, all codecs. +``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (boolean)`` + If the display delay is enabled then the decoder is forced to return + a CAPTURE buffer (decoded frame) after processing a certain number + of OUTPUT buffers. The delay can be set through + ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY``. This + feature can be used for example for generating thumbnails of videos. + Applicable to the decoder. + +``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (integer)`` + Display delay value for decoder. The decoder is forced to + return a decoded frame after the set 'display delay' number of + frames. If this number is low it may result in frames returned out + of display order, in addition the hardware may still be using the + returned buffer as a reference picture for subsequent frames. + ``V4L2_CID_MPEG_VIDEO_H264_VUI_SAR_ENABLE (boolean)`` Enable writing sample aspect ratio in the Video Usability Information. Applicable to the H264 encoder. diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c index f7b310240af2..2ae305d6db01 100644 --- a/drivers/media/v4l2-core/v4l2-ctrls.c +++ b/drivers/media/v4l2-core/v4l2-ctrls.c @@ -874,6 +874,8 @@ const char *v4l2_ctrl_get_name(u32 id) case V4L2_CID_MPEG_VIDEO_HEADER_MODE: return "Sequence Header Mode"; case V4L2_CID_MPEG_VIDEO_MAX_REF_PIC: return "Max Number of Reference Pics"; case V4L2_CID_MPEG_VIDEO_FRAME_SKIP_MODE: return "Frame Skip Mode"; + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: return "Display Delay"; + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: return "Display Delay Enable"; case V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP: return "H263 I-Frame QP Value"; case V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP: return "H263 P-Frame QP Value"; case V4L2_CID_MPEG_VIDEO_H263_B_FRAME_QP: return "H263 B-Frame QP Value"; @@ -1241,6 +1243,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, case V4L2_CID_FLASH_READY: case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: case V4L2_CID_MPEG_VIDEO_DECODER_SLICE_INTERFACE: + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: case V4L2_CID_MPEG_VIDEO_FRAME_RC_ENABLE: case V4L2_CID_MPEG_VIDEO_MB_RC_ENABLE: case V4L2_CID_MPEG_VIDEO_H264_8X8_TRANSFORM: @@ -1276,6 +1279,7 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type, break; case V4L2_CID_MPEG_VIDEO_MV_H_SEARCH_RANGE: case V4L2_CID_MPEG_VIDEO_MV_V_SEARCH_RANGE: + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: *type = V4L2_CTRL_TYPE_INTEGER; break; case V4L2_CID_MPEG_VIDEO_FORCE_KEY_FRAME: diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h index 039c0d7add1b..4b361fdce231 100644 --- a/include/uapi/linux/v4l2-controls.h +++ b/include/uapi/linux/v4l2-controls.h @@ -797,6 +797,9 @@ enum v4l2_mpeg_video_frame_skip_mode { #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MIN_QP (V4L2_CID_CODEC_BASE + 651) #define V4L2_CID_MPEG_VIDEO_HEVC_B_FRAME_MAX_QP (V4L2_CID_CODEC_BASE + 652) +#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY (V4L2_CID_CODEC_BASE + 653) +#define V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE (V4L2_CID_CODEC_BASE + 654) + /* MPEG-class control IDs specific to the CX2341x driver as defined by V4L2 */ #define V4L2_CID_CODEC_CX2341X_BASE (V4L2_CTRL_CLASS_CODEC | 0x1000) #define V4L2_CID_MPEG_CX2341X_VIDEO_SPATIAL_FILTER_MODE (V4L2_CID_CODEC_CX2341X_BASE+0) From patchwork Fri Jan 15 09:26:05 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 364170 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER, INCLUDES_PATCH, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C21CC43219 for ; Fri, 15 Jan 2021 09:28:30 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 61EE723436 for ; Fri, 15 Jan 2021 09:28:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730376AbhAOJ2T (ORCPT ); Fri, 15 Jan 2021 04:28:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55472 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728652AbhAOJ1o (ORCPT ); Fri, 15 Jan 2021 04:27:44 -0500 Received: from mail-ej1-x631.google.com (mail-ej1-x631.google.com [IPv6:2a00:1450:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CFF0EC061799 for ; Fri, 15 Jan 2021 01:26:26 -0800 (PST) Received: by mail-ej1-x631.google.com with SMTP id f4so12323361ejx.7 for ; Fri, 15 Jan 2021 01:26:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NiDOyGK2bOsrwUw3iahcb+Ehu3HtnFpXGarV1c+5LM8=; b=ZFsRL5mF1MBomvAa3QRzKuOzv/1Y2Eeyf90TC5tvrq8mNB+QD2ypMStgZXbhQldc8Y khcdK5GjLd4UuwFsmyOrVdhCNH2h6Wnvr0mtmWbl3Gt9R88Vvb8PlwY9U3oJ1SxVPTua BtPPn8Q7/t+xiasgCXlLVnSDzgQz5lrfMJGjYPszGDp0eVkj3Am0Ip9r5srZ7/PO+VGJ mu6xZsT0UlAQW4r7SuRsNnCEwrZ6AKoPBYwzBsc2SCNk/++uSUzf19EVdz2x+eTfPi5c RJHhIRIKslEbyCiJS/I8QDI4YRQmHy6VjQWru77tNEHq98MigM2rCso4Uj21+3rq49+n A7Iw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NiDOyGK2bOsrwUw3iahcb+Ehu3HtnFpXGarV1c+5LM8=; b=DaBylLJxglG1icNAw8SRGDcN7k/HBR49WtRIpT3WyKsF3A7w64Qouf642PigaQHcyV R/fwjPewL8DmPNbMcv4yldsm2+fFE2QhVZ6LS2jpp/vTxP5+WPrgwLFZpPkECm0Roa8I Y6pA+Z+LaFArwPPIIrbRnEZ9QuBllsE7EqjebXZ+rTOf0CzWWIZDT10U6Llp9QD8w0Ov 1cr3t0RNLG2/Qk2RbDH/dQBJA/jggbOzeLdSozvxqxJcnwps+GExRhw7vrcJNvm3Nu5S 4PJl/nsx3PUBzHuDT2nKFR2ws+HE3KlDCs44YRyvM4dJ10zTUpJK8FK+ah71ZBDWoZJr Nw+Q== X-Gm-Message-State: AOAM533qqcsmJ49G5rKl/YIOpAErlcnULjf1XZKQHwvRlmOnArKB0kRY sOQPs697rR/DCIOtYKPSlNO2+ESBUUXncxkj X-Google-Smtp-Source: ABdhPJyX7rZZcVY49O3f8EhLNpc21KMU6uOJ/7/y1etku1GyJRlAIo6rilAKq9+Pcp7XWLDZS2ChKg== X-Received: by 2002:a17:907:96aa:: with SMTP id hd42mr3009334ejc.526.1610702785385; Fri, 15 Jan 2021 01:26:25 -0800 (PST) Received: from localhost.localdomain (hst-221-63.medicom.bg. [84.238.221.63]) by smtp.gmail.com with ESMTPSA id u24sm3004140eje.71.2021.01.15.01.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 01:26:24 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Hans Verkuil , Stanimir Varbanov Subject: [PATCH v2 2/4] venus: vdec: Add support for display delay and delay enable controls Date: Fri, 15 Jan 2021 11:26:05 +0200 Message-Id: <20210115092607.29849-3-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210115092607.29849-1-stanimir.varbanov@linaro.org> References: <20210115092607.29849-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Add support for display delay and display delay enable std controls. With this we implement decoder decode output order (decode vs display). Once firmware implement few new features the controls will be used for other use-cases. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/core.h | 2 ++ drivers/media/platform/qcom/venus/vdec.c | 10 +++++++++- drivers/media/platform/qcom/venus/vdec_ctrls.c | 16 +++++++++++++++- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/qcom/venus/core.h b/drivers/media/platform/qcom/venus/core.h index b984d508ed71..1028b492216c 100644 --- a/drivers/media/platform/qcom/venus/core.h +++ b/drivers/media/platform/qcom/venus/core.h @@ -172,6 +172,8 @@ struct vdec_controls { u32 post_loop_deb_mode; u32 profile; u32 level; + u32 display_delay; + u32 display_delay_enable; }; struct venc_controls { diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index e4dc97f00fc3..c20496a14a55 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -620,7 +620,7 @@ static int vdec_set_properties(struct venus_inst *inst) { struct vdec_controls *ctr = &inst->controls.dec; struct hfi_enable en = { .enable = 1 }; - u32 ptype; + u32 ptype, decode_order; int ret; if (ctr->post_loop_deb_mode) { @@ -630,6 +630,14 @@ static int vdec_set_properties(struct venus_inst *inst) return ret; } + if (ctr->display_delay_enable && ctr->display_delay == 0) { + ptype = HFI_PROPERTY_PARAM_VDEC_OUTPUT_ORDER; + decode_order = HFI_OUTPUT_ORDER_DECODE; + ret = hfi_session_set_property(inst, ptype, &decode_order); + if (ret) + return ret; + } + return 0; } diff --git a/drivers/media/platform/qcom/venus/vdec_ctrls.c b/drivers/media/platform/qcom/venus/vdec_ctrls.c index 974110b75b93..07680aae0a36 100644 --- a/drivers/media/platform/qcom/venus/vdec_ctrls.c +++ b/drivers/media/platform/qcom/venus/vdec_ctrls.c @@ -30,6 +30,12 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_VP9_LEVEL: ctr->level = ctrl->val; break; + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: + ctr->display_delay = ctrl->val; + break; + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: + ctr->display_delay_enable = ctrl->val; + break; default: return -EINVAL; } @@ -89,7 +95,7 @@ int vdec_ctrl_init(struct venus_inst *inst) struct v4l2_ctrl *ctrl; int ret; - ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 9); + ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 11); if (ret) return ret; @@ -158,6 +164,14 @@ int vdec_ctrl_init(struct venus_inst *inst) if (ctrl) ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; + v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops, + V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY, + 0, 16383, 1, 0); + + v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops, + V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE, + 0, 1, 1, 0); + ret = inst->ctrl_handler.error; if (ret) { v4l2_ctrl_handler_free(&inst->ctrl_handler); From patchwork Fri Jan 15 09:26:06 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 363539 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp119885jap; Fri, 15 Jan 2021 01:29:31 -0800 (PST) X-Google-Smtp-Source: ABdhPJxbpVARWxFUWyHfIjRg3G4BLh8QbVr23XffiUl1rnE+XfvX/LqCW99OCUaA5N0u7lP6S55i X-Received: by 2002:a17:906:ca52:: with SMTP id jx18mr7839425ejb.385.1610702970989; Fri, 15 Jan 2021 01:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610702970; cv=none; d=google.com; s=arc-20160816; b=imEZ6bn4muy1trhsWmRomku0If0hF/QWmEmKxNrLh6pqmjco4wTPKrsMKWMlXDI66R yIfBIyupwf0whLJEJfbllyUv0RlMkNBLibyUSFirx5dU/M2cZ+nQfVk3mC7AZpHfde9X NThPO3y3QXu/eeTLnqGM48Up/7dgbvSOBGaF/om7G6WMpICcs2nbFbOSv0qIAG28003c 7LFsDOYgX7vpwQSUN0dRwKDXUfAZFJC5QkYrlnWUFww0gVpIVEx8K7xx/S6vmFlCgWGb mvqtOJpkg5YxscKmQaEBPfaBIfECgcddrwdhYX6kMSZWJ062VO+sxY4/MmK2R4XwGtoD 40uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=VW5Rdf+XabAMEub3RqiNA/1skv+IyyCxHOSnvL012VA=; b=jsL7ALMJYXKSah1b7mWJvaE4YFrHoLOt7kc+HGU8FHS90Ke9kAO563koq6mBWSBwC8 dD4Y/7VX5fbfAS900S4OCr7Jpe56/NXJ1+Lq009quLWtCNoeNjUmmNLd79VoK7S8m3ZV TmKZiqQ2z51N9FqsChgo9wxchXrOQZm4iZCYAOMKVI8YmG/GVD/nolWPuX/nUXCPN7cd mMvWGRADnLUeXtb8Y7WA9QzXYs0ohs4T+IoSmc+j2hosrlYWvxVdaXJogZ5q4GtWgd9t Bt20Mg7PCPUl1JbolVzf38Jo/MNGj6PmjUupgzkCvPk6jk0VlzUMb6q98iEVgSWICjp7 u59A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z2Wv0QSR; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si3398628ejr.643.2021.01.15.01.29.30; Fri, 15 Jan 2021 01:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=z2Wv0QSR; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729363AbhAOJ2R (ORCPT + 3 others); Fri, 15 Jan 2021 04:28:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55492 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730307AbhAOJ1s (ORCPT ); Fri, 15 Jan 2021 04:27:48 -0500 Received: from mail-ej1-x632.google.com (mail-ej1-x632.google.com [IPv6:2a00:1450:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5687BC06179C for ; Fri, 15 Jan 2021 01:26:28 -0800 (PST) Received: by mail-ej1-x632.google.com with SMTP id 6so12334001ejz.5 for ; Fri, 15 Jan 2021 01:26:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=VW5Rdf+XabAMEub3RqiNA/1skv+IyyCxHOSnvL012VA=; b=z2Wv0QSRd3GkWD535rvz6m8unClRZByA43tSFjS/7Okri/MEoSku1aBaSe0anhfGAZ rRX0/UivBJuFtEjBMWYGNBo5W5gHYfXZFksgkHaR7qud9BUTzHVU5/kU5sUp7l8fOXPS l/MGPeFUcfA8xFvJSphcCeGdMvXoeWgjvGSPi+6IK7RsAh0CZicbp8LTE0GQr0urncaA uWYbPVCb78dbzF4Q/EVyzSmY3sAukWQnDrlL5NKVi5mPtAb4JQeLEwupoMzb8eM2C8Es uztncevZbGcBWWKgi99aV8kCu05JSfQE0ez/flmPT/mMcynaJtBVKA6DrFmQIll+NO2z 2TiQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=VW5Rdf+XabAMEub3RqiNA/1skv+IyyCxHOSnvL012VA=; b=BsPSxjba/7XbOij/8hzk934wgw/u5uol2Rn/y1VgFyv1KghjQh7VW0jyG+uqITSez6 e8W2D6tv4F5Lq2+U0NKZN4UdsY2bxGaT88H7I1NIyi9odDphuJuAFyyMDMLv06vjUQiE gtwRbuRyASIMc8htkENSGHRTLQCY9JKbtE1t4MJxrxJ/1fOECwex8m6tCzsWBTX0XD6l V5DfWZ1Gp+GPSE1taDo4GgTRl+DUccfSUWwdNov75ja/+USbY7i9Hu9Jk5mYVXVV/77e az3PuME4g+ZlTxouOR9Gxoky6n3zR/Maa8RdNkZsVFTDZqFffV5dilnDq0Ndz/tdpZfn 9a6w== X-Gm-Message-State: AOAM53049p0dHlDlSlbjiOKVDLoHWLwioosTu2Z5CAdUzGIwmsKDka10 3is5wDtzmET/p0kSD/+cp7ZipR7cCg0oH0xd X-Received: by 2002:a17:907:3e02:: with SMTP id hp2mr7990039ejc.411.1610702786861; Fri, 15 Jan 2021 01:26:26 -0800 (PST) Received: from localhost.localdomain (hst-221-63.medicom.bg. [84.238.221.63]) by smtp.gmail.com with ESMTPSA id u24sm3004140eje.71.2021.01.15.01.26.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 01:26:26 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Hans Verkuil , Stanimir Varbanov Subject: [PATCH v2 3/4] s5p-mfc: Use display delay and display enable std controls Date: Fri, 15 Jan 2021 11:26:06 +0200 Message-Id: <20210115092607.29849-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210115092607.29849-1-stanimir.varbanov@linaro.org> References: <20210115092607.29849-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Use the standard display_delay and display_delay_enable controls, the legacy private MFC controls are kept for backward compatibility. Acked-by: Marek Szyprowski Signed-off-by: Stanimir Varbanov --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index a71753d459ba..a92a9ca6e87e 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c @@ -167,6 +167,13 @@ static struct mfc_control controls[] = { .step = 1, .default_value = 0, }, + { + .id = V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY, + .type = V4L2_CTRL_TYPE_INTEGER, + .minimum = 0, + .maximum = 16383, + .default_value = 0, + }, { .id = V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -176,6 +183,13 @@ static struct mfc_control controls[] = { .step = 1, .default_value = 0, }, + { + .id = V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE, + .type = V4L2_CTRL_TYPE_BOOLEAN, + .minimum = 0, + .maximum = 1, + .default_value = 0, + }, { .id = V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER, .type = V4L2_CTRL_TYPE_BOOLEAN, @@ -690,9 +704,11 @@ static int s5p_mfc_dec_s_ctrl(struct v4l2_ctrl *ctrl) switch (ctrl->id) { case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY: + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY: ctx->display_delay = ctrl->val; break; case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE: + case V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE: ctx->display_delay_enable = ctrl->val; break; case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: From patchwork Fri Jan 15 09:26:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 363538 Delivered-To: patch@linaro.org Received: by 2002:a02:ccad:0:0:0:0:0 with SMTP id t13csp119875jap; Fri, 15 Jan 2021 01:29:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJzKm8LeF/T/460ThANWP/0aMri43MLcuDa4kWzUS8HV/PsdsVV0ho5kCHLssxmMHbMfp9+v X-Received: by 2002:a17:906:fa85:: with SMTP id lt5mr8258230ejb.344.1610702970161; Fri, 15 Jan 2021 01:29:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610702970; cv=none; d=google.com; s=arc-20160816; b=vUKq3zmCEeFrlbfswbBWQpjhM+fgk/3zWzPCbqbYQcpGVgR91tKaeC8jiYkhJkvQyu EIfS3w4Y/T+sB7kqOb4PeG7oBFRLwkCufT5aAriEiMm7MLHS2yP8fW+WClHt44h5cq84 ld+7VdlswZLl79KxXJbnqbZ3IdB1UZzFerVW4TP4JCbVPkg3JvdHFO/vKgLJh6L+1PBY ozm+mng74k0tW03igDsxPP987F0otX21pxTY8ePkJ1oUCgubGTUmalwvVRP8ICyXoiqr PYfRxmmzdH8lfz7J5Qviurt1vcqOkZR/rdWHGqfkaOAgl0my1bV/z5W+3vaqtE3B+GBn BLyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=NPpTp6a6u7fOZ3GfoVMqP0h5qwWkDaaqGx3MQZmmFIU=; b=O2NQDhN1dhOPJYxNUBLCqHO249GSv2pKYE4MR40aVFw1U37ulWFqE5pVqLxRDJNIqr 8vh0ddrLYAvSYbEwqKZvSBvrMfVRg0m76urrk2IGB2D/+oOHq+fZCJtEZ7KteHtV/JU8 DN8Zm1b/hEDqtwzqiwsRqkaQKlMvFGjFSjCoiuKrodwVJO93nPG2Tayf3nKXPAYKz4Fy 4QVGN5Ys5K6dnuJb6FdOwIOOhZ36XcqU4nh152Y8hIs1xgKFivghJnSIbDiUCDS60asx qcUrIZKu6D21NkkTbt+8GAPEgqt2rtUFy0SAM6WijFjcUY2lx+cZmz8S/YYuGgNXifHj tMFQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMAA8Esh; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z6si3398628ejr.643.2021.01.15.01.29.29; Fri, 15 Jan 2021 01:29:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uMAA8Esh; spf=pass (google.com: domain of linux-media-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728021AbhAOJ2Q (ORCPT + 3 others); Fri, 15 Jan 2021 04:28:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55502 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730376AbhAOJ1s (ORCPT ); Fri, 15 Jan 2021 04:27:48 -0500 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DAC28C0617A0 for ; Fri, 15 Jan 2021 01:26:29 -0800 (PST) Received: by mail-ed1-x52f.google.com with SMTP id dk8so8798179edb.1 for ; Fri, 15 Jan 2021 01:26:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=NPpTp6a6u7fOZ3GfoVMqP0h5qwWkDaaqGx3MQZmmFIU=; b=uMAA8EshSzFzDykdzTxOtz+DOjd9oB+lBVytXRmkeZbkPOvJcWqiycin0jTas0XdPR Abx7o0jv/ZFIpGgUyOdpdwufLQpzCbgh7khYlSroxcprt0ZC//THezzvYBxX15pVrEB0 oC8YMc7jYOYu/9FwnfbCmkgKNocSg3QNnWYKeJBOm1gzE3nYTxNh5snzdRiAgtqFqpZ/ 6NSEnUyZfGsg6A3YXrCXYTcfAFNoGFyCFv4j8EdpzBDAGYkTt6QyNt5RLBS3F2/PtKN8 GTqDetFFpRmSBx2LI3hHvRC4CiBSOnSeRf0L5mu9mJWs94RFTHiAWQ0rVKfea4WUcTdD Y35A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=NPpTp6a6u7fOZ3GfoVMqP0h5qwWkDaaqGx3MQZmmFIU=; b=tpSVcYgnm8J53M0X95bvQGCsCaX5PhUnpJqGCzHFY34i5oBaKqbBDnGASJ6NMrSms1 Kegixsd0XSKO2kuyrY3gx/pRKl/Q/g7ArAu6Vzr1nqK49LxdC3CLxXN0aGDZV2yc4wXC ThUs+CKqDNa9n1GC7+F73uvECNJE8KitJHsmrLiXNUSHXykpNrh+G39qEco9os0zKYub 1rCBxGijfdjU9RDAXI7/ri9hCT8LnGDAfO19dvdAT21pPftBCu28hcHPia0p8hbsng09 sHd599otwIdmJi/J8dke4kRtOSE0mmsjNsu1m7rtGjB2z3Sr18UIV/FAdK2szFWb7fMf Hntg== X-Gm-Message-State: AOAM531A7Omx0Sn342itC0bqTJBWEhMEhwcFgbEHXSezwE3YlfNsGTbN vpDPT8NHY/6+M/TgRiomi2P8M07u27tznovi X-Received: by 2002:a05:6402:5206:: with SMTP id s6mr7291383edd.92.1610702788407; Fri, 15 Jan 2021 01:26:28 -0800 (PST) Received: from localhost.localdomain (hst-221-63.medicom.bg. [84.238.221.63]) by smtp.gmail.com with ESMTPSA id u24sm3004140eje.71.2021.01.15.01.26.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Jan 2021 01:26:27 -0800 (PST) From: Stanimir Varbanov To: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Hans Verkuil , Stanimir Varbanov Subject: [PATCH v2 4/4] docs: Deprecate mfc display delay controls Date: Fri, 15 Jan 2021 11:26:07 +0200 Message-Id: <20210115092607.29849-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20210115092607.29849-1-stanimir.varbanov@linaro.org> References: <20210115092607.29849-1-stanimir.varbanov@linaro.org> Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Deprecate mfc private display delay and display enable controls for new clients and use the standard controls instead. Signed-off-by: Stanimir Varbanov --- .../userspace-api/media/v4l/ext-ctrls-codec.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) -- 2.17.1 Acked-by: Hans Verkuil diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 5d7c47837035..815c6eb4a0d0 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -2111,6 +2111,11 @@ MFC 5.1 Control IDs feature can be used for example for generating thumbnails of videos. Applicable to the H264 decoder. + .. note:: + + This control is deprecated. Use the standard + ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY_ENABLE`` control instead. + ``V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY (integer)`` Display delay value for H264 decoder. The decoder is forced to return a decoded frame after the set 'display delay' number of @@ -2118,6 +2123,11 @@ MFC 5.1 Control IDs of display order, in addition the hardware may still be using the returned buffer as a reference picture for subsequent frames. + .. note:: + + This control is deprecated. Use the standard + ``V4L2_CID_MPEG_VIDEO_DEC_DISPLAY_DELAY`` control instead. + ``V4L2_CID_MPEG_MFC51_VIDEO_H264_NUM_REF_PIC_FOR_P (integer)`` The number of reference pictures used for encoding a P picture. Applicable to the H264 encoder.