From nobody Mon Oct 6 19:06:36 2025 Received: from mail-pl1-f181.google.com (mail-pl1-f181.google.com [209.85.214.181]) (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 67A682FCE02 for ; Thu, 17 Jul 2025 16:41:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.181 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770501; cv=none; b=nv2AsNH+lT+TPNnvcSgL+UZdomEflc3ifp11j4cMFK1vFIveEOIMAgPIWhE/V8Byw6YBPLGNROWNchlfV97mz29UqzrhCrnXPl0OFNfPinsaDQlj+rnscPri7nKjWJC/uoLErCrHf/nwPQ6kCgtma2THs1DALGqpChN/LXWE/pU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770501; c=relaxed/simple; bh=YLKILSjo4gQh4BZ0qx0l+2zG73ZqW4nHbnOsQdg4SY0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gy/tX6o26GzYCjUipbQOUbhmIJCMrzSVYWLYTkP9lb1X7FwJ/Zpk9f+JBGA8vcE8lKgxqs7contFesb8nlBAsUMQC3KEYy9kM6yDwXcr272zBnqMxSiPZq5on4peG7XVtiZUa4b1cA5noMjEfIsVSyTP1ZtiJBChB0rWbCOx5nM= 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=AV7FLX7y; arc=none smtp.client-ip=209.85.214.181 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="AV7FLX7y" Received: by mail-pl1-f181.google.com with SMTP id d9443c01a7336-234b9dfb842so10414395ad.1 for ; Thu, 17 Jul 2025 09:41:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752770500; x=1753375300; 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=QXRb/auSmvjfek8uJ1YIyvtZo0QCAaoEdhxcCrHaPWM=; b=AV7FLX7y+fV6nsu41mI21vh4QDqu723UcrRMzIKKYlDUGQxehIvaBqy6hxU3tmFrow WX+G939JthcDk6VDs4y+nwcBtmF3WUZzwEI2WFSslzcuTvYH7k4WkXagoGXcgGXU218R /zyGQva1033IZ4U2Lu87eVbEKUeDIPQ6eDaJ+foLcGtQDjZmar10g4m0ZU6LmK0lbkns 6qbo/ujOVu1juWUCnZu9eVR8qL3hHlpAL2YSTL/8xVjWdQbHL333AI4VkO3tAD34Mj7L OnbB43Z6Dz56/uccHtcaGAXqvju/JjBUdrPiQ5AHy6uyNm3Z4cTIaXddDg3jeL9NE9AO wMzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752770500; x=1753375300; 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=QXRb/auSmvjfek8uJ1YIyvtZo0QCAaoEdhxcCrHaPWM=; b=F+VVz5VtPVmMpV90Egpooc4GBggfPiknbwV9DHnmyCnaM1OyQC8YDI/bH3c2ACBKYn fqL6SGvbPjIGWEIu7TmOECfs0Y1iecangPI99vgSFhYcgS0gjdhjIVtfwOiliFJAbzQ8 DO57B5orJ7/rDOGxNw9e1IpEh8pS05LS+5t2x9E3WMH4zoVyOC6wORjy7K/q1exMP8Fz 0/opwNBlc8tq/EE0tYz5oHkRzGW1yOnsymcLV/HsAUAzv5wC7jRoU2ELnfC81GDsGPy2 lamME7WsN333zlVC8c5TjMeTHct5DbhANqR5L1Eppg5vMIBHZGclj7AFDmOK38HP26B7 s6kw== X-Forwarded-Encrypted: i=1; AJvYcCUNxGgQxMXT2iKsVQG44vgjekOIefmd/K7bybqmRqLjShUZXyUxCjl50emW8TzUh6GfKUQDP0tp3szp5r0=@vger.kernel.org X-Gm-Message-State: AOJu0Ywe/lTDy0Iw7qsZib5tU489eFTpAgx/J6QcyQ0hIiRmmXihbJqy /KTZ2QczI6DBY52GEhJep21jEiSIRZsdBWUDN66KMTYaTZq4GdCVDWMEcACRobDaHug= X-Gm-Gg: ASbGncsALZuOmWCaV8bEuFOxQotjc4f1fnTVkmBjN5TCKwUVFUPZvnI4+zvVFN/Wr9k yfVBQfPTklP5NBRRZmBbOYAehAhOLO7MZnAnBQ+93DxHWuONajtCfHiMvC+7GfevDyoYmQ5CxSL SKfyDFmk2x91njEykPRY4eAm1Gh8vWSsO4j1YZAhWgalhDv8bslFZKCUQ1K8sDfmpQzXg46+L1+ Lzd+gwmC8lW4N6EDKgObNweeBpRQITFcAUKCJRsWf6zdKhUqb1V9nX+rgEIM1HfDJYqtYO5wyIQ w9uSjxym+lwSqKo11FgbW+DFW5hbq+oxjFucBQtRZK9eKMBraAtjCoTXcu+7bREutC+XTiU2Rd7 6EFbYIIYSHsvx9iE7e1vM6PrWX0pH0kNdVVEX8cOw6NPRg4bUqFOYnoNu1k+e X-Google-Smtp-Source: AGHT+IHQUhEP8RVdomUjbzwvcSpmkLRrN2k+b3W2P/yZEwrE1afYAZj5NI3TgnCfzxILvDYUugHslQ== X-Received: by 2002:a17:90b:4e:b0:31c:15da:2175 with SMTP id 98e67ed59e1d1-31c9f47c6e9mr10439506a91.9.1752770499083; Thu, 17 Jul 2025 09:41:39 -0700 (PDT) Received: from mystery-machine.tail542cf.ts.net ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31caf7e8ae4sm1821750a91.24.2025.07.17.09.41.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jul 2025 09:41:38 -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 v4 1/4] drm: Create mipi_dsi_dual macro Date: Thu, 17 Jul 2025 10:40:49 -0600 Message-ID: <20250717164053.284969-2-me@brighamcampbell.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250717164053.284969-1-me@brighamcampbell.com> References: <20250717164053.284969-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 --- 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..03199c966ea5 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.50.1 From nobody Mon Oct 6 19:06:36 2025 Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) (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 311012FCE35 for ; Thu, 17 Jul 2025 16:41:41 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770503; cv=none; b=GuVW/0juQ81G9x0YGJTpEaWlDT3sjs0WrDNBqxRUDG4a2gd8H4WzdpLT7BYR+5GU+f7G7+S0WCivyaH0fCarVnveGJ6/aFwmaUvZsvAUtasi3ba8d9G7KqfAn+q4R2V0n5ZjozPJlH6+CPYKE2XZrQtws/p0q4aa0ZdMUbUTHb0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770503; c=relaxed/simple; bh=YJcap+yEvAid5W9WWkuP6Wec7Pqo1OzPt2QIGwIPW98=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=nmSy33B+7k/QEET1+I+6h1JLebtOauIo02GsCHckh5JhOqsuDEaLTVp6r1NvFhcqmVaS+ImET6ONC0aovdwRo9xwe6spBD00Lcq5DO7YIyZ3r7DGLlJQXQt6bL5SBBxk3FaJwrcBwfd6VbAFQH+A18JmPbyPnDLMFjySORO3zlE= 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=g3/IJL6A; arc=none smtp.client-ip=209.85.215.169 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="g3/IJL6A" Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-b3182c6d03bso1266412a12.0 for ; Thu, 17 Jul 2025 09:41:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752770501; x=1753375301; 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=ESsJwhHHQM2UwCSmgVX/iDa6sRNhhsQlObhdf5dpUJc=; b=g3/IJL6AnF9Df1NCcFrOqM7O2ITgP1Jj2KKoVLo88Hfz3v3EHUO+PT1KsVvSM4SJQA 8a9tk/DFogwUTZ3YnhTZB+FfUqm2NCsFiUaNpcTDxOMSu9mj8UlhwftHkGm0hbrVNB7t cTxE/ymjr+wHpLgQx+DbiyLK6euLxh5AUDyOc9EBoYjitOFFjgGH+aLZfi7RMfiTjDtV 4Bckt8gREex+CWUCJn26lts41HJ9yRCk/t4b3WeQs/3brpQRReZsGqhY0GWzgGyt7oIp vRmF/rPt4aUY8R90zE01bWy0Yi3jOYJeEm4kJCR+PQjoraCq9VVVTauQEBsEwz8Bplqn 7Xew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752770501; x=1753375301; 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=ESsJwhHHQM2UwCSmgVX/iDa6sRNhhsQlObhdf5dpUJc=; b=g6Ym3tWFSAzlI/Zm40Cgc0dt9SxIx2ZNha/IbQgwkAIg2AYS0Cgj6WMI2jNaFgcLk1 EB2hFL2yetkevi1QLd3jGpQ4hAXk4wIqPeu5tB+tY3E9SxXUPcIjEdQKmc1M5Rjn4sGb 5I3C6A/cftEFOqhIk0iJbVnYpxqtneTh8+78FiOCL6l1YZGBNa8DEDQ5Z1XOjYKNnGf1 V6KLvILm2X4KaHYqTPej6GkAGUwsKAl+fm5c5SX8Kl9SJB/xXNx8BopPflbX++DVD+cb /ndkoi0x57a7CjOHor98eLRQOS/IFEK67YfGBf8BeX0LuC2eV1OZd9N7OpZxby4PCnEG 5QuA== X-Forwarded-Encrypted: i=1; AJvYcCV8RCtXn5A7x2Ep/7lQ/XsQuI99MutvOSA6egNLymvUOw3eG/n4JZFLld6RryH1DqLgghFkoW2itd6AQ8k=@vger.kernel.org X-Gm-Message-State: AOJu0Yxh7f3J1V37aN9wW9t17scdk+WZlrcqRT/owl96SszhoOdvMquB DYJ8Z0J79Up44vnQkT9/2lfcY6/tw0zAvyNkAoY6a2XZ4OB+kRJ54gJNLFghXE32iQg= X-Gm-Gg: ASbGnctSfjH8UJFij9zRIYO1xCIyULxUKhPsTJVvLTrhnKuY8WB02xNztCJGbSvBcM6 azl7dCWjjU63c5VnCu5qa3QoJkLfeBVjRhTg2XHTJkoXUX4wfhuIR8rA2xTybjSKhzwS/zryPkI KY95zhDkfAxIfmpo9NMIgwF+GA4Xs3OOSXcPfg80snbGflVn+lnuPfMNcDTiPRt/jv/YZUPKsWQ FIBhWD0vMCoYur/TZYTRdBGV0hBnWvl1QkpCf4wnzxC0pTS/Gqpi92bou5AdvrWLoJ4nGDoyfM+ yC1+rk2C9ROz5RmPgKGOOk6dbith2jEBs6Xqe7dnxNLZIipKlGhCxqaRe9zNPhMPuH9O4LZeoPb sTr6IgOR4ZQGoGFuf0I39QjT3q7EEN+m1fNHMOjSqbmt4BycQAQ== X-Google-Smtp-Source: AGHT+IE1CeicV0sGbGU0VIzyRprxdceU7A8ofLGqRq5vhUsMS9h/1MhYpXvlkdqyMZ62HVrnUhNCVw== X-Received: by 2002:a17:90b:2682:b0:311:b5ac:6f63 with SMTP id 98e67ed59e1d1-31caf8db5aemr4794419a91.21.1752770501250; Thu, 17 Jul 2025 09:41:41 -0700 (PDT) Received: from mystery-machine.tail542cf.ts.net ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31caf7e8ae4sm1821750a91.24.2025.07.17.09.41.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jul 2025 09:41:40 -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 v4 2/4] drm/panel: jdi-lpm102a188a: Fix bug and clean up driver Date: Thu, 17 Jul 2025 10:40:50 -0600 Message-ID: <20250717164053.284969-3-me@brighamcampbell.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250717164053.284969-1-me@brighamcampbell.com> References: <20250717164053.284969-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 Reviewed-by: Diogo Ivo Reviewed-by: Douglas Anderson Tested-by: Diogo Ivo --- drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c | 197 ++++++------------ 1 file changed, 60 insertions(+), 137 deletions(-) diff --git a/drivers/gpu/drm/panel/panel-jdi-lpm102a188a.c b/drivers/gpu/dr= m/panel/panel-jdi-lpm102a188a.c index 5b5082efb282..9df67facdc47 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; -} - -static int jdi_setup_symmetrical_split(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; } =20 -static int jdi_write_dcdc_registers(struct jdi_panel *jdi) +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) +{ + 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); +} + +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 =3D { .accum_err =3D 0 }; 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->mode); - if (err < 0) { - dev_err(panel->dev, "failed to set up symmetrical split: %d\n", - err); - goto poweroff; - } + jdi_setup_symmetrical_split(&dsi_ctx, jdi->link1, jdi->link2, + jdi->mode); =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.50.1 From nobody Mon Oct 6 19:06:36 2025 Received: from mail-pg1-f179.google.com (mail-pg1-f179.google.com [209.85.215.179]) (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 48F8C2FCFF2 for ; Thu, 17 Jul 2025 16:41:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.215.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770505; cv=none; b=hpXSBGJu+UFlWQbaBLP3sKVS8z0dZgX284MoBi9Srw5w1Jy5rfEMzQa7jnHG0OC6Afsb4rZnuszbeQmswnnPo4GbYMKeZAbhlwP9+nLiY/Sm/pFCMlOtKxDMii19zbhuexLGLqbi6vfTHXmrU79qmBW2IoT1y/SqUaX5aqWN8co= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770505; c=relaxed/simple; bh=qGfGL9bbADl7T/84kq26vlHmw3OgWOMa60LT2BU8GRY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mQmmN9RyTpHD73kzveVvw69upZz/PXE5jRquFULJCQy9nVuS4pRECJ2/s0NIsrqotQyial31pbNxiYyBMX12FndDGL+TpIL8KhsfYI6qN0/gNDLfaOSyZFUelf1KcZ0DFku9uEiB+JN348bxRZaE8dRVw/QoF2GzY0F3stbkiTk= 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=FQtJ3Me2; arc=none smtp.client-ip=209.85.215.179 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="FQtJ3Me2" Received: by mail-pg1-f179.google.com with SMTP id 41be03b00d2f7-879d2e419b9so769805a12.2 for ; Thu, 17 Jul 2025 09:41:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752770503; x=1753375303; 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=y6U6F7ktOHhXsfwCj268J79W4P9Jk1oA5CQY0LkezaM=; b=FQtJ3Me2xPjLMk6an4OaoO6H0mEvHBvRTVV+LU57f1hxv865PXs8bLIyEKsQVL6dAj s22lJnDlLnYkDRaYOibS6Is2noxUv9WdfH5Ypz1I5KpQk1JJybZy/nqGeFkWh5Dglw+2 ao9bHX9/jpa6ccJjMd3BFYvlSXjl1l/08NMQeTYIfzREiapeDhlvDr2Dd7svcOH/jWO9 lbuVwwpGTA5D+hzJmF7IfbgaI/8hECjCaa4SGRWX1WzMjpsGoZ4LmnhM5FI+fWmdFOVN chachtScXCJC+JicHiWaxtn49IJNHRkxuviMo6HEYfcC47C2giff8VdTBWP9Ju6FlTfV ku6Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752770503; x=1753375303; 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=y6U6F7ktOHhXsfwCj268J79W4P9Jk1oA5CQY0LkezaM=; b=u1DKm/mjV5SacZp2esuKoswiNtCm4Psmjm0RgIMNPNXqz+BgvJ86GDX4E1jd+eCVIY hCx/gaPFGpcSed/YjVZdHnyaI0As1ClDqoQNY4peZ50bLiwso8nAndORnRGLKKop5BbT QF4q6S9ZtQdj9QEGPCy4/h7EU7MURWhpqvC5xGPfm2lwh4bcXC2tuAg8Gjc/8toFCWQ4 wC760CPPE9VQBV1pADreEEDN70Ob6grS5iCnBYCq+K/6RHh5lF/b7HsI90mSZX7vq3ge MLpbFOD/ZOCLAWCQ2H9286cpv1DrpNWJpB7Vcaqgl/9Ihai3ZrQ4TWf+NrrAjEfiDLOT 2yfw== X-Forwarded-Encrypted: i=1; AJvYcCWIbgaUab+cDCgiNE3p2giz+6aCxHW7/Pec1hukQ3OJYCK4Rz79yPTGYwrlL+U3mcuEcoLeAF2AcDJYUCE=@vger.kernel.org X-Gm-Message-State: AOJu0Yzio7TS/j3xfcRxIA68mmpjD6CETTUpt2xoo6BqwL9k6hCxjYsZ 3P3rs75NCvo+S2sRPLBXZc+9ymexAzDoS1fmbXSMLLY58SrIX+PqqIWnuV30xdWLJ34= X-Gm-Gg: ASbGnct8s+rQ3iM+ZCrlhMDnbZJNQPbvoppeCSADxSHMXGl3WuWphmSnCiTG0KgkH6f 7tPxLdgBZ3k4RW1Brl6KMQ4jYthBXFc2qypgxRdC/d1Zx3y36Eu4SdvNcmgv4c9qQjYPuFjX6VO 2/oLz25krc+sm1YQuNBy/mbk3uWhW8q1R9EusPRgtSM4dQsbmdsA8QdWgNzJubuhODJMuQHKkPx +pM8AV6QPcNiP6nUZRAr79sTvJnKg/ZNs6+ZAWnBvu4+NqaiNccoci3c0JG7t8j4jqTrLrcPSnv UArKucJafFjgBZuq+52h7vtkHhoXtXuPP5VsWKO2SqwC7/a9/PYeEA5Coha/1gBLP3Fb2nNQ7gI lfbfLVWkpr5itBBQAyxAM8TzDvzlLxXY1nIlZU0Y6MyaRGrnoAA== X-Google-Smtp-Source: AGHT+IEtjvc3xhBloO4ZME3CaseiMwB11gSyKFagdHpdQow/ZgQmvELeyGJVwsRPmXNuF5C1d/10Og== X-Received: by 2002:a17:90b:2542:b0:311:d670:a0e9 with SMTP id 98e67ed59e1d1-31c9e75ba9dmr10555061a91.21.1752770503322; Thu, 17 Jul 2025 09:41:43 -0700 (PDT) Received: from mystery-machine.tail542cf.ts.net ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31caf7e8ae4sm1821750a91.24.2025.07.17.09.41.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jul 2025 09:41:42 -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 v4 3/4] drm: Remove unused MIPI write seq and chatty functions Date: Thu, 17 Jul 2025 10:40:51 -0600 Message-ID: <20250717164053.284969-4-me@brighamcampbell.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250717164053.284969-1-me@brighamcampbell.com> References: <20250717164053.284969-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 03199c966ea5..1ab28fd70c8a 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.50.1 From nobody Mon Oct 6 19:06:36 2025 Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) (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 142EE2FD599 for ; Thu, 17 Jul 2025 16:41:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770507; cv=none; b=oCJWZlnBcG1lh3eAFEtb6ITZ+6aE+MQone3PVhgSAQNc2+BNcNrRveedtUyHRdc407CSNuOXRIsyatd2W5Qq8/0J2txsLiC+6JB4uwqN7wBB0ioEsLXaFb3dml75ii2KErqTzkZyyzIMWW3Q/+069ZQ6pF8ef/7rHmW24ZQ0GAs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1752770507; c=relaxed/simple; bh=7Eifg3KSSA5Jt2qx/3hzXf0HaiUdAumge8P2aIN3a9M=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=c8vDXJ4YSc/BJSrXJbbpAXRTiC7piVh+inA5CF+/9Fd/zWKDFTd6eKEYoyx3yIEnJqIdsUwBBNaFIMNbIl8yBSIiLGlT7/W89wJT1iBYpc1QBBKqQga9G/wfU9TcA1jjHwbgLWOO3ElSaix5pVs7B4vElwTGbiPC5BAu5pEoDsk= 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=if6D8a1g; arc=none smtp.client-ip=209.85.210.169 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="if6D8a1g" Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-7481600130eso1596354b3a.3 for ; Thu, 17 Jul 2025 09:41:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brighamcampbell.com; s=google; t=1752770505; x=1753375305; 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=4rHylqCjx1w2oDPs7/xM2Riq8NSJ9PhhkdUN4+cutX8=; b=if6D8a1gGyEUOtJ8l2uYCWsiyyKsNSl+YqtpTUMMmzyycSnOVza6Z8eLkBqKBN6/b9 zCOx09Ew/HXJXBAipKIicZwKlS/oT4gU4owPhrTGQ8wYppHhNEr6fWvyGkgc0wYwMQTj mrBdqA+iXNuhmidoybQfhTERr2xczFSZW1yjVpb3Vey0FZsQiq2aFZuMrhWyVj2hqWMU Ks9yzlHOU8omBDH7Pb8zXigM2KTeayMHcKoY1kF8JFageEfj/KkYSe8/VSZVx/8zZ2/U FD/mylIO1Pj+FKnOJOXsn7kkWRXo8qsisJtCayt+oYk7qP/X1Zsgzee7HfDZekO6WXzE 6VSw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1752770505; x=1753375305; 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=4rHylqCjx1w2oDPs7/xM2Riq8NSJ9PhhkdUN4+cutX8=; b=ZMWNeY2KMKPdAWQ3JMArPkZUAaLGWo+FCteii0z+vh79ssw4paFW9rnFnm5F5wxKin dcocEBq9W9P3P2fWo1VjXDCQNg3DCYbuPx+E/XE2yqnrgCQRzPF6pV7V+4lxyAjkfK5F yWWa1hTE4EXLItFyJLDvgqZnBOFt8tqzNSEA1JXZMrrI2N7GwIwBjhPQhup+ZERBN4Jx 1JfZjihsPWPO6ywAWQKChQey9FM5pBiz8MdJrggtL7fdBAJHyaNQFAbtSuU3cP+WnI7E D2xtrdHLP8fDFVjPfL3NzUeOJbBMAfOeYC6q16p6mh9+e1piMVooVPfmdLzKvg2ZZI0V H4Xw== X-Forwarded-Encrypted: i=1; AJvYcCXHVO4v0oSpag4Zh8zCO29Ik9VW6do/uELO3O6X4vKNuzAhhCKHgm/E4Rr3bvSKZFQqWD/X4tHyevSGLAM=@vger.kernel.org X-Gm-Message-State: AOJu0YyH6LqGonqDS8LnNMHTRewX7GeA2LMaEwa4rGxbu5Vzt46Yombz pkW8sz3hKDGkXJExVovPbZx/bspdgiOZ83KDw/MrWTBNS7XREmQ6J9Lhz0n5aevgvSw= X-Gm-Gg: ASbGnctfGwgKW+Hsnsg2YbyNmoxzBw1LdPbHqQW730M7XifvwBwoJDnqvV7qpOaD354 HdB3Ir2OfPrzfN9atNj2Upq+3NQjuU4G8WIkeLch3k3y1yFKVnDJfBrh0SHZBc72HDVmxjVOMR1 d561ElCz8o6dtke8CiGul+cj/LqD9KxsTw4trMOD8cEIvCeIjcQAmjoAvK8BefIXZlHmma9+quV +lRizQ9p/FDIE+q22e/UlmSz5cLfum+0WyuUtonUvRYZ2CgJFUQXHZOmw0+uyL9HpcndCMUtoPO 3gl+6/fH9W51+njQ3f7pDbjdxvXvYlAd+0rfW3g4SeOQmERY57uUYAvcq1yoosUiIUtrNbDV63v x3cuYNr8PL13a8WwwcbReI0Q3CiAPEW5BCVngnAWoRQMs4nnLfw== X-Google-Smtp-Source: AGHT+IHrQlGV1Z7kY2qfK70zL4oggkzABvGWlF/G0WdpxXkZbFgRb1/eSGO9ppbowS9YeBigJnqdWA== X-Received: by 2002:a17:90b:4985:b0:312:25dd:1c99 with SMTP id 98e67ed59e1d1-31c9f45e1d0mr10064867a91.19.1752770505309; Thu, 17 Jul 2025 09:41:45 -0700 (PDT) Received: from mystery-machine.tail542cf.ts.net ([64.71.154.6]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-31caf7e8ae4sm1821750a91.24.2025.07.17.09.41.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 17 Jul 2025 09:41:44 -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, David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Jonathan Corbet Cc: Brigham Campbell Subject: [PATCH v4 4/4] drm: docs: Update task from drm TODO list Date: Thu, 17 Jul 2025 10:40:52 -0600 Message-ID: <20250717164053.284969-5-me@brighamcampbell.com> X-Mailer: git-send-email 2.50.1 In-Reply-To: <20250717164053.284969-1-me@brighamcampbell.com> References: <20250717164053.284969-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.50.1