tree:
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git tmp
head: 13665f1f8b5d501b40b1bc8448b0a032c7f04cc2
commit: bfe9fb20acec504e96b9124874369ed916bf5bf8 [12079/12184] drm/meson: meson_dw_hdmi:
add bridge and switch to drm_bridge_funcs
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
~/bin/make.cross
chmod +x ~/bin/make.cross
#
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git/c...
git remote add sashal-linux-stable
https://git.kernel.org/pub/scm/linux/kernel/git/sashal/linux-stable.git
git fetch --no-tags sashal-linux-stable tmp
git checkout bfe9fb20acec504e96b9124874369ed916bf5bf8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
> drivers/gpu/drm/meson/meson_dw_hdmi.c:685:13: warning:
'struct drm_bridge_state' declared inside parameter list will not be visible
outside of this definition or declaration
685 | struct drm_bridge_state
*bridge_state,
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:710:13: warning: 'struct
drm_bridge_state' declared inside parameter list will not be visible outside of this
definition or declaration
710 | struct drm_bridge_state *bridge_state,
| ^~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c: In function
'meson_venc_hdmi_encoder_mode_set':
> drivers/gpu/drm/meson/meson_dw_hdmi.c:755:38: warning: passing
argument 3 of 'meson_venc_hdmi_mode_set' discards 'const' qualifier from
pointer target type [-Wdiscarded-qualifiers]
755 |
meson_venc_hdmi_mode_set(priv, vic, mode);
| ^~~~
In file included from drivers/gpu/drm/meson/meson_dw_hdmi.c:32:
drivers/gpu/drm/meson/meson_venc.h:63:35: note: expected 'struct drm_display_mode
*' but argument is of type 'const struct drm_display_mode *'
63 | struct drm_display_mode *mode);
| ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c: At top level:
> drivers/gpu/drm/meson/meson_dw_hdmi.c:765:3: error: 'const
struct drm_bridge_funcs' has no member named 'atomic_duplicate_state'
765 | .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
| ^~~~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/meson/meson_dw_hdmi.c:765:28: error:
'drm_atomic_helper_bridge_duplicate_state' undeclared here (not in a function);
did you mean 'drm_atomic_helper_plane_duplicate_state'?
765 |
.atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_helper_plane_duplicate_state
> drivers/gpu/drm/meson/meson_dw_hdmi.c:765:28: error: positional
initialization of field in 'struct' declared with 'designated_init'
attribute [-Werror=designated-init]
drivers/gpu/drm/meson/meson_dw_hdmi.c:765:28:
note: (near initialization for 'meson_venc_hdmi_encoder_bridge_funcs')
> drivers/gpu/drm/meson/meson_dw_hdmi.c:766:3: error: 'const
struct drm_bridge_funcs' has no member named 'atomic_destroy_state'
766 | .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
| ^~~~~~~~~~~~~~~~~~~~
> drivers/gpu/drm/meson/meson_dw_hdmi.c:766:26: error:
'drm_atomic_helper_bridge_destroy_state' undeclared here (not in a function); did
you mean 'drm_atomic_helper_plane_destroy_state'?
766 |
.atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_helper_plane_destroy_state
drivers/gpu/drm/meson/meson_dw_hdmi.c:766:26: error: positional initialization of field
in 'struct' declared with 'designated_init' attribute
[-Werror=designated-init]
drivers/gpu/drm/meson/meson_dw_hdmi.c:766:26: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs')
> drivers/gpu/drm/meson/meson_dw_hdmi.c:767:3: error: 'const
struct drm_bridge_funcs' has no member named 'atomic_get_input_bus_fmts'
767 | .atomic_get_input_bus_fmts = meson_venc_hdmi_encoder_get_inp_bus_fmts,
| ^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:767:31: error: positional initialization of field
in 'struct' declared with 'designated_init' attribute
[-Werror=designated-init]
767 | .atomic_get_input_bus_fmts = meson_venc_hdmi_encoder_get_inp_bus_fmts,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:767:31: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs')
drivers/gpu/drm/meson/meson_dw_hdmi.c:767:31: error: initialization of 'void
(*)(struct drm_bridge *)' from incompatible pointer type 'u32 * (*)(struct
drm_bridge *, struct drm_bridge_state *, struct drm_crtc_state *, struct
drm_connector_state *, u32, unsigned int *)' {aka 'unsigned int * (*)(struct
drm_bridge *, struct drm_bridge_state *, struct drm_crtc_state *, struct
drm_connector_state *, unsigned int, unsigned int *)'}
[-Werror=incompatible-pointer-types]
drivers/gpu/drm/meson/meson_dw_hdmi.c:767:31: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs.detach')
> drivers/gpu/drm/meson/meson_dw_hdmi.c:768:3: error: 'const
struct drm_bridge_funcs' has no member named 'atomic_reset'
768 |
.atomic_reset = drm_atomic_helper_bridge_reset,
| ^~~~~~~~~~~~
> drivers/gpu/drm/meson/meson_dw_hdmi.c:768:18: error:
'drm_atomic_helper_bridge_reset' undeclared here (not in a function); did you mean
'drm_atomic_helper_plane_reset'?
768 | .atomic_reset =
drm_atomic_helper_bridge_reset,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| drm_atomic_helper_plane_reset
drivers/gpu/drm/meson/meson_dw_hdmi.c:768:18: error: positional initialization of field
in 'struct' declared with 'designated_init' attribute
[-Werror=designated-init]
drivers/gpu/drm/meson/meson_dw_hdmi.c:768:18: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs')
> drivers/gpu/drm/meson/meson_dw_hdmi.c:769:3: error: 'const
struct drm_bridge_funcs' has no member named 'atomic_check'
769 |
.atomic_check = meson_venc_hdmi_encoder_atomic_check,
| ^~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:769:18: error: positional initialization of field
in 'struct' declared with 'designated_init' attribute
[-Werror=designated-init]
769 | .atomic_check = meson_venc_hdmi_encoder_atomic_check,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:769:18: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs')
drivers/gpu/drm/meson/meson_dw_hdmi.c:769:18: error: initialization of 'void
(*)(struct drm_bridge *)' from incompatible pointer type 'int (*)(struct
drm_bridge *, struct drm_bridge_state *, struct drm_crtc_state *, struct
drm_connector_state *)' [-Werror=incompatible-pointer-types]
drivers/gpu/drm/meson/meson_dw_hdmi.c:769:18: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs.enable')
> drivers/gpu/drm/meson/meson_dw_hdmi.c:770:12: warning:
initialized field overwritten [-Woverride-init]
770 | .enable =
meson_venc_hdmi_encoder_enable,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:770:12: note: (near initialization for
'meson_venc_hdmi_encoder_bridge_funcs.enable')
drivers/gpu/drm/meson/meson_dw_hdmi.c: In function 'meson_dw_hdmi_bind':
> drivers/gpu/drm/meson/meson_dw_hdmi.c:1012:2: error: too many
arguments to function 'drm_bridge_attach'
1012 |
drm_bridge_attach(encoder, &meson_dw_hdmi->bridge, NULL, 0);
| ^~~~~~~~~~~~~~~~~
In file included from include/drm/drm_crtc.h:44,
from include/drm/drm_atomic_helper.h:31,
from drivers/gpu/drm/meson/meson_dw_hdmi.c:18:
include/drm/drm_bridge.h:406:5: note: declared here
406 | int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
| ^~~~~~~~~~~~~~~~~
drivers/gpu/drm/meson/meson_dw_hdmi.c:1038:3: error: too many arguments to function
'drm_bridge_attach'
1038 | drm_bridge_attach(encoder, next_bridge,
| ^~~~~~~~~~~~~~~~~
In file included from include/drm/drm_crtc.h:44,
from include/drm/drm_atomic_helper.h:31,
from drivers/gpu/drm/meson/meson_dw_hdmi.c:18:
include/drm/drm_bridge.h:406:5: note: declared here
406 | int drm_bridge_attach(struct drm_encoder *encoder, struct drm_bridge *bridge,
| ^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +765 drivers/gpu/drm/meson/meson_dw_hdmi.c
682
683 static u32 *
684 meson_venc_hdmi_encoder_get_inp_bus_fmts(struct drm_bridge *bridge,
685 struct drm_bridge_state *bridge_state,
686 struct drm_crtc_state *crtc_state,
687 struct drm_connector_state *conn_state,
688 u32 output_fmt,
689 unsigned int *num_input_fmts)
690 {
691 u32 *input_fmts = NULL;
692
693 if (output_fmt == meson_dw_hdmi_out_bus_fmts[0]) {
694 *num_input_fmts = 1;
695 input_fmts = kcalloc(*num_input_fmts,
696 sizeof(*input_fmts),
697 GFP_KERNEL);
698 if (!input_fmts)
699 return NULL;
700
701 input_fmts[0] = output_fmt;
702 } else {
703 *num_input_fmts = 0;
704 }
705
706 return input_fmts;
707 }
708
709 static int meson_venc_hdmi_encoder_atomic_check(struct drm_bridge *bridge,
710 struct drm_bridge_state *bridge_state,
711 struct drm_crtc_state *crtc_state,
712 struct drm_connector_state *conn_state)
713 {
714 return 0;
715 }
716
717 static void meson_venc_hdmi_encoder_disable(struct drm_bridge *bridge)
718 {
719 struct meson_dw_hdmi *dw_hdmi = bridge_to_meson_dw_hdmi(bridge);
720 struct meson_drm *priv = dw_hdmi->priv;
721
722 DRM_DEBUG_DRIVER("\n");
723
724 writel_bits_relaxed(0x3, 0,
725 priv->io_base + _REG(VPU_HDMI_SETTING));
726
727 writel_relaxed(0, priv->io_base + _REG(ENCI_VIDEO_EN));
728 writel_relaxed(0, priv->io_base + _REG(ENCP_VIDEO_EN));
729 }
730
731 static void meson_venc_hdmi_encoder_enable(struct drm_bridge *bridge)
732 {
733 struct meson_dw_hdmi *dw_hdmi = bridge_to_meson_dw_hdmi(bridge);
734 struct meson_drm *priv = dw_hdmi->priv;
735
736 DRM_DEBUG_DRIVER("%s\n", priv->venc.hdmi_use_enci ? "VENCI"
: "VENCP");
737
738 if (priv->venc.hdmi_use_enci)
739 writel_relaxed(1, priv->io_base + _REG(ENCI_VIDEO_EN));
740 else
741 writel_relaxed(1, priv->io_base + _REG(ENCP_VIDEO_EN));
742 }
743
744 static void meson_venc_hdmi_encoder_mode_set(struct drm_bridge *bridge,
745 const struct drm_display_mode *mode,
746 const struct drm_display_mode *adjusted_mode)
747 {
748 struct meson_dw_hdmi *dw_hdmi = bridge_to_meson_dw_hdmi(bridge);
749 struct meson_drm *priv = dw_hdmi->priv;
750 int vic = drm_match_cea_mode(mode);
751
752 DRM_DEBUG_DRIVER("\"%s\" vic %d\n", mode->name, vic);
753
754 /* VENC + VENC-DVI Mode setup */
755 meson_venc_hdmi_mode_set(priv, vic, mode);
756
757 /* VCLK Set clock */
758 dw_hdmi_set_vclk(dw_hdmi, mode);
759
760 /* Setup YUV444 to HDMI-TX, no 10bit diphering */
761 writel_relaxed(0, priv->io_base + _REG(VPU_HDMI_FMT_CTRL));
762 }
763
764 static const struct drm_bridge_funcs meson_venc_hdmi_encoder_bridge_funcs = {
765 .atomic_duplicate_state =
drm_atomic_helper_bridge_duplicate_state,
766 .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
767 .atomic_get_input_bus_fmts = meson_venc_hdmi_encoder_get_inp_bus_fmts,
768 .atomic_reset = drm_atomic_helper_bridge_reset,
769 .atomic_check = meson_venc_hdmi_encoder_atomic_check,
770 .enable = meson_venc_hdmi_encoder_enable,
771 .disable =
meson_venc_hdmi_encoder_disable,
772 .mode_set = meson_venc_hdmi_encoder_mode_set,
773 };
774
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org