linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Srinu Gorle <sgorle@codeaurora.org>
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	[thread overview]
Message-ID: <1538222432-25894-4-git-send-email-sgorle@codeaurora.org> (raw)
In-Reply-To: <1538222432-25894-1-git-send-email-sgorle@codeaurora.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 <sgorle@codeaurora.org>
---
 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


  parent reply	other threads:[~2018-09-29 12:01 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-29 12:00 [PATCH v1 0/5] Venus - Decode reconfig sequence Srinu Gorle
2018-09-29 12:00 ` [PATCH v1 1/5] media: venus: handle video decoder resolution change Srinu Gorle
2018-11-14 10:50   ` Tomasz Figa
2018-09-29 12:00 ` [PATCH v1 2/5] media: venus: dynamically configure codec type Srinu Gorle
2018-11-14 10:56   ` Tomasz Figa
2018-09-29 12:00 ` Srinu Gorle [this message]
2018-11-09  9:59   ` [PATCH v1 3/5] media: venus: do not destroy video session during queue setup Stanimir Varbanov
2018-11-14 11:02     ` Tomasz Figa
2018-09-29 12:00 ` [PATCH v1 4/5] media: venus: video decoder drop frames handling Srinu Gorle
2018-11-14 11:04   ` Tomasz Figa
2018-09-29 12:00 ` [PATCH v1 5/5] media: venus: update number of bytes used field properly for EOS frames Srinu Gorle
2018-11-08 10:16   ` Stanimir Varbanov
2018-11-12  8:12     ` Alexandre Courbot
2018-11-12 12:20       ` Stanimir Varbanov
2018-11-13  9:31         ` Alexandre Courbot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1538222432-25894-4-git-send-email-sgorle@codeaurora.org \
    --to=sgorle@codeaurora.org \
    --cc=acourbot@chromium.org \
    --cc=hverkuil@xs4all.nl \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=stanimir.varbanov@linaro.org \
    --cc=vgarodia@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).