lkml.org 
[lkml]   [2020]   [Feb]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 02/14] drm/msm/mdp5: Remove direct access of dev->iommu_fwspec
Hi Joerg,

I love your patch! Yet something to improve:

[auto build test ERROR on pm/linux-next]
[also build test ERROR on tegra/for-next linux/master linus/master v5.6-rc3 next-20200228]
[cannot apply to iommu/next]
[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/Joerg-Roedel/iommu-Move-iommu_fwspec-out-of-struct-device/20200229-075740
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: arm-imx_v6_v7_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 7.5.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.5.0 make.cross ARCH=arm

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c: In function 'mdp5_kms_init':
>> drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c:728:8: error: implicit declaration of function 'dev_iommu_fwspec_get'; did you mean 'iommu_fwspec_free'? [-Werror=implicit-function-declaration]
if (!dev_iommu_fwspec_get(iommu_dev))
^~~~~~~~~~~~~~~~~~~~
iommu_fwspec_free
cc1: some warnings being treated as errors

vim +728 drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c

677
678 struct msm_kms *mdp5_kms_init(struct drm_device *dev)
679 {
680 struct msm_drm_private *priv = dev->dev_private;
681 struct platform_device *pdev;
682 struct mdp5_kms *mdp5_kms;
683 struct mdp5_cfg *config;
684 struct msm_kms *kms;
685 struct msm_gem_address_space *aspace;
686 int irq, i, ret;
687 struct device *iommu_dev;
688
689 /* priv->kms would have been populated by the MDP5 driver */
690 kms = priv->kms;
691 if (!kms)
692 return NULL;
693
694 mdp5_kms = to_mdp5_kms(to_mdp_kms(kms));
695
696 mdp_kms_init(&mdp5_kms->base, &kms_funcs);
697
698 pdev = mdp5_kms->pdev;
699
700 irq = irq_of_parse_and_map(pdev->dev.of_node, 0);
701 if (irq < 0) {
702 ret = irq;
703 DRM_DEV_ERROR(&pdev->dev, "failed to get irq: %d\n", ret);
704 goto fail;
705 }
706
707 kms->irq = irq;
708
709 config = mdp5_cfg_get_config(mdp5_kms->cfg);
710
711 /* make sure things are off before attaching iommu (bootloader could
712 * have left things on, in which case we'll start getting faults if
713 * we don't disable):
714 */
715 pm_runtime_get_sync(&pdev->dev);
716 for (i = 0; i < MDP5_INTF_NUM_MAX; i++) {
717 if (mdp5_cfg_intf_is_virtual(config->hw->intf.connect[i]) ||
718 !config->hw->intf.base[i])
719 continue;
720 mdp5_write(mdp5_kms, REG_MDP5_INTF_TIMING_ENGINE_EN(i), 0);
721
722 mdp5_write(mdp5_kms, REG_MDP5_INTF_FRAME_LINE_COUNT_EN(i), 0x3);
723 }
724 mdelay(16);
725
726 if (config->platform.iommu) {
727 iommu_dev = &pdev->dev;
> 728 if (!dev_iommu_fwspec_get(iommu_dev))
729 iommu_dev = iommu_dev->parent;
730
731 aspace = msm_gem_address_space_create(iommu_dev,
732 config->platform.iommu, "mdp5");
733 if (IS_ERR(aspace)) {
734 ret = PTR_ERR(aspace);
735 goto fail;
736 }
737
738 kms->aspace = aspace;
739
740 ret = aspace->mmu->funcs->attach(aspace->mmu);
741 if (ret) {
742 DRM_DEV_ERROR(&pdev->dev, "failed to attach iommu: %d\n",
743 ret);
744 goto fail;
745 }
746 } else {
747 DRM_DEV_INFO(&pdev->dev,
748 "no iommu, fallback to phys contig buffers for scanout\n");
749 aspace = NULL;
750 }
751
752 pm_runtime_put_sync(&pdev->dev);
753
754 ret = modeset_init(mdp5_kms);
755 if (ret) {
756 DRM_DEV_ERROR(&pdev->dev, "modeset_init failed: %d\n", ret);
757 goto fail;
758 }
759
760 dev->mode_config.min_width = 0;
761 dev->mode_config.min_height = 0;
762 dev->mode_config.max_width = 0xffff;
763 dev->mode_config.max_height = 0xffff;
764
765 dev->driver->get_vblank_timestamp = drm_calc_vbltimestamp_from_scanoutpos;
766 dev->driver->get_scanout_position = mdp5_get_scanoutpos;
767 dev->driver->get_vblank_counter = mdp5_get_vblank_counter;
768 dev->max_vblank_count = 0; /* max_vblank_count is set on each CRTC */
769 dev->vblank_disable_immediate = true;
770
771 return kms;
772 fail:
773 if (kms)
774 mdp5_kms_destroy(kms);
775 return ERR_PTR(ret);
776 }
777

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[unhandled content-type:application/gzip]
\
 
 \ /
  Last update: 2020-02-29 04:05    [W:0.106 / U:0.480 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site