From patchwork Tue Apr 24 12:44:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stanimir Varbanov X-Patchwork-Id: 10359613 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DBAD5601BE for ; Tue, 24 Apr 2018 12:55:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CE41D28DC1 for ; Tue, 24 Apr 2018 12:55:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C2AF128DBE; Tue, 24 Apr 2018 12:55:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 60A3728DB4 for ; Tue, 24 Apr 2018 12:55:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757796AbeDXMyr (ORCPT ); Tue, 24 Apr 2018 08:54:47 -0400 Received: from mail-wr0-f194.google.com ([209.85.128.194]:41806 "EHLO mail-wr0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757811AbeDXMpP (ORCPT ); Tue, 24 Apr 2018 08:45:15 -0400 Received: by mail-wr0-f194.google.com with SMTP id g21-v6so22326208wrb.8 for ; Tue, 24 Apr 2018 05:45:14 -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=PL1i9Vqww/nxWSnJ7GKIIelU3Sb421JXQHWPaXnETRFKX/Yip4DsUZsDqVLzvGVe5c CZYO+DGbCPIzS4gSsdfKZyc0lZipXceLgPtlsYerPmlfj3UKMnbX+XbE+SWQ7Ib3spHe Jhvvtfk/dYKICDENhdvXVLeDcOcwHKA0gyZFc= 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=PoFxRQOVQUHUAtXwyInpMUYGw6JM2Z0HNlzvTq0Zea0dhian1pBF4Gov+3udJqKJzs hkmloC4+gtXw4beWT7MQx54gLEwXMec1Tolbm7hQAn1aETEaj0fiiyubhO71Yy+bpdFp lSka2/h21SMZp8L8SSMYs6Xq8I3u02YYz8CxkIPFflEQYED0eAittoMk1Nl6yxd9f2sb lcaEFQt/VmY4lqQElt6hjK2Pfstp7b7UfzLcq7cx/8pj5KWSTqNACmbFZjRvqidH56vZ W52oKc59a8tk6lFXKxqtr3z1EX3gfiqVq2jPIZlbQavqmefTY4e1ziQmjAhHY7L9hGnR mNCw== X-Gm-Message-State: ALQs6tCXrYviG6CofeEM/NjlFqbTMk9PU51KOdbqepdJLzvwWqVJFYpA NI1V8AwitY3345S/0F77jTZUlg== X-Google-Smtp-Source: AIpwx4/VW0QBFccGLsb+ZWNd2Mm+5zpJa2UgV6dDc/OJe3Mt+UfFI1UdK3DwBImu83eWBis66NTcRg== X-Received: by 2002:adf:dbc6:: with SMTP id e6-v6mr21542147wrj.212.1524573913665; Tue, 24 Apr 2018 05:45:13 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id n49-v6sm22666013wrn.50.2018.04.24.05.45.12 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 24 Apr 2018 05:45:13 -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 06/28] venus: hfi: handle buffer output2 type as well Date: Tue, 24 Apr 2018 15:44:14 +0300 Message-Id: <20180424124436.26955-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20180424124436.26955-1-stanimir.varbanov@linaro.org> References: <20180424124436.26955-1-stanimir.varbanov@linaro.org> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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)