Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10968235rwl; Mon, 2 Jan 2023 11:14:19 -0800 (PST) X-Google-Smtp-Source: AMrXdXtU/CKcv6xOFy0cBbIrdIqAeNzvHttICpCY8D0+PLLdaTN0dPgQZwMJMnJ6a/i7eIXB/+RX X-Received: by 2002:a05:6a20:4295:b0:9d:efbe:a0fd with SMTP id o21-20020a056a20429500b0009defbea0fdmr66003918pzj.13.1672686859086; Mon, 02 Jan 2023 11:14:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672686859; cv=none; d=google.com; s=arc-20160816; b=W9l2GZa1tJ7OAV3eEqPaYTONCANrsIt/FhFFiDPqN9Tc7JiCKo808hEh3A+P/DIoZp ndpWURpv3vwRTUVKsq45UFHOPD9TFqJ755CMLiC36WZWSXns10PCf5TL88jWxbC/NqjP d470sZEiyNX684bT7mHlbs90I6+NOPq1COsGvYzLCgLj3VcLh1YmOh29H0UtRvbj3k8R o4FH7Yc2rmSYUn2HHJoHlJHaPCeSB3qbYVUGfI2/+dtWk+paiuGUIU8AuY+hy7xz9aZ1 TZYzyhuX2iv+8YRX7I6xCAyXjg3Gk30iEtZ3EmBSOCjj/yk4cHJfFsCcw6HZftFXDzOe ZwCQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=OBlDSr4lhC00U7ExCtteVxPrZaOIkpheeh0gYpLqn8Y=; b=bIyahOWOyy/Ht+yKsCRzuXByjb1qThVLZYKSY3VmhcKxSaEITo6ezJG+xbqHsx+2Ii LMqvCD2Da0JiPb37yhtl3NmaBpMvUmer09pTUstL/sv8t+0Cv94ygtlJEEP8P70NUX08 9nSOZX7CpOOB8qpdYbWonbcVecB8okSlOPnNwoNZNu3noJZqWWTINGKWOq7RxTKhKV9I jUpe4xxjjE/lnrT0/kG2V14cBLDF3neySbodZBfeILlURSRTc3CG+v+gAFActrD6IOGV ZZqJNa9NO6duor0rkySHqsZDMF5nDby33KTLf5KhPxkxmBgEt27NFughEFpVk/JCpEnd tPpQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa2 header.b=Ensj31qv; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed2 header.b=4mKIzeSy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m65-20020a632644000000b004701a950fe7si23606045pgm.551.2023.01.02.11.14.09; Mon, 02 Jan 2023 11:14:19 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa2 header.b=Ensj31qv; dkim=neutral (no key) header.i=@ravnborg.org header.s=ed2 header.b=4mKIzeSy; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234512AbjABSph (ORCPT + 61 others); Mon, 2 Jan 2023 13:45:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59580 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235935AbjABSpb (ORCPT ); Mon, 2 Jan 2023 13:45:31 -0500 Received: from mailrelay6-1.pub.mailoutpod2-cph3.one.com (mailrelay6-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:405::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 73BB1BC92 for ; Mon, 2 Jan 2023 10:45:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=OBlDSr4lhC00U7ExCtteVxPrZaOIkpheeh0gYpLqn8Y=; b=Ensj31qvpWuD49d801qSNg09yXZaA21areApGGDGgtmaFvPx5cue/GrXr2ZjLjC9du8+zN9WBUD8H q5HDyLRIGYn4lE0folgJCVbLPPXMgfzZaQiD1Eyen7Rvm1m/pEUqIuxxflQyzMczGdJ1Cwuyc5pFZe bSGA0cGfe1nslnmitU5ma9sIwqeib4fIQsxD+jtGK9+gDCIlaboSOekHTE9EVUT6jWprtDUaB5rDk3 HVb8G50SKErSYYbmd8NTZXJFmTgGH+e2BFviX3E+VS4tuxRDbtzgtkGktyNDk8wC4hq1y7nohva+0l q0JwbqYMsQ/86k1hm5oDXrQ0iHOJKGg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=OBlDSr4lhC00U7ExCtteVxPrZaOIkpheeh0gYpLqn8Y=; b=4mKIzeSySg+8w2CeFhXrVD05UCvarJew4q0XO2o1Yt8LBDQJRfxphd13FxwKlED4o76+CFhvl1hXY n2bDkpVBg== X-HalOne-ID: 9f12f8d2-8acd-11ed-9196-cde5ad41a1dd Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay6 (Halon) with ESMTPSA id 9f12f8d2-8acd-11ed-9196-cde5ad41a1dd; Mon, 02 Jan 2023 18:45:27 +0000 (UTC) Date: Mon, 2 Jan 2023 19:45:26 +0100 From: Sam Ravnborg To: Javier Martinez Canillas Cc: linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Thierry Reding Subject: Re: [PATCH 06/14] drm/panel-boe-bf060y8m-aj0: Drop custom DSI write macro Message-ID: References: <20221228014757.3170486-1-javierm@redhat.com> <20221228014757.3170486-7-javierm@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221228014757.3170486-7-javierm@redhat.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Javier, On Wed, Dec 28, 2022 at 02:47:49AM +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 > --- > > .../gpu/drm/panel/panel-boe-bf060y8m-aj0.c | 28 +++++++------------ > 1 file changed, 10 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c > index ad58840eda41..7fff89cb1cd3 100644 > --- a/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c > +++ b/drivers/gpu/drm/panel/panel-boe-bf060y8m-aj0.c > @@ -43,14 +43,6 @@ struct boe_bf060y8m_aj0 *to_boe_bf060y8m_aj0(struct drm_panel *panel) > return container_of(panel, struct boe_bf060y8m_aj0, panel); > } > > -#define dsi_dcs_write_seq(dsi, seq...) do { \ > - static const u8 d[] = { seq }; \ > - int ret; \ > - ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d)); \ > - if (ret < 0) \ > - return ret; \ > - } while (0) > - > static void boe_bf060y8m_aj0_reset(struct boe_bf060y8m_aj0 *boe) > { > gpiod_set_value_cansleep(boe->reset_gpio, 0); > @@ -67,11 +59,11 @@ static int boe_bf060y8m_aj0_on(struct boe_bf060y8m_aj0 *boe) > struct device *dev = &dsi->dev; > int ret; > > - dsi_dcs_write_seq(dsi, 0xb0, 0xa5, 0x00); > - dsi_dcs_write_seq(dsi, 0xb2, 0x00, 0x4c); > - dsi_dcs_write_seq(dsi, MIPI_DCS_SET_3D_CONTROL, 0x10); > - dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_POWER_SAVE, DCS_ALLOW_HBM_RANGE); > - dsi_dcs_write_seq(dsi, 0xf8, > + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0xa5, 0x00); > + mipi_dsi_dcs_write_seq(dsi, 0xb2, 0x00, 0x4c); > + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_SET_3D_CONTROL, 0x10); > + mipi_dsi_dcs_write_seq(dsi, MIPI_DCS_WRITE_POWER_SAVE, DCS_ALLOW_HBM_RANGE); > + mipi_dsi_dcs_write_seq(dsi, 0xf8, > 0x00, 0x08, 0x10, 0x00, 0x22, 0x00, 0x00, 0x2d); Fix indent. With this fixed in all places: Reviewed-by: Sam Ravnborg > > ret = mipi_dsi_dcs_exit_sleep_mode(dsi); > @@ -81,17 +73,17 @@ static int boe_bf060y8m_aj0_on(struct boe_bf060y8m_aj0 *boe) > } > msleep(30); > > - dsi_dcs_write_seq(dsi, 0xb0, 0xa5, 0x00); > - dsi_dcs_write_seq(dsi, 0xc0, > + mipi_dsi_dcs_write_seq(dsi, 0xb0, 0xa5, 0x00); > + mipi_dsi_dcs_write_seq(dsi, 0xc0, > 0x08, 0x48, 0x65, 0x33, 0x33, 0x33, > 0x2a, 0x31, 0x39, 0x20, 0x09); > - dsi_dcs_write_seq(dsi, 0xc1, 0x00, 0x00, 0x00, 0x1f, 0x1f, > + mipi_dsi_dcs_write_seq(dsi, 0xc1, 0x00, 0x00, 0x00, 0x1f, 0x1f, > 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, > 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f); > - dsi_dcs_write_seq(dsi, 0xe2, 0x20, 0x04, 0x10, 0x12, 0x92, > + mipi_dsi_dcs_write_seq(dsi, 0xe2, 0x20, 0x04, 0x10, 0x12, 0x92, > 0x4f, 0x8f, 0x44, 0x84, 0x83, 0x83, 0x83, > 0x5c, 0x5c, 0x5c); > - dsi_dcs_write_seq(dsi, 0xde, 0x01, 0x2c, 0x00, 0x77, 0x3e); > + mipi_dsi_dcs_write_seq(dsi, 0xde, 0x01, 0x2c, 0x00, 0x77, 0x3e); > > msleep(30); > > -- > 2.38.1