From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=205.220.168.131 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796028391; b=lQ3exT0rgSbxNDj4kUerTEco0JrwVadRmqDdPUuKnDeBy9GTY7M2vNYDZ9cvWHDF5jss ZjfIPMvl2RilJsllDk0efjwPvkM5NMy3osGNVFfAsX1sShWfyR23ktZ4YLPdCb4ltCk8W XFPnP9GgxDxsfvgzVlmFtKVkZWnmTFbk7sLwEcOjJy/vJSjaj/MhUy0CqAlBPillMouBO HVhyTxW1/3OBi8xn9h+exgNotUrmwJ+TRF2UWzmIKLAZohv99Emi86mHhTcoTlZzakdI2 UrKgmWhnMmBMD4F6hXLCoP78cnPFyld+hF7FgfKGlWL8vB4YSymGY+Umg3SnLXBZzMg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796028391; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Forwarded-Encrypted: X-Gm-Message-State:X-Gm-Gg:X-Received:X-Received:Received:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References: Content-Language:From:In-Reply-To:Content-Type: Content-Transfer-Encoding:X-Proofpoint-ORIG-GUID: X-Proofpoint-Spam-Info:X-Authority-Analysis: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-GUID: X-Proofpoint-Virus-Version:X-Proofpoint-Spam-Details; bh=ZOptZw/y7XaQE9tVIJvFaLnq8y3aMYCwlwpJGp99BEQ=; b=y4fA+wpiKkHxqEYRybgddAI9VHurgnX8E7MW2ZIakz52tWlxavglOe3GAQwsd/yNExK4 n6opJ7daV62H2WYn/VPr6JWF2PwZ6NhVK4c9Svp/7IWhYPIvwVvYqZnPzj8iA5C5w6tpY Py0kOHRSvClYT5frOfA1Ild36Hc6DFfdIdBDo70+xKXqL9Lz4zSFnD6+DHDLbLL4Uc1nc buthAao9QDDxT4TVWY6udKmMmKnqZ+S8DLcxBvfpfHvuKMaPHnrUyxxNNcUfmGaECfFVw u09k4g2wq4n8K0eso3zeo71/e7ZvbU1/O1BbPPOWpDk6cx6bnDM/2z35sweIykhF1eQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass header.d=qualcomm.com header.i=@qualcomm.com header.a=rsa-sha256 header.s=qcppdkim1 header.b=ody+dt6X; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=KGBSVD+M; arc=none smtp.remote-ip=205.220.168.131 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 12BCD606A33E for ; Mon, 30 Nov 2026 08:46:26 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 12BCD606A33E Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none 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.a=rsa-sha256 header.s=qcppdkim1 header.b=ody+dt6X; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=KGBSVD+M Received: from pps.filterd (m0279866.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU5GhVL787215 for ; Mon, 30 Nov 2026 08:46:26 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= ZOptZw/y7XaQE9tVIJvFaLnq8y3aMYCwlwpJGp99BEQ=; b=ody+dt6X4MPoQKP9 s25nHzjqgqK60VqZNlJk+tSw9GOI+vY/V0PnWpsGnd3gwgTbgmZpUuuN9ksF/q9M JN4zxLiFSBYvpqqAp523RT+UcKC2m7Uh3iV7PLPjp/EpTRqFIhgSDTFNrvfmjrOu XOdBx1zemVawmV9B4owIqwS6NCdphGv2NqUe89y+O4MjcHlTzx6JrbroVQhB9mCW ZTxIgH2fJNrRlb5/DTllRn2r9rPUC+HkvMIgii2P3Wn2OdouPolHZiAf1ccQwjWb f431etT0mMX1l4Nsubk8/xQhPHTs7OD5zO6Oy/cs70H1VstcPYcSwNOECFrxzvJg nezjYQ== Received: from mail-qt1-f197.google.com (mail-qt1-f197.google.com [209.85.160.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j7r89daf6-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 08:46:26 +0000 (GMT) Received: by mail-qt1-f197.google.com with SMTP id d75a77b69052e-55cbd8c22b1so16671841cf.1 for ; Mon, 30 Nov 2026 00:46:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796028384; x=1796633184; darn=vger.kernel.org; h=content-transfer-encoding:content-type: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 :content-type; bh=ZOptZw/y7XaQE9tVIJvFaLnq8y3aMYCwlwpJGp99BEQ=; b=KGBSVD+MpvRJ1pcvX3Bb9xShcbcp+13IRtWqAVcGAdbUyljXpJcr4JJPwvgX4Rc4RY CNFDv87+S9SLZhPKkY/UvTHpcXVplLn/0TRZXmiMkAAtnVySUolYs9aSMV7FYNU2FxRX rVkEopt6JXIdQAKoX9boU0CCWQSBQTbipEnlagFqApjFT+mbmqq2q7cLshrqCMoAU2Tc foUajwSRMFC4U/HbnHKWume16CzZM2umwrrqblChyoXjaWgjnGvVbpqEksMR3jX+dIdp vqG1i5Xj0vcSExMEvLlTTZ3hIIxtzLxqc9uTqCG4r0AMWEmhLdyO3gLqj7JmlBuAbO06 jaCQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796028384; x=1796633184; h=content-transfer-encoding:content-type: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:content-type; bh=ZOptZw/y7XaQE9tVIJvFaLnq8y3aMYCwlwpJGp99BEQ=; b=ec7mB2UjdKaVzDDrF0MdIiOfjvEDUXQ65aJ0K6a3xxRu+a50m99IBgGcT/nvHqKLnn 2oTSxMb1vzUdG/TbJgpcIPHsQP6HRslEdS7lXsiaiAlI01LUnjXcHhOX7xAlYNQmbX4o VSe/xi0r2araYik9aPnq7qdGA38fB5azEbkhwRTtCjjyXJ15UESHBuT8m72pvdnnUlMx tchGHRYghfOU/C0AXcLCdJMJqXaxsLIEcj+m5jTSLLpNZSmhRzn37Jv3QvG2sv/x+rE6 VWJXfBAg8BCrQ67r03VWDHRt+4aw6e28UKokawbaH3WQ3nqAxe2aSNMSyWyjT+3HvVmO vZuA== X-Forwarded-Encrypted: i=1; AL+hErFE5HcvIdlNWaUJzLLy2OyL+GCTvugfdwriJt3FuDTyw97tJj3T5gGpanYsAw5l51XLJr4OLjOE+E3exM8=@vger.kernel.org X-Gm-Message-State: APuU4Z8re82GUjn8NTiiN0jqiPy3ELorCK1aHQWZxnbU0vge4PM/jmqu MMh3TZauAaFJ8if57XOESoxEvqip2+bwoKwPSlw05tlqWdfgq+NroQLU0xXGkdZ0kPCW13E6/jD 4Hrx+9FkKemQ+esQWtgNMcmY3kTNka3MQCKzO6vkXT8u14YpDnijR8IqjAfxhtri6mXg= X-Gm-Gg: AZFdTZcwdjegycBEaRjs4CRTR6JGgTpS0FUZFkm56HVk/gdyUJkWnYtU6Sa0wx28xmG DIIBWEBo/3lvNs9CPe+RO/soh/vUqvpqPE1r/TjS21oKJIUhnPyv9qKheC0zHmyFFEyxXeDbp82 Whixu8wDrydNJuU7Hax7pInMjGijWiIq+zkKMlKNR2Cl9viy881dTH4yBfxQBkLUKECthIUxrH4 +5XSn9I9fSyIBc6RWjZ5/d2eOaZQJdBkdps2GoFfvry8C3gDyXZX333jRlTLXpKltNTykStkXFj 1zI0dosPTrgufZH5jQSyLGhN0z1LF4cNwkB71BWtt6zSLG5TxowwPu9aLrwd3yJXS+uzGk2+kJc 2Vudb+mffdh7nTvFNlXT5xYj0gQZg76YrERSUNfX84xqNC9PBDgkBrJ8OoykArn3kgCBNINI= X-Received: by 2002:a05:620a:8b8b:b0:949:5a32:af48 with SMTP id af79cd13be357-949ba96eaf6mr4747986285a.3.1796028384180; Mon, 30 Nov 2026 00:46:24 -0800 (PST) X-Received: by 2002:a05:620a:8b8b:b0:949:5a32:af48 with SMTP id af79cd13be357-949ba96eaf6mr4747983985a.3.1796028383663; Mon, 30 Nov 2026 00:46:23 -0800 (PST) Received: from [192.168.226.72] ([178.235.128.140]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-c513ae9dc7asm1149416266b.41.2026.11.30.00.46.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 30 Nov 2026 00:46:22 -0800 (PST) Message-ID: <55b0439b-c30e-40eb-b6f7-13629d5117b2@oss.qualcomm.com> Date: Mon, 30 Nov 2026 09:46:20 +0100 X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 04/14] drm/msm: order the display snapshot sources around its worker To: Dmitry Baryshkov , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter , Archit Taneja , Kalyan Thota , Vinod Polimera Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org References: <20261127-msm-kms-destroy-fixes-v4-0-242b0a3f8e47@oss.qualcomm.com> <20261127-msm-kms-destroy-fixes-v4-4-242b0a3f8e47@oss.qualcomm.com> Content-Language: en-US From: Konrad Dybcio In-Reply-To: <20261127-msm-kms-destroy-fixes-v4-4-242b0a3f8e47@oss.qualcomm.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Proofpoint-ORIG-GUID: wdtpUa_pOQSebz8FU638rKxnIcMTOvpA X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDAzNCBTYWx0ZWRfX1Qa1TYi+4mY8 We5yi2RvraMok+tSIGXGMKSrrPX59fPplKnkay8FIKthP62ZhsNn3fZ2E8UAk5pni52hVFGyt9y LW3QDe4YzOS1+alyISIsmVYZlwbKaVg= X-Authority-Analysis: v=2.4 cv=Eedd0/mC c=1 sm=1 tr=0 ts=6b0d37e2 cx=c_pps a=EVbN6Ke/fEF3bsl7X48z0g==:117 a=PRfkaYvzSr8QmIIGAkY2Sg==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=-IXtRQx2n3FGC9RCwc4A:9 a=QEXdDO2ut3YA:10 a=a_PwQJl-kcHnX1M80qC6:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDAzNCBTYWx0ZWRfXyL759gyT4d+t P0z7AoSPCnBX5mAXsqKz4egloJpVYmflNMFs8CIuhvIhVo8/Sepk/bmtUfVQ2LfhdgeJQn4AbRz Kz59Knbq7hqtGEhs3ZJ0GE8MSQP/bAw2XpOYXDW3B2Kaoxt85qt33dIpJxYL0A5rwIqGigxBu4+ tiR+OUTkP7WJ7iS2onNr0iLoT/Xu7HdNotJYSiE63IOmabWFr8kiY/48EgPYsQNhLuQQlbPWiAp 6NIOlpcI8jyl8f7PLvgEa36aBOIpZx+T2gs3ZSzumOaCZAGsPF26yMJn6+usF0QYid18rOUmLQh EnwMAZX0Sr4RvbEcw8HNkfv57tOvNCq06jJI3r/fFo54tTbfdFNQn01w+Uwzs0X+sWmigjyReZ3 CijxWO070bW3FboCVFp1DvMlvRb0mcdGdzRIeZPIh1X54VHXwXsuvkvQ6ngtS4u30Ufwdedvq9p rswYlAj9CZFP3OSM7zA== X-Proofpoint-GUID: wdtpUa_pOQSebz8FU638rKxnIcMTOvpA X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-11-30_02,2026-11-27_03,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 impostorscore=0 bulkscore=0 lowpriorityscore=0 phishscore=0 clxscore=1015 spamscore=0 suspectscore=0 malwarescore=0 adultscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300034 On 11/27/26 8:44 PM, Dmitry Baryshkov wrote: > The display snapshot work is queued on kms->dump_worker by the IOMMU > fault handler of the KMS and by the DPU interrupt handlers, but neither > of them follows the lifetime of the worker: > > - the fault handler is registered by msm_kms_init_vm() in the middle of > kms_init() and is never unregistered, so a fault during kms_init(), > or in the error path of msm_drm_kms_init(), dumps a KMS which is > still being set up or already being torn down, and a fault after > msm_drm_kms_uninit() queues the work on a destroyed worker; > > - msm_drm_kms_uninit() destroys the worker before it uninstalls the > interrupt handlers, so an underrun or a timeout in between queues the > work on a destroyed worker as well. > > Start the sources only once the KMS is fully set up and stop them before > the worker goes away: register the fault handler as the last step of > msm_drm_kms_init(), unregister it first thing in msm_drm_kms_uninit(), > and destroy the worker after the interrupts have been uninstalled but > before the KMS itself, so that the dumps still pending run against an > intact KMS. > > A fault during kms_init() therefore no longer produces a dump; the KMS > is not complete enough to describe one at that point. The handler is > cleared with the kms argument left in place, so that a fault handler > already running still gets a valid one. > > Fixes: 2ec5b3dc18ba ("drm/msm: add disp snapshot points across dpu driver") > Fixes: eabba31a839a ("drm/msm: register a fault handler for display mmu faults") > Assisted-by: LLM > Signed-off-by: Dmitry Baryshkov > --- Sashiko has concerns Konrad