From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 50FF9C61DB3 for ; Mon, 9 Jan 2023 16:06:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232742AbjAIQGF (ORCPT ); Mon, 9 Jan 2023 11:06:05 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43594 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231586AbjAIQFn (ORCPT ); Mon, 9 Jan 2023 11:05:43 -0500 Received: from honk.sigxcpu.org (honk.sigxcpu.org [24.134.29.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 91F771CB1F for ; Mon, 9 Jan 2023 08:05:42 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id B784AFB04; Mon, 9 Jan 2023 17:05:40 +0100 (CET) Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ap3pjTtegw7V; Mon, 9 Jan 2023 17:05:38 +0100 (CET) Date: Mon, 9 Jan 2023 17:05:37 +0100 From: Guido =?iso-8859-1?Q?G=FCnther?= To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, Sam Ravnborg , Daniel Vetter , David Airlie , Purism Kernel Team , Thierry Reding , dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 11/13] drm/panel-mantix-mlaf057we51: Drop custom DSI write macro Message-ID: References: <20230107191822.3787147-1-javierm@redhat.com> <20230107191822.3787147-12-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230107191822.3787147-12-javierm@redhat.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Sat, Jan 07, 2023 at 08:18:20PM +0100, Javier Martinez Canillas wrote: > There is a macro for this already in the header, use > that instead and delete the custom DSI write macro defined in the driver. > > Signed-off-by: Javier Martinez Canillas > Reviewed-by: Sam Ravnborg > --- > > Changes in v2: > - Add Sam Ravnborg's Reviewed-by tag. > > .../gpu/drm/panel/panel-mantix-mlaf057we51.c | 24 +++++++------------ > 1 file changed, 8 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c > index 772e3b6acece..9243b2ad828d 100644 > --- a/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c > +++ b/drivers/gpu/drm/panel/panel-mantix-mlaf057we51.c > @@ -45,14 +45,6 @@ static inline struct mantix *panel_to_mantix(struct drm_panel *panel) > return container_of(panel, struct mantix, panel); > } > > -#define dsi_generic_write_seq(dsi, seq...) do { \ > - static const u8 d[] = { seq }; \ > - int ret; \ > - ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \ > - if (ret < 0) \ > - return ret; \ > - } while (0) > - > static int mantix_init_sequence(struct mantix *ctx) > { > struct mipi_dsi_device *dsi = to_mipi_dsi_device(ctx->dev); > @@ -61,18 +53,18 @@ static int mantix_init_sequence(struct mantix *ctx) > /* > * Init sequence was supplied by the panel vendor. > */ > - dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A); > > - dsi_generic_write_seq(dsi, MANTIX_CMD_INT_CANCEL, 0x03); > - dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03); > - dsi_generic_write_seq(dsi, 0x80, 0xA9, 0x00); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_INT_CANCEL, 0x03); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x03); > + mipi_dsi_generic_write_seq(dsi, 0x80, 0xA9, 0x00); > > - dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09); > - dsi_generic_write_seq(dsi, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x5A, 0x09); > + mipi_dsi_generic_write_seq(dsi, 0x80, 0x64, 0x00, 0x64, 0x00, 0x00); > msleep(20); > > - dsi_generic_write_seq(dsi, MANTIX_CMD_SPI_FINISH, 0xA5); > - dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_SPI_FINISH, 0xA5); > + mipi_dsi_generic_write_seq(dsi, MANTIX_CMD_OTP_STOP_RELOAD_MIPI, 0x00, 0x2F); > msleep(20); > > dev_dbg(dev, "Panel init sequence done\n"); Would have been nice to be cc'ed on the changes to include/drm/drm_mipi_dsi.h as well so one doesn't have to go and hunt for changes on lore.kernel.org. Anyway: Reviewed-by: Guido Günther Cheers, -- Guido > -- > 2.38.1 >