linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Ricardo Ribalda <ribalda@chromium.org>
To: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Mauro Carvalho Chehab <mchehab@kernel.org>,
	Shawn Guo <shawnguo@kernel.org>,
	 Sascha Hauer <s.hauer@pengutronix.de>,
	Pengutronix Kernel Team <kernel@pengutronix.de>,
	 Fabio Estevam <festevam@gmail.com>,
	linux-media@vger.kernel.org, imx@lists.linux.dev,
	 linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org,
	 Hans Verkuil <hverkuil-cisco@xs4all.nl>
Subject: Re: [PATCH] media: imx-pxp: Rewrite coeff expression
Date: Mon, 15 Jul 2024 10:22:34 +0200	[thread overview]
Message-ID: <CANiDSCvfamZjwOohT8ZFOr-m2SB=r-MCsrXGHtkfEkeYyEo2Nw@mail.gmail.com> (raw)
In-Reply-To: <7dbda1952c9e873823d4e6d2a9534f1b3b945c4a.camel@pengutronix.de>

Hi Philipp


On Mon, 1 Jul 2024 at 11:30, Philipp Zabel <p.zabel@pengutronix.de> wrote:
>
> On Fr, 2024-06-28 at 15:11 +0000, Ricardo Ribalda wrote:
> > GCC5 cannot figure out that the expressions are constant, and that
> > triggers a build failure. Rewrite the expressions.
> >
> > The following gcc5 error is workaround:
> >
> >  #define BM_PXP_CSC1_COEF0_YCBCR_MODE 0x80000000
> >                                       ^
> >     BM_PXP_CSC1_COEF0_YCBCR_MODE |
> >     ^
> >  #define BM_PXP_CSC1_COEF0_YCBCR_MODE 0x80000000
> >                                       ^
> >
> > drivers/media/platform/nxp/imx-pxp.c: In function 'pxp_setup_csc':
> > drivers/media/platform/nxp/imx-pxp.h:582:38: error: initializer element is not constant
> > drivers/media/platform/nxp/imx-pxp.c:374:4: note: in expansion of macro 'BM_PXP_CSC1_COEF0_YCBCR_MODE'
> > drivers/media/platform/nxp/imx-pxp.h:582:38: note: (near initialization for 'csc1_coef_bt601_lim[0]')
> > Signed-off-by: Ricardo Ribalda <ribalda@chromium.org>
>
> Can you elaborate on how this is triggered?

Building the driver with
https://cdn.kernel.org/pub/tools/crosstool/files/bin/x86_64/5.5.0/

It might be easier to repro with:

ribalda@denia:~/work/linux$ podman run --pids-limit=-1 --rm -it -v
.:/workdir  registry.freedesktop.org/linux-media/media-ci/build-ancient
# cd /workdir
# CROSS_COMPILE=x86_64-linux- make allyesconfig
# scripts/config -d MITIGATION_RETPOLINE
# CROSS_COMPILE=x86_64-linux- make olddefconfig
# CROSS_COMPILE=x86_64-linux- make drivers/media/platform/nxp/


>
> At least I couldn't reproduce this by just copy & pasting the
> csc1_coef_bt601_lim initializer and the required macros into gcc 5.4 on
> godbolt.
>
> Can this be fixed by using GENMASK / FIELD_PREP instead?

I was looking to make the change as simple as possible :)

>
> regards
> Philipp



-- 
Ricardo Ribalda


      reply	other threads:[~2024-07-15  8:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-28 15:11 [PATCH] media: imx-pxp: Rewrite coeff expression Ricardo Ribalda
2024-07-01  9:30 ` Philipp Zabel
2024-07-15  8:22   ` Ricardo Ribalda [this message]

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='CANiDSCvfamZjwOohT8ZFOr-m2SB=r-MCsrXGHtkfEkeYyEo2Nw@mail.gmail.com' \
    --to=ribalda@chromium.org \
    --cc=festevam@gmail.com \
    --cc=hverkuil-cisco@xs4all.nl \
    --cc=imx@lists.linux.dev \
    --cc=kernel@pengutronix.de \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=p.zabel@pengutronix.de \
    --cc=s.hauer@pengutronix.de \
    --cc=shawnguo@kernel.org \
    /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).