From patchwork Tue Apr 1 05:11:33 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034351 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 247ABC36008 for ; Tue, 1 Apr 2025 05:12:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 130B410E4DB; Tue, 1 Apr 2025 05:11:59 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="N9rW0mtN"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 89A0710E4DB for ; Tue, 1 Apr 2025 05:11:58 +0000 (UTC) Received: from pps.filterd (m0279863.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VG8GZi031698 for ; Tue, 1 Apr 2025 05:11:54 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= y1r0Q6x0yLTab8MbDQMGfrMrTbeTQKCtYurLTk8HHuI=; b=N9rW0mtN6ikW3b1q YdPeg/3NeHnBAkCvm/wBzoW8esFhiXJLQSSbCoOPwNqOtbCkAJlfL9g6/TwGN1/x thZMT6Ly5Mma/2VJd18PdK1MGibF+XDSmVOGYbj/rPrVOWSM3mmxas0/GGomnb76 5yHHFn/IL9mzM6qo/5qqh47oqIfQngdQGDW2ltzDlzqbwfbMpx0QODAJpMkecQLu pxIo117sxMOgdnIFLJvofBTR7vYyll6mzaIr8Nxy8Fb7ChjA9KBD5fuL8Ugs344+ yVVgXh/MIOHb0zeiiXccDEMkLEkA2JpzhZsoUpI8PC9TgCVVFM7Y/2e/x5qbnrSD GADweQ== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45qxa7sj00-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:11:54 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c5d9d8890fso1121354185a.1 for ; Mon, 31 Mar 2025 22:11:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484313; x=1744089113; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=y1r0Q6x0yLTab8MbDQMGfrMrTbeTQKCtYurLTk8HHuI=; b=dKq78LvQZLD4GidY1c9YAbwW+doRnSP/rkP4VrCu1DA5OGYmAl4TfiZXpcrpCer6t/ r9T4rUwb+WPPasvjz+2Ds/v8NjsEptSc0p4/Bp2rOLvBgCJ+FW7cFXH+F2nc9QzcNveF /KH7t186GSTD6q9ZDnC5ZwArbPc2nPFeRBWL738+GHWHS1RV4u3k5FoGbfILUbUcWnQK ojPJmTEtRMGOfD081v1ZlbSRXICmTSZzveVGIUmTCPQqQiea3b41SifYBjKWAe2QZTGx klI5CIXS1NstsK4sD+SITkQc/AlFZwNhlSBFC6c1hPMv5MBnJ0ENA++DuKpuCNxWYolO sKOg== X-Gm-Message-State: AOJu0Yy2Q/5Q6CnRylo5tBZNlX9tqOTJk0fIh4ml03tVIIymXt0n/GVG 4BQm7gAJFi9jSWt/zBW6XjiL3XlY5S+L5CuUyvn/hjR3ftnYwE432Dob5eudaUg14ByXe42wEyu fn1x+4dfnoiBknubOaHjLNufIWonf00jv67cIGR3VpOH4HbGCMXmzoDbXLevwlKBlBXo= X-Gm-Gg: ASbGncvIVABMvXwITJXm4El+qbg2XlUvUVZVioKZvpvnlCo7iwRRzapn/nD7Vj9BLzV KMoCVQzVxI04UiH0krjuyhmDrO/pT3UdodAY7EB163sAKSOGVLKrzeuPipP6oE3XWyCXV00G7/Q uQtXOnUlZuPyH+oZzSzmFQRQ/hSME71q/TNQeWtNolX6lXp/10evvjLPGWlWbTYPovuV+uDvv5W E6ycqdiUyxS42t1LwjpslvCQbwVh7GKWloSdN9F9o0Yq314jSmRnuy8nupplmeQTZ/qovoYCu1h QIRMWEWmWrzrm+aYb65H40AFe9FxWWyVeACJAnsetOkVgov/CX1h4Xct6Xp+DySd0gf8DRQ5W+N nH21ohvublXmc9w+KW3NlIzJNe0xU X-Received: by 2002:a05:620a:44d4:b0:7b7:142d:53a8 with SMTP id af79cd13be357-7c62b47efbemr1553549885a.19.1743484313156; Mon, 31 Mar 2025 22:11:53 -0700 (PDT) X-Google-Smtp-Source: AGHT+IG3lexU6EBfcncm54A9Kd24CaLpiEaLaaFnAPz5TDD1Kke4bgebndJIyZ/RegXQxIUw0y9c8Q== X-Received: by 2002:a05:620a:44d4:b0:7b7:142d:53a8 with SMTP id af79cd13be357-7c62b47efbemr1553547285a.19.1743484312792; Mon, 31 Mar 2025 22:11:52 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.11.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:11:50 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:33 +0300 Subject: [PATCH 1/7] drm/bridge: analogix_dp: drop extra calls to analogix_dp_prepare_panel() MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-1-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2268; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=yoW5522ZzqPZUOVagrebp1jFhYqOlDKf+OwXbxdaN/M=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WQNdABavZ64pNwjFHAQter1xgT/pdXOsfS1 AVXUKi4MQ+JATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kAAKCRCLPIo+Aiko 1WovB/4zgZXMr4h83m6nu7k4IPGcuN0P1q3uOAHuxOS3tXLL/Nv6+l7wOGFOE6uQbEjBOiun+Kl 0FbDiTku/4J17/2Y0QAac2UU59sYQyaC5l1A68yAvFAP4IgGxzJa6fXtxJUad1ioIlybRVWdvF3 XprgVePJOdYWN/k7oUErLXI87SO2fh6t27aKoCzNLBRViAJbBr9T57KNEG6kgdxF4qZio6EW2Y/ a5sX7zFCVWGIg7pR1KcMVL3bs/TMfjpQwuq8ZCgPtKbz5ecqY+TS7paVfxxKfviPnpvJLX+AeJm g0B2qFPKg3dbztEnUbvgg0qLjSDgGWlmtIfrAtdHtl8cEI6k X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-ORIG-GUID: Bk39MxgSQCfLXbGlQGhUZHouMQ7KB2og X-Proofpoint-GUID: Bk39MxgSQCfLXbGlQGhUZHouMQ7KB2og X-Authority-Analysis: v=2.4 cv=J9Oq7BnS c=1 sm=1 tr=0 ts=67eb759a cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=Aj65s_fBnqv-yqA8UToA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 clxscore=1015 priorityscore=1501 phishscore=0 lowpriorityscore=0 bulkscore=0 malwarescore=0 mlxscore=0 mlxlogscore=999 adultscore=0 spamscore=0 suspectscore=0 impostorscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" The analogix_dp_prepare_panel() returns immediately if there is no attached panel. Drop several calls to this function which are performed when dp->plat_data->panel is NULL. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 042154e2d8ccd74ac2dc27fe527e810a50e08a09..ab1cfc340aa95bbf13fe021bd33227b565a5458d 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -1005,17 +1005,11 @@ static int analogix_dp_get_modes(struct drm_connector *connector) { struct analogix_dp_device *dp = to_dp(connector); const struct drm_edid *drm_edid; - int ret, num_modes = 0; + int num_modes = 0; if (dp->plat_data->panel) { num_modes += drm_panel_get_modes(dp->plat_data->panel, connector); } else { - ret = analogix_dp_prepare_panel(dp, true, false); - if (ret) { - DRM_ERROR("Failed to prepare panel (%d)\n", ret); - return 0; - } - drm_edid = drm_edid_read_ddc(connector, &dp->aux.ddc); drm_edid_connector_update(&dp->connector, drm_edid); @@ -1024,10 +1018,6 @@ static int analogix_dp_get_modes(struct drm_connector *connector) num_modes += drm_edid_connector_add_modes(&dp->connector); drm_edid_free(drm_edid); } - - ret = analogix_dp_prepare_panel(dp, false, false); - if (ret) - DRM_ERROR("Failed to unprepare panel (%d)\n", ret); } if (dp->plat_data->get_modes) @@ -1087,19 +1077,9 @@ analogix_dp_detect(struct drm_connector *connector, bool force) if (dp->plat_data->panel) return connector_status_connected; - ret = analogix_dp_prepare_panel(dp, true, false); - if (ret) { - DRM_ERROR("Failed to prepare panel (%d)\n", ret); - return connector_status_disconnected; - } - if (!analogix_dp_detect_hpd(dp)) status = connector_status_connected; - ret = analogix_dp_prepare_panel(dp, false, false); - if (ret) - DRM_ERROR("Failed to unprepare panel (%d)\n", ret); - return status; } From patchwork Tue Apr 1 05:11:34 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034352 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 E64ECC36014 for ; Tue, 1 Apr 2025 05:12:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1D8AD10E4DC; Tue, 1 Apr 2025 05:12:00 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="AZnrR2RB"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 864B210E4D9 for ; Tue, 1 Apr 2025 05:11:58 +0000 (UTC) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFDKs9015653 for ; Tue, 1 Apr 2025 05:11:56 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= VBSCjPGCW0P1y4nfgwnHBrOMK8O23HlmU6c+y6UxQ9k=; b=AZnrR2RBLclL33yf lE4aAoslAssXRenWwOIZsj19y+kHwGjLhIUzu2c7sKEchcUse+cHfhcKLra1MW7B 5LS51S76TyEqRko9OFw1VV2+gS1/spQ2ErcwzYRsD7SHatKrVLFh+YPle7nTp5yX rcWwgKHhpRclTHtDpgb2r2c1TVNW+nP2LC8MoGP8CYEVLeq8qbl4CsPZIU3crrt/ bErIQt3vUtrXvDekm06xZAIsNnSuNGCcY6YFafMFnjlw9pjgYNEvtJpN5S16UDMp A8peMojvb5Q0cvhMLFqg7X2M27tP07ewc89BgUIRl8ByePDUSmM7LC1UI2w1S67J Y22WXQ== 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 45p7tvejsv-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:11:56 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7c5bb68b386so535088285a.3 for ; Mon, 31 Mar 2025 22:11:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484315; x=1744089115; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=VBSCjPGCW0P1y4nfgwnHBrOMK8O23HlmU6c+y6UxQ9k=; b=S9fPHnMSzknx7ic0ruzGB70ZphLlj0M8Bw9OlveDh2w8T+JxgQpn7hUB7nU7ioBumc 5Vm70vUn9llHUZNMl71HsVuDw5LVeSWzibssYwBYNR4EGDZyIUN2WbDlSwpz95Ws6aOX CuktcqVffaN76LqzJ7hWG4nkj02M99zACykx2F2htmVj/As6kKAGLBKHj2pMgOyeWrJD INVgmgUD80wPEhHVPpvyXrhCe626yH9uonQSXJ1XbD7vfh9yX5AgFkaLJovDfJC2xEYD e15aIFGBmf2ZVDAvCd3NY+a1T1GnZkGoRGxCO5Fy/jAoSR9HMxcxgaAcNzfwgZ/IkCnR a8WQ== X-Gm-Message-State: AOJu0YxFZLXB8sx5eyI+poa2r4G2JaZMGCw6z4mnZ5EiqXiqAuGHfknK gN+7y4PpMWP3lCvZ+SKR+Hd4XC7mkE+wblmVTyu5oezewvlY+R67iK6/YCqrI83AueMCfcTXFzP fu7EnxFU0QEJb2cwq4k58VKR/vmp6ZTRQBFo+fWo8kJkxNt/XSBL3iE/6lxGdLn1peV8= X-Gm-Gg: ASbGncsfAe/Fwnjx9gFV39IO0hYS3+wzpZZIl2A6Twk92lSSQbn61az5Q0Kub8KglDB Wz6eg1qZahV0ZtgFtNZuP50/YeXTwOiyUwpEZzhQrMO7QW0w2jSF9maYjRK0OXunKZ5vMlXlEFU kkL+gTF/lGlhtdmFxaAyub2DicAw4SkH9ho5CaypvcMcekQS3jtR0UOS6mwRqmGh9xosu039TCL RC89BvY6Y79bxMzy8hDaP2ARScELIK31ghLi0SwSFbnIizpHJ7Ukj3IWK0MFP8Y+EhaCaxeCSCk gh/JveP/Uuuz4VMJeMknCODu+HVykYRYmzormXuMu6dSqkiBhZ/IVtQkT2aBZoBNeG4zdF+xi96 F/DQu1+yPs3jYIjcTr0SJBf41hPpa X-Received: by 2002:a05:620a:2904:b0:7c5:6b15:1488 with SMTP id af79cd13be357-7c6862ec10dmr1530046085a.10.1743484314721; Mon, 31 Mar 2025 22:11:54 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFmq8v31bGp9RgA36fTNf4A/LLjyL/mIvfn2jtE9aoUU3ok0DTMu2FADrICd9v9edcSjrDYyw== X-Received: by 2002:a05:620a:2904:b0:7c5:6b15:1488 with SMTP id af79cd13be357-7c6862ec10dmr1530043285a.10.1743484314331; Mon, 31 Mar 2025 22:11:54 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.11.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:11:53 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:34 +0300 Subject: [PATCH 2/7] drm/bridge: analogix_dp: drop unused argument to analogix_dp_prepare_panel() MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-2-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3082; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=RS0KjeYPoBvamlmnFd2NBoW0tS+Zy7JyWmtQ+gO1iuA=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WQXl77jaWxK+F7Bmpq6cdN14tgPEK3j0x42 2HTw0DvA1KJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kAAKCRCLPIo+Aiko 1eH8CACjt+43AIX/4PZirqgVYx0D+5t+Yv8ZImawHw8xlKGyQzLeC0N282H+QQrhODQpXHhYdkJ cZf4VprPLKH3cmRRw8qEZmWBl6fPVgvHlPoF5nZfJkaN42VSsgIOstrZyc0DmiBdzkR2CpxaJ/0 jT0fvN3VXrWNwnpWcTkDZin1SjHSb3BARlrzg5WvNT72FoVPpWftW1KjuQrMfzorqbdV+r1KGQx wefK+VLpLlHi96q5Sm0TRB4bh4IbQf9C2ObaztZYmfU5wbvOAiqr8lZiQRXhBAPpMmeL0xCmL8j +WHoN8Yb1kn5p2U+fMxyr9c437rdOGdbFs0QRL/l8OVryT1E X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Authority-Analysis: v=2.4 cv=OIon3TaB c=1 sm=1 tr=0 ts=67eb759c cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=Vyz2l5lDUG1q_RmMdnAA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-ORIG-GUID: TSxVG32gxX4ZmqDneEcnbtKcROmGbAR3 X-Proofpoint-GUID: TSxVG32gxX4ZmqDneEcnbtKcROmGbAR3 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 lowpriorityscore=0 malwarescore=0 mlxscore=0 clxscore=1015 adultscore=0 bulkscore=0 phishscore=0 suspectscore=0 impostorscore=0 spamscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" After previous cleanup all calling sites pass true as is_modeset_prepare argument to analogix_dp_prepare_panel(). Drop dead code depending on that argument being false. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index ab1cfc340aa95bbf13fe021bd33227b565a5458d..82dc4b01806f9728dc882b0128171838e81f21b0 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -963,13 +963,13 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp) * If @prepare is true, this function will prepare the panel. Conversely, if it * is false, the panel will be unprepared. * - * If @is_modeset_prepare is true, the function will disregard the current state + * The function will disregard the current state * of the panel and either prepare/unprepare the panel based on @prepare. Once * it finishes, it will update dp->panel_is_modeset to reflect the current state * of the panel. */ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, - bool prepare, bool is_modeset_prepare) + bool prepare) { int ret = 0; @@ -978,13 +978,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, mutex_lock(&dp->panel_lock); - /* - * Exit early if this is a temporary prepare/unprepare and we're already - * modeset (since we neither want to prepare twice or unprepare early). - */ - if (dp->panel_is_modeset && !is_modeset_prepare) - goto out; - if (prepare) ret = drm_panel_prepare(dp->plat_data->panel); else @@ -993,8 +986,7 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, if (ret) goto out; - if (is_modeset_prepare) - dp->panel_is_modeset = prepare; + dp->panel_is_modeset = prepare; out: mutex_unlock(&dp->panel_lock); @@ -1072,7 +1064,6 @@ analogix_dp_detect(struct drm_connector *connector, bool force) { struct analogix_dp_device *dp = to_dp(connector); enum drm_connector_status status = connector_status_disconnected; - int ret; if (dp->plat_data->panel) return connector_status_connected; @@ -1194,7 +1185,7 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge, if (old_crtc_state && old_crtc_state->self_refresh_active) return; - ret = analogix_dp_prepare_panel(dp, true, true); + ret = analogix_dp_prepare_panel(dp, true); if (ret) DRM_ERROR("failed to setup the panel ret = %d\n", ret); } @@ -1294,7 +1285,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) pm_runtime_put_sync(dp->dev); - ret = analogix_dp_prepare_panel(dp, false, true); + ret = analogix_dp_prepare_panel(dp, false); if (ret) DRM_ERROR("failed to setup the panel ret = %d\n", ret); From patchwork Tue Apr 1 05:11:35 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034353 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 8585AC36008 for ; Tue, 1 Apr 2025 05:12:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8120A10E4DD; Tue, 1 Apr 2025 05:12:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="KU7+D20E"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 539CD10E4DD for ; Tue, 1 Apr 2025 05:12:00 +0000 (UTC) Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFDKP4012624 for ; Tue, 1 Apr 2025 05:12:00 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= o6YZL2XT5oTD9JdY1E8WLZd4k+JqH1zW6qsQBJsA92c=; b=KU7+D20E5808f+KP NgpjbPbLXZFwqtRT2kep7hT1dLmTW5H9Lee/UHQrHgZtHTGrqPO8dslmzFvfbbOK x+/RcMp2M/ZW7J/U5z6qhl36QezoHP8npXFGm+fzLxriDzw/7C+vH78bdaB0Fard uLQg307W3SEOuMG8sqRxv5rdBZltybYEMvsr1LPQNbUweXQABg9yswfLrgb0Cqid FbC7v6rN4Dg4SsMmVIkkEK0F/B5CbWp+xgpYHBKyeetBgEBTZ+WKGhNoiNMBXpN8 zbmmJD5eKSpxh3iSYapclqhfzxBsToFITqoKioLxXXX0fViF/O8VbNc7MhVsST+i R4eOdQ== Received: from mail-qk1-f200.google.com (mail-qk1-f200.google.com [209.85.222.200]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45p9mjpe8r-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:11:59 +0000 (GMT) Received: by mail-qk1-f200.google.com with SMTP id af79cd13be357-7c53e316734so965087885a.2 for ; Mon, 31 Mar 2025 22:11:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484318; x=1744089118; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=o6YZL2XT5oTD9JdY1E8WLZd4k+JqH1zW6qsQBJsA92c=; b=a+yCgJt0tCUpsYQoVZxlXHEsLAzqtluAzk3uu8Uq9nWzC9yLc+GEGTma4E1yV5mwKm WqlrkSJKqG0TFHtzO/LeGl4RyK3/hQllrHGRNXY2gqtVioDc1vvWhAoVooeo12Xq333C pt8Efq+s51odKwdQ2/OirQo9rqH0YQhTP7y40he6z+7cG8SPop2pj0ztposqEY8dmFYm cwz7VDgHXmQv4OieMxDrlm7Zoef513BOFwmICjNvv7Xhug+oFPomqek+iTV7X5ygqrkI AI6K4ZYFJdIqzc6/TpCw9fZ9Q8LmA6ISfrXbRTxGWATMwMlEAt+Vqf/v8OnEurjwMIPS VP9g== X-Gm-Message-State: AOJu0Ywm6wWUQsIjhQfrueayZBrxWLdFXqXC1JVrgrwjXhs13n2VWKfd Ild4lzDF6eK0g/jEUdySTsZuxqnkDa8Lsb7Q2//PFZR8bY8onCIUZ2GxTHXEipGA5R6hklCV0/8 aQYHx/ldOt6J10FheX/OtBuaYGZ3A7n3qotoC4R+pf6ob32hmPIA9nkFTaWTLpkMKaFc= X-Gm-Gg: ASbGncup7aXVRvcM/p6b6ggiFjGt6Na3mYdRuzprwwP2gkZFPTT5ad5rmeodD5Qi74P KK5l3bd7rb5JbQ6ni+4B9Y8xvYT+zdh3q+IkQu+sL/inyzJY5B0v6hFvMCGCXsvw+aNB3bNLg23 BnvoVRF/bDit+Ggc2QnF6KFmRllhqs2ec26Sjo++fEzFM9H3kC4fSgUKOjsbBIWxmQrZLM22awD eQQ2uyAjDPBoaKvtGjbc3O+07GA/e2ZdTbjPkjZvSPFPQpbBIvLGnWX0FlxaI5aMTxUglim57jU o1XEu0pJSACO8afjmKANTtRByBBpmJ6iczvGL04YH70lTDoAoCNhpSuj6SJJNCcuwAPmw+tO5Ln EDufbs807nMkId/M3/ZI2y8OLOjvx X-Received: by 2002:a05:620a:2908:b0:7c5:5768:40b9 with SMTP id af79cd13be357-7c690875522mr1892741685a.43.1743484318347; Mon, 31 Mar 2025 22:11:58 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFkkyizkr853F+xZWRcueqn9rSKTA9DxTtGQrKq0tW8dXyPUtTl4nbZ/r8/KPTZYprk3ktRxw== X-Received: by 2002:a05:620a:2908:b0:7c5:5768:40b9 with SMTP id af79cd13be357-7c690875522mr1892738885a.43.1743484318048; Mon, 31 Mar 2025 22:11:58 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.11.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:11:55 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:35 +0300 Subject: [PATCH 3/7] drm/bridge: analogic_dp: drop panel_is_modeset MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-3-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2305; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=oOHLXQ/PS1QWkADzzpFvezZg/SQH0pidwF7pgTKLJlU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WQTU4MLspe5vr5E+cIuZXf5/aZyt03r8Xtr XhgS0FtIFeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kAAKCRCLPIo+Aiko 1VQYB/9GP2loEJeNChEDibweW7b8I4wmpDKXFgpsj8RxeJIBeBtu25iwzRmUaqfJHSbXL3O0KpQ VO2jff+Nmbppnt6MfZTXE/h3K4PpitqKfUnNqNR4Q1as1gcXR9us4WjxqoNdFNcKXjs4aj45Has vEHWRq2uV9h4u3MgmCdnBV17mLhqbIkurFSXG97KoY1FZL1bTZ3v/g/1QkTNlzyBSLfPon2MIxj CSvbitfJ3xjpftJ7Om+976ZQN+HOrO3a1BdMyf4Yq0qy0xqkCTxfyaeiTN66rDJdO3KOvdEnCgA ulTL3euYtUMGx5CQz0fQpwPvR0uR43i4YqwcHOLUZs6UZvk0 X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Authority-Analysis: v=2.4 cv=Mfhsu4/f c=1 sm=1 tr=0 ts=67eb759f cx=c_pps a=hnmNkyzTK/kJ09Xio7VxxA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=7AO8d6WWEX918e1AdasA:9 a=QEXdDO2ut3YA:10 a=PEH46H7Ffwr30OY-TuGO:22 X-Proofpoint-ORIG-GUID: 8yi-tYUWkaG3zE82rEOJXrmKVBkrrA4O X-Proofpoint-GUID: 8yi-tYUWkaG3zE82rEOJXrmKVBkrrA4O X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 mlxlogscore=999 suspectscore=0 clxscore=1015 impostorscore=0 malwarescore=0 spamscore=0 adultscore=0 phishscore=0 mlxscore=0 bulkscore=0 lowpriorityscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" The dp->panel_is_modeset is now a write-only field. Drop it completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 11 +---------- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 1 - 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 82dc4b01806f9728dc882b0128171838e81f21b0..704c6169116eb2601d2ad02dc7294455ceff5460 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -964,9 +964,7 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp) * is false, the panel will be unprepared. * * The function will disregard the current state - * of the panel and either prepare/unprepare the panel based on @prepare. Once - * it finishes, it will update dp->panel_is_modeset to reflect the current state - * of the panel. + * of the panel and either prepare/unprepare the panel based on @prepare. */ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, bool prepare) @@ -983,12 +981,6 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, else ret = drm_panel_unprepare(dp->plat_data->panel); - if (ret) - goto out; - - dp->panel_is_modeset = prepare; - -out: mutex_unlock(&dp->panel_lock); return ret; } @@ -1532,7 +1524,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) dp->dpms_mode = DRM_MODE_DPMS_OFF; mutex_init(&dp->panel_lock); - dp->panel_is_modeset = false; /* * platform dp driver need containor_of the plat_data to get diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h index 774d11574b095b093ddf2818ad5b84be6605c9bf..b679d5b71d276f458d905c936160f107225bc6c5 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h @@ -170,7 +170,6 @@ struct analogix_dp_device { bool psr_supported; struct mutex panel_lock; - bool panel_is_modeset; struct analogix_dp_plat_data *plat_data; }; From patchwork Tue Apr 1 05:11:36 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034354 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 6F5C2C36016 for ; Tue, 1 Apr 2025 05:12:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 96D4710E4DE; Tue, 1 Apr 2025 05:12:05 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="GySIRYLN"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3ABA510E4DE for ; Tue, 1 Apr 2025 05:12:04 +0000 (UTC) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFCqB8025623 for ; Tue, 1 Apr 2025 05:12:03 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= su5HDLNPv0sRzcPmNzYwCft3R4LA3Sh56oZUJ6HjWts=; b=GySIRYLNGHbm1OAx K7XD7CAFr9HvrcWsAVJ5zIjE5YtAJJ+q3yAel+r02N50ESi6SggQzJQE1WFgr3e5 DtePswXabB1iK4dAgraXOzCJlWgLCh/2TNAsL9TukKNDXkNfKfhLq6t2nw+KVNRa LQxdDa5VWaIO0Mc58IVdCDTssY/7gyk0pxTR71sN6wLOqr7OHZDsAX6cPpvVwOVb VUvKUsXiNVbZ3pPZZkCG2AZV/Kzn9LknffHnzoH/iwTQg1rvZjnQxpRFytKszn25 Btrwqek5LmwHuaDeGLeYPIN5hxAh++ntsGK3+Wcn4wPVGy5uvDFPtl80UAfkV4Yk n4D/rQ== Received: from mail-qk1-f198.google.com (mail-qk1-f198.google.com [209.85.222.198]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45p6jhpr12-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:12:03 +0000 (GMT) Received: by mail-qk1-f198.google.com with SMTP id af79cd13be357-7c5c9abdbd3so509922685a.1 for ; Mon, 31 Mar 2025 22:12:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484322; x=1744089122; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=su5HDLNPv0sRzcPmNzYwCft3R4LA3Sh56oZUJ6HjWts=; b=RE8A16GjfNTew5UQkk50w6+A/qAeMJFJ9QzHEfClpuoc4cOpdR2Pu+X7/qQeExlYU6 m3MqJWdGVzDJygxvhGTcExPF3I+05d4M2dfpJh0u3nUFN1z7LGdBaQ1sZT5cKCXFNu2E J9Wc/lyZmRFS/Q+M2F0tm6YfAUgPPYu6g9MyvsiEjkMw8jhE1zH5Koq3Ht2Vhwy7ypQD 6rzNBySzXpucXv9yFMANnrVSwSAot6VGaI7lQ5D8EOwkT+df0/8sQtE4PgO7azpuYsLl 52mopFCC7AlKqgI4dRLv2Xi0xKa2ecL+SjaLaN56fKarzMO+mnJ/fz9bMg6gVu1SXmvg x5Bg== X-Gm-Message-State: AOJu0YycAOZSOT5n2B5beyrMZoWI7hYmImXGChpe1vHakMl5hSiohMCQ PUU0lSTlR99qWxZUVh1/cp8IWPTRsLRekIyqVYuHr+ZDgony2KuzZaThqqhQWvUZ8pbfDgOyZO9 iDnv0Vd2OZN9jxDi4ByCjh0FVFsi/O06MYqlVRQDl29p07Cn1nYLMwGutdz9Qq9DCmAU= X-Gm-Gg: ASbGncvDiXW4+GDAMeDLV/xZ32htES93v5ukLIqgrlmQVNqiW1eJH00P6cJGdLl9cQp 8Y0D7FrQl1xzo6ydFmQKryABRss6qCZ/Lwu1coblO19ki+ehGc1coh8drEzAQA6EaE1Gx01Ys7S T94vLmNBfzGjcoaNiwr6Pt38PhchMSVNP3e+qcjKA7+TE7fa15Eh5o0qFhNFv+TfwtTmJA/4uue pBb4inQQumfyGI7SjT/9dhnwuakzeskvKnmvwrlBD2WkTdB3AawcKPyQgOwFVjN4RxJkQnNwWcz hpM98UcRkpSLm1xb957LsWRi4WGtSM6OA5ttNUwyTyD/29l35OP8JhTS69qunCsIjBw78JD5pyh 8Awcj4jo5KBBymqmaE9ePkTXUWpYz X-Received: by 2002:a05:620a:2a0b:b0:7c5:4b37:ae49 with SMTP id af79cd13be357-7c69089511cmr1850601985a.48.1743484322122; Mon, 31 Mar 2025 22:12:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHfkh+VwvyZqGWd26i2DZpAeXVnuJcT2uXByll2V8BgpOUSTAvnwlH3MR5aeFbdPqlccIuedw== X-Received: by 2002:a05:620a:2a0b:b0:7c5:4b37:ae49 with SMTP id af79cd13be357-7c69089511cmr1850598585a.48.1743484321703; Mon, 31 Mar 2025 22:12:01 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.11.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:11:59 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:36 +0300 Subject: [PATCH 4/7] drm/bridge: analogic_dp: drop panel_lock MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-4-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1985; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=ljnxHNh77aJKTn5PBnRyQ46dmjys7Q6lroI6kcr2K88=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WQ9JDhpO2O3km+J66d3OvjPxAK1AuTTf1XK 9nMcbqhsXqJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kAAKCRCLPIo+Aiko 1d2jCACvEOox/CQElqeioCPPoLsvAIxMwsML921E+NqK2RDDDcNofLsW12QfFmN4lf9xy3tbJ2h 021oWlZ6tZF0FEUMjYqCe6OgIOaDaOCH2M1x0QVRLzVYOPzh/IAZeVGMA0VCtwylSfD17NqvK91 vJ39nQupM51Yiq1BrM8jXCQG0hHmAfK8L5gpjSbL2Rxz6usoM1fbhtZdzKad+RJb7xsS9+W0DWu wljR/PcNZNKEiZDd5L15P74eNEgh1BAVP3UYCUOWxSJphSs4oHFSKi/KpT23St7eLsPh/S+MR+/ H8xy5QoBR5qqJgTmEQF3iU9JXnBFdY7sXLZmSeGl7g9YrCPQ X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: vCCZaQ-nimn1He4_3-HFJYIwdcRa2o5H X-Proofpoint-ORIG-GUID: vCCZaQ-nimn1He4_3-HFJYIwdcRa2o5H X-Authority-Analysis: v=2.4 cv=bZZrUPPB c=1 sm=1 tr=0 ts=67eb75a3 cx=c_pps a=qKBjSQ1v91RyAK45QCPf5w==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=KfGKz8IhEdz9gtDduwEA:9 a=QEXdDO2ut3YA:10 a=NFOGd7dJGGMPyQGDc5-O:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" The analogix_dp_prepare_panel() function is called from bridge's atomic_pre_enable() and atomic_post_disable() callbacks, which can not happen simultaneously. Drop the useless mutex. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 5 ----- drivers/gpu/drm/bridge/analogix/analogix_dp_core.h | 2 -- 2 files changed, 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 704c6169116eb2601d2ad02dc7294455ceff5460..1ec4d277fe6bb03ad9eb8451ae2af5ad5ada0978 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -974,14 +974,11 @@ static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, if (!dp->plat_data->panel) return 0; - mutex_lock(&dp->panel_lock); - if (prepare) ret = drm_panel_prepare(dp->plat_data->panel); else ret = drm_panel_unprepare(dp->plat_data->panel); - mutex_unlock(&dp->panel_lock); return ret; } @@ -1523,8 +1520,6 @@ analogix_dp_probe(struct device *dev, struct analogix_dp_plat_data *plat_data) dp->dev = &pdev->dev; dp->dpms_mode = DRM_MODE_DPMS_OFF; - mutex_init(&dp->panel_lock); - /* * platform dp driver need containor_of the plat_data to get * the driver private data, so we need to store the point of diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h index b679d5b71d276f458d905c936160f107225bc6c5..2b54120ba4a3ef55af518a0629a5c8469f275a0f 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.h @@ -169,8 +169,6 @@ struct analogix_dp_device { bool fast_train_enable; bool psr_supported; - struct mutex panel_lock; - struct analogix_dp_plat_data *plat_data; }; From patchwork Tue Apr 1 05:11:37 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034355 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 B8457C36008 for ; Tue, 1 Apr 2025 05:12:09 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 272C110E4E1; Tue, 1 Apr 2025 05:12:09 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="jwJh+sYM"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id E4AC910E4DF for ; Tue, 1 Apr 2025 05:12:07 +0000 (UTC) Received: from pps.filterd (m0279864.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFD0g5007671 for ; Tue, 1 Apr 2025 05:12:07 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= 0UCfqpWUdUcNvimGZ1R1IpBbubClaHeqHcxpWdaScnE=; b=jwJh+sYMtDYECFOC GDaeEH5NXWRKXhM6QRPdmkX2HTCptptJwQQZHu/EL/MDFiWhXCNno9yhamXzGlrp YfS4eMJIQT44YJ1rqPKVRjBONr0LDXZ97LB6bb9Zf1ldaOefLijq3IBjT/v7FnXy TKi9lQqoobD+7eXvheydE5MYxQFbhKGfqYw9m7F7aIeX4b1AKjYBxQ4bDL3bq1qm hGujtoilQUyKBb9oiUJIfAcMTsQHMC29sQ+uG6zaIWALU9Lf/piSiEdqj/EJ9aRp e8MXXozoAXHD4JZ7R7+EgRxa2VnFWmWy8c2Z4XfyUMBd3uaqeImnA75lulQ5KLng iUHvkw== 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 45pa1nxdw4-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:12:07 +0000 (GMT) Received: by mail-qk1-f197.google.com with SMTP id af79cd13be357-7c5c82c6d72so950761885a.2 for ; Mon, 31 Mar 2025 22:12:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484326; x=1744089126; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0UCfqpWUdUcNvimGZ1R1IpBbubClaHeqHcxpWdaScnE=; b=pbiJP72JYhi8ZZAmPkLhdErUJIbTz9447yTV/0u84b0FGdbU8TGa3xhyhTNyGz5TSr l7ycTz2Gia6CszOmAQ0IgmdHLEK7pHe0prvDTkdypFmzomSBb5uGSwRqOT9oueEB3LOy BTmCE7syqZ1EP5IxPdq49/X5d7ThhVl1EEC2drz6si/Z/XiGDAcw4/5UtyyG1bOPzbHg zIzrFjF3ZKvhFzKm1QjjzSW1SoryAqfO7czuI1xWYJqUV0sPeUU7D6RGfCGxSxpXixce BVnajLd62rkHqRFJBiwunieSg9JtDAmESnonsAoexXJuL4nsBpfFx1nZTAr372J/xkzn 3hLA== X-Gm-Message-State: AOJu0Yx2wrdlnZ+kMFXDpJwvZQojZqfRdZb3/vqfnSWz23OXs4ueVe+c t8uTSstK3vSUItJGaqdRqGwYnWrTNd9SjQvqEEAOt8pZFAXIDbf6xDI5L64enSaVpHXTu4lTOIw 6+kNaEk0rC6MpQXiwLOrOeqFrjX2ONGtODCek+DjEAmIeMzg4F2I31IW9aok59wOO3lM= X-Gm-Gg: ASbGncvWDCwJrjo/myZ4VGyKIRkUwBCxK+k/FETMvcWH3ba6wv1KPUB2qTizLTs7WYp /SL6e5K6+PORhcOKQzizB0JwIS+MYZ840jlmuMCPyoAVGTV621+wZMtEJJUxKzho/Ft1vym4Tvd VxmsiopWaCQ76gPIwTU0l4SDS8+w+gnNV4T0BR71CnIW0GG3sxYiADCIZ/HzBrJq6sKPkIhwNBi BSi0qx/cIAc+eW2I+DahAS8KFasLCKiy2yMnCQNpx1cHHBFlXkplFHO0IjKpa6zKs5y/OISwyew R2H/LP6fv6tmbgTMvdP+1RlWee4vula203vPzt1ZGPOpnrH2b/HyXwvR7P2eM49aTk/AwB1Bn4t z1V8ewUg4gta5SgqLbfZYbEI36Lit X-Received: by 2002:a05:620a:294b:b0:7c5:f6d9:86ec with SMTP id af79cd13be357-7c6908757d6mr1708208785a.35.1743484325694; Mon, 31 Mar 2025 22:12:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH1zNjxGnB5My+rC0jxfqxqMFbTxnTup9jnK/AiA2lDXPM6z0hy3tkrX7AvXWBzpu54TzEAfQ== X-Received: by 2002:a05:620a:294b:b0:7c5:f6d9:86ec with SMTP id af79cd13be357-7c6908757d6mr1708206585a.35.1743484325402; Mon, 31 Mar 2025 22:12:05 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.12.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:12:03 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:37 +0300 Subject: [PATCH 5/7] drm/bridge: analogix_dp: inline analogix_dp_prepare_panel() MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-5-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2731; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=MlFndke6G/BiAttpO7gjjEBObPGtgF0yacJKuJFSOi4=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WRhHYAe1OS/1/tk3Sz9qb4KIliPm2jbNOgb RtAp4hv+7yJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kQAKCRCLPIo+Aiko 1SeJB/99DcUiEZ0lm8NGUnz3EMICHzz708VEx8dlGlQCVd6oQueDlCPIK1fl2K/lFHHmcvMg65q 0ijG7EnkVwUj8ILoNZO0VtHSfjZTpfVMWecoSy7cNZJ9HZItlcPZ1ZHui3+bPVz47zMj1geQmGP Rf2VwMzBc4pkhXs51AstB9xkwZj78rjLlQfLzfXpBpryZh4bp/iqRTdWCVppitXBPP6yrTVgeTB fYt0/O7VpAE0+brLpUMLZPY/Bhj/N/6MeJ0BaXi01lXq98yioQWO2xXi/UmdZyVo1jnBcaXIfAF Nmck8Q7RhoU7aCLN4HdVAeqdQEfK5BQ+v07+UFMsGOKylkLb X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-ORIG-GUID: AOzy0rSbAA9YzGopklI3dd6-fuDbw7ko X-Proofpoint-GUID: AOzy0rSbAA9YzGopklI3dd6-fuDbw7ko X-Authority-Analysis: v=2.4 cv=MPlgmNZl c=1 sm=1 tr=0 ts=67eb75a7 cx=c_pps a=50t2pK5VMbmlHzFWWp8p/g==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=06SpEF9E26xvXwvOrpsA:9 a=QEXdDO2ut3YA:10 a=IoWCM6iH3mJn3m4BftBB:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 malwarescore=0 suspectscore=0 phishscore=0 spamscore=0 clxscore=1015 bulkscore=0 mlxlogscore=999 impostorscore=0 mlxscore=0 adultscore=0 priorityscore=1501 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" The analogix_dp_prepare_panel() is now only calling a corresponding drm_panel function. Inline it to simplify the code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 43 +++++----------------- 1 file changed, 10 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index 1ec4d277fe6bb03ad9eb8451ae2af5ad5ada0978..f60068011008482f7b7b2edfcab5fb1b3e9e130f 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -955,33 +955,6 @@ static int analogix_dp_disable_psr(struct analogix_dp_device *dp) return analogix_dp_send_psr_spd(dp, &psr_vsc, true); } -/* - * This function is a bit of a catch-all for panel preparation, hopefully - * simplifying the logic of functions that need to prepare/unprepare the panel - * below. - * - * If @prepare is true, this function will prepare the panel. Conversely, if it - * is false, the panel will be unprepared. - * - * The function will disregard the current state - * of the panel and either prepare/unprepare the panel based on @prepare. - */ -static int analogix_dp_prepare_panel(struct analogix_dp_device *dp, - bool prepare) -{ - int ret = 0; - - if (!dp->plat_data->panel) - return 0; - - if (prepare) - ret = drm_panel_prepare(dp->plat_data->panel); - else - ret = drm_panel_unprepare(dp->plat_data->panel); - - return ret; -} - static int analogix_dp_get_modes(struct drm_connector *connector) { struct analogix_dp_device *dp = to_dp(connector); @@ -1174,9 +1147,11 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge, if (old_crtc_state && old_crtc_state->self_refresh_active) return; - ret = analogix_dp_prepare_panel(dp, true); - if (ret) - DRM_ERROR("failed to setup the panel ret = %d\n", ret); + if (dp->plat_data->panel) { + ret = drm_panel_prepare(dp->plat_data->panel); + if (ret) + DRM_ERROR("failed to prepare the panel ret = %d\n", ret); + } } static int analogix_dp_set_bridge(struct analogix_dp_device *dp) @@ -1274,9 +1249,11 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) pm_runtime_put_sync(dp->dev); - ret = analogix_dp_prepare_panel(dp, false); - if (ret) - DRM_ERROR("failed to setup the panel ret = %d\n", ret); + if (dp->plat_data->panel) { + ret = drm_panel_unprepare(dp->plat_data->panel); + if (ret) + DRM_ERROR("failed to unprepare the panel ret = %d\n", ret); + } dp->fast_train_enable = false; dp->psr_supported = false; From patchwork Tue Apr 1 05:11:38 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034356 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 C968EC36008 for ; Tue, 1 Apr 2025 05:12:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3D1D010E4DF; Tue, 1 Apr 2025 05:12:14 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="OQo7V+Pt"; dkim-atps=neutral Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2AE9510E4DF for ; Tue, 1 Apr 2025 05:12:13 +0000 (UTC) Received: from pps.filterd (m0279867.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFDSjI027732 for ; Tue, 1 Apr 2025 05:12:12 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= RzXLwKeO3UWlZHuYhJkCQ7vw+BiQ3N3j/vqzkaMxh64=; b=OQo7V+PtnCVB22oV UQzcSe8WKRANQ55hbH1CiU2dY/Hv32wN5yNqAXnCj0DCK7yry+ewzhC1StsxAlka g+8U1zLqeoPGjYN6P+xYoJN+SKpN7yzn9iHOtRGhXpzModLSFTxmL4pnixZl0Qdi rqFbaDeqOV/Rv9Z+pJEmTbO/RhWsrHH26gTzF5t0cHZATiXGSyNUbDMPAXMCRnUZ QyfrUpTkbsp2K0MOrwmRguyHe+0k3r8AyMGllT/wqFp/QjMeINw3dFaH2xtknY/E f+HbJgNv3tv5kTDUcFGJRb839QYeizneGpSErfPLxDBHANf9EuwsTsmRjKBgg0yV FFLFcA== Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45p6jhpr1k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:12:12 +0000 (GMT) Received: by mail-qk1-f199.google.com with SMTP id af79cd13be357-7c5c77aff55so1277833785a.3 for ; Mon, 31 Mar 2025 22:12:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484329; x=1744089129; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=RzXLwKeO3UWlZHuYhJkCQ7vw+BiQ3N3j/vqzkaMxh64=; b=Jd2EL9CW3hwUucAIcYJFApyv1burO1z3caDpD9pVwnGicsn2099iKC8iQnvPKaK8LH STPG2/0dD4ENznm2DmD8kuSxtrijlwYnQ+SksS6QrDFMuW/AVJqIlY67s6Jb8IyaArkc qND260qzwVYX90BctoRKF+A6gIlPf4s7GbeyjJOhLHSox++B3f+W6aQX5rUI4jHW77qd qEBQCkUt0w5KnL6J5Ygop9UApJFX6Oso+8PwkUBU/nWPbWNqRq2vqyoY7dgJa4Juc73k 79QdHql2CPx7uNI+YlH4J7hCncGRb1lgOyLiMGZqjtcMsQtkIB95JHvwY+oXqZf96hjH wcJg== X-Gm-Message-State: AOJu0YwTgRhBNvgKWjQU3xb9p/uHlP3xcLFGKnlnln2VWfsgXxffWKSs bGypKakqyRTjccodhTm8uW5+aoWFE8FEI4pVdUtxi4cOhhiVfBYxA4VyBnYAG4ZAqm2IjSh2WHZ Y8cCu695i4kEIfl/PbNelfwiPImN2oPB5nV1UyKSjb6QbA6jjUmrfwSVC16WV0/XcJjo= X-Gm-Gg: ASbGncuza8L8iUXvsjlNGsuTwWABHx4bFpWDR4j5ylirWugLKcNTFlFhANUKRtVGOmq Y5fBgc2CHzbsWp0mMrNwWd9iCSxSiMOunQ7I81khS+mtk2dN3G205s7hZk0n3GUG4lxVZMQTDWg ksqmDNiF1e8UuAG2mLYEZrYfHKBDLOr2emYOJyUw6502aDEzmkHvDjLQiAhYWE6f3wvIu5R1q8W H0TavaTlQjeYJV4mbZ/5oW0OeFWFNUN8x0qI2F/KRXdvJHz72izry049Yn9DgCfvtFg3mpjEf8g qvkHHdK6Fknc6Lep1yXl+AtMAPNTLnO2CBrpcIVIZT5g7C4RWb66mGJEH6RyPoR+hoLTkC6iGYq VZ7Rfb95sS8zb6ftq9CwhOt4WLx7S X-Received: by 2002:a05:620a:3950:b0:7c5:4949:23f2 with SMTP id af79cd13be357-7c6908756d3mr1644561785a.44.1743484329393; Mon, 31 Mar 2025 22:12:09 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEZ/M7+Jnk+uK2Lr8W86kFPh1dzbXpco8cTxC1B6tbBsO/4N53MtP19Yw6evFH+z30KAW771A== X-Received: by 2002:a05:620a:3950:b0:7c5:4949:23f2 with SMTP id af79cd13be357-7c6908756d3mr1644559285a.44.1743484329010; Mon, 31 Mar 2025 22:12:09 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.12.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:12:06 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:38 +0300 Subject: [PATCH 6/7] drm/bridge: analogix_dp: ignore return values of drm_panel_* calls MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-6-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=3703; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=NJl7bsXfNLqpNqUOkFTfyECJOLD0rCpvvEtqImrQuV8=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WRGK/Kq2L2EzNQw3/2jLhnkOU7Fr5jcjpTL n+0mz6GO/eJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kQAKCRCLPIo+Aiko 1bJwB/9wEq7tEGADlYD+RoVIKmJWwgU1otLJ1mX9j6GkBVMnGx1UwZw1OsNcKmJ36nK7ZKughYz 3PXLs4vW0AxOpkk8pWSY3vvnSvxExp4DhNfQKuAl36u1+mLfNDw/QpWcL6MhIT/73Dzco2af0A1 AMf9j+y6n8gwV2uT+8R6Z/inO28KqY0ThHsZaDdmuf8znOdq2SfA0PSOeQrfU+UcUL3FhPV5wSo HnBI0L+3NzIagrb9GzySE4suhsbhm7WhBQR6oCyi89z60XGwmP9Kyqd2d2FFcMvSlhmMJJDpfor j8/FKOleLOG9z/OBh1vm6Nnhm7ouIhofqHCY30Su46Age0Gc X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: 0Rp8yrTKBQ4SfkyGHci08lWJPmrEQVnT X-Proofpoint-ORIG-GUID: 0Rp8yrTKBQ4SfkyGHci08lWJPmrEQVnT X-Authority-Analysis: v=2.4 cv=bZZrUPPB c=1 sm=1 tr=0 ts=67eb75ac cx=c_pps a=HLyN3IcIa5EE8TELMZ618Q==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=fEsDx3e4H4ijciuaGfYA:9 a=QEXdDO2ut3YA:10 a=bTQJ7kPSJx9SKPbeHEYW:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 bulkscore=0 priorityscore=1501 clxscore=1015 phishscore=0 adultscore=0 lowpriorityscore=0 suspectscore=0 spamscore=0 malwarescore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" Follow the example of other drivers and ignore return values of the drm_panel_prepare() / unprepare() / enable() / disable() calls. There is no possible error recovery, so the driver just logs a message. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/analogix/analogix_dp_core.c | 39 ++++------------------ 1 file changed, 6 insertions(+), 33 deletions(-) diff --git a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c index f60068011008482f7b7b2edfcab5fb1b3e9e130f..c7dffdae31877ae194fc6b0a5bf21be203f7dcc4 100644 --- a/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c +++ b/drivers/gpu/drm/bridge/analogix/analogix_dp_core.c @@ -838,10 +838,7 @@ static int analogix_dp_commit(struct analogix_dp_device *dp) int ret; /* Keep the panel disabled while we configure video */ - if (dp->plat_data->panel) { - if (drm_panel_disable(dp->plat_data->panel)) - DRM_ERROR("failed to disable the panel\n"); - } + drm_panel_disable(dp->plat_data->panel); ret = analogix_dp_train_link(dp); if (ret) { @@ -863,13 +860,7 @@ static int analogix_dp_commit(struct analogix_dp_device *dp) } /* Safe to enable the panel now */ - if (dp->plat_data->panel) { - ret = drm_panel_enable(dp->plat_data->panel); - if (ret) { - DRM_ERROR("failed to enable the panel\n"); - return ret; - } - } + drm_panel_enable(dp->plat_data->panel); /* Check whether panel supports fast training */ ret = analogix_dp_fast_link_train_detection(dp); @@ -1136,7 +1127,6 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge, struct analogix_dp_device *dp = bridge->driver_private; struct drm_crtc *crtc; struct drm_crtc_state *old_crtc_state; - int ret; crtc = analogix_dp_get_new_crtc(dp, old_state); if (!crtc) @@ -1147,11 +1137,7 @@ static void analogix_dp_bridge_atomic_pre_enable(struct drm_bridge *bridge, if (old_crtc_state && old_crtc_state->self_refresh_active) return; - if (dp->plat_data->panel) { - ret = drm_panel_prepare(dp->plat_data->panel); - if (ret) - DRM_ERROR("failed to prepare the panel ret = %d\n", ret); - } + drm_panel_prepare(dp->plat_data->panel); } static int analogix_dp_set_bridge(struct analogix_dp_device *dp) @@ -1231,17 +1217,11 @@ static void analogix_dp_bridge_atomic_enable(struct drm_bridge *bridge, static void analogix_dp_bridge_disable(struct drm_bridge *bridge) { struct analogix_dp_device *dp = bridge->driver_private; - int ret; if (dp->dpms_mode != DRM_MODE_DPMS_ON) return; - if (dp->plat_data->panel) { - if (drm_panel_disable(dp->plat_data->panel)) { - DRM_ERROR("failed to disable the panel\n"); - return; - } - } + drm_panel_disable(dp->plat_data->panel); disable_irq(dp->irq); @@ -1249,11 +1229,7 @@ static void analogix_dp_bridge_disable(struct drm_bridge *bridge) pm_runtime_put_sync(dp->dev); - if (dp->plat_data->panel) { - ret = drm_panel_unprepare(dp->plat_data->panel); - if (ret) - DRM_ERROR("failed to unprepare the panel ret = %d\n", ret); - } + drm_panel_unprepare(dp->plat_data->panel); dp->fast_train_enable = false; dp->psr_supported = false; @@ -1678,10 +1654,7 @@ void analogix_dp_unbind(struct analogix_dp_device *dp) analogix_dp_bridge_disable(dp->bridge); dp->connector.funcs->destroy(&dp->connector); - if (dp->plat_data->panel) { - if (drm_panel_unprepare(dp->plat_data->panel)) - DRM_ERROR("failed to turnoff the panel\n"); - } + drm_panel_unprepare(dp->plat_data->panel); drm_dp_aux_unregister(&dp->aux); From patchwork Tue Apr 1 05:11:39 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 14034357 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 BB852C36008 for ; Tue, 1 Apr 2025 05:12:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 35F7410E4D9; Tue, 1 Apr 2025 05:12:17 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=qualcomm.com header.i=@qualcomm.com header.b="p3tZmKqC"; 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 8538E10E4E0 for ; Tue, 1 Apr 2025 05:12:15 +0000 (UTC) Received: from pps.filterd (m0279870.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 52VFCrHC023701 for ; Tue, 1 Apr 2025 05:12:14 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= SufW+r80Y9ER9ibdcVkSFCKfUrwEDR608dkdfliv+88=; b=p3tZmKqCivwj6XHX U5SiYPiT/xpskR9YVFyYuE9Kqe0dp9Jd1L2QedWVS8gxrwiy/oQXMTQ9WndI/wsR u5E9mc8+vL8OR7oP6G52XVWKzj+gfhuxHk8AbIcoNEhm57F6bKP0oXw7Ndz86JFf m1joS18m3iUDxXQYVD7hm0T/QxsoOjFTZhWdv9ia1iekGF432TVC4Ws3ZKMm64mC OnpnI9iVamHMxeKLHl50rLy/K/oO7eODMhi7T27tzsWsQIAt6B2briKShDXV96yI IEQD+6eiRB1pIQzzL6vKRXXQSXeTLDp2U3e/KFFB/lU6Pc5qRx0HhQTPGiKas7/f TVPsWA== Received: from mail-qv1-f72.google.com (mail-qv1-f72.google.com [209.85.219.72]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 45p8xvej9h-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT) for ; Tue, 01 Apr 2025 05:12:13 +0000 (GMT) Received: by mail-qv1-f72.google.com with SMTP id 6a1803df08f44-6ed16cc6e39so107910226d6.1 for ; Mon, 31 Mar 2025 22:12:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1743484333; x=1744089133; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SufW+r80Y9ER9ibdcVkSFCKfUrwEDR608dkdfliv+88=; b=Y/MzQcMWvQoIrDJiGuZ5ytHHW6tXmHzJb30M0/nK9PfWkyi0o/XERarc/wNfeEp3H/ uDHyqD+vlTagfnsgiqr6o/mzeSGCCnrVYiKM8CRMH7fgiwd2rEr3V1H+lQtKV9S0rJNs xoQWVTSk3xVPTK+w9FoVEOlrXPoGGZj9fp+n5nRdg7a3d4Sff9qSU6z9+FcoRph/F1WZ s87OFSgdbNmpg1KPt91whmJsRA7GFl1mNi1Em133JaaFE0fnTn/8733+lv67kx2m2bmA Q/RefeiADbbsFUmttT8xJERrhhP1m+G4atcibICMX80g32l2e+TMc85/d90LB2cJwFHF It7w== X-Gm-Message-State: AOJu0YzlFBJHQ30pg6R+txthZl3GNPE590JDkZfTo+LQRhAyXvxntpu0 IcrEW/6Iaiqaiu+fk1h7v4wqETB+1ttoyyAIoNpCo0GhgPamYz7lJVX0Jwm4aN6KdmirZu5kfo1 SMhmNWRNuGbB07GTOqu0FprLNEgxO2j2PkO0NgDEzjAJ1+FMwxyYpDKLyUxMQy4cD8R8= X-Gm-Gg: ASbGncswoPqwn2nFIYcmCxrQTgKsylEO7ExQYQMSnM6k2Aqps2R6G5cOTnKzVnOFkw2 5ASAo2DQYh/2M6ga/UbdMO+ZW5KjqZsWzrv3KuQZRNjyj0K/tWHWbRNTB9gnbHjkFdes8LChJns ye/4LoqojuuPz1TajCm1Qd2jy46gEdPmtYVyiT/aEyQ0d0eBcD9JN3pwlMU4rmRNuwTVgvO0QSW i46yj4bqHQJXM3pXs5cRgZhpx+QffDKCACV2lLuZTU1iYxn+8kP0K91JaSzvgOgW4fQLO1voIyX HDqymCwQJcpJI60vwBrWcHxtllDmJu+P2ozuQREif6WgjxScYvDhgI4Jl8B3ssXLGHgcprF5hkt bh5+rSNKs3CBNJiBJPkbPcTwgm3I3 X-Received: by 2002:a05:620a:2908:b0:7c5:5768:40b9 with SMTP id af79cd13be357-7c690875522mr1892800085a.43.1743484333140; Mon, 31 Mar 2025 22:12:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEsior20lc9lixXbnK9mQBmXS1qNDNvJUiHmjCz+r6N/SDHxsQVRBDDeDs6C8IGTz71trkGnw== X-Received: by 2002:a05:620a:2908:b0:7c5:5768:40b9 with SMTP id af79cd13be357-7c690875522mr1892797985a.43.1743484332707; Mon, 31 Mar 2025 22:12:12 -0700 (PDT) Received: from umbar.lan (2001-14ba-a0c3-3a00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a0c3:3a00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-54b095a21b0sm1251697e87.243.2025.03.31.22.12.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 31 Mar 2025 22:12:10 -0700 (PDT) From: Dmitry Baryshkov Date: Tue, 01 Apr 2025 08:11:39 +0300 Subject: [PATCH 7/7] drm/panel: make prepare/enable and disable/unprepare calls return void MIME-Version: 1.0 Message-Id: <20250401-panel-return-void-v1-7-93e1be33dc8d@oss.qualcomm.com> References: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> In-Reply-To: <20250401-panel-return-void-v1-0-93e1be33dc8d@oss.qualcomm.com> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jessica Zhang Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=7332; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=fQDSEEOLghqW0gqjtjiP2QZkz7fbMPIZN5amp5V1z7k=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBn63WRJEYlwE9X9glklAyZRqGVoodvfMuP5sFdR tn4AgM0ExuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZ+t1kQAKCRCLPIo+Aiko 1Y3tB/9MOw1hOc0MzrJv7Ez3RcHJYHujcXQo2I5d1f1gaHB12EZL8MgwagBso+OSR28vrQu58br /ww6UqV0ft6YROBZ+MHu7IWY68AGd3+l2ToCPm7iu9DNAKhInXQlXYwlgXcLiqMwH9LOxKS7FC6 qSUXWxgQIKqe08dlO9jq8w7JkvXVQxtzBQ+2NPNc73q5HZSGT4lbh/V4oxG1arkUcnDFwrJ+fr8 xG+x/98cP0SQB8/9OcgBs6gE7tyqWKkT4xuQPHc6vxLgQKjs6qz4p3uIMziCtA2Q5OtZsF8Rif9 dFkE/xiO2FES1ksV4FIY6TI9H1eNb5xQXj3PT9b25oBzrtj1 X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: OFo3BuZoWiagmBZaKEk82P5oLOqssi7U X-Authority-Analysis: v=2.4 cv=PquTbxM3 c=1 sm=1 tr=0 ts=67eb75ad cx=c_pps a=7E5Bxpl4vBhpaufnMqZlrw==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=XR8D0OoHHMoA:10 a=EUspDBNiAAAA:8 a=rpcUNz5-J_niPHj66PUA:9 a=QEXdDO2ut3YA:10 a=pJ04lnu7RYOZP9TFuWaZ:22 X-Proofpoint-ORIG-GUID: OFo3BuZoWiagmBZaKEk82P5oLOqssi7U X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1095,Hydra:6.0.680,FMLib:17.12.68.34 definitions=2025-04-01_01,2025-03-27_02,2024-11-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 clxscore=1015 mlxlogscore=999 impostorscore=0 malwarescore=0 priorityscore=1501 adultscore=0 classifier=spam authscore=0 authtc=n/a authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.19.0-2502280000 definitions=main-2504010033 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" Now there are no users of the return value of the drm_panel_prepare(), drm_panel_unprepare(), drm_panel_enable() and drm_panel_disable() calls. Usually these calls are performed from the atomic callbacks, where it is impossible to return an error. Stop returning error codes and return void instead. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/drm_panel.c | 54 +++++++++---------------- drivers/gpu/drm/panel/panel-newvision-nv3051d.c | 9 +---- include/drm/drm_panel.h | 8 ++-- 3 files changed, 26 insertions(+), 45 deletions(-) diff --git a/drivers/gpu/drm/drm_panel.c b/drivers/gpu/drm/drm_panel.c index c627e42a7ce70459f50eb5095fffc806ca45dabf..faa7a76b63b53b3a45b3400d8bf3b58a027a340e 100644 --- a/drivers/gpu/drm/drm_panel.c +++ b/drivers/gpu/drm/drm_panel.c @@ -105,21 +105,21 @@ EXPORT_SYMBOL(drm_panel_remove); * * Calling this function will enable power and deassert any reset signals to * the panel. After this has completed it is possible to communicate with any - * integrated circuitry via a command bus. - * - * Return: 0 on success or a negative error code on failure. + * integrated circuitry via a command bus. This function cannot fail (as it is + * called from the pre_enable call chain). There will always be a call to + * drm_panel_disable() afterwards. */ -int drm_panel_prepare(struct drm_panel *panel) +void drm_panel_prepare(struct drm_panel *panel) { struct drm_panel_follower *follower; int ret; if (!panel) - return -EINVAL; + return; if (panel->prepared) { dev_warn(panel->dev, "Skipping prepare of already prepared panel\n"); - return 0; + return; } mutex_lock(&panel->follower_lock); @@ -138,11 +138,8 @@ int drm_panel_prepare(struct drm_panel *panel) follower->funcs->panel_prepared, ret); } - ret = 0; exit: mutex_unlock(&panel->follower_lock); - - return ret; } EXPORT_SYMBOL(drm_panel_prepare); @@ -154,16 +151,14 @@ EXPORT_SYMBOL(drm_panel_prepare); * reset, turn off power supplies, ...). After this function has completed, it * is usually no longer possible to communicate with the panel until another * call to drm_panel_prepare(). - * - * Return: 0 on success or a negative error code on failure. */ -int drm_panel_unprepare(struct drm_panel *panel) +void drm_panel_unprepare(struct drm_panel *panel) { struct drm_panel_follower *follower; int ret; if (!panel) - return -EINVAL; + return; /* * If you are seeing the warning below it likely means one of two things: @@ -176,7 +171,7 @@ int drm_panel_unprepare(struct drm_panel *panel) */ if (!panel->prepared) { dev_warn(panel->dev, "Skipping unprepare of already unprepared panel\n"); - return 0; + return; } mutex_lock(&panel->follower_lock); @@ -195,11 +190,8 @@ int drm_panel_unprepare(struct drm_panel *panel) } panel->prepared = false; - ret = 0; exit: mutex_unlock(&panel->follower_lock); - - return ret; } EXPORT_SYMBOL(drm_panel_unprepare); @@ -209,26 +201,26 @@ EXPORT_SYMBOL(drm_panel_unprepare); * * Calling this function will cause the panel display drivers to be turned on * and the backlight to be enabled. Content will be visible on screen after - * this call completes. - * - * Return: 0 on success or a negative error code on failure. + * this call completes. This function cannot fail (as it is called from the + * enable call chain). There will always be a call to drm_panel_disable() + * afterwards. */ -int drm_panel_enable(struct drm_panel *panel) +void drm_panel_enable(struct drm_panel *panel) { int ret; if (!panel) - return -EINVAL; + return; if (panel->enabled) { dev_warn(panel->dev, "Skipping enable of already enabled panel\n"); - return 0; + return; } if (panel->funcs && panel->funcs->enable) { ret = panel->funcs->enable(panel); if (ret < 0) - return ret; + return; } panel->enabled = true; @@ -236,8 +228,6 @@ int drm_panel_enable(struct drm_panel *panel) if (ret < 0) DRM_DEV_INFO(panel->dev, "failed to enable backlight: %d\n", ret); - - return 0; } EXPORT_SYMBOL(drm_panel_enable); @@ -248,15 +238,13 @@ EXPORT_SYMBOL(drm_panel_enable); * This will typically turn off the panel's backlight or disable the display * drivers. For smart panels it should still be possible to communicate with * the integrated circuitry via any command bus after this call. - * - * Return: 0 on success or a negative error code on failure. */ -int drm_panel_disable(struct drm_panel *panel) +void drm_panel_disable(struct drm_panel *panel) { int ret; if (!panel) - return -EINVAL; + return; /* * If you are seeing the warning below it likely means one of two things: @@ -269,7 +257,7 @@ int drm_panel_disable(struct drm_panel *panel) */ if (!panel->enabled) { dev_warn(panel->dev, "Skipping disable of already disabled panel\n"); - return 0; + return; } ret = backlight_disable(panel->backlight); @@ -280,11 +268,9 @@ int drm_panel_disable(struct drm_panel *panel) if (panel->funcs && panel->funcs->disable) { ret = panel->funcs->disable(panel); if (ret < 0) - return ret; + return; } panel->enabled = false; - - return 0; } EXPORT_SYMBOL(drm_panel_disable); diff --git a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c index 5d115ecd5dd44c8e5e7d1fb8afe573324e987f59..b6429795e8f518646443dd8179f3ec28cef4dc0f 100644 --- a/drivers/gpu/drm/panel/panel-newvision-nv3051d.c +++ b/drivers/gpu/drm/panel/panel-newvision-nv3051d.c @@ -413,15 +413,10 @@ static int panel_nv3051d_probe(struct mipi_dsi_device *dsi) static void panel_nv3051d_shutdown(struct mipi_dsi_device *dsi) { struct panel_nv3051d *ctx = mipi_dsi_get_drvdata(dsi); - int ret; - ret = drm_panel_unprepare(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to unprepare panel: %d\n", ret); + drm_panel_unprepare(&ctx->panel); - ret = drm_panel_disable(&ctx->panel); - if (ret < 0) - dev_err(&dsi->dev, "Failed to disable panel: %d\n", ret); + drm_panel_disable(&ctx->panel); } static void panel_nv3051d_remove(struct mipi_dsi_device *dsi) diff --git a/include/drm/drm_panel.h b/include/drm/drm_panel.h index a9c042c8dea1a82ef979c7a68204e0b55483fc28..18bf338c8b96254dc3f2880106b944e71ea4c9a7 100644 --- a/include/drm/drm_panel.h +++ b/include/drm/drm_panel.h @@ -275,11 +275,11 @@ void drm_panel_init(struct drm_panel *panel, struct device *dev, void drm_panel_add(struct drm_panel *panel); void drm_panel_remove(struct drm_panel *panel); -int drm_panel_prepare(struct drm_panel *panel); -int drm_panel_unprepare(struct drm_panel *panel); +void drm_panel_prepare(struct drm_panel *panel); +void drm_panel_unprepare(struct drm_panel *panel); -int drm_panel_enable(struct drm_panel *panel); -int drm_panel_disable(struct drm_panel *panel); +void drm_panel_enable(struct drm_panel *panel); +void drm_panel_disable(struct drm_panel *panel); int drm_panel_get_modes(struct drm_panel *panel, struct drm_connector *connector);