dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>,
	dri-devel@lists.freedesktop.org,
	linux-samsung-soc@vger.kernel.org
Cc: Andrzej Hajda <a.hajda@samsung.com>,
	Marek Szyprowski <m.szyprowski@samsung.com>,
	kbuild-all@lists.01.org, Seung-Woo Kim <sw0312.kim@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: Re: [PATCH] drm/exynos: Fix dma_parms allocation
Date: Thu, 21 May 2020 05:04:25 +0800	[thread overview]
Message-ID: <202005210513.FYgqc5Jg%lkp@intel.com> (raw)
In-Reply-To: <20200520110632.30780-1-m.szyprowski@samsung.com>

[-- Attachment #1: Type: text/plain, Size: 5191 bytes --]

Hi Marek,

I love your patch! Perhaps something to improve:

[auto build test WARNING on drm-exynos/exynos-drm-next]
[also build test WARNING on drm-intel/for-linux-next tegra-drm/drm/tegra/for-next v5.7-rc6 next-20200519]
[cannot apply to drm/drm-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/Marek-Szyprowski/drm-exynos-Fix-dma_parms-allocation/20200521-015443
base:   https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
config: alpha-allyesconfig (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.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
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=alpha 

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

All warnings (new ones prefixed by >>, old ones prefixed by <<):

drivers/gpu/drm/exynos/exynos_drm_dma.c: In function 'drm_iommu_attach_device':
>> drivers/gpu/drm/exynos/exynos_drm_dma.c:47:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
47 |  int ret;
|      ^~~

vim +/ret +47 drivers/gpu/drm/exynos/exynos_drm_dma.c

67fbf3a3ef84436c Andrzej Hajda    2018-10-12  33  
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  34  /*
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  35   * drm_iommu_attach_device- attach device to iommu mapping
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  36   *
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  37   * @drm_dev: DRM device
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  38   * @subdrv_dev: device to be attach
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  39   *
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  40   * This function should be called by sub drivers to attach it to iommu
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  41   * mapping.
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  42   */
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  43  static int drm_iommu_attach_device(struct drm_device *drm_dev,
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  44  				struct device *subdrv_dev, void **dma_priv)
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  45  {
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  46  	struct exynos_drm_private *priv = drm_dev->dev_private;
67fbf3a3ef84436c Andrzej Hajda    2018-10-12 @47  	int ret;
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  48  
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  49  	if (get_dma_ops(priv->dma_dev) != get_dma_ops(subdrv_dev)) {
6f83d20838c09936 Inki Dae         2019-04-15  50  		DRM_DEV_ERROR(subdrv_dev, "Device %s lacks support for IOMMU\n",
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  51  			  dev_name(subdrv_dev));
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  52  		return -EINVAL;
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  53  	}
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  54  
1698f69d5f384fad Marek Szyprowski 2020-05-20  55  	dma_set_max_seg_size(subdrv_dev, DMA_BIT_MASK(32));
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  56  	if (IS_ENABLED(CONFIG_ARM_DMA_USE_IOMMU)) {
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  57  		/*
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  58  		 * Keep the original DMA mapping of the sub-device and
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  59  		 * restore it on Exynos DRM detach, otherwise the DMA
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  60  		 * framework considers it as IOMMU-less during the next
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  61  		 * probe (in case of deferred probe or modular build)
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  62  		 */
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  63  		*dma_priv = to_dma_iommu_mapping(subdrv_dev);
07dc3678bacc2a75 Marek Szyprowski 2020-03-09  64  		if (*dma_priv)
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  65  			arm_iommu_detach_device(subdrv_dev);
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  66  
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  67  		ret = arm_iommu_attach_device(subdrv_dev, priv->mapping);
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  68  	} else if (IS_ENABLED(CONFIG_IOMMU_DMA)) {
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  69  		ret = iommu_attach_device(priv->mapping, subdrv_dev);
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  70  	}
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  71  
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  72  	return 0;
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  73  }
67fbf3a3ef84436c Andrzej Hajda    2018-10-12  74  

:::::: The code at line 47 was first introduced by commit
:::::: 67fbf3a3ef84436c58b5ead53b4b866125ad7ce9 drm/exynos/iommu: merge IOMMU and DMA code

:::::: TO: Andrzej Hajda <a.hajda@samsung.com>
:::::: CC: Inki Dae <inki.dae@samsung.com>

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

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 61434 bytes --]

[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

      reply	other threads:[~2020-05-20 21:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20200520110638eucas1p1d92eb5d669f195d2124ce93d9789850e@eucas1p1.samsung.com>
2020-05-20 11:06 ` [PATCH] drm/exynos: Fix dma_parms allocation Marek Szyprowski
2020-05-20 21:04   ` kbuild test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202005210513.FYgqc5Jg%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=a.hajda@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=sw0312.kim@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).