From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A951938A73C for ; Mon, 8 Jun 2026 07:54:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780905287; cv=none; b=B1XYLu4c2RtLMTYKf7/N8SOISTIl9XGRJRpfYI9O1sbT8ELBZODfo/DAJz/6QTiqeooYGWPZ2CYOv7ctB61TjuUv9tn/puW8WuMvdyo1GWTsKCxlFlQkdQGqPgrsYlOSt/EO4HxAipiqM9IZTNVLy7sD2JlpKp9xBnlE3cd0SHw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780905287; c=relaxed/simple; bh=7L0sReKd1AffnTy/iUYPVQXP/Wy7hvlpi5gYLmCH/4I=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=s2Y8OIJe+AXIgz/9BIYNpmr/RAhLUQb8CZl9l93iHLgdY98XOcplHaKy25p2ePE1Hh4eTVX34EnOrCI7rzYy5wfnwn+Bd3AP6CM7EDTXY6CdxPKqpwLEKK6Q1g3Hgpfh9+pgknGpLBPfrACstiLU9rgp2EHWPsm3aQFiP/qzxI0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=AQt5/WWq; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=FpWzVMz8; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="AQt5/WWq"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="FpWzVMz8" Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6586OmOm2383017 for ; Mon, 8 Jun 2026 07:54:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= msbjmP9rM3cSjosteke+EMkxKuVcldwydJL9S0p2bME=; b=AQt5/WWqHbxo3G1A /ADRaq7eDD2uq1/5/0ZukPZr71cGEeEWWaNZ32b6iGhBRzhaLk/LY87AC5IzViXb N7oNTQfLRIX4jWFDG6bgTdmC2jXgOffGHZeQ5Jx3vjikttdCSGjbslyUIUUafmgp 6ldij3hHfXYj2lpfm9keoJTy1+Qpl1viS1sgmW+ZQJpId8gFSOHsO43X6KfH9dSw 2tfUZjR7dip+dsZvcJZ0UdUscSflqew02vjZZLindgzzSTJGJbj4NnRRe/D4dPA4 fxlQ1VpHynuVam+vBzrHZHaR00ziW4KB7K6czZ3uWE+IgdVq100GhQtvoMHuYQqM RsiejQ== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4em98cy4ym-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 08 Jun 2026 07:54:45 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-517647fbff1so13736551cf.2 for ; Mon, 08 Jun 2026 00:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780905285; x=1781510085; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=msbjmP9rM3cSjosteke+EMkxKuVcldwydJL9S0p2bME=; b=FpWzVMz8K1ivGLwPOIbME2ue62TTkf/ZzAL8ST3rsffDHYLtNoXqIgOQVo6KsOxVcL QuiRZdFf3RYmdxJSIYdoyZrJqM8VdQ9EtB+oSfXT/IguAFl582efc0LMvCQwzLADm7C+ bv0ozUoKFPe92dScu3ioFS/OUykKKucs87/UaUEy41uuwuL1LHqzzmZKLaLcF7T77Jdy Z6Tcj5Glm0JCWZsI4Lb8crxDtx55xk70WAXaZK+ZQ3x29pK4k2/ptgH82BGReJHychjD liDzH3gc2gDUlgYs4DfUssiwF0+qC61azQuX7YtMwFzc+WffyhvKu86vKAoCMwAcx8ki 9bcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780905285; x=1781510085; h=content-transfer-encoding:in-reply-to:from:content-language :references:cc:to:subject:user-agent:mime-version:date:message-id :x-gm-gg:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=msbjmP9rM3cSjosteke+EMkxKuVcldwydJL9S0p2bME=; b=VL1bi3Owfx6TRxHXhG2PoZ3ptXp7Z64qQmiuTRpJON20/+xbr2tP9qi5zzEFn44t0f m2rrfDOK+REP1+eR075I6Y0X3Yi99e0Dz0v9du7mBS4++uu3a86g8/Q/Wenq/U1beJe1 l05a2cef6CbXpYe5Tw1zkagQJd9SCDrzm0+Ht8Rlhu7n8LfnTDcoXJMDtmaW0E4pz7xl QuP5EdEFkKc/GYh7aYKyXNJ/ab+wtoCdBXROzQi6cBJq5XweYkc2F1y6v1IQK+e3PbTN /ITRSbQOsibpxRSrbyeHwv4sIAs0eQ6VqqqaHdqA8A0DUIdpReeRT9bY1C6pQ1jDqQdL ZMkQ== X-Forwarded-Encrypted: i=1; AFNElJ+GO2FH2TRj2eAOjQ0vtVJCWZ5oBwfoG7LVizuUzqP0rH27xJUdixzh0+k+geuQSkG4FQqrIi5uJnJCMN8=@vger.kernel.org X-Gm-Message-State: AOJu0YzuEQ8t2wTPcj3VqCaEL5JDELk389QfsoUA3Jyb0KgRe+ewNb13 1wY6109yhe9m2uKS2ja6IfisWAi6/ffJX0oJpbcryOzSUN2ULL/m7uo3XD4n3SRdeDjxGDoAC6C Zjj/o/1k6K/L5qxzBUBNBjIEweKa78hrNc4UctFd/2d4OoLs9ZboHYsR22I7DQaIzuOU= X-Gm-Gg: Acq92OF6HZ8olZyf91hQ1bzAumFBOZyPhHcWOAP9s/IsvAo11xlTQnkodJajWM1duEO yfKH5drkyOcmaBa+Bky/8THKa4PKIJ0lq3+gu2HGUA2Td8JYQkbyFwqRjWhhH8LZiuQFIJNdvAS g89H4gka7hPPkpZkizk/cwF17YLRZ8RSk/QxqZaWVpZyGv7Wo7nUYXGmpbKEQulaXZFukXDpVKM oM4Ae2ba/yg3vDhEUfPECMQvKHUNpV5JcJpU4IHV3eyCLiGGpKwxmfA1nsuEACnI87NCdK4GXH4 5Io1kfJNK3QgUrV4ZB6dBdPUsQGck3PTy32clGU7WATUZyurPO03Mf3bmmjVsXktJSC68seW4Cd JPRb/VElLgj1ohyMWo4jhjEKY2qQAClRApaGuJmifkd7sKlzfdDTMa4u3 X-Received: by 2002:a05:622a:228e:b0:517:8999:6c4b with SMTP id d75a77b69052e-51795bbf777mr118585071cf.7.1780905285030; Mon, 08 Jun 2026 00:54:45 -0700 (PDT) X-Received: by 2002:a05:622a:228e:b0:517:8999:6c4b with SMTP id d75a77b69052e-51795bbf777mr118584931cf.7.1780905284572; Mon, 08 Jun 2026 00:54:44 -0700 (PDT) Received: from [192.168.120.170] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-bf051b8c7efsm817675366b.14.2026.06.08.00.54.42 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 08 Jun 2026 00:54:43 -0700 (PDT) Message-ID: <6ce9188f-aaeb-4ce5-bfc1-28b4f45a9224@oss.qualcomm.com> Date: Mon, 8 Jun 2026 09:54:41 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4] media: qcom: iris: guard IRQ handler with runtime PM check To: Hungyu Lin , linux-media@vger.kernel.org Cc: vikash.garodia@oss.qualcomm.com, dikshita.agarwal@oss.qualcomm.com, abhinav.kumar@linux.dev, bod@kernel.org, mchehab@kernel.org, linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260608001128.80090-1-dennylin0707@gmail.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20260608001128.80090-1-dennylin0707@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA4MDA3MiBTYWx0ZWRfX+9QmSWr26aNV GF1I8ntoBxA9WAWkl9tgxL3OcVGE+hekMTtrL3BCoQap5GhbAoxlo9tox0nqMTq09Q8lIoSgrJR uXljNRIhJ8CMB38lsmQtx9Ui2TuRWhus19aySkL9WDGosLHPgkbTNG7ffuUrvl3gCAJ/pb3+C2L CGbSh1ei1jDOXpjrTNHwDr9+qsYZtWUpoAfBhu4Pw4W5Dd2dgsvMBfuXI2DiOh8DD4zkdq2jAah wbWOm3xxzvF1BNuHkBiZoTH0ppbgJQHWqy4xpg307tYGB62DQWgBMMq8ah7uyEhHdaDL8s0fSzn NKsnFxQf8ATaE5Csul/VdAvOD5BrC9XLF3CUNakJLwQCnfTrY2A/pefE82LKYGJ3YO7CuS0ayRl Sw117OigXsv6Z/3gYwt+mn7Xnn6Bf5DG1kJn/QGWM9WKN4O7rKkcdT1Dr/KrhJbEJ+59wZ3Loy5 hFSKo/WVB8HpRh63RXQ== X-Proofpoint-ORIG-GUID: 9psqVEInxjexb3m5y02xddEe0Bxi8287 X-Proofpoint-GUID: 9psqVEInxjexb3m5y02xddEe0Bxi8287 X-Authority-Analysis: v=2.4 cv=A/pc+aWG c=1 sm=1 tr=0 ts=6a267546 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=pGLkceISAAAA:8 a=-rh6snQRrsOWgr4pTt0A:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.125,FMLib:17.12.100.49 definitions=2026-06-08_02,2026-06-05_02,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 suspectscore=0 bulkscore=0 spamscore=0 malwarescore=0 adultscore=0 priorityscore=1501 phishscore=0 impostorscore=0 lowpriorityscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606080072 On 6/8/26 2:11 AM, Hungyu Lin wrote: > Guard hardware register access in the threaded IRQ handler with > pm_runtime_get_if_active(). > > A possible ordering exists where the top-half IRQ handler returns > IRQ_WAKE_THREAD, runtime PM suspend powers down the VPU, and the > threaded IRQ handler subsequently runs and accesses hardware > registers through iris_vpu_clear_interrupt(). > > Avoid touching registers when the device is no longer active by > skipping interrupt processing when runtime PM indicates that the > device is suspended. > > Signed-off-by: Hungyu Lin > --- [...] > --- a/drivers/media/platform/qcom/iris/iris_hfi_common.c > +++ b/drivers/media/platform/qcom/iris/iris_hfi_common.c > @@ -100,10 +100,17 @@ irqreturn_t iris_hfi_isr(int irq, void *data) > irqreturn_t iris_hfi_isr_handler(int irq, void *data) > { > struct iris_core *core = data; > + int ret; > > if (!core) > return IRQ_NONE; > > + if (IS_ENABLED(CONFIG_PM)) { I'm not sure this driver is much useful without CONFIG_PM > + ret = pm_runtime_get_if_active(core->dev); > + if (ret <= 0) > + return IRQ_NONE; > + } Have you actually hit this issue, or is it purely theoretical? We shouldn't be receiving interrupts at the tail end of suspend callbacks (and there's a disable_irq_nosync() right after the HW is disabled) Konrad