From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) (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 A8D3F303A1E for ; Fri, 17 Apr 2026 20:44:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.52 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776458642; cv=none; b=rfx/s6yhEK+cqbDEeQIzHPQo4h7bLWrdQ5nT4iD1YBb8n8Fywv/xoeZxBof+vuNYdYIhSfZcCvWP/rVw7QLYbB7VnFaOJAqK/KUNQpszFX2HxG8D+Ar527ZmRNqOSnv5BBcrJNtPELquO3cuZth4OUmeHqI+Unefa8g44PmIZyo= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1776458642; c=relaxed/simple; bh=cPARS+ZgJgf0Z5A8o1OykRKniobowKhoDgf+aI0vaVw=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=S6G4iOzmdGBPtNmam2iJ1zFQvIwLraC2FHE1sAFzIou8ttJXQObWbkMdREdpA3kLZN/0jtSgIadDOfYha9qDvg5W5W+w38jEDcWbtyiVj9sKmGnTXJ7/HpltHX244YFCNCn4X4Dndon1I0xb/bnL5OTjOcF+Dw0Kl/eSKqaQV+w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=V0lTTG0u; arc=none smtp.client-ip=209.85.128.52 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="V0lTTG0u" Received: by mail-wm1-f52.google.com with SMTP id 5b1f17b1804b1-488d2079582so12031455e9.2 for ; Fri, 17 Apr 2026 13:44:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1776458639; x=1777063439; darn=vger.kernel.org; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=GykXHjP8M0rUgHOGzpq0qNFdXJfF+fQqp16aXUB0wy4=; b=V0lTTG0u5UWji9oujltMgXZP66YnhLwwwhQNWNxGepJU40YaUBjLTdQ1s+jJx7/Q5g Br87QvkuC4wGTxGiiKoxC38jeGhw1wJi5nS1fktWpjutb0d2qQGicfsmUqUhGjn0cwbg 9nttVvG/JiD7gR+6+dJflE0RiGO/wCZzuTh8TRKOi5ynEdndxeJYoQjVyKUHnwZ0qoGu pkP6+dePAt0O1P/eW03Li4pWh3TqZ2B0bHeauWsi+HuF3IRAmZjOD4b4Iw3gexxOOXt3 0tpRF3oZj5Mr1IBHQzJmCnKwtRIoQy/lWeNEdH1zhuGOcsu73KywI9Y8RAClBP6QcXYe ybag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1776458639; x=1777063439; h=content-transfer-encoding:in-reply-to:organization:autocrypt :content-language:references:cc:to:subject:reply-to:from:user-agent :mime-version:date:message-id:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=GykXHjP8M0rUgHOGzpq0qNFdXJfF+fQqp16aXUB0wy4=; b=fOGfemOXO4dYnB9ufJDJyMHPcDGpH6vhQKyQUJoRk1uuVHoxpfD5ffz+n/NjYwmnD/ 3AKUjiolOSYXrT1/HuyeEYRkIFr/BKl0wBAxJ0O7ZHdgMPkgBstgyDXREjLJ4JDu7SFV tQdte1BXODZil8StCYlQx3JUZKUnrPhMPlhbkTOkTDz0E2qKqvGj8MlVRVvARRYKhW0Q hGkAjTTW42OamExHf4yEt5OlF2Dp9gbzBGHD3koBPnmwaXn4oegT1wZdLFb97Q5zM1Pn jccnyxlHFw7ggpl0WEaNX2sRSG61QyCE25tV/VzI/kwF6lqiYOtl5A7EZ+pkMNEM700A aeUA== X-Forwarded-Encrypted: i=1; AFNElJ9KQCrUGFA/4tWGfvgE/jHVo3mLFzrkS7CcXunkbNKwuu+34dE+38FCQKlSaPgbICDtdWZlLXj8xErBVno=@vger.kernel.org X-Gm-Message-State: AOJu0YzZgRmbJeFYYPrkcRSFewX+8XEjVgGuU3/E/BgwVtWGUMwpojEK 5QRv0BvHUqPSGCjg0KtWOmmfODnh/0trlj4s1cHye7NxmFtc5DuMMlsfGr8SxcAYZvo= X-Gm-Gg: AeBDietFV7RiZkK1jcC4ofOnPwgRyeZ/cqTd2WygZmy5hYuvq3P3uYgUR4ngyFrAf54 7MqRS+k4OmSZ60NMzu4CtoVCD3YRg1u5U/WeGHmFiAmOWBU0zjH0wsdwOnL5MxZjVONvaL0KayX XwqQrpXUeJoEaavpWYDBBD2CgpbtRZm5sVfIeJzlBLcxGVHzIBl0IE3jY4GM6tqclEqjIzrw52v iWTRvBd3uWJa/1sFCryausNUVYJneJST9PHjCX6nLU8Z1LxCa3hJs4+d8nfkJUvyzS9DYz051qs 12Z/ggtgX2LwdlTQxwr+CR9WCMiF+6pAo4+RmoGJBfQkyS96YEZf7Wa9AOAPTg52LghJx20aRn+ wYSaLTk/ObvYfqu3jP+/z/kw3k9Q/2QT9rR6yhJUADk/jtS7RZwUKmjGtJCw+0lW0XpZgie+aDF befOSFBlyZOhww1SQnA2oIOIjvuTdiLkig787IT7JulEqdzfTe2mTr9cxxwHcDB+sPv4NtbyFSI OUCEJmbjPGFsFMjBHOSZ4XXyw== X-Received: by 2002:a05:600c:3515:b0:488:8b99:54a1 with SMTP id 5b1f17b1804b1-488fb78e7c5mr57434415e9.28.1776458638883; Fri, 17 Apr 2026 13:43:58 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:5eba:ccd:a999:f2b3? ([2a01:e0a:106d:1080:5eba:ccd:a999:f2b3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-488fb6e0b15sm25517385e9.0.2026.04.17.13.43.57 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 17 Apr 2026 13:43:58 -0700 (PDT) Message-ID: <84c654d7-2777-49ba-a7e2-1f80e9efe7aa@linaro.org> Date: Fri, 17 Apr 2026 22:43:57 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: neil.armstrong@linaro.org Reply-To: Neil Armstrong Subject: Re: [PATCH v5 1/2] drm/mipi-dsi: add mipi_dsi_shutdown_peripheral_multi To: Avinal Kumar , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, dianders@chromium.org Cc: lumag@kernel.org, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch References: <20260417061842.66631-1-avinal.xlvii@gmail.com> <20260417061842.66631-2-avinal.xlvii@gmail.com> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sfqnIvMAxIMZrvcl9 qPV2k+KQ7q+aXavU5W+yLNn7QtXUB530Zlk/d2ETgzQ5FLYYnUDAaRl+8JUTjc0CNOTpCeik 80TZcE6f8M76Xa6yU8VcNko94Ck7iB4v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oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20260417061842.66631-2-avinal.xlvii@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 4/17/26 08:18, Avinal Kumar wrote: > 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 0390e14d3157..3ac1dd5ad640 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 mipi_dsi_multi_context *ctx, > } > EXPORT_SYMBOL(mipi_dsi_dcs_set_tear_scanline_multi); > > +/** > + * mipi_dsi_shutdown_peripheral_multi() - sends a Shutdown Peripheral command > + * @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 = ctx->dsi; > + struct device *dev = &dsi->dev; > + int ret; > + > + if (ctx->accum_err) > + return; > + > + ret = mipi_dsi_shutdown_peripheral(dsi); > + if (ret < 0) { > + ctx->accum_err = 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 = to_mipi_dsi_driver(dev->driver); > diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h > index 2ab651a36115..b429acde4f71 100644 > --- a/include/drm/drm_mipi_dsi.h > +++ b/include/drm/drm_mipi_dsi.h > @@ -393,6 +393,7 @@ void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx, > 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); > +void mipi_dsi_shutdown_peripheral_multi(struct mipi_dsi_multi_context *ctx); > > /** > * mipi_dsi_generic_write_seq_multi - transmit data using a generic write packet Reviewed-by: Neil Armstrong Thanks, Neil