From nobody Wed Apr 1 23:53:39 2026 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 58A68382F0D for ; Wed, 1 Apr 2026 07:27:01 +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=1775028422; cv=none; b=dauZ5J5mK4xsN6CbL9jesEMzHlnxUYWiwmoUbeov6cduSJE1HoYVHspO0yVnYY34PVe3yr4EUrqNyVuIBRFTq+OgjOcVlG1tfrQ94MKWN5fI+zvKNCoEEJORTMPGa+1CzvY9BvIDeC8ED4JbZ+tPX3TpznAUfQOzCOyKg4t8RrM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775028422; c=relaxed/simple; bh=pOgZnrXub3GS8AZAw2xe2Lzvx6vQOVPendpRdgsMBpU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Bbea28IyJ2lCcqCDMFgD0Une/dfv/FzeSObmQngOHd0Tv2ZW1OgxBZRYDo94hHrnDDWAzedehpPHl7egyUPeOtILdGFPwYmaiTD1Nmcb6Y2AwwcypyTccEJnBhipuqyk6cT6AQg7PChM8HQLtIJbpWrDwz9wrWr7OKDZCwHkWlw= 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=Z/dfkyvr; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=ZMm1flYz; 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="Z/dfkyvr"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="ZMm1flYz" 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 6317Eudk4106888 for ; Wed, 1 Apr 2026 07:27: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= wxCLjYTUywbIG6hdVNRWMq6YPfiD70vfjtzHlxjSzdU=; b=Z/dfkyvr8gTlqdEK LqaeBk1oZg34b7VUi2n0VRf97nZ+SMyUwJC8MBNnaIeUC7EsHDKnyB8x4xLi7xVU cRafd+mj0jA/OmRyMQTBOL6z6Xl+9awEfnXt01OT7CtQr1XECAtpdQ38zoPrmJbQ OYG7QPbfTJIx21vpN0J4twIkFZBNnm8aHMoQj/fUEXwBradjmIAyoU0BVwvGmRDd l62YOLB6HZYxAmdoVUKWlGM/bKpsIckE+jzKZVFE5AtpNMOrvi/zHbO/Ef+hciAH /ZlNiAWEoPIIpX3QJzinC6t7n1wq7vTAxFsuKBirfgsT3m+7Ew45mfkGJTuzr8Y2 /hrQ/A== Received: from mail-qt1-f199.google.com (mail-qt1-f199.google.com [209.85.160.199]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4d8xt901pd-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Wed, 01 Apr 2026 07:27:00 +0000 (GMT) Received: by mail-qt1-f199.google.com with SMTP id d75a77b69052e-50917996cfaso82322781cf.0 for ; Wed, 01 Apr 2026 00:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1775028420; x=1775633220; 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=wxCLjYTUywbIG6hdVNRWMq6YPfiD70vfjtzHlxjSzdU=; b=ZMm1flYzFze19wfi5E4rYYA1PJofPrglX2nnxk2W0IT1kr0QY5ffCqy8g5LvVcqD33 pvQxqulSf51gMLb5eaRBLd966VW9Sr0LsgdiYSo2Eu/iZuC1IcXH/ZS4ODgx7KWDkdAh EkwxZfPc0lKLMwcvnFEvO06RXl+eZS5/rKubOFYcjtGgsw388ShEXRU9jx5B+UbELz0Z wh2LgTxs1tyKl0ivYphUGAsjVFzRkREaJcmSws7S6xVdxVgvk5dVozAay/PgU3MArl8X 555wHL0XgGofqewBIZz4HQ7GpWDHS8LK+E0KEmS55NajdPhTKshdBtLmtOVldXakbKWu XxQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1775028420; x=1775633220; 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=wxCLjYTUywbIG6hdVNRWMq6YPfiD70vfjtzHlxjSzdU=; b=KtbJa4cTbLnoeAqTrtYuYEYbKsC3YOEmdPSi7htXmE+rjPIyJrMoObwRX1i4KqDz0E xUBIwHLtAw5VdLgKt9imk7NJtKXMYNDhlsA5+vjL+awAjCXQiCQ+Pvmi42cBLhPOke4m aR1lG5NKbYDNZDfD753K/3qH0xwyMJdnn04G5JxG7kqbfGKM7g4zGfS79qneOpE2VB5Q tMbxFIHObVD8TJS78ICPfniJHlTqUU6RhfODvExJ9koe31/xnEV7WspbI6iyJTraBfhk MjC2gy8T45cjYf+Vme8ZD9wb6cuikrgzeTIlvDHaNKFB+OqRr9jon/+86oGDdBQzO96K JaFQ== X-Forwarded-Encrypted: i=1; AJvYcCVTKEH1613vHD11ThgKwKSAIiqh7j0S2f4Q6SNro14VtyQa3ZA3aP4j5EVGqZbETMx1C8DajsepK9H73oI=@vger.kernel.org X-Gm-Message-State: AOJu0YxBss9iPR7J0kF6/0JGe5Zmic52Wy5x85d+lM0UAgK4dIVMcSPR 4r1KU6/G1UsYKBp/JfNgayFLVCq064ljlBfNpexG7JWJkSxuojVMJshulKlfha5JxJE+unoI9LZ +Hxc8Hdz4yGNYIRTqcdj0GpLgWgzt2N8qlW35kFkTNhYJ47HD6lcMGdxSb9veKmeH4uY= X-Gm-Gg: ATEYQzxUyGF2m9YDDdbJlumdqO36P/Vb/I6zTnmAhOZ1QICt7csueyudBvK3f17FNiU IqZ4SUZ6OVvMvVYIVi3H+vDH6Lx6K7nAXqlLPPG6ylqDkGXkGXZOf5pubJblFYkBlgQxGOIavuL GO6RQ66KEd4a3u2v934JTo8u/2bZprH72kw7TuJPaUx1pcQV4jxc9HwGCp/tzpVcmNE7o/07Urb +R1rsJakLLSmhsgc7XwYEjqxVOTGXWOn6PumDomL7AQ1mhAn1QIlrzjwv2hhUU05WVlw4S8JV+z rDXLRM68ByU6Rzmpj2bhemvzzhi67F0WXbTJpQbPwcI99T7hsJ92rA5BLKcCCAwrEzyB8rWKxCc ltlqkbFwWUZ0Kz2Bfr/3yctS1ijFFQHNKa8h3Ow1TIDWL9+fNvgbJ8f4qhP+wT/RWjactU+/XEn gU/tt5V9eFSI5eMw3rqbEMTfpAmj8AxwvVv8s= X-Received: by 2002:a05:622a:1f0d:b0:50b:48a6:6b96 with SMTP id d75a77b69052e-50d3bca54a5mr36269821cf.35.1775028419737; Wed, 01 Apr 2026 00:26:59 -0700 (PDT) X-Received: by 2002:a05:622a:1f0d:b0:50b:48a6:6b96 with SMTP id d75a77b69052e-50d3bca54a5mr36269471cf.35.1775028419278; Wed, 01 Apr 2026 00:26:59 -0700 (PDT) Received: from umbar.lan (2001-14ba-a073-af00-264b-feff-fe8b-be8a.rev.dnainternet.fi. [2001:14ba:a073:af00:264b:feff:fe8b:be8a]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-38cb9f31972sm8638421fa.12.2026.04.01.00.26.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 01 Apr 2026 00:26:57 -0700 (PDT) From: Dmitry Baryshkov Date: Wed, 01 Apr 2026 10:26:28 +0300 Subject: [PATCH 09/19] drm/panel: himax-hx8394: simplify hx8394_enable() 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: quoted-printable Message-Id: <20260401-waveshare-dsi-touch-v1-9-5e9119b5a014@oss.qualcomm.com> References: <20260401-waveshare-dsi-touch-v1-0-5e9119b5a014@oss.qualcomm.com> In-Reply-To: <20260401-waveshare-dsi-touch-v1-0-5e9119b5a014@oss.qualcomm.com> To: Neil Armstrong , Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Cong Yang , Ondrej Jirman , Javier Martinez Canillas , Jagan Teki , Liam Girdwood , Mark Brown , Linus Walleij , Bartosz Golaszewski Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org X-Mailer: b4 0.15.1 X-Developer-Signature: v=1; a=openpgp-sha256; l=2415; i=dmitry.baryshkov@oss.qualcomm.com; h=from:subject:message-id; bh=pOgZnrXub3GS8AZAw2xe2Lzvx6vQOVPendpRdgsMBpU=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBpzMisQHL6qbOb5oDSQPV+YXvWKyipTd8B0Ocuk 17HKBDfjRuJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCaczIrAAKCRCLPIo+Aiko 1VflCACGiFUAmeGHUxPcLUIE4mj8HiU/9RP/nPny3hspTKil+4vbxdnaL70iV5S02Kx4btVz9xj kSc2CXCuht6nRCvGonbIfT+msxpO3wWFuM7ddnlQKnBPDg4LEHIU7kCtiUIZwbQcHkFrz0x9A40 cygjsanxfZAG/quPVwSweLsytvo2OTDuYIDzs//sFoLpLRg7Y8CI3I6Vyr2bAIPdprvp89Dm81A 3h5oW/QNEPEFX4VWUUb7grbKtPzylGFf1AnLCH1WxJ64478Qq1CEAgNFpbP/KsZVvX9dLlORYYA RHBfXXP6q4cAygUm/lX2Qp8AqF+zoTslKi+fpcePPvQRb9U9 X-Developer-Key: i=dmitry.baryshkov@oss.qualcomm.com; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A X-Proofpoint-GUID: fevyUnSZ5kV3y8KN7GdzpSxBnj0cjJtp X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNDAxMDA2NCBTYWx0ZWRfX+lVwKPRgjhZz Tt8lasfeb5yuQTv9mYeH6atw1pv9vQmmm80rSWRIDfSy9bbLH1dPB+iTJv/d4N2NeRMd4vFV16z mhXAK1B11RBV/p/JG1487pQJm1TDnnCaR7rB3iXYXUkIYtnAOshimDHDq3nA23hSdk/qtaqM2yf 8epjxwxmBkttqzHjATbXuSxXZMzPPv4Rt+PCgOlk4MnpMWI0/dHFzsp0yLf77F+rTzxTCHEA89k wb3apvkGYavhKcXsF2sFh5TdmeDluTRcvGGOb5/1r670XwTDhCQwI2nrvWuVCZz+lSZOyHzePSk QZqBFDYGyTtY6fbGyW1zUOniiiYvhHiynbxZJg+rHHflr6eGVCPEYa7XtQU9AgHP4riOU8we3Ey TflGdhAasF0oJDvRp94xjq/OwHP8DcTxR0Bd20EQQyYoTYEcvTsP9t/LEIwE8a2+SBj/5iBRH5y BMTABHplllIm5iD0xSQ== X-Proofpoint-ORIG-GUID: fevyUnSZ5kV3y8KN7GdzpSxBnj0cjJtp X-Authority-Analysis: v=2.4 cv=PoGergM3 c=1 sm=1 tr=0 ts=69ccc8c4 cx=c_pps a=WeENfcodrlLV9YRTxbY/uA==:117 a=xqWC_Br6kY4A:10 a=IkcTkHD0fZMA:10 a=A5OVakUREuEA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=YMgV9FUhrdKAYTUUvYB2:22 a=EUspDBNiAAAA:8 a=IHUbhB35yQ0xTmbSNgsA:9 a=QEXdDO2ut3YA:10 a=kacYvNCVWA4VmyqE58fU:22 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.51,FMLib:17.12.100.49 definitions=2026-04-01_02,2026-04-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 impostorscore=0 spamscore=0 suspectscore=0 bulkscore=0 priorityscore=1501 lowpriorityscore=0 adultscore=0 malwarescore=0 clxscore=1015 phishscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2603050001 definitions=main-2604010064 Simplify hx8394_enable() function by using hx8394_disable() instead of open-coding it and mipi_dsi_msleep() instead of manual checks. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/panel/panel-himax-hx8394.c | 41 ++++++++++----------------= ---- 1 file changed, 14 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/p= anel/panel-himax-hx8394.c index d64f3521eb15..1f23c50b6661 100644 --- a/drivers/gpu/drm/panel/panel-himax-hx8394.c +++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c @@ -618,47 +618,34 @@ static const struct hx8394_panel_desc hl055fhav028c_d= esc =3D { .init_sequence =3D hl055fhav028c_init_sequence, }; =20 -static int hx8394_enable(struct drm_panel *panel) +static int hx8394_disable(struct drm_panel *panel) { struct hx8394 *ctx =3D panel_to_hx8394(panel); struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(ctx->dev); struct mipi_dsi_multi_context dsi_ctx =3D { .dsi =3D dsi }; - int ret; - - ctx->desc->init_sequence(&dsi_ctx); - - mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); - - if (dsi_ctx.accum_err) - return dsi_ctx.accum_err; - /* Panel is operational 120 msec after reset */ - msleep(120); - - mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); - if (dsi_ctx.accum_err) - goto sleep_in; - - return 0; - -sleep_in: - ret =3D dsi_ctx.accum_err; - dsi_ctx.accum_err =3D 0; =20 - /* This will probably fail, but let's try orderly power off anyway. */ mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); - mipi_dsi_msleep(&dsi_ctx, 50); + mipi_dsi_msleep(&dsi_ctx, 50); /* about 3 frames */ =20 - return ret; + return dsi_ctx.accum_err; } =20 -static int hx8394_disable(struct drm_panel *panel) +static int hx8394_enable(struct drm_panel *panel) { struct hx8394 *ctx =3D panel_to_hx8394(panel); struct mipi_dsi_device *dsi =3D to_mipi_dsi_device(ctx->dev); struct mipi_dsi_multi_context dsi_ctx =3D { .dsi =3D dsi }; =20 - mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx); - mipi_dsi_msleep(&dsi_ctx, 50); /* about 3 frames */ + ctx->desc->init_sequence(&dsi_ctx); + + mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx); + + /* Panel is operational 120 msec after reset */ + mipi_dsi_msleep(&dsi_ctx, 120); + + mipi_dsi_dcs_set_display_on_multi(&dsi_ctx); + if (dsi_ctx.accum_err) + hx8394_disable(panel); =20 return dsi_ctx.accum_err; } --=20 2.47.3