mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tejas Vipin <tejasvipin76@gmail.com>
To: Doug Anderson <dianders@chromium.org>
Cc: neil.armstrong@linaro.org, quic_jesszhan@quicinc.com,
	maarten.lankhorst@linux.intel.com, mripard@kernel.org,
	tzimmermann@suse.de, airlied@gmail.com, daniel@ffwll.ch,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	LinusW <linus.walleij@linaro.org>,
	Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Subject: Re: [PATCH 1/2] drm/mipi-dsi: add more multi functions for better error handling
Date: Tue, 9 Jul 2024 16:47:53 +0530	[thread overview]
Message-ID: <36aa6067-fa6b-4957-ae33-58a28e32c8fd@gmail.com> (raw)
In-Reply-To: <CAD=FV=VKiEjDfeK8pCqAk8+YWBD2U4ESLik8kiDbvgrZz7o1NA@mail.gmail.com>



On 7/9/24 5:50 AM, Doug Anderson wrote:
> Hi,
> 
> On Fri, Jun 28, 2024 at 11:25 AM Tejas Vipin <tejasvipin76@gmail.com> wrote:
>>
>> +/**
>> + * mipi_dsi_dcs_set_page_address_multi() - define the column extent of the
>> + *     frame memory accessed by the host processor
>> + * @ctx: Context for multiple DSI transactions
>> + * @start: first column of frame memory
>> + * @end: last column of frame memory
> 
> nit: "start" and "end" comments should say "first page" and "last
> page", not "first column" and "last column". The previous function was
> the one about columns.
> 
>> + *
>> + * Like mipi_dsi_dcs_set_page_address() but deals with errors in a way that
>> + * makes it convenient to make several calls in a row.
>> + */
>> +void mipi_dsi_dcs_set_page_address_multi(struct mipi_dsi_multi_context *ctx,
>> +                                          u16 start, u16 end)
> 
> nit: indentation of the above line isn't _quite_ right.
> 
> 
> Other than the two nits, this looks fine to me, but I'd prefer if
> someone else provides an "Ack" in addition to me that they're OK
> adding these extra "multi" functions. Both Dmitry and Linus W were
> involved in the original "multi" functions, so maybe they'd be willing
> to offer their opinions?

I think a better way to go forward with multi style functions is to
use macros. All the multi style functions are basically exactly the
same with the only difference being the function called internally
and the dev_err. This can be represented in the form of a macro, and
would save on a ton of otherwise redundant code, while also allowing 
us to "convert" any function to multi style as and when we please.

We would ideally have 2 macros, one for the main functions where we
desire to modify accum_err on an error arising, and another macro that
just checks accum_err to see if the function should be a no op.

If you guys think this is a good idea, I'll work on the macros and
do the multi conversions in this new way.

-- 
Tejas Vipin

  reply	other threads:[~2024-07-09 11:17 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 18:24 [PATCH 0/2] add more multi functions to streamline " Tejas Vipin
2024-06-28 18:24 ` [PATCH 1/2] drm/mipi-dsi: add more multi functions for better " Tejas Vipin
2024-07-09  0:20   ` Doug Anderson
2024-07-09 11:17     ` Tejas Vipin [this message]
2024-07-09 20:55       ` Doug Anderson
2024-06-28 18:24 ` [PATCH 2/2] drm/panel: startek-kd070fhfid015: transition to mipi_dsi wrapped functions Tejas Vipin
2024-07-09  0:27   ` Doug Anderson

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=36aa6067-fa6b-4957-ae33-58a28e32c8fd@gmail.com \
    --to=tejasvipin76@gmail.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dianders@chromium.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=tzimmermann@suse.de \
    /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®