* [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP'
@ 2025-03-03 17:20 kernel test robot
2025-03-04 3:40 ` Andy Yan
0 siblings, 1 reply; 4+ messages in thread
From: kernel test robot @ 2025-03-03 17:20 UTC (permalink / raw)
To: Andy Yan; +Cc: oe-kbuild-all, Heiko Stuebner
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
commit: 328e6885996ca2c6eb8b07d3c9bb1439fdcb088f [7437/7719] drm/rockchip: vop2: Add platform specific callback
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202503040135.fgoyWdLB-lkp@intel.com/
All errors (new ones prefixed by >>):
drivers/gpu/drm/rockchip/rockchip_vop2_reg.c: In function 'rk3568_set_intf_mux':
>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
833 | FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_RGB_MUX, vp->id);
| ^~~~~~~~~~
vim +/FIELD_PREP +833 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
819
820 static unsigned long rk3568_set_intf_mux(struct vop2_video_port *vp, int id, u32 polflags)
821 {
822 struct vop2 *vop2 = vp->vop2;
823 struct drm_crtc *crtc = &vp->crtc;
824 u32 die, dip;
825
826 die = vop2_readl(vop2, RK3568_DSP_IF_EN);
827 dip = vop2_readl(vop2, RK3568_DSP_IF_POL);
828
829 switch (id) {
830 case ROCKCHIP_VOP2_EP_RGB0:
831 die &= ~RK3568_SYS_DSP_INFACE_EN_RGB_MUX;
832 die |= RK3568_SYS_DSP_INFACE_EN_RGB |
> 833 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_RGB_MUX, vp->id);
834 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
835 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
836 if (polflags & POLFLAG_DCLK_INV)
837 regmap_write(vop2->sys_grf, RK3568_GRF_VO_CON1, BIT(3 + 16) | BIT(3));
838 else
839 regmap_write(vop2->sys_grf, RK3568_GRF_VO_CON1, BIT(3 + 16));
840 break;
841 case ROCKCHIP_VOP2_EP_HDMI0:
842 die &= ~RK3568_SYS_DSP_INFACE_EN_HDMI_MUX;
843 die |= RK3568_SYS_DSP_INFACE_EN_HDMI |
844 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_HDMI_MUX, vp->id);
845 dip &= ~RK3568_DSP_IF_POL__HDMI_PIN_POL;
846 dip |= FIELD_PREP(RK3568_DSP_IF_POL__HDMI_PIN_POL, polflags);
847 break;
848 case ROCKCHIP_VOP2_EP_EDP0:
849 die &= ~RK3568_SYS_DSP_INFACE_EN_EDP_MUX;
850 die |= RK3568_SYS_DSP_INFACE_EN_EDP |
851 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_EDP_MUX, vp->id);
852 dip &= ~RK3568_DSP_IF_POL__EDP_PIN_POL;
853 dip |= FIELD_PREP(RK3568_DSP_IF_POL__EDP_PIN_POL, polflags);
854 break;
855 case ROCKCHIP_VOP2_EP_MIPI0:
856 die &= ~RK3568_SYS_DSP_INFACE_EN_MIPI0_MUX;
857 die |= RK3568_SYS_DSP_INFACE_EN_MIPI0 |
858 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_MIPI0_MUX, vp->id);
859 dip &= ~RK3568_DSP_IF_POL__MIPI_PIN_POL;
860 dip |= FIELD_PREP(RK3568_DSP_IF_POL__MIPI_PIN_POL, polflags);
861 break;
862 case ROCKCHIP_VOP2_EP_MIPI1:
863 die &= ~RK3568_SYS_DSP_INFACE_EN_MIPI1_MUX;
864 die |= RK3568_SYS_DSP_INFACE_EN_MIPI1 |
865 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_MIPI1_MUX, vp->id);
866 dip &= ~RK3568_DSP_IF_POL__MIPI_PIN_POL;
867 dip |= FIELD_PREP(RK3568_DSP_IF_POL__MIPI_PIN_POL, polflags);
868 break;
869 case ROCKCHIP_VOP2_EP_LVDS0:
870 die &= ~RK3568_SYS_DSP_INFACE_EN_LVDS0_MUX;
871 die |= RK3568_SYS_DSP_INFACE_EN_LVDS0 |
872 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_LVDS0_MUX, vp->id);
873 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
874 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
875 break;
876 case ROCKCHIP_VOP2_EP_LVDS1:
877 die &= ~RK3568_SYS_DSP_INFACE_EN_LVDS1_MUX;
878 die |= RK3568_SYS_DSP_INFACE_EN_LVDS1 |
879 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_LVDS1_MUX, vp->id);
880 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
881 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
882 break;
883 default:
884 drm_err(vop2->drm, "Invalid interface id %d on vp%d\n", id, vp->id);
885 return 0;
886 }
887
888 dip |= RK3568_DSP_IF_POL__CFG_DONE_IMD;
889
890 vop2_writel(vop2, RK3568_DSP_IF_EN, die);
891 vop2_writel(vop2, RK3568_DSP_IF_POL, dip);
892
893 return crtc->state->adjusted_mode.crtc_clock * 1000LL;
894 }
895
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP'
2025-03-03 17:20 [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP' kernel test robot
@ 2025-03-04 3:40 ` Andy Yan
2025-03-04 7:39 ` Heiko Stuebner
0 siblings, 1 reply; 4+ messages in thread
From: Andy Yan @ 2025-03-04 3:40 UTC (permalink / raw)
To: kernel test robot; +Cc: oe-kbuild-all, Heiko Stuebner
Hi Heiko,
On 3/4/25 01:20, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
> commit: 328e6885996ca2c6eb8b07d3c9bb1439fdcb088f [7437/7719] drm/rockchip: vop2: Add platform specific callback
> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/config)
> compiler: alpha-linux-gcc (GCC) 14.2.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/reproduce)
I can't reproduce this error on arm64 defconfig, so this let me wonder that should we
let drm/rockchip depends on ARCH_ROCKCHIP, so as to reduce the testing overhead on other
unrelated platforms?
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202503040135.fgoyWdLB-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c: In function 'rk3568_set_intf_mux':
>>> drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP' [-Wimplicit-function-declaration]
> 833 | FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_RGB_MUX, vp->id);
> | ^~~~~~~~~~
>
>
> vim +/FIELD_PREP +833 drivers/gpu/drm/rockchip/rockchip_vop2_reg.c
>
> 819
> 820 static unsigned long rk3568_set_intf_mux(struct vop2_video_port *vp, int id, u32 polflags)
> 821 {
> 822 struct vop2 *vop2 = vp->vop2;
> 823 struct drm_crtc *crtc = &vp->crtc;
> 824 u32 die, dip;
> 825
> 826 die = vop2_readl(vop2, RK3568_DSP_IF_EN);
> 827 dip = vop2_readl(vop2, RK3568_DSP_IF_POL);
> 828
> 829 switch (id) {
> 830 case ROCKCHIP_VOP2_EP_RGB0:
> 831 die &= ~RK3568_SYS_DSP_INFACE_EN_RGB_MUX;
> 832 die |= RK3568_SYS_DSP_INFACE_EN_RGB |
> > 833 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_RGB_MUX, vp->id);
> 834 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
> 835 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
> 836 if (polflags & POLFLAG_DCLK_INV)
> 837 regmap_write(vop2->sys_grf, RK3568_GRF_VO_CON1, BIT(3 + 16) | BIT(3));
> 838 else
> 839 regmap_write(vop2->sys_grf, RK3568_GRF_VO_CON1, BIT(3 + 16));
> 840 break;
> 841 case ROCKCHIP_VOP2_EP_HDMI0:
> 842 die &= ~RK3568_SYS_DSP_INFACE_EN_HDMI_MUX;
> 843 die |= RK3568_SYS_DSP_INFACE_EN_HDMI |
> 844 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_HDMI_MUX, vp->id);
> 845 dip &= ~RK3568_DSP_IF_POL__HDMI_PIN_POL;
> 846 dip |= FIELD_PREP(RK3568_DSP_IF_POL__HDMI_PIN_POL, polflags);
> 847 break;
> 848 case ROCKCHIP_VOP2_EP_EDP0:
> 849 die &= ~RK3568_SYS_DSP_INFACE_EN_EDP_MUX;
> 850 die |= RK3568_SYS_DSP_INFACE_EN_EDP |
> 851 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_EDP_MUX, vp->id);
> 852 dip &= ~RK3568_DSP_IF_POL__EDP_PIN_POL;
> 853 dip |= FIELD_PREP(RK3568_DSP_IF_POL__EDP_PIN_POL, polflags);
> 854 break;
> 855 case ROCKCHIP_VOP2_EP_MIPI0:
> 856 die &= ~RK3568_SYS_DSP_INFACE_EN_MIPI0_MUX;
> 857 die |= RK3568_SYS_DSP_INFACE_EN_MIPI0 |
> 858 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_MIPI0_MUX, vp->id);
> 859 dip &= ~RK3568_DSP_IF_POL__MIPI_PIN_POL;
> 860 dip |= FIELD_PREP(RK3568_DSP_IF_POL__MIPI_PIN_POL, polflags);
> 861 break;
> 862 case ROCKCHIP_VOP2_EP_MIPI1:
> 863 die &= ~RK3568_SYS_DSP_INFACE_EN_MIPI1_MUX;
> 864 die |= RK3568_SYS_DSP_INFACE_EN_MIPI1 |
> 865 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_MIPI1_MUX, vp->id);
> 866 dip &= ~RK3568_DSP_IF_POL__MIPI_PIN_POL;
> 867 dip |= FIELD_PREP(RK3568_DSP_IF_POL__MIPI_PIN_POL, polflags);
> 868 break;
> 869 case ROCKCHIP_VOP2_EP_LVDS0:
> 870 die &= ~RK3568_SYS_DSP_INFACE_EN_LVDS0_MUX;
> 871 die |= RK3568_SYS_DSP_INFACE_EN_LVDS0 |
> 872 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_LVDS0_MUX, vp->id);
> 873 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
> 874 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
> 875 break;
> 876 case ROCKCHIP_VOP2_EP_LVDS1:
> 877 die &= ~RK3568_SYS_DSP_INFACE_EN_LVDS1_MUX;
> 878 die |= RK3568_SYS_DSP_INFACE_EN_LVDS1 |
> 879 FIELD_PREP(RK3568_SYS_DSP_INFACE_EN_LVDS1_MUX, vp->id);
> 880 dip &= ~RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL;
> 881 dip |= FIELD_PREP(RK3568_DSP_IF_POL__RGB_LVDS_PIN_POL, polflags);
> 882 break;
> 883 default:
> 884 drm_err(vop2->drm, "Invalid interface id %d on vp%d\n", id, vp->id);
> 885 return 0;
> 886 }
> 887
> 888 dip |= RK3568_DSP_IF_POL__CFG_DONE_IMD;
> 889
> 890 vop2_writel(vop2, RK3568_DSP_IF_EN, die);
> 891 vop2_writel(vop2, RK3568_DSP_IF_POL, dip);
> 892
> 893 return crtc->state->adjusted_mode.crtc_clock * 1000LL;
> 894 }
> 895
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP'
2025-03-04 3:40 ` Andy Yan
@ 2025-03-04 7:39 ` Heiko Stuebner
2025-03-04 7:46 ` Andy Yan
0 siblings, 1 reply; 4+ messages in thread
From: Heiko Stuebner @ 2025-03-04 7:39 UTC (permalink / raw)
To: kernel test robot, Andy Yan; +Cc: oe-kbuild-all
Hi Andy,
Am Dienstag, 4. März 2025, 04:40:47 MEZ schrieb Andy Yan:
> On 3/4/25 01:20, kernel test robot wrote:
> > tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
> > commit: 328e6885996ca2c6eb8b07d3c9bb1439fdcb088f [7437/7719] drm/rockchip: vop2: Add platform specific callback
> > config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/config)
> > compiler: alpha-linux-gcc (GCC) 14.2.0
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/reproduce)
>
> I can't reproduce this error on arm64 defconfig, so this let me wonder that should we
> let drm/rockchip depends on ARCH_ROCKCHIP, so as to reduce the testing overhead on other
> unrelated platforms?
Hmm, depends.
Limiting Rockchip-drm to ARCH_ROCKCHIP || COMPILE_TEST could make sense,
as as you say, completely different architectures have absolute no use
for this driver.
But the error was real nevertheless. We should never rely on headers
getting included by accident. the vop2-reg.c change does introduces the use
of FIELD_PREP, so we should include the header ourself - as my change from
yesterday did. So the test-robot showed us an actual problem :-)
Heiko
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP'
2025-03-04 7:39 ` Heiko Stuebner
@ 2025-03-04 7:46 ` Andy Yan
0 siblings, 0 replies; 4+ messages in thread
From: Andy Yan @ 2025-03-04 7:46 UTC (permalink / raw)
To: Heiko Stuebner, kernel test robot; +Cc: oe-kbuild-all
Hi Heiko,
On 3/4/25 15:39, Heiko Stuebner wrote:
> Hi Andy,
>
> Am Dienstag, 4. März 2025, 04:40:47 MEZ schrieb Andy Yan:
>> On 3/4/25 01:20, kernel test robot wrote:
>>> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head: cd3215bbcb9d4321def93fea6cfad4d5b42b9d1d
>>> commit: 328e6885996ca2c6eb8b07d3c9bb1439fdcb088f [7437/7719] drm/rockchip: vop2: Add platform specific callback
>>> config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/config)
>>> compiler: alpha-linux-gcc (GCC) 14.2.0
>>> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250304/202503040135.fgoyWdLB-lkp@intel.com/reproduce)
>>
>> I can't reproduce this error on arm64 defconfig, so this let me wonder that should we
>> let drm/rockchip depends on ARCH_ROCKCHIP, so as to reduce the testing overhead on other
>> unrelated platforms?
>
> Hmm, depends.
>
> Limiting Rockchip-drm to ARCH_ROCKCHIP || COMPILE_TEST could make sense,
> as as you say, completely different architectures have absolute no use
> for this driver.
>
> But the error was real nevertheless. We should never rely on headers
> getting included by accident. the vop2-reg.c change does introduces the use
> of FIELD_PREP, so we should include the header ourself - as my change from
> yesterday did. So the test-robot showed us an actual problem :-)
Got it, Thanks for your clarification.
>
>
> Heiko
>
>
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-03-04 7:46 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-03-03 17:20 [linux-next:master 7437/7719] drivers/gpu/drm/rockchip/rockchip_vop2_reg.c:833:28: error: implicit declaration of function 'FIELD_PREP' kernel test robot
2025-03-04 3:40 ` Andy Yan
2025-03-04 7:39 ` Heiko Stuebner
2025-03-04 7:46 ` Andy Yan
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.