From patchwork Mon Nov 9 17:35:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 321596 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 03F8DC388F7 for ; Mon, 9 Nov 2020 17:36:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9655E205CA for ; Mon, 9 Nov 2020 17:36:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="BFxRxbsn" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732163AbgKIRgR (ORCPT ); Mon, 9 Nov 2020 12:36:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732069AbgKIRgJ (ORCPT ); Mon, 9 Nov 2020 12:36:09 -0500 Received: from mail-ed1-x542.google.com (mail-ed1-x542.google.com [IPv6:2a00:1450:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 42F35C0617A6 for ; Mon, 9 Nov 2020 09:36:07 -0800 (PST) Received: by mail-ed1-x542.google.com with SMTP id o20so9669289eds.3 for ; Mon, 09 Nov 2020 09:36:07 -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=SsKi06aFz0HTo2Yl+cJME4oxrb6MxPsHXouTbem6RGI=; b=BFxRxbsn5xdgpJDxro2qTxpz/f0nOnFDLq48DGON105z4GLn5pgjkZnbCOd9mCkkZJ CRI0u8Or6ciO+QGVcFfMZ1RJovaGb7gOfORQp3Yv+95GSQ729HL+ZPkBSlN4p2BoJJOu aDMvNBe7de5MnwHxmWaio5Z6fbRhA3U3uIs0GyhYJ5WqAkRnJ/xmylnSx/Nzu2utmZck EBlHZp5yLxaMGD2b47Thvh57MEwg3LhvhFAkTNuys+cwXZUGrTHaOJ0uBGtz5nUlpsLX 9DvrAh/iAVOBaboXZsGireRxpymIWivTswiOZwjPQ09vE3FrOKoslXyiCLTQmHHUGNo0 0Qcg== 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=SsKi06aFz0HTo2Yl+cJME4oxrb6MxPsHXouTbem6RGI=; b=gY0f/Imv+oD+YYXjlw9Q3E+KiQ2AOMW2hICdrESQAgRd/McIysKti/HGO4wxXrnhcy oQ3TievVXownZZgP1OBbXpvM99ch8wQs7WPtdd2Vvs7RqY/U4v1dtpzMIIowfp92fB4R vCT1TjK3XEUCn26sdOCdMq4iR8doL7P4HwJ2AJrfhmQTtMT24puzEM3bl9KqdBdMRUFZ x8febkl2vrdarYvOrM5Y2N1Q4bhKsBnArHY+hNfa6ISNjaolQwPKrVaRomiBtlfVQDrn WpwxUAIz/W19cV8xszQF04/cGI8rkySAoS+WrEqunXKSLe9KCgWFeyAMSZMGUHrXaztq Ljog== X-Gm-Message-State: AOAM533ON2CF4qvxfqvIDUObFjP1w7kCTRu0/8QYyTyHDszKTJbowbJf C5HLBfficj2UzrLSqqtw7yoc77cl2TL7ke6m X-Google-Smtp-Source: ABdhPJxJEqEwcqxwZ5dDOkeXSSn849iNUGTNFrtdZ1oAB0tJBm9PPvPsx4rxq4gFloPMZs4n3fi/jQ== X-Received: by 2002:a50:eb0a:: with SMTP id y10mr17307631edp.342.1604943365785; Mon, 09 Nov 2020 09:36:05 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id jw7sm9123981ejb.54.2020.11.09.09.36.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 09:36:05 -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: Kyungmin Park , Kamil Debski , Hans Verkuil , Ezequiel Garcia , Nicolas Dufresne , Marek Szyprowski , Stanimir Varbanov Subject: [PATCH 3/4] s5p-mfc: Use display delay and display enable std controls Date: Mon, 9 Nov 2020 19:35:40 +0200 Message-Id: <20201109173541.10016-4-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201109173541.10016-1-stanimir.varbanov@linaro.org> References: <20201109173541.10016-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. Signed-off-by: Stanimir Varbanov Acked-by: Marek Szyprowski --- drivers/media/platform/s5p-mfc/s5p_mfc_dec.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c b/drivers/media/platform/s5p-mfc/s5p_mfc_dec.c index 61e144a35201..4a3e8e9bbff2 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_DECODER_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_DECODER_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_DECODER_DISPLAY_DELAY: ctx->display_delay = ctrl->val; break; case V4L2_CID_MPEG_MFC51_VIDEO_DECODER_H264_DISPLAY_DELAY_ENABLE: + case V4L2_CID_MPEG_VIDEO_DECODER_DISPLAY_DELAY_ENABLE: ctx->display_delay_enable = ctrl->val; break; case V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER: From patchwork Mon Nov 9 17:35:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 321595 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, 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 018C1C2D0A3 for ; Mon, 9 Nov 2020 17:36:45 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 96B14205CA for ; Mon, 9 Nov 2020 17:36:44 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="PitAaj9R" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732223AbgKIRgk (ORCPT ); Mon, 9 Nov 2020 12:36:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732068AbgKIRgI (ORCPT ); Mon, 9 Nov 2020 12:36:08 -0500 Received: from mail-ej1-x643.google.com (mail-ej1-x643.google.com [IPv6:2a00:1450:4864:20::643]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D2AEC0613CF for ; Mon, 9 Nov 2020 09:36:08 -0800 (PST) Received: by mail-ej1-x643.google.com with SMTP id oq3so13450181ejb.7 for ; Mon, 09 Nov 2020 09:36:08 -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=L9F3HkMW13rcGTb3bzExEGKic5ytenCIez631dN7HLE=; b=PitAaj9RXayVuhqFAVZImb2FJzaptvJrhnw4hRd7qLhtpHZt3/13gByfP2V52MOaUX aH5Y7+o8Wug0hJs2gyg/kpATu+uz4xGJqpaA+qMwMJNMx93z7o1RSZbdhe60teDElpma MZWjsED9bHeNSqbizQ32mr7FDj01m120ZIF+PLqQ2hWlxXqmbfq7/C7qIMbzCia4vpk0 wNo+WpH7HTWxUI88xYoFekEvbl+0OmG3mqHshaIormsO/9qngltHSg3J2kMiMZiybVvo rnnAax8INabenQwe0yl5nNUwZISmh+wVD3Xw0HE3/3I67qQhxFnAtuHbilgLmxjQDOnA wLSQ== 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=L9F3HkMW13rcGTb3bzExEGKic5ytenCIez631dN7HLE=; b=VY5dMUKl7TPoWDxiaxshCo39m82DbHzTM/tpO1SQYuP6surzE36/09ykH8n5X0vvHL OG6II1vL1qkBr3ZagT2ChRgee0YYYdr5W0Pt+gpFzZc0Pk96R3NMcUEQJRVeQcFZM2y/ spZmJtbvxmjqwGQMK7ec5OcWODVPBVJLJGgJCrFkI8VqglPz1LaTm5cuhSSuHBH4a46S fBzyDyTdnhH3LfIaer2Nm8xiaC7YpDXyog6Y0TByOiPue2KZxj/vR9xW3qmZuqNSJ+b+ hl5UVH543usLAl8erS4BcH/Lzz6xo8WeHDDirxel38RbmGe1bpv7CUGgaUZvn0DGgrUv P7nw== X-Gm-Message-State: AOAM532DD+5kcXtTGngw+2atc/Ygf//kvXhc3seWFKKqoik5t+7JeNw1 1qoco5Z9CqhOr/dyWK/xvJqcX2u1vFpKUYKs X-Google-Smtp-Source: ABdhPJyPOQ+Ryay5dRFIcvl4AnOiW4HTmIeH+B3sow5u7A2Zn8mHc5EEGOQcqZwKV+qqfynNNsUwQQ== X-Received: by 2002:a17:906:1381:: with SMTP id f1mr15609974ejc.87.1604943367038; Mon, 09 Nov 2020 09:36:07 -0800 (PST) Received: from localhost.localdomain (hst-221-89.medicom.bg. [84.238.221.89]) by smtp.gmail.com with ESMTPSA id jw7sm9123981ejb.54.2020.11.09.09.36.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 Nov 2020 09:36:06 -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: Kyungmin Park , Kamil Debski , Hans Verkuil , Ezequiel Garcia , Nicolas Dufresne , Marek Szyprowski , Stanimir Varbanov Subject: [PATCH 4/4] docs: Deprecate mfc display delay controls Date: Mon, 9 Nov 2020 19:35:41 +0200 Message-Id: <20201109173541.10016-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201109173541.10016-1-stanimir.varbanov@linaro.org> References: <20201109173541.10016-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(+) diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst index 82c9cda40270..b8f69c52b2a2 100644 --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec.rst @@ -2771,6 +2771,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_DECODER_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 @@ -2778,6 +2783,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_DECODER_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.