Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp447009rwd; Thu, 1 Jun 2023 02:27:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5KF7gOAbcIDagKr882CSdTBEzgw0LfzKu9VMLcL1Y84oIP+Es8XW5FCpLqjhFLlN0X8ZjH X-Received: by 2002:a92:cd11:0:b0:33d:136f:249f with SMTP id z17-20020a92cd11000000b0033d136f249fmr1427429iln.22.1685611669321; Thu, 01 Jun 2023 02:27:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685611669; cv=none; d=google.com; s=arc-20160816; b=IKczyBD1fZTNs9O4GiwiATTSwXcxHwelU4sZNQ7dpjcH2yaqXUTZGADpZr2C4OVAGi CZXkog5UXJWKjJ+eNdtQDdHCnUEerIp93CaFz89QZX6K8bnRzU4ieTai4YjuiDPc2G38 jxgWDDzIaqqlQScnFwToxJSbbcjtkiAV5m6aBap6QGmYTPiNLonMz0pXKQmw1T6ZbWr0 sH9tX+vD16ShlOZd/DTrqAf09Frjpykc7fMaDTOYduw9DDD7Kn1/xAur5PibDSgPqJVH mr2bd9dQBIVCCzpv4kITEA+bcacksk1udRfKh1OLAl6pgWy7xs/MHuxAz4OevpewGTZJ ZfXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=/OUVvguB1Dw+IqSr6xChJRjeeNG1pSsMZt8jWgTfqAk=; b=yeGJA6NlQP3gXiThZcOca0tArvY2ztIcjht1nCUYIVKuYUMm+G4EIzRHRPxANpaiIe uB4+2q9jXGH+5c3WoiAYCFPy296YFbZf7PM/ArvfVIwwh+sSRyfEf4yxrz0jDwJbWIXh Ma7B6E4aICaa9YQTX544voR5a/2F3g/iZzqA/rcnGuAlXfeRzYYGyy5Fjd/5ijWZ15r0 06Z3vfCD6JN/v5eZpqHKKwgmw/sG7kG3ssTdwP3ReTC6kozt0H8t/tyVotsA+ZQyLTGT HpNzg/gAvkakbfVCPgL9h36n5F37KlwSqOZRhDxXm3Vo3Gs/OGY1wrHk1jgNgpWOE/ys T5EA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QnrKNnDF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f17-20020a637551000000b005139e0d2b5csi2510175pgn.487.2023.06.01.02.27.35; Thu, 01 Jun 2023 02:27:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=QnrKNnDF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232635AbjFAJKE (ORCPT + 99 others); Thu, 1 Jun 2023 05:10:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232609AbjFAJKB (ORCPT ); Thu, 1 Jun 2023 05:10:01 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 27F39B3; Thu, 1 Jun 2023 02:10:00 -0700 (PDT) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 35156COI019851; Thu, 1 Jun 2023 09:09:27 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=/OUVvguB1Dw+IqSr6xChJRjeeNG1pSsMZt8jWgTfqAk=; b=QnrKNnDFTFwGsUI8jByTT832xRetZloGA2u/78QNtycECYj1ovXM5Gn6V8/GyM0Hfsrl h9yYMd1lYd+1DYSfULZGChoeT19+yzTgMKGfA01HbC/ozN6L2cWWNuYHcCj8qliJDQrU 0zn8K7KhCI4/mwPe83BOFr0rfYckrnBI/87myzn9+pIZiVcJitMzq9vx2J0zy/a7RwbN /0cz7dFxGzUVXHEko7fwif6+l8Lvrk3swJ+vtfT2hirr0nwPkRsIs2/UnCT71RE8CnFQ fb/WFlQeuS4llhxxiRN7ltUuMOQuZojLLjx7CujNC/TW18z74fhztZNZnikNSIAv00OT xQ== Received: from nasanppmta05.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3qxc799e43-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 01 Jun 2023 09:09:27 +0000 Received: from nasanex01a.na.qualcomm.com (nasanex01a.na.qualcomm.com [10.52.223.231]) by NASANPPMTA05.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 35199QNP017013 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 1 Jun 2023 09:09:26 GMT Received: from [10.216.48.115] (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.42; Thu, 1 Jun 2023 02:09:21 -0700 Message-ID: <41e006ed-0f91-70dc-075d-c505c21ef95a@quicinc.com> Date: Thu, 1 Jun 2023 14:39:18 +0530 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.11.0 Subject: Re: [PATCH v4 02/17] media: venus: hfi_venus: Write to VIDC_CTRL_INIT after unmasking interrupts Content-Language: en-US To: Konrad Dybcio , Stanimir Varbanov , Andy Gross , "Bjorn Andersson" , Mauro Carvalho Chehab , Dikshita Agarwal , Bryan O'Donoghue , Mansur Alisha Shaik , Jonathan Marek , Hans Verkuil , Dikshita Agarwal CC: Mauro Carvalho Chehab , Stanimir Varbanov , , , , "Marijn Suijten" , References: <20230228-topic-venus-v4-0-feebb2f6e9b8@linaro.org> <20230228-topic-venus-v4-2-feebb2f6e9b8@linaro.org> From: Vikash Garodia In-Reply-To: <20230228-topic-venus-v4-2-feebb2f6e9b8@linaro.org> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit 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-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: WRpQP7Q-zFKPtdQdv467z9V_Jc0ieRHD X-Proofpoint-ORIG-GUID: WRpQP7Q-zFKPtdQdv467z9V_Jc0ieRHD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.573,FMLib:17.11.176.26 definitions=2023-06-01_06,2023-05-31_03,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 mlxscore=0 lowpriorityscore=0 suspectscore=0 malwarescore=0 mlxlogscore=974 adultscore=0 spamscore=0 phishscore=0 clxscore=1011 priorityscore=1501 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2304280000 definitions=main-2306010082 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_LOW, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 On 5/30/2023 6:00 PM, Konrad Dybcio wrote: > The startup procedure shouldn't be started with interrupts masked, as that > may entail silent failures. > > Kick off initialization only after the interrupts are unmasked. > > Cc: stable@vger.kernel.org # v4.12+ > Fixes: d96d3f30c0f2 ("[media] media: venus: hfi: add Venus HFI files") > Signed-off-by: Konrad Dybcio Reviewed-by: Vikash Garodia > --- > drivers/media/platform/qcom/venus/hfi_venus.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/drivers/media/platform/qcom/venus/hfi_venus.c > index 918a283bd890..5506a0d196ef 100644 > --- a/drivers/media/platform/qcom/venus/hfi_venus.c > +++ b/drivers/media/platform/qcom/venus/hfi_venus.c > @@ -453,7 +453,6 @@ static int venus_boot_core(struct venus_hfi_device *hdev) > void __iomem *wrapper_base = hdev->core->wrapper_base; > int ret = 0; > > - writel(BIT(VIDC_CTRL_INIT_CTRL_SHIFT), cpu_cs_base + VIDC_CTRL_INIT); > if (IS_V6(hdev->core)) { > mask_val = readl(wrapper_base + WRAPPER_INTR_MASK); > mask_val &= ~(WRAPPER_INTR_MASK_A2HWD_BASK_V6 | > @@ -464,6 +463,7 @@ static int venus_boot_core(struct venus_hfi_device *hdev) > writel(mask_val, wrapper_base + WRAPPER_INTR_MASK); > writel(1, cpu_cs_base + CPU_CS_SCIACMDARG3); > > + writel(BIT(VIDC_CTRL_INIT_CTRL_SHIFT), cpu_cs_base + VIDC_CTRL_INIT); > while (!ctrl_status && count < max_tries) { > ctrl_status = readl(cpu_cs_base + CPU_CS_SCIACMDARG0); > if ((ctrl_status & CPU_CS_SCIACMDARG0_ERROR_STATUS_MASK) == 4) { >