* [PATCH] drm/i915: simplify bind_to_vm init code
@ 2016-03-18 13:54 Matthew Auld
2016-03-21 9:35 ` ✗ Fi.CI.BAT: failure for drm/i915: simplify bind_to_vm init code (rev3) Patchwork
2016-03-22 10:36 ` [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
0 siblings, 2 replies; 3+ messages in thread
From: Matthew Auld @ 2016-03-18 13:54 UTC (permalink / raw)
To: intel-gfx
No functional change, just makes the code easier to follow.
v2:
- Remove local fence_size variable
(Tvrtko Ursulin)
- Remove redundant NULL ggtt_view check
- Reuse size variable
v3:
(Chris Wilson)
- Keep start, end computation separate
- Simplify alignment
Signed-off-by: Matthew Auld <matthew.auld@intel.com>
---
drivers/gpu/drm/i915/i915_gem.c | 52 +++++++++++------------------------------
1 file changed, 13 insertions(+), 39 deletions(-)
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index f45856d..ffb802e 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -3465,48 +3465,23 @@ i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
{
struct drm_device *dev = obj->base.dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- u32 fence_alignment, unfenced_alignment;
+ u32 min_alignment;
u32 search_flag, alloc_flag;
u64 start, end;
- u64 size, fence_size;
+ u64 size;
struct i915_vma *vma;
int ret;
- if (i915_is_ggtt(vm)) {
- u32 view_size;
-
- if (WARN_ON(!ggtt_view))
- return ERR_PTR(-EINVAL);
-
- view_size = i915_ggtt_view_size(obj, ggtt_view);
-
- fence_size = i915_gem_get_gtt_size(dev,
- view_size,
- obj->tiling_mode);
- fence_alignment = i915_gem_get_gtt_alignment(dev,
- view_size,
- obj->tiling_mode,
- true);
- unfenced_alignment = i915_gem_get_gtt_alignment(dev,
- view_size,
- obj->tiling_mode,
- false);
- size = flags & PIN_MAPPABLE ? fence_size : view_size;
- } else {
- fence_size = i915_gem_get_gtt_size(dev,
- obj->base.size,
- obj->tiling_mode);
- fence_alignment = i915_gem_get_gtt_alignment(dev,
- obj->base.size,
- obj->tiling_mode,
- true);
- unfenced_alignment =
- i915_gem_get_gtt_alignment(dev,
- obj->base.size,
+ if (i915_is_ggtt(vm))
+ size = i915_ggtt_view_size(obj, ggtt_view);
+ else
+ size = obj->base.size;
+
+ min_alignment = i915_gem_get_gtt_alignment(dev, size,
obj->tiling_mode,
- false);
- size = flags & PIN_MAPPABLE ? fence_size : obj->base.size;
- }
+ flags & PIN_MAPPABLE);
+ if (flags & PIN_MAPPABLE)
+ size = i915_gem_get_gtt_size(dev, size, obj->tiling_mode);
start = flags & PIN_OFFSET_BIAS ? flags & PIN_OFFSET_MASK : 0;
end = vm->total;
@@ -3516,9 +3491,8 @@ i915_gem_object_bind_to_vm(struct drm_i915_gem_object *obj,
end = min_t(u64, end, (1ULL << 32) - PAGE_SIZE);
if (alignment == 0)
- alignment = flags & PIN_MAPPABLE ? fence_alignment :
- unfenced_alignment;
- if (flags & PIN_MAPPABLE && alignment & (fence_alignment - 1)) {
+ alignment = min_alignment;
+ if (flags & PIN_MAPPABLE && alignment & (min_alignment - 1)) {
DRM_DEBUG("Invalid object (view type=%u) alignment requested %u\n",
ggtt_view ? ggtt_view->type : 0,
alignment);
--
2.4.3
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply related [flat|nested] 3+ messages in thread
* ✗ Fi.CI.BAT: failure for drm/i915: simplify bind_to_vm init code (rev3)
2016-03-18 13:54 [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
@ 2016-03-21 9:35 ` Patchwork
2016-03-22 10:36 ` [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
1 sibling, 0 replies; 3+ messages in thread
From: Patchwork @ 2016-03-21 9:35 UTC (permalink / raw)
To: Matthew Auld; +Cc: intel-gfx
== Series Details ==
Series: drm/i915: simplify bind_to_vm init code (rev3)
URL : https://patchwork.freedesktop.org/series/4531/
State : failure
== Summary ==
Series 4531v3 drm/i915: simplify bind_to_vm init code
http://patchwork.freedesktop.org/api/1.0/series/4531/revisions/3/mbox/
Test gem_ringfill:
Subgroup basic-default-s3:
dmesg-warn -> PASS (bsw-nuc-2)
Test kms_flip:
Subgroup basic-flip-vs-dpms:
pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE
Subgroup basic-flip-vs-wf_vblank:
pass -> FAIL (snb-x220t)
fail -> PASS (byt-nuc)
Subgroup basic-plain-flip:
pass -> DMESG-WARN (hsw-brixbox)
Test kms_pipe_crc_basic:
Subgroup nonblocking-crc-pipe-a:
dmesg-warn -> PASS (snb-x220t)
Subgroup nonblocking-crc-pipe-b:
pass -> DMESG-WARN (hsw-brixbox)
Subgroup suspend-read-crc-pipe-c:
incomplete -> PASS (hsw-gt2)
Test pm_rpm:
Subgroup basic-pci-d3-state:
fail -> DMESG-FAIL (snb-x220t)
dmesg-warn -> PASS (snb-dellxps)
pass -> DMESG-WARN (byt-nuc)
Subgroup basic-rte:
pass -> DMESG-WARN (snb-dellxps)
bdw-nuci7 total:194 pass:182 dwarn:0 dfail:0 fail:0 skip:12
bdw-ultra total:194 pass:173 dwarn:0 dfail:0 fail:0 skip:21
bsw-nuc-2 total:194 pass:157 dwarn:0 dfail:0 fail:0 skip:37
byt-nuc total:194 pass:158 dwarn:1 dfail:0 fail:0 skip:35
hsw-brixbox total:194 pass:170 dwarn:2 dfail:0 fail:0 skip:22
hsw-gt2 total:194 pass:175 dwarn:2 dfail:0 fail:0 skip:17
ilk-hp8440p total:194 pass:130 dwarn:1 dfail:0 fail:0 skip:63
ivb-t430s total:194 pass:169 dwarn:0 dfail:0 fail:0 skip:25
skl-i7k-2 total:194 pass:171 dwarn:0 dfail:0 fail:0 skip:23
snb-dellxps total:194 pass:159 dwarn:1 dfail:0 fail:0 skip:34
snb-x220t total:194 pass:159 dwarn:0 dfail:1 fail:1 skip:33
Results at /archive/results/CI_IGT_test/Patchwork_1645/
e7a7673e9840fe8b50a5a2894c75565ec7858a00 drm-intel-nightly: 2016y-03m-19d-10h-09m-53s UTC integration manifest
e812ad29ac14754f16e94d4c470fa416af4fda4d drm/i915: simplify bind_to_vm init code
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/i915: simplify bind_to_vm init code
2016-03-18 13:54 [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
2016-03-21 9:35 ` ✗ Fi.CI.BAT: failure for drm/i915: simplify bind_to_vm init code (rev3) Patchwork
@ 2016-03-22 10:36 ` Matthew Auld
1 sibling, 0 replies; 3+ messages in thread
From: Matthew Auld @ 2016-03-22 10:36 UTC (permalink / raw)
To: Chris Wilson; +Cc: intel-gfx
Hi Chris,
Are the changes acceptable?
Regards,
Matt
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-03-22 10:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-18 13:54 [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
2016-03-21 9:35 ` ✗ Fi.CI.BAT: failure for drm/i915: simplify bind_to_vm init code (rev3) Patchwork
2016-03-22 10:36 ` [PATCH] drm/i915: simplify bind_to_vm init code Matthew Auld
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.