From nobody Mon Oct 6 20:59:30 2025 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A5E25219A79 for ; Thu, 17 Jul 2025 06:58:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.171 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735493; cv=none; b=KSEHFD3ja6J4MZQBkUiaC0NsxokO7FKUZuzFpEoUoWV0cz8+Rfl7FdwWlTUrBf7jNwri+PNcMq8KnU4dJC0L3vD7nKAjU24cCjh8B51yS5Fs4XVjMnGSllyPGDSrd5VM8mm/DYON+r24b/z9VXbirsNoGNO/oRwExXBcBBveN0k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735493; c=relaxed/simple; bh=Q+ZY9xjBuqQxqenQY7jqiguWkAzHexyUMMWNBcg78x8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Kl9B5vv3q3XXgvXtw0a5ZN/mmoOLtSwQ0GZE4otFqXdgt8HIIkJFJHsrRGOLvP7GQ66afKwBgrNRjppepnV74OCyE3g5cfIoMF7A2WYWTXNTt0iCAofE6PUn3MQD2LT89zX2HBMTUWaQgckpgq4wasrxyfiGr4X9h8pAV2Iq8w0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com; spf=pass smtp.mailfrom=brighamcampbell.com; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b=KNC0WW5l; arc=none smtp.client-ip=209.85.210.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b="KNC0WW5l" Received: by mail-pf1-f171.google.com with SMTP id d2e1a72fcca58-74b52bf417cso490244b3a.0 for ; Wed, 16 Jul 2025 23:58:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752735491; x=1753340291; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=nRMZHukFq/Fz1BxRKYe9su1Usquvr1NXauedg+WKKBk=; b=KNC0WW5lKIGiProZ89bpfgdUA9WMenmyuuHPj81FuCYn7dlxTTePY8kAgQivRCgfYV w7SLa7HgTzCsnL81WydF4NvdXVicO8syIsyniyWJkAqattprtTN03sbZU/tqay18ZKZ9 b6Ljnr14nIxWhRQLLK3dqpUzy7yzlFFxGRdNf5TjT0F9Xt+dg2VHcwivfsgvzplYWqWY KwbSBnqzneBn07Po7H6rYbnXPmBXOAU9TolXEP3vWxwhkO6Y+6vcaH4LhsrPYEIeOWrm j1O/Xw+hC2ZF+CO+yecPNfURVN5jPi252lshtepCpsF9YllcpLpwbwsbj85b/GQCFAZo Y8lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752735491; x=1753340291; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nRMZHukFq/Fz1BxRKYe9su1Usquvr1NXauedg+WKKBk=; b=u8Rvr49IPTidp2ZlFUowrPDcgn2kQYkW5d/8bWlr6DkwP8CPpRQzQnPHbh1zxS/Pq3 XoU8L/Xt6dK/QVpUJrqqDOYJnxKrwLI08XpOdvUzi5P6G5q+aknfx4PRrQOcp3Ak/fQw ecigxELek9CpO+WKW7kK9fk0rmifMb1XwkxuNka4I7dHspImyDB79j6iOz5ifrEq3szq NrcWPPuvO+NQTo7H0WzUE9i4VcHjLWVaJDm1B3u+xQIs6P7/cuSlCGGifDLiP2OXKA2I 7Cl5NgZzLNWZNXQi1U2GMZ0/kXGixHq/mTi1/AnzVzPKKiq6ZT+7YVyt0kbod9a5trVz 2p6w== X-Forwarded-Encrypted: i=1; AJvYcCWO5AirrRm4BOJLfHoZ5TB5wYPkWW1HrhBMmz/DEOQOG36md8bIGOysgfZu8Ttu454g/3AMfS8Ul9Yw/OI=@vger.kernel.org X-Gm-Message-State: AOJu0YzMx2XWe1Y1lIk0utuPSClipjjQBw8v0GwQKrh+2CXfEYVM4uZZ XW0Y6UzATD3nntcUeSIQie4KiedsupiynoCWduOOBNzc3V7avpcJFWGRUh/aTZUDnxQ= X-Gm-Gg: ASbGncsN/mNcocrh2iW2N8GMex2ABpruJCck1sCCbDp8qPQumnro6bTqIUeJk5pANj1 NjjgbScqiiNLPPW7n/62ME3Vnbx4ldemJuwTDLabmpLLu7/cX0GvR6y6xwyqCcAcT6dIQ5/k4RV YlQtRJMsFCO1nsO82u4kCqqntWjfTc/Dw+j0YoIAIS60F3RRDB4l4qBzuh4teyo1efC5r3M3jXm m3D6tcYU8ifpe8N2ux56fPZa2odz985cglkouTtktHUvRN71w91aDH1/7BjeMMnS1wL0VBQRkem EF41FiNTfNp8WJHlyVvZwJaNtpdKrSX4MKuubHmNDeIjBeqtMWu+XvGoakuEpgvrdjU3L2PvlQr H8gd5z3eck64rvsEgK2DVnFgt2W0wznh0vAIB/2JLzB9NrTcTMXNWYw== X-Google-Smtp-Source: AGHT+IEliMbgtuTCQXNVVOMflDMHgY0pux0knysFK+gpotQ655Tfx39EtFZBf6v78DQtGzuRTvmzQw== X-Received: by 2002:a05:6a00:170d:b0:748:2eb7:8cc7 with SMTP id d2e1a72fcca58-75724677639mr7982430b3a.21.1752735490724; Wed, 16 Jul 2025 23:58:10 -0700 (PDT) Received: from mystery-machine.brighamcampbell.com ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9f4bc51sm15157293b3a.116.2025.07.16.23.58.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 23:58:10 -0700 (PDT) From: Brigham Campbell To: dianders@chromium.org, tejasvipin76@gmail.com, diogo.ivo@tecnico.ulisboa.pt, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Brigham Campbell Subject: [PATCH v3 1/4] drm: Create mipi_dsi_dual macro Date: Thu, 17 Jul 2025 00:57:53 -0600 Message-ID: <20250717065757.246122-2-me@brighamcampbell.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250717065757.246122-1-me@brighamcampbell.com> References: <20250717065757.246122-1-me@brighamcampbell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Create mipi_dsi_dual macro for panels which are driven by two parallel serial interfaces. This allows for the reduction of code duplication in drivers for these panels. Signed-off-by: Brigham Campbell --- In case it's not obvious, the indirection between mipi_dsi_dual and _mipi_dsi_dual is meant to allow for the expansion of _func in the case that _func is also a macro. include/drm/drm_mipi_dsi.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 369b0d8830c3..32da8861f9de 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -431,6 +431,30 @@ void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_m= ulti_context *ctx); mipi_dsi_dcs_write_buffer_multi(ctx, d, ARRAY_SIZE(d)); \ } while (0) =20 +/** + * mipi_dsi_dual - send the same MIPI DSI command to two interfaces + * + * This macro will send the specified MIPI DSI command twice, once per eac= h of + * the two interfaces supplied. This is useful for reducing duplication of= code + * in panel drivers which use two parallel serial interfaces. + * + * @_func: MIPI DSI function or macro to pass context and arguments into + * @_dsi1: First DSI interface to act as recipient of the MIPI DSI command + * @_dsi2: Second DSI interface to act as recipient of the MIPI DSI command + * @_ctx: Context for multiple DSI transactions + * @...: Arguments to pass to MIPI DSI function or macro + */ +#define mipi_dsi_dual(_func, _dsi1, _dsi2, _ctx, ...) \ + _mipi_dsi_dual(_func, _dsi1, _dsi2, _ctx, ##__VA_ARGS__) + +#define _mipi_dsi_dual(_func, _dsi1, _dsi2, _ctx, ...) \ + do { \ + (_ctx)->dsi =3D (_dsi1); \ + _func((_ctx), ##__VA_ARGS__); \ + (_ctx)->dsi =3D (_dsi2); \ + _func((_ctx), ##__VA_ARGS__); \ + } while (0) + /** * struct mipi_dsi_driver - DSI driver * @driver: device driver model driver --=20 2.49.0 From nobody Mon Oct 6 20:59:30 2025 Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CC0EF21B8F2 for ; Thu, 17 Jul 2025 06:58:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.180 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735495; cv=none; b=Njgj3zyAjHvXE6V2bOxHuy0MNNdtJ+kP6Dp9ngAEJpYKaz3K/IeY5GDlivScsD4D+yTbcY5xy+OGGa4dz4EC44T4Vl3qYv6v+P+/NjbCDoeVS814bj6X/wXoWoSND5VIRH2PX09vykKP+S6avBivL5wJ8/ZKmetmj2VOX6TdbBk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735495; c=relaxed/simple; bh=lRnMA5+FB5aoMF835aM9KznMjGgU/WukMYKH7AISu/Q=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=OF6LmKTTOzLntcbIK9ZY8PeLdhIB5xmI9tMbljyULzz12eWirJPmF4UdfvlPeAmcguvb/o/xXJadK8YbMhD7N3Z9ajkLE4KIkM4AqbovwDc1jqYh0Nvn7oRCC+iEZq6tQjNBGKk8wzXWdMi9jH62FD39H6hviHbfZbAK6JaOUKw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com; spf=pass smtp.mailfrom=brighamcampbell.com; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b=VS6wF90O; arc=none smtp.client-ip=209.85.210.180 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b="VS6wF90O" Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-7490702fc7cso449999b3a.1 for ; Wed, 16 Jul 2025 23:58:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752735493; x=1753340293; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/H4K+0OM84CcvR+j8iQAIfmopw+k66j+SclsWu5fEzM=; b=VS6wF90OzSiPM+ya0KYp34b4rj8f3sD6V2lZ44r65Y+oF3Gtlse0k8GBmWFveIqEMe /jjzhVaofH5sO5eMMPDHsAWO5G8vobKcFYdACDzFQxoguuBi3XHabB8ncpiW4ebLfFcB jh83kQ0CePSLQgeESAG7bUfQl9xajCsfHAu+5wKgH1x12U815rzdtT7Frhcy0SxJ3+l7 CdRXrsjXtQZAcucIvqOSszz0qzWnDY6TQXR0NzYT8J1tUInZ53Qwa6+eAKpl0k5yCFq9 Nmw/GQ23llmKJANE4QnWg1MahFIrLPk06MGkv+LvsPrdZLBBEG7DjLx81Gwa1/RnW7GB 64WQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752735493; x=1753340293; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/H4K+0OM84CcvR+j8iQAIfmopw+k66j+SclsWu5fEzM=; b=Lu42IU6vz356keikvLjNOH65JPWuXDB516BLAE9y6l476++bT+Wr4vScrTxiv1fu0M WkfC2G+/OlE+/rndmgj86grI4EAif1QvncPssXJoCUutDbtOcP/dlYDsrNZHmr8XqHDM z8noO+7VwkVAUP4ILQdH9dF+BgIGS9mLgU1ZXan9lTHD/Ws7emsMd2BsT8DWdT7glg1D 6N1qu67OrcS27x9XZqB9Im+ID+N1/xEnEcuOzoPlO8KafBLvCSYvTF8YD/R3UmCV1BNY 8zXxtxXgRTt/GAAlVIVqkO4vVRAh6kTjJB2NS4BggD9fvVqvm1Y0Tabc1lbd7xREeS3o hibQ== X-Forwarded-Encrypted: i=1; AJvYcCWDeWAMIZSRvK0LbEPzU1D3ufbYBk8zJKetxBv+TIfuQ1NoqOaYm+//RZJUYOQstfbzSJ4kIfKxzfj6B8A=@vger.kernel.org X-Gm-Message-State: AOJu0YyLqZp1E+sH3E/G85V9WRcvToRPFVs6tR898MhKwonagOioS7pt KIMZ+Lu+NMWwZR/FU5EDk6XSAiv21VcIQaLSLFXNIIOtIiAmZIAlZzgjUfxvYt01KBMBNlHANv3 7aKiL1ebmUA== X-Gm-Gg: ASbGncu3u//ywtBPS5Wq8q9yKOQB5TpzuiDiP7NkWx/AMl+4tqe6VXqShjtufISl08M /+gykcNSZi5qnP/zzC0mS/xG+YAwjTCbr/C0Pr6uGxjyyNfhJ69TErlTA1o6GVt75MgCLytf7c8 hTwjBe7oi5owh8TAbFfnJPeVpk3/zmb747NaZyETwViie85zr/4BqPfSDYCHM8K6p7k0iT8XqIi fydOGbglsrUDF1Q8lwzrIUphG0FYEVHWd5KFl8fAJ2Fcg5DWXPfOP8G2XJph7VIWGrJNZOQ/XRh h5taFb1XmP3WXiFotIk6mLY4q1+N7Ur/f/l0y+GUueRA400qzTOLdkFW5wWfmVmcATPiq03EpTD KFhMsGrdye4Gzn0HSyFPuiPHHUN3MHbJ+GL8PXUUKXBcUdvkdTaue6w== X-Google-Smtp-Source: AGHT+IHH/vgpxV6vqdCi5vMoBUmo5CXiyXWtxttI7E89xJuwKL7vDndmJMVY1qcKcLpgkZTs1ukI7A== X-Received: by 2002:a05:6a20:3d84:b0:232:36e3:9a4e with SMTP id adf61e73a8af0-237d7b6cdadmr9956537637.40.1752735492853; Wed, 16 Jul 2025 23:58:12 -0700 (PDT) Received: from mystery-machine.brighamcampbell.com ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9f4bc51sm15157293b3a.116.2025.07.16.23.58.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 23:58:12 -0700 (PDT) From: Brigham Campbell To: dianders@chromium.org, tejasvipin76@gmail.com, diogo.ivo@tecnico.ulisboa.pt, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Neil Armstrong , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Brigham Campbell Subject: [PATCH v3 2/4] drm/panel: jdi-lpm102a188a: Fix bug and clean up driver Date: Thu, 17 Jul 2025 00:57:54 -0600 Message-ID: <20250717065757.246122-3-me@brighamcampbell.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250717065757.246122-1-me@brighamcampbell.com> References: <20250717065757.246122-1-me@brighamcampbell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Fix bug in unprepare() which causes the function's return value to be that of the last mipi "enter sleep mode" command. Update driver to use the "multi" variant of MIPI functions in order to facilitate improved error handling and remove the panel's dependency on deprecated MIPI functions. Use the new mipi_dsi_dual macro to reduce code duplication. Signed-off-by: Brigham Campbell --- drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 187 ++++++------------ 1 file changed, 55 insertions(+), 132 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/dr= m/panel/panel-jdi-lpm102a188a.c index 5b5082efb282..b72b6518a090 100644 --- a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c +++ b/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c @@ -81,25 +81,25 @@ static int jdi_panel_disable(struct drm_panel *panel) static int jdi_panel_unprepare(struct drm_panel *panel) { struct jdi_panel *jdi =3D to_panel_jdi(panel); - int ret; =20 - ret =3D mipi_dsi_dcs_set_display_off(jdi->link1); - if (ret < 0) - dev_err(panel->dev, "failed to set display off: %d\n", ret); + /* + * One context per panel since we'll continue trying to shut down the + * other panel even if one isn't responding. + */ + struct mipi_dsi_multi_context dsi_ctx1 =3D { .dsi =3D jdi->link1 }; + struct mipi_dsi_multi_context dsi_ctx2 =3D { .dsi =3D jdi->link2 }; =20 - ret =3D mipi_dsi_dcs_set_display_off(jdi->link2); - if (ret < 0) - dev_err(panel->dev, "failed to set display off: %d\n", ret); + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx1); + mipi_dsi_dcs_set_display_off_multi(&dsi_ctx2); =20 /* Specified by JDI @ 50ms, subject to change */ msleep(50); =20 - ret =3D mipi_dsi_dcs_enter_sleep_mode(jdi->link1); - if (ret < 0) - dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret); - ret =3D mipi_dsi_dcs_enter_sleep_mode(jdi->link2); - if (ret < 0) - dev_err(panel->dev, "failed to enter sleep mode: %d\n", ret); + /* Doesn't hurt to try sleep mode even if display off fails */ + dsi_ctx1.accum_err =3D 0; + dsi_ctx2.accum_err =3D 0; + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx1); + mipi_dsi_dcs_enter_sleep_mode_multi(&dsi_ctx2); =20 /* Specified by JDI @ 150ms, subject to change */ msleep(150); @@ -123,72 +123,47 @@ static int jdi_panel_unprepare(struct drm_panel *pane= l) /* Specified by JDI @ 20ms, subject to change */ msleep(20); =20 - return ret; + return 0; } =20 -static int jdi_setup_symmetrical_split(struct mipi_dsi_device *left, +static void jdi_setup_symmetrical_split(struct mipi_dsi_multi_context *dsi= _ctx, + struct mipi_dsi_device *left, struct mipi_dsi_device *right, const struct drm_display_mode *mode) { - int err; - - err =3D mipi_dsi_dcs_set_column_address(left, 0, mode->hdisplay / 2 - 1); - if (err < 0) { - dev_err(&left->dev, "failed to set column address: %d\n", err); - return err; - } - - err =3D mipi_dsi_dcs_set_column_address(right, 0, mode->hdisplay / 2 - 1); - if (err < 0) { - dev_err(&right->dev, "failed to set column address: %d\n", err); - return err; - } - - err =3D mipi_dsi_dcs_set_page_address(left, 0, mode->vdisplay - 1); - if (err < 0) { - dev_err(&left->dev, "failed to set page address: %d\n", err); - return err; - } - - err =3D mipi_dsi_dcs_set_page_address(right, 0, mode->vdisplay - 1); - if (err < 0) { - dev_err(&right->dev, "failed to set page address: %d\n", err); - return err; - } - - return 0; + mipi_dsi_dual(mipi_dsi_dcs_set_column_address_multi, + left, right, dsi_ctx, + 0, mode->hdisplay / 2 - 1); + mipi_dsi_dual(mipi_dsi_dcs_set_page_address_multi, + left, right, dsi_ctx, + 0, mode->vdisplay - 1); } =20 -static int jdi_write_dcdc_registers(struct jdi_panel *jdi) +static void jdi_write_dcdc_registers(struct mipi_dsi_multi_context *dsi_ct= x, + struct jdi_panel *jdi) { /* Clear the manufacturer command access protection */ - mipi_dsi_generic_write_seq(jdi->link1, MCS_CMD_ACS_PROT, - MCS_CMD_ACS_PROT_OFF); - mipi_dsi_generic_write_seq(jdi->link2, MCS_CMD_ACS_PROT, - MCS_CMD_ACS_PROT_OFF); + mipi_dsi_dual(mipi_dsi_generic_write_seq_multi, + jdi->link1, jdi->link2, dsi_ctx, + MCS_CMD_ACS_PROT, MCS_CMD_ACS_PROT_OFF); /* - * Change the VGH/VGL divide rations to move the noise generated by the + * Change the VGH/VGL divide ratios to move the noise generated by the * TCONN. This should hopefully avoid interaction with the backlight * controller. */ - mipi_dsi_generic_write_seq(jdi->link1, MCS_PWR_CTRL_FUNC, - MCS_PWR_CTRL_PARAM1_VGH_330_DIV | - MCS_PWR_CTRL_PARAM1_DEFAULT, - MCS_PWR_CTRL_PARAM2_VGL_410_DIV | - MCS_PWR_CTRL_PARAM2_DEFAULT); - - mipi_dsi_generic_write_seq(jdi->link2, MCS_PWR_CTRL_FUNC, - MCS_PWR_CTRL_PARAM1_VGH_330_DIV | - MCS_PWR_CTRL_PARAM1_DEFAULT, - MCS_PWR_CTRL_PARAM2_VGL_410_DIV | - MCS_PWR_CTRL_PARAM2_DEFAULT); - - return 0; + mipi_dsi_dual(mipi_dsi_generic_write_seq_multi, + jdi->link1, jdi->link2, dsi_ctx, + MCS_PWR_CTRL_FUNC, + MCS_PWR_CTRL_PARAM1_VGH_330_DIV | + MCS_PWR_CTRL_PARAM1_DEFAULT, + MCS_PWR_CTRL_PARAM2_VGL_410_DIV | + MCS_PWR_CTRL_PARAM2_DEFAULT); } =20 static int jdi_panel_prepare(struct drm_panel *panel) { struct jdi_panel *jdi =3D to_panel_jdi(panel); + struct mipi_dsi_multi_context dsi_ctx; int err; =20 /* Disable backlight to avoid showing random pixels @@ -231,88 +206,36 @@ static int jdi_panel_prepare(struct drm_panel *panel) * put in place to communicate the configuration back to the DSI host * controller. */ - err =3D jdi_setup_symmetrical_split(jdi->link1, jdi->link2, + jdi_setup_symmetrical_split(&dsi_ctx, jdi->link1, jdi->link2, jdi->mode); - if (err < 0) { - dev_err(panel->dev, "failed to set up symmetrical split: %d\n", - err); - goto poweroff; - } =20 - err =3D mipi_dsi_dcs_set_tear_scanline(jdi->link1, - jdi->mode->vdisplay - 16); - if (err < 0) { - dev_err(panel->dev, "failed to set tear scanline: %d\n", err); - goto poweroff; - } + mipi_dsi_dual(mipi_dsi_dcs_set_tear_scanline_multi, + jdi->link1, jdi->link2, &dsi_ctx, + jdi->mode->vdisplay - 16); =20 - err =3D mipi_dsi_dcs_set_tear_scanline(jdi->link2, - jdi->mode->vdisplay - 16); - if (err < 0) { - dev_err(panel->dev, "failed to set tear scanline: %d\n", err); - goto poweroff; - } + mipi_dsi_dual(mipi_dsi_dcs_set_tear_on_multi, + jdi->link1, jdi->link2, &dsi_ctx, + MIPI_DSI_DCS_TEAR_MODE_VBLANK); =20 - err =3D mipi_dsi_dcs_set_tear_on(jdi->link1, - MIPI_DSI_DCS_TEAR_MODE_VBLANK); - if (err < 0) { - dev_err(panel->dev, "failed to set tear on: %d\n", err); - goto poweroff; - } + mipi_dsi_dual(mipi_dsi_dcs_set_pixel_format_multi, + jdi->link1, jdi->link2, &dsi_ctx, + MIPI_DCS_PIXEL_FMT_24BIT); =20 - err =3D mipi_dsi_dcs_set_tear_on(jdi->link2, - MIPI_DSI_DCS_TEAR_MODE_VBLANK); - if (err < 0) { - dev_err(panel->dev, "failed to set tear on: %d\n", err); - goto poweroff; - } + mipi_dsi_dual(mipi_dsi_dcs_exit_sleep_mode_multi, + jdi->link1, jdi->link2, &dsi_ctx); =20 - err =3D mipi_dsi_dcs_set_pixel_format(jdi->link1, MIPI_DCS_PIXEL_FMT_24BI= T); - if (err < 0) { - dev_err(panel->dev, "failed to set pixel format: %d\n", err); - goto poweroff; - } - - err =3D mipi_dsi_dcs_set_pixel_format(jdi->link2, MIPI_DCS_PIXEL_FMT_24BI= T); - if (err < 0) { - dev_err(panel->dev, "failed to set pixel format: %d\n", err); - goto poweroff; - } - - err =3D mipi_dsi_dcs_exit_sleep_mode(jdi->link1); - if (err < 0) { - dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); - goto poweroff; - } - - err =3D mipi_dsi_dcs_exit_sleep_mode(jdi->link2); - if (err < 0) { - dev_err(panel->dev, "failed to exit sleep mode: %d\n", err); - goto poweroff; - } - - err =3D jdi_write_dcdc_registers(jdi); - if (err < 0) { - dev_err(panel->dev, "failed to write dcdc registers: %d\n", err); - goto poweroff; - } + jdi_write_dcdc_registers(&dsi_ctx, jdi); /* - * We need to wait 150ms between mipi_dsi_dcs_exit_sleep_mode() and - * mipi_dsi_dcs_set_display_on(). + * We need to wait 150ms between mipi_dsi_dcs_exit_sleep_mode_multi() + * and mipi_dsi_dcs_set_display_on_multi(). */ - msleep(150); + mipi_dsi_msleep(&dsi_ctx, 150); =20 - err =3D mipi_dsi_dcs_set_display_on(jdi->link1); - if (err < 0) { - dev_err(panel->dev, "failed to set display on: %d\n", err); - goto poweroff; - } + mipi_dsi_dual(mipi_dsi_dcs_set_display_on_multi, + jdi->link1, jdi->link2, &dsi_ctx); =20 - err =3D mipi_dsi_dcs_set_display_on(jdi->link2); - if (err < 0) { - dev_err(panel->dev, "failed to set display on: %d\n", err); + if (dsi_ctx.accum_err < 0) goto poweroff; - } =20 jdi->link1->mode_flags &=3D ~MIPI_DSI_MODE_LPM; jdi->link2->mode_flags &=3D ~MIPI_DSI_MODE_LPM; --=20 2.49.0 From nobody Mon Oct 6 20:59:30 2025 Received: from mail-pf1-f174.google.com (mail-pf1-f174.google.com [209.85.210.174]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B44B71FBEB0 for ; Thu, 17 Jul 2025 06:58:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.174 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735497; cv=none; b=RCLBMOsVHM0KLnMhvEY6B5ADr7pFarpZJ3yKW91JWUk44sLYFoLepvPBtTTwPNathA7adklaLkuQGFYLaetL64bl0Rs9fnVr9+7RO5DlB7/9ABx/pkil/xhfJYikX0cYAd43F1qM+cWmv1gWMtqDlhaZMUuQPASSxhBf4eNvqCE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735497; c=relaxed/simple; bh=x5tLs/vytXfpBM/X8/ZZ8tUWpkDQaZkbiuvJuIXmb/0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=G3BQEGSEvw3f1tpu/wzEnUCi71i0W7Lqgj4+WciotTnx/rxxWx5oSk5XrA04LGvuQ6l4tIQyYc9qio3274FCHUzh4zRFXvSc1lNE41eEHrANkhBv6wKGuXoJynXRC8r3q1fa1+J2R3AmEQR2VcUUXOAEFO2rsUp9s10iNssHUBQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com; spf=pass smtp.mailfrom=brighamcampbell.com; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b=mTfG6zlj; arc=none smtp.client-ip=209.85.210.174 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b="mTfG6zlj" Received: by mail-pf1-f174.google.com with SMTP id d2e1a72fcca58-74264d1832eso909873b3a.0 for ; Wed, 16 Jul 2025 23:58:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752735495; x=1753340295; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=CcDUtidcIz4q2tNw/LqIMZV2WGjfWu8YabyIVvd6cck=; b=mTfG6zlj/09Mpu3ycSk4JTmMthedUHfPWxbrojFMj7Vpo5djN8woj8mP8JyX+ha9gA WC6HT8aEtkDwx9/pJHVG2lNpV+IFFslvxAn61zDhzXXurCZsxrspgk7ILPC7lp2U4208 qvSVMnl0MPvekl21+XpBjvqQI2ufZw41+6/Po8moI9deMIXc+IbZ68gr0Iatp2ljhKYi 7ZG9UqJwNDTj7GX1Kh7rYBKmYiz/arI8RjrNDRRdlqYikJ9nxm/xRhKCXPHOq/3EIW4F 0AiQPBy7buKdKs1Z6PFvMkDuoMsnu+OLaj3P9OV0itcpPt9IyYXtSgmt2OMA5leJ02EX WS/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752735495; x=1753340295; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=CcDUtidcIz4q2tNw/LqIMZV2WGjfWu8YabyIVvd6cck=; b=ky7rbU6ygNNZg4eIKUiubBsAdmDz6Wq2d2/CDBU626E7ysx+MO8U7neLBEhNmsYEu3 gTtl5uNMlMmuin7TBUFtExp2I6ccoP3L0YsSsScPRUDTuljQGdwcR8C2Sz+AGD6zbam2 Gdu190e1gU0GsJ3rFMnnz8ugzso4OX6/xUrms5m1Hux95NV+2Ns7mELv3q51PnNBdzdx XZjPUFk7inx5D9o/0FVtEAhnZtAiHqfKauzyXoWDPd1vrnNgtSdTlbT2QE+lm+Ybm5ZG VkatTrF2uYOqnrsn07qvynjCG4LnqSyCnC7owajxPlTJx6TxXDwD8qfWXHPTELbuyu/h iyAw== X-Forwarded-Encrypted: i=1; AJvYcCUYeFJxPqX74PILG3kesjFCWK9FGVejy9RiarZ+/8K8G6T3kSlJeGl3EdqmdLW2mCVw5IcEpq1WeW8XuHo=@vger.kernel.org X-Gm-Message-State: AOJu0YyW5ymrgkulQPN+4u16HMzXdOUJ/s0JfMAGJQNotl4IkS5fE2Pv XnwoenkDj71MxW+GHikJIOTsJ+3CJRWTj62paFwxbi97yd6gWxraixdA4zbgGRwRxPo= X-Gm-Gg: ASbGncvc2YEzHP7b0ZJEmXmi0Yeps6AGsWH0D8HqZasTMAghT4M7ASz9r5E3LFQSKe3 Y3oht+9oQ6TSYN6lZLWWZ2FZfl1i8EqCFz/V0zjMqKc54AN0eRwBZFFKegwhDq9y9ojfE4ZbCUu 5WyjsybMyj1fHieFBvD1TvF5MFAz1zt9+KUNbsM0vwBWXv2m+Byjm5BgO9q3jYzVKoGBcOIRHCJ EzUCwi8X5sEjFPABeGa4GoxTdDqfAdhoF3U5B/PED9i9aXxqFN8oceHcJCnqmgNPu75ON/rwnYr 3RTRo7BJk7mnad/4QjO2Vp6rB2FKMuwTzqU07w5TzC6LF0BY1iEn21S5gsqNxV1h16IXezZgm0d fwuGemoD0rhtTNnQrlI7V4SG44Zg/J7P7JSLtsRTJLLEsrK8uNeBHwQ== X-Google-Smtp-Source: AGHT+IHtXjv1j8/b35hlWwb7zAfmQUs+V6Fqss1rT4O/h1FVsmO78slSmyNXzYvHuFstjqrEM2uOFg== X-Received: by 2002:a05:6a00:188f:b0:740:9d7c:8f5c with SMTP id d2e1a72fcca58-75725589c70mr7614496b3a.18.1752735494900; Wed, 16 Jul 2025 23:58:14 -0700 (PDT) Received: from mystery-machine.brighamcampbell.com ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9f4bc51sm15157293b3a.116.2025.07.16.23.58.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 23:58:14 -0700 (PDT) From: Brigham Campbell To: dianders@chromium.org, tejasvipin76@gmail.com, diogo.ivo@tecnico.ulisboa.pt, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter Cc: Brigham Campbell Subject: [PATCH v3 3/4] drm: Remove unused MIPI write seq and chatty functions Date: Thu, 17 Jul 2025 00:57:55 -0600 Message-ID: <20250717065757.246122-4-me@brighamcampbell.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250717065757.246122-1-me@brighamcampbell.com> References: <20250717065757.246122-1-me@brighamcampbell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove the deprecated mipi_dsi_generic_write_seq() and mipi_dsi_generic_write_chatty() functions now that they are no longer used. Reviewed-by: Douglas Anderson Signed-off-by: Brigham Campbell --- drivers/gpu/drm/drm_mipi_dsi.c | 34 +++------------------------------- include/drm/drm_mipi_dsi.h | 23 ----------------------- 2 files changed, 3 insertions(+), 54 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index a00d76443128..3b8ff24980b4 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -772,41 +772,13 @@ ssize_t mipi_dsi_generic_write(struct mipi_dsi_device= *dsi, const void *payload, EXPORT_SYMBOL(mipi_dsi_generic_write); =20 /** - * mipi_dsi_generic_write_chatty() - mipi_dsi_generic_write() w/ an error = log - * @dsi: DSI peripheral device - * @payload: buffer containing the payload - * @size: size of payload buffer - * - * Like mipi_dsi_generic_write() but includes a dev_err() - * call for you and returns 0 upon success, not the number of bytes sent. - * - * Return: 0 on success or a negative error code on failure. - */ -int mipi_dsi_generic_write_chatty(struct mipi_dsi_device *dsi, - const void *payload, size_t size) -{ - struct device *dev =3D &dsi->dev; - ssize_t ret; - - ret =3D mipi_dsi_generic_write(dsi, payload, size); - if (ret < 0) { - dev_err(dev, "sending generic data %*ph failed: %zd\n", - (int)size, payload, ret); - return ret; - } - - return 0; -} -EXPORT_SYMBOL(mipi_dsi_generic_write_chatty); - -/** - * mipi_dsi_generic_write_multi() - mipi_dsi_generic_write_chatty() w/ acc= um_err + * mipi_dsi_generic_write_multi() - mipi_dsi_generic_write() w/ accum_err * @ctx: Context for multiple DSI transactions * @payload: buffer containing the payload * @size: size of payload buffer * - * Like mipi_dsi_generic_write_chatty() but deals with errors in a way that - * makes it convenient to make several calls in a row. + * A wrapper around mipi_dsi_generic_write() that deals with errors in a w= ay + * that makes it convenient to make several calls in a row. */ void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx, const void *payload, size_t size) diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 32da8861f9de..526308e24f6c 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -285,8 +285,6 @@ void mipi_dsi_picture_parameter_set_multi(struct mipi_d= si_multi_context *ctx, =20 ssize_t mipi_dsi_generic_write(struct mipi_dsi_device *dsi, const void *pa= yload, size_t size); -int mipi_dsi_generic_write_chatty(struct mipi_dsi_device *dsi, - const void *payload, size_t size); void mipi_dsi_generic_write_multi(struct mipi_dsi_multi_context *ctx, const void *payload, size_t size); ssize_t mipi_dsi_generic_read(struct mipi_dsi_device *dsi, const void *par= ams, @@ -379,27 +377,6 @@ void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_= dsi_multi_context *ctx, u16 scanline); void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx); =20 -/** - * mipi_dsi_generic_write_seq - transmit data using a generic write packet - * - * This macro will print errors for you and will RETURN FROM THE CALLING - * FUNCTION (yes this is non-intuitive) upon error. - * - * Because of the non-intuitive return behavior, THIS MACRO IS DEPRECATED. - * Please replace calls of it with mipi_dsi_generic_write_seq_multi(). - * - * @dsi: DSI peripheral device - * @seq: buffer containing the payload - */ -#define mipi_dsi_generic_write_seq(dsi, seq...) = \ - do { \ - static const u8 d[] =3D { seq }; \ - int ret; \ - ret =3D mipi_dsi_generic_write_chatty(dsi, d, ARRAY_SIZE(d)); \ - if (ret < 0) \ - return ret; \ - } while (0) - /** * mipi_dsi_generic_write_seq_multi - transmit data using a generic write = packet * --=20 2.49.0 From nobody Mon Oct 6 20:59:30 2025 Received: from mail-pf1-f172.google.com (mail-pf1-f172.google.com [209.85.210.172]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B0CFB21D5A9 for ; Thu, 17 Jul 2025 06:58:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735499; cv=none; b=sXCvAZTCA2FZfC3d28kvbyYgb48BSz0xQtaAXfMvRG07vsV/oy85XkL5uoqxc7zoMFIdS3EJXybLbbL+XBP3X/sUoByXgIzqUpxIt6m+ZFNHZ5r3Hl3uSZIdtIjeOZum1z/sjF2IMXYvAKbWmbaTxzDdDRS0y6HYeV3fvdQVZFI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752735499; c=relaxed/simple; bh=8gILEV2wshZruF7SjKc8/Her8leo7VCCobv+IxEo+ak=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fXWVu6TJx7ImiCptjXZb3BFCf9dC1gdQ1TVpa7gPtqerwCVoe8hYgFgtWVRTDpVtq2l1pNZEiiO+Y8dNq1EOdAifAANO2NnKibYx+T3pWK0HOqDt0i08s2hRCYNiB2OqjSvqcELW/rv9Fg3LLs3it3W2EKJ7VLgixGAN9WJb88s= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com; spf=pass smtp.mailfrom=brighamcampbell.com; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b=SMaSJhxe; arc=none smtp.client-ip=209.85.210.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=brighamcampbell.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=brighamcampbell.com header.i=@brighamcampbell.com header.b="SMaSJhxe" Received: by mail-pf1-f172.google.com with SMTP id d2e1a72fcca58-749248d06faso606231b3a.2 for ; Wed, 16 Jul 2025 23:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752735497; x=1753340297; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5D4Zj64qlLFOiqXv/wSX0OcGR87OOiTqr+HfIllhQOk=; b=SMaSJhxeldjocrMH6qUWGKj7vkdzFL7QvkT1+MtH7ZKBaTiztugLY3iCbUUjaNz3kl Vat4WVyZ9ZRihEmTQm99YzB3BO9ocr7SLOstUlOACt3HoOUOeVkfXjtYGE7Mik+rXAnq 0T1ppMpmX7pRLxaUv4peOiGsW9gIrQYSfqKYj0w9IVBr93/0+P9RqzEUTRK+LnXg78QT rysfBc3nQ0xF460Jqq2DTid1jdrz276SHYBfZJGnyC69IuzE69Wcos7q68IwZVLaaxja MlJIqvLlzu1uVUrCF0Ji26OEcUdXpaG0ARQXsoLAZCPnxGtxdfbSk+R46CsnTab/Xtn4 yx3A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752735497; x=1753340297; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5D4Zj64qlLFOiqXv/wSX0OcGR87OOiTqr+HfIllhQOk=; b=ZzNmBNJFKiSoh0DkfC2rEKl7bhoMWHrCCerkTyCTyJeNtEQdGE0lgGeDXKlh2SCCgD f6sdlFA0uAhs73wetF5JbKu26bf0iABg6PnuT8v9iAc0Uz49klYjmIYXiaMg1MgKPNAe Mvjg7lTriH/7kgIfYthV1lhwuMw02dBI0X6KhT2TWkcX/Ju5VYLB6wjjhbLvtHiIN5Tj JwNKVQdyR0tMbtnBN7REKFgmX+i4XeCyEg2cZkqVIMGqSkFk2cHMKag/uyYy17bc6CtR X2g+nha6sQE9jHtCirnCsnfeUvfsg3fzHVcfSWGWpSL2ObAv7HtxwixNG3mbbXjVxHbe a4AQ== X-Forwarded-Encrypted: i=1; AJvYcCV6tN1VCbhGCKKI/iPMTE5JwY5ejLybFTezB+mj/30mBuZEDUh6ul1Kfc+mdEDkU0HKreDU9yECJ39TSzw=@vger.kernel.org X-Gm-Message-State: AOJu0Yzt7yifALwD4Zp1rN5AiPm9huq/dn7XYwW6CIsHx1kzkqhPtZGi o/mqv3XHkyBggADNWCTm1q/Z+77IM5FA3G60uCzE7RN58YRa6SkweELyenhp7GLKAok= X-Gm-Gg: ASbGncujSIqWlCqco4iURdox4pCGUeUCYfuweGBxUrphYXL5Ho9eMLWR55Wlb2vL2xs Gg++C8SAGuh1B5YGFbxgoNirHacSaZeQ2Ynp0HKsTmCCrSzz9fPrzQCbB9laGOFbiRrSSod6i1i crDu7bVZtLYex87hZCIOCQ01f/uwO/jFKqqmWbzm9ZWB2WYbz97zONfEwnc8hYnGHi1t1u7Wuez 4M+KhTFKtEEaKhgF9UhDQ0QjeUNFFy4xpd5Xjuiai2NPWZ0gPWUC0iyoVDzYTyrWa4FTl4YILvs YGwZ9qSxTiYqPh80vK0bGb0t49ZqufEJY+7EaOc2Tl+wxq7gUQg9+F7S1vILezb1sihxbac8u4e tpNE8lN1bmp2hJV/X860pvtZ1D3+CcANLmn9ULiREAPinpNlkfl24MQ== X-Google-Smtp-Source: AGHT+IF4uL0UE6/IVMLL8a5IBc0w9BS0oX81DCNFSPt471frTtvJ5jahdDuVoKlFV7+0mFnbfKekmA== X-Received: by 2002:a05:6a20:6a10:b0:203:bb65:995a with SMTP id adf61e73a8af0-2390dc51b64mr2966437637.30.1752735496874; Wed, 16 Jul 2025 23:58:16 -0700 (PDT) Received: from mystery-machine.brighamcampbell.com ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-74eb9f4bc51sm15157293b3a.116.2025.07.16.23.58.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Jul 2025 23:58:16 -0700 (PDT) From: Brigham Campbell To: dianders@chromium.org, tejasvipin76@gmail.com, diogo.ivo@tecnico.ulisboa.pt, skhan@linuxfoundation.org, linux-kernel-mentees@lists.linux.dev, dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Jonathan Corbet Cc: Brigham Campbell Subject: [PATCH v3 4/4] drm: docs: Update task from drm TODO list Date: Thu, 17 Jul 2025 00:57:56 -0600 Message-ID: <20250717065757.246122-5-me@brighamcampbell.com> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250717065757.246122-1-me@brighamcampbell.com> References: <20250717065757.246122-1-me@brighamcampbell.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Update TODO item from drm documentation to contain more applicable information regarding the removal of deprecated MIPI DSI functions and no longer reference functions which have already been removed from the kernel. Reviewed-by: Douglas Anderson Signed-off-by: Brigham Campbell --- Documentation/gpu/todo.rst | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/Documentation/gpu/todo.rst b/Documentation/gpu/todo.rst index be8637da3fe9..92db80793bba 100644 --- a/Documentation/gpu/todo.rst +++ b/Documentation/gpu/todo.rst @@ -497,19 +497,19 @@ Contact: Douglas Anderson =20 Level: Intermediate =20 -Transition away from using mipi_dsi_*_write_seq() -------------------------------------------------- +Transition away from using deprecated MIPI DSI functions +-------------------------------------------------------- =20 -The macros mipi_dsi_generic_write_seq() and mipi_dsi_dcs_write_seq() are -non-intuitive because, if there are errors, they return out of the *caller= 's* -function. We should move all callers to use mipi_dsi_generic_write_seq_mul= ti() -and mipi_dsi_dcs_write_seq_multi() macros instead. +There are many functions defined in ``drm_mipi_dsi.c`` which have been +deprecated. Each deprecated function was deprecated in favor of its `multi` +variant (e.g. `mipi_dsi_generic_write()` and `mipi_dsi_generic_write_multi= ()`). +The `multi` variant of a function includes improved error handling and log= ic +which makes it more convenient to make several calls in a row, as most MIPI +drivers do. =20 -Once all callers are transitioned, the macros and the functions that they = call, -mipi_dsi_generic_write_chatty() and mipi_dsi_dcs_write_buffer_chatty(), can -probably be removed. Alternatively, if people feel like the _multi() varia= nts -are overkill for some use cases, we could keep the mipi_dsi_*_write_seq() -variants but change them not to return out of the caller. +Drivers should be updated to use undeprecated functions. Once all usages o= f the +deprecated MIPI DSI functions have been removed, their definitions may be +removed from ``drm_mipi_dsi.c``. =20 Contact: Douglas Anderson =20 --=20 2.49.0