Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp10991338rwl; Mon, 2 Jan 2023 11:43:35 -0800 (PST) X-Google-Smtp-Source: AMrXdXvoMle1l9ZS79+oUcgxCpxvoL4qLjNjDUAFM0S9q6VInDz+13LOWnVV78me91hp6y83gYcb X-Received: by 2002:a17:907:86aa:b0:7c0:aea2:e910 with SMTP id qa42-20020a17090786aa00b007c0aea2e910mr59001059ejc.3.1672688614920; Mon, 02 Jan 2023 11:43:34 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672688614; cv=none; d=google.com; s=arc-20160816; b=CNj7+o1t31p08mC+tho0sTuDotq6pICmHpeUKL9nHIsSVBXBwwMcAwXBdJl6WGCPPJ L5ucvo3m0JrgmKsCb44Ea5fTlx2vqAsGj121JBhB4ElGYxXfCXNWB9ycLj4yOJp5tA5l HOKwetZkD/fWvtbe9YnJkHN37xJCmyKTwuPCP3opKefE0GJmBah0OoTvPj2/9CNUhcJ5 IUxIJdQPtAuvpCHNg4zLiAHLQ8OSIp0arKJxn/3XkXqZpRmWpEboVh3CfInf5C82BByH 62oRAuTlO9d9o51DYU8m9XkAvsOJnIUj1L9nf4VlDzRjevC5quQqfAeSuLzV0TEaFC0D oWSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=7WOPN/LK/WXz6Ghsv8Bn+UnAhtmBnvTXnzOz5HK8Rlk=; b=03QCRRjOx4qtULmGL/t1uMVYmWkyQgdFDHRoyeA8fG7mnL7boU+1Pz0yrPSpRRj0Hg KM2ySzWrHznerYftL73w9sx7DthdOfKMe2mhmQj9Xrokk6K+2BcXug6HQh5uzVhwant3 1jj9nA/iwmxNcghWotyXjNdHZd4tVz4MJ7f6JwwEDizMYn8ptYrVB8zbu6FbpnuoL0c3 9fTdlRdU5KrYn3uGS/iTlLHRVThMfx5af88IFF5LTxQDry39y2SbWKYaD2gxI1ZMNQyQ g3AFLhgL5gKFFhOSNVIS61H1bYtf/dHkh/LrtPJSYABqjrOS5OzNgMzejmL05n+Ic0Rj ocIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=N2sB0SVM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a05640207d100b0047f85add083si23051393edy.623.2023.01.02.11.43.18; Mon, 02 Jan 2023 11:43:34 -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=@redhat.com header.s=mimecast20190719 header.b=N2sB0SVM; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbjABTAh (ORCPT + 61 others); Mon, 2 Jan 2023 14:00:37 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229964AbjABTAf (ORCPT ); Mon, 2 Jan 2023 14:00:35 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 60F3FD84 for ; Mon, 2 Jan 2023 10:59:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1672685986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7WOPN/LK/WXz6Ghsv8Bn+UnAhtmBnvTXnzOz5HK8Rlk=; b=N2sB0SVMZGIVcxRiu3azSpn5hmGVTX4MP+xqKBxb8a6UeMjgVtnRREYLHC+nfAtPHVFeGO FAEhvI0IkrYVfQB3C8T2IsU8vfJ6mYhqNy0Q47tUb8kr6kXN/4uRKDq/AQC8xrw9aHAJ+D LhtLBQW+lkYbtO7Ywci2XdU+jUHJXmg= Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-391-cAVGKvqdPwyP2ntDPSbuOw-1; Mon, 02 Jan 2023 13:59:40 -0500 X-MC-Unique: cAVGKvqdPwyP2ntDPSbuOw-1 Received: by mail-wm1-f71.google.com with SMTP id i7-20020a05600c354700b003d62131fe46so18868728wmq.5 for ; Mon, 02 Jan 2023 10:59:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=7WOPN/LK/WXz6Ghsv8Bn+UnAhtmBnvTXnzOz5HK8Rlk=; b=P1Su6O7ZqqK2EEJtRVw9aLRisFk28QAwFQmloUGajglDmJMeY1xO9K/EN+g0NlNSVy Ody/A/zcG3gD4uNZWpcFL0tbKb0Zg/L9co9ukMtOFalLyPOhyN8aLMAxBqZg6R22ukTp +Sv1LOdzBfoM5lZOQ7gctZT3WJtzTgHt8uJY8zHc/pH45tISaeTzNkBEMfR+Opv0BNdV C8fUyRskMA5ZGSw5k7kJb8fc4gnfdbIRKf1ImfaQgTS5oFfSc3AiMq9aRSnYHZzMKgJL Jhq1T1E+opwG2ie6V0ukJfG+/oH7d5iUVFQLQCnZdd+NCiOD7b5lXeS1FwDayrXZH1wN WgnQ== X-Gm-Message-State: AFqh2kqsVvSQ2SIr8G9Clqu93FmaPNB9P3YQA8qOP1TrB1wUv+YCwk1D grAwx3k0vG4+kt4tC/A/h6HYRfZLz/8GzQmSBIo6Dyc7qFXzBFA4FiI32Xrh3ZVsKQNV/OFGGaZ hTe5acadSV8OhRwQ2Zw0BItmc X-Received: by 2002:a05:600c:1c9d:b0:3d1:f3eb:c718 with SMTP id k29-20020a05600c1c9d00b003d1f3ebc718mr36368381wms.19.1672685978893; Mon, 02 Jan 2023 10:59:38 -0800 (PST) X-Received: by 2002:a05:600c:1c9d:b0:3d1:f3eb:c718 with SMTP id k29-20020a05600c1c9d00b003d1f3ebc718mr36368375wms.19.1672685978701; Mon, 02 Jan 2023 10:59:38 -0800 (PST) Received: from [192.168.1.130] (205.pool92-176-231.dynamic.orange.es. [92.176.231.205]) by smtp.gmail.com with ESMTPSA id l7-20020a05600c4f0700b003d96c811d6dsm41003934wmq.30.2023.01.02.10.59.38 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 02 Jan 2023 10:59:38 -0800 (PST) Message-ID: <8de738ef-588b-1c59-6e97-c0277eb313b1@redhat.com> Date: Mon, 2 Jan 2023 19:59:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 01/14] drm/mipi-dsi: Add a mipi_dsi_dcs_write_seq() macro Content-Language: en-US To: Sam Ravnborg Cc: linux-kernel@vger.kernel.org, Thomas Zimmermann , dri-devel@lists.freedesktop.org References: <20221228014757.3170486-1-javierm@redhat.com> <20221228014757.3170486-2-javierm@redhat.com> From: Javier Martinez Canillas In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,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 Hello Sam, Thanks a lot for your feedback. On 1/2/23 19:39, Sam Ravnborg wrote: > Hi Javier. > > On Wed, Dec 28, 2022 at 02:47:44AM +0100, Javier Martinez Canillas wrote: >> Many panel drivers define dsi_dcs_write_seq() and dsi_generic_write_seq() >> macros to send DCS commands and generic write packets respectively, with >> the payload specified as a list of parameters instead of using arrays. >> >> There's already a macro for the former, introduced by commit 2a9e9daf75231 >> ("drm/mipi-dsi: Introduce mipi_dsi_dcs_write_seq macro") so drivers can be >> changed to use that. But there isn't one yet for the latter, let's add it. >> >> Signed-off-by: Javier Martinez Canillas >> --- >> >> include/drm/drm_mipi_dsi.h | 16 ++++++++++++++++ >> 1 file changed, 16 insertions(+) >> >> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h >> index 20b21b577dea..c7c458131ba1 100644 >> --- a/include/drm/drm_mipi_dsi.h >> +++ b/include/drm/drm_mipi_dsi.h >> @@ -297,6 +297,22 @@ int mipi_dsi_dcs_set_display_brightness(struct mipi_dsi_device *dsi, >> int mipi_dsi_dcs_get_display_brightness(struct mipi_dsi_device *dsi, >> u16 *brightness); >> >> +/** >> + * mipi_dsi_generic_write - transmit data using a generic write packet > s/mipi_dsi_generic_write/mipi_dsi_generic_write_seq > (As the bot also reported) > Ups, sorry for missing that. > with this fixed: > Reviewed-by: Sam Ravnborg > Thanks! >> + * @dsi: DSI peripheral device >> + * @seq: buffer containing the payload >> + */ >> +#define mipi_dsi_generic_write_seq(dsi, seq...) do { \ >> + static const u8 d[] = { seq }; \ >> + struct device *dev = &dsi->dev; \ >> + int ret; \ >> + ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d)); \ >> + if (ret < 0) { \ >> + dev_err_ratelimited(dev, "transmit data failed: %d\n", ret); \ >> + return ret; \ >> + } \ >> + } while (0) >> + > (If you align '\' under each other it would be nicer, but I could see > that mipi_dsi_dcs_write_seq() do not do so). Yeah, I was actually thinking about doing like you suggested for this macro but preferred to keep it consistent with the existing mipi_dsi_dcs_write_seq() macro definition... Maybe I can add a preparatory patch that just fixes the backslash characters indent for mipi_dsi_dcs_write_seq() to be all aligned? -- Best regards, Javier Martinez Canillas Core Platforms Red Hat