Hi Chaoyi,

kernel test robot noticed the following build errors:

[auto build test ERROR on rockchip/for-next]
[also build test ERROR on linus/master v6.15 next-20250527]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]

url:    
https://github.com/intel-lab-lkp/linux/commits/Chaoyi-Chen/drm-rockchip-cdn-dp-Convert-to-drm-bridge/20250527-161941
base:   
https://git.kernel.org/pub/scm/linux/kernel/git/mmind/linux-rockchip.git 
for-next
patch link:    
https://lore.kernel.org/r/20250527081447.304-1-kernel%40airkyi.com
patch subject: [PATCH v3] drm/rockchip: cdn-dp: Convert to drm bridge
config: i386-buildonly-randconfig-002-20250527 
(https://download.01.org/0day-ci/archive/20250528/202505280026.8vdl0twn-...@intel.com/config)
compiler: clang version 20.1.2 (https://github.com/llvm/llvm-project 
58df0ef89dd64126512e4ee27b4ac3fd8ddf6247)
reproduce (this is a W=1 build): 
(https://download.01.org/0day-ci/archive/20250528/202505280026.8vdl0twn-...@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 <l...@intel.com>
| Closes: 
https://lore.kernel.org/oe-kbuild-all/202505280026.8vdl0twn-...@intel.com/

All errors (new ones prefixed by >>):

>> drivers/gpu/drm/rockchip/cdn-dp-core.c:783:17: error: incompatible pointer 
>> types passing 'struct drm_device *' to parameter of type 'const struct 
>> device *' [-Werror,-Wincompatible-pointer-types]
     783 |                 DRM_DEV_ERROR(bridge->dev, "Invalid format %d\n", 
daifmt->fmt);
         |                               ^~~~~~~~~~~
   include/drm/drm_print.h:504:17: note: expanded from macro 'DRM_DEV_ERROR'
     504 |         drm_dev_printk(dev, KERN_ERR, "*ERROR* " fmt, ##__VA_ARGS__)
         |                        ^~~
   include/drm/drm_print.h:488:42: note: passing argument to parameter 'dev' 
here
     488 | void drm_dev_printk(const struct device *dev, const char *level,
         |                                          ^
>> drivers/gpu/drm/rockchip/cdn-dp-core.c:844:3: error: field designator 
>> 'dp_audio_prepare' does not refer to any field in type 'const struct 
>> drm_bridge_funcs'; did you mean 'hdmi_audio_prepare'?
     844 |         .dp_audio_prepare = cdn_dp_audio_prepare,
         |          ^~~~~~~~~~~~~~~~
         |          hdmi_audio_prepare
   include/drm/drm_bridge.h:702:8: note: 'hdmi_audio_prepare' declared here
     702 |         int (*hdmi_audio_prepare)(struct drm_connector *connector,
         |               ^
>> drivers/gpu/drm/rockchip/cdn-dp-core.c:845:3: error: field designator 
>> 'dp_audio_mute_stream' does not refer to any field in type 'const struct 
>> drm_bridge_funcs'; did you mean 'hdmi_audio_mute_stream'?
     845 |         .dp_audio_mute_stream = cdn_dp_audio_mute_stream,
         |          ^~~~~~~~~~~~~~~~~~~~
         |          hdmi_audio_mute_stream
   include/drm/drm_bridge.h:728:8: note: 'hdmi_audio_mute_stream' declared here
     728 |         int (*hdmi_audio_mute_stream)(struct drm_connector 
*connector,
         |               ^
>> drivers/gpu/drm/rockchip/cdn-dp-core.c:846:3: error: field designator 
>> 'dp_audio_shutdown' does not refer to any field in type 'const struct 
>> drm_bridge_funcs'; did you mean 'hdmi_audio_shutdown'?
     846 |         .dp_audio_shutdown = cdn_dp_audio_shutdown,
         |          ^~~~~~~~~~~~~~~~~
         |          hdmi_audio_shutdown
   include/drm/drm_bridge.h:716:9: note: 'hdmi_audio_shutdown' declared here
     716 |         void (*hdmi_audio_shutdown)(struct drm_connector *connector,
         |                ^
>> drivers/gpu/drm/rockchip/cdn-dp-core.c:1011:4: error: use of undeclared 
>> identifier 'DRM_BRIDGE_OP_DP_AUDIO'
    1011 |                         DRM_BRIDGE_OP_DP_AUDIO;
         |                         ^
>> drivers/gpu/drm/rockchip/cdn-dp-core.c:1046:9: error: use of undeclared 
>> label 'err_free_connector'
    1046 |                         goto err_free_connector;
         |                              ^
   drivers/gpu/drm/rockchip/cdn-dp-core.c:1114:7: error: call to undeclared 
function 'devm_drm_bridge_alloc'; ISO C99 and later do not support implicit 
function declarations [-Wimplicit-function-declaration]
    1114 |         dp = devm_drm_bridge_alloc(dev, struct cdn_dp_device, bridge,
         |              ^
   drivers/gpu/drm/rockchip/cdn-dp-core.c:1114:7: note: did you mean 
'devm_drm_bridge_add'?
   include/drm/drm_bridge.h:945:5: note: 'devm_drm_bridge_add' declared here
     945 | int devm_drm_bridge_add(struct device *dev, struct drm_bridge 
*bridge);
         |     ^
   drivers/gpu/drm/rockchip/cdn-dp-core.c:1114:34: error: expected expression
    1114 |         dp = devm_drm_bridge_alloc(dev, struct cdn_dp_device, bridge,
         |                                         ^
   drivers/gpu/drm/rockchip/cdn-dp-core.c:1114:56: error: use of undeclared 
identifier 'bridge'
    1114 |         dp = devm_drm_bridge_alloc(dev, struct cdn_dp_device, bridge,
         |                                                               ^
   9 errors generated.


vim +783 drivers/gpu/drm/rockchip/cdn-dp-core.c

   755  
   756  static int cdn_dp_audio_prepare(struct drm_connector *connector,
   757                                  struct drm_bridge *bridge,
   758                                  struct hdmi_codec_daifmt *daifmt,
   759                                  struct hdmi_codec_params *params)
   760  {
   761          struct cdn_dp_device *dp = bridge_to_dp(bridge);
   762          struct audio_info audio = {
   763                  .sample_width = params->sample_width,
   764                  .sample_rate = params->sample_rate,
   765                  .channels = params->channels,
   766          };
   767          int ret;
   768  
   769          mutex_lock(&dp->lock);
   770          if (!dp->active) {
   771                  ret = -ENODEV;
   772                  goto out;
   773          }
   774  
   775          switch (daifmt->fmt) {
   776          case HDMI_I2S:
   777                  audio.format = AFMT_I2S;
   778                  break;
   779          case HDMI_SPDIF:
   780                  audio.format = AFMT_SPDIF;
   781                  break;
   782          default:
 > 783                  DRM_DEV_ERROR(bridge->dev, "Invalid format %d\n", 
 > daifmt->fmt);
   784                  ret = -EINVAL;
   785                  goto out;
   786          }
   787  
   788          ret = cdn_dp_audio_config(dp, &audio);
   789          if (!ret)
   790                  dp->audio_info = audio;
   791  
   792  out:
   793          mutex_unlock(&dp->lock);
   794          return ret;
   795  }
   796  
   797  static void cdn_dp_audio_shutdown(struct drm_connector *connector,
   798                                    struct drm_bridge *bridge)
   799  {
   800          struct cdn_dp_device *dp = bridge_to_dp(bridge);
   801          int ret;
   802  
   803          mutex_lock(&dp->lock);
   804          if (!dp->active)
   805                  goto out;
   806  
   807          ret = cdn_dp_audio_stop(dp, &dp->audio_info);
   808          if (!ret)
   809                  dp->audio_info.format = AFMT_UNUSED;
   810  out:
   811          mutex_unlock(&dp->lock);
   812  }
   813  
   814  static int cdn_dp_audio_mute_stream(struct drm_connector *connector,
   815                                      struct drm_bridge *bridge,
   816                                      bool enable, int direction)
   817  {
   818          struct cdn_dp_device *dp = bridge_to_dp(bridge);
   819          int ret;
   820  
   821          mutex_lock(&dp->lock);
   822          if (!dp->active) {
   823                  ret = -ENODEV;
   824                  goto out;
   825          }
   826  
   827          ret = cdn_dp_audio_mute(dp, enable);
   828  
   829  out:
   830          mutex_unlock(&dp->lock);
   831          return ret;
   832  }
   833  
   834  static const struct drm_bridge_funcs cdn_dp_bridge_funcs = {
   835          .atomic_duplicate_state = 
drm_atomic_helper_bridge_duplicate_state,
   836          .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state,
   837          .atomic_reset = drm_atomic_helper_bridge_reset,
   838          .detect = cdn_dp_bridge_detect,
   839          .edid_read = cdn_dp_bridge_edid_read,
   840          .atomic_enable = cdn_dp_bridge_atomic_enable,
   841          .atomic_disable = cdn_dp_bridge_atomic_disable,
   842          .mode_valid = cdn_dp_bridge_mode_valid,
   843  
 > 844          .dp_audio_prepare = cdn_dp_audio_prepare,
 > 845          .dp_audio_mute_stream = cdn_dp_audio_mute_stream,
 > 846          .dp_audio_shutdown = cdn_dp_audio_shutdown,
   847  };
   848  

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

Reply via email to