mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Neil Armstrong <neil.armstrong@linaro.org>
To: Douglas Anderson <dianders@chromium.org>,
	dri-devel@lists.freedesktop.org
Cc: Linus Walleij <linus.walleij@linaro.org>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>,
	Cong Yang <yangcong5@huaqin.corp-partner.google.com>,
	Hsin-Yi Wang <hsinyi@google.com>,
	Brian Norris <briannorris@chromium.org>,
	Sam Ravnborg <sam@ravnborg.org>,
	Javier Martinez Canillas <javierm@redhat.com>,
	Joel Selvaraj <jo@jsfamily.in>,
	lvzhaoxiong@huaqin.corp-partner.google.com,
	Daniel Vetter <daniel@ffwll.ch>, David Airlie <airlied@gmail.com>,
	Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/9] drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints
Date: Thu, 2 May 2024 09:27:29 +0200	[thread overview]
Message-ID: <9598098a-183f-448b-91ff-b60decc8218e@linaro.org> (raw)
In-Reply-To: <20240501084109.v3.3.I9982cd5d8014de7a4513f5619f66f88da49ce4ec@changeid>

On 01/05/2024 17:41, Douglas Anderson wrote:
> We really don't expect these errors to be printed over and over
> again. When a driver hits the error it should bail out. Just use a
> normal error print.
> 
> This gives a nice space savings for users of these functions:
> 
> $ scripts/bloat-o-meter \
>    .../before/panel-novatek-nt36672e.ko \
>    .../after/panel-novatek-nt36672e.ko
> add/remove: 0/1 grow/shrink: 0/1 up/down: 0/-16760 (-16760)
> Function                                     old     new   delta
> nt36672e_1080x2408_60hz_init               17080   10640   -6440
> nt36672e_1080x2408_60hz_init._rs           10320       -  -10320
> Total: Before=31815, After=15055, chg -52.68%
> 
> Signed-off-by: Douglas Anderson <dianders@chromium.org>
> ---
> 
> Changes in v3:
> - ("mipi_dsi_*_write functions don't need to ratelimit...") moved earlier.
> 
> Changes in v2:
> - New
> 
>   include/drm/drm_mipi_dsi.h | 24 +++++++++++-------------
>   1 file changed, 11 insertions(+), 13 deletions(-)
> 
> diff --git a/include/drm/drm_mipi_dsi.h b/include/drm/drm_mipi_dsi.h
> index e0f56564bf97..67967be48dbd 100644
> --- a/include/drm/drm_mipi_dsi.h
> +++ b/include/drm/drm_mipi_dsi.h
> @@ -314,17 +314,16 @@ int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
>    * @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;                                 \
> -		ssize_t ret;                                                    \
> -		ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d));            \
> -		if (ret < 0) {                                                  \
> -			dev_err_ratelimited(dev, "transmit data failed: %zd\n", \
> -					    ret);                               \
> -			return ret;                                             \
> -		}                                                               \
> +#define mipi_dsi_generic_write_seq(dsi, seq...)                           \
> +	do {                                                              \
> +		static const u8 d[] = { seq };                            \
> +		struct device *dev = &dsi->dev;                           \
> +		ssize_t ret;                                              \
> +		ret = mipi_dsi_generic_write(dsi, d, ARRAY_SIZE(d));      \
> +		if (ret < 0) {                                            \
> +			dev_err(dev, "transmit data failed: %zd\n", ret); \
> +			return ret;                                       \
> +		}                                                         \
>   	} while (0)
>   
>   /**
> @@ -340,8 +339,7 @@ int mipi_dsi_dcs_get_display_brightness_large(struct mipi_dsi_device *dsi,
>   		ssize_t ret;                                                \
>   		ret = mipi_dsi_dcs_write_buffer(dsi, d, ARRAY_SIZE(d));     \
>   		if (ret < 0) {                                              \
> -			dev_err_ratelimited(                                \
> -				dev, "sending command %#02x failed: %zd\n", \
> +			dev_err(dev, "sending command %#02x failed: %zd\n", \
>   				cmd, ret);                                  \
>   			return ret;                                         \
>   		}                                                           \

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

  reply	other threads:[~2024-05-02  7:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-01 15:41 [PATCH v3 0/9] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs Douglas Anderson
2024-05-01 15:41 ` [PATCH v3 1/9] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq() Douglas Anderson
2024-05-02  7:26   ` Neil Armstrong
2024-05-02  8:15   ` Linus Walleij
2024-05-01 15:41 ` [PATCH v3 2/9] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq() Douglas Anderson
2024-05-02  7:26   ` Neil Armstrong
2024-05-02  8:15   ` Linus Walleij
2024-05-01 15:41 ` [PATCH v3 3/9] drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints Douglas Anderson
2024-05-02  7:27   ` Neil Armstrong [this message]
2024-05-02  8:16   ` Linus Walleij
2024-05-01 15:41 ` [PATCH v3 4/9] drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq() Douglas Anderson
2024-05-02  7:27   ` Neil Armstrong
2024-05-02  8:23   ` Linus Walleij
2024-05-02 16:59     ` Doug Anderson
2024-05-01 15:41 ` [PATCH v3 5/9] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi() Douglas Anderson
2024-05-02  7:28   ` Neil Armstrong
2024-05-06  6:22   ` Linus Walleij
2024-05-01 15:41 ` [PATCH v3 6/9] drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi() Douglas Anderson
2024-05-01 15:41 ` [PATCH v3 7/9] drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels Douglas Anderson
2024-05-02 13:41   ` Linus Walleij
2024-05-02 16:40     ` Doug Anderson
2024-05-01 15:41 ` [PATCH v3 8/9] drm/panel: ili9882t: " Douglas Anderson
2024-05-06  6:19   ` Linus Walleij
2024-05-01 15:41 ` [PATCH v3 9/9] drm/panel: innolux-p079zca: " Douglas Anderson
2024-05-03 16:32   ` Doug Anderson
2024-05-06  6:45   ` Linus Walleij
2024-05-02  7:48 ` [PATCH v3 0/9] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs Neil Armstrong
2024-05-02 14:27   ` Doug Anderson
2024-05-02 16:05     ` neil.armstrong

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9598098a-183f-448b-91ff-b60decc8218e@linaro.org \
    --to=neil.armstrong@linaro.org \
    --cc=airlied@gmail.com \
    --cc=briannorris@chromium.org \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hsinyi@google.com \
    --cc=jani.nikula@linux.intel.com \
    --cc=javierm@redhat.com \
    --cc=jo@jsfamily.in \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lvzhaoxiong@huaqin.corp-partner.google.com \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=sam@ravnborg.org \
    --cc=tzimmermann@suse.de \
    --cc=yangcong5@huaqin.corp-partner.google.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®