[PATCH v2 1/5] drm/vc4: hdmi: Make sure the controller is powered up during bind
kernel test robot
lkp at intel.com
Wed Jul 7 14:44:08 UTC 2021
Hi Maxime,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-tip/drm-tip]
[also build test ERROR on drm-intel/for-linux-next next-20210707]
[cannot apply to anholt/for-next v5.13]
[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]
url: https://github.com/0day-ci/linux/commits/Maxime-Ripard/drm-vc4-hdmi-Fix-CEC-access-while-disabled/20210707-172621
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: nios2-allyesconfig (attached as .config)
compiler: nios2-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://github.com/0day-ci/linux/commit/4342e12ac48418ce6366423771e887fa9fff89eb
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Maxime-Ripard/drm-vc4-hdmi-Fix-CEC-access-while-disabled/20210707-172621
git checkout 4342e12ac48418ce6366423771e887fa9fff89eb
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=nios2
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/vc4/vc4_hdmi.c: In function 'vc4_hdmi_bind':
>> drivers/gpu/drm/vc4/vc4_hdmi.c:2178:8: error: implicit declaration of function 'vc4_hdmi_runtime_resume'; did you mean 'pm_runtime_resume'? [-Werror=implicit-function-declaration]
2178 | ret = vc4_hdmi_runtime_resume(dev);
| ^~~~~~~~~~~~~~~~~~~~~~~
| pm_runtime_resume
At top level:
drivers/gpu/drm/vc4/vc4_hdmi.c:1402:46: warning: 'vc4_hdmi_audio_component_drv' defined but not used [-Wunused-const-variable=]
1402 | static const struct snd_soc_component_driver vc4_hdmi_audio_component_drv = {
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +2178 drivers/gpu/drm/vc4/vc4_hdmi.c
2110
2111 static int vc4_hdmi_bind(struct device *dev, struct device *master, void *data)
2112 {
2113 const struct vc4_hdmi_variant *variant = of_device_get_match_data(dev);
2114 struct platform_device *pdev = to_platform_device(dev);
2115 struct drm_device *drm = dev_get_drvdata(master);
2116 struct vc4_hdmi *vc4_hdmi;
2117 struct drm_encoder *encoder;
2118 struct device_node *ddc_node;
2119 int ret;
2120
2121 vc4_hdmi = devm_kzalloc(dev, sizeof(*vc4_hdmi), GFP_KERNEL);
2122 if (!vc4_hdmi)
2123 return -ENOMEM;
2124 INIT_DELAYED_WORK(&vc4_hdmi->scrambling_work, vc4_hdmi_scrambling_wq);
2125
2126 dev_set_drvdata(dev, vc4_hdmi);
2127 encoder = &vc4_hdmi->encoder.base.base;
2128 vc4_hdmi->encoder.base.type = variant->encoder_type;
2129 vc4_hdmi->encoder.base.pre_crtc_configure = vc4_hdmi_encoder_pre_crtc_configure;
2130 vc4_hdmi->encoder.base.pre_crtc_enable = vc4_hdmi_encoder_pre_crtc_enable;
2131 vc4_hdmi->encoder.base.post_crtc_enable = vc4_hdmi_encoder_post_crtc_enable;
2132 vc4_hdmi->encoder.base.post_crtc_disable = vc4_hdmi_encoder_post_crtc_disable;
2133 vc4_hdmi->encoder.base.post_crtc_powerdown = vc4_hdmi_encoder_post_crtc_powerdown;
2134 vc4_hdmi->pdev = pdev;
2135 vc4_hdmi->variant = variant;
2136
2137 ret = variant->init_resources(vc4_hdmi);
2138 if (ret)
2139 return ret;
2140
2141 ddc_node = of_parse_phandle(dev->of_node, "ddc", 0);
2142 if (!ddc_node) {
2143 DRM_ERROR("Failed to find ddc node in device tree\n");
2144 return -ENODEV;
2145 }
2146
2147 vc4_hdmi->ddc = of_find_i2c_adapter_by_node(ddc_node);
2148 of_node_put(ddc_node);
2149 if (!vc4_hdmi->ddc) {
2150 DRM_DEBUG("Failed to get ddc i2c adapter by node\n");
2151 return -EPROBE_DEFER;
2152 }
2153
2154 /* Only use the GPIO HPD pin if present in the DT, otherwise
2155 * we'll use the HDMI core's register.
2156 */
2157 vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
2158 if (IS_ERR(vc4_hdmi->hpd_gpio)) {
2159 ret = PTR_ERR(vc4_hdmi->hpd_gpio);
2160 goto err_put_ddc;
2161 }
2162
2163 vc4_hdmi->disable_wifi_frequencies =
2164 of_property_read_bool(dev->of_node, "wifi-2.4ghz-coexistence");
2165
2166 if (variant->max_pixel_clock == 600000000) {
2167 struct vc4_dev *vc4 = to_vc4_dev(drm);
2168 long max_rate = clk_round_rate(vc4->hvs->core_clk, 550000000);
2169
2170 if (max_rate < 550000000)
2171 vc4_hdmi->disable_4kp60 = true;
2172 }
2173
2174 /*
2175 * We need to have the device powered up at this point to call
2176 * our reset hook and for the CEC init.
2177 */
> 2178 ret = vc4_hdmi_runtime_resume(dev);
2179 if (ret)
2180 goto err_put_ddc;
2181
2182 pm_runtime_get_noresume(dev);
2183 pm_runtime_set_active(dev);
2184 pm_runtime_enable(dev);
2185
2186 if (vc4_hdmi->variant->reset)
2187 vc4_hdmi->variant->reset(vc4_hdmi);
2188
2189 if ((of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi0") ||
2190 of_device_is_compatible(dev->of_node, "brcm,bcm2711-hdmi1")) &&
2191 HDMI_READ(HDMI_VID_CTL) & VC4_HD_VID_CTL_ENABLE) {
2192 clk_prepare_enable(vc4_hdmi->pixel_clock);
2193 clk_prepare_enable(vc4_hdmi->hsm_clock);
2194 clk_prepare_enable(vc4_hdmi->pixel_bvb_clock);
2195 }
2196
2197 drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_TMDS);
2198 drm_encoder_helper_add(encoder, &vc4_hdmi_encoder_helper_funcs);
2199
2200 ret = vc4_hdmi_connector_init(drm, vc4_hdmi);
2201 if (ret)
2202 goto err_destroy_encoder;
2203
2204 ret = vc4_hdmi_hotplug_init(vc4_hdmi);
2205 if (ret)
2206 goto err_destroy_conn;
2207
2208 ret = vc4_hdmi_cec_init(vc4_hdmi);
2209 if (ret)
2210 goto err_destroy_conn;
2211
2212 ret = vc4_hdmi_audio_init(vc4_hdmi);
2213 if (ret)
2214 goto err_free_cec;
2215
2216 vc4_debugfs_add_file(drm, variant->debugfs_name,
2217 vc4_hdmi_debugfs_regs,
2218 vc4_hdmi);
2219
2220 pm_runtime_put_sync(dev);
2221
2222 return 0;
2223
2224 err_free_cec:
2225 vc4_hdmi_cec_exit(vc4_hdmi);
2226 err_destroy_conn:
2227 vc4_hdmi_connector_destroy(&vc4_hdmi->connector);
2228 err_destroy_encoder:
2229 drm_encoder_cleanup(encoder);
2230 pm_runtime_put_sync(dev);
2231 pm_runtime_disable(dev);
2232 err_put_ddc:
2233 put_device(&vc4_hdmi->ddc->dev);
2234
2235 return ret;
2236 }
2237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 59722 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20210707/7283dc41/attachment-0001.gz>
More information about the dri-devel
mailing list