projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9171433
)
drm/i915: Also check view->type for a normal GGTT view
author
Chris Wilson
<
[email protected]
>
Tue, 20 Feb 2018 13:42:05 +0000
(13:42 +0000)
committer
Chris Wilson
<
[email protected]
>
Tue, 20 Feb 2018 19:03:59 +0000
(19:03 +0000)
We cannot simply use !view as shorthand for all normal GGTT views as a
few callers will always populate a i915_ggtt_view struct and set the
type to NORMAL instead. So check for (!view || view->type == NORMAL)
inside i915_gem_object_ggtt_pin().
Signed-off-by: Chris Wilson <
[email protected]
>
Cc: Joonas Lahtinen <
[email protected]
>
Reviewed-by: Ville Syrjälä <
[email protected]
>
Link:
https://patchwork.freedesktop.org/patch/msgid/
[email protected]
drivers/gpu/drm/i915/i915_gem.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/i915/i915_gem.c
b/drivers/gpu/drm/i915/i915_gem.c
index 631a2db2bb6e2af1f12b139bf7c1730286dd9311..1a64e88c50e10712cbc7f4800024315fc8c10127 100644
(file)
--- a/
drivers/gpu/drm/i915/i915_gem.c
+++ b/
drivers/gpu/drm/i915/i915_gem.c
@@
-4282,7
+4282,8
@@
i915_gem_object_ggtt_pin(struct drm_i915_gem_object *obj,
lockdep_assert_held(&obj->base.dev->struct_mutex);
- if (!view && flags & PIN_MAPPABLE) {
+ if (flags & PIN_MAPPABLE &&
+ (!view || view->type == I915_GGTT_VIEW_NORMAL)) {
/* If the required space is larger than the available
* aperture, we will not able to find a slot for the
* object and unbinding the object now will be in