From patchwork Wed Jun 13 15:07:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 138484 Delivered-To: patch@linaro.org Received: by 2002:a2e:970d:0:0:0:0:0 with SMTP id r13-v6csp847653lji; Wed, 13 Jun 2018 08:09:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKeCrjenUep0zs+HAG9cVQrU3SaLcz75UK66FQ2okh+K5BBA9RE446WeFSi7LQICKYvye06 X-Received: by 2002:a62:ba13:: with SMTP id k19-v6mr5271010pff.245.1528902565976; Wed, 13 Jun 2018 08:09:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528902565; cv=none; d=google.com; s=arc-20160816; b=AC8Rtte5D6sZwaSMsdycQWg+opFK/5GwguyRRYl2+hOtLcO5EwA86b/dR5ie3n4Pmb yPDHhmWgvEavrpcpsy3t1BSz+UHUccqrQ4iRM0taFU0gy2MGWY0GFyCov0vGNQVYH3gY f+4z03X6/Y8DYpc8F27aZ9ssxAeVP5Ut2NoLtCk50sWna6urvdEvauz6XCVbXoP6RDgJ 6R254UzOki6fcAQZOrfypiuamYBZj6w57InUElZyop1RVvx0/CPjfqq/ZPlcVUiCUBt8 q1OCmw0GkR97bC/fiKksVlKt9WVJuTCQew5QFMMNFEit0l/Mx/thj7cTN+18+u5kTH9u XFZQ== 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:arc-authentication-results; bh=DopT6tfRa5ZXddiWA2KYWqHxQ5fQ330DwA7mzNfZ1z4=; b=khvUVobgil0vR2wkToP5UqokzcxYoxZt/PYTJkCmAd4c5symtW278tWUg7BbiMBVXX VKtkNeCOw/mjborUS2crl05dii7mg5oZ+CvFJoLEeIyYgytl21fumZ0WDfYY8P5eGi2k 6tShOm7JvsmaU7UvwswHL8APOFcTqoNBKaeLaXdUq8cKytzuqeQknab6E6/1tEbFOZhX Oeh8sQgSXvPxpqlD+mB7TkLU/UPiEyKqKzO/prMovzBWv+lOSIBgWRuPTyFLhNLGLkCt w0VinIo1PCCJIRSnpr3uEO9GKlUmSPXoH9/rw4zyWH2puXsjLdxfLYGsCKGY6FLg5qgB +cbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=TGcQseII; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 h33-v6si3271727plh.124.2018.06.13.08.09.25; Wed, 13 Jun 2018 08:09:25 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=TGcQseII; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S936031AbeFMPJX (ORCPT + 30 others); Wed, 13 Jun 2018 11:09:23 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:35782 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S935971AbeFMPJO (ORCPT ); Wed, 13 Jun 2018 11:09:14 -0400 Received: by mail-wm0-f67.google.com with SMTP id j15-v6so6158491wme.0 for ; Wed, 13 Jun 2018 08:09:13 -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=DopT6tfRa5ZXddiWA2KYWqHxQ5fQ330DwA7mzNfZ1z4=; b=TGcQseIIokf4O4DZ8xLZt3+w/947HlwG1URxXKRe2h3HY9sqcCru0SNoT6f9MJLOTX YI606ldSsZF3FbfJNjBssY3FfNYysjC8t83rfOfi02dK04hqf6ODtLZlS0BUfYtWIRmn ia8MofSGAUds8bx1Ag0s09OhrD5dVqzWu9Sqc= 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=DopT6tfRa5ZXddiWA2KYWqHxQ5fQ330DwA7mzNfZ1z4=; b=Oa9AHWVQaF3BhOYbEpi12vdN36IRO/2mO/JnXDBKUmyzSM5kCkfMWxII/XeWKXesHB 83A4cP+rHs15Hlv3hr8zwk1bsZsDcOuDqwPtuqsic8fIsAEF25t9KwD7P6xTL4UMNVRh riPkknFKzonQIocBG3Tdl5pJvXA08+1Ux/Mm53vBdA3hgTfnRVzPMhDmv/yEKRKFwKez RBQk7DgNiqhI1+t/Eoa/b5NHhmevNekt6RVhTSa/xxiOfxNx/rtVA9lYqgqgSn+P+bxF GpG390OrBYxcddQuszv/kztGPNEOPM3wYM+RKfzGCf4s2st2LfGWC/753BsP5Fb3s+zD 4BxQ== X-Gm-Message-State: APt69E0dEkEqiax5/MpF6fL14QsmkuqMePRSSHG+dsNLIvqUGOBu9nGn Vr63dyw8x39Y7jZKM9gsYefvYw== X-Received: by 2002:a1c:91c4:: with SMTP id t187-v6mr4035433wmd.51.1528902553219; Wed, 13 Jun 2018 08:09:13 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id e13-v6sm2886548wrm.45.2018.06.13.08.09.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 13 Jun 2018 08:09:12 -0700 (PDT) From: Stanimir Varbanov To: Mauro Carvalho Chehab , Hans Verkuil Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia , Tomasz Figa , Stanimir Varbanov Subject: [PATCH v3 06/27] venus: hfi: handle buffer output2 type as well Date: Wed, 13 Jun 2018 18:07:40 +0300 Message-Id: <20180613150801.11702-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180613150801.11702-1-stanimir.varbanov@linaro.org> References: <20180613150801.11702-1-stanimir.varbanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds handling of buffers of type OUTPUT2 which is needed to support Venus 4xx version. Signed-off-by: Stanimir Varbanov Reviewed-by: Tomasz Figa --- drivers/media/platform/qcom/venus/hfi.c | 3 ++- drivers/media/platform/qcom/venus/hfi_msgs.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) -- 2.14.1 diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index cbc6fad05e47..a570fdad0de0 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -473,7 +473,8 @@ int hfi_session_process_buf(struct venus_inst *inst, struct hfi_frame_data *fd) if (fd->buffer_type == HFI_BUFFER_INPUT) return ops->session_etb(inst, fd); - else if (fd->buffer_type == HFI_BUFFER_OUTPUT) + else if (fd->buffer_type == HFI_BUFFER_OUTPUT || + fd->buffer_type == HFI_BUFFER_OUTPUT2) return ops->session_ftb(inst, fd); return -EINVAL; diff --git a/drivers/media/platform/qcom/venus/hfi_msgs.c b/drivers/media/platform/qcom/venus/hfi_msgs.c index 54cd41e5837c..c0f3bef8299f 100644 --- a/drivers/media/platform/qcom/venus/hfi_msgs.c +++ b/drivers/media/platform/qcom/venus/hfi_msgs.c @@ -823,7 +823,8 @@ static void hfi_session_ftb_done(struct venus_core *core, error = HFI_ERR_SESSION_INVALID_PARAMETER; } - if (buffer_type != HFI_BUFFER_OUTPUT) + if (buffer_type != HFI_BUFFER_OUTPUT && + buffer_type != HFI_BUFFER_OUTPUT2) goto done; if (hfi_flags & HFI_BUFFERFLAG_EOS)