Re: [PATCH v1 2/3] drm/msm/edp: add support for next gen edp

From: kernel test robot
Date: Wed May 05 2021 - 05:50:29 EST


Hi Sankeerth,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.12 next-20210505]
[cannot apply to drm/drm-next]
[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/Sankeerth-Billakanti/Add-support-for-next-gen-eDP-driver-on-SnapDragon/20210505-162011
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-imx_v6_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-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/a7bc50c70f53224d6cd5d0bd07371ad34d99a75e
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sankeerth-Billakanti/Add-support-for-next-gen-eDP-driver-on-SnapDragon/20210505-162011
git checkout a7bc50c70f53224d6cd5d0bd07371ad34d99a75e
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross W=1 ARCH=arm

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

>> drivers/gpu/drm/msm/edp/v510/edp_v510_ctrl.c:360:5: warning: no previous prototype for 'edp_clk_enable' [-Wmissing-prototypes]
360 | int edp_clk_enable(struct edp_ctrl *ctrl,
| ^~~~~~~~~~~~~~
drivers/gpu/drm/msm/edp/v510/edp_v510_ctrl.c: In function 'edp_fill_link_cfg':
>> drivers/gpu/drm/msm/edp/v510/edp_v510_ctrl.c:587:6: warning: variable 'bpp' set but not used [-Wunused-but-set-variable]
587 | u32 bpp;
| ^~~
>> drivers/gpu/drm/msm/edp/v510/edp_v510_ctrl.c:586:6: warning: variable 'prate' set but not used [-Wunused-but-set-variable]
586 | u32 prate;
| ^~~~~


vim +/edp_clk_enable +360 drivers/gpu/drm/msm/edp/v510/edp_v510_ctrl.c

359
> 360 int edp_clk_enable(struct edp_ctrl *ctrl,
361 enum edp_pm_type pm_type, bool enable)
362 {
363 int rc = 0;
364
365 if (pm_type != EDP_CORE_PM && pm_type != EDP_CTRL_PM &&
366 pm_type != EDP_STREAM_PM) {
367 DRM_ERROR("unsupported power module\n");
368 return -EINVAL;
369 }
370
371 if (enable) {
372 if (pm_type == EDP_CORE_PM && ctrl->core_clks_on) {
373 DRM_DEBUG_DP("core clks already enabled\n");
374 return 0;
375 }
376
377 if (pm_type == EDP_CTRL_PM && ctrl->link_clks_on) {
378 DRM_DEBUG_DP("links clks already enabled\n");
379 return 0;
380 }
381
382 if (pm_type == EDP_STREAM_PM && ctrl->stream_clks_on) {
383 DRM_DEBUG_DP("pixel clks already enabled\n");
384 return 0;
385 }
386
387 if ((pm_type == EDP_CTRL_PM) && (!ctrl->core_clks_on)) {
388 DRM_DEBUG_DP("Enable core clks before link clks\n");
389
390 rc = edp_clk_set_rate(ctrl, EDP_CORE_PM, enable);
391 if (rc) {
392 DRM_ERROR("fail to enable clks: core. err=%d\n",
393 rc);
394 return rc;
395 }
396 ctrl->core_clks_on = true;
397 }
398 }
399
400 rc = edp_clk_set_rate(ctrl, pm_type, enable);
401 if (rc) {
402 DRM_ERROR("failed to '%s' clks. err=%d\n",
403 enable ? "enable" : "disable", rc);
404 return rc;
405 }
406
407 if (pm_type == EDP_CORE_PM)
408 ctrl->core_clks_on = enable;
409 else if (pm_type == EDP_STREAM_PM)
410 ctrl->stream_clks_on = enable;
411 else
412 ctrl->link_clks_on = enable;
413
414 DRM_DEBUG_DP("stream_clks:%s link_clks:%s core_clks:%s\n",
415 ctrl->stream_clks_on ? "on" : "off",
416 ctrl->link_clks_on ? "on" : "off",
417 ctrl->core_clks_on ? "on" : "off");
418
419 return 0;
420 }
421

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip