From patchwork Tue Sep 8 12:32:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 249372 Delivered-To: patch@linaro.org Received: by 2002:a92:5b9c:0:0:0:0:0 with SMTP id c28csp4842179ilg; Tue, 8 Sep 2020 12:37:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyjqMK6cMRckfDrnVrqVJoA+FtcVrfyvF2jLGnJUJCuDDLPTg5UgQ0RpoeKhXc7mRkq1mr0 X-Received: by 2002:aa7:dc05:: with SMTP id b5mr621551edu.137.1599593839203; Tue, 08 Sep 2020 12:37:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1599593839; cv=none; d=google.com; s=arc-20160816; b=Q3CmTVYi/wRRSI1/Tn304ZB5CMj71zy9mi6kgL53ygz+tgiSk/ZRC0cmGc67cCixQt QdugY/tzL8/oHl4I7d0DXawwECM9/4eyAHCioSKCg2SUHelRIaL0YlqN86tjzyay+5vQ NkXLOr9uCCHHit9Qrsa0Ha02rkVShrauyxZN2lYgMVR1qqyrRHotLO4pj2ggBvIYlB1O QT7zTN0A7UW8S9bLJbesKu2N1zmE0g4EJOsAGMQRMRNbV1jlbVDieCzF6FPnKnE6wr8R wT03X4y3dn6dbanCXfaioQfEQlGU/JFQXljwsWDK1JXTFw9DLu3LwEMHOart7nOOBBPp 5ijw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=NcEeOZgUSVybaozrvzLOP4ZsIw0NJzWU1jk5v7jntbE=; b=bJfFNCnRG3MkN3IAPgCYEubHJawviLp3oGBx6aVYYzvd+HjJ3p2YCEkOdjgnx3VgJa xe0nfPrn6juTA+e1953PTz0jPmLhqi0yA+VnBTwuarR5YpaRpJ7n9FOa1iyj67qlBA8J Q//YNXJrfATK91ypJU+N17+PrMJ6hjc8qvvbQCDR6cg1jruamg86JkBIgp/LPkNG7r2N VWSEYqWmVbhFxiOolQBU8a/FIfxdi7/p1ZuBlBKU5Mi2jydNPl1Yy+H/zFKCTAxMwKIa sirX/4EQHvJQziQaW+9ScYI+MvDGfvj5vDukJRM8na/+lAr2pIXie4iVNukFa/mCHKHX TIyg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vBa7YSUi; 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 e4si52464edq.182.2020.09.08.12.37.19; Tue, 08 Sep 2020 12:37:19 -0700 (PDT) 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=vBa7YSUi; 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 S1730851AbgIHThR (ORCPT + 4 others); Tue, 8 Sep 2020 15:37:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730943AbgIHP4x (ORCPT ); Tue, 8 Sep 2020 11:56:53 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AABA7C06134C for ; Tue, 8 Sep 2020 05:33:34 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id y1so2738314ejq.2 for ; Tue, 08 Sep 2020 05:33:34 -0700 (PDT) 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=NcEeOZgUSVybaozrvzLOP4ZsIw0NJzWU1jk5v7jntbE=; b=vBa7YSUiMOArxRr8RYn5eMWXo+v3zACwmzTxGkJE5TSuaR0Pvugz/dUS4+/6GX2aTT u1pNNYLrANE3rkjF7hrp2TSp60/UBruOyThfQKtkN6RrezEOioNm0wsqP3XUXPRb1+nr eSsqXB+AkojP3vY0Ui544eY3EIx27JaQZhbcr1rhWSMxfdxnzw1HN+vrHrjmg98sGffC 54p8qXVm/QErO+a9emGrfC0SCcq0mbB5oRJg9OLkW2wgIIzsKAMZ9DW9+TvgmhW3RWzz F6Y82uraV0LRFwBmlLbAV+PHNoFARq4y8oPrFzfjBFqSYBULrP1IKc464lqiGHUdHU+G 41Nw== 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=NcEeOZgUSVybaozrvzLOP4ZsIw0NJzWU1jk5v7jntbE=; b=r84mzK7pX7gAXw60sxrQaf30ZbvYQbbNaRAKrZmCVVGpGaktTS8Kvw5o8zwvpP9JeM mSoLQDqjIcaUU0VfGSV9P9DjT61iisLE0K647cGjCCob8PpSOzoLhOPqHvo2hyJuJErs 5MiiexrF3ekvb5sN+fNXJZJhBBIO6clqF3NtM9AyJJKdZFiL4civ1sSmv95ZQ65On94H 4FvRos0EAq8E3LF/Hsd64SP23zm5pATa5yk3XVqS4znmnPpqN95+u9W7FK8dvbXL3aug KLBvU6Yf2Jus3yJXtjcwaPNfu9TndBEXMkxh4X3QyMS3paL774bDKYnbgxFn1ax2HG94 zSBw== X-Gm-Message-State: AOAM532Rj7gBlHGYEZ9dED4IDkXTfFuxdp87w684ocOWEJx48xV8KASB IhrCvhVCRM5RIum7oHvCA/FdzA== X-Received: by 2002:a17:906:2c14:: with SMTP id e20mr26923490ejh.205.1599568413372; Tue, 08 Sep 2020 05:33:33 -0700 (PDT) Received: from localhost.localdomain ([195.24.90.54]) by smtp.gmail.com with ESMTPSA id y9sm17499744edo.37.2020.09.08.05.33.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Sep 2020 05:33:32 -0700 (PDT) From: Stanimir Varbanov To: linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org Cc: Paul Kocialkowski , Philipp Zabel , Hans Verkuil , Mauro Carvalho Chehab , Neil Armstrong , nicolas.dufresne@collabora.com, Stanimir Varbanov Subject: [PATCH v3 4/6] venus: vdec: Set/Get VP9 profile/level Date: Tue, 8 Sep 2020 15:32:19 +0300 Message-Id: <20200908123221.2793-5-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200908123221.2793-1-stanimir.varbanov@linaro.org> References: <20200908123221.2793-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Get and set VP9 codec profile and levels. Signed-off-by: Stanimir Varbanov --- .../media/platform/qcom/venus/vdec_ctrls.c | 20 ++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/vdec_ctrls.c b/drivers/media/platform/qcom/venus/vdec_ctrls.c index 3a963cbd342a..f3f41c1baa6e 100644 --- a/drivers/media/platform/qcom/venus/vdec_ctrls.c +++ b/drivers/media/platform/qcom/venus/vdec_ctrls.c @@ -22,10 +22,12 @@ static int vdec_op_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_H264_PROFILE: case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: case V4L2_CID_MPEG_VIDEO_VP8_PROFILE: + case V4L2_CID_MPEG_VIDEO_VP9_PROFILE: ctr->profile = ctrl->val; break; case V4L2_CID_MPEG_VIDEO_H264_LEVEL: case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: + case V4L2_CID_MPEG_VIDEO_VP9_LEVEL: ctr->level = ctrl->val; break; default: @@ -49,6 +51,7 @@ static int vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_MPEG_VIDEO_H264_PROFILE: case V4L2_CID_MPEG_VIDEO_MPEG4_PROFILE: case V4L2_CID_MPEG_VIDEO_VP8_PROFILE: + case V4L2_CID_MPEG_VIDEO_VP9_PROFILE: ret = hfi_session_get_property(inst, ptype, &hprop); if (!ret) ctr->profile = hprop.profile_level.profile; @@ -56,6 +59,7 @@ static int vdec_op_g_volatile_ctrl(struct v4l2_ctrl *ctrl) break; case V4L2_CID_MPEG_VIDEO_H264_LEVEL: case V4L2_CID_MPEG_VIDEO_MPEG4_LEVEL: + case V4L2_CID_MPEG_VIDEO_VP9_LEVEL: ret = hfi_session_get_property(inst, ptype, &hprop); if (!ret) ctr->level = hprop.profile_level.level; @@ -86,7 +90,7 @@ int vdec_ctrl_init(struct venus_inst *inst) struct v4l2_ctrl *ctrl; int ret; - ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 7); + ret = v4l2_ctrl_handler_init(&inst->ctrl_handler, 9); if (ret) return ret; @@ -133,6 +137,20 @@ int vdec_ctrl_init(struct venus_inst *inst) if (ctrl) ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; + ctrl = v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &vdec_ctrl_ops, + V4L2_CID_MPEG_VIDEO_VP9_PROFILE, + V4L2_MPEG_VIDEO_VP9_PROFILE_3, + 0, V4L2_MPEG_VIDEO_VP9_PROFILE_0); + if (ctrl) + ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; + + ctrl = v4l2_ctrl_new_std_menu(&inst->ctrl_handler, &vdec_ctrl_ops, + V4L2_CID_MPEG_VIDEO_VP9_LEVEL, + V4L2_MPEG_VIDEO_VP9_LEVEL_6_2, + 0, V4L2_MPEG_VIDEO_VP9_LEVEL_1_0); + if (ctrl) + ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; + v4l2_ctrl_new_std(&inst->ctrl_handler, &vdec_ctrl_ops, V4L2_CID_MPEG_VIDEO_DECODER_MPEG4_DEBLOCK_FILTER, 0, 1, 1, 0);