From nobody Sun Feb 8 23:24:31 2026 Received: from mail-pf1-f176.google.com (mail-pf1-f176.google.com [209.85.210.176]) (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 D3793389E1B for ; Tue, 13 Jan 2026 09:15:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.176 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768295720; cv=none; b=YwRLC4i/B4OXs/0WE1jrb32e14G+XTMv82CMwtvHnEx3OIKvDFA7vrnpXa7tdsZhZ9N24BYunz+C2aYFZTK1qYMgEv/5EaTr6USJ4kVJaJHwAwXKZDWPMH1VV0KlLVx9w6EljSStlxJlA9nL2oHVfTlc/Z7VNU22zrt/nRRPExI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768295720; c=relaxed/simple; bh=v3jAiBEJn7vAxDoH2yol3SLXaN8RffezIx3USwQEx+E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gj/hSBX9b2Ks/Uh/Oax8mG96ab7mxPZVsKEbmbXpDwVZxaH2oiTfCMvhGgje4MDNXcz8Z3ducfqq15b97ni1PA+HG8fBUdpmhWfDnGNEYePEztY6ycuuCZZRb7CrEdbBPrm+M3VWCaMk6GARU+u548fV6Z2JBg8pbTyjB343aP0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=BnSg01Xo; arc=none smtp.client-ip=209.85.210.176 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="BnSg01Xo" Received: by mail-pf1-f176.google.com with SMTP id d2e1a72fcca58-81f4c0e2b42so1220630b3a.1 for ; Tue, 13 Jan 2026 01:15:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768295711; x=1768900511; 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=TeV4zYwioQYFbopOPsj4J7uWHWJWFLRD3srlD9O0MDI=; b=BnSg01Xoj1qY2E9dKEoxKSUcXVdDtr53yiSGtW28FJV83fKNT0bxUvfn7+jXTYw+Dr nBNOFUvC8WVRLFUtL7GxwADEVjRYYE9vvHwM4U5pCtAepHUdkBV5CPzLOyYJUHKFZvXL bbMe+uJiiw3hlYsBk0qPEuN1NhIXqfEhOEJrTfcPEidb9W4H1gw4dr2u8szNUqcPnyLn V7nrrsKidbA+/tz3RCQho2Ltrf2x5eD1CpcLvzTg1Z3DrF6wbBBfMLo/f3oGcy30bffO JtN0PriCAVcL+/JlPIhb9EC987qeZo5b9O6MrAYXF7EbDf7DEBpGwjtci85FphubtKGm yqWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768295711; x=1768900511; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=TeV4zYwioQYFbopOPsj4J7uWHWJWFLRD3srlD9O0MDI=; b=gSRShNAXcPk5BRKdEsTrgGazKblvNIvQHchP2yT2wuZ/OMQQGXfpnEJ/1ZvFs1RTAE x7kzcKdIFPhmkE7FSa8adGgBul+YoZjQTOzgzAu3zO432tsw9/8+ZsutEmB8quVHiBSK s7o0gxKS1bjr/EleDwLiyDxIu+yBKP4oXqE+g5fOTRO9Uy0/WhZUYvThsslrEAcJGtyL yG7fiB1J+nZ0GbIy+0UYY2rJbJof8TxLHBrg2/iBaPAbf8JIMwwdl5gsn2bWp4uAjX6X b+xSH0DpMiXEPIAaKUbib0fOTnfGlSGoDOV3ymTOAriFxNP6dOYVlKNooBd/b3vT948c 8tkA== X-Forwarded-Encrypted: i=1; AJvYcCVSAH2iVTMgnsZz2GLhECqgzEJyS1RWjqkEu6TI/otDeMvMnWcRKNtCJc5pHbXALRrMKE77Syj7dekdMlQ=@vger.kernel.org X-Gm-Message-State: AOJu0YzksFLIRoznW8CuQaHZy8zV/n5rEWCm33u0dDqX5JJBr8FE9Yby CYXTnRGMV72FJyMsAjQ0AHBLJOjISYg/i1wXfPP+xqzaUBXXsxfM6i0d X-Gm-Gg: AY/fxX4e6mqpbwjJjU65PPGqEuawW+lOTvy9f/zMbJ1JvuT5aZtefOoMk3LrZP3h9uw jIkzxscXmFcQ4sY1iic/W4lAcOIGHmwwU4KjuA9K+oM1WRcGsDWg7g6+36RravseNuW6OoYZqDo BGU/8V3VahOcX1S0CdX49PpgWd5oOAI2PX6C3M1iEDmK9+lsrWDYacDVs7XEzjRyhQUCmufZvau EptIJ8hcb4qEqCB2haNH+g0ERkmZ1s+tDYTTLNDY4FdCzZXRJIDSgVjkrb2qhA87dlAlQ9sgJgv TOQjP8T0KV9MX5NEuFMy72FRdysWPBBz7TncK2W5CVAsvw7tp+iVjcyK1rw5Gt1170dZVnexoUr odlKqp7Ct+byEtjPyTNY0/wZmMIQmq4xMpYHt10z/8CQK67vO8xI727ABOD1/sdl8oKrnSlxAqF BatPdccOazDQ2NNYsM1AwwIGKSuAwRYVzI+fZEI6FcOXk= X-Google-Smtp-Source: AGHT+IGOjyQTw0Ih7Qb69hqLQCSbnk63LdAPgggsqgRJYk8OjoQG7vB2vucKmHyYogNfcf6mNNfpWA== X-Received: by 2002:a05:6a00:3306:b0:81f:41c8:765d with SMTP id d2e1a72fcca58-81f41c87ee6mr7014615b3a.14.1768295711212; Tue, 13 Jan 2026 01:15:11 -0800 (PST) Received: from fedoraemon.neon-universe.ts.net ([2406:7400:11d:df08:2b25:2f22:316a:eb93]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-819baa1936dsm19832778b3a.12.2026.01.13.01.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jan 2026 01:15:10 -0800 (PST) From: Avinal Kumar To: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, neil.armstrong@linaro.org Cc: maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch Subject: [PATCH v3 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi Date: Tue, 13 Jan 2026 14:44:39 +0530 Message-ID: <20260113091440.43735-2-avinal.xlvii@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260113091440.43735-1-avinal.xlvii@gmail.com> References: <20260113091440.43735-1-avinal.xlvii@gmail.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" Add mipi_dsi_shutdown_peripheral_multi function and mark mipi_dsi_shutdown_peripheral function as deprecated. Signed-off-by: Avinal Kumar --- drivers/gpu/drm/drm_mipi_dsi.c | 28 ++++++++++++++++++++++++++++ include/drm/drm_mipi_dsi.h | 1 + 2 files changed, 29 insertions(+) diff --git a/drivers/gpu/drm/drm_mipi_dsi.c b/drivers/gpu/drm/drm_mipi_dsi.c index a712e177b350..2fed50172a44 100644 --- a/drivers/gpu/drm/drm_mipi_dsi.c +++ b/drivers/gpu/drm/drm_mipi_dsi.c @@ -587,6 +587,9 @@ EXPORT_SYMBOL(mipi_dsi_create_packet); * mipi_dsi_shutdown_peripheral() - sends a Shutdown Peripheral command * @dsi: DSI peripheral device * + * This function is deprecated. Use mipi_dsi_shutdown_peripheral_multi() + * instead. + * * Return: 0 on success or a negative error code on failure. */ int mipi_dsi_shutdown_peripheral(struct mipi_dsi_device *dsi) @@ -1980,6 +1983,31 @@ void mipi_dsi_dcs_set_tear_scanline_multi(struct mip= i_dsi_multi_context *ctx, } EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline_multi); =20 +/** + * mipi_dsi_shutdown_peripheral_multi() - sends a Shutdown Peripheral comm= and + * @ctx: Context for multiple DSI transactions + * + * Like mipi_dsi_shutdown_peripheral() but deals with errors in a way that + * makes it convenient to make several calls in a row. + */ +void mipi_dsi_shutdown_peripheral_multi(struct mipi_dsi_multi_context *ctx) +{ + struct mipi_dsi_device *dsi =3D ctx->dsi; + struct device *dev =3D &dsi->dev; + int ret; + + if (ctx->accum_err) + return; + + ret =3D mipi_dsi_shutdown_peripheral(dsi); + if (ret < 0) { + ctx->accum_err =3D ret; + dev_err(dev, "Failed to shutdown peripheral: %d\n", + ctx->accum_err); + } +} +EXPORT_SYMBOL(mipi_dsi_shutdown_peripheral_multi); + static int mipi_dsi_drv_probe(struct device *dev) { struct mipi_dsi_driver *drv =3D to_mipi_dsi_driver(dev->driver); diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h index 3aba7b380c8d..19ccdf5eeb5f 100644 --- a/include/drm/drm_mipi_dsi.h +++ b/include/drm/drm_mipi_dsi.h @@ -389,6 +389,7 @@ void mipi_dsi_dcs_set_page_address_multi(struct mipi_ds= i_multi_context *ctx, void mipi_dsi_dcs_set_tear_scanline_multi(struct mipi_dsi_multi_context *c= tx, u16 scanline); void mipi_dsi_dcs_set_tear_off_multi(struct mipi_dsi_multi_context *ctx); +void mipi_dsi_shutdown_peripheral_multi(struct mipi_dsi_multi_context *ctx= ); =20 /** * mipi_dsi_generic_write_seq_multi - transmit data using a generic write = packet --=20 2.52.0