From patchwork Fri Jun 28 13:00:01 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 168087 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp3670345ilk; Fri, 28 Jun 2019 06:00:46 -0700 (PDT) X-Google-Smtp-Source: APXvYqyoJZ9wKDptJBtHTwyDzQvsSHDQinulrB9KujrmxsniQFfA9sQ/6JJcmUPUmWk+j1wU0u8Z X-Received: by 2002:a17:902:bd94:: with SMTP id q20mr11507142pls.307.1561726846169; Fri, 28 Jun 2019 06:00:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561726846; cv=none; d=google.com; s=arc-20160816; b=CZh/ktEtenE5hK5rdx5T5NNGXT/PJeNKhhV5QyC1yKrXvZj5ta43ziAzc70uCXIMr9 GoBp1JVF/ynLHVee6vApBNcVlQLffppTI3iNwLqKYlBZU5MPg5T+TyK2Qj4WyW0GvirP efNe6ogVbAQPrGqAE5FI8064+zYa0C3Rl1zmV5CnVtrLCCkFAgcx9waPqrg09oDVo2+H vumXh8UFo6fKdDGwzyEes2xbYlxsTriJr/2e5TSswzvZuimyTbhiWmnM0jXbBkKaaOXy cf0O2R7KXNDdKrq1DDWFDJ5nOvbCVbu2jjB48XQwD0mscb4unsmZWjAduvRfbwsFlJp9 bO1w== 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=oUEPxm1s2pNTl1RMVnFyWLgDVOKHDfwRN3bZ9Ot2lWE=; b=O67oO/5K+/JeMd5b/y5JeN8VwI7MLFOB4NkdAHnffVJJz2tQaAbzsOmT8xlyTe2ix9 J39KEmaPC2nDe9rlOfKo1UqE5Y1RSvwEym68a6IZyrwFO6e6/6NQcKcUPmk5A38llZWv +jawEy+ZF2jY0kzJW9g+k+uzHl7BfSY+wq2HGJVaz0yN08ApzzviJgwTO1voqysQk+9Q g0G2ayZlZ08j2VzweCDRdoGw8aLNZldvs/y2Y21OKP1nLXx8rlfKq+lfdVXyPjWeAQm2 2Ven0qrfo1L4D2Xv3eZBvTCWo0TLrtoeNwlVcMqUPWl3ULIjKln3eAXU5D788YYVnb2i 2mvQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p95qrKiI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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. [209.132.180.67]) by mx.google.com with ESMTP id u10si1939128pgc.490.2019.06.28.06.00.45; Fri, 28 Jun 2019 06:00:46 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=p95qrKiI; spf=pass (google.com: best guess record for domain of linux-arm-msm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-arm-msm-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 S1727279AbfF1NAo (ORCPT + 15 others); Fri, 28 Jun 2019 09:00:44 -0400 Received: from mail-wm1-f68.google.com ([209.85.128.68]:51675 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727207AbfF1NAo (ORCPT ); Fri, 28 Jun 2019 09:00:44 -0400 Received: by mail-wm1-f68.google.com with SMTP id 207so9032267wma.1 for ; Fri, 28 Jun 2019 06:00:43 -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=oUEPxm1s2pNTl1RMVnFyWLgDVOKHDfwRN3bZ9Ot2lWE=; b=p95qrKiI3YOtkKudIPDQzpYO0O8PwTpqopnFAPDzfuMoxL6E+QWqQZJTaA7IQgDchm IJvhMeIvK2D8JQNVKzS/XZfyvmG51tzoyitRRjUnU2Yi4GPt+Eg42bzmgnNH9zk4w7Pv zryeAsHfYaWKaClc0kzoe5NpVZvy9pCNHjbQuHtJv5ySqmzhV1FfIlBMp+asnAmK2RBT t7+I+3zwoNuDOdr3sIwGJR5TSWtC6+MFGZqTQnBY/LcTil7YVtKmFmjzxLPVGofUoWHc zpKZRrg7MjqcNXJWk2uPVz2tmwZ5OAILBuo5mRQszKgqx+L6mIR1HkvjaUX0R8a9WcAz O+9A== 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=oUEPxm1s2pNTl1RMVnFyWLgDVOKHDfwRN3bZ9Ot2lWE=; b=uQ7Llhd9lPG12eQKLrzCixBooLvx9sa18YfoZds9dL2giu7heTzl5qA5GxY3+TW56E HkyfJ3kFhx/+tlNKVP6DsIISt7z5LPcl4XQ2JTz2GV0HnDGVcoRfW8Os80Rd4Cz6i+oS WTh4QtLPqvwlf59TyZsZ5lG6eAcypetgI2mwW7HXYxx17dL3BYw8LvlR/talZxxYAi4T XQIwfSgwCZ3uMJK7eH7DnMVcU+tl50xODPLR0srclNPV58dVr4aQBWoIpCIdoOdVBKCd 5CjkGTPLPrT8BLw5+EOmQYoGc9gJLIeifw6+Uc/PczthmNsX6g+NxSpGigc9/8s2zGTZ VwMQ== X-Gm-Message-State: APjAAAVGCLVs2JX0xRHKf4cu+MT6s8nFbSM/WJXbSZLH8WW6T8/GNpuu eEEgsO1f9AwsZqDEqyMgVjDn95p9sFc= X-Received: by 2002:a1c:7e85:: with SMTP id z127mr7373902wmc.95.1561726842636; Fri, 28 Jun 2019 06:00:42 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id w20sm3717174wra.96.2019.06.28.06.00.41 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 28 Jun 2019 06:00:42 -0700 (PDT) From: Stanimir Varbanov To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Hans Verkuil , linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v2 10/11] venus: helpers: handle correctly vbuf field Date: Fri, 28 Jun 2019 16:00:01 +0300 Message-Id: <20190628130002.24293-11-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190628130002.24293-1-stanimir.varbanov@linaro.org> References: <20190628130002.24293-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Correct handling of OUTPUT buffers field and make v4l2-compliance happy. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/helpers.c | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.17.1 diff --git a/drivers/media/platform/qcom/venus/helpers.c b/drivers/media/platform/qcom/venus/helpers.c index 176facdd415d..c948c4e809b5 100644 --- a/drivers/media/platform/qcom/venus/helpers.c +++ b/drivers/media/platform/qcom/venus/helpers.c @@ -998,6 +998,17 @@ int venus_helper_vb2_buf_prepare(struct vb2_buffer *vb) { struct venus_inst *inst = vb2_get_drv_priv(vb->vb2_queue); unsigned int out_buf_size = venus_helper_get_opb_size(inst); + struct vb2_v4l2_buffer *vbuf = to_vb2_v4l2_buffer(vb); + + if (V4L2_TYPE_IS_OUTPUT(vb->vb2_queue->type)) { + if (vbuf->field == V4L2_FIELD_ANY) + vbuf->field = V4L2_FIELD_NONE; + if (vbuf->field != V4L2_FIELD_NONE) { + dev_err(inst->core->dev, "%s field isn't supported\n", + __func__); + return -EINVAL; + } + } if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE && vb2_plane_size(vb, 0) < out_buf_size)