Re: [Intel-gfx] [PATCH] drm/i915/gt: Cleanup heartbeat systole first
Chris Wilson writes: > Before we grab the engine wakeref, tidy up the previous heartbeat > request. If we then abort because the engine powerwell is off, we ensure > the request is freed as we know we will not have freed it when > cancelling the work (as the work is running!). > > Fixes: 841e86728615 ("drm/i915/gt: Only drop heartbeat.systole if the sole > owner") > References: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > index 06aa14c7aa8c..c91fd4e4af29 100644 > --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > @@ -63,15 +63,15 @@ static void heartbeat(struct work_struct *wrk) > struct intel_context *ce = engine->kernel_context; > struct i915_request *rq; > > - if (!intel_engine_pm_get_if_awake(engine)) > - return; > - > rq = engine->heartbeat.systole; > if (rq && i915_request_completed(rq)) { > i915_request_put(rq); > engine->heartbeat.systole = NULL; > } > > + if (!intel_engine_pm_get_if_awake(engine)) > + return; > + > if (intel_gt_is_wedged(engine->gt)) > goto out; > > -- > 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gem: Safely acquire the ctx->vm when copying
== Series Details == Series: drm/i915/gem: Safely acquire the ctx->vm when copying URL : https://patchwork.freedesktop.org/series/69044/ State : success == Summary == CI Bug Log - changes from CI_DRM_7266_full -> Patchwork_15148_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15148_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_exec@basic-invalid-context-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +19 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb1/igt@gem_ctx_e...@basic-invalid-context-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb5/igt@gem_ctx_e...@basic-invalid-context-vcs1.html * igt@gem_ctx_isolation@vcs1-dirty-create: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +2 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb4/igt@gem_ctx_isolat...@vcs1-dirty-create.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb6/igt@gem_ctx_isolat...@vcs1-dirty-create.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb3/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb2/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110854]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb2/igt@gem_exec_balan...@smoke.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb7/igt@gem_exec_balan...@smoke.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +8 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-iclb8/igt@gem_exec_sched...@preempt-other-chain-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-iclb1/igt@gem_exec_sched...@preempt-other-chain-bsd.html * igt@gem_softpin@noreloc-s3: - shard-apl: [PASS][11] -> [DMESG-WARN][12] ([fdo#108566]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-apl8/igt@gem_soft...@noreloc-s3.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-apl6/igt@gem_soft...@noreloc-s3.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-snb5/igt@gem_userptr_bl...@sync-unmap.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html * igt@i915_pm_rc6_residency@rc6-accuracy: - shard-kbl: [PASS][15] -> [SKIP][16] ([fdo#109271]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-kbl6/igt@i915_pm_rc6_reside...@rc6-accuracy.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-kbl3/igt@i915_pm_rc6_reside...@rc6-accuracy.html * igt@kms_color@pipe-a-ctm-0-75: - shard-skl: [PASS][17] -> [DMESG-WARN][18] ([fdo#106107]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl8/igt@kms_co...@pipe-a-ctm-0-75.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl3/igt@kms_co...@pipe-a-ctm-0-75.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-glk9/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-glk9/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html * igt@kms_draw_crc@draw-method-rgb565-blt-xtiled: - shard-skl: [PASS][21] -> [FAIL][22] ([fdo#103184] / [fdo#103232]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl7/igt@kms_draw_...@draw-method-rgb565-blt-xtiled.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl7/igt@kms_draw_...@draw-method-rgb565-blt-xtiled.html * igt@kms_flip@flip-vs-expired-vblank: - shard-skl: [PASS][23] -> [FAIL][24] ([fdo#105363]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7266/shard-skl5/igt@kms_f...@flip-vs-expired-vblank.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15148/shard-skl8/igt@kms_f...@flip-vs-expired-vblank.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-kbl: [PASS][25] -> [DMESG-WARN][26] ([fdo#108566]) +3 similar issues [25]: https://intel-gfx-ci
Re: [Intel-gfx] [PATCH 1/2] drm/i915/tgl: Implement Wa_1604555607
On 2019-10-01 at 13:16:11 -0700, Lucas De Marchi wrote: > On Tue, Oct 1, 2019 at 10:36 AM Chris Wilson wrote: > > > > Quoting Ramalingam C (2019-10-01 18:26:23) > > > From: Michel Thierry > > > > > > Implement Wa_1604555607 (set the DS pairing timer to 128 cycles). > > > FF_MODE2 is part of the register state context, that's why it is > > > implemented here. > > > > > > v2: Rebased on top of the WA refactoring (Oscar) > > > v3: Correctly add to ctx_workarounds_init (Michel) > > > > > > BSpec: 19363 > > > HSDES: 1604555607 > > > Signed-off-by: Michel Thierry > > > Signed-off-by: Ramalingam C > > > --- > > > drivers/gpu/drm/i915/gt/intel_workarounds.c | 9 + > > > drivers/gpu/drm/i915/i915_reg.h | 5 + > > > 2 files changed, 14 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c > > > b/drivers/gpu/drm/i915/gt/intel_workarounds.c > > > index ba65e5018978..4049b876492a 100644 > > > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c > > > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c > > > @@ -567,9 +567,18 @@ static void icl_ctx_workarounds_init(struct > > > intel_engine_cs *engine, > > > static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, > > > struct i915_wa_list *wal) > > > { > > > + struct drm_i915_private *dev_priv = engine->i915; > > > + u32 val; > > > + > > > /* Wa_1409142259 */ > > > WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3, > > > GEN12_DISABLE_CPS_AWARE_COLOR_PIPE); > > > + > > > + /* Wa_1604555607:tgl */ > > > + val = I915_READ(FF_MODE2); > > > > No, you can't use indiscriminate mmio access that may not match the engine > > (engine->gt->uncore). > > > > But really consider doing the rmw as part of the wa. > > And: > https://patchwork.freedesktop.org/patch/319952/?series=64274&rev=1 > https://patchwork.freedesktop.org/patch/317654/?series=63670&rev=2 > > Please don't simply resend patches that were already reviewed. Lucas, Are you planning pursue the merge of these patches. Verification is not fixed at B Stepping too. And we need this WA for the performance. Thanks, -Ram > > Lucas De Marchi > > > > > > + val &= ~FF_MODE2_TDS_TIMER_MASK; > > > + val |= FF_MODE2_TDS_TIMER_128; > > > + wa_write_masked_or(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, val); > > > } > > ___ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx > > > > -- > Lucas De Marchi ___ 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: Use rcu_dereference for rcu protected pointer
On Wed, Nov 06, 2019 at 08:52:58AM +, Chris Wilson wrote: Quoting Niranjan Vishwanathapura (2019-11-06 02:16:42) On Wed, Nov 06, 2019 at 12:36:47AM +, Chris Wilson wrote: >Quoting Niranjana Vishwanathapura (2019-11-06 00:02:05) >> 'ctx\->vm' is rcu protected, so use rcu_dereference inside >> read side critical section. It fixes a sparse warning. >> >> Cc: Chris P Wilson >> Signed-off-by: Niranjana Vishwanathapura >> --- >> drivers/gpu/drm/i915/gem/i915_gem_context.c | 9 + >> 1 file changed, 5 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> index de6e55af82cf..d3a622f60fd9 100644 >> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c >> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c >> @@ -1002,12 +1002,13 @@ static int get_ppgtt(struct drm_i915_file_private *file_priv, >> struct i915_address_space *vm; >> int ret; >> >> - if (!rcu_access_pointer(ctx->vm)) >> - return -ENODEV; > >This is correctly serialised by the caller. Ok, is this worth fixing the sparse warning? CHECK drivers/gpu/drm/i915/gem/i915_gem_context.c drivers/gpu/drm/i915/gem/i915_gem_context.c:2087:17: error: bad integer constant expression drivers/gpu/drm/i915/gem/i915_gem_context.c:2088:17: error: bad integer constant expression drivers/gpu/drm/i915/gem/i915_gem_context.c:2089:17: error: bad integer constant expression drivers/gpu/drm/i915/gem/i915_gem_context.c:2090:17: error: bad integer constant expression drivers/gpu/drm/i915/gem/i915_gem_context.c:2091:17: error: bad integer constant expression drivers/gpu/drm/i915/gem/i915_gem_context.c:2092:17: error: bad integer constant expression Odd. I am seeing, CHECK drivers/gpu/drm/i915/gem/i915_gem_context.c drivers/gpu/drm/i915/gem/i915_gem_context.c:1009:29: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915/gem/i915_gem_context.c:1009:29:expected struct i915_address_space *vm drivers/gpu/drm/i915/gem/i915_gem_context.c:1009:29:got struct i915_address_space [noderef] *vm drivers/gpu/drm/i915/gem/i915_gem_context.c:1958:25: warning: incorrect type in argument 1 (different address spaces) drivers/gpu/drm/i915/gem/i915_gem_context.c:1958:25:expected struct i915_gem_engines *e drivers/gpu/drm/i915/gem/i915_gem_context.c:1958:25:got struct i915_gem_engines [noderef] *engines drivers/gpu/drm/i915/gem/i915_gem_context.c:1993:15: warning: incorrect type in assignment (different address spaces) drivers/gpu/drm/i915/gem/i915_gem_context.c:1993:15:expected struct i915_gem_engines *clone drivers/gpu/drm/i915/gem/i915_gem_context.c:1993:15:got struct i915_gem_engines [noderef] *engines Sure, for correctness see clone_vm(). Ok, I can put a common helper function like vm_get_rcu_safe(ctx). Niranjana -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/selftests: Wrap vm_mmap() around GEM objects (rev2)
== Series Details == Series: drm/i915/selftests: Wrap vm_mmap() around GEM objects (rev2) URL : https://patchwork.freedesktop.org/series/69024/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15147_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15147_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@vcs1-clean: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#109276] / [fdo#112080]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-iclb7/igt@gem_ctx_isolat...@vcs1-clean.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110841]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_parallel@vcs1-fds: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#112080]) +14 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_paral...@vcs1-fds.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-iclb6/igt@gem_exec_paral...@vcs1-fds.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +14 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-iclb6/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +5 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb8/igt@gem_exec_sched...@preempt-other-chain-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-iclb1/igt@gem_exec_sched...@preempt-other-chain-bsd.html * igt@gem_userptr_blits@dmabuf-sync: - shard-snb: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_userptr_bl...@dmabuf-sync.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-snb5/igt@gem_userptr_bl...@dmabuf-sync.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-hsw: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw4/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-hsw5/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html * igt@i915_selftest@live_hangcheck: - shard-hsw: [PASS][15] -> [DMESG-FAIL][16] ([fdo#111991]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw7/igt@i915_selftest@live_hangcheck.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-hsw4/igt@i915_selftest@live_hangcheck.html * igt@kms_cursor_crc@pipe-a-cursor-suspend: - shard-apl: [PASS][17] -> [DMESG-WARN][18] ([fdo#108566]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-apl4/igt@kms_cursor_...@pipe-a-cursor-suspend.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-apl6/igt@kms_cursor_...@pipe-a-cursor-suspend.html * igt@kms_flip@flip-vs-expired-vblank-interruptible: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#105363]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk3/igt@kms_f...@flip-vs-expired-vblank-interruptible.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-glk1/igt@kms_f...@flip-vs-expired-vblank-interruptible.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-snb: [PASS][21] -> [DMESG-WARN][22] ([fdo#102365]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb6/igt@kms_f...@flip-vs-suspend-interruptible.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-snb6/igt@kms_f...@flip-vs-suspend-interruptible.html * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-kbl: [PASS][23] -> [DMESG-WARN][24] ([fdo#108566]) +5 similar issues [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl2/igt@kms_frontbuffer_track...@fbc-suspend.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15147/shard-kbl4/igt@kms_frontbuffer_track...@fbc-suspend.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri
Re: [Intel-gfx] [PATCH V8 0/6] mdev based hardware virtio offloading support
On 2019/11/7 上午5:13, Alex Williamson wrote: On Wed, 6 Nov 2019 14:25:23 -0500 "Michael S. Tsirkin" wrote: On Wed, Nov 06, 2019 at 12:03:12PM -0700, Alex Williamson wrote: On Wed, 6 Nov 2019 11:56:46 +0800 Jason Wang wrote: On 2019/11/6 上午1:58, Alex Williamson wrote: On Tue, 5 Nov 2019 17:32:34 +0800 Jason Wang wrote: Hi all: There are hardwares that can do virtio datapath offloading while having its own control path. This path tries to implement a mdev based unified API to support using kernel virtio driver to drive those devices. This is done by introducing a new mdev transport for virtio (virtio_mdev) and register itself as a new kind of mdev driver. Then it provides a unified way for kernel virtio driver to talk with mdev device implementation. Though the series only contains kernel driver support, the goal is to make the transport generic enough to support userspace drivers. This means vhost-mdev[1] could be built on top as well by resuing the transport. A sample driver is also implemented which simulate a virito-net loopback ethernet device on top of vringh + workqueue. This could be used as a reference implementation for real hardware driver. Also a real ICF VF driver was also posted here[2] which is a good reference for vendors who is interested in their own virtio datapath offloading product. Consider mdev framework only support VFIO device and driver right now, this series also extend it to support other types. This is done through introducing class id to the device and pairing it with id_talbe claimed by the driver. On top, this seris also decouple device specific parents ops out of the common ones. Pktgen test was done with virito-net + mvnet loop back device. Please review. [1] https://lkml.org/lkml/2019/10/31/440 [2] https://lkml.org/lkml/2019/10/15/1226 Changes from V7: - drop {set|get}_mdev_features for virtio - typo and comment style fixes Seems we're nearly there, all the remaining comments are relatively superficial, though I would appreciate a v9 addressing them as well as the checkpatch warnings: https://patchwork.freedesktop.org/series/68977/ Will do. Btw, do you plan to merge vhost-mdev patch on top? Or you prefer it to go through Michael's vhost tree? I can include it if you wish. The mdev changes are isolated enough in that patch that I wouldn't presume it, but clearly it would require less merge coordination to drop it in my tree. Let me know. Thanks, Alex I'm fine with merging through your tree. If you do, feel free to include Acked-by: Michael S. Tsirkin AFAICT, it looks like we're expecting at least one more version of Tiwei's patch after V5, so it'd probably be best to provide the ack and go-ahead on that next version so there's no confusion. Thanks, Alex Yes, it's probably need a V6. Will give ack there. Thanks ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/userptr: Try to acquire the page lock around set_page_dirty()
== Series Details == Series: drm/i915/userptr: Try to acquire the page lock around set_page_dirty() URL : https://patchwork.freedesktop.org/series/69037/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15146_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15146_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@rcs0-s3: - shard-kbl: [PASS][1] -> [DMESG-WARN][2] ([fdo#108566]) +4 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl3/igt@gem_ctx_isolat...@rcs0-s3.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-kbl4/igt@gem_ctx_isolat...@rcs0-s3.html * igt@gem_ctx_isolation@vcs1-clean: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) +1 similar issue [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-iclb5/igt@gem_ctx_isolat...@vcs1-clean.html * igt@gem_ctx_isolation@vecs0-s3: - shard-apl: [PASS][5] -> [DMESG-WARN][6] ([fdo#108566]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-apl7/igt@gem_ctx_isolat...@vecs0-s3.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-apl6/igt@gem_ctx_isolat...@vecs0-s3.html * igt@gem_exec_parallel@vcs1-fds: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112080]) +13 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_paral...@vcs1-fds.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-iclb6/igt@gem_exec_paral...@vcs1-fds.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109276]) +18 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-iclb6/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#112146]) +4 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb8/igt@gem_exec_sched...@preempt-other-chain-bsd.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-iclb2/igt@gem_exec_sched...@preempt-other-chain-bsd.html * igt@gem_persistent_relocs@forked-interruptible-faulting-reloc-thrashing: - shard-iclb: [PASS][13] -> [FAIL][14] ([fdo#112037]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_persistent_rel...@forked-interruptible-faulting-reloc-thrashing.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-iclb5/igt@gem_persistent_rel...@forked-interruptible-faulting-reloc-thrashing.html * igt@i915_pm_rpm@modeset-stress-extra-wait: - shard-glk: [PASS][15] -> [DMESG-WARN][16] ([fdo#105763] / [fdo#106538]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk1/igt@i915_pm_...@modeset-stress-extra-wait.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-glk8/igt@i915_pm_...@modeset-stress-extra-wait.html * igt@i915_pm_rpm@system-suspend-execbuf: - shard-skl: [PASS][17] -> [INCOMPLETE][18] ([fdo#104108] / [fdo#107807]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl3/igt@i915_pm_...@system-suspend-execbuf.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-skl4/igt@i915_pm_...@system-suspend-execbuf.html * igt@i915_selftest@live_hangcheck: - shard-hsw: [PASS][19] -> [DMESG-FAIL][20] ([fdo#111991]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw7/igt@i915_selftest@live_hangcheck.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-hsw2/igt@i915_selftest@live_hangcheck.html * igt@kms_cursor_crc@pipe-b-cursor-suspend: - shard-skl: [PASS][21] -> [INCOMPLETE][22] ([fdo#110741]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl8/igt@kms_cursor_...@pipe-b-cursor-suspend.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-skl2/igt@kms_cursor_...@pipe-b-cursor-suspend.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite: - shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#103167]) +5 similar issues [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-pri-indfb-draw-pwrite.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15146/shard-ic
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: switch intel_ddi_init() to intel types (rev2)
== Series Details == Series: drm/i915: switch intel_ddi_init() to intel types (rev2) URL : https://patchwork.freedesktop.org/series/69031/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15145_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15145_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15145_full, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15145_full: ### IGT changes ### Possible regressions * igt@i915_selftest@mock_requests: - shard-glk: [PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk9/igt@i915_selftest@mock_requests.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-glk6/igt@i915_selftest@mock_requests.html Known issues Here are the changes found in Patchwork_15145_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@vcs1-clean: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-iclb3/igt@gem_ctx_isolat...@vcs1-clean.html * igt@gem_exec_basic@basic-vcs1: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#112080]) +11 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_ba...@basic-vcs1.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-iclb6/igt@gem_exec_ba...@basic-vcs1.html * igt@gem_exec_schedule@preempt-queue-bsd2: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +16 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@gem_exec_sched...@preempt-queue-bsd2.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-iclb5/igt@gem_exec_sched...@preempt-queue-bsd2.html * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +7 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_exec_sched...@reorder-wide-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-iclb2/igt@gem_exec_sched...@reorder-wide-bsd.html * igt@gem_persistent_relocs@forked-interruptible-thrashing: - shard-iclb: [PASS][11] -> [FAIL][12] ([fdo#112037]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_persistent_rel...@forked-interruptible-thrashing.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-iclb2/igt@gem_persistent_rel...@forked-interruptible-thrashing.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-hsw: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw4/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-hsw4/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#111870]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-snb7/igt@gem_userptr_bl...@sync-unmap.html * igt@gem_workarounds@suspend-resume-fd: - shard-kbl: [PASS][17] -> [DMESG-WARN][18] ([fdo#108566]) +4 similar issues [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl4/igt@gem_workarou...@suspend-resume-fd.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-kbl6/igt@gem_workarou...@suspend-resume-fd.html * igt@kms_draw_crc@draw-method-rgb565-blt-xtiled: - shard-skl: [PASS][19] -> [FAIL][20] ([fdo#103184] / [fdo#103232]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl8/igt@kms_draw_...@draw-method-rgb565-blt-xtiled.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15145/shard-skl3/igt@kms_draw_...@draw-method-rgb565-blt-xtiled.html * igt@kms_frontbuffer_tracking@fbcpsr-1p-primscrn-shrfb-plflip-blt: - shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103167]) +5 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@kms_frontbuffer_track...@fbcpsr-1p-primscrn-shrfb-plflip-blt.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Cleanup heartbeat systole first
== Series Details == Series: drm/i915/gt: Cleanup heartbeat systole first URL : https://patchwork.freedesktop.org/series/69095/ State : success == Summary == CI Bug Log - changes from CI_DRM_7277 -> Patchwork_15167 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15167/index.html Known issues Here are the changes found in Patchwork_15167 that come from known issues: ### IGT changes ### Issues hit * igt@kms_chamelium@hdmi-hpd-fast: - fi-icl-u2: [PASS][1] -> [FAIL][2] ([fdo#109483]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15167/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html Possible fixes * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[INCOMPLETE][3] ([fdo# 111542]) -> [PASS][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15167/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - {fi-icl-u4}:[FAIL][5] ([fdo#111045]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15167/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7277 -> Patchwork_15167 CI-20190529: 20190529 CI_DRM_7277: 31883640a2cad10ee99f005e155c371d8df582f6 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15167: 90a9ff0de7f75406354e9d4db32df1fc353d5721 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 90a9ff0de7f7 drm/i915/gt: Cleanup heartbeat systole first == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15167/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BUILD: failure for mdev based hardware virtio offloading support (rev2)
== Series Details == Series: mdev based hardware virtio offloading support (rev2) URL : https://patchwork.freedesktop.org/series/69035/ State : failure == Summary == Applying: mdev: class id support Applying: modpost: add support for mdev class id Applying: mdev: introduce device specific ops Applying: mdev: introduce virtio device and its device ops Applying: virtio: introduce a mdev based transport Applying: docs: sample driver to demonstrate how to implement virtio-mdev framework error: patch failed: samples/Kconfig:136 error: samples/Kconfig: patch does not apply error: Did you hand edit your patch? It does not apply to blobs recorded in its index. hint: Use 'git am --show-current-patch' to see the failed patch Using index info to reconstruct a base tree... M samples/Kconfig Patch failed at 0006 docs: sample driver to demonstrate how to implement virtio-mdev framework When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gt: Cleanup heartbeat systole first
== Series Details == Series: drm/i915/gt: Cleanup heartbeat systole first URL : https://patchwork.freedesktop.org/series/69095/ State : warning == Summary == $ dim checkpatch origin/drm-tip 90a9ff0de7f7 drm/i915/gt: Cleanup heartbeat systole first -:12: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats")' #12: References: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") total: 1 errors, 0 warnings, 0 checks, 18 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for Start removing legacy guc code
== Series Details == Series: Start removing legacy guc code URL : https://patchwork.freedesktop.org/series/69094/ State : success == Summary == CI Bug Log - changes from CI_DRM_7277 -> Patchwork_15166 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15166/index.html Known issues Here are the changes found in Patchwork_15166 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_hangcheck: - fi-bsw-n3050: [PASS][1] -> [INCOMPLETE][2] ([fdo#105876]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-bsw-n3050/igt@i915_selftest@live_hangcheck.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15166/fi-bsw-n3050/igt@i915_selftest@live_hangcheck.html Possible fixes * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[INCOMPLETE][3] ([fdo# 111542]) -> [PASS][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15166/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - {fi-icl-u4}:[FAIL][5] ([fdo#111045]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7277/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15166/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#105876]: https://bugs.freedesktop.org/show_bug.cgi?id=105876 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7277 -> Patchwork_15166 CI-20190529: 20190529 CI_DRM_7277: 31883640a2cad10ee99f005e155c371d8df582f6 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15166: 0f137976f5e5dd211406c7947a6534655655be2b @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 0f137976f5e5 drm/i915/guc: kill the GuC client e10d694e53f9 drm/i915/guc: kill doorbell code and selftests a49c4957f9d6 drm/i915/guc: add a helper to allocate and map guc vma f79d5075618e drm/i915/guc: Drop leftover preemption code == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15166/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for mdev based hardware virtio offloading support
== Series Details == Series: mdev based hardware virtio offloading support URL : https://patchwork.freedesktop.org/series/69035/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15144_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15144_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_busy@busy-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +10 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@gem_b...@busy-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-iclb8/igt@gem_b...@busy-vcs1.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#110841]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_eio@unwedge-stress: - shard-snb: [PASS][5] -> [FAIL][6] ([fdo#109661]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_...@unwedge-stress.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-snb4/igt@gem_...@unwedge-stress.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#109276]) +16 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-iclb5/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +5 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_exec_sched...@reorder-wide-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-iclb1/igt@gem_exec_sched...@reorder-wide-bsd.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-hsw: [PASS][11] -> [DMESG-WARN][12] ([fdo#111870]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw4/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-hsw7/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html * igt@i915_pm_rc6_residency@rc6-accuracy: - shard-kbl: [PASS][13] -> [SKIP][14] ([fdo#109271]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl4/igt@i915_pm_rc6_reside...@rc6-accuracy.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-kbl1/igt@i915_pm_rc6_reside...@rc6-accuracy.html * igt@kms_cursor_legacy@cursor-vs-flip-atomic-transitions-varying-size: - shard-hsw: [PASS][15] -> [FAIL][16] ([fdo#103355]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw2/igt@kms_cursor_leg...@cursor-vs-flip-atomic-transitions-varying-size.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-hsw8/igt@kms_cursor_leg...@cursor-vs-flip-atomic-transitions-varying-size.html * igt@kms_flip@2x-flip-vs-suspend: - shard-hsw: [PASS][17] -> [INCOMPLETE][18] ([fdo#103540]) +1 similar issue [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw8/igt@kms_f...@2x-flip-vs-suspend.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-hsw5/igt@kms_f...@2x-flip-vs-suspend.html * igt@kms_frontbuffer_tracking@basic: - shard-iclb: [PASS][19] -> [FAIL][20] ([fdo#103167]) +7 similar issues [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@kms_frontbuffer_track...@basic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-iclb4/igt@kms_frontbuffer_track...@basic.html * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-kbl: [PASS][21] -> [DMESG-WARN][22] ([fdo#108566]) +8 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl2/igt@kms_frontbuffer_track...@fbc-suspend.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-kbl4/igt@kms_frontbuffer_track...@fbc-suspend.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-a-planes: - shard-apl: [PASS][23] -> [DMESG-WARN][24] ([fdo#108566]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-apl6/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-a-planes.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15144/shard-apl1/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-a-planes.html * igt@kms_psr@psr2_primary_page_flip: - sh
[Intel-gfx] ✗ Fi.CI.DOCS: warning for Start removing legacy guc code
== Series Details == Series: Start removing legacy guc code URL : https://patchwork.freedesktop.org/series/69094/ State : warning == Summary == $ make htmldocs 2>&1 > /dev/null | grep i915 ./drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c:1: warning: no structured comments found ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add second TGL PCH ID
On Wed, Nov 06, 2019 at 04:25:27PM -0800, Lucas De Marchi wrote: > On Tue, Nov 05, 2019 at 05:13:29PM -0800, Jose Souza wrote: > >On Tue, 2019-11-05 at 16:55 -0800, James Ausmus wrote: > >> Another TGP ID has shown up, so let's add it to avoid South Display > >> breakage on systems that have this ID. > >> > > > >Reviewed-by: José Roberto de Souza > > and pushed, thanks Thanks Lucas! -James > > Lucas De Marchi > > > > >> Cc: Lucas De Marchi > >> Cc: José Roberto de Souza > >> Signed-off-by: James Ausmus > >> --- > >> drivers/gpu/drm/i915/intel_pch.c | 1 + > >> drivers/gpu/drm/i915/intel_pch.h | 1 + > >> 2 files changed, 2 insertions(+) > >> > >> diff --git a/drivers/gpu/drm/i915/intel_pch.c > >> b/drivers/gpu/drm/i915/intel_pch.c > >> index 000ba43e2c02..fd22355b9a96 100644 > >> --- a/drivers/gpu/drm/i915/intel_pch.c > >> +++ b/drivers/gpu/drm/i915/intel_pch.c > >> @@ -85,6 +85,7 @@ intel_pch_type(const struct drm_i915_private > >> *dev_priv, unsigned short id) > >>WARN_ON(!IS_ELKHARTLAKE(dev_priv)); > >>return PCH_MCC; > >>case INTEL_PCH_TGP_DEVICE_ID_TYPE: > >> + case INTEL_PCH_TGP2_DEVICE_ID_TYPE: > >>DRM_DEBUG_KMS("Found Tiger Lake LP PCH\n"); > >>WARN_ON(!IS_TIGERLAKE(dev_priv)); > >>return PCH_TGP; > >> diff --git a/drivers/gpu/drm/i915/intel_pch.h > >> b/drivers/gpu/drm/i915/intel_pch.h > >> index 1115c6a0522c..52d145dcdb15 100644 > >> --- a/drivers/gpu/drm/i915/intel_pch.h > >> +++ b/drivers/gpu/drm/i915/intel_pch.h > >> @@ -47,6 +47,7 @@ enum intel_pch { > >> #define INTEL_PCH_ICP_DEVICE_ID_TYPE 0x3480 > >> #define INTEL_PCH_MCC_DEVICE_ID_TYPE 0x4B00 > >> #define INTEL_PCH_TGP_DEVICE_ID_TYPE 0xA080 > >> +#define INTEL_PCH_TGP2_DEVICE_ID_TYPE 0x4380 > >> #define INTEL_PCH_JSP_DEVICE_ID_TYPE 0x4D80 > >> #define INTEL_PCH_JSP2_DEVICE_ID_TYPE 0x3880 > >> #define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Start removing legacy guc code
== Series Details == Series: Start removing legacy guc code URL : https://patchwork.freedesktop.org/series/69094/ State : warning == Summary == $ dim checkpatch origin/drm-tip f79d5075618e drm/i915/guc: Drop leftover preemption code a49c4957f9d6 drm/i915/guc: add a helper to allocate and map guc vma e10d694e53f9 drm/i915/guc: kill doorbell code and selftests -:672: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #672: deleted file mode 100644 total: 0 errors, 1 warnings, 0 checks, 612 lines checked 0f137976f5e5 drm/i915/guc: kill the GuC client -:66: CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment #66: FILE: drivers/gpu/drm/i915/gt/uc/intel_guc.h:52: + spinlock_t wq_lock; total: 0 errors, 0 warnings, 1 checks, 560 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add second TGL PCH ID
On Tue, Nov 05, 2019 at 05:13:29PM -0800, Jose Souza wrote: On Tue, 2019-11-05 at 16:55 -0800, James Ausmus wrote: Another TGP ID has shown up, so let's add it to avoid South Display breakage on systems that have this ID. Reviewed-by: José Roberto de Souza and pushed, thanks Lucas De Marchi Cc: Lucas De Marchi Cc: José Roberto de Souza Signed-off-by: James Ausmus --- drivers/gpu/drm/i915/intel_pch.c | 1 + drivers/gpu/drm/i915/intel_pch.h | 1 + 2 files changed, 2 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_pch.c b/drivers/gpu/drm/i915/intel_pch.c index 000ba43e2c02..fd22355b9a96 100644 --- a/drivers/gpu/drm/i915/intel_pch.c +++ b/drivers/gpu/drm/i915/intel_pch.c @@ -85,6 +85,7 @@ intel_pch_type(const struct drm_i915_private *dev_priv, unsigned short id) WARN_ON(!IS_ELKHARTLAKE(dev_priv)); return PCH_MCC; case INTEL_PCH_TGP_DEVICE_ID_TYPE: + case INTEL_PCH_TGP2_DEVICE_ID_TYPE: DRM_DEBUG_KMS("Found Tiger Lake LP PCH\n"); WARN_ON(!IS_TIGERLAKE(dev_priv)); return PCH_TGP; diff --git a/drivers/gpu/drm/i915/intel_pch.h b/drivers/gpu/drm/i915/intel_pch.h index 1115c6a0522c..52d145dcdb15 100644 --- a/drivers/gpu/drm/i915/intel_pch.h +++ b/drivers/gpu/drm/i915/intel_pch.h @@ -47,6 +47,7 @@ enum intel_pch { #define INTEL_PCH_ICP_DEVICE_ID_TYPE 0x3480 #define INTEL_PCH_MCC_DEVICE_ID_TYPE 0x4B00 #define INTEL_PCH_TGP_DEVICE_ID_TYPE 0xA080 +#define INTEL_PCH_TGP2_DEVICE_ID_TYPE 0x4380 #define INTEL_PCH_JSP_DEVICE_ID_TYPE 0x4D80 #define INTEL_PCH_JSP2_DEVICE_ID_TYPE 0x3880 #define INTEL_PCH_P2X_DEVICE_ID_TYPE 0x7100 ___ 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: Leave the aliasing-ppgtt size alone
== Series Details == Series: drm/i915: Leave the aliasing-ppgtt size alone URL : https://patchwork.freedesktop.org/series/69093/ State : success == Summary == CI Bug Log - changes from CI_DRM_7276 -> Patchwork_15165 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/index.html Known issues Here are the changes found in Patchwork_15165 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_blt: - fi-bsw-n3050: [PASS][1] -> [DMESG-FAIL][2] ([fdo#112176]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-bsw-n3050/igt@i915_selftest@live_blt.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/fi-bsw-n3050/igt@i915_selftest@live_blt.html - fi-bsw-nick:[PASS][3] -> [DMESG-FAIL][4] ([fdo#112176]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-bsw-nick/igt@i915_selftest@live_blt.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/fi-bsw-nick/igt@i915_selftest@live_blt.html - fi-hsw-peppy: [PASS][5] -> [DMESG-FAIL][6] ([fdo#112147]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-hsw-peppy/igt@i915_selftest@live_blt.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/fi-hsw-peppy/igt@i915_selftest@live_blt.html * igt@i915_selftest@live_gem_contexts: - fi-bsw-kefka: [PASS][7] -> [INCOMPLETE][8] ([fdo# 111542]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-bsw-kefka/igt@i915_selftest@live_gem_contexts.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/fi-bsw-kefka/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][9] -> [FAIL][10] ([fdo#111045] / [fdo#111096]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147 [fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7276 -> Patchwork_15165 CI-20190529: 20190529 CI_DRM_7276: c31b5e6955feebc68e1ab88fe6343b5e5ee7e9fe @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15165: cc9b5ccadf15bbc3d1d7fbeff3d21775909cc7bb @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == cc9b5ccadf15 drm/i915: Leave the aliasing-ppgtt size alone == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15165/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: switch intel_ddi_init() to intel types
On Wed, Nov 06, 2019 at 03:31:04PM +0200, Ville Syrjälä wrote: On Tue, Nov 05, 2019 at 11:17:17PM -0800, Lucas De Marchi wrote: Prefer using intel_encoder and pass the base where needed rather than keeping both encoder and intel_encoder variables around. v2: actually add all changes to the patch Signed-off-by: Lucas De Marchi lgtm Reviewed-by: Ville Syrjälä pushed, thanks Lucas De Marchi --- drivers/gpu/drm/i915/display/intel_ddi.c | 56 1 file changed, 28 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index c91521bcf06a..398c6f054a6e 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -4687,8 +4687,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) struct ddi_vbt_port_info *port_info = &dev_priv->vbt.ddi_port_info[port]; struct intel_digital_port *intel_dig_port; - struct intel_encoder *intel_encoder; - struct drm_encoder *encoder; + struct intel_encoder *encoder; bool init_hdmi, init_dp, init_lspcon = false; enum phy phy = intel_port_to_phy(dev_priv, port); @@ -4717,31 +4716,31 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) if (!intel_dig_port) return; - intel_encoder = &intel_dig_port->base; - encoder = &intel_encoder->base; + encoder = &intel_dig_port->base; - drm_encoder_init(&dev_priv->drm, encoder, &intel_ddi_funcs, + drm_encoder_init(&dev_priv->drm, &encoder->base, &intel_ddi_funcs, DRM_MODE_ENCODER_TMDS, "DDI %c", port_name(port)); - intel_encoder->hotplug = intel_ddi_hotplug; - intel_encoder->compute_output_type = intel_ddi_compute_output_type; - intel_encoder->compute_config = intel_ddi_compute_config; - intel_encoder->enable = intel_enable_ddi; - intel_encoder->pre_pll_enable = intel_ddi_pre_pll_enable; - intel_encoder->post_pll_disable = intel_ddi_post_pll_disable; - intel_encoder->pre_enable = intel_ddi_pre_enable; - intel_encoder->disable = intel_disable_ddi; - intel_encoder->post_disable = intel_ddi_post_disable; - intel_encoder->update_pipe = intel_ddi_update_pipe; - intel_encoder->get_hw_state = intel_ddi_get_hw_state; - intel_encoder->get_config = intel_ddi_get_config; - intel_encoder->suspend = intel_dp_encoder_suspend; - intel_encoder->get_power_domains = intel_ddi_get_power_domains; - intel_encoder->type = INTEL_OUTPUT_DDI; - intel_encoder->power_domain = intel_port_to_power_domain(port); - intel_encoder->port = port; - intel_encoder->cloneable = 0; - intel_encoder->pipe_mask = ~0; + encoder->hotplug = intel_ddi_hotplug; + encoder->compute_output_type = intel_ddi_compute_output_type; + encoder->compute_config = intel_ddi_compute_config; + encoder->enable = intel_enable_ddi; + encoder->pre_pll_enable = intel_ddi_pre_pll_enable; + encoder->post_pll_disable = intel_ddi_post_pll_disable; + encoder->pre_enable = intel_ddi_pre_enable; + encoder->disable = intel_disable_ddi; + encoder->post_disable = intel_ddi_post_disable; + encoder->update_pipe = intel_ddi_update_pipe; + encoder->get_hw_state = intel_ddi_get_hw_state; + encoder->get_config = intel_ddi_get_config; + encoder->suspend = intel_dp_encoder_suspend; + encoder->get_power_domains = intel_ddi_get_power_domains; + + encoder->type = INTEL_OUTPUT_DDI; + encoder->power_domain = intel_port_to_power_domain(port); + encoder->port = port; + encoder->cloneable = 0; + encoder->pipe_mask = ~0; if (INTEL_GEN(dev_priv) >= 11) intel_dig_port->saved_port_bits = I915_READ(DDI_BUF_CTL(port)) & @@ -4749,6 +4748,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) else intel_dig_port->saved_port_bits = I915_READ(DDI_BUF_CTL(port)) & (DDI_BUF_PORT_REVERSAL | DDI_A_4_LANES); + intel_dig_port->dp.output_reg = INVALID_MMIO_REG; intel_dig_port->max_lanes = intel_ddi_max_lanes(intel_dig_port); intel_dig_port->aux_ch = intel_bios_port_aux_ch(dev_priv, port); @@ -4759,8 +4759,8 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) intel_tc_port_init(intel_dig_port, is_legacy); - intel_encoder->update_prepare = intel_ddi_update_prepare; - intel_encoder->update_complete = intel_ddi_update_complete; + encoder->update_prepare = intel_ddi_update_prepare; + encoder->update_complete = intel_ddi_update_complete; } WARN_ON(port > PORT_I); @@ -4776,7 +4776,7 @@ void intel_ddi_init(struct drm_i915_private *dev_priv, enum port port) /*
Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Add GuC method to determine if submission is active.
On 11/6/19 9:40 AM, don.hi...@intel.com wrote: From: Don Hiatt Add intel_guc_submission_is_enabled() function to determine if GuC submission is active. Based on code by Michal Wajdeczko. Signed-off-by: Don Hiatt --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 14 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 2498c55e0ea5..0aaef7c07879 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -1081,7 +1081,7 @@ static void guc_interrupts_release(struct intel_gt *gt) rps->pm_intrmsk_mbz &= ~ARAT_EXPIRED_INTRMSK; } -static void guc_set_default_submission(struct intel_engine_cs *engine) +void guc_set_default_submission(struct intel_engine_cs *engine) { /* * We inherit a bunch of functions from execlists that we'd like diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h index 54d716828352..a0132f061ebc 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h @@ -63,5 +63,6 @@ void intel_guc_submission_disable(struct intel_guc *guc); void intel_guc_submission_fini(struct intel_guc *guc); int intel_guc_preempt_work_create(struct intel_guc *guc); void intel_guc_preempt_work_destroy(struct intel_guc *guc); +void guc_set_default_submission(struct intel_engine_cs *engine); #endif diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7e0f67babe20..878d574bb1c1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -78,8 +78,10 @@ #include "gt/intel_lrc.h" #include "gt/intel_engine.h" +#include "gt/intel_gt.h" #include "gt/intel_gt_types.h" #include "gt/intel_workarounds.h" +#include "gt/uc/intel_guc_submission.h" #include "gt/uc/intel_uc.h" #include "intel_device_info.h" @@ -2032,4 +2034,16 @@ i915_coherent_map_type(struct drm_i915_private *i915) return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC; } +static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc) +{ + struct intel_gt *gt = guc_to_gt(guc); + struct intel_engine_cs *engine; + enum intel_engine_id id; + + for_each_engine(engine, gt, id) + return engine->set_default_submission == + guc_set_default_submission; + return false; It feels weird that we need to go look into the engines to understand if GuC submission is enabled or not. One of the patches I've sent earlier today ("drm/i915/guc: kill doorbell code and selftests") makes it so that intel_guc_submission_enable() can't fail, so after that it should be possible to have something like: bool intel_guc_submission_is_enabled(struct intel_guc *guc) { return intel_guc_is_submission_supported(guc) && intel_guc_is_running(guc); } AFAICS, even without my patch we do sanitize the GuC is intel_guc_submission_enable() fails, so the above should still work. If something like this doesn't fly, my preference would be to set something in intel_guc_submission_enable and check that instead of going inside the engines. Michal, any input here? Thanks, Daniele +} + #endif ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Split a setting of MSA to MST and SST
== Series Details == Series: drm/i915: Split a setting of MSA to MST and SST URL : https://patchwork.freedesktop.org/series/69092/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7276 -> Patchwork_15164 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15164 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15164, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15164: ### IGT changes ### Possible regressions * igt@i915_selftest@live_hugepages: - fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-icl-u3/igt@i915_selftest@live_hugepages.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-icl-u3/igt@i915_selftest@live_hugepages.html Known issues Here are the changes found in Patchwork_15164 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_blt: - fi-hsw-peppy: [PASS][3] -> [DMESG-FAIL][4] ([fdo#112147]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-hsw-peppy/igt@i915_selftest@live_blt.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-hsw-peppy/igt@i915_selftest@live_blt.html * igt@i915_selftest@live_gem_contexts: - fi-bsw-n3050: [PASS][5] -> [INCOMPLETE][6] ([fdo# 111542]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-bsw-n3050/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@dp-crc-fast: - fi-kbl-7500u: [PASS][7] -> [FAIL][8] ([fdo#109635 ] / [fdo#110387]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-kbl-7500u/igt@kms_chamel...@dp-crc-fast.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-kbl-7500u/igt@kms_chamel...@dp-crc-fast.html * igt@kms_chamelium@hdmi-crc-fast: - fi-icl-u2: [PASS][9] -> [FAIL][10] ([fdo#109570]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-icl-u2/igt@kms_chamel...@hdmi-crc-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-icl-u2/igt@kms_chamel...@hdmi-crc-fast.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][11] -> [FAIL][12] ([fdo#111045] / [fdo#111096]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#109570]: https://bugs.freedesktop.org/show_bug.cgi?id=109570 [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7276 -> Patchwork_15164 CI-20190529: 20190529 CI_DRM_7276: c31b5e6955feebc68e1ab88fe6343b5e5ee7e9fe @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15164: b9980d53afa20178751632d47868769c3804cd29 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == b9980d53afa2 drm/i915: Split a setting of MSA to MST and SST == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15164/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/fbdev: Fallback to non tiled mode if all tiles not present
On Wed, Nov 06, 2019 at 12:50:21PM +1000, Dave Airlie wrote: > On Tue, 5 Nov 2019 at 07:00, Manasi Navare wrote: > > > > On Mon, Nov 04, 2019 at 07:48:26PM +1000, David Airlie wrote: > > > On Mon, Nov 4, 2019 at 7:18 PM Daniel Vetter wrote: > > > > > > > > On Thu, Oct 31, 2019 at 02:48:39PM -0700, Manasi Navare wrote: > > > > > In case of tiled displays, if we hotplug just one connector, > > > > > fbcon currently just selects the preferred mode and if it is > > > > > tiled mode then that becomes a problem if rest of the tiles are > > > > > not present. > > > > > So in the fbdev driver on hotplug when we probe the client modeset, > > > > > we we dont find all the connectors for all tiles, then on a connector > > > > > with one tile, just fallback to the first available non tiled mode > > > > > to display over a single connector. > > > > > > > > > > Suggested-by: Ville Syrjälä > > > > > Suggested-by: Dave Airlie > > > > > Cc: Ville Syrjälä > > > > > Cc: Dave Airlie > > > > > Signed-off-by: Manasi Navare > > > > > > > > Hm, should we mayb have a slight timeout first to wait for the 2nd > > > > connector? Otherwise lots of flickering going on when plugging in one of > > > > these screens ... > > > > > > Not really, > > > > > > There are 3 scenarios with the multi-cable tiled monitors. and > > > non-resizeable fbdev. > > > > > > a) it's plugged in at boot. both cables are detected, fbdev gets a > > > full tiled mode. > > > > Yes this works as expected > > > > > b) it's not plugged in at boot, the user starts plugging it in, fbdev > > > was inited via the panel or another monitor. fbdev won't resize. > > > c) it's half plugged in at boot, then you get a non-tiled mode, and > > > fbdev can't resize to tiled anyways. > > > > In b and c, when its booted with only 1 cable connected and/or hotplugged > > only > > one cable after boot, I fallback to fisrt available non tiled mode, does > > that sound good? > > > > > > > > Also plugging in one of these multi-cable monitors piecemeal is going > > > to take multiple seconds for the user to do physical cable plugging. > > > > So still good with ignoring the second hotplug completely? > > However i donno where in the fb helper to stop passing the modeset down > > after the drm_fb_helper_hotplug_event() > > I don't think you can ignore it completely. I think you just have to > make the mode picking logic pick the right answer somehow. > > So you can tell if width/height are going to be lower than the tiled > mode size, and in that case just don't enable the secondary tile. > Ithink this tiled monitor is behaving in a way where if there are two ports connected, on the reciever end it tries to join the outputs and if there is no output or a different output other than tiled mode then it cant display anything so the moment i connect the second port, it expects the full tiled output but since no modes on second connector, it doesnt display anytjing goes into power save It almost makes me rethink our logic of falling back to the non tiled mode for the first hotplug since atleast this monitor displays the single tile across the whole monitor by stretching it out and then after connecting second connector it can ideally go back to a full tiled display Thoughts? Manasi > Dave. ___ 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/2] drm/i915/guc: Add GuC method to determine if submission is active.
== Series Details == Series: series starting with [1/2] drm/i915/guc: Add GuC method to determine if submission is active. URL : https://patchwork.freedesktop.org/series/69086/ State : success == Summary == CI Bug Log - changes from CI_DRM_7276 -> Patchwork_15163 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15163/index.html Known issues Here are the changes found in Patchwork_15163 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_blt: - fi-hsw-peppy: [PASS][1] -> [DMESG-FAIL][2] ([fdo#112147]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-hsw-peppy/igt@i915_selftest@live_blt.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15163/fi-hsw-peppy/igt@i915_selftest@live_blt.html * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[PASS][3] -> [INCOMPLETE][4] ([fdo# 111542]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7276/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15163/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#112147]: https://bugs.freedesktop.org/show_bug.cgi?id=112147 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7276 -> Patchwork_15163 CI-20190529: 20190529 CI_DRM_7276: c31b5e6955feebc68e1ab88fe6343b5e5ee7e9fe @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15163: 5be03d07769cee3a6a9afe2fd89271c9779e048a @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 5be03d07769c drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission 2295a44e2101 drm/i915/guc: Add GuC method to determine if submission is active. == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15163/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/5] drm/i915/psr: Add bits per pixel limitation
== Series Details == Series: series starting with [1/5] drm/i915/psr: Add bits per pixel limitation URL : https://patchwork.freedesktop.org/series/69025/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15142_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15142_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_busy@busy-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +13 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@gem_b...@busy-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-iclb7/igt@gem_b...@busy-vcs1.html * igt@gem_ctx_isolation@rcs0-s3: - shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +7 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl3/igt@gem_ctx_isolat...@rcs0-s3.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-kbl7/igt@gem_ctx_isolat...@rcs0-s3.html * igt@gem_ctx_isolation@vcs1-s3: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276] / [fdo#112080]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_ctx_isolat...@vcs1-s3.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-iclb7/igt@gem_ctx_isolat...@vcs1-s3.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110841]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-iclb1/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#109276]) +19 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-iclb3/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#112146]) +7 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_exec_sched...@reorder-wide-bsd.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-iclb4/igt@gem_exec_sched...@reorder-wide-bsd.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-snb2/igt@gem_userptr_bl...@sync-unmap.html * igt@i915_selftest@mock_requests: - shard-skl: [PASS][15] -> [DMESG-WARN][16] ([fdo#111086]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl6/igt@i915_selftest@mock_requests.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-skl7/igt@i915_selftest@mock_requests.html - shard-glk: [PASS][17] -> [INCOMPLETE][18] ([fdo#103359] / [k.org#198133]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk9/igt@i915_selftest@mock_requests.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-glk4/igt@i915_selftest@mock_requests.html * igt@kms_color@pipe-b-ctm-0-5: - shard-skl: [PASS][19] -> [DMESG-WARN][20] ([fdo#106107]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl4/igt@kms_co...@pipe-b-ctm-0-5.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-skl9/igt@kms_co...@pipe-b-ctm-0-5.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][21] -> [FAIL][22] ([fdo#104873]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk8/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-glk7/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html * igt@kms_cursor_legacy@flip-vs-cursor-legacy: - shard-skl: [PASS][23] -> [FAIL][24] ([fdo#102670]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl5/igt@kms_cursor_leg...@flip-vs-cursor-legacy.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15142/shard-skl4/igt@kms_cursor_leg...@flip-vs-cursor-legacy.html * igt@kms_cursor_legacy@long-nonblocking-modeset-vs-cursor-atomic: - shard-skl: [PASS][25] -> [DMESG-WARN][26] ([fdo#105541]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl9/igt@kms_cursor_leg...@long-nonblocking-modeset-vs-cursor-ato
Re: [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add second TGL PCH ID
On Wed, Nov 06, 2019 at 10:26:10PM +, Patchwork wrote: > == Series Details == > > Series: drm/i915/tgl: Add second TGL PCH ID > URL : https://patchwork.freedesktop.org/series/69023/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15140_full > > > Summary > --- > > **SUCCESS** > > No regressions found. \o/ Anyone willing to merge? :D -James > > > > Known issues > > > Here are the changes found in Patchwork_15140_full that come from known > issues: > > ### IGT changes ### > > Issues hit > > * igt@gem_busy@busy-vcs1: > - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +18 similar > issues >[1]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@gem_b...@busy-vcs1.html >[2]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb5/igt@gem_b...@busy-vcs1.html > > * igt@gem_ctx_isolation@rcs0-s3: > - shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +3 > similar issues >[3]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl3/igt@gem_ctx_isolat...@rcs0-s3.html >[4]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-kbl7/igt@gem_ctx_isolat...@rcs0-s3.html > > * igt@gem_ctx_isolation@vcs1-clean: > - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276] / > [fdo#112080]) +1 similar issue >[5]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html >[6]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb7/igt@gem_ctx_isolat...@vcs1-clean.html > > * igt@gem_ctx_shared@exec-single-timeline-bsd: > - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110841]) >[7]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html >[8]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html > > * igt@gem_eio@unwedge-stress: > - shard-snb: [PASS][9] -> [FAIL][10] ([fdo#109661]) >[9]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_...@unwedge-stress.html >[10]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-snb1/igt@gem_...@unwedge-stress.html > > * igt@gem_exec_schedule@preempt-contexts-bsd2: > - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109276]) +25 similar > issues >[11]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html >[12]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb6/igt@gem_exec_sched...@preempt-contexts-bsd2.html > > * igt@gem_exec_schedule@wide-bsd: > - shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#112146]) +5 similar > issues >[13]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_exec_sched...@wide-bsd.html >[14]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb1/igt@gem_exec_sched...@wide-bsd.html > > * igt@gem_userptr_blits@sync-unmap: > - shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#111870]) >[15]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html >[16]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html > > * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy: > - shard-hsw: [PASS][17] -> [FAIL][18] ([fdo#105767]) >[17]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw5/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html >[18]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-hsw4/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html > > * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: > - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) >[19]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk8/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html >[20]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-glk4/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html > > * igt@kms_frontbuffer_tracking@fbc-tilingchange: > - shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103167]) +7 similar > issues >[21]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@kms_frontbuffer_track...@fbc-tilingchange.html >[22]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb2/igt@kms_frontbuffer_track...@fbc-tilingchange.html > > * igt@kms_plane_lowres@pipe-a-tiling-y: > - shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#103166]) >[23]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb6/igt@kms_plane_low...@pipe-a-tiling-
Re: [Intel-gfx] [PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
On Wed, 6 Nov 2019 14:50:30 -0800 Randy Dunlap wrote: > On 11/5/19 11:05 PM, Jason Wang wrote: > > diff --git a/samples/Kconfig b/samples/Kconfig > > index c8dacb4dda80..13a2443e18e0 100644 > > --- a/samples/Kconfig > > +++ b/samples/Kconfig > > @@ -131,6 +131,16 @@ config SAMPLE_VFIO_MDEV_MDPY > > mediated device. It is a simple framebuffer and supports > > the region display interface (VFIO_GFX_PLANE_TYPE_REGION). > > > > +config SAMPLE_VIRTIO_MDEV_NET > > + tristate "Build VIRTIO net example mediated device sample code -- > > loadable modules only" > > + depends on VIRTIO_MDEV && VHOST_RING && m > > + help > > + Build a networking sample device for use as a virtio > > + mediated device. The device coopreates with virtio-mdev bus > > typo here: > cooperates > I can fix this on commit relative to V10 if there are no other issues raised: diff --git a/samples/Kconfig b/samples/Kconfig index 13a2443e18e0..b7116d97cbbe 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -136,7 +136,7 @@ config SAMPLE_VIRTIO_MDEV_NET depends on VIRTIO_MDEV && VHOST_RING && m help Build a networking sample device for use as a virtio - mediated device. The device coopreates with virtio-mdev bus + mediated device. The device cooperates with virtio-mdev bus driver to present an virtio ethernet driver for kernel. It simply loopbacks all packets from its TX virtqueue to its RX virtqueue. Thanks, Alex ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V9 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
On 11/5/19 11:05 PM, Jason Wang wrote: > diff --git a/samples/Kconfig b/samples/Kconfig > index c8dacb4dda80..13a2443e18e0 100644 > --- a/samples/Kconfig > +++ b/samples/Kconfig > @@ -131,6 +131,16 @@ config SAMPLE_VFIO_MDEV_MDPY > mediated device. It is a simple framebuffer and supports > the region display interface (VFIO_GFX_PLANE_TYPE_REGION). > > +config SAMPLE_VIRTIO_MDEV_NET > + tristate "Build VIRTIO net example mediated device sample code -- > loadable modules only" > + depends on VIRTIO_MDEV && VHOST_RING && m > + help > + Build a networking sample device for use as a virtio > + mediated device. The device coopreates with virtio-mdev bus typo here: cooperates > + driver to present an virtio ethernet driver for > + kernel. It simply loopbacks all packets from its TX > + virtqueue to its RX virtqueue. > + > config SAMPLE_VFIO_MDEV_MDPY_FB > tristate "Build VFIO mdpy example guest fbdev driver -- loadable module > only" > depends on FB && m ciao. -- ~Randy ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/gt: Cleanup heartbeat systole first
Before we grab the engine wakeref, tidy up the previous heartbeat request. If we then abort because the engine powerwell is off, we ensure the request is freed as we know we will not have freed it when cancelling the work (as the work is running!). Fixes: 841e86728615 ("drm/i915/gt: Only drop heartbeat.systole if the sole owner") References: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c index 06aa14c7aa8c..c91fd4e4af29 100644 --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c @@ -63,15 +63,15 @@ static void heartbeat(struct work_struct *wrk) struct intel_context *ce = engine->kernel_context; struct i915_request *rq; - if (!intel_engine_pm_get_if_awake(engine)) - return; - rq = engine->heartbeat.systole; if (rq && i915_request_completed(rq)) { i915_request_put(rq); engine->heartbeat.systole = NULL; } + if (!intel_engine_pm_get_if_awake(engine)) + return; + if (intel_gt_is_wedged(engine->gt)) goto out; -- 2.24.0 ___ 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/gvt: fix dropping obj reference twice
== Series Details == Series: drm/i915/gvt: fix dropping obj reference twice URL : https://patchwork.freedesktop.org/series/69084/ State : success == Summary == CI Bug Log - changes from CI_DRM_7275 -> Patchwork_15162 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/index.html Known issues Here are the changes found in Patchwork_15162 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_blt: - fi-bsw-n3050: [PASS][1] -> [DMESG-FAIL][2] ([fdo#112176]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-bsw-n3050/igt@i915_selftest@live_blt.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/fi-bsw-n3050/igt@i915_selftest@live_blt.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#111407]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html Possible fixes * igt@i915_selftest@live_blt: - fi-bsw-nick:[DMESG-FAIL][5] ([fdo#112176]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-bsw-nick/igt@i915_selftest@live_blt.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/fi-bsw-nick/igt@i915_selftest@live_blt.html * igt@kms_chamelium@hdmi-edid-read: - {fi-icl-u4}:[FAIL][7] ([fdo#111045]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html * igt@kms_chamelium@hdmi-hpd-fast: - {fi-icl-u4}:[FAIL][9] ([fdo#111045] / [fdo#111096]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176 Participating hosts (50 -> 44) -- Additional (2): fi-skl-guc fi-hsw-4770 Missing(8): fi-hsw-4770r fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7275 -> Patchwork_15162 CI-20190529: 20190529 CI_DRM_7275: 2f95054e1e1b0f787654a44e1b6c1864e25e11cf @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15162: b485ea21c7d9d9dfab4a0a700d538dea5a9aead9 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == b485ea21c7d9 drm/i915/gvt: fix dropping obj reference twice == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15162/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 4/4] drm/i915/guc: kill the GuC client
We now only use 1 client without any plan to add more. The client is also only holding information about the WQ and the process desc, so we can just move those in the intel_guc structure and always use stage_id 0. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/intel_reset.c | 6 +- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 8 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 - .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 272 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.h | 45 +-- drivers/gpu/drm/i915/i915_debugfs.c | 11 - 6 files changed, 87 insertions(+), 256 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_reset.c b/drivers/gpu/drm/i915/gt/intel_reset.c index f03e51c1..d2d88d0bc9d7 100644 --- a/drivers/gpu/drm/i915/gt/intel_reset.c +++ b/drivers/gpu/drm/i915/gt/intel_reset.c @@ -21,6 +21,7 @@ #include "intel_reset.h" #include "uc/intel_guc.h" +#include "uc/intel_guc_submission.h" #define RESET_MAX_RETRIES 3 @@ -1070,6 +1071,7 @@ static inline int intel_gt_reset_engine(struct intel_engine_cs *engine) int intel_engine_reset(struct intel_engine_cs *engine, const char *msg) { struct intel_gt *gt = engine->gt; + bool uses_guc = intel_engine_in_guc_submission_mode(engine); int ret; GEM_TRACE("%s flags=%lx\n", engine->name, gt->reset.flags); @@ -1085,14 +1087,14 @@ int intel_engine_reset(struct intel_engine_cs *engine, const char *msg) "Resetting %s for %s\n", engine->name, msg); atomic_inc(&engine->i915->gpu_error.reset_engine_count[engine->uabi_class]); - if (!engine->gt->uc.guc.execbuf_client) + if (!uses_guc) ret = intel_gt_reset_engine(engine); else ret = intel_guc_reset_engine(&engine->gt->uc.guc, engine); if (ret) { /* If we fail here, we expect to fallback to a global reset */ DRM_DEBUG_DRIVER("%sFailed to reset %s, ret=%d\n", -engine->gt->uc.guc.execbuf_client ? "GuC " : "", +uses_guc ? "GuC " : "", engine->name, ret); goto out; } diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h index b2d1766e689a..cd09c912e361 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -46,9 +46,13 @@ struct intel_guc { struct i915_vma *stage_desc_pool; void *stage_desc_pool_vaddr; - struct ida stage_ids; - struct intel_guc_client *execbuf_client; + struct i915_vma *workqueue; + void *workqueue_vaddr; + spinlock_t wq_lock; + + struct i915_vma *proc_desc; + void *proc_desc_vaddr; /* Control params for fw initialization */ u32 params[GUC_CTL_MAX_DWORDS]; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h index 1e8e4af7d9ca..a6b733c146c9 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h @@ -31,7 +31,6 @@ #define GUC_DOORBELL_INVALID 256 -#define GUC_PD_SIZE(PAGE_SIZE) #define GUC_WQ_SIZE(PAGE_SIZE * 2) /* Work queue item header definitions */ diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 0088c3417641..71788589f9fe 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -27,24 +27,13 @@ * code) matches the old submission model and will be updated as part of the * upgrade to the new flow. * - * GuC client: - * A intel_guc_client refers to a submission path through GuC. Currently, there - * is only one client, which is charged with all submissions to the GuC. This - * struct is the owner of a process descriptor and a workqueue (both of them - * inside a single gem object that contains all required pages for these - * elements). - * * GuC stage descriptor: * During initialization, the driver allocates a static pool of 1024 such - * descriptors, and shares them with the GuC. - * Currently, there exists a 1:1 mapping between a intel_guc_client and a - * guc_stage_desc (via the client's stage_id), so effectively only one - * gets used. This stage descriptor lets the GuC know about the workqueue and + * descriptors, and shares them with the GuC. Currently, we only use one + * descriptor. This stage descriptor lets the GuC know about the workqueue and * process descriptor. Theoretically, it also lets the GuC know about our HW * contexts (context ID, etc...), but we actually employ a kind of submission - * where the GuC uses the LRCA sent via the work item instead (the single - * guc_stage_desc associated t
[Intel-gfx] [PATCH 2/4] drm/i915/guc: add a helper to allocate and map guc vma
We already have a couple of use-cases in the code and another one will come in one of the later patches in the series. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.c| 34 +++ drivers/gpu/drm/i915/gt/uc/intel_guc.h| 2 ++ drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c| 21 +++- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 22 4 files changed, 47 insertions(+), 32 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c index 019ae6486e8d..12e0569372d0 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c @@ -689,3 +689,37 @@ struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size) i915_gem_object_put(obj); return vma; } + +/** + * intel_guc_allocate_and_map_vma() - Allocate and map VMA for GuC usage + * @guc: the guc + * @size: size of area to allocate (both virtual space and memory) + * @out_vma: return variable for the allocated vma pointer + * @out_vaddr: return variable for the obj mapping + * + * This wrapper calls intel_guc_allocate_vma() and then maps the allocated + * object with I915_MAP_WB. + * + * Return: 0 if successful, a negative errno code otherwise. + */ +int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size, + struct i915_vma **out_vma, void **out_vaddr) +{ + struct i915_vma *vma; + void *vaddr; + + vma = intel_guc_allocate_vma(guc, size); + if (IS_ERR(vma)) + return PTR_ERR(vma); + + vaddr = i915_gem_object_pin_map(vma->obj, I915_MAP_WB); + if (IS_ERR(vaddr)) { + i915_vma_unpin_and_release(&vma, 0); + return PTR_ERR(vaddr); + } + + *out_vma = vma; + *out_vaddr = vaddr; + + return 0; +} diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h index e6400204a2bd..bf438f820c35 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -149,6 +149,8 @@ int intel_guc_auth_huc(struct intel_guc *guc, u32 rsa_offset); int intel_guc_suspend(struct intel_guc *guc); int intel_guc_resume(struct intel_guc *guc); struct i915_vma *intel_guc_allocate_vma(struct intel_guc *guc, u32 size); +int intel_guc_allocate_and_map_vma(struct intel_guc *guc, u32 size, + struct i915_vma **out_vma, void **out_vaddr); static inline bool intel_guc_is_supported(struct intel_guc *guc) { diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c index ca6674b8e00c..6334d773c3e1 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c @@ -135,32 +135,19 @@ static void __guc_ads_init(struct intel_guc *guc) int intel_guc_ads_create(struct intel_guc *guc) { const u32 size = PAGE_ALIGN(sizeof(struct __guc_ads_blob)); - struct i915_vma *vma; - void *blob; int ret; GEM_BUG_ON(guc->ads_vma); - vma = intel_guc_allocate_vma(guc, size); - if (IS_ERR(vma)) - return PTR_ERR(vma); + ret = intel_guc_allocate_and_map_vma(guc, size, &guc->ads_vma, +(void **)&guc->ads_blob); - blob = i915_gem_object_pin_map(vma->obj, I915_MAP_WB); - if (IS_ERR(blob)) { - ret = PTR_ERR(blob); - goto err_vma; - } - - guc->ads_vma = vma; - guc->ads_blob = blob; + if (ret) + return ret; __guc_ads_init(guc); return 0; - -err_vma: - i915_vma_unpin_and_release(&guc->ads_vma, 0); - return ret; } void intel_guc_ads_destroy(struct intel_guc *guc) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 2b0de6a2a02e..6ac213ddbfa3 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -308,23 +308,15 @@ static void guc_proc_desc_fini(struct intel_guc_client *client) static int guc_stage_desc_pool_create(struct intel_guc *guc) { - struct i915_vma *vma; - void *vaddr; - - vma = intel_guc_allocate_vma(guc, -PAGE_ALIGN(sizeof(struct guc_stage_desc) * -GUC_MAX_STAGE_DESCRIPTORS)); - if (IS_ERR(vma)) - return PTR_ERR(vma); + u32 size = PAGE_ALIGN(sizeof(struct guc_stage_desc) * + GUC_MAX_STAGE_DESCRIPTORS); + int ret; - vaddr = i915_gem_object_pin_map(vma->obj, I915_MAP_WB); - if (IS_ERR(vaddr)) { - i915_vma_unpin_and_release(&vma, 0); - return PTR_ERR(vaddr); - } + re
[Intel-gfx] [PATCH 1/4] drm/i915/guc: Drop leftover preemption code
Remove unused enums and ctx_save_restore_disabled() function, leftover from the legacy preemption removal. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 22 --- 1 file changed, 22 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 2498c55e0ea5..2b0de6a2a02e 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -18,15 +18,6 @@ #include "i915_drv.h" #include "i915_trace.h" -enum { - GUC_PREEMPT_NONE = 0, - GUC_PREEMPT_INPROGRESS, - GUC_PREEMPT_FINISHED, -}; -#define GUC_PREEMPT_BREADCRUMB_DWORDS 0x8 -#define GUC_PREEMPT_BREADCRUMB_BYTES \ - (sizeof(u32) * GUC_PREEMPT_BREADCRUMB_DWORDS) - /** * DOC: GuC-based command submission * @@ -884,19 +875,6 @@ static void guc_client_free(struct intel_guc_client *client) kfree(client); } -static inline bool ctx_save_restore_disabled(struct intel_context *ce) -{ - u32 sr = ce->lrc_reg_state[CTX_CONTEXT_CONTROL + 1]; - -#define SR_DISABLED \ - _MASKED_BIT_ENABLE(CTX_CTRL_ENGINE_CTX_RESTORE_INHIBIT | \ - CTX_CTRL_ENGINE_CTX_SAVE_INHIBIT) - - return (sr & SR_DISABLED) == SR_DISABLED; - -#undef SR_DISABLED -} - static int guc_clients_create(struct intel_guc *guc) { struct intel_guc_client *client; -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/4] drm/i915/guc: kill doorbell code and selftests
Instead of relying on the workqueue, the upcoming reworked GuC submission flow will offer the host driver indipendent control over the execution status of each context submitted to GuC. As part of this, the doorbell usage model has been reworked, with each doorbell being paired to a single lrc and a doorbell ring representing new work available for that specific context. This mechanism, however, limits the number of contexts that can be registered with GuC to the number of doorbells, which is an undesired limitation. Luckily, GuC will also provide a H2G that will allow the host to notify the GuC of work available for a specified lrc, so we can use that mechanism instead of relying on the doorbells. We can therefore drop the doorbell code we currently have, also given the fact that in the unlikely case we'd want to switch back to using doorbells we'd have to heavily rework it. The workqueue will still have a use in the new interface to pass special commands, so that code has been retained for now. With the doorbells gone and the GuC client becoming even simpler, the existing GuC selftests don't give us any meaningful coverage so we can remove them as well. Some selftests might come with the new code, but they will look different from what we have now so if doesn't seem worth it to keep the file around in the meantime. Signed-off-by: Daniele Ceraolo Spurio Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost --- drivers/gpu/drm/i915/gt/uc/intel_guc.h| 8 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 2 +- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 373 ++ .../gpu/drm/i915/gt/uc/intel_guc_submission.h | 9 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 7 +- drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 299 -- drivers/gpu/drm/i915/i915_debugfs.c | 11 +- .../drm/i915/selftests/i915_live_selftests.h | 1 - 8 files changed, 42 insertions(+), 668 deletions(-) delete mode 100644 drivers/gpu/drm/i915/gt/uc/selftest_guc.c diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.h b/drivers/gpu/drm/i915/gt/uc/intel_guc.h index bf438f820c35..b2d1766e689a 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.h @@ -20,8 +20,8 @@ struct __guc_ads_blob; /* * Top level structure of GuC. It handles firmware loading and manages client - * pool and doorbells. intel_guc owns a intel_guc_client to replace the legacy - * ExecList submission. + * pool. intel_guc owns a intel_guc_client to replace the legacy ExecList + * submission. */ struct intel_guc { struct intel_uc_fw fw; @@ -50,10 +50,6 @@ struct intel_guc { struct intel_guc_client *execbuf_client; - DECLARE_BITMAP(doorbell_bitmap, GUC_NUM_DOORBELLS); - /* Cyclic counter mod pagesize */ - u32 db_cacheline; - /* Control params for fw initialization */ u32 params[GUC_CTL_MAX_DWORDS]; diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h index a26a85d50209..1e8e4af7d9ca 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h @@ -31,7 +31,7 @@ #define GUC_DOORBELL_INVALID 256 -#define GUC_DB_SIZE(PAGE_SIZE) +#define GUC_PD_SIZE(PAGE_SIZE) #define GUC_WQ_SIZE(PAGE_SIZE * 2) /* Work queue item header definitions */ diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 6ac213ddbfa3..0088c3417641 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -30,8 +30,8 @@ * GuC client: * A intel_guc_client refers to a submission path through GuC. Currently, there * is only one client, which is charged with all submissions to the GuC. This - * struct is the owner of a doorbell, a process descriptor and a workqueue (all - * of them inside a single gem object that contains all required pages for these + * struct is the owner of a process descriptor and a workqueue (both of them + * inside a single gem object that contains all required pages for these * elements). * * GuC stage descriptor: @@ -39,13 +39,13 @@ * descriptors, and shares them with the GuC. * Currently, there exists a 1:1 mapping between a intel_guc_client and a * guc_stage_desc (via the client's stage_id), so effectively only one - * gets used. This stage descriptor lets the GuC know about the doorbell, - * workqueue and process descriptor. Theoretically, it also lets the GuC - * know about our HW contexts (context ID, etc...), but we actually - * employ a kind of submission where the GuC uses the LRCA sent via the work - * item instead (the single guc_stage_desc associated to execbuf client - * contains information about the default kernel context only, but this is - * essentially unused). This is called a "proxy" s
[Intel-gfx] [PATCH 0/4] Start removing legacy guc code
Now that we have a clearer picture of what the new GuC submission flow is going to look like, we can start removing the code that we know we won't use in the future. As a starter, we can get rid of the doorbells and the GuC client code, because the former will be replaced by an H2G notification to GuC while the latter won't make sense in the new flow as the proxy submission mechanism is gone. Cc: Michal Wajdeczko Cc: John Harrison Cc: Matthew Brost Daniele Ceraolo Spurio (4): drm/i915/guc: Drop leftover preemption code drm/i915/guc: add a helper to allocate and map guc vma drm/i915/guc: kill doorbell code and selftests drm/i915/guc: kill the GuC client drivers/gpu/drm/i915/gt/intel_reset.c | 6 +- drivers/gpu/drm/i915/gt/uc/intel_guc.c| 34 + drivers/gpu/drm/i915/gt/uc/intel_guc.h| 16 +- drivers/gpu/drm/i915/gt/uc/intel_guc_ads.c| 21 +- drivers/gpu/drm/i915/gt/uc/intel_guc_fwif.h | 1 - .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 627 +++--- .../gpu/drm/i915/gt/uc/intel_guc_submission.h | 54 +- drivers/gpu/drm/i915/gt/uc/intel_uc.c | 7 +- drivers/gpu/drm/i915/gt/uc/selftest_guc.c | 299 - drivers/gpu/drm/i915/i915_debugfs.c | 18 - .../drm/i915/selftests/i915_live_selftests.h | 1 - 11 files changed, 141 insertions(+), 943 deletions(-) delete mode 100644 drivers/gpu/drm/i915/gt/uc/selftest_guc.c -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add second TGL PCH ID
== Series Details == Series: drm/i915/tgl: Add second TGL PCH ID URL : https://patchwork.freedesktop.org/series/69023/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15140_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15140_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_busy@busy-vcs1: - shard-iclb: [PASS][1] -> [SKIP][2] ([fdo#112080]) +18 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@gem_b...@busy-vcs1.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb5/igt@gem_b...@busy-vcs1.html * igt@gem_ctx_isolation@rcs0-s3: - shard-kbl: [PASS][3] -> [DMESG-WARN][4] ([fdo#108566]) +3 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl3/igt@gem_ctx_isolat...@rcs0-s3.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-kbl7/igt@gem_ctx_isolat...@rcs0-s3.html * igt@gem_ctx_isolation@vcs1-clean: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#109276] / [fdo#112080]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb7/igt@gem_ctx_isolat...@vcs1-clean.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110841]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_eio@unwedge-stress: - shard-snb: [PASS][9] -> [FAIL][10] ([fdo#109661]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_...@unwedge-stress.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-snb1/igt@gem_...@unwedge-stress.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109276]) +25 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb6/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_exec_schedule@wide-bsd: - shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#112146]) +5 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb7/igt@gem_exec_sched...@wide-bsd.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb1/igt@gem_exec_sched...@wide-bsd.html * igt@gem_userptr_blits@sync-unmap: - shard-snb: [PASS][15] -> [DMESG-WARN][16] ([fdo#111870]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-snb1/igt@gem_userptr_bl...@sync-unmap.html * igt@kms_cursor_legacy@2x-long-cursor-vs-flip-legacy: - shard-hsw: [PASS][17] -> [FAIL][18] ([fdo#105767]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw5/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-hsw4/igt@kms_cursor_leg...@2x-long-cursor-vs-flip-legacy.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk8/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-glk4/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html * igt@kms_frontbuffer_tracking@fbc-tilingchange: - shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103167]) +7 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@kms_frontbuffer_track...@fbc-tilingchange.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb2/igt@kms_frontbuffer_track...@fbc-tilingchange.html * igt@kms_plane_lowres@pipe-a-tiling-y: - shard-iclb: [PASS][23] -> [FAIL][24] ([fdo#103166]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb6/igt@kms_plane_low...@pipe-a-tiling-y.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15140/shard-iclb7/igt@kms_plane_low...@pipe-a-tiling-y.html * igt@kms_psr@psr2_primary_page_flip: - shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109441]) +1 similar issue [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb2/igt@kms_
[Intel-gfx] PR - i915 firmware updates (GuC and HuC for EHL and TGL)
Hi, Kindly add the below i915 changes to linux-firmware.git The following changes since commit 11bdc578ec861c7797ec614d60737a0448b68195: rtw88: RTL8723D: add firmware file v48 (2019-11-04 06:37:16 -0500) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-firmware ehl_tgl_guc_huc for you to fetch changes up to 4debf2173804396540d1890fa2347af7689c4420: i915: Add HuC firmware v7.0.3 for TGL (2019-11-06 11:42:42 -0800) Daniele Ceraolo Spurio (4): i915: Add GuC firmware v33.0.4 for EHL i915: Add HuC firmware v9.0.0 for EHL i915: Add GuC firmware v35.2.0 for TGL i915: Add HuC firmware v7.0.3 for TGL WHENCE | 12 i915/ehl_guc_33.0.4.bin | Bin 0 -> 396288 bytes i915/ehl_huc_9.0.0.bin | Bin 0 -> 498880 bytes i915/tgl_guc_35.2.0.bin | Bin 0 -> 417728 bytes i915/tgl_huc_7.0.3.bin | Bin 0 -> 521408 bytes 5 files changed, 12 insertions(+) create mode 100644 i915/ehl_guc_33.0.4.bin create mode 100644 i915/ehl_huc_9.0.0.bin create mode 100644 i915/tgl_guc_35.2.0.bin create mode 100644 i915/tgl_huc_7.0.3.bin ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Leave the aliasing-ppgtt size alone
The hidden aliasing-ppgtt's size is never revealed, as we only inspect the front GTT when engaged. However, we were "fixing" the hidden ppgtt to match, with the net result that we ended up leaking the unused portion (on Braswell were we preallocated the entire range). [ 26.025364] DMA-API: pci :00:02.0: device driver has pending DMA allocations while released from device [count=2] [ 26.025364] One of leaked entries details: [device address=0x000230778000] [size=4096 bytes] [mapped with DMA_BIDIRECTIONAL] [mapped as single] [ 26.025683] WARNING: CPU: 0 PID: 415 at kernel/dma/debug.c:894 dma_debug_device_change+0x1a4/0x1f0 [ 26.025905] Modules linked in: i915(E-) intel_powerclamp(E) nls_ascii(E) nls_cp437(E) crct10dif_pclmul(E) crc32_pclmul(E) vfat(E) crc32c_intel(E) fat(E) ghash_clmulni_intel(E) prime_numbers(E) intel_gtt(E) i2c_algo_bit(E) efi_pstore(E) drm_kms_helper(E) syscopyarea(E) sysfillrect(E) sysimgblt(E) fb_sys_fops(E) evdev(E) drm(E) aesni_intel(E) glue_helper(E) crypto_simd(E) cryptd(E) intel_cstate(E) sg(E) efivars(E) pcspkr(E) video(E) button(E) efivarfs(E) ip_tables(E) x_tables(E) autofs4(E) sd_mod(E) lpc_ich(E) ahci(E) mfd_core(E) i2c_i801(E) libahci(E) i2c_designware_pci(E) i2c_designware_core(E) [ 26.026613] CPU: 0 PID: 415 Comm: rmmod Tainted: GE 5.4.0-rc6+ #25 [ 26.026837] Hardware name: /, BIOS PYBSWCEL.86A.0027.2015.0507.1758 05/07/2015 [ 26.027080] RIP: 0010:dma_debug_device_change+0x1a4/0x1f0 [ 26.027319] Code: 89 54 24 08 e8 ad 60 62 00 48 8b 54 24 08 48 89 c6 41 57 4d 89 e9 49 89 d8 44 89 f1 41 54 48 c7 c7 e0 61 06 82 e8 c1 aa f5 ff <0f> 0b 5a 59 48 83 3c 24 00 0f 85 97 26 00 00 8b 05 77 47 92 01 85 [ 26.027600] RSP: 0018:888228d2fcc8 EFLAGS: 00010282 [ 26.027831] RAX: RBX: 000230778000 RCX: [ 26.028053] RDX: 0001 RSI: 0008 RDI: ed10451a5f8f [ 26.028279] RBP: 88823480c0b0 R08: 0001 R09: ed1046e83eb1 [ 26.028500] R10: ed1046e83eb0 R11: 88823741f587 R12: 82067340 [ 26.028725] R13: 1000 R14: 0002 R15: 82067480 [ 26.028952] FS: 7fdf3ed174c0() GS:88823740() knlGS: [ 26.029185] CS: 0010 DS: ES: CR0: 80050033 [ 26.029405] CR2: 55e211109030 CR3: 000230139000 CR4: 001006f0 [ 26.029622] Call Trace: [ 26.029846] notifier_call_chain+0x67/0xa0 [ 26.030076] blocking_notifier_call_chain+0x5a/0x80 [ 26.030305] device_release_driver_internal+0x20d/0x260 [ 26.030535] driver_detach+0x7b/0xe1 [ 26.030761] bus_remove_driver+0x8c/0x153 [ 26.030993] pci_unregister_driver+0x2d/0xf0 [ 26.032603] i915_exit+0x16/0x1c [i915] Reported-by: Ville Syrjälä Signed-off-by: Chris Wilson Cc: Mika Kuoppala --- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 88179202c556..6239a9adbf14 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -2609,8 +2609,6 @@ static int init_aliasing_ppgtt(struct i915_ggtt *ggtt) GEM_BUG_ON(ggtt->vm.vma_ops.unbind_vma != ggtt_unbind_vma); ggtt->vm.vma_ops.unbind_vma = aliasing_gtt_unbind_vma; - ppgtt->vm.total = ggtt->vm.total; - return 0; err_ppgtt: -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Remove unwanted rcu_read_lock/unlock
== Series Details == Series: drm/i915: Remove unwanted rcu_read_lock/unlock URL : https://patchwork.freedesktop.org/series/69082/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7275 -> Patchwork_15161 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15161 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15161, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15161: ### IGT changes ### Possible regressions * igt@i915_selftest@live_hugepages: - fi-skl-guc: NOTRUN -> [DMESG-WARN][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/fi-skl-guc/igt@i915_selftest@live_hugepages.html Known issues Here are the changes found in Patchwork_15161 that come from known issues: ### IGT changes ### Issues hit * igt@kms_chamelium@dp-crc-fast: - fi-icl-u2: [PASS][2] -> [FAIL][3] ([fdo#109635 ] / [fdo#110387]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u2/igt@kms_chamel...@dp-crc-fast.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/fi-icl-u2/igt@kms_chamel...@dp-crc-fast.html Possible fixes * igt@i915_selftest@live_blt: - fi-bsw-nick:[DMESG-FAIL][4] ([fdo#112176]) -> [PASS][5] [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-bsw-nick/igt@i915_selftest@live_blt.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/fi-bsw-nick/igt@i915_selftest@live_blt.html * igt@kms_chamelium@hdmi-edid-read: - {fi-icl-u4}:[FAIL][6] ([fdo#111045]) -> [PASS][7] [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html * igt@kms_chamelium@hdmi-hpd-fast: - {fi-icl-u4}:[FAIL][8] ([fdo#111045] / [fdo#111096]) -> [PASS][9] [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#106107]: https://bugs.freedesktop.org/show_bug.cgi?id=106107 [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176 Participating hosts (50 -> 45) -- Additional (2): fi-skl-guc fi-hsw-4770 Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7275 -> Patchwork_15161 CI-20190529: 20190529 CI_DRM_7275: 2f95054e1e1b0f787654a44e1b6c1864e25e11cf @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15161: a9e7def292a7cd7c293b428ce1729691954d8b2d @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == a9e7def292a7 drm/i915: Remove unwanted rcu_read_lock/unlock == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15161/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PULL] drm-intel-fixes
Hi Dave and Daniel, Here goes drm-intel-fixes-2019-11-06: - Fix HPD poll to avoid kworker consuming a lot of cpu cycles. - Do not use TBT type for non Type-C ports. Thanks, Rodrigo. The following changes since commit a99d8080aaf358d5d23581244e5da23b35e340b9: Linux 5.4-rc6 (2019-11-03 14:07:26 -0800) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-intel tags/drm-intel-fixes-2019-11-06 for you to fetch changes up to ee2c5ef8a9d640ee1617ec97b84fe2f634284e51: drm/i915/dp: Do not switch aux to TBT mode for non-TC ports (2019-11-04 13:24:14 -0800) - Fix HPD poll to avoid kworker consuming a lot of cpu cycles. - Do not use TBT type for non Type-C ports. Imre Deak (1): drm/i915: Avoid HPD poll detect triggering a new detect cycle José Roberto de Souza (1): drm/i915/dp: Do not switch aux to TBT mode for non-TC ports drivers/gpu/drm/i915/display/intel_crt.c | 7 +++ drivers/gpu/drm/i915/display/intel_dp.c | 12 +++- drivers/gpu/drm/i915/display/intel_hdmi.c | 6 ++ 3 files changed, 24 insertions(+), 1 deletion(-) ___ 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: Don't oops in dumb_create ioctl if we have no crtcs
== Series Details == Series: drm/i915: Don't oops in dumb_create ioctl if we have no crtcs URL : https://patchwork.freedesktop.org/series/69081/ State : success == Summary == CI Bug Log - changes from CI_DRM_7275 -> Patchwork_15160 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15160: ### IGT changes ### Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@prime_self_import@basic-with_one_bo: - {fi-icl-dsi}: [PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-dsi/igt@prime_self_import@basic-with_one_bo.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-icl-dsi/igt@prime_self_import@basic-with_one_bo.html Known issues Here are the changes found in Patchwork_15160 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_blt: - fi-bsw-n3050: [PASS][3] -> [DMESG-FAIL][4] ([fdo#112176]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-bsw-n3050/igt@i915_selftest@live_blt.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-bsw-n3050/igt@i915_selftest@live_blt.html * igt@kms_frontbuffer_tracking@basic: - fi-icl-u2: [PASS][5] -> [FAIL][6] ([fdo#103167]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u2/igt@kms_frontbuffer_track...@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-icl-u2/igt@kms_frontbuffer_track...@basic.html Possible fixes * igt@i915_selftest@live_blt: - fi-bsw-nick:[DMESG-FAIL][7] ([fdo#112176]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-bsw-nick/igt@i915_selftest@live_blt.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-bsw-nick/igt@i915_selftest@live_blt.html * igt@kms_chamelium@hdmi-edid-read: - {fi-icl-u4}:[FAIL][9] ([fdo#111045]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-icl-u4/igt@kms_chamel...@hdmi-edid-read.html * igt@kms_chamelium@hdmi-hpd-fast: - {fi-icl-u4}:[FAIL][11] ([fdo#111045] / [fdo#111096]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7275/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/fi-icl-u4/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#109635 ]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#110387]: https://bugs.freedesktop.org/show_bug.cgi?id=110387 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#112176]: https://bugs.freedesktop.org/show_bug.cgi?id=112176 Participating hosts (50 -> 45) -- Additional (2): fi-skl-guc fi-hsw-4770 Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7275 -> Patchwork_15160 CI-20190529: 20190529 CI_DRM_7275: 2f95054e1e1b0f787654a44e1b6c1864e25e11cf @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15160: 5f91dc224c75c5ec98ee1fea0c5da4a3d4963072 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 5f91dc224c75 drm/i915: Don't oops in dumb_create ioctl if we have no crtcs == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15160/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/lmem: fixup fake lmem teardown
On Wed, Nov 06, 2019 at 12:31:35PM +, Matthew Auld wrote: We should not be unconditionally calling release_fake_lmem_bar. Signed-off-by: Matthew Auld Cc: Lucas De Marchi Cc: Chris Wilson Reviewed-by: Lucas De Marchi Unbinding the module is now working again, thanks. Lucas De Marchi --- drivers/gpu/drm/i915/intel_region_lmem.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/intel_region_lmem.c b/drivers/gpu/drm/i915/intel_region_lmem.c index 583118095635..eddb392917aa 100644 --- a/drivers/gpu/drm/i915/intel_region_lmem.c +++ b/drivers/gpu/drm/i915/intel_region_lmem.c @@ -51,8 +51,10 @@ static int init_fake_lmem_bar(struct intel_memory_region *mem) static void release_fake_lmem_bar(struct intel_memory_region *mem) { - if (drm_mm_node_allocated(&mem->fake_mappable)) - drm_mm_remove_node(&mem->fake_mappable); + if (!drm_mm_node_allocated(&mem->fake_mappable)) + return; + + drm_mm_remove_node(&mem->fake_mappable); dma_unmap_resource(&mem->i915->drm.pdev->dev, mem->remap_addr, -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Split a setting of MSA to MST and SST
The setting of MSA is done by the DDI .pre_enable() hook. And when we are using MST, the MSA is only set to first mst stream by calling of DDI .pre_eanble() hook. It raies issues to non-first mst streams. Wrong MSA or missed MSA packets might show scrambled screen or wrong screen. This splits a setting of MSA to MST and SST cases. And In the MST case it will call a setting of MSA after an allocating of Virtual Channel from MST encoder pre_enable callback. Cc: Ville Syrjälä Cc: Stanislav Lisovskiy Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=112212 Fixes: 0c06fa156006 ("drm/i915/dp: Add support of BT.2020 Colorimetry to DP MSA") Fixes: d4a415dcda35 ("drm/i915: Fix MST oops due to MSA changes") Signed-off-by: Gwan-gyeong Mun --- drivers/gpu/drm/i915/display/intel_ddi.c| 10 ++ drivers/gpu/drm/i915/display/intel_dp_mst.c | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index c91521bcf06a..ef41fa0f77f0 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -1794,10 +1794,8 @@ void intel_ddi_set_dp_msa(const struct intel_crtc_state *crtc_state, * of Color Encoding Format and Content Color Gamut] while sending * YCBCR 420, HDR BT.2020 signals we should program MSA MISC1 fields * which indicate VSC SDP for the Pixel Encoding/Colorimetry Format. -* -* FIXME MST doesn't pass in the conn_state */ - if (conn_state && intel_dp_needs_vsc_sdp(crtc_state, conn_state)) + if (intel_dp_needs_vsc_sdp(crtc_state, conn_state)) temp |= DP_MSA_MISC_COLOR_VSC_SDP; I915_WRITE(TRANS_MSA_MISC(cpu_transcoder), temp); @@ -3606,7 +3604,11 @@ static void intel_ddi_pre_enable_dp(struct intel_encoder *encoder, else hsw_ddi_pre_enable_dp(encoder, crtc_state, conn_state); - intel_ddi_set_dp_msa(crtc_state, conn_state); + /* MST will call a setting of MSA after an allocating of Virtual Channel +* from MST encoder pre_enable callback. +*/ + if (!intel_crtc_has_type(crtc_state, INTEL_OUTPUT_DP_MST)) + intel_ddi_set_dp_msa(crtc_state, conn_state); } static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder, diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c index 5e267c5b4c20..cb77f8072820 100644 --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c @@ -345,6 +345,9 @@ static void intel_mst_pre_enable_dp(struct intel_encoder *encoder, */ if (INTEL_GEN(dev_priv) < 12 || !first_mst_stream) intel_ddi_enable_pipe_clock(pipe_config); + + intel_ddi_set_dp_msa(pipe_config, conn_state); + } static void intel_mst_enable_dp(struct intel_encoder *encoder, -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V8 0/6] mdev based hardware virtio offloading support
On Wed, 6 Nov 2019 14:25:23 -0500 "Michael S. Tsirkin" wrote: > On Wed, Nov 06, 2019 at 12:03:12PM -0700, Alex Williamson wrote: > > On Wed, 6 Nov 2019 11:56:46 +0800 > > Jason Wang wrote: > > > > > On 2019/11/6 上午1:58, Alex Williamson wrote: > > > > On Tue, 5 Nov 2019 17:32:34 +0800 > > > > Jason Wang wrote: > > > > > > > >> Hi all: > > > >> > > > >> There are hardwares that can do virtio datapath offloading while > > > >> having its own control path. This path tries to implement a mdev based > > > >> unified API to support using kernel virtio driver to drive those > > > >> devices. This is done by introducing a new mdev transport for virtio > > > >> (virtio_mdev) and register itself as a new kind of mdev driver. Then > > > >> it provides a unified way for kernel virtio driver to talk with mdev > > > >> device implementation. > > > >> > > > >> Though the series only contains kernel driver support, the goal is to > > > >> make the transport generic enough to support userspace drivers. This > > > >> means vhost-mdev[1] could be built on top as well by resuing the > > > >> transport. > > > >> > > > >> A sample driver is also implemented which simulate a virito-net > > > >> loopback ethernet device on top of vringh + workqueue. This could be > > > >> used as a reference implementation for real hardware driver. > > > >> > > > >> Also a real ICF VF driver was also posted here[2] which is a good > > > >> reference for vendors who is interested in their own virtio datapath > > > >> offloading product. > > > >> > > > >> Consider mdev framework only support VFIO device and driver right now, > > > >> this series also extend it to support other types. This is done > > > >> through introducing class id to the device and pairing it with > > > >> id_talbe claimed by the driver. On top, this seris also decouple > > > >> device specific parents ops out of the common ones. > > > >> > > > >> Pktgen test was done with virito-net + mvnet loop back device. > > > >> > > > >> Please review. > > > >> > > > >> [1] https://lkml.org/lkml/2019/10/31/440 > > > >> [2] https://lkml.org/lkml/2019/10/15/1226 > > > >> > > > >> Changes from V7: > > > >> - drop {set|get}_mdev_features for virtio > > > >> - typo and comment style fixes > > > > > > > > Seems we're nearly there, all the remaining comments are relatively > > > > superficial, though I would appreciate a v9 addressing them as well as > > > > the checkpatch warnings: > > > > > > > > https://patchwork.freedesktop.org/series/68977/ > > > > > > > > > Will do. > > > > > > Btw, do you plan to merge vhost-mdev patch on top? Or you prefer it to > > > go through Michael's vhost tree? > > > > I can include it if you wish. The mdev changes are isolated enough in > > that patch that I wouldn't presume it, but clearly it would require > > less merge coordination to drop it in my tree. Let me know. Thanks, > > > > Alex > > I'm fine with merging through your tree. If you do, feel free to > include > > Acked-by: Michael S. Tsirkin AFAICT, it looks like we're expecting at least one more version of Tiwei's patch after V5, so it'd probably be best to provide the ack and go-ahead on that next version so there's no confusion. Thanks, Alex ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/bios: store child devices in a list
== Series Details == Series: drm/i915/bios: store child devices in a list URL : https://patchwork.freedesktop.org/series/69077/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7274 -> Patchwork_15159 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15159 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15159, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15159: ### IGT changes ### Possible regressions * igt@i915_module_load@reload-no-display: - fi-skl-6700k2: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-skl-6700k2/igt@i915_module_l...@reload-no-display.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-skl-6700k2/igt@i915_module_l...@reload-no-display.html - fi-bwr-2160:[PASS][3] -> [INCOMPLETE][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-bwr-2160/igt@i915_module_l...@reload-no-display.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-bwr-2160/igt@i915_module_l...@reload-no-display.html - fi-kbl-r: [PASS][5] -> [INCOMPLETE][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-kbl-r/igt@i915_module_l...@reload-no-display.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-kbl-r/igt@i915_module_l...@reload-no-display.html - fi-blb-e6850: [PASS][7] -> [INCOMPLETE][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-blb-e6850/igt@i915_module_l...@reload-no-display.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-blb-e6850/igt@i915_module_l...@reload-no-display.html - fi-hsw-peppy: [PASS][9] -> [INCOMPLETE][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-hsw-peppy/igt@i915_module_l...@reload-no-display.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-hsw-peppy/igt@i915_module_l...@reload-no-display.html - fi-kbl-x1275: [PASS][11] -> [INCOMPLETE][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-kbl-x1275/igt@i915_module_l...@reload-no-display.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-kbl-x1275/igt@i915_module_l...@reload-no-display.html - fi-ilk-650: [PASS][13] -> [INCOMPLETE][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-ilk-650/igt@i915_module_l...@reload-no-display.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-ilk-650/igt@i915_module_l...@reload-no-display.html - fi-skl-6770hq: [PASS][15] -> [INCOMPLETE][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-skl-6770hq/igt@i915_module_l...@reload-no-display.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-skl-6770hq/igt@i915_module_l...@reload-no-display.html - fi-cfl-guc: [PASS][17] -> [INCOMPLETE][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-cfl-guc/igt@i915_module_l...@reload-no-display.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-cfl-guc/igt@i915_module_l...@reload-no-display.html - fi-kbl-soraka: [PASS][19] -> [INCOMPLETE][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-kbl-soraka/igt@i915_module_l...@reload-no-display.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-kbl-soraka/igt@i915_module_l...@reload-no-display.html - fi-skl-lmem:[PASS][21] -> [INCOMPLETE][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-skl-lmem/igt@i915_module_l...@reload-no-display.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-skl-lmem/igt@i915_module_l...@reload-no-display.html - fi-ivb-3770:[PASS][23] -> [INCOMPLETE][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-ivb-3770/igt@i915_module_l...@reload-no-display.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-ivb-3770/igt@i915_module_l...@reload-no-display.html - fi-snb-2520m: [PASS][25] -> [INCOMPLETE][26] [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-snb-2520m/igt@i915_module_l...@reload-no-display.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15159/fi-snb-2520m/igt@i915_module_l...@reload-no-display.html - fi-cfl-8700k: [PASS][27] -> [INCOMPLETE][28] [27]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-cfl-8700k/igt@i915_module_l...@reload-no-display.html [2
Re: [Intel-gfx] [PATCH] drm/i915/bios: store child devices in a list
On Wed, Nov 06, 2019 at 06:45:31PM +0200, Jani Nikula wrote: > Using the array is getting clumsy. Make things a bit more dynamic. > > In code, start migrating towards calling the new struct child_device > "child" and the VBT-originating struct child_device_config "config". > > Remove early returns on not having child devices when the end result > after "iterating" the empty list would be the same. > > Cc: Ville Syrjala > Signed-off-by: Jani Nikula > > --- > > The end goal: allow more meta information to be added to the new > child_device struct, independent of DDI port info being used or not on > the platform, and eventually migrate ddi_port_info to it as well, > unifying the stuff across platforms. > > Currently it's not easily possible to associate for example the DSC > compression data to the child device for non-DDI platforms or for DSI > outputs. This lets us add the compression data (pointer) to struct > child_device. > --- > drivers/gpu/drm/i915/display/intel_bios.c | 203 ++ > drivers/gpu/drm/i915/i915_drv.h | 3 +- > 2 files changed, 97 insertions(+), 109 deletions(-) > > diff --git a/drivers/gpu/drm/i915/display/intel_bios.c > b/drivers/gpu/drm/i915/display/intel_bios.c > index a03f56b7b4ef..025074862ab0 100644 > --- a/drivers/gpu/drm/i915/display/intel_bios.c > +++ b/drivers/gpu/drm/i915/display/intel_bios.c > @@ -58,6 +58,12 @@ > * that. > */ > > +/* Wrapper for VBT child device config */ > +struct child_device { > + struct child_device_config config; > + struct list_head node; The wrapper is a bit unfortunate. I don't suppose we could just shove the list head into the existing struct and adjust what needs adjusting? > +}; > + > #define SLAVE_ADDR1 0x70 > #define SLAVE_ADDR2 0x72 > > @@ -449,8 +455,9 @@ static void > parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) > { > struct sdvo_device_mapping *mapping; > - const struct child_device_config *child; > - int i, count = 0; > + const struct child_device_config *config; This thing could at least can live inside the loop. Though the rename is also a bit unfortunate, leading to a needlessly large diff. Avoiding the wrapper struct would also avoid that. I guess another option would be to select a different name for the wrapper pointer here and keep the original name for the actual thing. > + const struct child_device *child; > + int count = 0; > > /* >* Only parse SDVO mappings on gens that could have SDVO. This isn't > @@ -461,35 +468,35 @@ parse_sdvo_device_mapping(struct drm_i915_private > *dev_priv, u8 bdb_version) > return; > } > > - for (i = 0, count = 0; i < dev_priv->vbt.child_dev_num; i++) { > - child = dev_priv->vbt.child_dev + i; > + list_for_each_entry(child, &dev_priv->vbt.child_devices, node) { > + config = &child->config; > > - if (child->slave_addr != SLAVE_ADDR1 && > - child->slave_addr != SLAVE_ADDR2) { > + if (config->slave_addr != SLAVE_ADDR1 && > + config->slave_addr != SLAVE_ADDR2) { > /* >* If the slave address is neither 0x70 nor 0x72, >* it is not a SDVO device. Skip it. >*/ > continue; > } > - if (child->dvo_port != DEVICE_PORT_DVOB && > - child->dvo_port != DEVICE_PORT_DVOC) { > + if (config->dvo_port != DEVICE_PORT_DVOB && > + config->dvo_port != DEVICE_PORT_DVOC) { > /* skip the incorrect SDVO port */ > DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n"); > continue; > } > DRM_DEBUG_KMS("the SDVO device with slave addr %2x is found on" > " %s port\n", > - child->slave_addr, > - (child->dvo_port == DEVICE_PORT_DVOB) ? > + config->slave_addr, > + (config->dvo_port == DEVICE_PORT_DVOB) ? > "SDVOB" : "SDVOC"); > - mapping = &dev_priv->vbt.sdvo_mappings[child->dvo_port - 1]; > + mapping = &dev_priv->vbt.sdvo_mappings[config->dvo_port - 1]; > if (!mapping->initialized) { > - mapping->dvo_port = child->dvo_port; > - mapping->slave_addr = child->slave_addr; > - mapping->dvo_wiring = child->dvo_wiring; > - mapping->ddc_pin = child->ddc_pin; > - mapping->i2c_pin = child->i2c_pin; > + mapping->dvo_port = config->dvo_port; > + mapping->slave_addr = config->slave_addr; > + mapping->dvo_wiring = config->dvo_wiring; > + mapping->dd
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/guc: Properly capture & release GuC interrupts on Gen11+
== Series Details == Series: drm/i915/guc: Properly capture & release GuC interrupts on Gen11+ URL : https://patchwork.freedesktop.org/series/69019/ State : success == Summary == CI Bug Log - changes from CI_DRM_7264_full -> Patchwork_15139_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_15139_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@vcs0-s3: - shard-skl: [PASS][1] -> [INCOMPLETE][2] ([fdo#104108]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-skl7/igt@gem_ctx_isolat...@vcs0-s3.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-skl2/igt@gem_ctx_isolat...@vcs0-s3.html * igt@gem_ctx_isolation@vcs1-clean: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276] / [fdo#112080]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb4/igt@gem_ctx_isolat...@vcs1-clean.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb7/igt@gem_ctx_isolat...@vcs1-clean.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_parallel@vcs1-fds: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112080]) +12 similar issues [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_paral...@vcs1-fds.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb8/igt@gem_exec_paral...@vcs1-fds.html * igt@gem_exec_schedule@preempt-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#112146]) +2 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb5/igt@gem_exec_sched...@preempt-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb4/igt@gem_exec_sched...@preempt-bsd.html * igt@gem_exec_schedule@preempt-contexts-bsd2: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#109276]) +18 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb1/igt@gem_exec_sched...@preempt-contexts-bsd2.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb8/igt@gem_exec_sched...@preempt-contexts-bsd2.html * igt@gem_userptr_blits@map-fixed-invalidate-busy: - shard-hsw: [PASS][13] -> [DMESG-WARN][14] ([fdo#111870]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-hsw4/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-hsw8/igt@gem_userptr_bl...@map-fixed-invalidate-busy.html * igt@gem_workarounds@suspend-resume: - shard-apl: [PASS][15] -> [DMESG-WARN][16] ([fdo#108566]) +2 similar issues [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-apl6/igt@gem_workarou...@suspend-resume.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-apl4/igt@gem_workarou...@suspend-resume.html * igt@i915_selftest@mock_requests: - shard-glk: [PASS][17] -> [INCOMPLETE][18] ([fdo#103359] / [k.org#198133]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk9/igt@i915_selftest@mock_requests.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-glk7/igt@i915_selftest@mock_requests.html * igt@kms_cursor_legacy@2x-long-flip-vs-cursor-atomic: - shard-glk: [PASS][19] -> [FAIL][20] ([fdo#104873]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-glk8/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-glk2/igt@kms_cursor_leg...@2x-long-flip-vs-cursor-atomic.html * igt@kms_frontbuffer_tracking@fbc-1p-pri-indfb-multidraw: - shard-iclb: [PASS][21] -> [FAIL][22] ([fdo#103167]) +7 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-iclb3/igt@kms_frontbuffer_track...@fbc-1p-pri-indfb-multidraw.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-iclb1/igt@kms_frontbuffer_track...@fbc-1p-pri-indfb-multidraw.html * igt@kms_frontbuffer_tracking@fbc-suspend: - shard-kbl: [PASS][23] -> [DMESG-WARN][24] ([fdo#108566]) +7 similar issues [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7264/shard-kbl2/igt@kms_frontbuffer_track...@fbc-suspend.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15139/shard-kbl7/igt@kms_frontbuffer_track...@fbc-suspend.html - shard-iclb: [PASS][25] -> [
Re: [Intel-gfx] [PATCH] drm/fbdev: Fallback to non tiled mode if all tiles not present
On Wed, Nov 06, 2019 at 12:47:16PM +1000, Dave Airlie wrote: > On Fri, 1 Nov 2019 at 07:46, Manasi Navare wrote: > > > > In case of tiled displays, if we hotplug just one connector, > > fbcon currently just selects the preferred mode and if it is > > tiled mode then that becomes a problem if rest of the tiles are > > not present. > > So in the fbdev driver on hotplug when we probe the client modeset, > > we we dont find all the connectors for all tiles, then on a connector > > with one tile, just fallback to the first available non tiled mode > > to display over a single connector. > > > > Suggested-by: Ville Syrjälä > > Suggested-by: Dave Airlie > > Cc: Ville Syrjälä > > Cc: Dave Airlie > > Signed-off-by: Manasi Navare > > --- > > drivers/gpu/drm/drm_client_modeset.c | 29 > > 1 file changed, 29 insertions(+) > > > > diff --git a/drivers/gpu/drm/drm_client_modeset.c > > b/drivers/gpu/drm/drm_client_modeset.c > > index 895b73f23079..e28a723587db 100644 > > --- a/drivers/gpu/drm/drm_client_modeset.c > > +++ b/drivers/gpu/drm/drm_client_modeset.c > > @@ -114,6 +114,20 @@ drm_client_find_modeset(struct drm_client_dev *client, > > struct drm_crtc *crtc) > > return NULL; > > } > > > > +static struct drm_display_mode * > > +drm_connector_fallback_non_tiled_mode(struct drm_connector *connector) > > +{ > > + struct drm_display_mode *mode; > > + > > + list_for_each_entry(mode, &connector->modes, head) { > > + if (mode->hdisplay == connector->tile_h_size && > > + mode->vdisplay == connector->tile_v_size) > > + continue; > > + return mode; > > + } > > + return NULL; > > +} > > + > > static struct drm_display_mode * > > drm_connector_has_preferred_mode(struct drm_connector *connector, int > > width, int height) > > { > > @@ -348,8 +362,17 @@ static bool drm_client_target_preferred(struct > > drm_connector **connectors, > > struct drm_connector *connector; > > u64 conn_configured = 0; > > int tile_pass = 0; > > + int num_tiled_conns = 0; > > int i; > > > > + for (i = 0; i < connector_count; i++) { > > + connector = connectors[i]; > > + if (!connector->has_tile) > > + continue; > > + > > + num_tiled_conns ++; > > Drop the space before the ++ here. Maybe just make this > > if (connectors[i]->has_tile) > num_tiled_conns++; Sure will modify like above and add your r-b afterwards. Thank you so much for your review. This only covers the hotplug case with 1 connector hotplugged and need to still modify the fb dev code to ignore the second hotplug which I cant seem to figure out how to avoid the second hotplug from going through a modeset and retain the first modeset on screen. Also I will send a follow up patch to fallback to first non tiled mode in case of connected boot. But its okay for that to be separate patch than this right? Regards Manasi > > Reviewed-by: Dave Airlie > > Otherwise I think this seems fine, though it does beg the question in > my mind of what happens if I get 2 8K monitors, and plug the first > tile of one in, and the second tile of the other in. > > Dave. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PULL] drm-misc-next-fixes
Hi Dave & Daniel, drm-misc-next-fixes is open and just a couple of patches this week. drm-misc-next-fixes-2019-11-06: -msm: Fix up a6xx debugbus register names (Sharat) -mst: Avoid u64 division (Sean) Cc: Sharat Masetty Cc: Sean Paul Cheers, Sean The following changes since commit cea35f5ad5ffac06ea29e0d7a7f748683e1f1b7d: drm/i915: Don't select BROKEN (2019-11-06 05:46:04 +1000) are available in the Git repository at: git://anongit.freedesktop.org/drm/drm-misc tags/drm-misc-next-fixes-2019-11-06 for you to fetch changes up to b149cbfeecaa2b2870d2c4f878382a024e6e4975: drm/mst: Fix up u64 division (2019-11-06 15:20:37 -0500) -msm: Fix up a6xx debugbus register names (Sharat) -mst: Avoid u64 division (Sean) Cc: Sharat Masetty Cc: Sean Paul Sean Paul (1): drm/mst: Fix up u64 division Sharat Masetty (1): drm: msm: a6xx: fix debug bus register configuration drivers/gpu/drm/drm_dp_mst_topology.c | 4 ++-- drivers/gpu/drm/msm/adreno/a6xx_gpu_state.c | 24 2 files changed, 14 insertions(+), 14 deletions(-) -- Sean Paul, Software Engineer, Google / Chromium OS ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/bios: store child devices in a list
== Series Details == Series: drm/i915/bios: store child devices in a list URL : https://patchwork.freedesktop.org/series/69077/ State : warning == Summary == $ dim checkpatch origin/drm-tip b08607b14961 drm/i915/bios: store child devices in a list -:388: CHECK:CAMELCASE: Avoid CamelCase: #388: FILE: drivers/gpu/drm/i915/display/intel_bios.c:2085: + (config->device_type & DEVICE_TYPE_eDP_BITS) == total: 0 errors, 0 warnings, 1 checks, 400 lines checked ___ 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 [v4,1/2] drm/i915: lookup for mem_region of a mem_type
== Series Details == Series: series starting with [v4,1/2] drm/i915: lookup for mem_region of a mem_type URL : https://patchwork.freedesktop.org/series/69075/ State : success == Summary == CI Bug Log - changes from CI_DRM_7274 -> Patchwork_15158 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15158: ### IGT changes ### Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_selftest@live_hugepages: - {fi-icl-y}: [PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-icl-y/igt@i915_selftest@live_hugepages.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/fi-icl-y/igt@i915_selftest@live_hugepages.html Known issues Here are the changes found in Patchwork_15158 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[PASS][3] -> [INCOMPLETE][4] ([fdo# 111542]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html Possible fixes * igt@gem_exec_suspend@basic: - {fi-icl-guc}: [FAIL][5] ([fdo#111699]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-icl-guc/igt@gem_exec_susp...@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/fi-icl-guc/igt@gem_exec_susp...@basic.html * igt@kms_chamelium@dp-crc-fast: - {fi-icl-u4}:[FAIL][7] ([fdo#111045]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-icl-u4/igt@kms_chamel...@dp-crc-fast.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/fi-icl-u4/igt@kms_chamel...@dp-crc-fast.html Warnings * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][9] ([fdo#111045] / [fdo#111096]) -> [FAIL][10] ([fdo#111407]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7274/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111699]: https://bugs.freedesktop.org/show_bug.cgi?id=111699 Participating hosts (51 -> 45) -- Missing(6): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7274 -> Patchwork_15158 CI-20190529: 20190529 CI_DRM_7274: bd7bf4f7bb4caede96cd1c086cc6760a584bd721 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15158: 960cfb3aac8d2c7eeb6434ba29cb83c8da3ff522 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 960cfb3aac8d drm/i915: Create dumb buffer from LMEM 03a4ffac2975 drm/i915: lookup for mem_region of a mem_type == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15158/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V8 0/6] mdev based hardware virtio offloading support
On Wed, Nov 06, 2019 at 12:03:12PM -0700, Alex Williamson wrote: > On Wed, 6 Nov 2019 11:56:46 +0800 > Jason Wang wrote: > > > On 2019/11/6 上午1:58, Alex Williamson wrote: > > > On Tue, 5 Nov 2019 17:32:34 +0800 > > > Jason Wang wrote: > > > > > >> Hi all: > > >> > > >> There are hardwares that can do virtio datapath offloading while > > >> having its own control path. This path tries to implement a mdev based > > >> unified API to support using kernel virtio driver to drive those > > >> devices. This is done by introducing a new mdev transport for virtio > > >> (virtio_mdev) and register itself as a new kind of mdev driver. Then > > >> it provides a unified way for kernel virtio driver to talk with mdev > > >> device implementation. > > >> > > >> Though the series only contains kernel driver support, the goal is to > > >> make the transport generic enough to support userspace drivers. This > > >> means vhost-mdev[1] could be built on top as well by resuing the > > >> transport. > > >> > > >> A sample driver is also implemented which simulate a virito-net > > >> loopback ethernet device on top of vringh + workqueue. This could be > > >> used as a reference implementation for real hardware driver. > > >> > > >> Also a real ICF VF driver was also posted here[2] which is a good > > >> reference for vendors who is interested in their own virtio datapath > > >> offloading product. > > >> > > >> Consider mdev framework only support VFIO device and driver right now, > > >> this series also extend it to support other types. This is done > > >> through introducing class id to the device and pairing it with > > >> id_talbe claimed by the driver. On top, this seris also decouple > > >> device specific parents ops out of the common ones. > > >> > > >> Pktgen test was done with virito-net + mvnet loop back device. > > >> > > >> Please review. > > >> > > >> [1] https://lkml.org/lkml/2019/10/31/440 > > >> [2] https://lkml.org/lkml/2019/10/15/1226 > > >> > > >> Changes from V7: > > >> - drop {set|get}_mdev_features for virtio > > >> - typo and comment style fixes > > > > > > Seems we're nearly there, all the remaining comments are relatively > > > superficial, though I would appreciate a v9 addressing them as well as > > > the checkpatch warnings: > > > > > > https://patchwork.freedesktop.org/series/68977/ > > > > > > Will do. > > > > Btw, do you plan to merge vhost-mdev patch on top? Or you prefer it to > > go through Michael's vhost tree? > > I can include it if you wish. The mdev changes are isolated enough in > that patch that I wouldn't presume it, but clearly it would require > less merge coordination to drop it in my tree. Let me know. Thanks, > > Alex I'm fine with merging through your tree. If you do, feel free to include Acked-by: Michael S. Tsirkin -- MST ___ 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: Handle i915_active_fence_set() with the same fence
== Series Details == Series: series starting with [1/3] drm/i915: Handle i915_active_fence_set() with the same fence URL : https://patchwork.freedesktop.org/series/69074/ State : success == Summary == CI Bug Log - changes from CI_DRM_7273 -> Patchwork_15157 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/index.html Known issues Here are the changes found in Patchwork_15157 that come from known issues: ### IGT changes ### Possible fixes * igt@gem_exec_suspend@basic: - fi-icl-u3: [FAIL][1] ([fdo#111699]) -> [PASS][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u3/igt@gem_exec_susp...@basic.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-icl-u3/igt@gem_exec_susp...@basic.html * igt@gem_exec_suspend@basic-s3: - {fi-cml-s}: [DMESG-WARN][3] ([fdo#111764]) -> [PASS][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-cml-s/igt@gem_exec_susp...@basic-s3.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-cml-s/igt@gem_exec_susp...@basic-s3.html * igt@i915_pm_rpm@module-reload: - fi-kbl-guc: [FAIL][5] -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-kbl-guc/igt@i915_pm_...@module-reload.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-kbl-guc/igt@i915_pm_...@module-reload.html * igt@i915_selftest@live_hugepages: - fi-icl-u3: [DMESG-WARN][7] -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u3/igt@i915_selftest@live_hugepages.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-icl-u3/igt@i915_selftest@live_hugepages.html * igt@kms_frontbuffer_tracking@basic: - {fi-icl-u4}:[FAIL][9] ([fdo#103167]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u4/igt@kms_frontbuffer_track...@basic.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-icl-u4/igt@kms_frontbuffer_track...@basic.html Warnings * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][11] ([fdo#111407]) -> [FAIL][12] ([fdo#111045] / [fdo#111096]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111699]: https://bugs.freedesktop.org/show_bug.cgi?id=111699 [fdo#111764]: https://bugs.freedesktop.org/show_bug.cgi?id=111764 Participating hosts (51 -> 44) -- Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7273 -> Patchwork_15157 CI-20190529: 20190529 CI_DRM_7273: 41b4771cadb55632f129b94751bf5dee7dcfdcc4 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15157: 84128d02d900a3a1a72c8d44c2b09276e1ed407a @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 84128d02d900 drm/i915/gem: Extract transient execbuf flags from i915_vma 080de2d6 drm/i915: Drop inspection of execbuf flags during evict 13993cd01cc9 drm/i915: Handle i915_active_fence_set() with the same fence == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15157/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V8 0/6] mdev based hardware virtio offloading support
On Wed, 6 Nov 2019 11:56:46 +0800 Jason Wang wrote: > On 2019/11/6 上午1:58, Alex Williamson wrote: > > On Tue, 5 Nov 2019 17:32:34 +0800 > > Jason Wang wrote: > > > >> Hi all: > >> > >> There are hardwares that can do virtio datapath offloading while > >> having its own control path. This path tries to implement a mdev based > >> unified API to support using kernel virtio driver to drive those > >> devices. This is done by introducing a new mdev transport for virtio > >> (virtio_mdev) and register itself as a new kind of mdev driver. Then > >> it provides a unified way for kernel virtio driver to talk with mdev > >> device implementation. > >> > >> Though the series only contains kernel driver support, the goal is to > >> make the transport generic enough to support userspace drivers. This > >> means vhost-mdev[1] could be built on top as well by resuing the > >> transport. > >> > >> A sample driver is also implemented which simulate a virito-net > >> loopback ethernet device on top of vringh + workqueue. This could be > >> used as a reference implementation for real hardware driver. > >> > >> Also a real ICF VF driver was also posted here[2] which is a good > >> reference for vendors who is interested in their own virtio datapath > >> offloading product. > >> > >> Consider mdev framework only support VFIO device and driver right now, > >> this series also extend it to support other types. This is done > >> through introducing class id to the device and pairing it with > >> id_talbe claimed by the driver. On top, this seris also decouple > >> device specific parents ops out of the common ones. > >> > >> Pktgen test was done with virito-net + mvnet loop back device. > >> > >> Please review. > >> > >> [1] https://lkml.org/lkml/2019/10/31/440 > >> [2] https://lkml.org/lkml/2019/10/15/1226 > >> > >> Changes from V7: > >> - drop {set|get}_mdev_features for virtio > >> - typo and comment style fixes > > > > Seems we're nearly there, all the remaining comments are relatively > > superficial, though I would appreciate a v9 addressing them as well as > > the checkpatch warnings: > > > > https://patchwork.freedesktop.org/series/68977/ > > > Will do. > > Btw, do you plan to merge vhost-mdev patch on top? Or you prefer it to > go through Michael's vhost tree? I can include it if you wish. The mdev changes are isolated enough in that patch that I wouldn't presume it, but clearly it would require less merge coordination to drop it in my tree. Let me know. Thanks, Alex ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v3,1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
== Series Details == Series: series starting with [v3,1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig URL : https://patchwork.freedesktop.org/series/69068/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7273 -> Patchwork_15155 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15155 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15155, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15155: ### IGT changes ### Possible regressions * igt@i915_selftest@live_mman: - fi-skl-lmem:[PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-skl-lmem/igt@i915_selftest@live_mman.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-skl-lmem/igt@i915_selftest@live_mman.html Known issues Here are the changes found in Patchwork_15155 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[PASS][3] -> [INCOMPLETE][4] ([fdo# 111542]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html Possible fixes * igt@gem_exec_suspend@basic: - fi-icl-u3: [FAIL][5] ([fdo#111699]) -> [PASS][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u3/igt@gem_exec_susp...@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-icl-u3/igt@gem_exec_susp...@basic.html * igt@i915_pm_rpm@module-reload: - fi-kbl-guc: [FAIL][7] -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-kbl-guc/igt@i915_pm_...@module-reload.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-kbl-guc/igt@i915_pm_...@module-reload.html * igt@i915_selftest@live_hugepages: - fi-icl-u3: [DMESG-WARN][9] -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u3/igt@i915_selftest@live_hugepages.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-icl-u3/igt@i915_selftest@live_hugepages.html * igt@kms_frontbuffer_tracking@basic: - {fi-icl-u4}:[FAIL][11] ([fdo#103167]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-icl-u4/igt@kms_frontbuffer_track...@basic.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-icl-u4/igt@kms_frontbuffer_track...@basic.html Warnings * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][13] ([fdo#111407]) -> [FAIL][14] ([fdo#111045] / [fdo#111096]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7273/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15155/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111699]: https://bugs.freedesktop.org/show_bug.cgi?id=111699 Participating hosts (51 -> 43) -- Missing(8): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-hsw-4770 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7273 -> Patchwork_15155 CI-20190529: 20190529 CI_DRM_7273: 41b4771cadb55632f129b94751bf5dee7dcfdcc4 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15155: a60113661a132104d54c5a4e446b784b8c5e50c7 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == a60113661a13 drm/i915/selftests: Verify mmap_gtt revocation on unbinding 3616b97058ec drm/i915/selftests: Wrap vm_mmap() around GEM objects 41e223fd88e7 drm/i915/selftests: Replace mock_file hackery with drm's true fake 5f9905382080 drm: Expose a method for creating anonymous struct file around drm_minor 7737267b3477 drm: Move EXPORT_SYMB
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gem: Fix error path to unlock if the GEM context is closed
== Series Details == Series: drm/i915/gem: Fix error path to unlock if the GEM context is closed URL : https://patchwork.freedesktop.org/series/69070/ State : failure == Summary == Applying: drm/i915/gem: Fix error path to unlock if the GEM context is closed Using index info to reconstruct a base tree... M drivers/gpu/drm/i915/gem/i915_gem_context.c Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/gem/i915_gem_context.c No changes -- Patch already applied. ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
== Series Details == Series: series starting with [v3,1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig URL : https://patchwork.freedesktop.org/series/69068/ State : warning == Summary == $ dim checkpatch origin/drm-tip 7737267b3477 drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig 5f9905382080 drm: Expose a method for creating anonymous struct file around drm_minor 41e223fd88e7 drm/i915/selftests: Replace mock_file hackery with drm's true fake 3616b97058ec drm/i915/selftests: Wrap vm_mmap() around GEM objects -:41: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #41: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:698: +#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24)) -:91: ERROR:SPACING: space required before that '*' (ctx:VxV) #91: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:748: + u32 __user *ux = u64_to_user_ptr((u64)(addr + i * sizeof*(ux))); ^ -:147: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #147: new file mode 100644 -:152: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #152: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:1: +/* -:153: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #153: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:2: + * SPDX-License-Identifier: MIT -:197: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #197: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:1: +/* -:198: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #198: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:2: + * SPDX-License-Identifier: MIT total: 1 errors, 5 warnings, 1 checks, 180 lines checked a60113661a13 drm/i915/selftests: Verify mmap_gtt revocation on unbinding -:67: WARNING:LINE_SPACING: Missing a blank line after declarations #67: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:837: + int err = __get_user(c, addr); + if (err) total: 0 errors, 1 warnings, 0 checks, 119 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/2] drm/i915/guc: Add GuC method to determine if submission is active.
From: Don Hiatt Add intel_guc_submission_is_enabled() function to determine if GuC submission is active. Based on code by Michal Wajdeczko. Signed-off-by: Don Hiatt --- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 2 +- drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h | 1 + drivers/gpu/drm/i915/i915_drv.h | 14 ++ 3 files changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c index 2498c55e0ea5..0aaef7c07879 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c @@ -1081,7 +1081,7 @@ static void guc_interrupts_release(struct intel_gt *gt) rps->pm_intrmsk_mbz &= ~ARAT_EXPIRED_INTRMSK; } -static void guc_set_default_submission(struct intel_engine_cs *engine) +void guc_set_default_submission(struct intel_engine_cs *engine) { /* * We inherit a bunch of functions from execlists that we'd like diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h index 54d716828352..a0132f061ebc 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.h @@ -63,5 +63,6 @@ void intel_guc_submission_disable(struct intel_guc *guc); void intel_guc_submission_fini(struct intel_guc *guc); int intel_guc_preempt_work_create(struct intel_guc *guc); void intel_guc_preempt_work_destroy(struct intel_guc *guc); +void guc_set_default_submission(struct intel_engine_cs *engine); #endif diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 7e0f67babe20..878d574bb1c1 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -78,8 +78,10 @@ #include "gt/intel_lrc.h" #include "gt/intel_engine.h" +#include "gt/intel_gt.h" #include "gt/intel_gt_types.h" #include "gt/intel_workarounds.h" +#include "gt/uc/intel_guc_submission.h" #include "gt/uc/intel_uc.h" #include "intel_device_info.h" @@ -2032,4 +2034,16 @@ i915_coherent_map_type(struct drm_i915_private *i915) return HAS_LLC(i915) ? I915_MAP_WB : I915_MAP_WC; } +static inline bool intel_guc_submission_is_enabled(struct intel_guc *guc) +{ + struct intel_gt *gt = guc_to_gt(guc); + struct intel_engine_cs *engine; + enum intel_engine_id id; + + for_each_engine(engine, gt, id) + return engine->set_default_submission == + guc_set_default_submission; + return false; +} + #endif -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/2] drm/i915/guc: Skip suspend/resume GuC action on platforms w/o GuC submission
From: Don Hiatt On some platforms (e.g. KBL) that do not support GuC submission, but the user enabled the GuC communication (e.g for HuC authentication) calling the GuC EXIT_S_STATE action results in lose of ability to enter RC6. We can remove the GuC suspend/resume entirely as we do not need to save the GuC submission status. v2: Do not suspend/resume the GuC on platforms that do not support Guc Submission. v3: Fix typo, move suspend logic to remove goto. v4: Use intel_guc_submission_is_enabled() to check GuC submission status. Signed-off-by: Don Hiatt --- drivers/gpu/drm/i915/gt/uc/intel_guc.c | 7 +++ drivers/gpu/drm/i915/gt/uc/intel_uc.c | 8 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc.c b/drivers/gpu/drm/i915/gt/uc/intel_guc.c index 019ae6486e8d..92d9305c0d73 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_guc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc.c @@ -553,6 +553,13 @@ int intel_guc_suspend(struct intel_guc *guc) GUC_POWER_D1, /* any value greater than GUC_POWER_D0 */ }; + /* +* If GuC communication is enabled but submission is not supported, +* we do not need to suspend the GuC. +*/ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + /* * The ENTER_S_STATE action queues the save/restore operation in GuC FW * and then returns, so waiting on the H2G is not enough to guarantee diff --git a/drivers/gpu/drm/i915/gt/uc/intel_uc.c b/drivers/gpu/drm/i915/gt/uc/intel_uc.c index 629b19377a29..4dd43b99a334 100644 --- a/drivers/gpu/drm/i915/gt/uc/intel_uc.c +++ b/drivers/gpu/drm/i915/gt/uc/intel_uc.c @@ -605,6 +605,14 @@ static int __uc_resume(struct intel_uc *uc, bool enable_communication) if (enable_communication) guc_enable_communication(guc); + /* +* If GuC communication is enabled but submission is not supported, +* we do not need to resume the GuC but we do need to enable the +* GuC communication on resume (above). +*/ + if (!intel_guc_submission_is_enabled(guc)) + return 0; + err = intel_guc_resume(guc); if (err) { DRM_DEBUG_DRIVER("Failed to resume GuC, err=%d", err); -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
Quoting Ville Syrjala (2019-11-06 17:23:49) > From: Ville Syrjälä > > Make sure we have a crtc before probing its primary plane's > max stride. Initially I thought we can't get this far without > crtcs, but looks like we can via the dumb_create ioctl. > > Not sure if we shouldn't disable dumb buffer support entirely > when we have no crtcs, but that would require some amount of work > as the only thing currently being checked is dev->driver->dumb_create > which we'd have to convert to some device specific dynamic thing. > > Cc: sta...@vger.kernel.org > Reported-by: Mika Kuoppala > Fixes: aa5ca8b7421c ("drm/i915: Align dumb buffer stride to 4k to allow for > gtt remapping") > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/display/intel_display.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > b/drivers/gpu/drm/i915/display/intel_display.c > index 1f93860fb897..331030765ca9 100644 > --- a/drivers/gpu/drm/i915/display/intel_display.c > +++ b/drivers/gpu/drm/i915/display/intel_display.c > @@ -2543,6 +2543,9 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private > *dev_priv, > * the highest stride limits of them all. > */ > crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A); > + if (!crtc) > + return 0; > + Callers: intel_fb_max_stride -> intel_framebuffer_init, not used if no display intel_fb_stride_alignment, 0 -> intel_tile_size() alignment. ok -> intel_framebuffer_init, not used as no display -> i915_gem_dumb_create -> args->pitch = PAGE_ALIGN() Ok, not as horrible as I feared when I saw return 0 from max_stride! Reviewed-by: Chris Wilson -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/gvt: fix dropping obj reference twice
The reference count of obj will be decremented twice if error occurs in dma_buf_fd(). Additionally, attempting to read the reference count of obj after dropping reference may lead to a use after free bug. Here, we drop obj's reference until it is not used. Signed-off-by: Pan Bian --- drivers/gpu/drm/i915/gvt/dmabuf.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gvt/dmabuf.c b/drivers/gpu/drm/i915/gvt/dmabuf.c index 13044c027f27..4bfaefdf548d 100644 --- a/drivers/gpu/drm/i915/gvt/dmabuf.c +++ b/drivers/gpu/drm/i915/gvt/dmabuf.c @@ -498,8 +498,6 @@ int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id) goto out_free_gem; } - i915_gem_object_put(obj); - ret = dma_buf_fd(dmabuf, DRM_CLOEXEC | DRM_RDWR); if (ret < 0) { gvt_vgpu_err("create dma-buf fd failed ret:%d\n", ret); @@ -524,6 +522,8 @@ int intel_vgpu_get_dmabuf(struct intel_vgpu *vgpu, unsigned int dmabuf_id) file_count(dmabuf->file), kref_read(&obj->base.refcount)); + i915_gem_object_put(obj); + return dmabuf_fd; out_free_dmabuf: -- 2.7.4 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915: Don't oops in dumb_create ioctl if we have no crtcs
From: Ville Syrjälä Make sure we have a crtc before probing its primary plane's max stride. Initially I thought we can't get this far without crtcs, but looks like we can via the dumb_create ioctl. Not sure if we shouldn't disable dumb buffer support entirely when we have no crtcs, but that would require some amount of work as the only thing currently being checked is dev->driver->dumb_create which we'd have to convert to some device specific dynamic thing. Cc: sta...@vger.kernel.org Reported-by: Mika Kuoppala Fixes: aa5ca8b7421c ("drm/i915: Align dumb buffer stride to 4k to allow for gtt remapping") Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 1f93860fb897..331030765ca9 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -2543,6 +2543,9 @@ u32 intel_plane_fb_max_stride(struct drm_i915_private *dev_priv, * the highest stride limits of them all. */ crtc = intel_get_crtc_for_pipe(dev_priv, PIPE_A); + if (!crtc) + return 0; + plane = to_intel_plane(crtc->base.primary); return plane->max_stride(plane, pixel_format, modifier, -- 2.23.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [CI] drm/i915: Remove unwanted rcu_read_lock/unlock
From: Niranjana Vishwanathapura We don't need rcu read side critical section to call pid_nr(), remove it. Signed-off-by: Niranjana Vishwanathapura Reviewed-by: Chris Wilson Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_gpu_error.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index e8b67f5e521d..1f2f266f26af 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c @@ -1230,10 +1230,7 @@ static void record_request(const struct i915_request *request, erq->start = i915_ggtt_offset(request->ring->vma); erq->head = request->head; erq->tail = request->tail; - - rcu_read_lock(); erq->pid = ctx->pid ? pid_nr(ctx->pid) : 0; - rcu_read_unlock(); } static void engine_record_requests(struct intel_engine_cs *engine, -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [v2,1/4] drm: Expose a method for creating anonymous struct file around drm_minor
== Series Details == Series: series starting with [v2,1/4] drm: Expose a method for creating anonymous struct file around drm_minor URL : https://patchwork.freedesktop.org/series/69064/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7270 -> Patchwork_15154 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15154 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15154, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15154/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15154: ### IGT changes ### Possible regressions * igt@i915_selftest@live_mman: - fi-skl-lmem:[PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-skl-lmem/igt@i915_selftest@live_mman.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15154/fi-skl-lmem/igt@i915_selftest@live_mman.html Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_selftest@live_execlists: - {fi-icl-dsi}: [PASS][3] -> [DMESG-FAIL][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-icl-dsi/igt@i915_selftest@live_execlists.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15154/fi-icl-dsi/igt@i915_selftest@live_execlists.html Known issues Here are the changes found in Patchwork_15154 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [PASS][5] -> [INCOMPLETE][6] ([fdo#106070] / [fdo#111700]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15154/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#106070]: https://bugs.freedesktop.org/show_bug.cgi?id=106070 [fdo#111700]: https://bugs.freedesktop.org/show_bug.cgi?id=111700 Participating hosts (51 -> 44) -- Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7270 -> Patchwork_15154 CI-20190529: 20190529 CI_DRM_7270: 8d83f3978cb2413ffceb2b8a9c1d507484d7ff08 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15154: 3fc8ead596dcfe9557195622cad63a862f62866a @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 3fc8ead596dc drm/i915/selftests: Verify mmap_gtt revocation on unbinding 6816a5a62c34 drm/i915/selftests: Wrap vm_mmap() around GEM objects 096ea15b052a drm/i915/selftests: Replace mock_file hackery with drm's true fake 3a38f9e9be4b drm: Expose a method for creating anonymous struct file around drm_minor == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15154/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/4] drm: Expose a method for creating anonymous struct file around drm_minor
== Series Details == Series: series starting with [v2,1/4] drm: Expose a method for creating anonymous struct file around drm_minor URL : https://patchwork.freedesktop.org/series/69064/ State : warning == Summary == $ dim checkpatch origin/drm-tip 3a38f9e9be4b drm: Expose a method for creating anonymous struct file around drm_minor 096ea15b052a drm/i915/selftests: Replace mock_file hackery with drm's true fake 6816a5a62c34 drm/i915/selftests: Wrap vm_mmap() around GEM objects -:41: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #41: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:698: +#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24)) -:91: ERROR:SPACING: space required before that '*' (ctx:VxV) #91: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:748: + u32 __user *ux = u64_to_user_ptr((u64)(addr + i * sizeof*(ux))); ^ -:147: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #147: new file mode 100644 -:152: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #152: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:1: +/* -:153: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #153: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:2: + * SPDX-License-Identifier: MIT -:197: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #197: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:1: +/* -:198: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #198: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:2: + * SPDX-License-Identifier: MIT total: 1 errors, 5 warnings, 1 checks, 180 lines checked 3fc8ead596dc drm/i915/selftests: Verify mmap_gtt revocation on unbinding -:67: WARNING:LINE_SPACING: Missing a blank line after declarations #67: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:837: + int err = __get_user(c, addr); + if (err) total: 0 errors, 1 warnings, 0 checks, 119 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for mdev based hardware virtio offloading support
== Series Details == Series: mdev based hardware virtio offloading support URL : https://patchwork.freedesktop.org/series/69063/ State : success == Summary == CI Bug Log - changes from CI_DRM_7270 -> Patchwork_15153 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15153/index.html Known issues Here are the changes found in Patchwork_15153 that come from known issues: ### IGT changes ### Issues hit * igt@kms_frontbuffer_tracking@basic: - fi-icl-u2: [PASS][1] -> [FAIL][2] ([fdo#103167]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-icl-u2/igt@kms_frontbuffer_track...@basic.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15153/fi-icl-u2/igt@kms_frontbuffer_track...@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#103167]: https://bugs.freedesktop.org/show_bug.cgi?id=103167 [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#108743]: https://bugs.freedesktop.org/show_bug.cgi?id=108743 Participating hosts (51 -> 44) -- Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7270 -> Patchwork_15153 CI-20190529: 20190529 CI_DRM_7270: 8d83f3978cb2413ffceb2b8a9c1d507484d7ff08 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15153: 42f8bf2303b0ea32b40b81645a89f3674dd44f12 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 42f8bf2303b0 docs: sample driver to demonstrate how to implement virtio-mdev framework b59bcebe0b2b virtio: introduce a mdev based transport b92fd4081624 mdev: introduce virtio device and its device ops 94e6d607158c mdev: introduce device specific ops aa81f6ab1bbe modpost: add support for mdev class id 2e15c56da9d0 mdev: class id support == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15153/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/bios: store child devices in a list
Using the array is getting clumsy. Make things a bit more dynamic. In code, start migrating towards calling the new struct child_device "child" and the VBT-originating struct child_device_config "config". Remove early returns on not having child devices when the end result after "iterating" the empty list would be the same. Cc: Ville Syrjala Signed-off-by: Jani Nikula --- The end goal: allow more meta information to be added to the new child_device struct, independent of DDI port info being used or not on the platform, and eventually migrate ddi_port_info to it as well, unifying the stuff across platforms. Currently it's not easily possible to associate for example the DSC compression data to the child device for non-DDI platforms or for DSI outputs. This lets us add the compression data (pointer) to struct child_device. --- drivers/gpu/drm/i915/display/intel_bios.c | 203 ++ drivers/gpu/drm/i915/i915_drv.h | 3 +- 2 files changed, 97 insertions(+), 109 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_bios.c b/drivers/gpu/drm/i915/display/intel_bios.c index a03f56b7b4ef..025074862ab0 100644 --- a/drivers/gpu/drm/i915/display/intel_bios.c +++ b/drivers/gpu/drm/i915/display/intel_bios.c @@ -58,6 +58,12 @@ * that. */ +/* Wrapper for VBT child device config */ +struct child_device { + struct child_device_config config; + struct list_head node; +}; + #defineSLAVE_ADDR1 0x70 #defineSLAVE_ADDR2 0x72 @@ -449,8 +455,9 @@ static void parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) { struct sdvo_device_mapping *mapping; - const struct child_device_config *child; - int i, count = 0; + const struct child_device_config *config; + const struct child_device *child; + int count = 0; /* * Only parse SDVO mappings on gens that could have SDVO. This isn't @@ -461,35 +468,35 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) return; } - for (i = 0, count = 0; i < dev_priv->vbt.child_dev_num; i++) { - child = dev_priv->vbt.child_dev + i; + list_for_each_entry(child, &dev_priv->vbt.child_devices, node) { + config = &child->config; - if (child->slave_addr != SLAVE_ADDR1 && - child->slave_addr != SLAVE_ADDR2) { + if (config->slave_addr != SLAVE_ADDR1 && + config->slave_addr != SLAVE_ADDR2) { /* * If the slave address is neither 0x70 nor 0x72, * it is not a SDVO device. Skip it. */ continue; } - if (child->dvo_port != DEVICE_PORT_DVOB && - child->dvo_port != DEVICE_PORT_DVOC) { + if (config->dvo_port != DEVICE_PORT_DVOB && + config->dvo_port != DEVICE_PORT_DVOC) { /* skip the incorrect SDVO port */ DRM_DEBUG_KMS("Incorrect SDVO port. Skip it\n"); continue; } DRM_DEBUG_KMS("the SDVO device with slave addr %2x is found on" " %s port\n", - child->slave_addr, - (child->dvo_port == DEVICE_PORT_DVOB) ? + config->slave_addr, + (config->dvo_port == DEVICE_PORT_DVOB) ? "SDVOB" : "SDVOC"); - mapping = &dev_priv->vbt.sdvo_mappings[child->dvo_port - 1]; + mapping = &dev_priv->vbt.sdvo_mappings[config->dvo_port - 1]; if (!mapping->initialized) { - mapping->dvo_port = child->dvo_port; - mapping->slave_addr = child->slave_addr; - mapping->dvo_wiring = child->dvo_wiring; - mapping->ddc_pin = child->ddc_pin; - mapping->i2c_pin = child->i2c_pin; + mapping->dvo_port = config->dvo_port; + mapping->slave_addr = config->slave_addr; + mapping->dvo_wiring = config->dvo_wiring; + mapping->ddc_pin = config->ddc_pin; + mapping->i2c_pin = config->i2c_pin; mapping->initialized = 1; DRM_DEBUG_KMS("SDVO device: dvo=%x, addr=%x, wiring=%d, ddc_pin=%d, i2c_pin=%d\n", mapping->dvo_port, @@ -501,7 +508,7 @@ parse_sdvo_device_mapping(struct drm_i915_private *dev_priv, u8 bdb_version) DRM_DEBUG_KMS("Maybe one SDVO port is shared by " "two SDVO device.\n"); } - if (child->slave2_addr) { + if (config->sl
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for mdev based hardware virtio offloading support
== Series Details == Series: mdev based hardware virtio offloading support URL : https://patchwork.freedesktop.org/series/69063/ State : warning == Summary == $ dim checkpatch origin/drm-tip 2e15c56da9d0 mdev: class id support aa81f6ab1bbe modpost: add support for mdev class id 94e6d607158c mdev: introduce device specific ops -:499: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #499: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 618 lines checked b92fd4081624 mdev: introduce virtio device and its device ops -:108: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #108: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 219 lines checked b59bcebe0b2b virtio: introduce a mdev based transport -:53: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #53: new file mode 100644 -:113: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #113: FILE: drivers/virtio/virtio_mdev.c:56: +static void virtio_mdev_get(struct virtio_device *vdev, unsigned offset, -:114: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #114: FILE: drivers/virtio/virtio_mdev.c:57: + void *buf, unsigned len) -:122: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #122: FILE: drivers/virtio/virtio_mdev.c:65: +static void virtio_mdev_set(struct virtio_device *vdev, unsigned offset, -:123: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #123: FILE: drivers/virtio/virtio_mdev.c:66: + const void *buf, unsigned len) -:303: WARNING:UNSPECIFIED_INT: Prefer 'unsigned int' to bare use of 'unsigned' #303: FILE: drivers/virtio/virtio_mdev.c:246: +static int virtio_mdev_find_vqs(struct virtio_device *vdev, unsigned nvqs, total: 0 errors, 6 warnings, 0 checks, 429 lines checked 42f8bf2303b0 docs: sample driver to demonstrate how to implement virtio-mdev framework -:63: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #63: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 713 lines checked ___ 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/gt: Only drop heartbeat.systole if the sole owner
== Series Details == Series: drm/i915/gt: Only drop heartbeat.systole if the sole owner URL : https://patchwork.freedesktop.org/series/69060/ State : success == Summary == CI Bug Log - changes from CI_DRM_7270 -> Patchwork_15152 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15152/index.html Known issues Here are the changes found in Patchwork_15152 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_gem_contexts: - fi-bsw-nick:[PASS][1] -> [INCOMPLETE][2] ([fdo# 111542]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15152/fi-bsw-nick/igt@i915_selftest@live_gem_contexts.html [fdo# 111542]: https://bugs.freedesktop.org/show_bug.cgi?id= 111542 Participating hosts (51 -> 44) -- Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7270 -> Patchwork_15152 CI-20190529: 20190529 CI_DRM_7270: 8d83f3978cb2413ffceb2b8a9c1d507484d7ff08 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15152: f354ed7ed8e594e20b0ee6ebacb610307c4e0888 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == f354ed7ed8e5 drm/i915/gt: Only drop heartbeat.systole if the sole owner == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15152/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v4 1/2] drm/i915: lookup for mem_region of a mem_type
On 2019-11-06 at 21:45:44 +0530, Tang, CQ wrote: > > > > -Original Message- > > From: Intel-gfx On Behalf Of > > Ramalingam C > > Sent: Wednesday, November 6, 2019 8:08 AM > > To: intel-gfx ; Chris Wilson > wilson.co.uk> > > Cc: Auld, Matthew > > Subject: [Intel-gfx] [PATCH v4 1/2] drm/i915: lookup for mem_region of a > > mem_type > > > > Lookup function to retrieve the pointer to a memory region of a mem_type. > > We could have multi-regions with the same memory type. Your code just returns > the first one. Is this desired? At present even i915_gem_object_create_lmem i915_gem_object_create_shmem retrieve the mem_region in this manner only. may be when we have more region_ids per type we could extend based on a need. This is just my thoughts. -Ram > > --CQ > > > > > Signed-off-by: Ramalingam C > > cc: Matthew Auld > > --- > > drivers/gpu/drm/i915/intel_memory_region.c | 12 > > drivers/gpu/drm/i915/intel_memory_region.h | 3 +++ > > 2 files changed, 15 insertions(+) > > > > diff --git a/drivers/gpu/drm/i915/intel_memory_region.c > > b/drivers/gpu/drm/i915/intel_memory_region.c > > index baaeaecc64af..ae899df7a1c2 100644 > > --- a/drivers/gpu/drm/i915/intel_memory_region.c > > +++ b/drivers/gpu/drm/i915/intel_memory_region.c > > @@ -16,6 +16,18 @@ const u32 intel_region_map[] = { > > [INTEL_REGION_STOLEN] = REGION_MAP(INTEL_MEMORY_STOLEN, > > 0), }; > > > > +struct intel_memory_region * > > +intel_memory_region_lookup(struct drm_i915_private *i915, > > + enum intel_memory_type mem_type) > > +{ > > + enum intel_region_id id; > > + > > + for (id = INTEL_REGION_SMEM; id < INTEL_REGION_UNKNOWN; > > id++) > > + if (i915->mm.regions[id]->type == mem_type) > > + return i915->mm.regions[id]; > > + return NULL; > > +} > > + > > static u64 > > intel_memory_region_free_pages(struct intel_memory_region *mem, > >struct list_head *blocks) > > diff --git a/drivers/gpu/drm/i915/intel_memory_region.h > > b/drivers/gpu/drm/i915/intel_memory_region.h > > index 238722009677..d210936c4d72 100644 > > --- a/drivers/gpu/drm/i915/intel_memory_region.h > > +++ b/drivers/gpu/drm/i915/intel_memory_region.h > > @@ -125,5 +125,8 @@ void intel_memory_region_put(struct > > intel_memory_region *mem); > > > > int intel_memory_regions_hw_probe(struct drm_i915_private *i915); void > > intel_memory_regions_driver_release(struct drm_i915_private *i915); > > +struct intel_memory_region * > > +intel_memory_region_lookup(struct drm_i915_private *i915, > > + enum intel_memory_type mem_type); > > > > #endif > > -- > > 2.20.1 > > > > ___ > > Intel-gfx mailing list > > Intel-gfx@lists.freedesktop.org > > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v4 1/2] drm/i915: lookup for mem_region of a mem_type
> -Original Message- > From: Intel-gfx On Behalf Of > Ramalingam C > Sent: Wednesday, November 6, 2019 8:08 AM > To: intel-gfx ; Chris Wilson wilson.co.uk> > Cc: Auld, Matthew > Subject: [Intel-gfx] [PATCH v4 1/2] drm/i915: lookup for mem_region of a > mem_type > > Lookup function to retrieve the pointer to a memory region of a mem_type. We could have multi-regions with the same memory type. Your code just returns the first one. Is this desired? --CQ > > Signed-off-by: Ramalingam C > cc: Matthew Auld > --- > drivers/gpu/drm/i915/intel_memory_region.c | 12 > drivers/gpu/drm/i915/intel_memory_region.h | 3 +++ > 2 files changed, 15 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_memory_region.c > b/drivers/gpu/drm/i915/intel_memory_region.c > index baaeaecc64af..ae899df7a1c2 100644 > --- a/drivers/gpu/drm/i915/intel_memory_region.c > +++ b/drivers/gpu/drm/i915/intel_memory_region.c > @@ -16,6 +16,18 @@ const u32 intel_region_map[] = { > [INTEL_REGION_STOLEN] = REGION_MAP(INTEL_MEMORY_STOLEN, > 0), }; > > +struct intel_memory_region * > +intel_memory_region_lookup(struct drm_i915_private *i915, > +enum intel_memory_type mem_type) > +{ > + enum intel_region_id id; > + > + for (id = INTEL_REGION_SMEM; id < INTEL_REGION_UNKNOWN; > id++) > + if (i915->mm.regions[id]->type == mem_type) > + return i915->mm.regions[id]; > + return NULL; > +} > + > static u64 > intel_memory_region_free_pages(struct intel_memory_region *mem, > struct list_head *blocks) > diff --git a/drivers/gpu/drm/i915/intel_memory_region.h > b/drivers/gpu/drm/i915/intel_memory_region.h > index 238722009677..d210936c4d72 100644 > --- a/drivers/gpu/drm/i915/intel_memory_region.h > +++ b/drivers/gpu/drm/i915/intel_memory_region.h > @@ -125,5 +125,8 @@ void intel_memory_region_put(struct > intel_memory_region *mem); > > int intel_memory_regions_hw_probe(struct drm_i915_private *i915); void > intel_memory_regions_driver_release(struct drm_i915_private *i915); > +struct intel_memory_region * > +intel_memory_region_lookup(struct drm_i915_private *i915, > +enum intel_memory_type mem_type); > > #endif > -- > 2.20.1 > > ___ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v4 2/2] drm/i915: Create dumb buffer from LMEM
When LMEM is supported, dumb buffer preferred to be created from LMEM. v2: Parameters are reshuffled. [Chris] v3: s/region_id/mem_type v4: use the i915_gem_object_create_region [chris] Signed-off-by: Ramalingam C cc: Matthew Auld --- drivers/gpu/drm/i915/i915_gem.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 143a8952b736..80fb4159cad6 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -44,6 +44,7 @@ #include "gem/i915_gem_clflush.h" #include "gem/i915_gem_context.h" #include "gem/i915_gem_ioctls.h" +#include "gem/i915_gem_region.h" #include "gem/i915_gem_pm.h" #include "gt/intel_engine_user.h" #include "gt/intel_gt.h" @@ -175,6 +176,7 @@ i915_gem_phys_pwrite(struct drm_i915_gem_object *obj, static int i915_gem_create(struct drm_file *file, struct drm_i915_private *dev_priv, + enum intel_memory_type mem_type, u64 *size_p, u32 *handle_p) { @@ -188,7 +190,9 @@ i915_gem_create(struct drm_file *file, return -EINVAL; /* Allocate the new object */ - obj = i915_gem_object_create_shmem(dev_priv, size); + obj = i915_gem_object_create_region(intel_memory_region_lookup(dev_priv, + mem_type), + size, 0); if (IS_ERR(obj)) return PTR_ERR(obj); @@ -208,6 +212,7 @@ i915_gem_dumb_create(struct drm_file *file, struct drm_device *dev, struct drm_mode_create_dumb *args) { + enum intel_memory_type mem_type = INTEL_MEMORY_SYSTEM; int cpp = DIV_ROUND_UP(args->bpp, 8); u32 format; @@ -234,7 +239,11 @@ i915_gem_dumb_create(struct drm_file *file, args->pitch = ALIGN(args->pitch, 4096); args->size = args->pitch * args->height; - return i915_gem_create(file, to_i915(dev), + + if (HAS_LMEM(to_i915(dev))) + mem_type = INTEL_MEMORY_LOCAL; + + return i915_gem_create(file, to_i915(dev), mem_type, &args->size, &args->handle); } @@ -253,7 +262,7 @@ i915_gem_create_ioctl(struct drm_device *dev, void *data, i915_gem_flush_free_objects(dev_priv); - return i915_gem_create(file, dev_priv, + return i915_gem_create(file, dev_priv, INTEL_MEMORY_SYSTEM, &args->size, &args->handle); } -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v4 1/2] drm/i915: lookup for mem_region of a mem_type
Lookup function to retrieve the pointer to a memory region of a mem_type. Signed-off-by: Ramalingam C cc: Matthew Auld --- drivers/gpu/drm/i915/intel_memory_region.c | 12 drivers/gpu/drm/i915/intel_memory_region.h | 3 +++ 2 files changed, 15 insertions(+) diff --git a/drivers/gpu/drm/i915/intel_memory_region.c b/drivers/gpu/drm/i915/intel_memory_region.c index baaeaecc64af..ae899df7a1c2 100644 --- a/drivers/gpu/drm/i915/intel_memory_region.c +++ b/drivers/gpu/drm/i915/intel_memory_region.c @@ -16,6 +16,18 @@ const u32 intel_region_map[] = { [INTEL_REGION_STOLEN] = REGION_MAP(INTEL_MEMORY_STOLEN, 0), }; +struct intel_memory_region * +intel_memory_region_lookup(struct drm_i915_private *i915, + enum intel_memory_type mem_type) +{ + enum intel_region_id id; + + for (id = INTEL_REGION_SMEM; id < INTEL_REGION_UNKNOWN; id++) + if (i915->mm.regions[id]->type == mem_type) + return i915->mm.regions[id]; + return NULL; +} + static u64 intel_memory_region_free_pages(struct intel_memory_region *mem, struct list_head *blocks) diff --git a/drivers/gpu/drm/i915/intel_memory_region.h b/drivers/gpu/drm/i915/intel_memory_region.h index 238722009677..d210936c4d72 100644 --- a/drivers/gpu/drm/i915/intel_memory_region.h +++ b/drivers/gpu/drm/i915/intel_memory_region.h @@ -125,5 +125,8 @@ void intel_memory_region_put(struct intel_memory_region *mem); int intel_memory_regions_hw_probe(struct drm_i915_private *i915); void intel_memory_regions_driver_release(struct drm_i915_private *i915); +struct intel_memory_region * +intel_memory_region_lookup(struct drm_i915_private *i915, + enum intel_memory_type mem_type); #endif -- 2.20.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/4] drm: Expose a method for creating anonymous struct file around drm_minor
== Series Details == Series: series starting with [1/4] drm: Expose a method for creating anonymous struct file around drm_minor URL : https://patchwork.freedesktop.org/series/69059/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7270 -> Patchwork_15151 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_15151 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_15151, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15151/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_15151: ### IGT changes ### Possible regressions * igt@i915_selftest@live_mman: - fi-skl-lmem:[PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-skl-lmem/igt@i915_selftest@live_mman.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15151/fi-skl-lmem/igt@i915_selftest@live_mman.html Known issues Here are the changes found in Patchwork_15151 that come from known issues: ### IGT changes ### Warnings * igt@kms_chamelium@vga-edid-read: - fi-icl-u2: [SKIP][3] ([fdo#109309]) -> [FAIL][4] ([fdo#109483]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7270/fi-icl-u2/igt@kms_chamel...@vga-edid-read.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15151/fi-icl-u2/igt@kms_chamel...@vga-edid-read.html [fdo#109309]: https://bugs.freedesktop.org/show_bug.cgi?id=109309 [fdo#109483]: https://bugs.freedesktop.org/show_bug.cgi?id=109483 Participating hosts (51 -> 44) -- Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7270 -> Patchwork_15151 CI-20190529: 20190529 CI_DRM_7270: 8d83f3978cb2413ffceb2b8a9c1d507484d7ff08 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5264: f21213012393bd8041ad93084ce29da088ef8426 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15151: 8f28adffccacbf75d0b191f31a7d6fb1d27ab93b @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 8f28adffccac drm/i915/selftests: Verify mmap_gtt revocation on unbinding cca250d8785e drm/i915/selftests: Wrap vm_mmap() around GEM objects 755b15511b95 drm/i915/selftests: Replace mock_file hackery with drm's true fake d7aa94bb3f9e drm: Expose a method for creating anonymous struct file around drm_minor == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15151/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH RESEND 07/14] drm/msm/hdmi: Provide ddc symlink in hdmi connector sysfs directory
On Mon, Aug 26, 2019 at 3:27 PM Andrzej Pietrasiewicz wrote: > > Use the ddc pointer provided by the generic connector. > > Signed-off-by: Andrzej Pietrasiewicz > Acked-by: Sam Ravnborg > Reviewed-by: Emil Velikov Acked-by: Sean Paul > --- > drivers/gpu/drm/msm/hdmi/hdmi_connector.c | 6 -- > 1 file changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c > b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c > index 07b4cb877d82..1f03262b8a52 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi_connector.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi_connector.c > @@ -450,8 +450,10 @@ struct drm_connector *msm_hdmi_connector_init(struct > hdmi *hdmi) > > connector = &hdmi_connector->base; > > - drm_connector_init(hdmi->dev, connector, &hdmi_connector_funcs, > - DRM_MODE_CONNECTOR_HDMIA); > + drm_connector_init_with_ddc(hdmi->dev, connector, > + &hdmi_connector_funcs, > + DRM_MODE_CONNECTOR_HDMIA, > + hdmi->i2c); > drm_connector_helper_add(connector, &msm_hdmi_connector_helper_funcs); > > connector->polled = DRM_CONNECTOR_POLL_CONNECT | > -- > 2.17.1 > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/3] drm/i915: Drop inspection of execbuf flags during evict
With the goal of removing the serialisation from around execbuf, we will no longer have the privilege of there being a single execbuf in flight at any time and so will only be able to inspect the user's flags within the carefully controlled execbuf context. i915_gem_evict_for_node() is the only user outside of execbuf that currently peeks at the flag to convert an overlapping softpinned request from ENOSPC to EINVAL. Retract this nicety and only report ENOSPC if the location is in current use, either due to this execbuf or another. Signed-off-by: Chris Wilson Cc: Joonas Lahtinen Reviewed-by: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_gem_evict.c | 15 ++- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c index 7e62c310290f..1395018c657a 100644 --- a/drivers/gpu/drm/i915/i915_gem_evict.c +++ b/drivers/gpu/drm/i915/i915_gem_evict.c @@ -292,7 +292,8 @@ int i915_gem_evict_for_node(struct i915_address_space *vm, GEM_BUG_ON(!drm_mm_node_allocated(node)); vma = container_of(node, typeof(*vma), node); - /* If we are using coloring to insert guard pages between + /* +* If we are using coloring to insert guard pages between * different cache domains within the address space, we have * to check whether the objects on either side of our range * abutt and conflict. If they are in conflict, then we evict @@ -309,22 +310,18 @@ int i915_gem_evict_for_node(struct i915_address_space *vm, } } - if (flags & PIN_NONBLOCK && - (i915_vma_is_pinned(vma) || i915_vma_is_active(vma))) { + if (i915_vma_is_pinned(vma)) { ret = -ENOSPC; break; } - /* Overlap of objects in the same batch? */ - if (i915_vma_is_pinned(vma)) { + if (flags & PIN_NONBLOCK && i915_vma_is_active(vma)) { ret = -ENOSPC; - if (vma->exec_flags && - *vma->exec_flags & EXEC_OBJECT_PINNED) - ret = -EINVAL; break; } - /* Never show fear in the face of dragons! + /* +* Never show fear in the face of dragons! * * We cannot directly remove this node from within this * iterator and as with i915_gem_evict_something() we employ -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/3] drm/i915: Handle i915_active_fence_set() with the same fence
If the caller wants to overwrite the currently tracked fence, with itself, as far as the tracking is concerned it is a no-op, so simply allow it. Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/i915_active.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_active.c b/drivers/gpu/drm/i915/i915_active.c index 207383dda84d..cde984744f20 100644 --- a/drivers/gpu/drm/i915/i915_active.c +++ b/drivers/gpu/drm/i915/i915_active.c @@ -759,7 +759,9 @@ __i915_active_fence_set(struct i915_active_fence *active, prev = rcu_dereference_protected(active->fence, active_is_held(active)); if (prev) { - GEM_BUG_ON(prev == fence); + if (unlikely(prev == fence)) + goto unlock; + spin_lock_nested(prev->lock, SINGLE_DEPTH_NESTING); __list_del_entry(&active->cb.node); spin_unlock(prev->lock); /* serialise with prev->cb_list */ @@ -781,6 +783,7 @@ __i915_active_fence_set(struct i915_active_fence *active, rcu_assign_pointer(active->fence, fence); list_add_tail(&active->cb.node, &fence->cb_list); +unlock: spin_unlock_irqrestore(fence->lock, flags); return prev; -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/3] drm/i915/gem: Extract transient execbuf flags from i915_vma
For our convenience, and to avoid frequent allocations, we placed some lists we use for execbuf inside the common i915_vma struct. As we look to parallelise execbuf, such fields guarded by the struct_mutex BKL must be pulled under local control. Instead of using the i915_vma as our primary means of tracking the user's list of objects and their virtual mappings, we use a local eb_vma with the same lists as before (just now local not global). Signed-off-by: Chris Wilson Cc: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 271 +- drivers/gpu/drm/i915/i915_vma.h | 11 - 2 files changed, 130 insertions(+), 152 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c index e4f5c269150a..8eb9c4e17514 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c @@ -27,6 +27,19 @@ #include "i915_gem_ioctls.h" #include "i915_trace.h" +struct eb_vma { + struct i915_vma *vma; + unsigned int flags; + + /** This vma's place in the execbuf reservation list */ + struct drm_i915_gem_exec_object2 *exec; + struct list_head bind_link; + struct list_head reloc_link; + + struct hlist_node node; + u32 handle; +}; + enum { FORCE_CPU_RELOC = 1, FORCE_GTT_RELOC, @@ -219,15 +232,14 @@ struct i915_execbuffer { struct drm_file *file; /** per-file lookup tables and limits */ struct drm_i915_gem_execbuffer2 *args; /** ioctl parameters */ struct drm_i915_gem_exec_object2 *exec; /** ioctl execobj[] */ - struct i915_vma **vma; - unsigned int *flags; + struct eb_vma *vma; struct intel_engine_cs *engine; /** engine to queue the request to */ struct intel_context *context; /* logical state for the request */ struct i915_gem_context *gem_context; /** caller's context */ struct i915_request *request; /** our request to build */ - struct i915_vma *batch; /** identity of the batch obj/vma */ + struct eb_vma *batch; /** identity of the batch obj/vma */ /** actual size of execobj[] as we may extend it for the cmdparser */ unsigned int buffer_count; @@ -275,8 +287,6 @@ struct i915_execbuffer { struct hlist_head *buckets; /** ht for relocation handles */ }; -#define exec_entry(EB, VMA) (&(EB)->exec[(VMA)->exec_flags - (EB)->flags]) - /* * Used to convert any address to canonical form. * Starting from gen8, some commands (e.g. STATE_BASE_ADDRESS, @@ -380,9 +390,9 @@ eb_vma_misplaced(const struct drm_i915_gem_exec_object2 *entry, static inline bool eb_pin_vma(struct i915_execbuffer *eb, const struct drm_i915_gem_exec_object2 *entry, - struct i915_vma *vma) + struct eb_vma *ev) { - unsigned int exec_flags = *vma->exec_flags; + struct i915_vma *vma = ev->vma; u64 pin_flags; if (vma->node.size) @@ -391,24 +401,24 @@ eb_pin_vma(struct i915_execbuffer *eb, pin_flags = entry->offset & PIN_OFFSET_MASK; pin_flags |= PIN_USER | PIN_NOEVICT | PIN_OFFSET_FIXED; - if (unlikely(exec_flags & EXEC_OBJECT_NEEDS_GTT)) + if (unlikely(ev->flags & EXEC_OBJECT_NEEDS_GTT)) pin_flags |= PIN_GLOBAL; if (unlikely(i915_vma_pin(vma, 0, 0, pin_flags))) return false; - if (unlikely(exec_flags & EXEC_OBJECT_NEEDS_FENCE)) { + if (unlikely(ev->flags & EXEC_OBJECT_NEEDS_FENCE)) { if (unlikely(i915_vma_pin_fence(vma))) { i915_vma_unpin(vma); return false; } if (vma->fence) - exec_flags |= __EXEC_OBJECT_HAS_FENCE; + ev->flags |= __EXEC_OBJECT_HAS_FENCE; } - *vma->exec_flags = exec_flags | __EXEC_OBJECT_HAS_PIN; - return !eb_vma_misplaced(entry, vma, exec_flags); + ev->flags |= __EXEC_OBJECT_HAS_PIN; + return !eb_vma_misplaced(entry, vma, ev->flags); } static inline void __eb_unreserve_vma(struct i915_vma *vma, unsigned int flags) @@ -422,13 +432,13 @@ static inline void __eb_unreserve_vma(struct i915_vma *vma, unsigned int flags) } static inline void -eb_unreserve_vma(struct i915_vma *vma, unsigned int *flags) +eb_unreserve_vma(struct eb_vma *ev) { - if (!(*flags & __EXEC_OBJECT_HAS_PIN)) + if (!(ev->flags & __EXEC_OBJECT_HAS_PIN)) return; - __eb_unreserve_vma(vma, *flags); - *flags &= ~__EXEC_OBJECT_RESERVED; + __eb_unreserve_vma(ev->vma, ev->flags); + ev->flags &= ~__EXEC_OBJECT_RESERVED; } static int @@ -458,12 +468,6 @@ eb_validate_vma(struct i915_execbuffer *eb, entry->pad_to_size = 0; } - if (unlikely(vma->exec_flags)) { - DRM_DEBUG("Object [handle %d, index %d] appears more than
Re: [Intel-gfx] [PATCH] drm/i915/gem: Fix error path to unlock if the GEM context is closed
On 06/11/2019 14:41, Chris Wilson wrote: When inside the lock, remember to unlock even if you want to leave early. Reported-by: Dan Carpenter Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index a06cc8e63281..774d71b1ea9b 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -1168,7 +1168,7 @@ static int set_ppgtt(struct drm_i915_file_private *file_priv, if (i915_gem_context_is_closed(ctx)) { err = -ENOENT; - goto out; + goto unlock; } if (vm == rcu_access_pointer(ctx->vm)) Reviewed-by: Tvrtko Ursulin Regards, Tvrtko ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/4] drm: Expose a method for creating anonymous struct file around drm_minor
== Series Details == Series: series starting with [1/4] drm: Expose a method for creating anonymous struct file around drm_minor URL : https://patchwork.freedesktop.org/series/69059/ State : warning == Summary == $ dim checkpatch origin/drm-tip d7aa94bb3f9e drm: Expose a method for creating anonymous struct file around drm_minor 755b15511b95 drm/i915/selftests: Replace mock_file hackery with drm's true fake cca250d8785e drm/i915/selftests: Wrap vm_mmap() around GEM objects -:41: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'x' - possible side-effects? #41: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:698: +#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24)) -:91: ERROR:SPACING: space required before that '*' (ctx:VxV) #91: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:748: + u32 __user *ux = u64_to_user_ptr((u64)(addr + i * sizeof*(ux))); ^ -:147: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #147: new file mode 100644 -:152: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #152: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:1: +/* -:153: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #153: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.c:2: + * SPDX-License-Identifier: MIT -:197: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #197: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:1: +/* -:198: WARNING:SPDX_LICENSE_TAG: Misplaced SPDX-License-Identifier tag - use line 1 instead #198: FILE: drivers/gpu/drm/i915/selftests/igt_mmap.h:2: + * SPDX-License-Identifier: MIT total: 1 errors, 5 warnings, 1 checks, 180 lines checked 8f28adffccac drm/i915/selftests: Verify mmap_gtt revocation on unbinding -:69: WARNING:LINE_SPACING: Missing a blank line after declarations #69: FILE: drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c:839: + int err = __get_user(c, addr); + if (err) total: 0 errors, 1 warnings, 0 checks, 129 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [bug report] drm/i915: Move context management under GEM
Quoting Dan Carpenter (2019-11-06 13:48:14) > Hello Chris Wilson, > > The patch a4e7ccdac38e: "drm/i915: Move context management under GEM" > from Oct 4, 2019, leads to the following static checker warning: > > drivers/gpu/drm/i915/gem/i915_gem_context.c:980 set_ppgtt() > warn: 'ctx->mutex' both locked and unlocked. > > drivers/gpu/drm/i915/gem/i915_gem_context.c >940 rcu_read_unlock(); >941 if (!vm) >942 return -ENOENT; >943 >944 err = mutex_lock_interruptible(&ctx->mutex); >945 if (err) >946 goto out; >947 >948 if (i915_gem_context_is_closed(ctx)) { >949 err = -ENOENT; >950 goto out; > > This should be goto unlock? Yes. Many thanks for the bug report. https://patchwork.freedesktop.org/patch/339213/?series=69070&rev=1 -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/gem: Fix error path to unlock if the GEM context is closed
When inside the lock, remember to unlock even if you want to leave early. Reported-by: Dan Carpenter Fixes: a4e7ccdac38e ("drm/i915: Move context management under GEM") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c index a06cc8e63281..774d71b1ea9b 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c @@ -1168,7 +1168,7 @@ static int set_ppgtt(struct drm_i915_file_private *file_priv, if (i915_gem_context_is_closed(ctx)) { err = -ENOENT; - goto out; + goto unlock; } if (vm == rcu_access_pointer(ctx->vm)) -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gt: Only drop heartbeat.systole if the sole owner
Chris Wilson writes: > Mika spotted that only using cancel_delayed_work() could mean that we > attempted to clear the heartbeat.systole while the worker was still > running. Rectify the situation by only touching the systole from outside > the worker if we suceeded in cancelling the worker before it could run. succeeded > The worker is expected to clean up by itself upon idling. > > Reported-by: Mika Kuoppala > Fixes: 058179e72e09 ("drm/i915/gt: Replace hangcheck by heartbeats") > Signed-off-by: Chris Wilson > Cc: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > index 5051f304705b..06aa14c7aa8c 100644 > --- a/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > +++ b/drivers/gpu/drm/i915/gt/intel_engine_heartbeat.c > @@ -141,8 +141,8 @@ void intel_engine_unpark_heartbeat(struct intel_engine_cs > *engine) > > void intel_engine_park_heartbeat(struct intel_engine_cs *engine) > { > - cancel_delayed_work(&engine->heartbeat.work); > - i915_request_put(fetch_and_zero(&engine->heartbeat.systole)); > + if (cancel_delayed_work(&engine->heartbeat.work)) > + i915_request_put(fetch_and_zero(&engine->heartbeat.systole)); We don't arm in park path so this should do the trick. Reviewed-by: Mika Kuoppala > } > > void intel_engine_init_heartbeat(struct intel_engine_cs *engine) > -- > 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3 1/5] drm: Move EXPORT_SYMBOL_FOR_TESTS_ONLY under a separate Kconfig
Currently, we only export symbols for drm-selftests which are either compiled as modules or into the main drm builtin. However, if we want to export symbols from drm.ko for the drivers' selftests, we require a means of controlling that export separately. So we add a new Kconfig to determine whether or not the EXPORT_SYMBOL_FOR_TESTS_ONLY() takes effect. Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/Kconfig | 4 include/drm/drm_util.h | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 617d9c3a86c3..d3560afe34d3 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -54,6 +54,9 @@ config DRM_DEBUG_MM If in doubt, say "N". +config DRM_EXPORT_FOR_TESTS + bool + config DRM_DEBUG_SELFTEST tristate "kselftests for DRM" depends on DRM @@ -61,6 +64,7 @@ config DRM_DEBUG_SELFTEST select PRIME_NUMBERS select DRM_LIB_RANDOM select DRM_KMS_HELPER + select DRM_EXPORT_FOR_TESTS if m default n help This option provides kernel modules that can be used to run diff --git a/include/drm/drm_util.h b/include/drm/drm_util.h index 07b8e9f04599..79952d8c4bba 100644 --- a/include/drm/drm_util.h +++ b/include/drm/drm_util.h @@ -41,7 +41,7 @@ * Use EXPORT_SYMBOL_FOR_TESTS_ONLY() for functions that shall * only be visible for drmselftests. */ -#if defined(CONFIG_DRM_DEBUG_SELFTEST_MODULE) +#if defined(CONFIG_DRM_EXPORT_FOR_TESTS) #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) EXPORT_SYMBOL(x) #else #define EXPORT_SYMBOL_FOR_TESTS_ONLY(x) -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3 5/5] drm/i915/selftests: Verify mmap_gtt revocation on unbinding
Whenever, we unbind (or change fence registers) on an object, we must revoke any and all mmap_gtt using the previous bindings. Those user PTEs point at the GGTT which know points into a new object, the wrong object. Ergo, those PTEs must be cleared so that any user access provokes a new page fault. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- .../drm/i915/gem/selftests/i915_gem_mman.c| 107 ++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 3c8f2297be86..687750388cd5 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -790,6 +790,112 @@ static int igt_mmap_gtt(void *arg) return err; } +static int check_present_pte(pte_t *pte, unsigned long addr, void *data) +{ + if (!pte_present(*pte) || pte_none(*pte)) { + pr_err("missing PTE:%lx\n", + (addr - (unsigned long)data) >> PAGE_SHIFT); + return -EINVAL; + } + + return 0; +} + +static int check_absent_pte(pte_t *pte, unsigned long addr, void *data) +{ + if (pte_present(*pte) && !pte_none(*pte)) { + pr_err("present PTE:%lx; expected to be revoked\n", + (addr - (unsigned long)data) >> PAGE_SHIFT); + return -EINVAL; + } + + return 0; +} + +static int check_present(unsigned long addr, unsigned long len) +{ + return apply_to_page_range(current->mm, addr, len, + check_present_pte, (void *)addr); +} + +static int check_absent(unsigned long addr, unsigned long len) +{ + return apply_to_page_range(current->mm, addr, len, + check_absent_pte, (void *)addr); +} + +static int prefault_range(u64 start, u64 len) +{ + const char __user *addr, *end; + char __maybe_unused c; + + addr = u64_to_user_ptr(start); + end = addr + len; + + for (; addr < end; addr += PAGE_SIZE) { + int err = __get_user(c, addr); + if (err) + return err; + } + + return __get_user(c, end - 1); +} + +static int igt_mmap_gtt_revoke(void *arg) +{ + struct drm_i915_private *i915 = arg; + struct drm_i915_gem_object *obj; + unsigned long addr; + int err; + + obj = i915_gem_object_create_internal(i915, SZ_4M); + if (IS_ERR(obj)) + return PTR_ERR(obj); + + err = create_mmap_offset(obj); + if (err) + goto out; + + addr = igt_mmap_node(i915, &obj->base.vma_node, +0, PROT_WRITE, MAP_SHARED); + if (IS_ERR_VALUE(addr)) { + err = addr; + goto out; + } + + err = prefault_range(addr, obj->base.size); + if (err) + goto out_unmap; + + GEM_BUG_ON(!atomic_read(&obj->bind_count)); + + err = check_present(addr, obj->base.size); + if (err) + goto out_unmap; + + /* +* After unbinding the object from the GGTT, its address may be reused +* for other objects. Ergo we have to revoke the previous mmap PTE +* access as it no longer points to the same object. +*/ + err = i915_gem_object_unbind(obj, I915_GEM_OBJECT_UNBIND_ACTIVE); + if (err) { + pr_err("Failed to unbind object!\n"); + goto out_unmap; + } + GEM_BUG_ON(atomic_read(&obj->bind_count)); + + err = check_absent(addr, obj->base.size); + if (err) + goto out_unmap; + +out_unmap: + vm_munmap(addr, obj->base.size); +out: + i915_gem_object_put(obj); + return err; +} + int i915_gem_mman_live_selftests(struct drm_i915_private *i915) { static const struct i915_subtest tests[] = { @@ -797,6 +903,7 @@ int i915_gem_mman_live_selftests(struct drm_i915_private *i915) SUBTEST(igt_smoke_tiling), SUBTEST(igt_mmap_offset_exhaustion), SUBTEST(igt_mmap_gtt), + SUBTEST(igt_mmap_gtt_revoke), }; return i915_subtests(tests, i915); -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3 2/5] drm: Expose a method for creating anonymous struct file around drm_minor
Sometimes we need to create a struct file to wrap a drm_device, as it the user were to have opened /dev/dri/card0 but to do so anonymously (i.e. for internal use). Provide a utility method to create a struct file with the drm_device->driver.fops, that wrap the drm_device. v2: Restrict usage to selftests Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/drm_file.c | 42 ++ include/drm/drm_file.h | 3 +++ 2 files changed, 45 insertions(+) diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index ea34bc991858..4d9385d1bf2d 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -31,7 +31,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include +#include #include #include #include @@ -754,3 +756,43 @@ void drm_send_event(struct drm_device *dev, struct drm_pending_event *e) spin_unlock_irqrestore(&dev->event_lock, irqflags); } EXPORT_SYMBOL(drm_send_event); + +/** + * mock_drm_getfile - Create a new struct file for the drm device + * @minor: drm minor to wrap (e.g. #drm_device.primary) + * @flags: file creation mode (O_RDWR etc) + * + * This create a new struct file that wraps a DRM file context around a + * DRM minor. This mimicks userspace opening e.g. /dev/dri/card0, but without + * invoking userspace. The struct file may be operated on using its f_op + * (the drm_device.driver.fops) to mimick userspace operations, or be supplied + * to userspace facing functions as an internal/anonymous client. + * + * RETURNS: + * Pointer to newly created struct file, ERR_PTR on failure. + */ +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags) +{ + struct drm_device *dev = minor->dev; + struct drm_file *priv; + struct file *file; + + priv = drm_file_alloc(minor); + if (IS_ERR(priv)) + return ERR_CAST(priv); + + file = anon_inode_getfile("drm", dev->driver->fops, priv, flags); + if (IS_ERR(file)) { + drm_file_free(priv); + return file; + } + + /* Everyone shares a single global address space */ + file->f_mapping = dev->anon_inode->i_mapping; + + drm_dev_get(dev); + priv->filp = file; + + return file; +} +EXPORT_SYMBOL_FOR_TESTS_ONLY(mock_drm_getfile); diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h index 67af60bb527a..8b099b347817 100644 --- a/include/drm/drm_file.h +++ b/include/drm/drm_file.h @@ -42,6 +42,7 @@ struct dma_fence; struct drm_file; struct drm_device; struct device; +struct file; /* * FIXME: Not sure we want to have drm_minor here in the end, but to avoid @@ -387,4 +388,6 @@ void drm_event_cancel_free(struct drm_device *dev, void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e); void drm_send_event(struct drm_device *dev, struct drm_pending_event *e); +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags); + #endif /* _DRM_FILE_H_ */ -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3 4/5] drm/i915/selftests: Wrap vm_mmap() around GEM objects
Provide a utility function to create a vma corresponding to an mmap() of our device. And use it to exercise the equivalent of userspace performing a GTT mmap of our objects. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 97 +++ drivers/gpu/drm/i915/selftests/igt_mmap.c | 39 drivers/gpu/drm/i915/selftests/igt_mmap.h | 19 4 files changed, 156 insertions(+) create mode 100644 drivers/gpu/drm/i915/selftests/igt_mmap.c create mode 100644 drivers/gpu/drm/i915/selftests/igt_mmap.h diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 90dcf09f52cc..e0fd10c0cfb8 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -259,6 +259,7 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \ selftests/i915_selftest.o \ selftests/igt_flush_test.o \ selftests/igt_live_test.o \ + selftests/igt_mmap.o \ selftests/igt_reset.o \ selftests/igt_spinner.o diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 29b2077b73d2..3c8f2297be86 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -12,6 +12,7 @@ #include "i915_selftest.h" #include "selftests/i915_random.h" #include "selftests/igt_flush_test.h" +#include "selftests/igt_mmap.h" struct tile { unsigned int width; @@ -694,12 +695,108 @@ static int igt_mmap_offset_exhaustion(void *arg) goto out; } +#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24)) +static int igt_mmap_gtt(void *arg) +{ + struct drm_i915_private *i915 = arg; + struct drm_i915_gem_object *obj; + struct vm_area_struct *area; + unsigned long addr; + void *vaddr; + int err, i; + + obj = i915_gem_object_create_internal(i915, PAGE_SIZE); + if (IS_ERR(obj)) + return PTR_ERR(obj); + + vaddr = i915_gem_object_pin_map(obj, I915_MAP_WB); + if (IS_ERR(vaddr)) { + err = PTR_ERR(vaddr); + goto out; + } + memset(vaddr, POISON_INUSE, PAGE_SIZE); + i915_gem_object_flush_map(obj); + i915_gem_object_unpin_map(obj); + + err = create_mmap_offset(obj); + if (err) + goto out; + + addr = igt_mmap_node(i915, &obj->base.vma_node, +0, PROT_WRITE, MAP_SHARED); + if (IS_ERR_VALUE(addr)) { + err = addr; + goto out; + } + + pr_debug("igt_mmap(obj:gtt) @ %lx\n", addr); + + area = find_vma(current->mm, addr); + if (!area) { + pr_err("Did not create a vm_area_struct for the mmap\n"); + err = -EINVAL; + goto out_unmap; + } + + if (area->vm_private_data != obj) { + pr_err("vm_area_struct did not point back to our object!\n"); + err = -EINVAL; + goto out_unmap; + } + + for (i = 0; i < PAGE_SIZE / sizeof(u32); i++) { + u32 __user *ux = u64_to_user_ptr((u64)(addr + i * sizeof*(ux))); + u32 x; + + if (get_user(x, ux)) { + pr_err("Unable to read from GTT mmap, offset:%zd\n", + i * sizeof(x)); + err = -EFAULT; + break; + } + + if (x != expand32(POISON_INUSE)) { + pr_err("Read incorrect value from GTT mmap, offset:%zd, found:%x, expected:%x\n", + i * sizeof(x), x, expand32(POISON_INUSE)); + err = -EINVAL; + break; + } + + x = expand32(POISON_FREE); + if (put_user(x, ux)) { + pr_err("Unable to write to GTT mmap, offset:%zd\n", + i * sizeof(x)); + err = -EFAULT; + break; + } + } + +out_unmap: + vm_munmap(addr, PAGE_SIZE); + + vaddr = i915_gem_object_pin_map(obj, I915_MAP_FORCE_WC); + if (IS_ERR(vaddr)) { + err = PTR_ERR(vaddr); + goto out; + } + if (err == 0 && memchr_inv(vaddr, POISON_FREE, PAGE_SIZE)) { + pr_err("Write via GGTT mmap did not land in backing store\n"); + err = -EINVAL; + } + i915_gem_object_unpin_map(obj); + +out: + i915_gem_object_put(obj); + return err; +} + int i915_gem_mman_live_selftests(struct drm_i915_private *i915) { static const struct i915_subtest tests[] = { SUBTEST(igt_partial_tiling), SUBTEST(igt_smoke_tiling), SUBTEST(igt_mmap_offset_exhaustion), + SUBTEST(igt_mmap_gtt),
[Intel-gfx] mock_drm_getfile(), take three
Like v2, but with more Kconfig hackery so that i915.ko can request builtin-drm (and drm-selftests) export the symbols it requires for its selftests. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v3 3/5] drm/i915/selftests: Replace mock_file hackery with drm's true fake
As drm now exports a method to create an anonymous struct file around a drm_device for internal use, make use of it to avoid our horrible hacks. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug| 2 + .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +- .../drm/i915/gem/selftests/i915_gem_context.c | 12 ++--- .../i915/gem/selftests/i915_gem_object_blt.c | 4 +- drivers/gpu/drm/i915/gt/selftest_context.c| 4 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 8 +-- .../gpu/drm/i915/gt/selftest_workarounds.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 4 +- .../gpu/drm/i915/selftests/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- .../drm/i915/selftests/intel_memory_region.c | 2 +- drivers/gpu/drm/i915/selftests/mock_drm.c | 49 +++ drivers/gpu/drm/i915/selftests/mock_drm.h | 8 ++- 14 files changed, 39 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index ef123eb29168..1140525da75a 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -37,6 +37,7 @@ config DRM_I915_DEBUG select X86_MSR # used by igt/pm_rpm select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks) select DRM_DEBUG_MM if DRM=y + select DRM_EXPORT_FOR_TESTS if m select DRM_DEBUG_SELFTEST select DMABUF_SELFTESTS select SW_SYNC # signaling validation framework (igt/syncobj*) @@ -160,6 +161,7 @@ config DRM_I915_SELFTEST bool "Enable selftests upon driver load" depends on DRM_I915 default n + select DRM_EXPORT_FOR_TESTS if m select FAULT_INJECTION select PRIME_NUMBERS help diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c index 688c49a24f32..06dad7b0db82 100644 --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c @@ -1944,6 +1944,6 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915) err = i915_subtests(tests, ctx); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c index 62fabc023a83..47890c92534c 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c @@ -149,7 +149,7 @@ static int live_nop_switch(void *arg) } out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -377,7 +377,7 @@ static int live_parallel_switch(void *arg) } kfree(data); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -716,7 +716,7 @@ static int igt_ctx_exec(void *arg) if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); if (err) return err; @@ -854,7 +854,7 @@ static int igt_shared_ctx_exec(void *arg) if (igt_live_test_end(&t)) err = -EIO; out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -1426,7 +1426,7 @@ static int igt_ctx_readonly(void *arg) if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -1750,7 +1750,7 @@ static int igt_vm_isolation(void *arg) out_file: if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c index e8132aca0bb6..d9fdfddb7091 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c @@ -301,7 +301,7 @@ static int igt_fill_blt_thread(void *arg) intel_context_put(ce); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -432,7 +432,7 @@ static int igt_copy_blt_thread(void *arg) intel_context_put(ce); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_context.c index bc720defc6b8..a5688f7d9073 100644 --- a/drivers/gpu/drm/i915/gt/selftest_context.c +++ b/drivers/gpu/drm/i915/gt/selftest_context.c @@ -313,7 +313,7 @@ static int live_active_context(void *arg) } out_file: - mock_file_free(gt->i915, file
Re: [Intel-gfx] [PATCH v2 1/4] drm: Expose a method for creating anonymous struct file around drm_minor
On Wed, Nov 06, 2019 at 01:57:36PM +, Chris Wilson wrote: > Sometimes we need to create a struct file to wrap a drm_device, as it > the user were to have opened /dev/dri/card0 but to do so anonymously > (i.e. for internal use). Provide a utility method to create a struct > file with the drm_device->driver.fops, that wrap the drm_device. > > v2: Restrict usage to selftests > > Signed-off-by: Chris Wilson > Cc: Daniel Vetter Not fully sold on the name, but then fget/fput/get_file and friends are all supremely confusing naming already, so meh. And on 2nd reading the f_mapping is the only thing we need for unmap_mapping_range, so should be all fine too. Reviewed-by: Daniel Vetter > --- > drivers/gpu/drm/Kconfig| 4 > drivers/gpu/drm/drm_file.c | 42 ++ > include/drm/drm_file.h | 3 +++ > 3 files changed, 49 insertions(+) > > diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig > index 617d9c3a86c3..589d5d693855 100644 > --- a/drivers/gpu/drm/Kconfig > +++ b/drivers/gpu/drm/Kconfig > @@ -70,6 +70,10 @@ config DRM_DEBUG_SELFTEST > > If in doubt, say "N". > > +config DRM_DEBUG_SELFTEST_MODULE > + bool > + depends on DRM_DEBUG_SELFTEST > + > config DRM_KMS_HELPER > tristate > depends on DRM > diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c > index ea34bc991858..4d9385d1bf2d 100644 > --- a/drivers/gpu/drm/drm_file.c > +++ b/drivers/gpu/drm/drm_file.c > @@ -31,7 +31,9 @@ > * OTHER DEALINGS IN THE SOFTWARE. > */ > > +#include > #include > +#include > #include > #include > #include > @@ -754,3 +756,43 @@ void drm_send_event(struct drm_device *dev, struct > drm_pending_event *e) > spin_unlock_irqrestore(&dev->event_lock, irqflags); > } > EXPORT_SYMBOL(drm_send_event); > + > +/** > + * mock_drm_getfile - Create a new struct file for the drm device > + * @minor: drm minor to wrap (e.g. #drm_device.primary) > + * @flags: file creation mode (O_RDWR etc) > + * > + * This create a new struct file that wraps a DRM file context around a > + * DRM minor. This mimicks userspace opening e.g. /dev/dri/card0, but without > + * invoking userspace. The struct file may be operated on using its f_op > + * (the drm_device.driver.fops) to mimick userspace operations, or be > supplied > + * to userspace facing functions as an internal/anonymous client. > + * > + * RETURNS: > + * Pointer to newly created struct file, ERR_PTR on failure. > + */ > +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags) > +{ > + struct drm_device *dev = minor->dev; > + struct drm_file *priv; > + struct file *file; > + > + priv = drm_file_alloc(minor); > + if (IS_ERR(priv)) > + return ERR_CAST(priv); > + > + file = anon_inode_getfile("drm", dev->driver->fops, priv, flags); > + if (IS_ERR(file)) { > + drm_file_free(priv); > + return file; > + } > + > + /* Everyone shares a single global address space */ > + file->f_mapping = dev->anon_inode->i_mapping; > + > + drm_dev_get(dev); > + priv->filp = file; > + > + return file; > +} > +EXPORT_SYMBOL_FOR_TESTS_ONLY(mock_drm_getfile); > diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h > index 67af60bb527a..8b099b347817 100644 > --- a/include/drm/drm_file.h > +++ b/include/drm/drm_file.h > @@ -42,6 +42,7 @@ struct dma_fence; > struct drm_file; > struct drm_device; > struct device; > +struct file; > > /* > * FIXME: Not sure we want to have drm_minor here in the end, but to avoid > @@ -387,4 +388,6 @@ void drm_event_cancel_free(struct drm_device *dev, > void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event > *e); > void drm_send_event(struct drm_device *dev, struct drm_pending_event *e); > > +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags); > + > #endif /* _DRM_FILE_H_ */ > -- > 2.24.0 > -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH V10 0/6] mdev based hardware virtio offloading support
On Wed, 6 Nov 2019 21:35:25 +0800 Jason Wang wrote: > Hi all: > > There are hardwares that can do virtio datapath offloading while > having its own control path. This path tries to implement a mdev based > unified API to support using kernel virtio driver to drive those > devices. This is done by introducing a new mdev transport for virtio > (virtio_mdev) and register itself as a new kind of mdev driver. Then > it provides a unified way for kernel virtio driver to talk with mdev > device implementation. > > Though the series only contains kernel driver support, the goal is to > make the transport generic enough to support userspace drivers. This > means vhost-mdev[1] could be built on top as well by resuing the > transport. > > A sample driver is also implemented which simulate a virito-net > loopback ethernet device on top of vringh + workqueue. This could be > used as a reference implementation for real hardware driver. > > Also a real IFC VF driver was also posted here[2] which is a good > reference for vendors who is interested in their own virtio datapath > offloading product. > > Consider mdev framework only support VFIO device and driver right now, > this series also extend it to support other types. This is done > through introducing class id to the device and pairing it with > id_talbe claimed by the driver. On top, this seris also decouple > device specific ops out of the common ones for implementing class > specific operations over mdev bus. > > Pktgen test was done with virito-net + mvnet loop back device. > > Please review. All looking good to me now. > > [1] https://lkml.org/lkml/2019/11/5/424 > [2] https://lkml.org/lkml/2019/11/5/227 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/lmem: add the fake lmem region
On Wed, Nov 06, 2019 at 11:17:29AM +, Chris Wilson wrote: > Quoting Arkadiusz Hiler (2019-11-06 08:30:37) > > On Tue, Nov 05, 2019 at 01:05:20PM +, Matthew Auld wrote: > > > On Thu, 31 Oct 2019 at 20:40, Chris Wilson > > > wrote: > > > > > > > > Quoting Arkadiusz Hiler (2019-10-31 12:40:35) > > > > > On Wed, Oct 30, 2019 at 10:22:37PM +, Matthew Auld wrote: > > > > > > On Tue, 29 Oct 2019 at 16:51, Matthew Auld > > > > > > wrote: > > > > > > > > > > > > > > Intended for upstream testing so that we can still exercise the > > > > > > > LMEM > > > > > > > plumbing and !i915_ggtt_has_aperture paths. Smoke tested on Skull > > > > > > > Canyon > > > > > > > device. This works by allocating an intel_memory_region for a > > > > > > > reserved > > > > > > > portion of system memory, which we treat like LMEM. For the > > > > > > > LMEMBAR we > > > > > > > steal the aperture and 1:1 it map to the stolen region. > > > > > > > > > > > > > > To enable simply set the i915 modparam fake_lmem_start= on the > > > > > > > kernel > > > > > > > cmdline with the start of reserved region(see memmap=). The size > > > > > > > of the > > > > > > > region we can use is determined by the size of the mappable > > > > > > > aperture, so > > > > > > > the size of reserved region should be >= mappable_end. For now we > > > > > > > only > > > > > > > enable for the selftests. Depends on CONFIG_DRM_I915_UNSTABLE > > > > > > > being > > > > > > > enabled. > > > > > > > > > > > > > > eg. memmap=2G$16G i915.fake_lmem_start=0x4 > > > > > > > > > > > > Hi Arek, > > > > > > > > > > > > Would you be able to update the fi-skl-lmem kernel cmd line with > > > > > > s/i915_fake_lmem_start/i915.fake_lmem_start? > > > > > > > > > > done > > > > > > > > <6>[ 497.897456] [drm] Intel graphics fake LMEM: [mem > > > > 0x1-0x13fff] > > > > <6>[ 497.897459] [drm] Intel graphics fake LMEM IO start: 4000 > > > > <6>[ 497.897461] [drm] Intel graphics fake LMEM size: 4000 > > > > > > > > All present. > > > > > > Arek, > > > > > > Could we enable DRM_I915_UNSTABLE_FAKE_LMEM in CI? That should give us > > > some coverage of the fake local-memory setup on fi-skl-lmem. > > > > Hey, > > > > config DRM_I915_UNSTABLE > > bool "Enable unstable API for early prototype development" > > depends on EXPERT > > depends on STAGING > > depends on BROKEN # should never be enabled by distros! > > > > config DRM_I915_UNSTABLE_FAKE_LMEM > > bool "Enable the experimental fake lmem" > > depends on DRM_I915_UNSTABLE > > > > AFAIU because of that dependency on CONFIG_BROKEN we cannot just enable > > it through .config - we have to edit the value in init/Kconfig[0]. > > Before the revert last night, CONFIG_BROKEN was already enabled in > CI. It's now enabled again. The above output was from CI setting up lmem > without extra hackery. > -Chris CI_DRM_7269 should have the DRM_I915_UNSTABLE_FAKE_LMEM enabled. -- Cheers, Arek ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 3/4] drm/i915/selftests: Wrap vm_mmap() around GEM objects
Provide a utility function to create a vma corresponding to an mmap() of our device. And use it to exercise the equivalent of userspace performing a GTT mmap of our objects. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- drivers/gpu/drm/i915/Makefile | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 97 +++ drivers/gpu/drm/i915/selftests/igt_mmap.c | 39 drivers/gpu/drm/i915/selftests/igt_mmap.h | 19 4 files changed, 156 insertions(+) create mode 100644 drivers/gpu/drm/i915/selftests/igt_mmap.c create mode 100644 drivers/gpu/drm/i915/selftests/igt_mmap.h diff --git a/drivers/gpu/drm/i915/Makefile b/drivers/gpu/drm/i915/Makefile index 90dcf09f52cc..e0fd10c0cfb8 100644 --- a/drivers/gpu/drm/i915/Makefile +++ b/drivers/gpu/drm/i915/Makefile @@ -259,6 +259,7 @@ i915-$(CONFIG_DRM_I915_SELFTEST) += \ selftests/i915_selftest.o \ selftests/igt_flush_test.o \ selftests/igt_live_test.o \ + selftests/igt_mmap.o \ selftests/igt_reset.o \ selftests/igt_spinner.o diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 29b2077b73d2..3c8f2297be86 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -12,6 +12,7 @@ #include "i915_selftest.h" #include "selftests/i915_random.h" #include "selftests/igt_flush_test.h" +#include "selftests/igt_mmap.h" struct tile { unsigned int width; @@ -694,12 +695,108 @@ static int igt_mmap_offset_exhaustion(void *arg) goto out; } +#define expand32(x) (((x) << 0) | ((x) << 8) | ((x) << 16) | ((x) << 24)) +static int igt_mmap_gtt(void *arg) +{ + struct drm_i915_private *i915 = arg; + struct drm_i915_gem_object *obj; + struct vm_area_struct *area; + unsigned long addr; + void *vaddr; + int err, i; + + obj = i915_gem_object_create_internal(i915, PAGE_SIZE); + if (IS_ERR(obj)) + return PTR_ERR(obj); + + vaddr = i915_gem_object_pin_map(obj, I915_MAP_WB); + if (IS_ERR(vaddr)) { + err = PTR_ERR(vaddr); + goto out; + } + memset(vaddr, POISON_INUSE, PAGE_SIZE); + i915_gem_object_flush_map(obj); + i915_gem_object_unpin_map(obj); + + err = create_mmap_offset(obj); + if (err) + goto out; + + addr = igt_mmap_node(i915, &obj->base.vma_node, +0, PROT_WRITE, MAP_SHARED); + if (IS_ERR_VALUE(addr)) { + err = addr; + goto out; + } + + pr_debug("igt_mmap(obj:gtt) @ %lx\n", addr); + + area = find_vma(current->mm, addr); + if (!area) { + pr_err("Did not create a vm_area_struct for the mmap\n"); + err = -EINVAL; + goto out_unmap; + } + + if (area->vm_private_data != obj) { + pr_err("vm_area_struct did not point back to our object!\n"); + err = -EINVAL; + goto out_unmap; + } + + for (i = 0; i < PAGE_SIZE / sizeof(u32); i++) { + u32 __user *ux = u64_to_user_ptr((u64)(addr + i * sizeof*(ux))); + u32 x; + + if (get_user(x, ux)) { + pr_err("Unable to read from GTT mmap, offset:%zd\n", + i * sizeof(x)); + err = -EFAULT; + break; + } + + if (x != expand32(POISON_INUSE)) { + pr_err("Read incorrect value from GTT mmap, offset:%zd, found:%x, expected:%x\n", + i * sizeof(x), x, expand32(POISON_INUSE)); + err = -EINVAL; + break; + } + + x = expand32(POISON_FREE); + if (put_user(x, ux)) { + pr_err("Unable to write to GTT mmap, offset:%zd\n", + i * sizeof(x)); + err = -EFAULT; + break; + } + } + +out_unmap: + vm_munmap(addr, PAGE_SIZE); + + vaddr = i915_gem_object_pin_map(obj, I915_MAP_FORCE_WC); + if (IS_ERR(vaddr)) { + err = PTR_ERR(vaddr); + goto out; + } + if (err == 0 && memchr_inv(vaddr, POISON_FREE, PAGE_SIZE)) { + pr_err("Write via GGTT mmap did not land in backing store\n"); + err = -EINVAL; + } + i915_gem_object_unpin_map(obj); + +out: + i915_gem_object_put(obj); + return err; +} + int i915_gem_mman_live_selftests(struct drm_i915_private *i915) { static const struct i915_subtest tests[] = { SUBTEST(igt_partial_tiling), SUBTEST(igt_smoke_tiling), SUBTEST(igt_mmap_offset_exhaustion), + SUBTEST(igt_mmap_gtt),
[Intel-gfx] [PATCH v2 4/4] drm/i915/selftests: Verify mmap_gtt revocation on unbinding
Whenever, we unbind (or change fence registers) on an object, we must revoke any and all mmap_gtt using the previous bindings. Those user PTEs point at the GGTT which know points into a new object, the wrong object. Ergo, those PTEs must be cleared so that any user access provokes a new page fault. Signed-off-by: Chris Wilson Cc: Abdiel Janulgue --- .../drm/i915/gem/selftests/i915_gem_mman.c| 107 ++ 1 file changed, 107 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c index 3c8f2297be86..687750388cd5 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c @@ -790,6 +790,112 @@ static int igt_mmap_gtt(void *arg) return err; } +static int check_present_pte(pte_t *pte, unsigned long addr, void *data) +{ + if (!pte_present(*pte) || pte_none(*pte)) { + pr_err("missing PTE:%lx\n", + (addr - (unsigned long)data) >> PAGE_SHIFT); + return -EINVAL; + } + + return 0; +} + +static int check_absent_pte(pte_t *pte, unsigned long addr, void *data) +{ + if (pte_present(*pte) && !pte_none(*pte)) { + pr_err("present PTE:%lx; expected to be revoked\n", + (addr - (unsigned long)data) >> PAGE_SHIFT); + return -EINVAL; + } + + return 0; +} + +static int check_present(unsigned long addr, unsigned long len) +{ + return apply_to_page_range(current->mm, addr, len, + check_present_pte, (void *)addr); +} + +static int check_absent(unsigned long addr, unsigned long len) +{ + return apply_to_page_range(current->mm, addr, len, + check_absent_pte, (void *)addr); +} + +static int prefault_range(u64 start, u64 len) +{ + const char __user *addr, *end; + char __maybe_unused c; + + addr = u64_to_user_ptr(start); + end = addr + len; + + for (; addr < end; addr += PAGE_SIZE) { + int err = __get_user(c, addr); + if (err) + return err; + } + + return __get_user(c, end - 1); +} + +static int igt_mmap_gtt_revoke(void *arg) +{ + struct drm_i915_private *i915 = arg; + struct drm_i915_gem_object *obj; + unsigned long addr; + int err; + + obj = i915_gem_object_create_internal(i915, SZ_4M); + if (IS_ERR(obj)) + return PTR_ERR(obj); + + err = create_mmap_offset(obj); + if (err) + goto out; + + addr = igt_mmap_node(i915, &obj->base.vma_node, +0, PROT_WRITE, MAP_SHARED); + if (IS_ERR_VALUE(addr)) { + err = addr; + goto out; + } + + err = prefault_range(addr, obj->base.size); + if (err) + goto out_unmap; + + GEM_BUG_ON(!atomic_read(&obj->bind_count)); + + err = check_present(addr, obj->base.size); + if (err) + goto out_unmap; + + /* +* After unbinding the object from the GGTT, its address may be reused +* for other objects. Ergo we have to revoke the previous mmap PTE +* access as it no longer points to the same object. +*/ + err = i915_gem_object_unbind(obj, I915_GEM_OBJECT_UNBIND_ACTIVE); + if (err) { + pr_err("Failed to unbind object!\n"); + goto out_unmap; + } + GEM_BUG_ON(atomic_read(&obj->bind_count)); + + err = check_absent(addr, obj->base.size); + if (err) + goto out_unmap; + +out_unmap: + vm_munmap(addr, obj->base.size); +out: + i915_gem_object_put(obj); + return err; +} + int i915_gem_mman_live_selftests(struct drm_i915_private *i915) { static const struct i915_subtest tests[] = { @@ -797,6 +903,7 @@ int i915_gem_mman_live_selftests(struct drm_i915_private *i915) SUBTEST(igt_smoke_tiling), SUBTEST(igt_mmap_offset_exhaustion), SUBTEST(igt_mmap_gtt), + SUBTEST(igt_mmap_gtt_revoke), }; return i915_subtests(tests, i915); -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v2 2/4] drm/i915/selftests: Replace mock_file hackery with drm's true fake
As drm now exports a method to create an anonymous struct file around a drm_device for internal use, make use of it to avoid our horrible hacks. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/Kconfig.debug| 2 + .../gpu/drm/i915/gem/selftests/huge_pages.c | 2 +- .../drm/i915/gem/selftests/i915_gem_context.c | 12 ++--- .../i915/gem/selftests/i915_gem_object_blt.c | 4 +- drivers/gpu/drm/i915/gt/selftest_context.c| 4 +- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 8 +-- .../gpu/drm/i915/gt/selftest_workarounds.c| 2 +- drivers/gpu/drm/i915/selftests/i915_gem.c | 4 +- .../gpu/drm/i915/selftests/i915_gem_evict.c | 2 +- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 4 +- drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- .../drm/i915/selftests/intel_memory_region.c | 2 +- drivers/gpu/drm/i915/selftests/mock_drm.c | 49 +++ drivers/gpu/drm/i915/selftests/mock_drm.h | 8 ++- 14 files changed, 39 insertions(+), 66 deletions(-) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index ef123eb29168..bcf710f66168 100644 --- a/drivers/gpu/drm/i915/Kconfig.debug +++ b/drivers/gpu/drm/i915/Kconfig.debug @@ -38,6 +38,7 @@ config DRM_I915_DEBUG select DRM_VGEM # used by igt/prime_vgem (dmabuf interop checks) select DRM_DEBUG_MM if DRM=y select DRM_DEBUG_SELFTEST + select DRM_DEBUG_SELFTEST_MODULE select DMABUF_SELFTESTS select SW_SYNC # signaling validation framework (igt/syncobj*) select DRM_I915_SW_FENCE_DEBUG_OBJECTS @@ -160,6 +161,7 @@ config DRM_I915_SELFTEST bool "Enable selftests upon driver load" depends on DRM_I915 default n + select DRM_DEBUG_SELFTEST_MODULE select FAULT_INJECTION select PRIME_NUMBERS help diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c index 688c49a24f32..06dad7b0db82 100644 --- a/drivers/gpu/drm/i915/gem/selftests/huge_pages.c +++ b/drivers/gpu/drm/i915/gem/selftests/huge_pages.c @@ -1944,6 +1944,6 @@ int i915_gem_huge_page_live_selftests(struct drm_i915_private *i915) err = i915_subtests(tests, ctx); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c index 62fabc023a83..47890c92534c 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c @@ -149,7 +149,7 @@ static int live_nop_switch(void *arg) } out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -377,7 +377,7 @@ static int live_parallel_switch(void *arg) } kfree(data); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -716,7 +716,7 @@ static int igt_ctx_exec(void *arg) if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); if (err) return err; @@ -854,7 +854,7 @@ static int igt_shared_ctx_exec(void *arg) if (igt_live_test_end(&t)) err = -EIO; out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -1426,7 +1426,7 @@ static int igt_ctx_readonly(void *arg) if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -1750,7 +1750,7 @@ static int igt_vm_isolation(void *arg) out_file: if (igt_live_test_end(&t)) err = -EIO; - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c index e8132aca0bb6..d9fdfddb7091 100644 --- a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c +++ b/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c @@ -301,7 +301,7 @@ static int igt_fill_blt_thread(void *arg) intel_context_put(ce); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } @@ -432,7 +432,7 @@ static int igt_copy_blt_thread(void *arg) intel_context_put(ce); out_file: - mock_file_free(i915, file); + mock_file_put(file); return err; } diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_context.c index bc720defc6b8..a5688f7d9073 100644 --- a/drivers/gpu/drm/i915/gt/selftest_context.c +++ b/drivers/gpu/drm/i915/gt/selftest_context.c @@ -313,7 +313,7 @@ static int live_active_context(void *arg) } out_file: - mock_file_free(gt->i915, f
[Intel-gfx] [PATCH v2 1/4] drm: Expose a method for creating anonymous struct file around drm_minor
Sometimes we need to create a struct file to wrap a drm_device, as it the user were to have opened /dev/dri/card0 but to do so anonymously (i.e. for internal use). Provide a utility method to create a struct file with the drm_device->driver.fops, that wrap the drm_device. v2: Restrict usage to selftests Signed-off-by: Chris Wilson Cc: Daniel Vetter --- drivers/gpu/drm/Kconfig| 4 drivers/gpu/drm/drm_file.c | 42 ++ include/drm/drm_file.h | 3 +++ 3 files changed, 49 insertions(+) diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 617d9c3a86c3..589d5d693855 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -70,6 +70,10 @@ config DRM_DEBUG_SELFTEST If in doubt, say "N". +config DRM_DEBUG_SELFTEST_MODULE + bool + depends on DRM_DEBUG_SELFTEST + config DRM_KMS_HELPER tristate depends on DRM diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index ea34bc991858..4d9385d1bf2d 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c @@ -31,7 +31,9 @@ * OTHER DEALINGS IN THE SOFTWARE. */ +#include #include +#include #include #include #include @@ -754,3 +756,43 @@ void drm_send_event(struct drm_device *dev, struct drm_pending_event *e) spin_unlock_irqrestore(&dev->event_lock, irqflags); } EXPORT_SYMBOL(drm_send_event); + +/** + * mock_drm_getfile - Create a new struct file for the drm device + * @minor: drm minor to wrap (e.g. #drm_device.primary) + * @flags: file creation mode (O_RDWR etc) + * + * This create a new struct file that wraps a DRM file context around a + * DRM minor. This mimicks userspace opening e.g. /dev/dri/card0, but without + * invoking userspace. The struct file may be operated on using its f_op + * (the drm_device.driver.fops) to mimick userspace operations, or be supplied + * to userspace facing functions as an internal/anonymous client. + * + * RETURNS: + * Pointer to newly created struct file, ERR_PTR on failure. + */ +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags) +{ + struct drm_device *dev = minor->dev; + struct drm_file *priv; + struct file *file; + + priv = drm_file_alloc(minor); + if (IS_ERR(priv)) + return ERR_CAST(priv); + + file = anon_inode_getfile("drm", dev->driver->fops, priv, flags); + if (IS_ERR(file)) { + drm_file_free(priv); + return file; + } + + /* Everyone shares a single global address space */ + file->f_mapping = dev->anon_inode->i_mapping; + + drm_dev_get(dev); + priv->filp = file; + + return file; +} +EXPORT_SYMBOL_FOR_TESTS_ONLY(mock_drm_getfile); diff --git a/include/drm/drm_file.h b/include/drm/drm_file.h index 67af60bb527a..8b099b347817 100644 --- a/include/drm/drm_file.h +++ b/include/drm/drm_file.h @@ -42,6 +42,7 @@ struct dma_fence; struct drm_file; struct drm_device; struct device; +struct file; /* * FIXME: Not sure we want to have drm_minor here in the end, but to avoid @@ -387,4 +388,6 @@ void drm_event_cancel_free(struct drm_device *dev, void drm_send_event_locked(struct drm_device *dev, struct drm_pending_event *e); void drm_send_event(struct drm_device *dev, struct drm_pending_event *e); +struct file *mock_drm_getfile(struct drm_minor *minor, unsigned int flags); + #endif /* _DRM_FILE_H_ */ -- 2.24.0 ___ 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/lmem: fixup fake lmem teardown
== Series Details == Series: drm/i915/lmem: fixup fake lmem teardown URL : https://patchwork.freedesktop.org/series/69057/ State : success == Summary == CI Bug Log - changes from CI_DRM_7267 -> Patchwork_15150 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/index.html Known issues Here are the changes found in Patchwork_15150 that come from known issues: ### IGT changes ### Issues hit * igt@i915_module_load@reload-no-display: - fi-icl-u3: [PASS][1] -> [DMESG-WARN][2] ([fdo#107724]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7267/fi-icl-u3/igt@i915_module_l...@reload-no-display.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/fi-icl-u3/igt@i915_module_l...@reload-no-display.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][3] -> [FAIL][4] ([fdo#111045] / [fdo#111096]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7267/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [PASS][5] -> [DMESG-WARN][6] ([fdo#102614]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7267/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html * igt@kms_pipe_crc_basic@suspend-read-crc-pipe-a: - fi-skl-6700k2: [PASS][7] -> [INCOMPLETE][8] ([fdo#104108]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7267/fi-skl-6700k2/igt@kms_pipe_crc_ba...@suspend-read-crc-pipe-a.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/fi-skl-6700k2/igt@kms_pipe_crc_ba...@suspend-read-crc-pipe-a.html Possible fixes * igt@gem_flink_basic@bad-flink: - fi-icl-u3: [DMESG-WARN][9] ([fdo#107724]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7267/fi-icl-u3/igt@gem_flink_ba...@bad-flink.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/fi-icl-u3/igt@gem_flink_ba...@bad-flink.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [fdo#102614]: https://bugs.freedesktop.org/show_bug.cgi?id=102614 [fdo#104108]: https://bugs.freedesktop.org/show_bug.cgi?id=104108 [fdo#107713]: https://bugs.freedesktop.org/show_bug.cgi?id=107713 [fdo#107724]: https://bugs.freedesktop.org/show_bug.cgi?id=107724 [fdo#108840]: https://bugs.freedesktop.org/show_bug.cgi?id=108840 [fdo#111045]: https://bugs.freedesktop.org/show_bug.cgi?id=111045 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 Participating hosts (50 -> 42) -- Additional (1): fi-skl-guc Missing(9): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-ctg-p8600 fi-gdg-551 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7267 -> Patchwork_15150 CI-20190529: 20190529 CI_DRM_7267: f1bc4779726ef30ef0a87b6da80668b9b3e881e1 @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5263: 8a5d44dc5e51622cd43f23c2cf24d44c24a0564d @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_15150: ed3fed5ecb8caa7d0b1094f1cbce6d88dd158078 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == ed3fed5ecb8c drm/i915/lmem: fixup fake lmem teardown == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_15150/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [bug report] drm/i915: Move context management under GEM
Hello Chris Wilson, The patch a4e7ccdac38e: "drm/i915: Move context management under GEM" from Oct 4, 2019, leads to the following static checker warning: drivers/gpu/drm/i915/gem/i915_gem_context.c:980 set_ppgtt() warn: 'ctx->mutex' both locked and unlocked. drivers/gpu/drm/i915/gem/i915_gem_context.c 940 rcu_read_unlock(); 941 if (!vm) 942 return -ENOENT; 943 944 err = mutex_lock_interruptible(&ctx->mutex); 945 if (err) 946 goto out; 947 948 if (i915_gem_context_is_closed(ctx)) { 949 err = -ENOENT; 950 goto out; This should be goto unlock? 951 } 952 953 if (vm == rcu_access_pointer(ctx->vm)) 954 goto unlock; 955 956 /* Teardown the existing obj:vma cache, it will have to be rebuilt. */ 957 lut_close(ctx); 958 959 old = __set_ppgtt(ctx, vm); 960 961 /* 962 * We need to flush any requests using the current ppgtt before 963 * we release it as the requests do not hold a reference themselves, 964 * only indirectly through the context. 965 */ 966 err = context_barrier_task(ctx, ALL_ENGINES, 967 skip_ppgtt_update, 968 emit_ppgtt_update, 969 set_ppgtt_barrier, 970 old); 971 if (err) { 972 i915_vm_close(__set_ppgtt(ctx, old)); 973 i915_vm_close(old); 974 } 975 976 unlock: 977 mutex_unlock(&ctx->mutex); 978 out: 979 i915_vm_put(vm); 980 return err; 981 } regards, dan carpenter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 1/2] drm/i915: Frob the correct crtc state in intel_crtc_disable_noatomic()
On Wed, Nov 06, 2019 at 12:53:45PM +0100, Maarten Lankhorst wrote: > Op 05-11-2019 om 18:14 schreef Ville Syrjala: > > From: Ville Syrjälä > > > > The uapi vs. hw state split introduced a bug in > > intel_crtc_disable_noatomic() where it's not frobbing an already s/not/now/ and pushed to dinq. Thanks for the review. > > freed temp crtc state instead of adjusting the crtc state we > > are really left with. Fix that by making a cleaner separation > > beteen the two. > > > > This causes explosions on any machine that boots up with pipes > > already running but not hooked up to any encoder (typical > > behaviour for gen2-4 VBIOS). > > > > Cc: Maarten Lankhorst > > Fixes: 58d124ea2739 ("drm/i915: Complete crtc hw/uapi split, v6.") > > Signed-off-by: Ville Syrjälä > > --- > > drivers/gpu/drm/i915/display/intel_display.c | 10 ++ > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > diff --git a/drivers/gpu/drm/i915/display/intel_display.c > > b/drivers/gpu/drm/i915/display/intel_display.c > > index 876fc25968bf..1f93860fb897 100644 > > --- a/drivers/gpu/drm/i915/display/intel_display.c > > +++ b/drivers/gpu/drm/i915/display/intel_display.c > > @@ -7191,11 +7191,13 @@ static void intel_crtc_disable_noatomic(struct > > drm_crtc *crtc, > > struct drm_i915_private *dev_priv = to_i915(crtc->dev); > > struct intel_bw_state *bw_state = > > to_intel_bw_state(dev_priv->bw_obj.state); > > + struct intel_crtc_state *crtc_state = > > + to_intel_crtc_state(crtc->state); > > enum intel_display_power_domain domain; > > struct intel_plane *plane; > > u64 domains; > > struct drm_atomic_state *state; > > - struct intel_crtc_state *crtc_state; > > + struct intel_crtc_state *temp_crtc_state; > > int ret; > > > > if (!intel_crtc->active) > > @@ -7219,12 +7221,12 @@ static void intel_crtc_disable_noatomic(struct > > drm_crtc *crtc, > > state->acquire_ctx = ctx; > > > > /* Everything's already locked, -EDEADLK can't happen. */ > > - crtc_state = intel_atomic_get_crtc_state(state, intel_crtc); > > + temp_crtc_state = intel_atomic_get_crtc_state(state, intel_crtc); > > ret = drm_atomic_add_affected_connectors(state, crtc); > > > > - WARN_ON(IS_ERR(crtc_state) || ret); > > + WARN_ON(IS_ERR(temp_crtc_state) || ret); > > > > - dev_priv->display.crtc_disable(crtc_state, > > to_intel_atomic_state(state)); > > + dev_priv->display.crtc_disable(temp_crtc_state, > > to_intel_atomic_state(state)); > > > > drm_atomic_state_put(state); > > > > Reviewed-by: Maarten Lankhorst > -- Ville Syrjälä Intel ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH V10 6/6] docs: sample driver to demonstrate how to implement virtio-mdev framework
This sample driver creates mdev device that simulate virtio net device over virtio mdev transport. The device is implemented through vringh and workqueue. A device specific dma ops is to make sure HVA is used directly as the IOVA. This should be sufficient for kernel virtio driver to work. Only 'virtio' type is supported right now. I plan to add 'vhost' type on top which requires some virtual IOMMU implemented in this sample driver. Acked-by: Cornelia Huck Signed-off-by: Jason Wang --- MAINTAINERS| 1 + samples/Kconfig| 10 + samples/vfio-mdev/Makefile | 1 + samples/vfio-mdev/mvnet.c | 686 + 4 files changed, 698 insertions(+) create mode 100644 samples/vfio-mdev/mvnet.c diff --git a/MAINTAINERS b/MAINTAINERS index 4997957443df..6e9ad105a28f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -17249,6 +17249,7 @@ F: include/uapi/linux/virtio_*.h F: drivers/crypto/virtio/ F: mm/balloon_compaction.c F: include/linux/mdev_virtio_ops.h +F: samples/vfio-mdev/mvnet.c VIRTIO BLOCK AND SCSI DRIVERS M: "Michael S. Tsirkin" diff --git a/samples/Kconfig b/samples/Kconfig index c8dacb4dda80..13a2443e18e0 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -131,6 +131,16 @@ config SAMPLE_VFIO_MDEV_MDPY mediated device. It is a simple framebuffer and supports the region display interface (VFIO_GFX_PLANE_TYPE_REGION). +config SAMPLE_VIRTIO_MDEV_NET + tristate "Build VIRTIO net example mediated device sample code -- loadable modules only" + depends on VIRTIO_MDEV && VHOST_RING && m + help + Build a networking sample device for use as a virtio + mediated device. The device coopreates with virtio-mdev bus + driver to present an virtio ethernet driver for + kernel. It simply loopbacks all packets from its TX + virtqueue to its RX virtqueue. + config SAMPLE_VFIO_MDEV_MDPY_FB tristate "Build VFIO mdpy example guest fbdev driver -- loadable module only" depends on FB && m diff --git a/samples/vfio-mdev/Makefile b/samples/vfio-mdev/Makefile index 10d179c4fdeb..f34af90ed0a0 100644 --- a/samples/vfio-mdev/Makefile +++ b/samples/vfio-mdev/Makefile @@ -3,3 +3,4 @@ obj-$(CONFIG_SAMPLE_VFIO_MDEV_MTTY) += mtty.o obj-$(CONFIG_SAMPLE_VFIO_MDEV_MDPY) += mdpy.o obj-$(CONFIG_SAMPLE_VFIO_MDEV_MDPY_FB) += mdpy-fb.o obj-$(CONFIG_SAMPLE_VFIO_MDEV_MBOCHS) += mbochs.o +obj-$(CONFIG_SAMPLE_VIRTIO_MDEV_NET) += mvnet.o diff --git a/samples/vfio-mdev/mvnet.c b/samples/vfio-mdev/mvnet.c new file mode 100644 index ..a89aecfab68a --- /dev/null +++ b/samples/vfio-mdev/mvnet.c @@ -0,0 +1,686 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Mediated virtual virtio-net device driver. + * + * Copyright (c) 2019, Red Hat Inc. All rights reserved. + * Author: Jason Wang + * + * Sample driver that creates mdev device that simulates ethernet loopback + * device. + * + * Usage: + * + * # modprobe virtio_mdev + * # modprobe mvnet + * # cd /sys/devices/virtual/mvnet/mvnet/mdev_supported_types/mvnet-virtio + * # echo "83b8f4f2-509f-382f-3c1e-e6bfe0fa1001" > ./create + * # cd devices/83b8f4f2-509f-382f-3c1e-e6bfe0fa1001 + * # ls -d virtio0 + * virtio0 + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define VERSION_STRING "0.1" +#define DRIVER_AUTHOR "Red Hat Corporation" + +#define MVNET_CLASS_NAME "mvnet" +#define MVNET_NAME "mvnet" + +/* + * Global Structures + */ + +static struct mvnet_dev { + struct class*vd_class; + struct idr vd_idr; + struct device dev; +} mvnet_dev; + +struct mvnet_virtqueue { + struct vringh vring; + struct vringh_kiov iov; + unsigned short head; + bool ready; + u64 desc_addr; + u64 device_addr; + u64 driver_addr; + u32 num; + void *private; + irqreturn_t (*cb)(void *data); +}; + +#define MVNET_QUEUE_ALIGN PAGE_SIZE +#define MVNET_QUEUE_MAX 256 +#define MVNET_DEVICE_ID 0x1 +#define MVNET_VENDOR_ID 0 + +u64 mvnet_features = (1ULL << VIRTIO_F_ANY_LAYOUT) | +(1ULL << VIRTIO_F_VERSION_1) | +(1ULL << VIRTIO_F_IOMMU_PLATFORM); + +/* State of each mdev device */ +struct mvnet_state { + struct mvnet_virtqueue vqs[2]; + struct work_struct work; + /* spinlock to synchronize virtqueue state */ + spinlock_t lock; + struct mdev_device *mdev; + struct virtio_net_config config; + void *buffer; + u32 status; + u32 generation; + u64 features; + struct list_head next; +}; + +static struct mutex mdev_list_lock; +static struct list_head mdev_devices_list; + +static void mvnet_queue_ready(struct mvnet_state *mvnet, unsigned int idx) +{ + struct mvnet_virtqueue *
[Intel-gfx] [PATCH V10 5/6] virtio: introduce a mdev based transport
This patch introduces a new mdev transport for virtio. This is used to use kernel virtio driver to drive the mediated device that is capable of populating virtqueue directly. A new virtio-mdev driver will be registered to the mdev bus, when a new virtio-mdev device is probed, it will register the device with mdev based config ops. This means it is a software transport between mdev driver and mdev device. The transport was implemented through virtio device specific ops. Reviewed-by: Cornelia Huck Signed-off-by: Jason Wang --- drivers/virtio/Kconfig | 13 ++ drivers/virtio/Makefile | 1 + drivers/virtio/virtio_mdev.c | 406 +++ 3 files changed, 420 insertions(+) create mode 100644 drivers/virtio/virtio_mdev.c diff --git a/drivers/virtio/Kconfig b/drivers/virtio/Kconfig index 078615cf2afc..bf526ce0facc 100644 --- a/drivers/virtio/Kconfig +++ b/drivers/virtio/Kconfig @@ -43,6 +43,19 @@ config VIRTIO_PCI_LEGACY If unsure, say Y. +config VIRTIO_MDEV + tristate "MDEV driver for virtio devices" + depends on VFIO_MDEV && VIRTIO + default n + help + This driver provides support for virtio based paravirtual + device driver over MDEV bus. For this to be useful, you need + an appropriate virtio mdev device implementation that + operates on a physical device to allow the datapath of virtio + to be offloaded to hardware. + + If unsure, say M. + config VIRTIO_PMEM tristate "Support for virtio pmem driver" depends on VIRTIO diff --git a/drivers/virtio/Makefile b/drivers/virtio/Makefile index 3a2b5c5dcf46..f2997b6c812f 100644 --- a/drivers/virtio/Makefile +++ b/drivers/virtio/Makefile @@ -6,3 +6,4 @@ virtio_pci-y := virtio_pci_modern.o virtio_pci_common.o virtio_pci-$(CONFIG_VIRTIO_PCI_LEGACY) += virtio_pci_legacy.o obj-$(CONFIG_VIRTIO_BALLOON) += virtio_balloon.o obj-$(CONFIG_VIRTIO_INPUT) += virtio_input.o +obj-$(CONFIG_VIRTIO_MDEV) += virtio_mdev.o diff --git a/drivers/virtio/virtio_mdev.c b/drivers/virtio/virtio_mdev.c new file mode 100644 index ..9e12ef240493 --- /dev/null +++ b/drivers/virtio/virtio_mdev.c @@ -0,0 +1,406 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * VIRTIO based driver for Mediated device + * + * Copyright (c) 2019, Red Hat. All rights reserved. + * Author: Jason Wang + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define DRIVER_VERSION "0.1" +#define DRIVER_AUTHOR "Red Hat Corporation" +#define DRIVER_DESC "VIRTIO based driver for Mediated device" + +#define to_virtio_mdev_device(dev) \ + container_of(dev, struct virtio_mdev_device, vdev) + +struct virtio_mdev_device { + struct virtio_device vdev; + struct mdev_device *mdev; + u64 features; + + /* The lock to protect virtqueue list */ + spinlock_t lock; + /* List of virtio_mdev_vq_info */ + struct list_head virtqueues; +}; + +struct virtio_mdev_vq_info { + /* the actual virtqueue */ + struct virtqueue *vq; + + /* the list node for the virtqueues list */ + struct list_head node; +}; + +static struct mdev_device *vm_get_mdev(struct virtio_device *vdev) +{ + struct virtio_mdev_device *vm_dev = to_virtio_mdev_device(vdev); + struct mdev_device *mdev = vm_dev->mdev; + + return mdev; +} + +static void virtio_mdev_get(struct virtio_device *vdev, unsigned offset, + void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct mdev_virtio_device_ops *ops = mdev_get_virtio_ops(mdev); + + ops->get_config(mdev, offset, buf, len); +} + +static void virtio_mdev_set(struct virtio_device *vdev, unsigned offset, + const void *buf, unsigned len) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct mdev_virtio_device_ops *ops = mdev_get_virtio_ops(mdev); + + ops->set_config(mdev, offset, buf, len); +} + +static u32 virtio_mdev_generation(struct virtio_device *vdev) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct mdev_virtio_device_ops *ops = mdev_get_virtio_ops(mdev); + + if (ops->get_generation) + return ops->get_generation(mdev); + + return 0; +} + +static u8 virtio_mdev_get_status(struct virtio_device *vdev) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct mdev_virtio_device_ops *ops = mdev_get_virtio_ops(mdev); + + return ops->get_status(mdev); +} + +static void virtio_mdev_set_status(struct virtio_device *vdev, u8 status) +{ + struct mdev_device *mdev = vm_get_mdev(vdev); + const struct mdev_virtio_device_ops *ops = mdev_get_virtio_ops(mdev); + + return ops->set_status(mdev, status); +} + +static void virtio_mdev_reset(struct virtio_device *vdev) +{ + struct mdev