AMD-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Chunming Zhou <david1.zhou@amd.com>
Cc: "Christian König" <ckoenig.leichtzumerken@gmail.com>,
	dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org,
	jason@jlekstrand.net, Christian.Koenig@amd.com,
	kbuild-all@01.org
Subject: Re: [PATCH 5/9] drm/syncobj: use the timeline point in drm_syncobj_find_fence v3
Date: Sat, 16 Mar 2019 09:10:38 +0800	[thread overview]
Message-ID: <201903160916.VoLqh8kD%lkp@intel.com> (raw)
In-Reply-To: <20190315120959.25489-5-david1.zhou@amd.com>

Hi Chunming,

I love your patch! Perhaps something to improve:

[auto build test WARNING on linus/master]
[also build test WARNING on next-20190306]
[cannot apply to v5.0]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Chunming-Zhou/dma-buf-add-new-dma_fence_chain-container-v5/20190316-055452
reproduce:
        # apt-get install sparse
        make ARCH=x86_64 allmodconfig
        make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'


sparse warnings: (new ones prefixed by >>)

>> drivers/gpu/drm/drm_syncobj.c:239:42: sparse: constant 5000000000 is so big it is long
   include/linux/slab.h:664:13: sparse: undefined identifier '__builtin_mul_overflow'
   include/linux/slab.h:664:13: sparse: not a function <noident>
   include/linux/slab.h:664:13: sparse: not a function <noident>
   include/linux/slab.h:664:13: sparse: not a function <noident>
   include/linux/slab.h:664:13: sparse: call with no type!

vim +239 drivers/gpu/drm/drm_syncobj.c

   215	
   216	/* 5s */
   217	#define DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT 5000000000
   218	/**
   219	 * drm_syncobj_find_fence - lookup and reference the fence in a sync object
   220	 * @file_private: drm file private pointer
   221	 * @handle: sync object handle to lookup.
   222	 * @point: timeline point
   223	 * @flags: DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT or not
   224	 * @fence: out parameter for the fence
   225	 *
   226	 * This is just a convenience function that combines drm_syncobj_find() and
   227	 * drm_syncobj_fence_get().
   228	 *
   229	 * Returns 0 on success or a negative error value on failure. On success @fence
   230	 * contains a reference to the fence, which must be released by calling
   231	 * dma_fence_put().
   232	 */
   233	int drm_syncobj_find_fence(struct drm_file *file_private,
   234				   u32 handle, u64 point, u64 flags,
   235				   struct dma_fence **fence)
   236	{
   237		struct drm_syncobj *syncobj = drm_syncobj_find(file_private, handle);
   238		struct syncobj_wait_entry wait;
 > 239		u64 timeout = nsecs_to_jiffies64(DRM_SYNCOBJ_WAIT_FOR_SUBMIT_TIMEOUT);
   240		int ret;
   241	
   242		if (!syncobj)
   243			return -ENOENT;
   244	
   245		*fence = drm_syncobj_fence_get(syncobj);
   246		drm_syncobj_put(syncobj);
   247	
   248		if (*fence) {
   249			ret = dma_fence_chain_find_seqno(fence, point);
   250			if (!ret)
   251				return 0;
   252			dma_fence_put(*fence);
   253		} else {
   254			ret = -EINVAL;
   255		}
   256	
   257		if (!(flags & DRM_SYNCOBJ_WAIT_FLAGS_WAIT_FOR_SUBMIT))
   258			return ret;
   259	
   260		memset(&wait, 0, sizeof(wait));
   261		wait.task = current;
   262		wait.point = point;
   263		drm_syncobj_fence_add_wait(syncobj, &wait);
   264	
   265		do {
   266			set_current_state(TASK_INTERRUPTIBLE);
   267			if (wait.fence) {
   268				ret = 0;
   269				break;
   270			}
   271	                if (timeout == 0) {
   272	                        ret = -ETIME;
   273	                        break;
   274	                }
   275	
   276			if (signal_pending(current)) {
   277				ret = -ERESTARTSYS;
   278				break;
   279			}
   280	
   281	                timeout = schedule_timeout(timeout);
   282		} while (1);
   283	
   284		__set_current_state(TASK_RUNNING);
   285		*fence = wait.fence;
   286	
   287		if (wait.node.next)
   288			drm_syncobj_remove_wait(syncobj, &wait);
   289	
   290		return ret;
   291	}
   292	EXPORT_SYMBOL(drm_syncobj_find_fence);
   293	

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2019-03-16  1:10 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-15 12:09 [PATCH 1/9] dma-buf: add new dma_fence_chain container v5 Chunming Zhou
2019-03-15 12:09 ` [PATCH 2/9] drm/syncobj: add new drm_syncobj_add_point interface v4 Chunming Zhou
2019-03-15 12:09 ` [PATCH 3/9] drm/syncobj: add support for timeline point wait v8 Chunming Zhou
2019-03-18 16:59   ` Lionel Landwerlin
     [not found]     ` <5b68b54a-5d8d-9666-bd45-aa53b6b295e7-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-03-18 17:20       ` Koenig, Christian
     [not found]         ` <990db9e7-6cae-1165-637c-84aed3a9af49-5C7GfCeVMHo@public.gmane.org>
2019-03-18 18:19           ` Lionel Landwerlin
2019-03-15 12:09 ` [PATCH 4/9] drm/syncobj: add timeline payload query ioctl v6 Chunming Zhou
2019-03-15 12:09 ` [PATCH 6/9] drm/amdgpu: add timeline support in amdgpu CS v3 Chunming Zhou
     [not found] ` <20190315120959.25489-1-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2019-03-15 12:09   ` [PATCH 5/9] drm/syncobj: use the timeline point in drm_syncobj_find_fence v3 Chunming Zhou
2019-03-16  1:10     ` kbuild test robot [this message]
2019-03-15 12:09   ` [PATCH 7/9] drm/syncobj: add transition iotcls between binary and timeline v2 Chunming Zhou
2019-03-15 12:09   ` [PATCH 8/9] drm/syncobj: add timeline signal ioctl for syncobj v3 Chunming Zhou
     [not found]     ` <20190315120959.25489-8-david1.zhou-5C7GfCeVMHo@public.gmane.org>
2019-03-19 11:54       ` Lionel Landwerlin
     [not found]         ` <78d9e191-7cdd-c9f1-c33e-2707b44e4932-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-03-20  3:53           ` zhoucm1
     [not found]             ` <e4f8f010-2649-f8fc-5949-9b652a3e977e-5C7GfCeVMHo@public.gmane.org>
2019-03-20 11:58               ` Lionel Landwerlin
2019-03-20 13:23               ` Lionel Landwerlin
2019-03-15 12:09   ` [PATCH 9/9] drm/amdgpu: update version for timeline syncobj support in amdgpu Chunming Zhou
2019-03-19 12:27   ` [PATCH 1/9] dma-buf: add new dma_fence_chain container v5 Lionel Landwerlin
     [not found]     ` <946e2cc2-eda7-7e7f-80ad-fa7161942930-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
2019-03-19 12:29       ` Christian König
  -- strict thread matches above, loose matches on Subject: below --
2019-03-12  3:10 Chunming Zhou
2019-03-12  3:10 ` [PATCH 5/9] drm/syncobj: use the timeline point in drm_syncobj_find_fence v3 Chunming Zhou

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=201903160916.VoLqh8kD%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Christian.Koenig@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=ckoenig.leichtzumerken@gmail.com \
    --cc=david1.zhou@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jason@jlekstrand.net \
    --cc=kbuild-all@01.org \
    /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