Received: by 2002:a05:6512:3d0e:0:0:0:0 with SMTP id d14csp19702lfv; Tue, 12 Apr 2022 15:30:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJydE2nCog9fySnIUTQSe49FAcyoWMc8+8vnpQdJtStnJHkJM5+lwPrydvedpSH607lT1E9T X-Received: by 2002:a65:6751:0:b0:363:43a5:c7e3 with SMTP id c17-20020a656751000000b0036343a5c7e3mr31802199pgu.46.1649802648896; Tue, 12 Apr 2022 15:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649802648; cv=none; d=google.com; s=arc-20160816; b=ZDj1WivrSDYywg54W9dNN0NUHpwResKIiMY1wLQyX5mEwpxYzfSQIKgy8xHImR79xF BiubgOJiWP0iU7v0ASKARrJdvW26L7g8DoTaX5sn9knkNaoIEI4MSU4ztxGp15LyY1Oa d061Y+H91iYlDQPxYAzGwy9XYltJD774kmgd5wH2oc9rj6JiNoZjA6zQiVlKgJ7cp/El P2YACwfj9BcJYY9OS0iHhgV+cctDSwdJLd199unofXfTDtLCHSs6J6+OLkpDrxa1qViI trvS2OuzPLotfUzhGS66fkWbNrpnshct3OZ1kMJjTKegjpwL2Wy3kQPt6D5d0rJqTczk Yj6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=Q7iWkEWIdBwMq/H4dYnh9ITsKreitgfNDb9VSXaQlow=; b=JATXiXe9dEBP7ZES225dElW/O3TGFnwJ0+gHJE6C9nWtsviVYfE/XSBpKVcEMSgIvm PeWTShSZYO8wwX/LmOL68/+NioI2HP2jtHhEp9CihydeQ4nSlQL9fwr9OzhYJs0nafSX Z2af8abHMqWW5xCPWDdWvHHjJVAKrQ9NrKu7ekDOYJfECa43HyWNKvRpw7ftRw+xPklo HtU9W9VlPWU52a4hwUZPWgMABHGQr26sFc96cyG/mUgYB1CJNuLq96N5+dgNNIod1DLQ zmekio4AerpgpjYOUuC+ge8owRFAS8yNp0NjDdhweAPIT5CUp6ebRXPWPsEQudL7PlVC KY/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jtZRV8iH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id 125-20020a621483000000b0050575372d7dsi12051799pfu.336.2022.04.12.15.30.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Apr 2022 15:30:48 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=jtZRV8iH; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 76AB2DE08D; Tue, 12 Apr 2022 14:08:07 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355658AbiDLNZn (ORCPT + 99 others); Tue, 12 Apr 2022 09:25:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59914 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1356037AbiDLNY5 (ORCPT ); Tue, 12 Apr 2022 09:24:57 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2BF4D3C4A9; Tue, 12 Apr 2022 06:15:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1649769334; x=1681305334; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=Q7iWkEWIdBwMq/H4dYnh9ITsKreitgfNDb9VSXaQlow=; b=jtZRV8iHyNOlgV62DiohSsfe5aNnLJCCqSwgXJbBSeMmSCXPecB2g24e LfYIQ8JC47RFkDkOXtjn3bSGGal/av59Zu3EQImKnT5zEX1Qois7E5TWt Do0WBIMBJAADkpZn/hjz+ucJjKM02DScr5PTS5Gdi85O7QdP76MoawcgF 8=; Received: from unknown (HELO ironmsg01-sd.qualcomm.com) ([10.53.140.141]) by alexa-out-sd-01.qualcomm.com with ESMTP; 12 Apr 2022 06:15:34 -0700 X-QCInternal: smtphost Received: from unknown (HELO nasanex01a.na.qualcomm.com) ([10.52.223.231]) by ironmsg01-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2022 06:15:33 -0700 Received: from hu-vgarodia-hyd.qualcomm.com (10.80.80.8) by nasanex01a.na.qualcomm.com (10.52.223.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Tue, 12 Apr 2022 06:15:31 -0700 From: Vikash Garodia To: , CC: , Subject: [PATCH v2 2/2] media: venus: vdec: ensure venus is powered on during stream off Date: Tue, 12 Apr 2022 18:45:11 +0530 Message-ID: <1649769311-22622-3-git-send-email-quic_vgarodia@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1649769311-22622-1-git-send-email-quic_vgarodia@quicinc.com> References: <1649769311-22622-1-git-send-email-quic_vgarodia@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01a.na.qualcomm.com (10.52.223.231) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Video decoder driver auto-suspends the hardware if there is no exchange of command or response for certain amount of time. In auto suspended state, it becomes mandatory to power on the hardware before requesting it to process a command. The fix ensures the hardware is powered on during stop streaming. Signed-off-by: Vikash Garodia Acked-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/vdec.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/platform/qcom/venus/vdec.c b/drivers/media/platform/qcom/venus/vdec.c index 91da3f5..4ac1132 100644 --- a/drivers/media/platform/qcom/venus/vdec.c +++ b/drivers/media/platform/qcom/venus/vdec.c @@ -1200,6 +1200,8 @@ static void vdec_stop_streaming(struct vb2_queue *q) struct venus_inst *inst = vb2_get_drv_priv(q); int ret = -EINVAL; + vdec_pm_get_put(inst); + mutex_lock(&inst->lock); if (q->type == V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project