Message ID | 20190117162008.25217-7-stanimir.varbanov@linaro.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-msm-owner@kernel.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 016CC13A4 for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 17 Jan 2019 16:21:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E73A03043A for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 17 Jan 2019 16:21:30 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D8F2C30459; Thu, 17 Jan 2019 16:21:30 +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 98A283043A for <patchwork-linux-arm-msm@patchwork.kernel.org>; Thu, 17 Jan 2019 16:21:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729213AbfAQQVQ (ORCPT <rfc822;patchwork-linux-arm-msm@patchwork.kernel.org>); Thu, 17 Jan 2019 11:21:16 -0500 Received: from mail-wm1-f68.google.com ([209.85.128.68]:36750 "EHLO mail-wm1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729106AbfAQQVJ (ORCPT <rfc822;linux-arm-msm@vger.kernel.org>); Thu, 17 Jan 2019 11:21:09 -0500 Received: by mail-wm1-f68.google.com with SMTP id p6so1689620wmc.1 for <linux-arm-msm@vger.kernel.org>; Thu, 17 Jan 2019 08:21:08 -0800 (PST) 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=MkbOUFHDsrDG1TGvqhepL8zE+1a5aus1syCufXPfhww=; b=WRKhZf4RUsxe3qwNVAqkut2X4sPhjyKbKboB/6lzkNvpEPB690MAHkE9otoCgA3iCa sEDi+1WICELvvqYkxsUIfeEexgdDrAxRPeJ/eF/uJ05JRhnj4kyyrIouRwEqMwAe11Go Iv9bcBTxbyPc2omRNkdybZCKrY7uq19n5v19g= 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=MkbOUFHDsrDG1TGvqhepL8zE+1a5aus1syCufXPfhww=; b=XcACHcT+rk4+FSm/oBWJtg6/qM8Mf8ikRhPnSaujLF2qE6w/naA+LM+DOi4eRVFs+2 OT5KZiTxrmgb47cs3uS4uiBaAMoZIDOQFbN1XK/8dovPlrxwWn6YaqjoLyw0xbqoYNlG 0CeJdtp2VfL/3PBqRGrq6SfLynYSSsut9C+qiT1eWPT4JxYd4OxJdr5aDWg1mSBhVYaO mF4L9b418sadMshvGEGBRh4EY0kYuaixnduAeuZsihBWy9ZNOf9+2MBQ9obB6ZQ3PntP kEvS5rQKnHxkeChxhChABEMrn+crYSs0b0UpVNyZX0QDCqQ3BWSWjWs2Ni3Szn0CjiEe 5M3A== X-Gm-Message-State: AJcUukeffCYqOtuA5k7TV4dugt2jnCe9YORq2zcEnTDRUrvlVPbgmSrO jYeyoWv7ZswHB+YbYo7IfDckNw== X-Google-Smtp-Source: ALg8bN5NqvzrDlG3B/jNNGzGdg1LJu7EDyDaSjTmT2y5zFFt2yGnY2HJWVfZtcbgY+YxrF94NnCeLw== X-Received: by 2002:a1c:9d57:: with SMTP id g84mr12654932wme.16.1547742068013; Thu, 17 Jan 2019 08:21:08 -0800 (PST) Received: from localhost.localdomain ([37.157.136.206]) by smtp.gmail.com with ESMTPSA id v133sm31124734wmf.19.2019.01.17.08.21.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 Jan 2019 08:21:07 -0800 (PST) From: Stanimir Varbanov <stanimir.varbanov@linaro.org> To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab <mchehab@kernel.org>, Hans Verkuil <hverkuil@xs4all.nl>, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, Vikash Garodia <vgarodia@codeaurora.org>, Tomasz Figa <tfiga@chromium.org>, Alexandre Courbot <acourbot@chromium.org>, Malathi Gottam <mgottam@codeaurora.org>, Stanimir Varbanov <stanimir.varbanov@linaro.org> Subject: [PATCH 06/10] venus: hfi: return an error if session_init is already called Date: Thu, 17 Jan 2019 18:20:04 +0200 Message-Id: <20190117162008.25217-7-stanimir.varbanov@linaro.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20190117162008.25217-1-stanimir.varbanov@linaro.org> References: <20190117162008.25217-1-stanimir.varbanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: <linux-arm-msm.vger.kernel.org> X-Mailing-List: linux-arm-msm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
Venus stateful Codec API
|
expand
|
diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index eaa82af9ec09..5374655eda39 100644 --- a/drivers/media/platform/qcom/venus/hfi.c +++ b/drivers/media/platform/qcom/venus/hfi.c @@ -207,6 +207,9 @@ int hfi_session_init(struct venus_inst *inst, u32 pixfmt) const struct hfi_ops *ops = core->ops; int ret; + if (inst->state != INST_UNINIT) + return -EINVAL; + inst->hfi_codec = to_codec_type(pixfmt); reinit_completion(&inst->done);
This makes hfi_session_init to return an error when it is already called without a call to hfi_session_deinit. Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> --- drivers/media/platform/qcom/venus/hfi.c | 3 +++ 1 file changed, 3 insertions(+)