[Intel-gfx] [CI 2/2] drm/i915: Show PCI power state under debugfs/i915_runtime_pm_status
As the current PCI power state is an essential feature of runtime pm, include it in the debugfs/i915_runtime_pm_status. v2: Use pci_power_name() Signed-off-by: Chris Wilson Cc: Imre Deak Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 6b384d7738f1..0b25228c202e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -2694,10 +2694,8 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) struct drm_device *dev = node->minor->dev; struct drm_i915_private *dev_priv = dev->dev_private; - if (!HAS_RUNTIME_PM(dev)) { - seq_puts(m, "not supported\n"); - return 0; - } + if (!HAS_RUNTIME_PM(dev_priv)) + seq_puts(m, "Runtime power management not supported\n"); seq_printf(m, "GPU idle: %s\n", yesno(!dev_priv->mm.busy)); seq_printf(m, "IRQs disabled: %s\n", @@ -2708,6 +2706,9 @@ static int i915_runtime_pm_status(struct seq_file *m, void *unused) #else seq_printf(m, "Device Power Management (CONFIG_PM) disabled\n"); #endif + seq_printf(m, "PCI device power state: %s [%d]\n", + pci_power_name(dev_priv->dev->pdev->current_state), + dev_priv->dev->pdev->current_state); return 0; } -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI 1/2] drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer
Since describe_obj() looks at state guarded by the struct_mutex, we need to be holding it. [ 580.201054] drv_suspend: starting subtest debugfs-reader [ 580.239652] [ cut here ] [ 580.239696] WARNING: CPU: 0 PID: 920 at include/linux/list_check.h:25 describe_obj+0x419/0x440() [ 580.239725] CPU: 0 PID: 920 Comm: cat Not tainted 4.5.0-rc6+ #835 [ 580.239745] Hardware name: /NUC5CPYB, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 580.239767] 88027554fcf8 812c1135 [ 580.239815] 8193dc42 88027554fd30 8107419d 880071727c00 [ 580.239858] 8802757d8000 818f693c 818f693c 8802757b9048 [ 580.239896] Call Trace: [ 580.239917] [] dump_stack+0x67/0x92 [ 580.239939] [] warn_slowpath_common+0x7d/0xb0 [ 580.239959] [] warn_slowpath_null+0x1a/0x20 [ 580.239981] [] describe_obj+0x419/0x440 [ 580.240006] [] i915_gem_framebuffer_info+0xa2/0x100 [ 580.240033] [] seq_read+0xe6/0x3b0 [ 580.240059] [] __vfs_read+0x28/0xd0 [ 580.240085] [] ? SyS_fadvise64+0x228/0x2c0 [ 580.240112] [] vfs_read+0x82/0x110 [ 580.240137] [] SyS_read+0x49/0xa0 [ 580.240162] [] entry_SYSCALL_64_fastpath+0x12/0x6b [ 580.240187] ---[ end trace 3e2cbf34576c9878 ]--- [ 580.281900] [ cut here ] Signed-off-by: Chris Wilson Reviewed-by: Daniel Vetter --- drivers/gpu/drm/i915/i915_debugfs.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 74f227415765..6b384d7738f1 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -134,6 +134,8 @@ describe_obj(struct seq_file *m, struct drm_i915_gem_object *obj) int pin_count = 0; enum intel_engine_id id; + lockdep_assert_held(&obj->base.dev->struct_mutex); + seq_printf(m, "%pK: %s%s%s%s %8zdKiB %02x %02x [ ", &obj->base, obj->active ? "*" : " ", @@ -1894,6 +1896,11 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) struct drm_device *dev = node->minor->dev; struct intel_framebuffer *fbdev_fb = NULL; struct drm_framebuffer *drm_fb; + int ret; + + ret = mutex_lock_interruptible(&dev->struct_mutex); + if (ret) + return ret; #ifdef CONFIG_DRM_FBDEV_EMULATION if (to_i915(dev)->fbdev) { @@ -1928,6 +1935,7 @@ static int i915_gem_framebuffer_info(struct seq_file *m, void *data) seq_putc(m, '\n'); } mutex_unlock(&dev->mode_config.fb_lock); + mutex_unlock(&dev->struct_mutex); return 0; } -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/2] drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer
== Series Details == Series: series starting with [CI,1/2] drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer URL : https://patchwork.freedesktop.org/series/5235/ State : success == Summary == Series 5235v1 Series without cover letter http://patchwork.freedesktop.org/api/1.0/series/5235/revisions/1/mbox/ Test kms_flip: Subgroup basic-flip-vs-wf_vblank: fail -> PASS (snb-x220t) fail -> PASS (ilk-hp8440p) UNSTABLE Test kms_force_connector_basic: Subgroup force-connector-state: pass -> SKIP (ivb-t430s) Subgroup force-edid: pass -> SKIP (ivb-t430s) bdw-nuci7total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultratotal:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 bsw-nuc-2total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 hsw-gt2 total:17 pass:13 dwarn:0 dfail:0 fail:0 skip:3 ilk-hp8440p total:196 pass:132 dwarn:0 dfail:0 fail:0 skip:64 ivb-t430stotal:196 pass:169 dwarn:0 dfail:0 fail:0 skip:27 snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34 snb-x220ttotal:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33 Results at /archive/results/CI_IGT_test/Patchwork_1782/ ce3f49e2a53a54308ed171613c2567f04fab8228 drm-intel-nightly: 2016y-04m-01d-20h-30m-13s UTC integration manifest bf7969308eb88942dab4eceaf91aa8c317468875 drm/i915: Show PCI power state under debugfs/i915_runtime_pm_status e35f64aba51dc5c4b6a70abd41f263227c7b5ffa drm/i915: Add struct_mutex locking for debugs/i915_gem_framebuffer ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [Regression report] Weekly regression report WW14
WW14 Regression report. Last week regressions +---+---+++ | BugId | Summary | Created on | Bisect | +---+---+++ | 94748 | Black screen on Skylake (mouse position relat | 2016-03-29 | No | +---+---+++ Previous Regressions +---+---+++ | BugId | Summary | Created on | Bisect | +---+---+++ | 72782 | [945GM bisected] screen blank on S3 resume on | 2013-12-17 | Yes| | 81537 | [snb dp regression] dp retry forever due to s | 2014-07-19 | No | | 84855 | [ILK regression]igt kms_rotation_crc/sprite-r | 2014-10-10 | No | | 84974 | [VLV eDP-LVDS bisected] powerdomains: Screen | 2014-10-14 | Yes| | 87131 | [PNV regression] igt/gem_exec_lut_handle take | 2014-12-09 | No | | 87662 | [ALL 3.18 Bisected] DVI --rotation inverted c | 2014-12-24 | Yes| | 87725 | [BDW Bisected] OglBatch7 performance reduced | 2014-12-26 | Yes| | 87726 | [BDW Bisected] OglDrvCtx performance reduced | 2014-12-26 | Yes| | 88124 | i915: regression: after DP connected monitor | 2015-01-06 | No | | 88439 | [BDW Bisected]igt/gem_reloc_vs_gpu/forked-fau | 2015-01-15 | Yes| | 89334 | [945 regression] 4.0-rc1 kernel GPU hang: ec | 2015-02-26 | No | | 89629 | [i965 regression]igt/kms_rotation_crc/sprite- | 2015-03-18 | No | | 89632 | [i965 regression]igt/kms_universal_plane/univ | 2015-03-18 | No | | 89728 | [HSW/BDW/BSW/BYT bisected] igt / pm_rps / res | 2015-03-23 | Yes| | 89872 | [ HSW Bisected ] VGA was white screen when re | 2015-04-02 | Yes| | 90112 | [BSW bisected] OglGSCloth/Lightsmark/CS/ Port | 2015-04-20 | Yes| | 90134 | [BSW Bisected]GFXBench3_gl_driver/GFXBench3_g | 2015-04-22 | Yes| | 90368 | [SNB BSW SKL BXT KBL] bisected igt/kms_3d has | 2015-05-08 | Yes| | 90732 | [BDW/BSW Bisected]igt/gem_reloc_vs_gpu/forked | 2015-05-29 | Yes| | 90994 | [BDW regression] pm_rpm subtests fail and giv | 2015-06-16 | No | | 91378 | [hsw dp regression] 06ea66b6 (5.4GHz link clo | 2015-07-17 | No | | 91844 | [HSW Regression] intel_do_flush_locked failed | 2015-09-02 | No | | 91959 | [865g 3.19 regression] Desktop image is disto | 2015-09-10 | No | | 91974 | [bisected] unrecoverable black screen after k | 2015-09-11 | Yes| | 92050 | [regression]/bug introduced by commit [0e572f | 2015-09-19 | No | | 92083 | [regression] [git pull] drm for 4.3 | 2015-09-23 | No | | 92096 | regression/bug introduced by commit [0e572fe7 | 2015-09-24 | No | | 92237 | [SNB]Horrible noise (audio) via DisplayPort [ | 2015-10-02 | No | | 92414 | [Intel-gfx] As of kernel 4.3-rc1 system will | 2015-10-10 | Yes| | 92502 | [SKL] [Regression] igt/kms_flip/2x-flip-vs-ex | 2015-10-16 | No | | 92575 | [4.2 regression] Massive graphics corruption | 2015-10-21 | No | | 92972 | Black screen on Intel NUC hardware (i915) pos | 2015-11-16 | No | | 93122 | [SNB BAT IGT regression] pm_rpm started skipp | 2015-11-26 | No | | 93263 | 945GM regression since 4.3| 2015-12-05 | No | | 93393 | Regression for Skylake modesetting in kernel | 2015-12-16 | No | | 93802 | [IVB bisected] switching to tty1 causes fifo | 2016-01-20 | Yes| | 93971 | video framerate performance regression with U | 2016-02-02 | No | | 94337 | Linux 4.5 regression: FIFO underruns on Skyla | 2016-02-29 | No | | 94416 | [KBL HSW] [Regression] kms_frontbuffer_tracki | 2016-03-06 | No | | 94430 | [HSW+nvidia] regression: display becomes "dis | 2016-03-07 | No | | 94585 | [KBL BSW] igt/gem_reset_stats regression for | 2016-03-17 | No | | 94587 | [KBL] igt/kms_plane/plane-panning-bottom-righ | 2016-03-17 | No | | 94588 | [KBL/BSW/BXT] igt/gem_reloc_overflow regressi | 2016-03-17 | No | | 94590 | [KBL/BXT] igt/kms_fbcon_fbt/psr-suspend regre | 2016-03-17 | No | | 94593 | Flickering Screen on Dell XPS13 9350 [BISECT] | 2016-03-17 | Yes| | 94676 | Possible kernel regression for gen3 and earli | 2016-03-23 | No | +---+---+++ ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/3] drm/i915/userptr: Hold mmref whilst calling get-user-pages
Holding a reference to the containing task_struct is not sufficient to prevent the mm_struct from being reaped under memory pressure. If this happens whilst we are calling get_user_pages(), explosions errupt - sometimes an immediate GPF, sometimes page flag corruption. To prevent the target mm from being reaped as we are reading from it, acquire a reference before we begin. Testcase: igt/gem_shrink/*userptr Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski Cc: sta...@vger.kernel.org --- drivers/gpu/drm/i915/i915_gem_userptr.c | 29 + 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c index 92b39186b05a..960bb37f458f 100644 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c @@ -547,19 +547,24 @@ __i915_gem_userptr_get_pages_worker(struct work_struct *_work) if (pvec != NULL) { struct mm_struct *mm = obj->userptr.mm->mm; - down_read(&mm->mmap_sem); - while (pinned < npages) { - ret = get_user_pages_remote(work->task, mm, - obj->userptr.ptr + pinned * PAGE_SIZE, - npages - pinned, - !obj->userptr.read_only, 0, - pvec + pinned, NULL); - if (ret < 0) - break; - - pinned += ret; + ret = -EFAULT; + if (atomic_inc_not_zero(&mm->mm_users)) { + down_read(&mm->mmap_sem); + while (pinned < npages) { + ret = get_user_pages_remote + (work->task, mm, +obj->userptr.ptr + pinned * PAGE_SIZE, +npages - pinned, +!obj->userptr.read_only, 0, +pvec + pinned, NULL); + if (ret < 0) + break; + + pinned += ret; + } + up_read(&mm->mmap_sem); + mmput(mm); } - up_read(&mm->mmap_sem); } mutex_lock(&dev->struct_mutex); -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915: Store i915 pointer for userptr i915_mm_struct
Since we only ever use the drm_i915_private from the stored i915_mm_struct->dev, save some electons by storing the right backpointer. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski --- drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c index 960bb37f458f..cb41919063d2 100644 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c @@ -34,7 +34,7 @@ struct i915_mm_struct { struct mm_struct *mm; - struct drm_device *dev; + struct drm_i915_private *i915; struct i915_mmu_notifier *mn; struct hlist_node node; struct kref kref; @@ -250,13 +250,13 @@ i915_mmu_notifier_find(struct i915_mm_struct *mm) return mn; down_write(&mm->mm->mmap_sem); - mutex_lock(&to_i915(mm->dev)->mm_lock); + mutex_lock(&mm->i915->mm_lock); if ((mn = mm->mn) == NULL) { mn = i915_mmu_notifier_create(mm->mm); if (!IS_ERR(mn)) mm->mn = mn; } - mutex_unlock(&to_i915(mm->dev)->mm_lock); + mutex_unlock(&mm->i915->mm_lock); up_write(&mm->mm->mmap_sem); return mn; @@ -373,7 +373,7 @@ i915_gem_userptr_init__mm_struct(struct drm_i915_gem_object *obj) } kref_init(&mm->kref); - mm->dev = obj->base.dev; + mm->i915 = to_i915(obj->base.dev); mm->mm = current->mm; atomic_inc(¤t->mm->mm_count); @@ -408,7 +408,7 @@ __i915_mm_struct_free(struct kref *kref) /* Protected by dev_priv->mm_lock */ hash_del(&mm->node); - mutex_unlock(&to_i915(mm->dev)->mm_lock); + mutex_unlock(&mm->i915->mm_lock); INIT_WORK(&mm->work, __i915_mm_struct_free__worker); schedule_work(&mm->work); -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns
In order to ensure that all invalidations are completed before the operation returns to userspace (i.e. before the mmap() syscall returns) we need to flush the outstanding operations. To this end, we submit all the per-object invalidation work to a private workqueue and then flush the workqueue at the end of the function. We are allowed to block inside invalidate_range_start, and struct_mutex is the inner lock so the worker is not hiding any lock inversions. The advantage of using the workqueue over direct calling of cancel_userptr() is that it allows us to parallelise the potential waits and unpinning of large objects. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=94699 Testcase: igt/gem_userptr_blits/sync-unmap-cycles Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Cc: Michał Winiarski --- drivers/gpu/drm/i915/i915_gem_userptr.c | 48 - 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_gem_userptr.c b/drivers/gpu/drm/i915/i915_gem_userptr.c index 291a9393493d..92b39186b05a 100644 --- a/drivers/gpu/drm/i915/i915_gem_userptr.c +++ b/drivers/gpu/drm/i915/i915_gem_userptr.c @@ -49,6 +49,7 @@ struct i915_mmu_notifier { struct hlist_node node; struct mmu_notifier mn; struct rb_root objects; + struct workqueue_struct *wq; }; struct i915_mmu_object { @@ -60,6 +61,40 @@ struct i915_mmu_object { bool attached; }; +static void wait_rendering(struct drm_i915_gem_object *obj) +{ + struct drm_device *dev = obj->base.dev; + struct drm_i915_gem_request *requests[I915_NUM_ENGINES]; + unsigned reset_counter; + int i, n; + + if (!obj->active) + return; + + n = 0; + for (i = 0; i < I915_NUM_ENGINES; i++) { + struct drm_i915_gem_request *req; + + req = obj->last_read_req[i]; + if (req == NULL) + continue; + + requests[n++] = i915_gem_request_reference(req); + } + + reset_counter = atomic_read(&to_i915(dev)->gpu_error.reset_counter); + mutex_unlock(&dev->struct_mutex); + + for (i = 0; i < n; i++) + __i915_wait_request(requests[i], reset_counter, false, + NULL, NULL); + + mutex_lock(&dev->struct_mutex); + + for (i = 0; i < n; i++) + i915_gem_request_unreference(requests[i]); +} + static void cancel_userptr(struct work_struct *work) { struct i915_mmu_object *mo = container_of(work, typeof(*mo), work); @@ -75,6 +110,8 @@ static void cancel_userptr(struct work_struct *work) struct i915_vma *vma, *tmp; bool was_interruptible; + wait_rendering(obj); + was_interruptible = dev_priv->mm.interruptible; dev_priv->mm.interruptible = false; @@ -140,7 +177,7 @@ static void i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier *_mn, */ mo = container_of(it, struct i915_mmu_object, it); if (kref_get_unless_zero(&mo->obj->base.refcount)) - schedule_work(&mo->work); + queue_work(mn->wq, &mo->work); list_add(&mo->link, &cancelled); it = interval_tree_iter_next(it, start, end); @@ -148,6 +185,8 @@ static void i915_gem_userptr_mn_invalidate_range_start(struct mmu_notifier *_mn, list_for_each_entry(mo, &cancelled, link) del_object(mo); spin_unlock(&mn->lock); + + flush_workqueue(mn->wq); } static const struct mmu_notifier_ops i915_gem_userptr_notifier = { @@ -167,10 +206,16 @@ i915_mmu_notifier_create(struct mm_struct *mm) spin_lock_init(&mn->lock); mn->mn.ops = &i915_gem_userptr_notifier; mn->objects = RB_ROOT; + mn->wq = alloc_workqueue("i915-userptr-release", WQ_UNBOUND, 0); + if (mn->wq == NULL) { + kfree(mn); + return ERR_PTR(-ENOMEM); + } /* Protected by mmap_sem (write-lock) */ ret = __mmu_notifier_register(&mn->mn, mm); if (ret) { + destroy_workqueue(mn->wq); kfree(mn); return ERR_PTR(ret); } @@ -256,6 +301,7 @@ i915_mmu_notifier_free(struct i915_mmu_notifier *mn, return; mmu_notifier_unregister(&mn->mn, mm); + destroy_workqueue(mn->wq); kfree(mn); } -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/ddi: Silence compiler warning for unknown output type
Silences src/drivers/gpu/drm/i915/intel_ddi.c: warning: 'port' may be used uninitialized in this function [-Wuninitialized] Reported-by: Geert Uytterhoeven Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 766156f88ef4..921edf183d22 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -315,6 +315,9 @@ static void ddi_get_encoder_port(struct intel_encoder *intel_encoder, *dig_port = enc_to_mst(encoder)->primary; *port = (*dig_port)->port; break; + default: + WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); + /* fallthrough and treat as unknown */ case INTEL_OUTPUT_DISPLAYPORT: case INTEL_OUTPUT_EDP: case INTEL_OUTPUT_HDMI: @@ -326,9 +329,6 @@ static void ddi_get_encoder_port(struct intel_encoder *intel_encoder, *dig_port = NULL; *port = PORT_E; break; - default: - WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); - break; } } -- 2.8.0.rc3 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 2/3] drm/i915/userptr: Hold mmref whilst calling get-user-pages
On Sun, Apr 03, 2016 at 06:14:06PM +0100, Chris Wilson wrote: > Holding a reference to the containing task_struct is not sufficient to > prevent the mm_struct from being reaped under memory pressure. If this > happens whilst we are calling get_user_pages(), explosions errupt - > sometimes an immediate GPF, sometimes page flag corruption. To prevent > the target mm from being reaped as we are reading from it, acquire a > reference before we begin. > > Testcase: igt/gem_shrink/*userptr > Signed-off-by: Chris Wilson > Cc: Tvrtko Ursulin > Cc: Michał Winiarski > Cc: sta...@vger.kernel.org Reviewed-by: Michał Winiarski -Michał > --- > drivers/gpu/drm/i915/i915_gem_userptr.c | 29 + > 1 file changed, 17 insertions(+), 12 deletions(-) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 3/3] drm/i915: Store i915 pointer for userptr i915_mm_struct
On Sun, Apr 03, 2016 at 06:14:07PM +0100, Chris Wilson wrote: > Since we only ever use the drm_i915_private from the stored > i915_mm_struct->dev, save some electons by storing the right > backpointer. > > Signed-off-by: Chris Wilson > Cc: Tvrtko Ursulin > Cc: Michał Winiarski s/electons/electrons ;) Reviewed-by: Michał Winiarski -Michał > --- > drivers/gpu/drm/i915/i915_gem_userptr.c | 10 +- > 1 file changed, 5 insertions(+), 5 deletions(-) ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH i-g-t] Adding tests using COMMIT_ATOMIC path
From: pvishwak v2: (Marius) Updated commit message https://patchwork.freedesktop.org/patch/76040/ Signed-off-by: Pratik Vishwakarma --- tests/kms_rotation_crc.c | 24 1 file changed, 24 insertions(+) diff --git a/tests/kms_rotation_crc.c b/tests/kms_rotation_crc.c index f94f8f1..4af41cf 100644 --- a/tests/kms_rotation_crc.c +++ b/tests/kms_rotation_crc.c @@ -111,6 +111,9 @@ static void commit_crtc(data_t *data, igt_output_t *output, igt_plane_t *plane) commit = COMMIT_UNIVERSAL; } + if (data->display.is_atomic) + commit = COMMIT_ATOMIC; + igt_display_commit2(display, commit); } @@ -250,6 +253,9 @@ static void test_plane_rotation(data_t *data, enum igt_plane plane_type) commit = COMMIT_UNIVERSAL; } + if (data->display.is_atomic) + commit = COMMIT_ATOMIC; + for_each_connected_output(display, output) { for_each_pipe(display, pipe) { igt_plane_t *plane; @@ -340,6 +346,9 @@ static void test_plane_rotation_ytiled_obj(data_t *data, enum igt_plane plane_ty commit = COMMIT_UNIVERSAL; } + if (data->display.is_atomic) + commit = COMMIT_ATOMIC; + mode = igt_output_get_mode(output); w = mode->hdisplay; h = mode->vdisplay; @@ -404,6 +413,9 @@ static void test_plane_rotation_exhaust_fences(data_t *data, enum igt_plane plan commit = COMMIT_UNIVERSAL; } + if (data->display.is_atomic) + commit = COMMIT_ATOMIC; + mode = igt_output_get_mode(output); w = mode->hdisplay; h = mode->vdisplay; @@ -579,6 +591,18 @@ igt_main test_plane_rotation_exhaust_fences(&data, IGT_PLANE_PRIMARY); } + igt_subtest_f("atomic-primary-rotation-180") { + igt_require(data.display.is_atomic); + data.rotation = IGT_ROTATION_180; + test_plane_rotation(&data, IGT_PLANE_PRIMARY); + } + + igt_subtest_f("atomic-sprite-rotation-180") { + igt_require(data.display.is_atomic); + data.rotation = IGT_ROTATION_180; + test_plane_rotation(&data, IGT_PLANE_2); + } + igt_fixture { igt_display_fini(&data.display); } -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Set ctx->ppgtt to aliasing PPGTT if full PPGTT mode isn't enabled
In populate_lr_context(), if the ctx->ppgtt == NULL, then it will populate the PDPs with aliasing PPGTT. This patch will directly set the ctx->ppgtt to aliasing PPGTT if full PPGTT mode isn't enabled when creating a context. Signed-off-by: Zhi Wang --- drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- drivers/gpu/drm/i915/intel_lrc.c| 4 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index fe580cb..4012540 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -306,7 +306,8 @@ i915_gem_create_context(struct drm_device *dev, } ctx->ppgtt = ppgtt; - } + } else + ctx->ppgtt = to_i915(dev)->mm.aliasing_ppgtt; trace_i915_context_create(ctx); diff --git a/drivers/gpu/drm/i915/intel_lrc.c b/drivers/gpu/drm/i915/intel_lrc.c index 5d4ca3b..5765ebd 100644 --- a/drivers/gpu/drm/i915/intel_lrc.c +++ b/drivers/gpu/drm/i915/intel_lrc.c @@ -2363,15 +2363,11 @@ populate_lr_context(struct intel_context *ctx, struct drm_i915_gem_object *ctx_o struct intel_ringbuffer *ringbuf) { struct drm_device *dev = engine->dev; - struct drm_i915_private *dev_priv = dev->dev_private; struct i915_hw_ppgtt *ppgtt = ctx->ppgtt; struct page *page; uint32_t *reg_state; int ret; - if (!ppgtt) - ppgtt = dev_priv->mm.aliasing_ppgtt; - ret = i915_gem_object_set_to_cpu_domain(ctx_obj, true); if (ret) { DRM_DEBUG_DRIVER("Could not set to CPU domain\n"); -- 1.9.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/ddi: Silence compiler warning for unknown output type
On su, 2016-04-03 at 21:59 +0100, Chris Wilson wrote: > Silences > > src/drivers/gpu/drm/i915/intel_ddi.c: warning: 'port' may be used > uninitialized in this function [-Wuninitialized] > > Reported-by: Geert Uytterhoeven > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/intel_ddi.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_ddi.c > b/drivers/gpu/drm/i915/intel_ddi.c > index 766156f88ef4..921edf183d22 100644 > --- a/drivers/gpu/drm/i915/intel_ddi.c > +++ b/drivers/gpu/drm/i915/intel_ddi.c > @@ -315,6 +315,9 @@ static void ddi_get_encoder_port(struct intel_encoder > *intel_encoder, > *dig_port = enc_to_mst(encoder)->primary; > *port = (*dig_port)->port; > break; > + default: > + WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); > + /* fallthrough and treat as unknown */ While touching it, might as well fix into MISSING_CASE. With that; Reviewed-by: Joonas Lahtinen > case INTEL_OUTPUT_DISPLAYPORT: > case INTEL_OUTPUT_EDP: > case INTEL_OUTPUT_HDMI: > @@ -326,9 +329,6 @@ static void ddi_get_encoder_port(struct intel_encoder > *intel_encoder, > *dig_port = NULL; > *port = PORT_E; > break; > - default: > - WARN(1, "Invalid DDI encoder type %d\n", intel_encoder->type); > - break; > } > } > -- Joonas Lahtinen Open Source Technology Center Intel Corporation ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns
== Series Details == Series: series starting with [1/3] drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns URL : https://patchwork.freedesktop.org/series/5240/ State : success == Summary == Series 5240v1 Series without cover letter http://patchwork.freedesktop.org/api/1.0/series/5240/revisions/1/mbox/ Test drv_hangman: Subgroup error-state-basic: fail -> PASS (ilk-hp8440p) Test kms_flip: Subgroup basic-flip-vs-modeset: dmesg-warn -> PASS (ilk-hp8440p) UNSTABLE bdw-nuci7total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultratotal:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 bsw-nuc-2total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 hsw-gt2 total:196 pass:179 dwarn:0 dfail:0 fail:0 skip:17 ilk-hp8440p total:196 pass:132 dwarn:0 dfail:0 fail:0 skip:64 ivb-t430stotal:196 pass:171 dwarn:0 dfail:0 fail:0 skip:25 skl-i7k-2total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23 snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34 snb-x220ttotal:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33 Results at /archive/results/CI_IGT_test/Patchwork_1783/ 5633965ef152b136c22fe9858723be52116f8686 drm-intel-nightly: 2016y-04m-03d-14h-10m-49s UTC integration manifest 1b04d2337e24f073d462756f8a436a45a5e56d0a drm/i915: Store i915 pointer for userptr i915_mm_struct 76a09a33791a45a9b04c6cef416ff32dcc4df8d6 drm/i915/userptr: Hold mmref whilst calling get-user-pages 95f732b120f4073018e359adc26cff1194b2653d drm/i915/userptr: Flush cancellations before mmu-notifier invalidate returns ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/ddi: Silence compiler warning for unknown output type
== Series Details == Series: drm/i915/ddi: Silence compiler warning for unknown output type URL : https://patchwork.freedesktop.org/series/5247/ State : success == Summary == Series 5247v1 drm/i915/ddi: Silence compiler warning for unknown output type http://patchwork.freedesktop.org/api/1.0/series/5247/revisions/1/mbox/ Test drv_hangman: Subgroup error-state-basic: fail -> PASS (ilk-hp8440p) Test drv_module_reload_basic: pass -> SKIP (ivb-t430s) Test kms_flip: Subgroup basic-flip-vs-dpms: pass -> DMESG-WARN (ilk-hp8440p) UNSTABLE Subgroup basic-flip-vs-modeset: dmesg-warn -> PASS (ilk-hp8440p) UNSTABLE bdw-nuci7total:196 pass:184 dwarn:0 dfail:0 fail:0 skip:12 bdw-ultratotal:196 pass:175 dwarn:0 dfail:0 fail:0 skip:21 bsw-nuc-2total:196 pass:159 dwarn:0 dfail:0 fail:0 skip:37 byt-nuc total:196 pass:161 dwarn:0 dfail:0 fail:0 skip:35 hsw-brixbox total:196 pass:174 dwarn:0 dfail:0 fail:0 skip:22 hsw-gt2 total:196 pass:179 dwarn:0 dfail:0 fail:0 skip:17 ilk-hp8440p total:196 pass:131 dwarn:1 dfail:0 fail:0 skip:64 ivb-t430stotal:196 pass:170 dwarn:0 dfail:0 fail:0 skip:26 skl-i7k-2total:196 pass:173 dwarn:0 dfail:0 fail:0 skip:23 snb-dellxps total:196 pass:162 dwarn:0 dfail:0 fail:0 skip:34 snb-x220ttotal:196 pass:162 dwarn:0 dfail:0 fail:1 skip:33 Results at /archive/results/CI_IGT_test/Patchwork_1784/ 5633965ef152b136c22fe9858723be52116f8686 drm-intel-nightly: 2016y-04m-03d-14h-10m-49s UTC integration manifest aa4e21fe8519eaaf6679f7eb2ba110c0726f79f6 drm/i915/ddi: Silence compiler warning for unknown output type ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx