mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-22 20:53:00 +07:00
drm/i915/gem: Prefer drm_WARN* over WARN*
struct drm_device specific drm_WARN* macros include device information in the backtrace, so we know what device the warnings originate from. Prefer drm_WARN* over WARN* at places where struct drm_device pointer can be extracted. Signed-off-by: Pankaj Bharadiya <pankaj.laxminarayan.bharadiya@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20200504181600.18503-6-pankaj.laxminarayan.bharadiya@intel.com
This commit is contained in:
parent
ef3929b64b
commit
6db20e27f6
@ -1626,7 +1626,7 @@ eb_relocate_entry(struct i915_execbuffer *eb,
|
||||
err = i915_vma_bind(target->vma,
|
||||
target->vma->obj->cache_level,
|
||||
PIN_GLOBAL, NULL);
|
||||
if (WARN_ONCE(err,
|
||||
if (drm_WARN_ONCE(&i915->drm, err,
|
||||
"Unexpected failure to bind target VMA!"))
|
||||
return err;
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ static int i915_gem_object_get_pages_phys(struct drm_i915_gem_object *obj)
|
||||
void *dst;
|
||||
int i;
|
||||
|
||||
if (WARN_ON(i915_gem_object_needs_bit17_swizzle(obj)))
|
||||
if (drm_WARN_ON(obj->base.dev,
|
||||
i915_gem_object_needs_bit17_swizzle(obj)))
|
||||
return -EINVAL;
|
||||
|
||||
/*
|
||||
|
@ -235,7 +235,7 @@ i915_gem_userptr_init__mmu_notifier(struct drm_i915_gem_object *obj,
|
||||
if (flags & I915_USERPTR_UNSYNCHRONIZED)
|
||||
return capable(CAP_SYS_ADMIN) ? 0 : -EPERM;
|
||||
|
||||
if (WARN_ON(obj->userptr.mm == NULL))
|
||||
if (drm_WARN_ON(obj->base.dev, obj->userptr.mm == NULL))
|
||||
return -EINVAL;
|
||||
|
||||
mn = i915_mmu_notifier_find(obj->userptr.mm);
|
||||
|
Loading…
Reference in New Issue
Block a user