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 77F423F8250 for ; Tue, 9 Jun 2026 09:47:55 +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=1780998476; cv=none; b=VNd/187JnSN0SuMbYP/gOTSBzUdDGBIS/3clelslPTONWB+DC4nY9J0DmehPisiwt3Ez/d0r1JZLL7vSmzvIcRMX9Wr507Q/vF8Mo7raPOgzWQ2FYeUXNFEeIpbf/Z6KAH9LTYzlR8rawFWVvrtJAM2jVpOVew4Ho2aiCQVb714= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780998476; c=relaxed/simple; bh=VMCb+gh78a5tyRp4ocOtlXR3WU+MH0tKL5IrymVyK/Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=iqI7Jfc3vvWG6pNk9EKBwnZIYXq5afWJ91bkJS3bXZ1pLCk2du7SAj6NRvF/nqGvel1+7SQZV/REVoHSEOECXHlCyxGWuy0rqVnD2+tcEweCsIJxRQZflIMiy1GBHbEFZ6fJeilARAnTnIgJRktD3875tFfd0qDLR6LdOCK8l8g= 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=o3YRE2cH; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZcLKDW1O; 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="o3YRE2cH"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZcLKDW1O" 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 6597rOs01585731 for ; Tue, 9 Jun 2026 09:47:55 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= CnGOml6KRNLCf8LNyNsT22xgMpxrnwiDol3PAO0B0Jw=; b=o3YRE2cHhsh/ltE9 50OL9hBRBuBBVS1pnxeManKhzKUZLAh/iEPA571FCXXrzImF89yRpIs7GVt/VMBE 5QhAJd1uBUE5hAvvF7bnwCLxYtYfHnvx9mkM62WkmqrfkPdvmcz+6EPJ2apSyuOq TmTHE32n+9dwNg7xRCfhM4LETbFHaK4voZPv5hdZG11QOIYXCrSc0b8Zz9sROe67 59peK1FkodcsSVOJGH+8vwAUBWAPvq55DQ8m0xfNafwPjvKe9fpS3sW5ouOCpf8b dApkV3j80UFZ2ftbTgAQp1fLmfcwb1p9YQRlm4YnbcxIUzhk6wF0bz6K6grzF2Vo a1scXg== Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4epeqgggtx-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Tue, 09 Jun 2026 09:47:54 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-915c1997732so586406385a.3 for ; Tue, 09 Jun 2026 02:47:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1780998474; x=1781603274; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=CnGOml6KRNLCf8LNyNsT22xgMpxrnwiDol3PAO0B0Jw=; b=ZcLKDW1O2Uqkigru/BtqAVB6Wc9Up+Y41jBogaGLS4ELVkX9VsoVltBP/vTll6EGDi zvKDkaMSpzG6tGtFErxgmqWShc5f9+WW7by6RQd9exdDy3ki3ZTaNxBbGwvSLIusqR/w IlQYEWXhmIguzdT+EJ31TxC43R7XA8438cgnDx6o0Ul+7BIb3LpXR6OLNFpX5zXiQATf iFatZ18YeuGoHgOs3orogolaZXwL6I5VFvCyyX1f6VQJ8sRI+VT1vD7nlCAc9g5MJFF0 tGXo4MuBI8rAy4dylctNKxXUcOc1VgkVgST8qjw3D7po03w8RCAgcTC+fVji8fAuM1go AseQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1780998474; x=1781603274; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=CnGOml6KRNLCf8LNyNsT22xgMpxrnwiDol3PAO0B0Jw=; b=hdDg5J6vJQJplSwpdOeXd9EjpkDpxM5rCywFQFdiU4zmMygV5OVbrL7TZB85gW2KY3 LxxtKPgKweoNf+Lf1AifviUMvrW2JfxspfVkATi7bFr9+ynZ5ztMwmZ4WN0xfRrLSJtC EOARN8qF8046/5SNfCbcM8O1DZnwKHv8+4oUubjYzJ7iRbPYc5gwPkBC5bJ18m1EECxT NvkIhAcgmOvm6yKa0nEirPG2GmYKbb1ub1M0MlmzioKNSxKIIiBux7InyM0Z373PqOT+ 3R5o10WItqzcx7qkXPzcGxu78Wfv9xmG9jhRizUUDuH18bgZJXj1qJpgNszsB4CKHvz3 rOuA== X-Forwarded-Encrypted: i=1; AFNElJ90hdwaxkYo2sZ3/KtqNlLrWEXoxCTHelKun+bxIKoJK6/pFt9nPiz1fNG4TPyuqrS7TDsgVs/LVecemWc=@vger.kernel.org X-Gm-Message-State: AOJu0YyTwkuMz2EjZjGMddz9yc7tNtOOObzFAzHjSEK9Y1AgAj2E2Lse a1iMxLXIvoCwKExAYbVHH9iqOZf7wBIi7SNUSzTPoH0L835I6aL0+juNN1Et6rn5YVkCfmUsZD+ DcDKiw5J+c9TlKfJpCvzoVgH6AY9FiNInjcFSZ7JjScAKr7IVWg8h0rzTTFKU115Ae1s= X-Gm-Gg: Acq92OEszR/EHeEp6oAZKPXVxD4CKjLSQ+OQLHRG0Hl6hFhbCtoSnk6gPhGH+CUH9or K9VVwTH8g/vANkAxS6b/YEBiSF6wFxX3uzss24gM585rjTzvDdkiw/8wkeSvFXum2ZsdXbxUgy8 5L+wIfJ24g3OnAqy+VhElKTcnGaEcNB4nn0nAFhUJlXMIM3q2USdA4KHlqc+Fxv2z/Yz1GxIEo2 RHbwAnimpu71dB8qNFL+MYi71DrqmgnnKBqft0UzKHj9LOkPFHkAF6MMauQ1Bs3dwr4oT300YZs ENf/4wS4Q2T0qPregg7i+K62Np/tk0YTSP1t/l2boqHZOW2qcad5zy972dN9QsMsDbBaspB6HwZ FrFUChIIDN5gI8WUwhQh0D6Jt/3v+bg97NxO0kjAFYY3VVb45XHdqB6yPNGfqRNldKhwZWBuz8w L3S8lvkJRLeH1gSL+skg== X-Received: by 2002:a05:620a:40cf:b0:915:79c8:ec9c with SMTP id af79cd13be357-915a9da96ecmr3113622585a.35.1780998473895; Tue, 09 Jun 2026 02:47:53 -0700 (PDT) X-Received: by 2002:a05:620a:40cf:b0:915:79c8:ec9c with SMTP id af79cd13be357-915a9da96ecmr3113617985a.35.1780998473462; Tue, 09 Jun 2026 02:47:53 -0700 (PDT) Received: from yongmou2.ap.qualcomm.com (Global_NAT1_IAD_FW.qualcomm.com. [129.46.232.65]) by smtp.gmail.com with ESMTPSA id af79cd13be357-9158a00afafsm2047489485a.2.2026.06.09.02.47.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 09 Jun 2026 02:47:53 -0700 (PDT) From: Yongxing Mou Date: Tue, 09 Jun 2026 17:46:37 +0800 Subject: [PATCH v7 15/15] drm/msm/dp: pass panel to display enable/disable helpers Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260609-dp_mstclean-v7-15-ea04113e8233@oss.qualcomm.com> References: <20260609-dp_mstclean-v7-0-ea04113e8233@oss.qualcomm.com> In-Reply-To: <20260609-dp_mstclean-v7-0-ea04113e8233@oss.qualcomm.com> To: Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , David Airlie , Simona Vetter Cc: linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yongxing Mou , Dmitry Baryshkov X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1780998393; l=3118; i=yongxing.mou@oss.qualcomm.com; s=20250910; h=from:subject:message-id; bh=VMCb+gh78a5tyRp4ocOtlXR3WU+MH0tKL5IrymVyK/Y=; b=/bqYPwe+BT8wRDn37HT0g7sYFYdExLZp0AYNmLazK1zbmjMz62sd7TCVmyuOCWbG2FJSdIBCi nv2MEP7UAp4AK3aejuq8vXcpP63dyQNtdlsQFAfYzSKoPTnz4Xi703l X-Developer-Key: i=yongxing.mou@oss.qualcomm.com; a=ed25519; pk=rAy5J1eP+V7OXqH5FJ7ngMCtUrnHhut30ZTldOj52UM= X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNjA5MDA5MCBTYWx0ZWRfX0WmEz/oIqk/q 9poXgPVH6Kj3exOFyNHC/Rt4Uz+08KWpp6Mz9M/esf2Fz9eH1/0JZLa7O3ShL9qvTwRovvcvomi VtAwvfT0QWdpiOm8/xm3157pt3oQmqronsJxuKzRwttSGmwan0cA0Ya8nKzxo+4lyeQz+QI1Ufp G01k/Ti2m9oUkbf25hCEijHv4CcrKIjSh51rUDYzWTY9Z/Tuxx46UZ2KseW2n7cqvsb5EF1YPQb JHy0J57+HjCGW9cL4HPrDUeIV4FuXag7eAr5Bq9aHmfAoDMBb+pYbg8anuCMUT3w5jUFWN0uy0d WdYG+GI+Kdk9VfOoiaxcxgmVF16IjComH9IhOBho0JT1aW54MC/3pUQzMVDt6J5Pa/POvt7C/dp DzHGB868VjZr8LepXeUCD3c3wzpGI1oJDxUXMd3Csu5plt6YbPiNIMUhS2VK0UGeWuzHBtEUlp+ ACDrPgl134hdESkS+RQ== X-Proofpoint-ORIG-GUID: q_dVkqjWhONzWT9tImUnUT7o66dB7SNU X-Authority-Analysis: v=2.4 cv=KdHidwYD c=1 sm=1 tr=0 ts=6a27e14a cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=C3Dk8TwHQYyIj7nOf9RCJw==:17 a=IkcTkHD0fZMA:10 a=FelO9ux0wxsA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=eoimf2acIAo5FJnRuUoq:22 a=EUspDBNiAAAA:8 a=wgkWW237A_BUGFCT6doA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-GUID: q_dVkqjWhONzWT9tImUnUT7o66dB7SNU 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-09_02,2026-06-09_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 lowpriorityscore=0 spamscore=0 malwarescore=0 suspectscore=0 priorityscore=1501 bulkscore=0 clxscore=1015 adultscore=0 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2605210000 definitions=main-2606090090 Pass struct msm_dp_panel to the display enable/disable helpers to make them easier to reuse for MST stream handling. Signed-off-by: Yongxing Mou Reviewed-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_display.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c index cd1f2899b733..bea5bfb22967 100644 --- a/drivers/gpu/drm/msm/dp/dp_display.c +++ b/drivers/gpu/drm/msm/dp/dp_display.c @@ -650,7 +650,8 @@ static int msm_dp_display_prepare_link(struct msm_dp_display_private *dp) return msm_dp_ctrl_prepare_stream_on(dp->ctrl, dp->panel, force_link_train); } -static int msm_dp_display_enable(struct msm_dp_display_private *dp) +static int msm_dp_display_enable(struct msm_dp_display_private *dp, + struct msm_dp_panel *msm_dp_panel) { int rc = 0; struct msm_dp *msm_dp_display = &dp->msm_dp_display; @@ -661,7 +662,7 @@ static int msm_dp_display_enable(struct msm_dp_display_private *dp) return 0; } - rc = msm_dp_ctrl_on_stream(dp->ctrl, dp->panel); + rc = msm_dp_ctrl_on_stream(dp->ctrl, msm_dp_panel); if (!rc) msm_dp_display->power_on = true; @@ -707,20 +708,21 @@ static void msm_dp_display_audio_notify_disable(struct msm_dp_display_private *d msm_dp_display->audio_enabled = false; } -static int msm_dp_display_disable(struct msm_dp_display_private *dp) +static int msm_dp_display_disable(struct msm_dp_display_private *dp, + struct msm_dp_panel *msm_dp_panel) { struct msm_dp *msm_dp_display = &dp->msm_dp_display; if (!msm_dp_display->power_on) return 0; - msm_dp_panel_disable_vsc_sdp(dp->panel); + msm_dp_panel_disable_vsc_sdp(msm_dp_panel); msm_dp_ctrl_off_pixel_clk(dp->ctrl); /* dongle is still connected but sinks are disconnected */ if (dp->link->sink_count == 0) - msm_dp_link_psm_config(dp->link, &dp->panel->link_info, true); + msm_dp_link_psm_config(dp->link, &msm_dp_panel->link_info, true); msm_dp_ctrl_off_link(dp->ctrl, dp->panel); @@ -1437,14 +1439,14 @@ void msm_dp_display_atomic_enable(struct msm_dp *msm_dp_display) dp = container_of(msm_dp_display, struct msm_dp_display_private, msm_dp_display); - rc = msm_dp_display_enable(dp); + rc = msm_dp_display_enable(dp, dp->panel); if (rc) DRM_ERROR("DP display enable failed, rc=%d\n", rc); rc = msm_dp_display_post_enable(msm_dp_display); if (rc) { DRM_ERROR("DP display post enable failed, rc=%d\n", rc); - msm_dp_display_disable(dp); + msm_dp_display_disable(dp, dp->panel); } drm_dbg_dp(msm_dp_display->drm_dev, "type=%d Done\n", msm_dp_display->connector_type); @@ -1479,7 +1481,7 @@ void msm_dp_display_atomic_post_disable(struct msm_dp *dp) msm_dp_display_audio_notify_disable(msm_dp_display); - msm_dp_display_disable(msm_dp_display); + msm_dp_display_disable(msm_dp_display, msm_dp_display->panel); msm_dp_display_unprepare(msm_dp_display); } -- 2.43.0