From patchwork Thu Jul 5 13:03: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: 141121 Delivered-To: patch@linaro.org Received: by 2002:a2e:9754:0:0:0:0:0 with SMTP id f20-v6csp1918433ljj; Thu, 5 Jul 2018 06:05:17 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfp93Wzuynl9NDp/moChAz0R7XdUeEl0UnAbCigSjLiNJrhNATqV0ylZM7m00warcksFfr+ X-Received: by 2002:a63:5d58:: with SMTP id o24-v6mr3930910pgm.349.1530795917783; Thu, 05 Jul 2018 06:05:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530795917; cv=none; d=google.com; s=arc-20160816; b=x30pX2dT3p28RcqymNlqLvaUfdKLJzCxCbqs4Aj9IB2ZhuXTZEx/1IMOEC3VeGJBPn s7+u8hbtqVgASx9Ch37JJ6pcCuvbJnqGsZuJWRLC3r1LmsmD4/L/E3+0CbYJozWvPMIn BPAb9jvww+/R4sIrnbjODESgi1RCxsgeX5tci9aN05HtSoWoe4CTKwVww5dD1M3mXUUn 9G/bz6ZlmZp63JUIwcVLS5BNoO/ZqSI702alNik5zP7WZ28ElKISaeew668ss8YCpCY5 heZDwbv4WWpZ6Oc2r1GWhPoBkcZLRJ9j4TqTDMrgbxWhD76Tv/VFHcq45PeFRnvFO4Z1 kB/A== 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=UbbCiS2ZSioyflwFOss9DFknPjYZ/K+XcX6tzEfA1sYmtSEM9WzpBJ8JgR9yMESzHn f7K9VCsh2rEj9n/aUzAB3GM31QLwQKAS1x9ejd1xofBIrrzD0Mvs/xG5xNdYH5cOqP1s Vxt0ZbgvrsAJ8ahaNYNc58aPXdNyklLWC0n8pUxCmFp9NGxygFvCTaARs4PlyqjmLKdp kC08ZflFZOWwBqTiKIlmlWgO+LCi6ugiVvqDXitsmzVquqi1NN6LABGBVLpSi3yZ7QYz rAjJsA7tZ7PmO9RvPbUTqSslk2JAvvdxvTC5vsVRbfsu2qZ1NsW/yxJc3Hkq7tLs0isF KmCg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Sxjl44Ch; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id a10-v6si6165265pln.349.2018.07.05.06.05.17; Thu, 05 Jul 2018 06:05:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-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=Sxjl44Ch; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 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 S1754312AbeGENFQ (ORCPT + 4 others); Thu, 5 Jul 2018 09:05:16 -0400 Received: from mail-wr1-f66.google.com ([209.85.221.66]:33745 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754172AbeGENFO (ORCPT ); Thu, 5 Jul 2018 09:05:14 -0400 Received: by mail-wr1-f66.google.com with SMTP id k7-v6so1138787wrq.0 for ; Thu, 05 Jul 2018 06:05: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=Sxjl44ChUU1xaGXSh8Zizx2qkhpkRjvpO2dUOD8sZkgIzziO8yyJWCtA0t0+W+sY+G 9pj+GSf3MHPK4+mHXAbo1BbgfXg+6zX61J6+iDgXmNEK6Lt3NAvvSFNtpvPbxsdhLp5q 9RXkA8w1oaXus0qQ9ebprLlzb6lHUQu5avSsw= 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=eLJPfHXdhOAx3LkrgBlABDG0Jn9o6l3KsW99cYmBeWreNsb6VhHK1H68cMVhQGev0a cQ35ppxA1eaEpDGWlEy4rnrmk0p/CFSxBIelCxCp5nXuqRt/jOvSw8+o+pUscqKRRp8s tTJ8dJXYpk8EfJo69Km6SoPGvKuDcQfMvxlNE0+N8s6yfnU/vtr6MPd25d6YpdM3IQa9 Hxvqj7m/xwyQKOVrC3pOrPPte0Lo4027NGaALU8F0zwnOSEuJjdGEJyo2rtlgysVA7+O 1E8p+bXSqccg0i15HDXSizZJYsdPUSqt5mOZPyJIXYfqyoniGswlzg5oU/JSB6qq3eCy /8Yg== X-Gm-Message-State: APt69E0Gezu280dEUVMEwHDVgFvoh+yb2xy4ntgGuUfswK3ZLqZoOtlY cBH6tyT4Ndy1MI+f7fS9hH7smA== X-Received: by 2002:adf:e9c1:: with SMTP id l1-v6mr4308779wrn.14.1530795913157; Thu, 05 Jul 2018 06:05:13 -0700 (PDT) Received: from mms-0440.qualcomm.mm-sol.com ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id 11-v6sm2109102wrw.67.2018.07.05.06.05.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Jul 2018 06:05: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 , Alexandre Courbot , Stanimir Varbanov Subject: [PATCH v5 06/27] venus: hfi: handle buffer output2 type as well Date: Thu, 5 Jul 2018 16:03:40 +0300 Message-Id: <20180705130401.24315-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180705130401.24315-1-stanimir.varbanov@linaro.org> References: <20180705130401.24315-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@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)