[PATCH 18/22] drm/vc4: Use simple encoder
kbuild test robot
lkp at intel.com
Fri Mar 6 13:54:37 UTC 2020
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200305]
[cannot apply to rockchip/for-next shawnguo/for-next sunxi/sunxi/for-next tegra/for-next linus/master v5.6-rc4 v5.6-rc3 v5.6-rc2 v5.6-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help
improve the system. BTW, we also suggest to use '--base' option to specify the
base tree in git format-patch, please see https://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Thomas-Zimmermann/drm-Convert-drivers-to-drm_simple_encoder_init/20200306-045931
base: 47466dcf84ee66a973ea7d2fca7e582fe9328932
config: arm64-defconfig (attached as .config)
compiler: clang version 11.0.0 (git://gitmirror/llvm_project a0cd413426479abb207381bdbab862f3dfb3ce7d)
reproduce:
# FIXME the reproduce steps for clang is not ready yet
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp at intel.com>
All errors (new ones prefixed by >>):
>> drivers/gpu//drm/vc4/vc4_dpi.c:309:2: error: implicit declaration of function 'drm_simple_encoder_init' [-Werror,-Wimplicit-function-declaration]
drm_simple_encoder_init(drm, dpi->encoder, DRM_MODE_ENCODER_DPI);
^
drivers/gpu//drm/vc4/vc4_dpi.c:309:2: note: did you mean 'drm_encoder_init'?
include/drm/drm_encoder.h:189:5: note: 'drm_encoder_init' declared here
int drm_encoder_init(struct drm_device *dev,
^
1 error generated.
--
>> drivers/gpu//drm/vc4/vc4_dsi.c:1610:2: error: implicit declaration of function 'drm_simple_encoder_init' [-Werror,-Wimplicit-function-declaration]
drm_simple_encoder_init(drm, dsi->encoder, DRM_MODE_ENCODER_DSI);
^
drivers/gpu//drm/vc4/vc4_dsi.c:1610:2: note: did you mean 'drm_encoder_init'?
include/drm/drm_encoder.h:189:5: note: 'drm_encoder_init' declared here
int drm_encoder_init(struct drm_device *dev,
^
1 error generated.
--
>> drivers/gpu//drm/vc4/vc4_hdmi.c:1389:2: error: implicit declaration of function 'drm_simple_encoder_init' [-Werror,-Wimplicit-function-declaration]
drm_simple_encoder_init(drm, hdmi->encoder, DRM_MODE_ENCODER_TMDS);
^
drivers/gpu//drm/vc4/vc4_hdmi.c:1389:2: note: did you mean 'drm_encoder_init'?
include/drm/drm_encoder.h:189:5: note: 'drm_encoder_init' declared here
int drm_encoder_init(struct drm_device *dev,
^
1 error generated.
--
>> drivers/gpu//drm/vc4/vc4_vec.c:566:2: error: implicit declaration of function 'drm_simple_encoder_init' [-Werror,-Wimplicit-function-declaration]
drm_simple_encoder_init(drm, vec->encoder, DRM_MODE_ENCODER_TVDAC);
^
drivers/gpu//drm/vc4/vc4_vec.c:566:2: note: did you mean 'drm_encoder_init'?
include/drm/drm_encoder.h:189:5: note: 'drm_encoder_init' declared here
int drm_encoder_init(struct drm_device *dev,
^
1 error generated.
vim +/drm_simple_encoder_init +309 drivers/gpu//drm/vc4/vc4_dpi.c
254
255 static int vc4_dpi_bind(struct device *dev, struct device *master, void *data)
256 {
257 struct platform_device *pdev = to_platform_device(dev);
258 struct drm_device *drm = dev_get_drvdata(master);
259 struct vc4_dev *vc4 = to_vc4_dev(drm);
260 struct vc4_dpi *dpi;
261 struct vc4_dpi_encoder *vc4_dpi_encoder;
262 int ret;
263
264 dpi = devm_kzalloc(dev, sizeof(*dpi), GFP_KERNEL);
265 if (!dpi)
266 return -ENOMEM;
267
268 vc4_dpi_encoder = devm_kzalloc(dev, sizeof(*vc4_dpi_encoder),
269 GFP_KERNEL);
270 if (!vc4_dpi_encoder)
271 return -ENOMEM;
272 vc4_dpi_encoder->base.type = VC4_ENCODER_TYPE_DPI;
273 vc4_dpi_encoder->dpi = dpi;
274 dpi->encoder = &vc4_dpi_encoder->base.base;
275
276 dpi->pdev = pdev;
277 dpi->regs = vc4_ioremap_regs(pdev, 0);
278 if (IS_ERR(dpi->regs))
279 return PTR_ERR(dpi->regs);
280 dpi->regset.base = dpi->regs;
281 dpi->regset.regs = dpi_regs;
282 dpi->regset.nregs = ARRAY_SIZE(dpi_regs);
283
284 if (DPI_READ(DPI_ID) != DPI_ID_VALUE) {
285 dev_err(dev, "Port returned 0x%08x for ID instead of 0x%08x\n",
286 DPI_READ(DPI_ID), DPI_ID_VALUE);
287 return -ENODEV;
288 }
289
290 dpi->core_clock = devm_clk_get(dev, "core");
291 if (IS_ERR(dpi->core_clock)) {
292 ret = PTR_ERR(dpi->core_clock);
293 if (ret != -EPROBE_DEFER)
294 DRM_ERROR("Failed to get core clock: %d\n", ret);
295 return ret;
296 }
297 dpi->pixel_clock = devm_clk_get(dev, "pixel");
298 if (IS_ERR(dpi->pixel_clock)) {
299 ret = PTR_ERR(dpi->pixel_clock);
300 if (ret != -EPROBE_DEFER)
301 DRM_ERROR("Failed to get pixel clock: %d\n", ret);
302 return ret;
303 }
304
305 ret = clk_prepare_enable(dpi->core_clock);
306 if (ret)
307 DRM_ERROR("Failed to turn on core clock: %d\n", ret);
308
> 309 drm_simple_encoder_init(drm, dpi->encoder, DRM_MODE_ENCODER_DPI);
310 drm_encoder_helper_add(dpi->encoder, &vc4_dpi_encoder_helper_funcs);
311
312 ret = vc4_dpi_init_bridge(dpi);
313 if (ret)
314 goto err_destroy_encoder;
315
316 dev_set_drvdata(dev, dpi);
317
318 vc4->dpi = dpi;
319
320 vc4_debugfs_add_regset32(drm, "dpi_regs", &dpi->regset);
321
322 return 0;
323
324 err_destroy_encoder:
325 drm_encoder_cleanup(dpi->encoder);
326 clk_disable_unprepare(dpi->core_clock);
327 return ret;
328 }
329
---
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: 47744 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200306/73f50201/attachment-0001.gz>
More information about the dri-devel
mailing list