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=1796021807; b=Iy3RfWisvgwCQEJSNh0XgP47tV1wgI2xjkDZ5l/bGsPjDN0a+drF/1aqkzWo7QLMU+yD 6lGao/JKuvWvyKA8mRGG1zBjaLChG0dh0Fp4xs9617lUHZhOwrbizGhXpFCh4Eg95wRiI pcDJ7hobk8X0plOfBICvDbwHlN1euAs36NWtq9UPS1rQzSyLawmZMmEl4YBMx3eje2xF5 lpUxA5vDxg6IDzqbJMw2PLG0BRImxNd+PnAr4BaRZH6sOsHBPqOA/3xhIuNpqChsnSKDM 3RYW31SgbwwGna3LlcrkLZ+XtigivOyibdm/8eJXprn7t0zHKMg7feIhDV54BBSKDBA== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796021807; h=DMARC-Filter:Received:DKIM-Signature:Received:Received: DKIM-Signature:X-Google-DKIM-Signature:X-Gm-Message-State:X-Gm-Gg: X-Received:X-Received:Received:From:To:Cc:Subject:Date:Message-ID: X-Mailer:MIME-Version:Content-Type:X-Change-ID: Content-Transfer-Encoding:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID: X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info: X-Authority-Analysis:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=fkJ1Z9iDCJKJIM1zT5sIdxCKPFwldmabWl7DYFXb2k4=; b=loA1GmM1L3QvRrJY737sZ111ros/N8leIds4yA0AzbHHikt6/cm01KjoBbL49nGekHP1 BZzmQDVgofQ2JrEfiyCC+nOiOFaOU5p+wgpZScoTO6fKehjEqnsJBs3yEC1BPbcNZ68AS ONS8tiDX9aayU3X5FQZ1zH6b2vTjuvZkFvuk9yYmb5Lpb/TPSwzDnPbJayQLluPxytT0b yhAK6vA9JbvLicd3QES/bAIH73VoHrFYGThZM9dL6ogAv0HjSoQidLX8uWCVWt8RF19K6 rqIvjtP1wety8IA8OKjt+cJsSHYWq3y3iUCMGt8SyD3Y+lse6FCUXa7jw7SKHstQYKw== 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=oMW2XkRF; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=gmwiLl8Q; 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 EC6F3606A31C for ; Mon, 30 Nov 2026 06:56:46 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EC6F3606A31C 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=oMW2XkRF; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=gmwiLl8Q Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6AU5GVaW008280 for ; Mon, 30 Nov 2026 06:56:46 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to; s=qcppdkim1; bh=fkJ1Z9iDCJKJIM1zT5sIdx CKPFwldmabWl7DYFXb2k4=; b=oMW2XkRF343ZCik7itdcS1L2RsMGOI3UCt8myo Yd0HZ291JovCWLLT8yCZ73tvmxbl1uIIviOUdSYqFOv+WZkujfMADNbwXCb26Qya MfWsF63Sfiv4DzXRmvxI+JnPalXTmmhdgXkYoUOh+JuOa8fNfdUC4/Lg8tdB0ch4 iHA1PQQk1zyqeVh+lemCSsa4tyY6oBwq05cREP2GcK4hikb+siYkt9S2XLsdCIzQ cd6P4RUASUp/BB0Fh5F+a8ha9VYddsef59w4yxKga12U9yM8m7q0GaajrvdSkoEp e6LWmgm5jVU85DMv5NbXTpbmTvQBQgNo5XbntR0V3D2GWLDQ== Received: from mail-pj1-f71.google.com (mail-pj1-f71.google.com [209.85.216.71]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j7r4jcx7u-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 06:56:45 +0000 (GMT) Received: by mail-pj1-f71.google.com with SMTP id 98e67ed59e1d1-3b42ebf632cso7438590a91.2 for ; Sun, 29 Nov 2026 22:56:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796021805; x=1796626605; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to :content-type; bh=fkJ1Z9iDCJKJIM1zT5sIdxCKPFwldmabWl7DYFXb2k4=; b=gmwiLl8Qd8YLSXo6TKz2/WPU/12H6VSNHAKHR7oSh69VUshIfHXGiZpQAhLJP3NRn5 tBb14JLgbTla/6YSeiW7s2NRdcDJhkIxkoqGc3IDjwoFSmmObv8EseuNxpgN8KsuSdMe FUTKyzAUIRbtBBUdxRT1pJkZvJd1ci4+9f7xlkLGuzCP3RZgZ0tKp6F+S5fAXfGBUVg6 O4aALGcnKMa56HiFqrN3SUmn1l1BEvLaaBtHbHPZIMkkf9cS4JhcvEj9KG2N0sXymb7l PzqXUM9PhmDb9krCLohp766uxZfsNQVcpKqpA09zgZmkGEiAMtkhzJPlFazYA2Kaa3rk K5xA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796021805; x=1796626605; h=content-transfer-encoding:content-type:mime-version:message-id:date :subject:cc:to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to:content-type; bh=fkJ1Z9iDCJKJIM1zT5sIdxCKPFwldmabWl7DYFXb2k4=; b=J1fvjo3sV9/sYr+86Bst2QYNxXrXk1pjsrIxSRFgtwBv/0ZQ2RfUFn48KuXVxSlAP3 EH3GRwe23AB/DIfKswlcYjAWKZ8B2C/KAoV7V+s5y3wNyVpPkyQ9TE5FaOlzrixORRrd j+Z/XZ8eKeGBlZ7x59MFOMWOFkPTB6ULa8lRrucLFg77OKDdW25xznswJ9HO1bEZZo4J RWTjq233bD7lhNdu8v5hq8ZezTaZXQcCs4KKmQobalPCEz+/a1PJ4fu1vDUXq16X9Oeh RTtr91urTcS9f9Oeo/0lmNRn1ofAZ4sqem3kslhnqmn1QVID2NqNEDF6VPUncDhHJM8M /LIg== X-Gm-Message-State: APuU4Z8x/tkYzIz0mOE2UktQFOvW0pJVzRNm2kk3v2n1h0Lx6FgqWjkh DeqU3PpNpzzCDH3oCxIs7jdmALy1n6bXz+H95dNLQyR1lwIx1p7Iu3dbwEjkDSX/5qirdaVRTrs nQSqeNIwNAGgCl3KvW4QdJ4MJOIcEFKbQDL4+WTMP5A0SniLSS4VTXnFxqdsptY5pTsbo X-Gm-Gg: AZFdTZfd5sHgtw3wgUiXNSXYU7X8gHycXtrPCSPmACnkaIY5bnQsU6dyLKvzqZsjWp4 w0TH2MUTNFYMEZyCsWg7y2668ZggHS5tvMIOOEXSIwI7Jg5PKcHWewqiw5ijyS9tFX5fFC4OClU iJItfskFZ9UFk+FiHMuDeEaEoJKR7tfE3pmesStMRCGkCh2kH9smxa1Dle9B9yaTcXVfVszyxAg 0aV2fpBU6SFx2pVe9SwbWIBGP7P+Mora9jgFPqF8o//hHG9l86O9P6P9LKhkzPgpCAxctm7t6UN uPjbGNxICLPOWHwcOGZdYIGAapH07OpqTfx3RUbSmyJkVedVvxV6JMCg5+FxQGRthCjdPL8AFJ2 qx5UpOEyoNOomzPnjaFvDoxjqAbwdTM5j2YAh0tkAq28xxVlSOjwSujJR5r3u0/tLJ6RREl604y 3Pqa4rYLDTH6oFsWNtrXE9YZJr X-Received: by 2002:a17:90b:1dcd:b0:3b0:bd53:8e5d with SMTP id 98e67ed59e1d1-3b41cb3e4b9mr25888714a91.58.1796021805043; Sun, 29 Nov 2026 22:56:45 -0800 (PST) X-Received: by 2002:a17:90b:1dcd:b0:3b0:bd53:8e5d with SMTP id 98e67ed59e1d1-3b41cb3e4b9mr25888682a91.58.1796021804554; Sun, 29 Nov 2026 22:56:44 -0800 (PST) Received: from YUANJIEY2.qualcomm.com (i-global254.qualcomm.com. [199.106.103.254]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-3b5639e13f7sm8537270a91.12.2026.11.29.22.56.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 22:56:44 -0800 (PST) From: Yuanjie Yang To: robin.clark@oss.qualcomm.com, lumag@kernel.org, abhinav.kumar@linux.dev, jesszhan0024@gmail.com, sean@poorly.run, marijn.suijten@somainline.org, airlied@gmail.com, simona@ffwll.ch, quic_kalyant@quicinc.com, quic_vpolimer@quicinc.com, quic_khsieh@quicinc.com, jordan@cosmicpenguin.net, konradybcio@kernel.org, akhilpo@oss.qualcomm.com, antomani103@gmail.com, smasetty@codeaurora.org Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, yuanjie.yang@oss.qualcomm.com, tingwei.zhang@oss.qualcomm.com Subject: [PATCH 0/9] drm/msm: fix unbind/rebind of the msm_dpu Date: Mon, 30 Nov 2026 14:55:03 +0800 Message-ID: <20261130-dpu_unbind_rebind_display-v1-0-c335387de1bb@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 X-Mailing-List: linux-arm-msm@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" X-Change-ID: 20261126-dpu_unbind_rebind_display-db9931c173dc Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: yJLJNpcTdpgbwbrDdFXPsg9D5cEI-n5z X-Proofpoint-GUID: yJLJNpcTdpgbwbrDdFXPsg9D5cEI-n5z X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDAyNyBTYWx0ZWRfXzMjGAdF4bzpj oCpoXrZC8AiK8pX+zBti88xJtBP0dAHOGodA6JNYo9fS4rbAEdffmK9oqo+wtzXeEZy6FBc4P3h FccXxOI8Ew79/aiVGdTWQKCwVDXQPRUU/Bh5Vlw/kl/7wyEe1n6h+VfNBhlrOk/HTl0zDlhFlmo uGsQoUKKHeWUj36Mx6J8um0K9TGrr2lXnf+L/R6Hc5k80Raa7DpfZhSRJUokgyZR7Wz94HXIQBT hgs1jOE9VPyFa9MjQObM/chsaaIyAIP1aOUK+RKvcSDUpzkN3VEnohMnxtNe3j7UdjOBY8GwCtA yezI4DqPlEUEgSgHf4qyM2YP0NMAT/sZdGxfoh0cnmwu5KdIfshyRmVMTAEvODi4Qt2Fi73zf/S nQGTxplNEr5cRHUvocg9RWnjhOXU3HIVl3Z9kaLU9givJMUQDpfKoroOdTzMjnoNA+kVO5t0x2K 8AJ7JJaY3QSFRnFXbiQ== X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDAyNyBTYWx0ZWRfX4oxTHebrLNLv Wzj89mbYpweWsObvYa4qOGNuM0XPKaFUOuOH4C+G9C8V0hTZac+CFhQjeQGOuzoCRABxHpVpvbJ nDODjfGONmcS85zhz9o4r1Vuumgz2OU= X-Authority-Analysis: v=2.4 cv=Mdr5KJ/f c=1 sm=1 tr=0 ts=6b0d1e2d cx=c_pps a=UNFcQwm+pnOIJct1K4W+Mw==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=DJpcGTmdVt4CTyJn9g5Z:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=A1CnQOiN6h4nmgTS6QAA:9 a=QEXdDO2ut3YA:10 a=uKXjsCUrEbL0IQVhDsJ9:22 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 impostorscore=0 phishscore=0 adultscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 spamscore=0 bulkscore=0 suspectscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2611300027 Unbinding the msm_dpu component master and binding it again fails in several places on X1E80100. With the GPU firmware installed: echo ae01000.display-controller > /sys/bus/platform/drivers/msm_dpu/unbind echo ae01000.display-controller > /sys/bus/platform/drivers/msm_dpu/bind By where the failure shows up: - unbind: the self-refresh entry work runs on the freed DRM device (patch 1), and buffers are freed while still pinned or vmapped: the fbdev buffer (patch 3), the SQE and shadow BOs (patches 4-5) - bind: the eDP panel was freed on unbind (patch 2), and the GPU fails to bind because leaked BOs keep its VM and SMMU context bank alive (patch 6) and the GMU rscc/PDC regions are never released (patch 7) - first GPU power-up after bind: the GMU is warm booted without its firmware (patch 8), and the PDC left asleep by the previous GPU instance is never woken up (patch 9) Each patch can be applied on its own, except patch 9 which needs patch 8. Not covered here: removing the DP controller device (rmmod msm) still crashes, as the devm AUX bus teardown from commit e2969ee30252 runs after msm_dp_display_remove() has freed the AUX channel and cleared the drvdata. With patch 2 this happens whenever an eDP panel is present. This is independent of unbind/bind and will be fixed separately. Tested on hamoa-iot-evk and hamoa-advantech-som-5830 (with [1]) [1] https://lore.kernel.org/r/20261112-hamoa_come_dp-v1-1-a77597e29e04@oss.qualcomm.com Signed-off-by: Yuanjie Yang --- Yuanjie Yang (9): drm/msm/dpu: clean up the self-refresh helper on KMS teardown drm/msm/dp: don't depopulate the eDP AUX bus on component unbind drm/msm: unpin the fbdev buffer when the fbdev is destroyed drm/msm/a6xx: don't leak the SQE vmap in a6xx_ucode_check_version() drm/msm/a6xx: drop the shadow BO vmap on destroy drm/msm/a6xx: free the preemption and pwrup_reglist buffers on destroy drm/msm/a6xx: map the GMU rscc and PDC regions against the GPU device drm/msm/a6xx: cold boot the GMU on the first resume after bind drm/msm/a6xx: wake up a PDC left asleep by a previous GPU instance drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 41 +++++++++++++++++++++++++------ drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 1 + drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 16 +++++++----- drivers/gpu/drm/msm/adreno/a6xx_preempt.c | 9 ++++++- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 6 +++++ drivers/gpu/drm/msm/dp/dp_display.c | 2 -- drivers/gpu/drm/msm/msm_fbdev.c | 3 +++ 7 files changed, 61 insertions(+), 17 deletions(-) --- base-commit: 9437046953b2fb3bf55b36582450ea0267df82a7 change-id: 20261126-dpu_unbind_rebind_display-db9931c173dc Best regards, -- Yuanjie Yang