Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp272848imm; Tue, 15 May 2018 01:14:34 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr6E6Ji3V+zygLItueAaBAAqEZo0xkFpzacFph1L70EiHM8UOEBcG+AqDMP6onL6NyV9ZAJ X-Received: by 2002:a17:902:b28:: with SMTP id 37-v6mr13284209plq.207.1526372074935; Tue, 15 May 2018 01:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526372074; cv=none; d=google.com; s=arc-20160816; b=HNVRALzoDKX/sUE3HbhsetcCpD0/j3nsK3Gf/Chb/cKKyXXuCt4xfM/oeKBPDlpF7y ZuziEiQ+eJSfLxPmtOm3Juy0k7UjD3db+HXPvvEyyrF3L8T/THCx8LlKkXDDvAVWLKPc +3P3DmOW3d0gVdixNraCvA6RWzYHaqC3cYXn3nsFLue+zIGMYOrAgFPvUtevFpsIreyG UN8nrs8IHClxzue1IkSw3CVF835tF322MY2/IRz9BJDqzEl/E7/e5XDSVIED+28oW1wW UQNQtxsfdNfovl2f3djlhwto8SzXoqzYHBEHthEmxwUKEygvVxO5/0BKpHML1j7sGOLU Q2ew== 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=UJY1ElvCAePNUPkqjsGk3ZluUk9SleoeEVToFWcXc0U=; b=wsMvYFTXQ07z8oGbipytb291q2s+gO4DjgDmPoYUgTy7V/5dNtLo8LnlRONou2XXiX 2dXOS+BpUwtAYKfuXOKjdr8V9+pnuUmwc+eAexDX8eirLRLHXMN5GKAR5v2IKc2rllW7 j5DabnXGlZPGuCYsUmE77nQPulGOiMCXL938B9qmmnEow036c+Ia2L4yXLKDtXgTv3zi Fsb+vMtIDMtgJRTHkNjiL3UvnV8gsCH06tAl91xt8qf5IXZyJs2wIdR6518OLhht+EvV rL2GXsnOEBCtaI/a94MW2xkso8TMmL1tsvYt7CTIcP/tCUBZ4IwT36wZFShr+yzQuG1i QE9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=C1P8Pikn; 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 r3-v6si8854944pgf.621.2018.05.15.01.14.20; Tue, 15 May 2018 01:14:34 -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=C1P8Pikn; 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 S1752725AbeEOIMR (ORCPT + 99 others); Tue, 15 May 2018 04:12:17 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54940 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752495AbeEOH7e (ORCPT ); Tue, 15 May 2018 03:59:34 -0400 Received: by mail-wm0-f65.google.com with SMTP id f6-v6so17673921wmc.4 for ; Tue, 15 May 2018 00:59: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=UJY1ElvCAePNUPkqjsGk3ZluUk9SleoeEVToFWcXc0U=; b=C1P8PiknuPwX3hDZMWhJntybejNb/CoX7QR4pYi6WT/3lDZwLB9BSqM53d+U8Ij19/ w+ZKNA9kIpCtWHWgOlw9AhUkqTOmkfOpkD+qkL43oQLc1rq86TJVrEe8C9OGrGdGHUak GDPojQmhO7yBLf9Kh+/M0JHEF3AvIAp6KvYic= 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=UJY1ElvCAePNUPkqjsGk3ZluUk9SleoeEVToFWcXc0U=; b=ajvYYK6awp9zfpBmEAoILBFsf4ktLE1jYYbYh/up6t9OHLDmF8aJd2Jhd2V4g/OC+u GiFD1V2t67CAzksYcpnrlpATrlR026+Q3B2w7+6uGn8LlN4mE5ZdF61rz5u4Flp77FMO tocRjwLqRJIb9vBa7jGhEj6VpTUEWPsrlIENn4IFoihaRZBKtx5SwfZbIRa3q4QxWmPW iaC88j3h2UcrWII4tnx+jZZ4sQtyDFwBaHfEG4eTeUIFGEkwqeAorrFMENibgcRZlmtr j7dA9R+19pvoSqyzahrlRAT2KgAYApzsNVEZ/ee3M4jTMxvGmqCN0v7fSu1NAIRUo2Qo L+4g== X-Gm-Message-State: ALKqPwfIyJYhcpteu83TSduJ6wHqPBC+4A1LrGFlxt889q1aUXeBB7OI c8x0fZp8yQaTpwkRCKWM0M+6DQ== X-Received: by 2002:a1c:3313:: with SMTP id z19-v6mr490564wmz.48.1526371173836; Tue, 15 May 2018 00:59:33 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 4-v6sm10918510wmg.40.2018.05.15.00.59.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 15 May 2018 00:59:33 -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 , Stanimir Varbanov Subject: [PATCH v2 06/29] venus: hfi: handle buffer output2 type as well Date: Tue, 15 May 2018 10:58:36 +0300 Message-Id: <20180515075859.17217-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180515075859.17217-1-stanimir.varbanov@linaro.org> References: <20180515075859.17217-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 --- drivers/media/platform/qcom/venus/hfi.c | 3 ++- drivers/media/platform/qcom/venus/hfi_msgs.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) 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 5970e9b1716b..023802e62833 100644 --- a/drivers/media/platform/qcom/venus/hfi_msgs.c +++ b/drivers/media/platform/qcom/venus/hfi_msgs.c @@ -825,7 +825,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) -- 2.14.1