From: liviu@dudau.co.uk (Liviu Dudau)
To: linux-arm-kernel@lists.infradead.org
Subject: [linux-sunxi] Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.
Date: Wed, 31 Jan 2018 03:08:08 +0000 [thread overview]
Message-ID: <20180131030807.GA19945@bart.dudau.co.uk> (raw)
In-Reply-To: <20180126110041.f89848325b9ecfb07df387ca@magewell.com>
On Fri, Jan 26, 2018 at 11:00:41AM +0800, Yong wrote:
> Hi Maxime,
>
> On Fri, 26 Jan 2018 09:46:58 +0800
> Yong <yong.deng@magewell.com> wrote:
>
> > Hi Maxime,
> >
> > Do you have any experience in solving this problem?
> > It seems the PHYS_OFFSET maybe undeclared when the ARCH is not arm.
>
> Got it.
> Should I add 'depends on ARM' in Kconfig?
No, I don't think you should do that, you should fix the code.
The dma_addr_t addr that you've got is ideally coming from dma_alloc_coherent(),
in which case the addr is already "suitable" for use by the device (because the
bus where the device is attached to does all the address translations). If you
apply PHYS_OFFSET forcefully to it you might get unexpected results.
Best regards,
Liviu
>
> >
> > On Fri, 26 Jan 2018 08:04:18 +0800
> > kbuild test robot <lkp@intel.com> wrote:
> >
> > > Hi Yong,
> > >
> > > I love your patch! Yet something to improve:
> > >
> > > [auto build test ERROR on linuxtv-media/master]
> > > [also build test ERROR on v4.15-rc9 next-20180119]
> > > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> > >
> > > url: https://github.com/0day-ci/linux/commits/Yong-Deng/dt-bindings-media-Add-Allwinner-V3s-Camera-Sensor-Interface-CSI/20180126-054511
> > > base: git://linuxtv.org/media_tree.git master
> > > config: i386-allmodconfig (attached as .config)
> > > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> > > reproduce:
> > > # save the attached .config to linux build tree
> > > make ARCH=i386
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c: In function 'sun6i_csi_update_buf_addr':
> > > >> drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: error: 'PHYS_OFFSET' undeclared (first use in this function); did you mean 'PAGE_OFFSET'?
> > > dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > ^~~~~~~~~~~
> > > PAGE_OFFSET
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: note: each undeclared identifier is reported only once for each function it appears in
> > >
> > > vim +567 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > >
> > > 562
> > > 563 void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, dma_addr_t addr)
> > > 564 {
> > > 565 struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi);
> > > 566 /* transform physical address to bus address */
> > > > 567 dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > 568
> > > 569 regmap_write(sdev->regmap, CSI_CH_F0_BUFA_REG,
> > > 570 (bus_addr + sdev->planar_offset[0]) >> 2);
> > > 571 if (sdev->planar_offset[1] != -1)
> > > 572 regmap_write(sdev->regmap, CSI_CH_F1_BUFA_REG,
> > > 573 (bus_addr + sdev->planar_offset[1]) >> 2);
> > > 574 if (sdev->planar_offset[2] != -1)
> > > 575 regmap_write(sdev->regmap, CSI_CH_F2_BUFA_REG,
> > > 576 (bus_addr + sdev->planar_offset[2]) >> 2);
> > > 577 }
> > > 578
> > >
> > > ---
> > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> >
> >
> > Thanks,
> > Yong
>
>
> Thanks,
> Yong
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe at googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
WARNING: multiple messages have this Message-ID (diff)
From: Liviu Dudau <liviu-I3yL/QOVVjH10XsdtD+oqA@public.gmane.org>
To: Yong <yong.deng-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
Cc: kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>,
kbuild-all-JC7UmRfGjtg@public.gmane.org,
Maxime Ripard
<maxime.ripard-wi1+55ScJUtKEb57/3fJTNBPR1lH4CV8@public.gmane.org>,
Mauro Carvalho Chehab
<mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>,
"David S. Miller" <davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>,
Greg Kroah-Hartman
<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
Hans Verkuil
<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
Linus Walleij
<linus.walleij-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Randy Dunlap <rdunlap-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
Stanimir Varbanov
<stanimir.varbanov-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Hugues Fruchet <hugues.fruchet-qxv4g6HH51o@public.gmane.org>,
Yannick Fertre <yannick.fertre-qxv4g6HH51o@public.gmane.org>,
Philipp Zabel <p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>,
Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>,
Benjamin Gaignard
<benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
Ramesh Shanmugasundaram
<ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>,
Sakari Ailus
<sakari.ailus-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>,
Rick Chang <rick.chang-NuS5LvNUpcJWk0Htik3J/w@public.gmane.org>,
linux-media-u79uwXL29TY@public.gmane.org
Subject: Re: Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.
Date: Wed, 31 Jan 2018 03:08:08 +0000 [thread overview]
Message-ID: <20180131030807.GA19945@bart.dudau.co.uk> (raw)
In-Reply-To: <20180126110041.f89848325b9ecfb07df387ca-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
On Fri, Jan 26, 2018 at 11:00:41AM +0800, Yong wrote:
> Hi Maxime,
>
> On Fri, 26 Jan 2018 09:46:58 +0800
> Yong <yong.deng-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org> wrote:
>
> > Hi Maxime,
> >
> > Do you have any experience in solving this problem?
> > It seems the PHYS_OFFSET maybe undeclared when the ARCH is not arm.
>
> Got it.
> Should I add 'depends on ARM' in Kconfig?
No, I don't think you should do that, you should fix the code.
The dma_addr_t addr that you've got is ideally coming from dma_alloc_coherent(),
in which case the addr is already "suitable" for use by the device (because the
bus where the device is attached to does all the address translations). If you
apply PHYS_OFFSET forcefully to it you might get unexpected results.
Best regards,
Liviu
>
> >
> > On Fri, 26 Jan 2018 08:04:18 +0800
> > kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> >
> > > Hi Yong,
> > >
> > > I love your patch! Yet something to improve:
> > >
> > > [auto build test ERROR on linuxtv-media/master]
> > > [also build test ERROR on v4.15-rc9 next-20180119]
> > > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> > >
> > > url: https://github.com/0day-ci/linux/commits/Yong-Deng/dt-bindings-media-Add-Allwinner-V3s-Camera-Sensor-Interface-CSI/20180126-054511
> > > base: git://linuxtv.org/media_tree.git master
> > > config: i386-allmodconfig (attached as .config)
> > > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> > > reproduce:
> > > # save the attached .config to linux build tree
> > > make ARCH=i386
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c: In function 'sun6i_csi_update_buf_addr':
> > > >> drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: error: 'PHYS_OFFSET' undeclared (first use in this function); did you mean 'PAGE_OFFSET'?
> > > dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > ^~~~~~~~~~~
> > > PAGE_OFFSET
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: note: each undeclared identifier is reported only once for each function it appears in
> > >
> > > vim +567 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > >
> > > 562
> > > 563 void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, dma_addr_t addr)
> > > 564 {
> > > 565 struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi);
> > > 566 /* transform physical address to bus address */
> > > > 567 dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > 568
> > > 569 regmap_write(sdev->regmap, CSI_CH_F0_BUFA_REG,
> > > 570 (bus_addr + sdev->planar_offset[0]) >> 2);
> > > 571 if (sdev->planar_offset[1] != -1)
> > > 572 regmap_write(sdev->regmap, CSI_CH_F1_BUFA_REG,
> > > 573 (bus_addr + sdev->planar_offset[1]) >> 2);
> > > 574 if (sdev->planar_offset[2] != -1)
> > > 575 regmap_write(sdev->regmap, CSI_CH_F2_BUFA_REG,
> > > 576 (bus_addr + sdev->planar_offset[2]) >> 2);
> > > 577 }
> > > 578
> > >
> > > ---
> > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> >
> >
> > Thanks,
> > Yong
>
>
> Thanks,
> Yong
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> For more options, visit https://groups.google.com/d/optout.
WARNING: multiple messages have this Message-ID (diff)
From: Liviu Dudau <liviu@dudau.co.uk>
To: Yong <yong.deng@magewell.com>
Cc: kbuild test robot <lkp@intel.com>,
kbuild-all@01.org,
Maxime Ripard <maxime.ripard@free-electrons.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Rob Herring <robh+dt@kernel.org>,
Mark Rutland <mark.rutland@arm.com>, Chen-Yu Tsai <wens@csie.org>,
"David S. Miller" <davem@davemloft.net>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Hans Verkuil <hans.verkuil@cisco.com>,
Linus Walleij <linus.walleij@linaro.org>,
Randy Dunlap <rdunlap@infradead.org>,
Stanimir Varbanov <stanimir.varbanov@linaro.org>,
Hugues Fruchet <hugues.fruchet@st.com>,
Yannick Fertre <yannick.fertre@st.com>,
Philipp Zabel <p.zabel@pengutronix.de>,
Arnd Bergmann <arnd@arndb.de>,
Benjamin Gaignard <benjamin.gaignard@linaro.org>,
Ramesh Shanmugasundaram <ramesh.shanmugasundaram@bp.renesas.com>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Rick Chang <rick.chang@mediatek.com>,
linux-media@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, linux-sunxi@googlegroups.com,
megous@megous.com
Subject: Re: [linux-sunxi] Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.
Date: Wed, 31 Jan 2018 03:08:08 +0000 [thread overview]
Message-ID: <20180131030807.GA19945@bart.dudau.co.uk> (raw)
In-Reply-To: <20180126110041.f89848325b9ecfb07df387ca@magewell.com>
On Fri, Jan 26, 2018 at 11:00:41AM +0800, Yong wrote:
> Hi Maxime,
>
> On Fri, 26 Jan 2018 09:46:58 +0800
> Yong <yong.deng@magewell.com> wrote:
>
> > Hi Maxime,
> >
> > Do you have any experience in solving this problem?
> > It seems the PHYS_OFFSET maybe undeclared when the ARCH is not arm.
>
> Got it.
> Should I add 'depends on ARM' in Kconfig?
No, I don't think you should do that, you should fix the code.
The dma_addr_t addr that you've got is ideally coming from dma_alloc_coherent(),
in which case the addr is already "suitable" for use by the device (because the
bus where the device is attached to does all the address translations). If you
apply PHYS_OFFSET forcefully to it you might get unexpected results.
Best regards,
Liviu
>
> >
> > On Fri, 26 Jan 2018 08:04:18 +0800
> > kbuild test robot <lkp@intel.com> wrote:
> >
> > > Hi Yong,
> > >
> > > I love your patch! Yet something to improve:
> > >
> > > [auto build test ERROR on linuxtv-media/master]
> > > [also build test ERROR on v4.15-rc9 next-20180119]
> > > [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
> > >
> > > url: https://github.com/0day-ci/linux/commits/Yong-Deng/dt-bindings-media-Add-Allwinner-V3s-Camera-Sensor-Interface-CSI/20180126-054511
> > > base: git://linuxtv.org/media_tree.git master
> > > config: i386-allmodconfig (attached as .config)
> > > compiler: gcc-7 (Debian 7.2.0-12) 7.2.1 20171025
> > > reproduce:
> > > # save the attached .config to linux build tree
> > > make ARCH=i386
> > >
> > > All errors (new ones prefixed by >>):
> > >
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c: In function 'sun6i_csi_update_buf_addr':
> > > >> drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: error: 'PHYS_OFFSET' undeclared (first use in this function); did you mean 'PAGE_OFFSET'?
> > > dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > ^~~~~~~~~~~
> > > PAGE_OFFSET
> > > drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c:567:31: note: each undeclared identifier is reported only once for each function it appears in
> > >
> > > vim +567 drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c
> > >
> > > 562
> > > 563 void sun6i_csi_update_buf_addr(struct sun6i_csi *csi, dma_addr_t addr)
> > > 564 {
> > > 565 struct sun6i_csi_dev *sdev = sun6i_csi_to_dev(csi);
> > > 566 /* transform physical address to bus address */
> > > > 567 dma_addr_t bus_addr = addr - PHYS_OFFSET;
> > > 568
> > > 569 regmap_write(sdev->regmap, CSI_CH_F0_BUFA_REG,
> > > 570 (bus_addr + sdev->planar_offset[0]) >> 2);
> > > 571 if (sdev->planar_offset[1] != -1)
> > > 572 regmap_write(sdev->regmap, CSI_CH_F1_BUFA_REG,
> > > 573 (bus_addr + sdev->planar_offset[1]) >> 2);
> > > 574 if (sdev->planar_offset[2] != -1)
> > > 575 regmap_write(sdev->regmap, CSI_CH_F2_BUFA_REG,
> > > 576 (bus_addr + sdev->planar_offset[2]) >> 2);
> > > 577 }
> > > 578
> > >
> > > ---
> > > 0-DAY kernel test infrastructure Open Source Technology Center
> > > https://lists.01.org/pipermail/kbuild-all Intel Corporation
> >
> >
> > Thanks,
> > Yong
>
>
> Thanks,
> Yong
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
next prev parent reply other threads:[~2018-01-31 3:08 UTC|newest]
Thread overview: 93+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-23 8:18 [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI Yong Deng
2018-01-23 8:18 ` Yong Deng
2018-01-23 8:18 ` Yong Deng
2018-01-26 0:04 ` kbuild test robot
2018-01-26 0:04 ` kbuild test robot
2018-01-26 0:04 ` kbuild test robot
2018-01-26 1:46 ` Yong
2018-01-26 1:46 ` Yong
2018-01-26 1:46 ` Yong
2018-01-26 3:00 ` Yong
2018-01-26 3:00 ` Yong
2018-01-26 3:00 ` Yong
2018-01-26 8:10 ` Maxime Ripard
2018-01-26 8:10 ` Maxime Ripard
2018-01-26 8:10 ` Maxime Ripard
2018-01-28 2:19 ` [linux-sunxi] " Yong
2018-01-28 2:19 ` Yong
2018-01-28 2:19 ` Yong
2018-01-29 8:16 ` Maxime Ripard
2018-01-29 8:16 ` Maxime Ripard
2018-01-29 8:16 ` Maxime Ripard
2018-01-31 3:08 ` Liviu Dudau [this message]
2018-01-31 3:08 ` [linux-sunxi] " Liviu Dudau
2018-01-31 3:08 ` Liviu Dudau
2018-01-31 3:24 ` [linux-sunxi] " Chen-Yu Tsai
2018-01-31 3:24 ` Chen-Yu Tsai
2018-01-31 3:24 ` Chen-Yu Tsai
2018-01-31 7:42 ` Maxime Ripard
2018-01-31 7:42 ` Maxime Ripard
2018-01-31 7:42 ` Maxime Ripard
2018-01-31 14:47 ` [linux-sunxi] " Liviu Dudau
2018-01-31 14:47 ` Liviu Dudau
2018-01-31 14:47 ` Liviu Dudau
2018-02-01 8:32 ` [linux-sunxi] " Maxime Ripard
2018-02-01 8:32 ` Maxime Ripard
2018-02-01 8:32 ` Maxime Ripard
2018-02-01 9:20 ` Arnd Bergmann
2018-02-01 9:20 ` Arnd Bergmann
2018-02-01 9:20 ` Arnd Bergmann
2018-02-01 11:34 ` Liviu Dudau
2018-02-01 11:34 ` Liviu Dudau
2018-02-01 11:34 ` Liviu Dudau
2018-02-01 15:54 ` [linux-sunxi] " Maxime Ripard
2018-02-01 15:54 ` Maxime Ripard
2018-02-01 15:54 ` Maxime Ripard
2018-01-27 15:51 ` kbuild test robot
2018-01-27 15:51 ` kbuild test robot
2018-01-27 15:51 ` kbuild test robot
2018-01-27 16:14 ` Linus Walleij
2018-01-27 16:14 ` Linus Walleij
2018-01-27 16:14 ` Linus Walleij
2018-01-28 2:39 ` Yong
2018-01-28 2:39 ` Yong
2018-01-28 2:39 ` Yong
2018-01-29 8:25 ` Maxime Ripard
2018-01-29 8:25 ` Maxime Ripard
2018-01-29 8:25 ` Maxime Ripard
2018-01-29 8:28 ` [linux-sunxi] " icenowy at aosc.io
2018-01-29 8:28 ` icenowy
2018-01-29 8:28 ` icenowy
2018-01-29 9:25 ` Linus Walleij
2018-01-29 9:25 ` Linus Walleij
2018-01-29 9:25 ` Linus Walleij
2018-01-29 14:34 ` Arnd Bergmann
2018-01-29 14:34 ` Arnd Bergmann
2018-01-29 14:34 ` Arnd Bergmann
2018-01-30 7:54 ` Maxime Ripard
2018-01-30 7:54 ` Maxime Ripard
2018-01-30 7:54 ` Maxime Ripard
2018-01-30 9:24 ` Arnd Bergmann
2018-01-30 9:24 ` Arnd Bergmann
2018-01-30 9:24 ` Arnd Bergmann
2018-01-30 9:59 ` Thierry Reding
2018-01-30 9:59 ` Thierry Reding
2018-01-30 9:59 ` Thierry Reding
2018-01-30 10:01 ` Thierry Reding
2018-01-30 10:01 ` Thierry Reding
2018-01-30 10:01 ` Thierry Reding
2018-01-31 7:29 ` Maxime Ripard
2018-01-31 7:29 ` Maxime Ripard
2018-01-31 7:29 ` Maxime Ripard
2018-01-31 9:37 ` Arnd Bergmann
2018-01-31 9:37 ` Arnd Bergmann
2018-01-31 9:37 ` Arnd Bergmann
2018-02-01 15:29 ` Maxime Ripard
2018-02-01 15:29 ` Maxime Ripard
2018-02-01 15:29 ` Maxime Ripard
2018-02-01 15:36 ` Arnd Bergmann
2018-02-01 15:36 ` Arnd Bergmann
2018-02-01 15:36 ` Arnd Bergmann
2018-02-01 16:31 ` Robin Murphy
2018-02-01 16:31 ` Robin Murphy
2018-02-01 16:31 ` Robin Murphy
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=20180131030807.GA19945@bart.dudau.co.uk \
--to=liviu@dudau.co.uk \
--cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.