From: Dan Carpenter <dan.carpenter@oracle.com>
To: matthew.auld@intel.com
Cc: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [bug report] drm/i915/ttm: add tt shmem backend
Date: Thu, 18 Nov 2021 18:01:20 +0300 [thread overview]
Message-ID: <20211118150120.GA22452@kili> (raw)
Hello Matthew Auld,
The patch 7ae034590cea: "drm/i915/ttm: add tt shmem backend" from Oct
18, 2021, leads to the following Smatch static checker warning:
drivers/gpu/drm/i915/gem/i915_gem_ttm.c:335 i915_ttm_eviction_valuable()
warn: signedness bug returning '(-16)'
drivers/gpu/drm/i915/gem/i915_gem_ttm.c
324 static bool i915_ttm_eviction_valuable(struct ttm_buffer_object *bo,
^^^^
325 const struct ttm_place *place)
326 {
327 struct drm_i915_gem_object *obj = i915_ttm_to_gem(bo);
328
329 /*
330 * EXTERNAL objects should never be swapped out by TTM, instead we need
331 * to handle that ourselves. TTM will already skip such objects for us,
332 * but we would like to avoid grabbing locks for no good reason.
333 */
334 if (bo->ttm && bo->ttm->page_flags & TTM_TT_FLAG_EXTERNAL)
--> 335 return -EBUSY;
^^^^^^^^^^^^^^
This should be return false probably.
336
337 /* Will do for now. Our pinned objects are still on TTM's LRU lists */
338 return i915_gem_object_evictable(obj);
339 }
regards,
dan carpenter
next reply other threads:[~2021-11-18 15:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-18 15:01 Dan Carpenter [this message]
2021-11-18 15:15 ` [Intel-gfx] [bug report] drm/i915/ttm: add tt shmem backend Matthew Auld
2021-11-19 7:46 ` Dan Carpenter
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=20211118150120.GA22452@kili \
--to=dan.carpenter@oracle.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=matthew.auld@intel.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