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=1796021862; b=kA92vHjjLW9vjZHGK0urM0+O501jdIxLjFjWaGeKsIccIrW8NIMeDvk4qJj6WgrNEDuO N7cCAQZjRfR3h3IFrfY53Ive5OfHdcHRvluiDc19/KjDWw9KbnM+jxD0BhUFafH5DrAqo uKhWMeA+TPvCST/6n//31syLkYaNGX8B7EzYYlvJDacIeU7mnuaDdbG5KeDGDM03ZABKN Bfb5PhIzPWO+Hj68g95z9p8sW4nfTF/TgYaaR7iRW8uO8ZwOwpF4DPlHDhDrQn1t94jXF 12oOdJzQ9BvnIIiN+CaoVOBr6DGNd8CKqp+kenoESrmeklDc8d3sgXxgw9LETlLR6vg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796021862; 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:In-Reply-To:References:MIME-Version: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=C/y+HZA2panyUXNOAsZ52w3QRF50h2cnw6Y1eUOKIM8=; b=XqzvyUK0tU4YVTka1/xdy0P97pvsWMg4IxCEZk3o+osLavUqWh3keBErTLAawbvFm5HU KsHqlLjmO/MmWqDuFImIYc+FhglemwdP4ftRYl5EeAoAsOJzaIX1Fc7vt3tTGd7M/GD88 2JMxjwEfUkiDHf/apttS2mVH1J4g315RzPP/H/clkFdfGGyqOCl+Za+rcy8nr4eoLwyUq 81uaLozfnh04FCZo3gjQEgbLNGLOlAkdUaR2rgAbdEhYaVwcGcD5ksGnv15dLdCa4deGm B9+QZFdHWGEQMwA1P065RBWVJSow8i8o8AQ55JinFvJgjFqOf2p7T6BHH49NDuYur0w== 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="Z/s9yYG5"; dkim=pass header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Wn23Ib7C; 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 83ABA606A31C for ; Mon, 30 Nov 2026 06:57:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 83ABA606A31C 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=Z/s9yYG5; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.a=rsa-sha256 header.s=google header.b=Wn23Ib7C 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 6AU5GiKQ787225 for ; Mon, 30 Nov 2026 06:57:41 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= C/y+HZA2panyUXNOAsZ52w3QRF50h2cnw6Y1eUOKIM8=; b=Z/s9yYG5nPqZyVuf JvPvNi/TzaGLx8YNCUSW+t0YWgZfFwemyxkdFYdhRU736CbusDxNM3tYmY8tsspZ mXBYojhsS2ZWo4054MZH8hmRnyQAN03o+ToxIjVNYCpyaKmbXN/OJvgZ8+aMh5vh GZpuFuIo5czAQ7OEfwxi5h9haooVgMgouhi86P/QbRIZJsBuzf/adEhfgCZ5MfcX PCjyq7hfpEjKV/DmbtxGAUoir2bJJbAZLhZ7sCj0oMLAZ7OIAsQKS8KC56WEvrI2 QBC073PfOZNFZX9pyuCt+aaYOs8AN7M6nrKXyQmPIViMGFWrtS8y2vLj2RB6aWQV WcME1w== Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4j7r89cvut-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Mon, 30 Nov 2026 06:57:41 +0000 (GMT) Received: by mail-pj1-f70.google.com with SMTP id 98e67ed59e1d1-3ae19907a31so9736336a91.0 for ; Sun, 29 Nov 2026 22:57:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1796021861; x=1796626661; darn=vger.kernel.org; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to:message-id:date:subject:cc:to:from:from:to:cc:subject :date:message-id:reply-to:content-type; bh=C/y+HZA2panyUXNOAsZ52w3QRF50h2cnw6Y1eUOKIM8=; b=Wn23Ib7CJsNIoIkgS4kuz8SZ2SxthJ+u7DpTozWltWSK5Ecg6/VNGqbnAceRdiwWj0 ExT/IR19xjG7ZhfMSc9VOUXsFbiB4/m/42qrRT6x5/QKBW3rXtituefJR51afK/YKGHb RQaGGxN2PNwfq4h0vwkcDI0ARafaaCxlQSYzrhHiL4R/LMuGjlJeEcBbTCmMDFKC2Hm7 SCsUzn7ybRbxPVbztJRag0tMn5FP0TDSvtQZxvZiH/HeLaYDynTA5hoZGCcdRNpOlE3g mrLP0NLk/F/m8HwesCHlKhWJi3+BKOObH1OYcjWhVayjrSBD4uOt+X65+wTSSYcxpvBE rSRQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796021861; x=1796626661; h=content-transfer-encoding:content-type:mime-version:references :in-reply-to: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=C/y+HZA2panyUXNOAsZ52w3QRF50h2cnw6Y1eUOKIM8=; b=0e1HT1+ZL03M976kXUdgn3m4Ho9WnE6vYzQZxo3TrPpYnR5D2Lm7YgbK7/ihtpM4N1 EhYfJdxw6WUXB0L8H8vASGoGoUA724F1dK0ZCk28fyEKtc+XMrI27eXKod7uKUkRiSPQ ZfvtDxIQWi3fBt3xvqmwKUtrCovmelnNKEB3yxSKnW6aiiO+fqb3+ThOsaztHi7WFYUq xUZXpLIwE/mJQHjwiq/FFw2qMDqMX149EdsCP09ki+TlEMlQSPIwAmBD9bW1GO1pJg1z jzhV4r63ZWbhiAX7cywBvEYiqHL+5M+Tk/5vvFeEte/peyWDgGiBj0oLQHUYUTpgrTJM 8quA== X-Gm-Message-State: APuU4Z/mfB9lR2DV2HzcX2IrBhkLorwHZwjw574wQrzrjlyaSTC1EMju eqAvJN72vqrFdwzcOdAMWVgT8J4fOTw+pD1NWfHibF3F60XAjo3QjSo3WBJWw6snaGjV3Jhlxds GwE3mY5ktyiYJFOW5Xbt+DSWK1rMtXiBA8Yv7XP3utb1WwrgmjanCOWkqKaW5dPACc+7PhszyUQ EQ X-Gm-Gg: AZFdTZckS6Rkl3HEMYGoV5TcNB7KniN8GPbt64OBpTSABR1wFibniCvmy75MK0xsdzj 3Zrw4IHst97liOOr4H6wlrxBgiYI5OMqx7/FQKr7tCsQ6mZvOkmuhH/6tR7wLmZZ3feLoUkykyY y6Kv7c8RumqgkewXxIiRoL0Bt7Io6HKKScm+jzk5A40MKWiqZ/mWLrft5frbswkgJFRYgHJ5EMi Ujt/fgDVZfEluuAHybi+YhkGoRyCjet7OxRbTPWkK11dOxzPu9/io8ayCuOkv4WJQy3+y5CM8VZ b6z5Hv1Y9Zm1pPSBjJxrPmpiG2LqCn7OZtOGdQx0mh95D6/Ng0BgjiY1CSKKEi9M4VgrYJGw7pP yvyAT8NbKT0Tsfpqt7qVdOG+PEKGN+c3piJ2FHVNGHeHAU+qiqYtLwyvUtjo2my1S67mEZd+jrR 9L10XUPTFxPDqBv804/MXNGKtZ X-Received: by 2002:a17:90a:e70c:b0:3a0:d7f2:5a58 with SMTP id 98e67ed59e1d1-3b41c7bc5a5mr23544426a91.3.1796021860733; Sun, 29 Nov 2026 22:57:40 -0800 (PST) X-Received: by 2002:a17:90a:e70c:b0:3a0:d7f2:5a58 with SMTP id 98e67ed59e1d1-3b41c7bc5a5mr23544402a91.3.1796021860234; Sun, 29 Nov 2026 22:57:40 -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.57.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 29 Nov 2026 22:57:40 -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, stable@vger.kernel.org Subject: [PATCH 8/9] drm/msm/a6xx: cold boot the GMU on the first resume after bind Date: Mon, 30 Nov 2026 14:55:11 +0800 Message-ID: <20261130-dpu_unbind_rebind_display-v1-8-c335387de1bb@oss.qualcomm.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20261130-dpu_unbind_rebind_display-v1-0-c335387de1bb@oss.qualcomm.com> References: <20261130-dpu_unbind_rebind_display-v1-0-c335387de1bb@oss.qualcomm.com> 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" Content-Transfer-Encoding: 8bit X-Proofpoint-ORIG-GUID: wuIAfpdlb898DrLjK3SRbHdR7k_9BX7O X-Proofpoint-Spam-Info: AW1haW4tMjYxMTMwMDAyNyBTYWx0ZWRfX7yUrwp9bSzDC 0xY1XWWFOlqpz6rxL4KqqKo6yjmWoznqYLkK5n8l+XvSx1MYfk/1wtxEi2mqmGKvdKVhWl84xEk 4Pw0NBHTJ6wb75NLcM9eo6XFg8Vynis= X-Authority-Analysis: v=2.4 cv=Eedd0/mC c=1 sm=1 tr=0 ts=6b0d1e65 cx=c_pps a=0uOsjrqzRL749jD1oC5vDA==:117 a=JYp8KDb2vCoCEuGobkYCKw==:17 a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=VwQbUJbxAAAA:8 a=EUspDBNiAAAA:8 a=xhAfR-RM26zwZ2_qBpYA:9 a=QEXdDO2ut3YA:10 a=mQ_c8vxmzFEMiUWkPHU9:22 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTMwMDAyNyBTYWx0ZWRfX1xGcipGPGvPp byE4WGmZ2/JiKJ2JS+9VyQvZa02ZDeI77nVI1depjLSMeT1AqmgtJLZFD1o7Hvibaa/OEeyw+BW q2hSzV9/OUphV3T4bUD4g4X1lDoGyqXM9tWt43iPc8d3DBk0IQEG5mod065wk0fR48Qd//hdbKO Dl7+4pt93RUNLyTq6sGOcSt+ZJV26HPrJEdWDbIYMLimaiMf5iuGghb2MgiG1OJyEVDNnGKw84q Ffc69chf90Dx1NVr4ZcavEOKmwOSyqn0Uu0CQkOxgJeTeqBmhj2y0atG9zlCzz1PZU1uwVSFuPQ 1k7l2bOJ+JkkVEZwWbn09cpf62ZFXv/TBVUCITgNNG5qOoteyvnoWZmzKNf5c2/+ZClFTdAnpNK iFU1QZZha53UQtzRPxYu1jrwCy9eldfCZmL/ST5fYHdPkoVIALqSrFYrcOOCv6wVNn3DP8HP16u qNvB+RX56WxQpx4viOw== X-Proofpoint-GUID: wuIAfpdlb898DrLjK3SRbHdR7k_9BX7O 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-2611300027 On a7xx/a8xx a6xx_gmu_resume() warm boots the GMU when CX_MISC_TCM_RET_CNTL reads back 1. The flag survives a GPU unbind/bind as long as CX stays powered, but a warm boot skips a6xx_gmu_fw_load() while the icache/dcache/dummy buffers of the new instance are empty, so the first GPU open after a rebind fails: *ERROR* GMU firmware initialization timed out *ERROR* Couldn't power up the GPU: -110 Only allow a warm boot on a7xx/a8xx once this instance has loaded the firmware. Fixes: af66706accdf ("drm/msm/a6xx: Add skeleton A7xx support") Cc: stable@vger.kernel.org Signed-off-by: Yuanjie Yang --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 4 ++++ drivers/gpu/drm/msm/adreno/a6xx_gmu.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c index e1178053953a..e6b8985c473b 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c @@ -992,6 +992,8 @@ static int a6xx_gmu_fw_start(struct a6xx_gmu *gmu, unsigned int state) ret = a6xx_gmu_fw_load(gmu); if (ret) return ret; + + gmu->fw_loaded = true; } /* Clear init result to make sure we are getting a fresh value */ @@ -1382,6 +1384,8 @@ int a6xx_gmu_resume(struct a6xx_gpu *a6xx_gpu) if (adreno_is_a7xx(adreno_gpu) || adreno_is_a8xx(adreno_gpu)) { status = a6xx_cx_misc_read(a6xx_gpu, REG_A7XX_CX_MISC_TCM_RET_CNTL) == 1 ? GMU_WARM_BOOT : GMU_COLD_BOOT; + if (!gmu->fw_loaded) + status = GMU_COLD_BOOT; } else if (gmu->legacy) { status = gmu_read(gmu, REG_A6XX_GMU_GENERAL_7) == 1 ? GMU_WARM_BOOT : GMU_COLD_BOOT; diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h index b9e966e602e2..f3b8f22bd189 100644 --- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.h +++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.h @@ -117,6 +117,7 @@ struct a6xx_gmu { bool initialized; bool hung; bool legacy; /* a618 or a630 */ + bool fw_loaded; /* For power domain callback */ struct notifier_block pd_nb; -- 2.43.0