From patchwork Tue Dec 3 00:39:02 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Abhinav Kumar X-Patchwork-Id: 13891599 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 142B0E6C5E3 for ; Tue, 3 Dec 2024 00:39:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CFA6A10E88A; Tue, 3 Dec 2024 00:39:29 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=quicinc.com header.i=@quicinc.com header.b="G8QwDz7r"; dkim-atps=neutral Received: from mx0b-0031df01.pphosted.com (mx0b-0031df01.pphosted.com [205.220.180.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 50CBF10E434; Tue, 3 Dec 2024 00:39:28 +0000 (UTC) Received: from pps.filterd (m0279869.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 4B2JaP91016124; Tue, 3 Dec 2024 00:39:23 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= wPwAUqoSGJCxz2ExptnBXgdMlyVWy6yqMhydbA3dXSA=; b=G8QwDz7rLrtPf7Xd 7ZtsfV2f7jY/OYTUJ1UrsDxTXEH+RSpOGPxFMtpSqPxBwToQ0ZpuyH9QUtlPG90B 2pRA3Vmk5OQ04rme6wCzX81dQB+Kxb/IthYV1yZV3bHOj5GZaIJn8MLyQzNOUfA9 WoT6/uqRNwQA5cwX05WImpL8EZ2WBntksPR5TZoJ91uRjgmRs1cTMiABUp6aqfNA p1HXRzXxUT5T/jK1TsLrbmsnNVF/+nAz+Ylw7nfbTuLoHRbLkiZVuGPDJ823n1Uf fcl7UkXlh29NGZB3GG2mRCoWoko4bnJpG8/87gjT+lPMyn8fGQklc8rAxi5uzHU7 IECsCg== Received: from nalasppmta04.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 437sq66c7w-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 03 Dec 2024 00:39:23 +0000 (GMT) Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA04.qualcomm.com (8.18.1.2/8.18.1.2) with ESMTPS id 4B30dLcN026313 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 3 Dec 2024 00:39:22 GMT Received: from abhinavk-linux1.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Mon, 2 Dec 2024 16:39:21 -0800 From: Abhinav Kumar Date: Mon, 2 Dec 2024 16:39:02 -0800 Subject: [PATCH 3/4] drm/msm/dp: replace ST_DISPLAY_OFF with power_on in msm_dp_hpd_unplug_handle() MIME-Version: 1.0 Message-ID: <20241202-hpd_display_off-v1-3-8d0551847753@quicinc.com> References: <20241202-hpd_display_off-v1-0-8d0551847753@quicinc.com> In-Reply-To: <20241202-hpd_display_off-v1-0-8d0551847753@quicinc.com> To: Rob Clark , Dmitry Baryshkov , Sean Paul , Marijn Suijten , David Airlie , "Simona Vetter" CC: , , , Stephen Boyd , "Doug Anderson" , Johan Hovold , "Bjorn Andersson" , Abhinav Kumar X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1733186360; l=1035; i=quic_abhinavk@quicinc.com; s=20240509; h=from:subject:message-id; bh=ulOrtwLyA5l17UFXotN3R2Cj8YZLtDzpwCEPaPc3xA4=; b=tMp4m1cBjjrUDNOgDAcbH9PoseeK/LJA/g1Cvde5ASlJoawMtGeh61dIll6lCkbmyiO27bKb9 Qc8/T00kJPVAhxUwrhk7rJKUpeCgtS5tctKwthof3hJK1H9//0HEWJp X-Developer-Key: i=quic_abhinavk@quicinc.com; a=ed25519; pk=SD3D8dOKDDh6BoX3jEYjsHrTFwuIK8+o0cLPgQok9ys= X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: WL-g59IMYAq2Yz3tKqK2c4v6qSN6ix7- X-Proofpoint-ORIG-GUID: WL-g59IMYAq2Yz3tKqK2c4v6qSN6ix7- X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 bulkscore=0 priorityscore=1501 mlxscore=0 clxscore=1015 lowpriorityscore=0 suspectscore=0 adultscore=0 spamscore=0 impostorscore=0 mlxlogscore=785 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2411120000 definitions=main-2412030002 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" msm_dp_hpd_unplug_handle() checks if the display was already disabled and if so does not transition to ST_DISCONNECT_PENDING state and goes directly to ST_DISCONNECTED. The same result can be achieved with the !power_on check. Replace ST_DISPLAY_OFF with !power_on to achieve the same outcome. Signed-off-by: Abhinav Kumar Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index 614fff09e5f2..831876aa5b35 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -655,7 +655,7 @@ static int msm_dp_hpd_unplug_handle(struct msm_dp_display_private *dp, u32 data) */ msm_dp_display_notify_disconnect(&dp->msm_dp_display.pdev->dev); - if (state == ST_DISPLAY_OFF) { + if (!dp->msm_dp_display.power_on) { dp->hpd_state = ST_DISCONNECTED; } else { dp->hpd_state = ST_DISCONNECT_PENDING;