Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1830659imm; Sat, 29 Sep 2018 05:02:42 -0700 (PDT) X-Google-Smtp-Source: ACcGV62w1ATvQnwM73G3b9VolZ4zFt9IkDrV0HghM9pZQA/u5Kp1d7Ywsvtadteak5P93rnOcfDj X-Received: by 2002:a17:902:74c7:: with SMTP id f7-v6mr2877578plt.45.1538222561982; Sat, 29 Sep 2018 05:02:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1538222561; cv=none; d=google.com; s=arc-20160816; b=vkLvEcs1RFcfndcciHRq/qVSPAAoyk2XZdqjhO4QiIVXVqFlkxWwDVlITcoT3tdWwg BD/fIcpKEJHhd5ia/FbAo5D5j1EB5MvGLDM8iPybZspwqNW95IvQRcFoge03mUP8D8L4 LCfe6ZeJlKi2RGM0NJPfaxW+ZoT09y5KrYRUOQUKJIQgHtbE2psXhlH77KqDxu6KqVV5 wP8W5jvBph7P12YXjlIUJ9tgzEijgwOidURQS99SydTbVAJ7SuJMngvmrQHhRxsStA1V YPnN+EB0MjPOcu4kRoK++5UEhFY98a9TNflwNy9amMoDXLkw5t3ajgBfzQ7l6aFakwy9 TOHQ== 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:dmarc-filter:dkim-signature:dkim-signature; bh=shER0EzvnA5T8rY4d7Yr2xXnjmPOl/BJM54unHE345U=; b=cHZMkpzxQ5k0gxg89iguVrCVSSsPh4ioGZPS68lw6PZeLn4NJn6IUapCSPiqwz8NR2 15/pOSLdDuH2Pol8MAV/qw82rsOBpnVNkWkCQ6Y4C62S2BeWpar8sLF1k/6Nbe7fJSPa 57mLLNh0irSOwwEIy/S9rdKDdMwqyc6XpEoQtQiFjkZPSe6tMKJdCpHqO8DCZ/ZPWMSv 3EL3ZFbcR2NAb0HaRgPNIm8st8eRJdnbscvHT2dwAKj9NJnP13DExIL3Q1j8NT4fXl8X bG+GwhHKqnPzQ5oyBJkDJL8JkCrGiFyu2W2uBUcQ4lDwAF2z4hobNQJ2iwuq0KRIxxXP UyrA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=U0D5ccPg; dkim=pass header.i=@codeaurora.org header.s=default header.b=U0D5ccPg; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id k198-v6si7412492pga.12.2018.09.29.05.02.27; Sat, 29 Sep 2018 05:02:41 -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=@codeaurora.org header.s=default header.b=U0D5ccPg; dkim=pass header.i=@codeaurora.org header.s=default header.b=U0D5ccPg; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728262AbeI2S3L (ORCPT + 99 others); Sat, 29 Sep 2018 14:29:11 -0400 Received: from smtp.codeaurora.org ([198.145.29.96]:53194 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728241AbeI2S3K (ORCPT ); Sat, 29 Sep 2018 14:29:10 -0400 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id E722760B7F; Sat, 29 Sep 2018 12:00:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538222457; bh=F1MtYhnXdGfQ6iKMBLdLmFe2T2EZmwMzIVbji0LHeX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U0D5ccPgao1aPF2DXyOB175RnLporFlG+/5jAFf6E13JqxsZ8zXmkXXkUD+coHeGs mxNmvLDML2pmUrhPD1MnHugSZO5jaa/ZZnSSdriKB/dr1hesBlgq/JTwvc6uxXmYdO OvELIJWx/iZ51FA2YYyTqEgFA2SrpBw6fKIsf0FI= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_INVALID,DKIM_SIGNED autolearn=no autolearn_force=no version=3.4.0 Received: from sgorle-linux.qualcomm.com (blr-c-bdr-fw-01_globalnat_allzones-outside.qualcomm.com [103.229.19.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: sgorle@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 0D21460C4F; Sat, 29 Sep 2018 12:00:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1538222457; bh=F1MtYhnXdGfQ6iKMBLdLmFe2T2EZmwMzIVbji0LHeX4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=U0D5ccPgao1aPF2DXyOB175RnLporFlG+/5jAFf6E13JqxsZ8zXmkXXkUD+coHeGs mxNmvLDML2pmUrhPD1MnHugSZO5jaa/ZZnSSdriKB/dr1hesBlgq/JTwvc6uxXmYdO OvELIJWx/iZ51FA2YYyTqEgFA2SrpBw6fKIsf0FI= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 0D21460C4F Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=sgorle@codeaurora.org From: Srinu Gorle To: stanimir.varbanov@linaro.org, hverkuil@xs4all.nl, mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, sgorle@codeaurora.org Cc: acourbot@chromium.org, vgarodia@codeaurora.org Subject: [PATCH v1 3/5] media: venus: do not destroy video session during queue setup Date: Sat, 29 Sep 2018 17:30:30 +0530 Message-Id: <1538222432-25894-4-git-send-email-sgorle@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> References: <1538222432-25894-1-git-send-email-sgorle@codeaurora.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org - open and close video sessions for plane properties is incorrect. - add check to ensure, same instance persist from driver open to close. Signed-off-by: Srinu Gorle --- drivers/media/platform/qcom/venus/hfi.c | 3 +++ drivers/media/platform/qcom/venus/vdec.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/platform/qcom/venus/hfi.c b/drivers/media/platform/qcom/venus/hfi.c index 36a4784..59c34ba 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_INIT && inst->state < INST_STOP) + return 0; + inst->hfi_codec = to_codec_type(pixfmt); reinit_completion(&inst->done); diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index afe3b36..0035cf2 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -700,6 +700,8 @@ static int vdec_num_buffers(struct venus_inst *inst, unsigned int *in_num, *out_num = HFI_BUFREQ_COUNT_MIN(&bufreq, ver); + return 0; + deinit: hfi_session_deinit(inst); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project