From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Alexander Stein <alexander.stein@ew.tq-group.com>
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
Liu Ying <victor.liu@nxp.com>,
marex@denx.de, shawnguo@kernel.org, s.hauer@pengutronix.de,
krzysztof.kozlowski@linaro.org, robh+dt@kernel.org,
linux-imx@nxp.com, krzysztof.kozlowski+dt@linaro.org,
kernel@pengutronix.de, LW@karo-electronics.de
Subject: Re: [PATCH v3 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check()
Date: Tue, 14 Feb 2023 16:16:41 +0200 [thread overview]
Message-ID: <Y+uXyfZLyZ7Bm4j8@intel.com> (raw)
In-Reply-To: <1755644.VLH7GnMWUR@steina-w>
On Tue, Feb 14, 2023 at 03:12:55PM +0100, Alexander Stein wrote:
> Hi Liu,
>
> thanks for the update.
>
> Am Montag, 13. Februar 2023, 09:56:09 CET schrieb Liu Ying:
> > Instead of determining LCDIF output bus format and bus flags in
> > ->atomic_enable(), do that in ->atomic_check(). This is a
> > preparation for the upcoming patch to check consistent bus format
> > and bus flags across all first downstream bridges in ->atomic_check().
> > New lcdif_crtc_state structure is introduced to cache bus format
> > and bus flags states in ->atomic_check() so that they can be read
> > in ->atomic_enable().
> >
> > Signed-off-by: Liu Ying <victor.liu@nxp.com>
> > ---
> > v2->v3:
> > * No change.
> >
> > v1->v2:
> > * Split from patch 2/2 in v1. (Marek, Alexander)
> > * Add comment on the 'base' member of lcdif_crtc_state structure to
> > note it should always be the first member. (Lothar)
> >
> > drivers/gpu/drm/mxsfb/lcdif_kms.c | 138 ++++++++++++++++++++++--------
> > 1 file changed, 100 insertions(+), 38 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c
> > b/drivers/gpu/drm/mxsfb/lcdif_kms.c index e54200a9fcb9..294cecdf5439 100644
> > --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c
> > +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c
> > @@ -30,6 +30,18 @@
> > #include "lcdif_drv.h"
> > #include "lcdif_regs.h"
> >
> > +struct lcdif_crtc_state {
> > + struct drm_crtc_state base; /* always be the first
> member */
>
> Is it strictly necessary that base is the first member? to_lcdif_crtc_state()
> should be able to handle any position within the struct. I mean it's sensible
> to put it in first place. But the comment somehow bugs me.
NULL pointers is where these things go bad if it't not at
offset 0. Unless you're willing to always handle those
explicitly.
--
Ville Syrjälä
Intel
next prev parent reply other threads:[~2023-02-14 14:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-13 8:56 [PATCH v3 0/6] drm: lcdif: Add i.MX93 LCDIF support Liu Ying
2023-02-13 8:56 ` [PATCH v3 1/6] dt-bindings: " Liu Ying
2023-02-15 7:26 ` Alexander Stein
2023-02-15 7:49 ` Liu Ying
2023-02-15 8:44 ` Alexander Stein
2023-02-13 8:56 ` [PATCH v3 2/6] drm: lcdif: Drop unnecessary NULL pointer check on lcdif->bridge Liu Ying
2023-02-14 13:42 ` Alexander Stein
2023-02-13 8:56 ` [PATCH v3 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check() Liu Ying
2023-02-14 14:12 ` Alexander Stein
2023-02-14 14:16 ` Ville Syrjälä [this message]
2023-02-15 3:44 ` Liu Ying
2023-02-15 8:27 ` Alexander Stein
2023-02-13 8:56 ` [PATCH v3 4/6] drm: lcdif: Check consistent bus format and flags across first bridges Liu Ying
2023-02-15 7:55 ` Alexander Stein
2023-02-15 8:40 ` Liu Ying
2023-02-13 8:56 ` [PATCH v3 5/6] drm: lcdif: Add multiple encoders and first bridges support Liu Ying
2023-02-15 7:54 ` Alexander Stein
2023-02-15 8:52 ` Liu Ying
2023-02-13 8:56 ` [PATCH v3 6/6] drm: lcdif: Add i.MX93 LCDIF compatible string Liu Ying
2023-02-15 7:55 ` Alexander Stein
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=Y+uXyfZLyZ7Bm4j8@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=LW@karo-electronics.de \
--cc=alexander.stein@ew.tq-group.com \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@pengutronix.de \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-imx@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=robh+dt@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=shawnguo@kernel.org \
--cc=victor.liu@nxp.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;
as well as URLs for NNTP newsgroup(s).