[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/gvt: clean up kernel-doc in gtt.c
== Series Details == Series: drm/i915/gvt: clean up kernel-doc in gtt.c URL : https://patchwork.freedesktop.org/series/95382/ State : warning == Summary == $ dim checkpatch origin/drm-tip 95e817a1f93a drm/i915/gvt: clean up kernel-doc in gtt.c -:8: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #8: gtt.c:1152: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst total: 0 errors, 1 warnings, 0 checks, 16 lines checked
[Intel-gfx] [PATCH] drm/i915/gvt: clean up kernel-doc in gtt.c
Fix kernel-doc warnings in gtt.c: gtt.c:1152: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst * Check if can do 2M page gtt.c:1152: warning: missing initial short description on line: * Check if can do 2M page gtt.c:2209: warning: expecting prototype for intel_vgpu_emulate_gtt_mmio_read(). Prototype was for intel_vgpu_emulate_ggtt_mmio_read() instead Fixes: a752b070a678 ("drm/i915/gvt: Fix function comment doc errors") Fixes: 2707e4446688 ("drm/i915/gvt: vGPU graphics memory virtualization") Signed-off-by: Randy Dunlap Reported-by: kernel test robot Cc: Zhenyu Wang Cc: Zhi Wang Cc: Colin Xu Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: intel-gfx@lists.freedesktop.org Cc: intel-gvt-...@lists.freedesktop.org Cc: dri-de...@lists.freedesktop.org Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/i915/gvt/gtt.c |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- linux-next-20211001.orig/drivers/gpu/drm/i915/gvt/gtt.c +++ linux-next-20211001/drivers/gpu/drm/i915/gvt/gtt.c @@ -1148,7 +1148,7 @@ static inline void ppgtt_generate_shadow ops->set_pfn(se, s->shadow_page.mfn); } -/** +/* * Check if can do 2M page * @vgpu: target vgpu * @entry: target pfn's gtt entry @@ -2193,7 +2193,7 @@ static int emulate_ggtt_mmio_read(struct } /** - * intel_vgpu_emulate_gtt_mmio_read - emulate GTT MMIO register read + * intel_vgpu_emulate_ggtt_mmio_read - emulate GTT MMIO register read * @vgpu: a vGPU * @off: register offset * @p_data: data will be returned to guest
Re: [Intel-gfx] [PATCH v2 00/17] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible
On 21/10/02 09:13AM, Fernando Ramos wrote: > > Sean, could you revert the whole patch series? I'll have a deeper look into > the > patch set and come up with a v3 where all these issues will be addressed. > Hi Sean, I now understand the nature of the issue that caused the problem with i915 and have proceed to remove the global context structure (which revealed a similar issue in the amdgpu driver). I have prepared a V3 version of the patch set where these issues should hopefully be fixed for both the i915 and amdgpu drivers. In order to prevent causing more disruption, could you tell me what the proper way to proceed would be? In particular: 1. Is there any place where I can push my changes so that they are tested on a i915 machine? (Some type of automated pool) 2. I can test the amdgpu driver on my machine but, what about all the other architectures? What is the standard procedure? Should I simply publish V3 and wait for feedback from the different vendors? (I would hate to cause a simular situation again) 3. Should I post V3 on top of drm-next or drm-misc-next? Thanks for your patience :)
Re: [Intel-gfx] [PATCH 01/24] drm/i915/uncore: split the fw get function into separate vfunc
On Wed, Sep 29, 2021 at 01:57:45AM +0300, Jani Nikula wrote: > From: Dave Airlie > > constify it while here. drop the put function since it was never > overloaded and always has done the same thing, no point in > indirecting it for show. > > Reviewed-by: Jani Nikula > Signed-off-by: Dave Airlie > Signed-off-by: Jani Nikula This has totally broken snb and ivb machines. Total death ensues somewhere in uncore init after some backtraces fly by. Didn't get any logs out to disk unfortunately. Please revert. Sadly CI is still afraid to report when machines disappear. For the bat report you at least get a list of machines that were awol, but the shard run seems to not even mention that all snbs suddenly vanished. I've said it before and I'll say it again. We really should *not* be loading i915 when the machine boots. That way we'd at least get the machine up and running and can report that loading i915 is the thing that killed it... > --- > drivers/gpu/drm/i915/intel_uncore.c | 70 - > drivers/gpu/drm/i915/intel_uncore.h | 7 +-- > 2 files changed, 43 insertions(+), 34 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_uncore.c > b/drivers/gpu/drm/i915/intel_uncore.c > index 678a99de07fe..aee572af8052 100644 > --- a/drivers/gpu/drm/i915/intel_uncore.c > +++ b/drivers/gpu/drm/i915/intel_uncore.c > @@ -36,6 +36,12 @@ > > #define __raw_posting_read(...) ((void)__raw_uncore_read32(__VA_ARGS__)) > > +static void > +fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains > fw_domains) > +{ > + uncore->fw_get_funcs->force_wake_get(uncore, fw_domains); > +} > + > void > intel_uncore_mmio_debug_init_early(struct intel_uncore_mmio_debug > *mmio_debug) > { > @@ -248,7 +254,7 @@ fw_domain_put(const struct intel_uncore_forcewake_domain > *d) > } > > static void > -fw_domains_get(struct intel_uncore *uncore, enum forcewake_domains > fw_domains) > +fw_domains_get_normal(struct intel_uncore *uncore, enum forcewake_domains > fw_domains) > { > struct intel_uncore_forcewake_domain *d; > unsigned int tmp; > @@ -396,7 +402,7 @@ intel_uncore_fw_release_timer(struct hrtimer *timer) > > GEM_BUG_ON(!domain->wake_count); > if (--domain->wake_count == 0) > - uncore->funcs.force_wake_put(uncore, domain->mask); > + fw_domains_put(uncore, domain->mask); > > spin_unlock_irqrestore(>lock, irqflags); > > @@ -454,7 +460,7 @@ intel_uncore_forcewake_reset(struct intel_uncore *uncore) > > fw = uncore->fw_domains_active; > if (fw) > - uncore->funcs.force_wake_put(uncore, fw); > + fw_domains_put(uncore, fw); > > fw_domains_reset(uncore, uncore->fw_domains); > assert_forcewakes_inactive(uncore); > @@ -562,7 +568,7 @@ static void forcewake_early_sanitize(struct intel_uncore > *uncore, > intel_uncore_forcewake_reset(uncore); > if (restore_forcewake) { > spin_lock_irq(>lock); > - uncore->funcs.force_wake_get(uncore, restore_forcewake); > + fw_domains_get(uncore, restore_forcewake); > > if (intel_uncore_has_fifo(uncore)) > uncore->fifo_count = fifo_free_entries(uncore); > @@ -623,7 +629,7 @@ static void __intel_uncore_forcewake_get(struct > intel_uncore *uncore, > } > > if (fw_domains) > - uncore->funcs.force_wake_get(uncore, fw_domains); > + fw_domains_get(uncore, fw_domains); > } > > /** > @@ -644,7 +650,7 @@ void intel_uncore_forcewake_get(struct intel_uncore > *uncore, > { > unsigned long irqflags; > > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > assert_rpm_wakelock_held(uncore->rpm); > @@ -711,7 +717,7 @@ void intel_uncore_forcewake_get__locked(struct > intel_uncore *uncore, > { > lockdep_assert_held(>lock); > > - if (!uncore->funcs.force_wake_get) > + if (!uncore->fw_get_funcs) > return; > > __intel_uncore_forcewake_get(uncore, fw_domains); > @@ -733,7 +739,7 @@ static void __intel_uncore_forcewake_put(struct > intel_uncore *uncore, > continue; > } > > - uncore->funcs.force_wake_put(uncore, domain->mask); > + fw_domains_put(uncore, domain->mask); > } > } > > @@ -750,7 +756,7 @@ void intel_uncore_forcewake_put(struct intel_uncore > *uncore, > { > unsigned long irqflags; > > - if (!uncore->funcs.force_wake_put) > + if (!uncore->fw_get_funcs) > return; > > spin_lock_irqsave(>lock, irqflags); > @@ -769,7 +775,7 @@ void intel_uncore_forcewake_flush(struct intel_uncore > *uncore, > struct intel_uncore_forcewake_domain *domain; > unsigned int tmp; > > - if (!uncore->funcs.force_wake_put) > + if (!uncore->fw_get_funcs) > return; > > fw_domains &= uncore->fw_domains; > @@
[Intel-gfx] ✓ Fi.CI.IGT: success for drm: Add privacy-screen class and connector properties (rev5)
== Series Details == Series: drm: Add privacy-screen class and connector properties (rev5) URL : https://patchwork.freedesktop.org/series/79259/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680_full -> Patchwork_21229_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_21229_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_eio@unwedge-stress: - shard-tglb: NOTRUN -> [TIMEOUT][1] ([i915#2369] / [i915#3063] / [i915#3648]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-tglb5/igt@gem_...@unwedge-stress.html * igt@gem_exec_fair@basic-flow@rcs0: - shard-tglb: [PASS][2] -> [FAIL][3] ([i915#2842]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb5/igt@gem_exec_fair@basic-f...@rcs0.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-tglb2/igt@gem_exec_fair@basic-f...@rcs0.html * igt@gem_exec_fair@basic-none-share@rcs0: - shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_fair@basic-none-sh...@rcs0.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-glk2/igt@gem_exec_fair@basic-none-sh...@rcs0.html * igt@gem_exec_params@no-bsd: - shard-tglb: NOTRUN -> [SKIP][6] ([fdo#109283]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-tglb5/igt@gem_exec_par...@no-bsd.html - shard-iclb: NOTRUN -> [SKIP][7] ([fdo#109283]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-iclb2/igt@gem_exec_par...@no-bsd.html * igt@gem_exec_whisper@basic-queues-forked-all: - shard-glk: [PASS][8] -> [DMESG-WARN][9] ([i915#118] / [i915#95]) +1 similar issue [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_whis...@basic-queues-forked-all.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-glk5/igt@gem_exec_whis...@basic-queues-forked-all.html * igt@gem_pread@exhaustion: - shard-kbl: NOTRUN -> [WARN][10] ([i915#2658]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-kbl2/igt@gem_pr...@exhaustion.html * igt@gem_render_copy@y-tiled-to-vebox-x-tiled: - shard-glk: NOTRUN -> [SKIP][11] ([fdo#109271]) +3 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-glk3/igt@gem_render_c...@y-tiled-to-vebox-x-tiled.html * igt@gem_userptr_blits@dmabuf-sync: - shard-apl: NOTRUN -> [SKIP][12] ([fdo#109271] / [i915#3323]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-apl1/igt@gem_userptr_bl...@dmabuf-sync.html * igt@gem_userptr_blits@vma-merge: - shard-apl: NOTRUN -> [FAIL][13] ([i915#3318]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-apl3/igt@gem_userptr_bl...@vma-merge.html * igt@gen7_exec_parse@load-register-reg: - shard-iclb: NOTRUN -> [SKIP][14] ([fdo#109289]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-iclb2/igt@gen7_exec_pa...@load-register-reg.html * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp: - shard-kbl: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#1937]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-kbl3/igt@i915_pm_lpsp@kms-l...@kms-lpsp-dp.html * igt@i915_pm_rc6_residency@rc6-fence: - shard-tglb: NOTRUN -> [WARN][16] ([i915#2681]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-tglb5/igt@i915_pm_rc6_reside...@rc6-fence.html - shard-iclb: NOTRUN -> [WARN][17] ([i915#2684]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-iclb2/igt@i915_pm_rc6_reside...@rc6-fence.html * igt@i915_suspend@forcewake: - shard-kbl: [PASS][18] -> [DMESG-WARN][19] ([i915#180]) +3 similar issues [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-kbl3/igt@i915_susp...@forcewake.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-kbl4/igt@i915_susp...@forcewake.html * igt@kms_big_fb@x-tiled-32bpp-rotate-270: - shard-iclb: NOTRUN -> [SKIP][20] ([fdo#110725] / [fdo#111614]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-iclb2/igt@kms_big...@x-tiled-32bpp-rotate-270.html * igt@kms_big_fb@y-tiled-max-hw-stride-32bpp-rotate-180-hflip: - shard-apl: NOTRUN -> [SKIP][21] ([fdo#109271] / [i915#3777]) +1 similar issue [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/shard-apl1/igt@kms_big...@y-tiled-max-hw-stride-32bpp-rotate-180-hflip.html * igt@kms_big_fb@y-tiled-max-hw-stride-64bpp-rotate-0-hflip: - shard-kbl: NOTRUN -> [SKIP][22]
[Intel-gfx] ✓ Fi.CI.BAT: success for drm: Add privacy-screen class and connector properties (rev5)
== Series Details == Series: drm: Add privacy-screen class and connector properties (rev5) URL : https://patchwork.freedesktop.org/series/79259/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680 -> Patchwork_21229 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/index.html Known issues Here are the changes found in Patchwork_21229 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@query-info: - fi-tgl-1115g4: NOTRUN -> [SKIP][1] ([fdo#109315]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@amdgpu/amd_ba...@query-info.html - fi-kbl-soraka: NOTRUN -> [SKIP][2] ([fdo#109271]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-kbl-soraka/igt@amdgpu/amd_ba...@query-info.html * igt@amdgpu/amd_cs_nop@nop-gfx0: - fi-tgl-1115g4: NOTRUN -> [SKIP][3] ([fdo#109315] / [i915#2575]) +16 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@amdgpu/amd_cs_...@nop-gfx0.html * igt@gem_exec_suspend@basic-s0: - fi-tgl-1115g4: NOTRUN -> [FAIL][4] ([i915#1888]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@gem_exec_susp...@basic-s0.html * igt@gem_exec_suspend@basic-s3: - fi-kbl-r: [PASS][5] -> [INCOMPLETE][6] ([i915#155] / [i915#4173] / [i915#4221]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-kbl-r/igt@gem_exec_susp...@basic-s3.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-kbl-r/igt@gem_exec_susp...@basic-s3.html * igt@gem_huc_copy@huc-copy: - fi-tgl-1115g4: NOTRUN -> [SKIP][7] ([i915#2190]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@gem_huc_c...@huc-copy.html * igt@i915_pm_backlight@basic-brightness: - fi-tgl-1115g4: NOTRUN -> [SKIP][8] ([i915#1155]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@i915_pm_backli...@basic-brightness.html * igt@kms_chamelium@common-hpd-after-suspend: - fi-tgl-1115g4: NOTRUN -> [SKIP][9] ([fdo#111827]) +8 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@kms_chamel...@common-hpd-after-suspend.html * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> [SKIP][10] ([fdo#109271] / [fdo#111827]) +8 similar issues [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-bsw-n3050/igt@kms_chamel...@hdmi-crc-fast.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic: - fi-tgl-1115g4: NOTRUN -> [SKIP][11] ([i915#4103]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html * igt@kms_force_connector_basic@force-load-detect: - fi-tgl-1115g4: NOTRUN -> [SKIP][12] ([fdo#109285]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@kms_force_connector_ba...@force-load-detect.html * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-bsw-n3050: NOTRUN -> [SKIP][13] ([fdo#109271]) +41 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-bsw-n3050/igt@kms_pipe_crc_ba...@hang-read-crc-pipe-a.html * igt@kms_psr@primary_mmap_gtt: - fi-tgl-1115g4: NOTRUN -> [SKIP][14] ([i915#1072]) +3 similar issues [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html * igt@prime_vgem@basic-userptr: - fi-tgl-1115g4: NOTRUN -> [SKIP][15] ([i915#3301]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-tgl-1115g4/igt@prime_v...@basic-userptr.html Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-bsw-n3050: [INCOMPLETE][16] ([i915#2369] / [i915#3159]) -> [PASS][17] [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-bsw-n3050/igt@gem_exec_susp...@basic-s3.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-bsw-n3050/igt@gem_exec_susp...@basic-s3.html * igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1: - fi-bsw-kefka: [FAIL][18] ([i915#2122]) -> [PASS][19] [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vbl...@b-edp1.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21229/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vbl...@b-edp1.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827
Re: [Intel-gfx] [PATCH v2 00/17] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible
On 21/10/02 09:13AM, Fernando Ramos wrote: > On 21/10/02 05:30AM, Ville Syrjälä wrote: > > On Sat, Oct 02, 2021 at 01:05:47AM +0300, Ville Syrjälä wrote: > > > On Fri, Oct 01, 2021 at 04:48:15PM -0400, Sean Paul wrote: > > > > On Fri, Oct 01, 2021 at 10:00:50PM +0300, Ville Syrjälä wrote: > > > > > On Fri, Oct 01, 2021 at 02:36:55PM -0400, Sean Paul wrote: > > > > > > > > > > > > Thank you for revising, Fernando! I've pushed the set to > > > > > > drm-misc-next (along > > > > > > with the necessary drm-tip conflict resolutions). > > > > > > > > > > Ugh. Did anyone actually review the locking changes this does? > > > > > I shot the previous i915 stuff down because the commit messages > > > > > did not address any of it. > > > > > > > > I reviewed the set on 9/17, I didn't see your feedback on that thread. > > > > > > It was much earlir than that. > > > https://lists.freedesktop.org/archives/dri-devel/2021-June/313193.html Sorry, I'm new to this and it did not occur to me to search for similar patches in the mailing list archives in case there were additional comments that applied to my change set. In case I had done that I would have found that, as you mentioned, you had already raised two issues back in June: On Tue, Jun 29, 2021, Ville Syrjälä wrote: > > That looks wrong. You're using a private ctx here, but still > passing dev->mode_config.acquire_ctx to the lower level stuff. > > Also DRM_MODESET_LOCK_ALL_{BEGIN,END}() do not seem to be > equivalent to drm_modeset_{lock,unlock}_all() when it comes to > mode_config.mutex. So would need a proper review whether we > actually need that lock or not. The first one was pointing out the same error I would later repeat in my patch series (ups). After further inspection of the code it looks to me that changing this: intel_modeset_setup_hw_state(dev, dev->mode_config.acquire_ctx); ...into this: intel_modeset_setup_hw_state(dev, ); ...would be enough. Why? The only difference between the old drm_modeset_{lock,unlock}_all() functions and the new DRM_MODESET_LOCK_ALL_{BEGIN,END}() macros is that the former use a global context stored in dev->mode_config.acquire_ctx while the latter depend on a user provided one (typically in the stack). In the old (working) code the global context structure is freed in drm_modeset_unlock_all() thus we are sure no one is holding a reference to it at that point. This means that as long as no one accesses the global dev->mode_config.acquire_ctx context in the block that runs between lock/BEGIN and unlock/END, the code should be equivalent before and after my changes. In fact, now that my patch series removes the drm_modeset_{lock,unlock}_all() functions, the acquire_ctx field of the drm_mode_config structure should be deleted: /** * @acquire_ctx: * * Global implicit acquire context used by atomic drivers for legacy * IOCTLs. Deprecated, since implicit locking contexts make it * impossible to use driver-private drm_modeset_lock. Users of * this must hold @mutex. */ struct drm_modeset_acquire_ctx *acquire_ctx; If I had done that (ie. removing this field) I would have detected the problem when compiling. There is another place (in the amdgpu driver) where this field is still being referenced, but before I investigate that I would like to know if you agree that this is a good path to follow. Regarding the second issue you raised... > Also DRM_MODESET_LOCK_ALL_{BEGIN,END}() do not seem to be > equivalent to drm_modeset_{lock,unlock}_all() when it comes to > mode_config.mutex. So would need a proper review whether we > actually need that lock or not. ...the only difference regarding mode_config.mutex I see is that in the new macros the mutex is locked only under this condition: if (!drm_drv_uses_atomic_modeset(dev)) ...which seems reasonable, right? Is this what you were referring to or is it something else? Please let me know what you think. Thanks!
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm: Add privacy-screen class and connector properties (rev5)
== Series Details == Series: drm: Add privacy-screen class and connector properties (rev5) URL : https://patchwork.freedesktop.org/series/79259/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Add privacy-screen class and connector properties (rev5)
== Series Details == Series: drm: Add privacy-screen class and connector properties (rev5) URL : https://patchwork.freedesktop.org/series/79259/ State : warning == Summary == $ dim checkpatch origin/drm-tip fa9e8ab5d112 drm/connector: Add support for privacy-screen properties (v4) -:151: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #151: FILE: drivers/gpu/drm/drm_connector.c:2408: + drm_property_create_enum(connector->dev, DRM_MODE_PROP_ENUM, + "privacy-screen sw-state", -:156: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #156: FILE: drivers/gpu/drm/drm_connector.c:2413: + drm_property_create_enum(connector->dev, + DRM_MODE_PROP_IMMUTABLE | DRM_MODE_PROP_ENUM, total: 0 errors, 0 warnings, 2 checks, 205 lines checked 406f587b7cf9 drm: Add privacy-screen class (v4) -:136: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #136: new file mode 100644 -:173: CHECK:MACRO_ARG_REUSE: Macro argument reuse 'dev' - possible side-effects? #173: FILE: drivers/gpu/drm/drm_privacy_screen.c:33: +#define to_drm_privacy_screen(dev) \ + container_of(dev, struct drm_privacy_screen, dev) -:221: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #221: FILE: drivers/gpu/drm/drm_privacy_screen.c:81: +static struct drm_privacy_screen *drm_privacy_screen_get_by_name( -:424: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #424: FILE: drivers/gpu/drm/drm_privacy_screen.c:284: +} +/* -:486: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #486: FILE: drivers/gpu/drm/drm_privacy_screen.c:346: +struct drm_privacy_screen *drm_privacy_screen_register( -:582: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #582: FILE: include/drm/drm_privacy_screen_consumer.h:33: +} +static inline void drm_privacy_screen_put(struct drm_privacy_screen *priv) -:585: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #585: FILE: include/drm/drm_privacy_screen_consumer.h:36: +} +static inline int drm_privacy_screen_set_sw_state(struct drm_privacy_screen *priv, -:590: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #590: FILE: include/drm/drm_privacy_screen_consumer.h:41: +} +static inline void drm_privacy_screen_get_state(struct drm_privacy_screen *priv, -:681: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #681: FILE: include/drm/drm_privacy_screen_driver.h:76: +struct drm_privacy_screen *drm_privacy_screen_register( -:728: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #728: FILE: include/drm/drm_privacy_screen_machine.h:37: +} +static inline void drm_privacy_screen_lookup_exit(void) total: 0 errors, 1 warnings, 9 checks, 642 lines checked 4410bc650ef6 drm/privacy-screen: Add X86 specific arch init code -:31: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #31: new file mode 100644 total: 0 errors, 1 warnings, 0 checks, 110 lines checked 54f2a33ce52e drm/privacy-screen: Add notifier support (v2) -:126: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #126: FILE: include/drm/drm_privacy_screen_consumer.h:53: } +static inline int drm_privacy_screen_register_notifier(struct drm_privacy_screen *priv, -:131: CHECK:LINE_SPACING: Please use a blank line after function/struct/union/enum declarations #131: FILE: include/drm/drm_privacy_screen_consumer.h:58: +} +static inline int drm_privacy_screen_unregister_notifier(struct drm_privacy_screen *priv, total: 0 errors, 0 warnings, 2 checks, 120 lines checked 448b0758 drm/connector: Add a drm_connector privacy-screen helper functions (v2) -:58: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #58: FILE: drivers/gpu/drm/drm_connector.c:554: + drm_privacy_screen_register_notifier(connector->privacy_screen, + >privacy_screen_notifier); -:68: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #68: FILE: drivers/gpu/drm/drm_connector.c:592: + drm_privacy_screen_unregister_notifier( -:79: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #79: FILE: drivers/gpu/drm/drm_connector.c:2460: +static void drm_connector_update_privacy_screen_properties( -:90: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #90: FILE: drivers/gpu/drm/drm_connector.c:2471: + drm_object_property_set_value(>base, + connector->privacy_screen_hw_state_property, hw_state); -:93: CHECK:OPEN_ENDED_LINE: Lines should not end with a '(' #93: FILE: drivers/gpu/drm/drm_connector.c:2474: +static int drm_connector_privacy_screen_notifier( -:105: CHECK:PARENTHESIS_ALIGNMENT: Alignment should
Re: [Intel-gfx] [BUG 5.15-rc3] kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
On Sat, Oct 2, 2021 at 5:17 AM Steven Rostedt wrote: > > On Sat, 2 Oct 2021 03:17:29 -0700 (PDT) > Hugh Dickins wrote: > > > Yes (though bisection doesn't work right on this one): the fix > > Interesting, as it appeared to be very reliable. But I didn't do the > "try before / after" on the patch. Well, even the before/after might well have worked, since the problem depended on how that sw_fence_dummy_notify() function ended up aligned. So random unrelated changes could re-align it just by mistake. Patch applied directly. I'd also like to point out how that BUG_ON() actually made things worse, and made this harder to debug. If it had been a WARN_ON_ONCE(), this would presumably not even have needed bisecting, it would have been obvious. BUG_ON() really is pretty much *always* the wrong thing to do. It onl;y results in problems being harder to see because you end up with a dead machine and the message is often hidden. Linus
[Intel-gfx] [PATCH 06/10] platform/x86: thinkpad_acpi: Add hotkey_notify_extended_hotkey() helper
Factor the extended hotkey handling out of hotkey_notify_hotkey() and into a new hotkey_notify_extended_hotkey() helper. This is a preparation patch for adding support the privacy-screen hotkey toggle (which needs some special handling, it should NOT send an evdev key-event to userspace...). Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- drivers/platform/x86/thinkpad_acpi.c | 30 ++-- 1 file changed, 19 insertions(+), 11 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 50ff04c84650..83c88a8ebaf2 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -3885,6 +3885,24 @@ static bool adaptive_keyboard_hotkey_notify_hotkey(unsigned int scancode) } } +static bool hotkey_notify_extended_hotkey(const u32 hkey) +{ + unsigned int scancode; + + /* Extended keycodes start at 0x300 and our offset into the map +* TP_ACPI_HOTKEYSCAN_EXTENDED_START. The calculated scancode +* will be positive, but might not be in the correct range. +*/ + scancode = (hkey & 0xfff) - (0x300 - TP_ACPI_HOTKEYSCAN_EXTENDED_START); + if (scancode >= TP_ACPI_HOTKEYSCAN_EXTENDED_START && + scancode < TPACPI_HOTKEY_MAP_LEN) { + tpacpi_input_send_key(scancode); + return true; + } + + return false; +} + static bool hotkey_notify_hotkey(const u32 hkey, bool *send_acpi_ev, bool *ignore_acpi_ev) @@ -3919,17 +3937,7 @@ static bool hotkey_notify_hotkey(const u32 hkey, return adaptive_keyboard_hotkey_notify_hotkey(scancode); case 3: - /* Extended keycodes start at 0x300 and our offset into the map -* TP_ACPI_HOTKEYSCAN_EXTENDED_START. The calculated scancode -* will be positive, but might not be in the correct range. -*/ - scancode -= (0x300 - TP_ACPI_HOTKEYSCAN_EXTENDED_START); - if (scancode >= TP_ACPI_HOTKEYSCAN_EXTENDED_START && - scancode < TPACPI_HOTKEY_MAP_LEN) { - tpacpi_input_send_key(scancode); - return true; - } - break; + return hotkey_notify_extended_hotkey(hkey); } return false; -- 2.31.1
[Intel-gfx] [PATCH 08/10] platform/x86: thinkpad_acpi: Register a privacy-screen device
Register a privacy-screen device on laptops with a privacy-screen, this exports the PrivacyGuard features to user-space using a standardized vendor-agnostic sysfs interface. Note the sysfs interface is read-only. Registering a privacy-screen device with the new privacy-screen class code will also allow the GPU driver to get a handle to it and export the privacy-screen setting as a property on the DRM connector object for the LCD panel. This DRM connector property is a new standardized interface which all user-space code should use to query and control the privacy-screen. Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- Changes in v3: - On receiving a TP_HKEY_EV_PRIVACYGUARD_TOGGLE event only call drm_privacy_screen_call_notifier_chain() if the privacy-screen state has actually changed Changes in v2: - Make the new lcdshadow_set_sw_state, lcdshadow_get_hw_state and lcdshadow_ops symbols static - Update state and call drm_privacy_screen_call_notifier_chain() when the state is changed by pressing the Fn + D hotkey combo --- drivers/platform/x86/Kconfig | 2 + drivers/platform/x86/thinkpad_acpi.c | 97 +--- 2 files changed, 74 insertions(+), 25 deletions(-) diff --git a/drivers/platform/x86/Kconfig b/drivers/platform/x86/Kconfig index e21ea3d23e6f..20208207e366 100644 --- a/drivers/platform/x86/Kconfig +++ b/drivers/platform/x86/Kconfig @@ -501,7 +501,9 @@ config THINKPAD_ACPI depends on ACPI_VIDEO || ACPI_VIDEO = n depends on BACKLIGHT_CLASS_DEVICE depends on I2C + depends on DRM select ACPI_PLATFORM_PROFILE + select DRM_PRIVACY_SCREEN select HWMON select NVRAM select NEW_LEDS diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index b8f2556c4797..291cd18c9c8f 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -73,6 +73,7 @@ #include #include #include +#include #include "dual_accel_detect.h" /* ThinkPad CMOS commands */ @@ -157,6 +158,7 @@ enum tpacpi_hkey_event_t { TP_HKEY_EV_VOL_UP = 0x1015, /* Volume up or unmute */ TP_HKEY_EV_VOL_DOWN = 0x1016, /* Volume down or unmute */ TP_HKEY_EV_VOL_MUTE = 0x1017, /* Mixer output mute */ + TP_HKEY_EV_PRIVACYGUARD_TOGGLE = 0x130f, /* Toggle priv.guard on/off */ /* Reasons for waking up from S3/S4 */ TP_HKEY_EV_WKUP_S3_UNDOCK = 0x2304, /* undock requested, S3 */ @@ -3889,6 +3891,12 @@ static bool hotkey_notify_extended_hotkey(const u32 hkey) { unsigned int scancode; + switch (hkey) { + case TP_HKEY_EV_PRIVACYGUARD_TOGGLE: + tpacpi_driver_event(hkey); + return true; + } + /* Extended keycodes start at 0x300 and our offset into the map * TP_ACPI_HOTKEYSCAN_EXTENDED_START. The calculated scancode * will be positive, but might not be in the correct range. @@ -9819,30 +9827,40 @@ static struct ibm_struct battery_driver_data = { * LCD Shadow subdriver, for the Lenovo PrivacyGuard feature */ +static struct drm_privacy_screen *lcdshadow_dev; static acpi_handle lcdshadow_get_handle; static acpi_handle lcdshadow_set_handle; -static int lcdshadow_state; -static int lcdshadow_on_off(bool state) +static int lcdshadow_set_sw_state(struct drm_privacy_screen *priv, + enum drm_privacy_screen_status state) { int output; + if (WARN_ON(!mutex_is_locked(>lock))) + return -EIO; + if (!acpi_evalf(lcdshadow_set_handle, , NULL, "dd", (int)state)) return -EIO; - lcdshadow_state = state; + priv->hw_state = priv->sw_state = state; return 0; } -static int lcdshadow_set(bool on) +static void lcdshadow_get_hw_state(struct drm_privacy_screen *priv) { - if (lcdshadow_state < 0) - return lcdshadow_state; - if (lcdshadow_state == on) - return 0; - return lcdshadow_on_off(on); + int output; + + if (!acpi_evalf(lcdshadow_get_handle, , NULL, "dd", 0)) + return; + + priv->hw_state = priv->sw_state = output & 0x1; } +static const struct drm_privacy_screen_ops lcdshadow_ops = { + .set_sw_state = lcdshadow_set_sw_state, + .get_hw_state = lcdshadow_get_hw_state, +}; + static int tpacpi_lcdshadow_init(struct ibm_init_struct *iibm) { acpi_status status1, status2; @@ -9850,36 +9868,44 @@ static int tpacpi_lcdshadow_init(struct ibm_init_struct *iibm) status1 = acpi_get_handle(hkey_handle, "GSSS", _get_handle); status2 = acpi_get_handle(hkey_handle, "", _set_handle); - if (ACPI_FAILURE(status1) || ACPI_FAILURE(status2)) { - lcdshadow_state = -ENODEV; + if (ACPI_FAILURE(status1) || ACPI_FAILURE(status2)) return 0; -
[Intel-gfx] [PATCH 09/10] drm/i915: Add intel_modeset_probe_defer() helper
The upcoming privacy-screen support adds another check for deferring probe till some other drivers have bound first. Factor out the current vga_switcheroo_client_probe_defer() check into an intel_modeset_probe_defer() helper, so that further probe-deferral checks can be added there. Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/intel_display.c | 13 + drivers/gpu/drm/i915/display/intel_display.h | 1 + drivers/gpu/drm/i915/i915_pci.c | 9 ++--- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index 60b2bc3ad011..e67f3207ba54 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include @@ -12690,6 +12691,18 @@ void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915) intel_bios_driver_remove(i915); } +bool intel_modeset_probe_defer(struct pci_dev *pdev) +{ + /* +* apple-gmux is needed on dual GPU MacBook Pro +* to probe the panel if we're the inactive GPU. +*/ + if (vga_switcheroo_client_probe_defer(pdev)) + return true; + + return false; +} + void intel_display_driver_register(struct drm_i915_private *i915) { if (!HAS_DISPLAY(i915)) diff --git a/drivers/gpu/drm/i915/display/intel_display.h b/drivers/gpu/drm/i915/display/intel_display.h index 3028072c2cf3..d3d34acb6c08 100644 --- a/drivers/gpu/drm/i915/display/intel_display.h +++ b/drivers/gpu/drm/i915/display/intel_display.h @@ -633,6 +633,7 @@ void intel_display_driver_register(struct drm_i915_private *i915); void intel_display_driver_unregister(struct drm_i915_private *i915); /* modesetting */ +bool intel_modeset_probe_defer(struct pci_dev *pdev); void intel_modeset_init_hw(struct drm_i915_private *i915); int intel_modeset_init_noirq(struct drm_i915_private *i915); int intel_modeset_init_nogem(struct drm_i915_private *i915); diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index d4a6a9dcf182..cf4ad648b742 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915/i915_pci.c @@ -22,8 +22,6 @@ * */ -#include - #include #include @@ -1187,11 +1185,8 @@ static int i915_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) if (PCI_FUNC(pdev->devfn)) return -ENODEV; - /* -* apple-gmux is needed on dual GPU MacBook Pro -* to probe the panel if we're the inactive GPU. -*/ - if (vga_switcheroo_client_probe_defer(pdev)) + /* Detect if we need to wait for other drivers early on */ + if (intel_modeset_probe_defer(pdev)) return -EPROBE_DEFER; err = i915_driver_probe(pdev, ent); -- 2.31.1
[Intel-gfx] [PATCH 10/10] drm/i915: Add privacy-screen support (v2)
Add support for eDP panels with a built-in privacy screen using the new drm_privacy_screen class. Changes in v2: - Call drm_connector_update_privacy_screen() from intel_enable_ddi_dp() / intel_ddi_update_pipe_dp() instead of adding a for_each_new_connector_in_state() loop to intel_atomic_commit_tail() - Move the probe-deferral check to the intel_modeset_probe_defer() helper Signed-off-by: Hans de Goede --- drivers/gpu/drm/i915/display/intel_atomic.c | 1 + drivers/gpu/drm/i915/display/intel_ddi.c | 3 +++ drivers/gpu/drm/i915/display/intel_display.c | 10 ++ drivers/gpu/drm/i915/display/intel_dp.c | 10 ++ 4 files changed, 24 insertions(+) diff --git a/drivers/gpu/drm/i915/display/intel_atomic.c b/drivers/gpu/drm/i915/display/intel_atomic.c index b4e7ac51aa31..a62550711e98 100644 --- a/drivers/gpu/drm/i915/display/intel_atomic.c +++ b/drivers/gpu/drm/i915/display/intel_atomic.c @@ -139,6 +139,7 @@ int intel_digital_connector_atomic_check(struct drm_connector *conn, new_conn_state->base.picture_aspect_ratio != old_conn_state->base.picture_aspect_ratio || new_conn_state->base.content_type != old_conn_state->base.content_type || new_conn_state->base.scaling_mode != old_conn_state->base.scaling_mode || + new_conn_state->base.privacy_screen_sw_state != old_conn_state->base.privacy_screen_sw_state || !drm_connector_atomic_hdr_metadata_equal(old_state, new_state)) crtc_state->mode_changed = true; diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c index 51cd0420e00e..e4496c830a35 100644 --- a/drivers/gpu/drm/i915/display/intel_ddi.c +++ b/drivers/gpu/drm/i915/display/intel_ddi.c @@ -25,6 +25,7 @@ * */ +#include #include #include "i915_drv.h" @@ -3022,6 +3023,7 @@ static void intel_enable_ddi_dp(struct intel_atomic_state *state, if (port == PORT_A && DISPLAY_VER(dev_priv) < 9) intel_dp_stop_link_train(intel_dp, crtc_state); + drm_connector_update_privacy_screen(conn_state); intel_edp_backlight_on(crtc_state, conn_state); if (!dig_port->lspcon.active || dig_port->dp.has_hdmi_sink) @@ -3247,6 +3249,7 @@ static void intel_ddi_update_pipe_dp(struct intel_atomic_state *state, intel_drrs_update(intel_dp, crtc_state); intel_backlight_update(state, encoder, crtc_state, conn_state); + drm_connector_update_privacy_screen(conn_state); } void intel_ddi_update_pipe(struct intel_atomic_state *state, diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c index e67f3207ba54..9a5dbe51458d 100644 --- a/drivers/gpu/drm/i915/display/intel_display.c +++ b/drivers/gpu/drm/i915/display/intel_display.c @@ -42,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -12693,6 +12694,8 @@ void intel_modeset_driver_remove_nogem(struct drm_i915_private *i915) bool intel_modeset_probe_defer(struct pci_dev *pdev) { + struct drm_privacy_screen *privacy_screen; + /* * apple-gmux is needed on dual GPU MacBook Pro * to probe the panel if we're the inactive GPU. @@ -12700,6 +12703,13 @@ bool intel_modeset_probe_defer(struct pci_dev *pdev) if (vga_switcheroo_client_probe_defer(pdev)) return true; + /* If the LCD panel has a privacy-screen, wait for it */ + privacy_screen = drm_privacy_screen_get(>dev, NULL); + if (IS_ERR(privacy_screen) && PTR_ERR(privacy_screen) == -EPROBE_DEFER) + return true; + + drm_privacy_screen_put(privacy_screen); + return false; } diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c index 74a657ae131a..91207310dc0d 100644 --- a/drivers/gpu/drm/i915/display/intel_dp.c +++ b/drivers/gpu/drm/i915/display/intel_dp.c @@ -37,6 +37,7 @@ #include #include #include +#include #include #include "g4x_dp.h" @@ -4808,6 +4809,7 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, struct drm_connector *connector = _connector->base; struct drm_display_mode *fixed_mode = NULL; struct drm_display_mode *downclock_mode = NULL; + struct drm_privacy_screen *privacy_screen; bool has_dpcd; enum pipe pipe = INVALID_PIPE; struct edid *edid; @@ -4902,6 +4904,14 @@ static bool intel_edp_init_connector(struct intel_dp *intel_dp, fixed_mode->hdisplay, fixed_mode->vdisplay); } + privacy_screen = drm_privacy_screen_get(dev->dev, NULL); + if (!IS_ERR(privacy_screen)) { + drm_connector_attach_privacy_screen_provider(connector, +privacy_screen); + } else if (PTR_ERR(privacy_screen) != -ENODEV) { + drm_warn(_priv->drm, "Error getting
[Intel-gfx] [PATCH 07/10] platform/x86: thinkpad_acpi: Get privacy-screen / lcdshadow ACPI handles only once
Get the privacy-screen / lcdshadow ACPI handles once and cache them, instead of retrieving them every time we need them. Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- drivers/platform/x86/thinkpad_acpi.c | 18 -- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c index 83c88a8ebaf2..b8f2556c4797 100644 --- a/drivers/platform/x86/thinkpad_acpi.c +++ b/drivers/platform/x86/thinkpad_acpi.c @@ -9819,19 +9819,15 @@ static struct ibm_struct battery_driver_data = { * LCD Shadow subdriver, for the Lenovo PrivacyGuard feature */ +static acpi_handle lcdshadow_get_handle; +static acpi_handle lcdshadow_set_handle; static int lcdshadow_state; static int lcdshadow_on_off(bool state) { - acpi_handle set_shadow_handle; int output; - if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "", _shadow_handle))) { - pr_warn("Thinkpad ACPI has no %s interface.\n", ""); - return -EIO; - } - - if (!acpi_evalf(set_shadow_handle, , NULL, "dd", (int)state)) + if (!acpi_evalf(lcdshadow_set_handle, , NULL, "dd", (int)state)) return -EIO; lcdshadow_state = state; @@ -9849,15 +9845,17 @@ static int lcdshadow_set(bool on) static int tpacpi_lcdshadow_init(struct ibm_init_struct *iibm) { - acpi_handle get_shadow_handle; + acpi_status status1, status2; int output; - if (ACPI_FAILURE(acpi_get_handle(hkey_handle, "GSSS", _shadow_handle))) { + status1 = acpi_get_handle(hkey_handle, "GSSS", _get_handle); + status2 = acpi_get_handle(hkey_handle, "", _set_handle); + if (ACPI_FAILURE(status1) || ACPI_FAILURE(status2)) { lcdshadow_state = -ENODEV; return 0; } - if (!acpi_evalf(get_shadow_handle, , NULL, "dd", 0)) { + if (!acpi_evalf(lcdshadow_get_handle, , NULL, "dd", 0)) { lcdshadow_state = -EIO; return -EIO; } -- 2.31.1
[Intel-gfx] [PATCH 05/10] drm/connector: Add a drm_connector privacy-screen helper functions (v2)
Add 2 drm_connector privacy-screen helper functions: 1. drm_connector_attach_privacy_screen_provider(), this function creates and attaches the standard privacy-screen properties and registers a generic notifier for generating sysfs-connector-status-events on external changes to the privacy-screen status. 2. drm_connector_update_privacy_screen(), update the privacy-screen's sw_state if the connector has a privacy-screen. Changes in v2: - Do not update connector->state->privacy_screen_sw_state on atomic-commits. - Change drm_connector_update_privacy_screen() to take drm_connector_state as argument instead of a full drm_atomic_state. This allows the helper to be called by drivers when they are enabling crtcs/encoders/connectors. Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- drivers/gpu/drm/drm_connector.c | 102 include/drm/drm_connector.h | 11 2 files changed, 113 insertions(+) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index b2f1f1b1bfb4..00cf3b6135f6 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -28,6 +28,7 @@ #include #include #include +#include #include #include @@ -462,6 +463,11 @@ void drm_connector_cleanup(struct drm_connector *connector) DRM_CONNECTOR_REGISTERED)) drm_connector_unregister(connector); + if (connector->privacy_screen) { + drm_privacy_screen_put(connector->privacy_screen); + connector->privacy_screen = NULL; + } + if (connector->tile_group) { drm_mode_put_tile_group(dev, connector->tile_group); connector->tile_group = NULL; @@ -543,6 +549,10 @@ int drm_connector_register(struct drm_connector *connector) /* Let userspace know we have a new connector */ drm_sysfs_hotplug_event(connector->dev); + if (connector->privacy_screen) + drm_privacy_screen_register_notifier(connector->privacy_screen, + >privacy_screen_notifier); + mutex_lock(_list_lock); list_add_tail(>global_connector_list_entry, _list); mutex_unlock(_list_lock); @@ -578,6 +588,11 @@ void drm_connector_unregister(struct drm_connector *connector) list_del_init(>global_connector_list_entry); mutex_unlock(_list_lock); + if (connector->privacy_screen) + drm_privacy_screen_unregister_notifier( + connector->privacy_screen, + >privacy_screen_notifier); + if (connector->funcs->early_unregister) connector->funcs->early_unregister(connector); @@ -2442,6 +2457,93 @@ drm_connector_attach_privacy_screen_properties(struct drm_connector *connector) } EXPORT_SYMBOL(drm_connector_attach_privacy_screen_properties); +static void drm_connector_update_privacy_screen_properties( + struct drm_connector *connector, bool set_sw_state) +{ + enum drm_privacy_screen_status sw_state, hw_state; + + drm_privacy_screen_get_state(connector->privacy_screen, +_state, _state); + + if (set_sw_state) + connector->state->privacy_screen_sw_state = sw_state; + drm_object_property_set_value(>base, + connector->privacy_screen_hw_state_property, hw_state); +} + +static int drm_connector_privacy_screen_notifier( + struct notifier_block *nb, unsigned long action, void *data) +{ + struct drm_connector *connector = + container_of(nb, struct drm_connector, privacy_screen_notifier); + struct drm_device *dev = connector->dev; + + drm_modeset_lock(>mode_config.connection_mutex, NULL); + drm_connector_update_privacy_screen_properties(connector, true); + drm_modeset_unlock(>mode_config.connection_mutex); + + drm_sysfs_connector_status_event(connector, + connector->privacy_screen_sw_state_property); + drm_sysfs_connector_status_event(connector, + connector->privacy_screen_hw_state_property); + + return NOTIFY_DONE; +} + +/** + * drm_connector_attach_privacy_screen_provider - attach a privacy-screen to + *the connector + * @connector: connector to attach the privacy-screen to + * @priv: drm_privacy_screen to attach + * + * Create and attach the standard privacy-screen properties and register + * a generic notifier for generating sysfs-connector-status-events + * on external changes to the privacy-screen status. + * This function takes ownership of the passed in drm_privacy_screen and will + * call drm_privacy_screen_put() on it when the connector is destroyed. + */ +void drm_connector_attach_privacy_screen_provider( + struct drm_connector *connector, struct drm_privacy_screen *priv) +{ +
[Intel-gfx] [PATCH 04/10] drm/privacy-screen: Add notifier support (v2)
Add support for privacy-screen consumers to register a notifier to be notified of external (e.g. done by the hw itself on a hotkey press) state changes. Changes in v2: - Drop WARN_ON(mutex_is_locked(>lock)) check in drm_privacy_screen_call_notifier_chain() it may be locked by another thread, which would lead to a false-positive triggering of the check Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- drivers/gpu/drm/drm_privacy_screen.c | 64 +++ include/drm/drm_privacy_screen_consumer.h | 15 ++ include/drm/drm_privacy_screen_driver.h | 4 ++ 3 files changed, 83 insertions(+) diff --git a/drivers/gpu/drm/drm_privacy_screen.c b/drivers/gpu/drm/drm_privacy_screen.c index 183a6011adf0..beaf99e9120a 100644 --- a/drivers/gpu/drm/drm_privacy_screen.c +++ b/drivers/gpu/drm/drm_privacy_screen.c @@ -257,6 +257,49 @@ void drm_privacy_screen_get_state(struct drm_privacy_screen *priv, } EXPORT_SYMBOL(drm_privacy_screen_get_state); +/** + * drm_privacy_screen_register_notifier - register a notifier + * @priv: Privacy screen to register the notifier with + * @nb: Notifier-block for the notifier to register + * + * Register a notifier with the privacy-screen to be notified of changes made + * to the privacy-screen state from outside of the privacy-screen class. + * E.g. the state may be changed by the hardware itself in response to a + * hotkey press. + * + * The notifier is called with no locks held. The new hw_state and sw_state + * can be retrieved using the drm_privacy_screen_get_state() function. + * A pointer to the drm_privacy_screen's struct is passed as the void *data + * argument of the notifier_block's notifier_call. + * + * The notifier will NOT be called when changes are made through + * drm_privacy_screen_set_sw_state(). It is only called for external changes. + * + * Return: 0 on success, negative error code on failure. + */ +int drm_privacy_screen_register_notifier(struct drm_privacy_screen *priv, +struct notifier_block *nb) +{ + return blocking_notifier_chain_register(>notifier_head, nb); +} +EXPORT_SYMBOL(drm_privacy_screen_register_notifier); + +/** + * drm_privacy_screen_unregister_notifier - unregister a notifier + * @priv: Privacy screen to register the notifier with + * @nb: Notifier-block for the notifier to register + * + * Unregister a notifier registered with drm_privacy_screen_register_notifier(). + * + * Return: 0 on success, negative error code on failure. + */ +int drm_privacy_screen_unregister_notifier(struct drm_privacy_screen *priv, + struct notifier_block *nb) +{ + return blocking_notifier_chain_unregister(>notifier_head, nb); +} +EXPORT_SYMBOL(drm_privacy_screen_unregister_notifier); + /*** drm_privacy_screen_driver.h functions ***/ static ssize_t sw_state_show(struct device *dev, @@ -354,6 +397,7 @@ struct drm_privacy_screen *drm_privacy_screen_register( return ERR_PTR(-ENOMEM); mutex_init(>lock); + BLOCKING_INIT_NOTIFIER_HEAD(>notifier_head); priv->dev.class = drm_class; priv->dev.type = _privacy_screen_type; @@ -401,3 +445,23 @@ void drm_privacy_screen_unregister(struct drm_privacy_screen *priv) device_unregister(>dev); } EXPORT_SYMBOL(drm_privacy_screen_unregister); + +/** + * drm_privacy_screen_call_notifier_chain - notify consumers of state change + * @priv: Privacy screen to register the notifier with + * + * A privacy-screen provider driver can call this functions upon external + * changes to the privacy-screen state. E.g. the state may be changed by the + * hardware itself in response to a hotkey press. + * This function must be called without holding the privacy-screen lock. + * the driver must update sw_state and hw_state to reflect the new state before + * calling this function. + * The expected behavior from the driver upon receiving an external state + * change event is: 1. Take the lock; 2. Update sw_state and hw_state; + * 3. Release the lock. 4. Call drm_privacy_screen_call_notifier_chain(). + */ +void drm_privacy_screen_call_notifier_chain(struct drm_privacy_screen *priv) +{ + blocking_notifier_call_chain(>notifier_head, 0, priv); +} +EXPORT_SYMBOL(drm_privacy_screen_call_notifier_chain); diff --git a/include/drm/drm_privacy_screen_consumer.h b/include/drm/drm_privacy_screen_consumer.h index 0cbd23b0453d..7f66a90d15b7 100644 --- a/include/drm/drm_privacy_screen_consumer.h +++ b/include/drm/drm_privacy_screen_consumer.h @@ -24,6 +24,11 @@ int drm_privacy_screen_set_sw_state(struct drm_privacy_screen *priv, void drm_privacy_screen_get_state(struct drm_privacy_screen *priv, enum drm_privacy_screen_status *sw_state_ret, enum drm_privacy_screen_status *hw_state_ret); + +int drm_privacy_screen_register_notifier(struct drm_privacy_screen *priv, +
[Intel-gfx] [PATCH 03/10] drm/privacy-screen: Add X86 specific arch init code
Add X86 specific arch init code, which fills the privacy-screen lookup table by checking for various vendor specific ACPI interfaces for controlling the privacy-screen. This initial version only checks for the Lenovo Thinkpad specific ACPI methods for privacy-screen control. Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_privacy_screen_x86.c | 86 include/drm/drm_privacy_screen_machine.h | 5 ++ 3 files changed, 92 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/drm_privacy_screen_x86.c diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 788fc37096f6..12997ca5670d 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -32,7 +32,7 @@ drm-$(CONFIG_OF) += drm_of.o drm-$(CONFIG_PCI) += drm_pci.o drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o -drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o +drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o drm_privacy_screen_x86.o obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o diff --git a/drivers/gpu/drm/drm_privacy_screen_x86.c b/drivers/gpu/drm/drm_privacy_screen_x86.c new file mode 100644 index ..a2cafb294ca6 --- /dev/null +++ b/drivers/gpu/drm/drm_privacy_screen_x86.c @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: MIT +/* + * Copyright (C) 2020 Red Hat, Inc. + * + * Authors: + * Hans de Goede + */ + +#include +#include + +#ifdef CONFIG_X86 +static struct drm_privacy_screen_lookup arch_lookup; + +struct arch_init_data { + struct drm_privacy_screen_lookup lookup; + bool (*detect)(void); +}; + +#if IS_ENABLED(CONFIG_THINKPAD_ACPI) +static acpi_status __init acpi_set_handle(acpi_handle handle, u32 level, + void *context, void **return_value) +{ + *(acpi_handle *)return_value = handle; + return AE_CTRL_TERMINATE; +} + +static bool __init detect_thinkpad_privacy_screen(void) +{ + union acpi_object obj = { .type = ACPI_TYPE_INTEGER }; + struct acpi_object_list args = { .count = 1, .pointer = , }; + acpi_handle ec_handle = NULL; + unsigned long long output; + acpi_status status; + + /* Get embedded-controller handle */ + status = acpi_get_devices("PNP0C09", acpi_set_handle, NULL, _handle); + if (ACPI_FAILURE(status) || !ec_handle) + return false; + + /* And call the privacy-screen get-status method */ + status = acpi_evaluate_integer(ec_handle, "HKEY.GSSS", , ); + if (ACPI_FAILURE(status)) + return false; + + return (output & 0x1) ? true : false; +} +#endif + +static const struct arch_init_data arch_init_data[] __initconst = { +#if IS_ENABLED(CONFIG_THINKPAD_ACPI) + { + .lookup = { + .dev_id = NULL, + .con_id = NULL, + .provider = "privacy_screen-thinkpad_acpi", + }, + .detect = detect_thinkpad_privacy_screen, + }, +#endif +}; + +void __init drm_privacy_screen_lookup_init(void) +{ + int i; + + for (i = 0; i < ARRAY_SIZE(arch_init_data); i++) { + if (!arch_init_data[i].detect()) + continue; + + pr_info("Found '%s' privacy-screen provider\n", + arch_init_data[i].lookup.provider); + + /* Make a copy because arch_init_data is __initconst */ + arch_lookup = arch_init_data[i].lookup; + drm_privacy_screen_lookup_add(_lookup); + break; + } +} + +void drm_privacy_screen_lookup_exit(void) +{ + if (arch_lookup.provider) + drm_privacy_screen_lookup_remove(_lookup); +} +#endif /* ifdef CONFIG_X86 */ diff --git a/include/drm/drm_privacy_screen_machine.h b/include/drm/drm_privacy_screen_machine.h index aaa0d38cce92..02e5371904d3 100644 --- a/include/drm/drm_privacy_screen_machine.h +++ b/include/drm/drm_privacy_screen_machine.h @@ -31,11 +31,16 @@ struct drm_privacy_screen_lookup { void drm_privacy_screen_lookup_add(struct drm_privacy_screen_lookup *lookup); void drm_privacy_screen_lookup_remove(struct drm_privacy_screen_lookup *lookup); +#if IS_ENABLED(CONFIG_DRM_PRIVACY_SCREEN) && IS_ENABLED(CONFIG_X86) +void drm_privacy_screen_lookup_init(void); +void drm_privacy_screen_lookup_exit(void); +#else static inline void drm_privacy_screen_lookup_init(void) { } static inline void drm_privacy_screen_lookup_exit(void) { } +#endif #endif -- 2.31.1
[Intel-gfx] [PATCH 02/10] drm: Add privacy-screen class (v4)
On some new laptops the LCD panel has a builtin electronic privacy-screen. We want to export this functionality as a property on the drm connector object. But often this functionality is not exposed on the GPU but on some other (ACPI) device. This commit adds a privacy-screen class allowing the driver for these other devices to register themselves as a privacy-screen provider; and allowing the drm/kms code to get a privacy-screen provider associated with a specific GPU/connector combo. Changes in v2: - Make CONFIG_DRM_PRIVACY_SCREEN a bool which controls if the drm_privacy code gets built as part of the main drm module rather then making it a tristate which builds its own module. - Add a #if IS_ENABLED(CONFIG_DRM_PRIVACY_SCREEN) check to drm_privacy_screen_consumer.h and define stubs when the check fails. Together these 2 changes fix several dependency issues. - Remove module related code now that this is part of the main drm.ko - Use drm_class as class for the privacy-screen devices instead of adding a separate class for this Changes in v3: - Make the static inline drm_privacy_screen_get_state() stub set sw_state and hw_state to PRIVACY_SCREEN_DISABLED to squelch an uninitialized variable warning when CONFIG_DRM_PRIVICAY_SCREEN is not set Changes in v4: - Make drm_privacy_screen_set_sw_state() skip calling out to the hw if hw_state == new_sw_state Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Signed-off-by: Hans de Goede --- Documentation/gpu/drm-kms-helpers.rst | 15 + MAINTAINERS | 8 + drivers/gpu/drm/Kconfig | 4 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/drm_drv.c | 4 + drivers/gpu/drm/drm_privacy_screen.c | 403 ++ include/drm/drm_privacy_screen_consumer.h | 50 +++ include/drm/drm_privacy_screen_driver.h | 80 + include/drm/drm_privacy_screen_machine.h | 41 +++ 9 files changed, 606 insertions(+) create mode 100644 drivers/gpu/drm/drm_privacy_screen.c create mode 100644 include/drm/drm_privacy_screen_consumer.h create mode 100644 include/drm/drm_privacy_screen_driver.h create mode 100644 include/drm/drm_privacy_screen_machine.h diff --git a/Documentation/gpu/drm-kms-helpers.rst b/Documentation/gpu/drm-kms-helpers.rst index ec2f65b31930..5bb55ec1b9b5 100644 --- a/Documentation/gpu/drm-kms-helpers.rst +++ b/Documentation/gpu/drm-kms-helpers.rst @@ -435,3 +435,18 @@ Legacy CRTC/Modeset Helper Functions Reference .. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c :export: + +Privacy-screen class + + +.. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c + :doc: overview + +.. kernel-doc:: include/drm/drm_privacy_screen_driver.h + :internal: + +.. kernel-doc:: include/drm/drm_privacy_screen_machine.h + :internal: + +.. kernel-doc:: drivers/gpu/drm/drm_privacy_screen.c + :export: diff --git a/MAINTAINERS b/MAINTAINERS index e3556c63081d..0e70c81d3ddc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6421,6 +6421,14 @@ F: drivers/gpu/drm/drm_panel.c F: drivers/gpu/drm/panel/ F: include/drm/drm_panel.h +DRM PRIVACY-SCREEN CLASS +M: Hans de Goede +L: dri-de...@lists.freedesktop.org +S: Maintained +T: git git://anongit.freedesktop.org/drm/drm-misc +F: drivers/gpu/drm/drm_privacy_screen* +F: include/drm/drm_privacy_screen* + DRM TTM SUBSYSTEM M: Christian Koenig M: Huang Rui diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig index 2a926d0de423..c686c08447ac 100644 --- a/drivers/gpu/drm/Kconfig +++ b/drivers/gpu/drm/Kconfig @@ -481,3 +481,7 @@ config DRM_PANEL_ORIENTATION_QUIRKS config DRM_LIB_RANDOM bool default n + +config DRM_PRIVACY_SCREEN + bool + default n diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 0dff40bb863c..788fc37096f6 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -32,6 +32,7 @@ drm-$(CONFIG_OF) += drm_of.o drm-$(CONFIG_PCI) += drm_pci.o drm-$(CONFIG_DEBUG_FS) += drm_debugfs.o drm_debugfs_crc.o drm-$(CONFIG_DRM_LOAD_EDID_FIRMWARE) += drm_edid_load.o +drm-$(CONFIG_DRM_PRIVACY_SCREEN) += drm_privacy_screen.o obj-$(CONFIG_DRM_DP_AUX_BUS) += drm_dp_aux_bus.o diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7a5097467ba5..dc293b771c3f 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "drm_crtc_internal.h" #include "drm_internal.h" @@ -1029,6 +1030,7 @@ static const struct file_operations drm_stub_fops = { static void drm_core_exit(void) { + drm_privacy_screen_lookup_exit(); unregister_chrdev(DRM_MAJOR, "drm"); debugfs_remove(drm_debugfs_root); drm_sysfs_destroy(); @@ -1056,6 +1058,8 @@ static int __init drm_core_init(void) if (ret < 0) goto error; +
[Intel-gfx] [PATCH 00/10] drm: Add privacy-screen class and connector properties
Hi all, Here is a new version of my privacy-screen series, addressing the (few) review-remarks from the version posted on September 6th. This new version contains the following changes: - drm: Add privacy-screen class (v4) - Make drm_privacy_screen_set_sw_state() skip calling out to the hw if hw_state == new_sw_state - drm/privacy-screen: Add notifier support (v2) - Drop WARN_ON(mutex_is_locked(>lock)) check in drm_privacy_screen_call_notifier_chain() it may be locked by another thread, which would lead to a false-positive triggering of the check (change requested by Lyude) - drm/connector: Add a drm_connector privacy-screen helper functions (v2) - Do not update connector->state->privacy_screen_sw_state on atomic-commits (change requested by Ville) - Change drm_connector_update_privacy_screen() to take drm_connector_state as argument instead of a full drm_atomic_state. This allows the helper to be called by drivers when they are enabling crtcs/encoders/connectors. - platform/x86: thinkpad_acpi: Register a privacy-screen device (v3) - On receiving a TP_HKEY_EV_PRIVACYGUARD_TOGGLE event only call drm_privacy_screen_call_notifier_chain() if the privacy-screen state has actually changed - drm/i915: Add intel_modeset_probe_defer() helper - New patch in this version of the series (change requested by Jani) - drm/i915: Add privacy-screen support (v2) - Call drm_connector_update_privacy_screen() from intel_enable_ddi_dp() / intel_ddi_update_pipe_dp() instead of adding a for_each_new_connector_in_state() loop to intel_atomic_commit_tail() (change requested by Ville) - Move the probe-deferral check to the intel_modeset_probe_defer() helper (change requested by Jani) With these changes I believe that this series now is fully ready for merging, but the last 2 patches need to be (re)reviewed. Here is some more info from the previous cover-letters: The first userspace consumer of the new properties is now fully ready for merging (it is just waiting for the kernel bits to land first): - https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/merge_requests/49 - https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1952 - https://gitlab.gnome.org/GNOME/gnome-control-center/-/merge_requests/1032 The new API works as designed and add the following features to GNOME: 1. Showing an OSD notification when the privacy-screen is toggled on/off through hotkeys handled by the embedded-controller 2. Allowing control of the privacy-screen from the GNOME control-panel, including the on/off slider shown there updating to match the hw-setting when the setting is changed with the control-panel open. 3. Restoring the last user-setting at login This series consists of a number of different parts: 1. A new version of Rajat's privacy-screen connector properties patch, this adds new userspace API in the form of new properties 2. Since on most devices the privacy screen is actually controlled by some vendor specific ACPI/WMI interface which has a driver under drivers/platform/x86, we need some "glue" code to make this functionality available to KMS drivers. Patches 2-4 add a new privacy-screen class for this, which allows non KMS drivers (and possibly KMS drivers too) to register a privacy-screen device and also adds an interface for KMS drivers to get access to the privacy-screen associated with a specific connector. This is modelled similar to how we deal with e.g. PWMs and GPIOs in the kernel, including separate includes for consumers and providers(drivers). 3. Some drm_connector helper functions to keep the actual changes needed for this in individual KMS drivers as small as possible (patch 5). 4. Make the thinkpad_acpi code register a privacy-screen device on ThinkPads with a privacy-screen (patches 6-8) 5. Make the i915 driver export the privacy-screen functionality through the connector properties on the eDP connector. I believe that it would be best to merge the entire series, including the thinkpad_acpi changes through drm-misc in one go. As the pdx86 subsys maintainer I hereby give my ack for merging the thinkpad_acpi changes through drm-misc. There is one small caveat with this series, which it is good to be aware of. The i915 driver will now return -EPROBE_DEFER on Thinkpads with an eprivacy screen, until the thinkpad_acpi driver is loaded. This means that initrd generation tools will need to be updated to include thinkpad_acpi when the i915 driver is added to the initrd. Without this the loading of the i915 driver will be delayed to after the switch to real rootfs. Regards, Hans Hans de Goede (9): drm: Add privacy-screen class (v4) drm/privacy-screen: Add X86 specific arch init code drm/privacy-screen: Add notifier support (v2) drm/connector: Add a drm_connector privacy-screen helper functions (v2) platform/x86: thinkpad_acpi: Add hotkey_notify_extended_hotkey() helper platform/x86: thinkpad_acpi: Get privacy-screen /
[Intel-gfx] [PATCH 01/10] drm/connector: Add support for privacy-screen properties (v4)
From: Rajat Jain Add support for generic electronic privacy screen properties, that can be added by systems that have an integrated EPS. Changes in v2 (Hans de Goede) - Create 2 properties, "privacy-screen sw-state" and "privacy-screen hw-state", to deal with devices where the OS might be locked out of making state changes - Write kerneldoc explaining how the 2 properties work together, what happens when changes to the state are made outside of the DRM code's control, etc. Changes in v3 (Hans de Goede) - Some small tweaks to the kerneldoc describing the 2 properties Changes in v4 (Hans de Goede) - Change the "Enabled, locked" and "Disabled, locked" hw-state enum value names to "Enabled-locked" and "Disabled-locked". The xrandr command shows all possible enum values separated by commas in its output, so having a comma in an enum name is not a good idea. - Do not add a privacy_screen_hw_state member to drm_connector_state since this property is immutable its value must be directly stored in the obj->properties->values array Signed-off-by: Rajat Jain Acked-by: Pekka Paalanen Reviewed-by: Mario Limonciello Reviewed-by: Emil Velikov Reviewed-by: Lyude Paul Co-developed-by: Hans de Goede Signed-off-by: Hans de Goede --- Documentation/gpu/drm-kms.rst | 2 + drivers/gpu/drm/drm_atomic_uapi.c | 4 ++ drivers/gpu/drm/drm_connector.c | 101 ++ include/drm/drm_connector.h | 44 + 4 files changed, 151 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index 1ef7951ded5e..d14bf1c35d7e 100644 --- a/Documentation/gpu/drm-kms.rst +++ b/Documentation/gpu/drm-kms.rst @@ -506,6 +506,8 @@ Property Types and Blob Property Support .. kernel-doc:: drivers/gpu/drm/drm_property.c :export: +.. _standard_connector_properties: + Standard Connector Properties - diff --git a/drivers/gpu/drm/drm_atomic_uapi.c b/drivers/gpu/drm/drm_atomic_uapi.c index 909f31833181..cdd31fc78bfc 100644 --- a/drivers/gpu/drm/drm_atomic_uapi.c +++ b/drivers/gpu/drm/drm_atomic_uapi.c @@ -797,6 +797,8 @@ static int drm_atomic_connector_set_property(struct drm_connector *connector, fence_ptr); } else if (property == connector->max_bpc_property) { state->max_requested_bpc = val; + } else if (property == connector->privacy_screen_sw_state_property) { + state->privacy_screen_sw_state = val; } else if (connector->funcs->atomic_set_property) { return connector->funcs->atomic_set_property(connector, state, property, val); @@ -874,6 +876,8 @@ drm_atomic_connector_get_property(struct drm_connector *connector, *val = 0; } else if (property == connector->max_bpc_property) { *val = state->max_requested_bpc; + } else if (property == connector->privacy_screen_sw_state_property) { + *val = state->privacy_screen_sw_state; } else if (connector->funcs->atomic_get_property) { return connector->funcs->atomic_get_property(connector, state, property, val); diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index 3bc782b630b9..b2f1f1b1bfb4 100644 --- a/drivers/gpu/drm/drm_connector.c +++ b/drivers/gpu/drm/drm_connector.c @@ -1264,6 +1264,46 @@ static const struct drm_prop_enum_list dp_colorspaces[] = { * For DVI-I and TVout there is also a matching property "select subconnector" * allowing to switch between signal types. * DP subconnector corresponds to a downstream port. + * + * privacy-screen sw-state, privacy-screen hw-state: + * These 2 optional properties can be used to query the state of the + * electronic privacy screen that is available on some displays; and in + * some cases also control the state. If a driver implements these + * properties then both properties must be present. + * + * "privacy-screen hw-state" is read-only and reflects the actual state + * of the privacy-screen, possible values: "Enabled", "Disabled, + * "Enabled-locked", "Disabled-locked". The locked states indicate + * that the state cannot be changed through the DRM API. E.g. there + * might be devices where the firmware-setup options, or a hardware + * slider-switch, offer always on / off modes. + * + * "privacy-screen sw-state" can be set to change the privacy-screen state + * when not locked. In this case the driver must update the hw-state + * property to reflect the new state on completion of the commit of the + * sw-state property. Setting the sw-state property when the hw-state is + * locked must be interpreted by the driver as a request to change the + * state to the set state when the hw-state becomes unlocked. E.g. if + * "privacy-screen hw-state"
[Intel-gfx] ✓ Fi.CI.IGT: success for kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
== Series Details == Series: kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245! URL : https://patchwork.freedesktop.org/series/95368/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680_full -> Patchwork_21228_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_21228_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@preservation-s3@vecs0: - shard-apl: NOTRUN -> [DMESG-WARN][1] ([i915#180]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-apl7/igt@gem_ctx_isolation@preservation...@vecs0.html * igt@gem_eio@unwedge-stress: - shard-tglb: NOTRUN -> [TIMEOUT][2] ([i915#2369] / [i915#3063] / [i915#3648]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-tglb5/igt@gem_...@unwedge-stress.html * igt@gem_exec_fair@basic-deadline: - shard-kbl: NOTRUN -> [FAIL][3] ([i915#2846]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-kbl2/igt@gem_exec_f...@basic-deadline.html * igt@gem_exec_fair@basic-none-rrul@rcs0: - shard-glk: [PASS][4] -> [FAIL][5] ([i915#2842]) +1 similar issue [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk5/igt@gem_exec_fair@basic-none-r...@rcs0.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-glk4/igt@gem_exec_fair@basic-none-r...@rcs0.html * igt@gem_exec_fair@basic-pace-share@rcs0: - shard-tglb: [PASS][6] -> [FAIL][7] ([i915#2842]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb8/igt@gem_exec_fair@basic-pace-sh...@rcs0.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-tglb1/igt@gem_exec_fair@basic-pace-sh...@rcs0.html * igt@gem_exec_params@no-bsd: - shard-tglb: NOTRUN -> [SKIP][8] ([fdo#109283]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-tglb5/igt@gem_exec_par...@no-bsd.html - shard-iclb: NOTRUN -> [SKIP][9] ([fdo#109283]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-iclb1/igt@gem_exec_par...@no-bsd.html * igt@gem_exec_whisper@basic-queues-forked-all: - shard-glk: [PASS][10] -> [DMESG-WARN][11] ([i915#118] / [i915#95]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_whis...@basic-queues-forked-all.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-glk2/igt@gem_exec_whis...@basic-queues-forked-all.html * igt@gem_huc_copy@huc-copy: - shard-tglb: [PASS][12] -> [SKIP][13] ([i915#2190]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb2/igt@gem_huc_c...@huc-copy.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-tglb6/igt@gem_huc_c...@huc-copy.html * igt@gem_pread@exhaustion: - shard-kbl: NOTRUN -> [WARN][14] ([i915#2658]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-kbl2/igt@gem_pr...@exhaustion.html * igt@gem_render_copy@y-tiled-to-vebox-x-tiled: - shard-glk: NOTRUN -> [SKIP][15] ([fdo#109271]) +3 similar issues [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-glk3/igt@gem_render_c...@y-tiled-to-vebox-x-tiled.html * igt@gem_userptr_blits@dmabuf-sync: - shard-apl: NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#3323]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-apl6/igt@gem_userptr_bl...@dmabuf-sync.html * igt@gem_userptr_blits@vma-merge: - shard-apl: NOTRUN -> [FAIL][17] ([i915#3318]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-apl3/igt@gem_userptr_bl...@vma-merge.html * igt@gen7_exec_parse@load-register-reg: - shard-iclb: NOTRUN -> [SKIP][18] ([fdo#109289]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-iclb1/igt@gen7_exec_pa...@load-register-reg.html * igt@i915_pm_rc6_residency@rc6-fence: - shard-tglb: NOTRUN -> [WARN][19] ([i915#2681]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-tglb5/igt@i915_pm_rc6_reside...@rc6-fence.html - shard-iclb: NOTRUN -> [WARN][20] ([i915#2684]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-iclb1/igt@i915_pm_rc6_reside...@rc6-fence.html * igt@i915_pm_rpm@modeset-pc8-residency-stress: - shard-apl: NOTRUN -> [SKIP][21] ([fdo#109271]) +277 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/shard-apl7/igt@i915_pm_...@modeset-pc8-residency-stress.html * igt@i915_pm_rpm@system-suspend-execbuf: - shard-tglb: [PASS][22] -> [INCOMPLETE][23] ([i915#2411] / [i915#456] / [i915#750]) [22]:
Re: [Intel-gfx] [BUG 5.15-rc3] kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
On Sat, 2 Oct 2021 03:17:29 -0700 (PDT) Hugh Dickins wrote: > Yes (though bisection doesn't work right on this one): the fix Interesting, as it appeared to be very reliable. But I didn't do the "try before / after" on the patch. > https://lore.kernel.org/lkml/1f955bff-fd9e-d2ee-132a-f758add9e...@google.com/ > seems to have got lost in the system: it has not even appeared in > linux-next yet. I was going to send a reminder later this weekend. > > Here it is again (but edited to replace "__aligned(4)" in the original > by the official "__i915_sw_fence_call" I discovered afterwards; and > ignoring recent discussions of where __attributes ought to appear :-) > > > [PATCH] drm/i915: fix blank screen booting crashes Thanks, I added it to my "fixes" patch set that I apply before testing. It looks to have done the trick, and the kernel boots now. Tested-by: Steven Rostedt (VMware) -- Steve
[Intel-gfx] ✓ Fi.CI.BAT: success for kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
== Series Details == Series: kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245! URL : https://patchwork.freedesktop.org/series/95368/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680 -> Patchwork_21228 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/index.html Known issues Here are the changes found in Patchwork_21228 that come from known issues: ### IGT changes ### Issues hit * igt@amdgpu/amd_basic@query-info: - fi-tgl-1115g4: NOTRUN -> [SKIP][1] ([fdo#109315]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@amdgpu/amd_ba...@query-info.html * igt@amdgpu/amd_cs_nop@nop-gfx0: - fi-tgl-1115g4: NOTRUN -> [SKIP][2] ([fdo#109315] / [i915#2575]) +16 similar issues [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@amdgpu/amd_cs_...@nop-gfx0.html * igt@gem_huc_copy@huc-copy: - fi-tgl-1115g4: NOTRUN -> [SKIP][3] ([i915#2190]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@gem_huc_c...@huc-copy.html * igt@i915_pm_backlight@basic-brightness: - fi-tgl-1115g4: NOTRUN -> [SKIP][4] ([i915#1155]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@i915_pm_backli...@basic-brightness.html * igt@kms_chamelium@common-hpd-after-suspend: - fi-tgl-1115g4: NOTRUN -> [SKIP][5] ([fdo#111827]) +8 similar issues [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@kms_chamel...@common-hpd-after-suspend.html * igt@kms_chamelium@hdmi-crc-fast: - fi-bsw-n3050: NOTRUN -> [SKIP][6] ([fdo#109271] / [fdo#111827]) +8 similar issues [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-bsw-n3050/igt@kms_chamel...@hdmi-crc-fast.html * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-atomic: - fi-tgl-1115g4: NOTRUN -> [SKIP][7] ([i915#4103]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-atomic.html * igt@kms_force_connector_basic@force-load-detect: - fi-tgl-1115g4: NOTRUN -> [SKIP][8] ([fdo#109285]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@kms_force_connector_ba...@force-load-detect.html * igt@kms_pipe_crc_basic@hang-read-crc-pipe-a: - fi-bsw-n3050: NOTRUN -> [SKIP][9] ([fdo#109271]) +41 similar issues [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-bsw-n3050/igt@kms_pipe_crc_ba...@hang-read-crc-pipe-a.html * igt@kms_psr@primary_mmap_gtt: - fi-tgl-1115g4: NOTRUN -> [SKIP][10] ([i915#1072]) +3 similar issues [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@kms_psr@primary_mmap_gtt.html * igt@prime_vgem@basic-userptr: - fi-tgl-1115g4: NOTRUN -> [SKIP][11] ([i915#3301]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-tgl-1115g4/igt@prime_v...@basic-userptr.html Possible fixes * igt@gem_exec_suspend@basic-s3: - fi-bsw-n3050: [INCOMPLETE][12] ([i915#2369] / [i915#3159]) -> [PASS][13] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-bsw-n3050/igt@gem_exec_susp...@basic-s3.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-bsw-n3050/igt@gem_exec_susp...@basic-s3.html * igt@kms_flip@basic-flip-vs-wf_vblank@b-edp1: - fi-bsw-kefka: [FAIL][14] ([i915#2122]) -> [PASS][15] [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vbl...@b-edp1.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21228/fi-bsw-kefka/igt@kms_flip@basic-flip-vs-wf_vbl...@b-edp1.html [fdo#109271]: https://bugs.freedesktop.org/show_bug.cgi?id=109271 [fdo#109285]: https://bugs.freedesktop.org/show_bug.cgi?id=109285 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111827]: https://bugs.freedesktop.org/show_bug.cgi?id=111827 [i915#1072]: https://gitlab.freedesktop.org/drm/intel/issues/1072 [i915#1155]: https://gitlab.freedesktop.org/drm/intel/issues/1155 [i915#2122]: https://gitlab.freedesktop.org/drm/intel/issues/2122 [i915#2190]: https://gitlab.freedesktop.org/drm/intel/issues/2190 [i915#2369]: https://gitlab.freedesktop.org/drm/intel/issues/2369 [i915#2575]: https://gitlab.freedesktop.org/drm/intel/issues/2575 [i915#3159]: https://gitlab.freedesktop.org/drm/intel/issues/3159 [i915#3301]: https://gitlab.freedesktop.org/drm/intel/issues/3301 [i915#4103]: https://gitlab.freedesktop.org/drm/intel/issues/4103 Participating hosts (33 -> 27) -- Additional (1): fi-tgl-1115g4 Missing(7): fi-kbl-soraka bat-adls-5 bat-dg1-6
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
== Series Details == Series: kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245! URL : https://patchwork.freedesktop.org/series/95368/ State : warning == Summary == $ dim checkpatch origin/drm-tip 234e2c966647 kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245! -:75: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #75: > ---[ end Kernel panic - not syncing: Attempted to kill init! > exitcode=0x000b ]--- -:81: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 3ffe82d701a4 ("drm/i915/xehp: handle new steering options")' #81: > 3ffe82d701a4 ("drm/i915/xehp: handle new steering options") total: 1 errors, 1 warnings, 0 checks, 7 lines checked
Re: [Intel-gfx] [PATCH v2 0/4] drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers
Hi Lyude, On 10/2/21 12:53 AM, Lyude Paul wrote: > When I originally moved all of the VESA backlight code in i915 into DRM > helpers, one of the things I didn't have the hardware or time for > testing was machines that used a combination of PWM and DPCD in order to > control their backlights. This has since then caused some breakages and > resulted in us disabling DPCD backlight support on such machines. This > works fine, unless you have a machine that actually needs this > functionality for backlight controls to work at all. Additionally, we > will need to support PWM for when we start adding support for VESA's > product (as in the product of multiplication) control mode for better > brightness ranges. > > So - let's finally finish up implementing basic support for these types > of backlights to solve these problems in our DP helpers, along with > implementing support for this in i915. And since digging into this issue > solved the last questions we really had about probing backlights in i915 > for the most part, let's update some of the comments around that as > well! Backlight control is a topic which I'm reasonably familiar with, do you want me to review this series for you ? Regards, Hans > > Changes: > * Fixup docs > * Add patch to stop us from breaking nouveau > > Lyude Paul (4): > drm/i915: Add support for panels with VESA backlights with PWM > enable/disable > drm/nouveau/kms/nv50-: Explicitly check DPCD backlights for aux > enable/brightness > drm/dp, drm/i915: Add support for VESA backlights using PWM for > brightness control > drm/i915: Clarify probing order in intel_dp_aux_init_backlight_funcs() > > drivers/gpu/drm/drm_dp_helper.c | 75 +++-- > .../drm/i915/display/intel_dp_aux_backlight.c | 80 ++- > drivers/gpu/drm/nouveau/nouveau_backlight.c | 5 +- > include/drm/drm_dp_helper.h | 7 +- > 4 files changed, 122 insertions(+), 45 deletions(-) >
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers (rev3)
== Series Details == Series: drm/dp, drm/i915: Finish basic PWM support for VESA backlight helpers (rev3) URL : https://patchwork.freedesktop.org/series/95127/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680_full -> Patchwork_21227_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_21227_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@preservation-s3@rcs0: - shard-apl: NOTRUN -> [DMESG-WARN][1] ([i915#180]) +1 similar issue [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-apl6/igt@gem_ctx_isolation@preservation...@rcs0.html * igt@gem_exec_fair@basic-deadline: - shard-kbl: NOTRUN -> [FAIL][2] ([i915#2846]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-kbl2/igt@gem_exec_f...@basic-deadline.html * igt@gem_exec_fair@basic-none-share@rcs0: - shard-glk: [PASS][3] -> [FAIL][4] ([i915#2842]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_fair@basic-none-sh...@rcs0.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-glk9/igt@gem_exec_fair@basic-none-sh...@rcs0.html * igt@gem_exec_params@no-bsd: - shard-iclb: NOTRUN -> [SKIP][5] ([fdo#109283]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-iclb6/igt@gem_exec_par...@no-bsd.html * igt@gem_exec_whisper@basic-queues-forked-all: - shard-glk: [PASS][6] -> [DMESG-WARN][7] ([i915#118] / [i915#95]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_whis...@basic-queues-forked-all.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-glk7/igt@gem_exec_whis...@basic-queues-forked-all.html * igt@gem_render_copy@y-tiled-to-vebox-x-tiled: - shard-glk: NOTRUN -> [SKIP][8] ([fdo#109271]) +3 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-glk8/igt@gem_render_c...@y-tiled-to-vebox-x-tiled.html * igt@gem_userptr_blits@dmabuf-sync: - shard-apl: NOTRUN -> [SKIP][9] ([fdo#109271] / [i915#3323]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-apl3/igt@gem_userptr_bl...@dmabuf-sync.html * igt@gem_userptr_blits@vma-merge: - shard-apl: NOTRUN -> [FAIL][10] ([i915#3318]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-apl8/igt@gem_userptr_bl...@vma-merge.html * igt@gem_workarounds@suspend-resume: - shard-tglb: [PASS][11] -> [INCOMPLETE][12] ([i915#456]) +2 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb8/igt@gem_workarou...@suspend-resume.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-tglb7/igt@gem_workarou...@suspend-resume.html * igt@gen7_exec_parse@load-register-reg: - shard-iclb: NOTRUN -> [SKIP][13] ([fdo#109289]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-iclb6/igt@gen7_exec_pa...@load-register-reg.html * igt@gen9_exec_parse@bb-start-out: - shard-tglb: NOTRUN -> [SKIP][14] ([i915#2856]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-tglb5/igt@gen9_exec_pa...@bb-start-out.html * igt@i915_pm_lpsp@kms-lpsp@kms-lpsp-dp: - shard-kbl: NOTRUN -> [SKIP][15] ([fdo#109271] / [i915#1937]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-kbl3/igt@i915_pm_lpsp@kms-l...@kms-lpsp-dp.html * igt@i915_pm_rc6_residency@rc6-fence: - shard-iclb: NOTRUN -> [WARN][16] ([i915#1804] / [i915#2684]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-iclb6/igt@i915_pm_rc6_reside...@rc6-fence.html * igt@i915_pm_rpm@modeset-pc8-residency-stress: - shard-apl: NOTRUN -> [SKIP][17] ([fdo#109271]) +236 similar issues [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-apl7/igt@i915_pm_...@modeset-pc8-residency-stress.html * igt@i915_suspend@debugfs-reader: - shard-apl: [PASS][18] -> [DMESG-WARN][19] ([i915#180]) +1 similar issue [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-apl6/igt@i915_susp...@debugfs-reader.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-apl2/igt@i915_susp...@debugfs-reader.html * igt@kms_async_flips@alternate-sync-async-flip: - shard-tglb: [PASS][20] -> [FAIL][21] ([i915#2521]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb8/igt@kms_async_fl...@alternate-sync-async-flip.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21227/shard-tglb7/igt@kms_async_fl...@alternate-sync-async-flip.html * igt@kms_big_fb@x-tiled-32bpp-rotate-270: - shard-iclb: NOTRUN
Re: [Intel-gfx] [PATCH v2 00/17] drm: cleanup: Use DRM_MODESET_LOCK_ALL_* helpers where possible
On 21/10/02 05:30AM, Ville Syrjälä wrote: > On Sat, Oct 02, 2021 at 01:05:47AM +0300, Ville Syrjälä wrote: > > On Fri, Oct 01, 2021 at 04:48:15PM -0400, Sean Paul wrote: > > > On Fri, Oct 01, 2021 at 10:00:50PM +0300, Ville Syrjälä wrote: > > > > On Fri, Oct 01, 2021 at 02:36:55PM -0400, Sean Paul wrote: > > > > > > > > > > Thank you for revising, Fernando! I've pushed the set to > > > > > drm-misc-next (along > > > > > with the necessary drm-tip conflict resolutions). > > > > > > > > Ugh. Did anyone actually review the locking changes this does? > > > > I shot the previous i915 stuff down because the commit messages > > > > did not address any of it. > > > > > > I reviewed the set on 9/17, I didn't see your feedback on that thread. > > > > It was much earlir than that. > > https://lists.freedesktop.org/archives/dri-devel/2021-June/313193.html > > > > And I think I might have also shot down a similar thing earlier. > > > > I was actually half considering sending a patch to nuke that > > misleading TODO item. I don't think anything which changes > > which locks are taken should be considred a starter level task. > > And the commit messages here don't seem to address any of it. > > And i915 is now broken :( > > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/fi-bwr-2160/boot.html I completely overlooked the side effects of not having a global context anymore. Sorry for all the trouble. Sean, could you revert the whole patch series? I'll have a deeper look into the patch set and come up with a v3 where all these issues will be addressed. Thanks and sorry once again for the extra overhead this might have caused.
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/display: Wait PSR2 get out of deep sleep to update pipe (rev2)
== Series Details == Series: drm/i915/display: Wait PSR2 get out of deep sleep to update pipe (rev2) URL : https://patchwork.freedesktop.org/series/95309/ State : failure == Summary == CI Bug Log - changes from CI_DRM_10680_full -> Patchwork_21225_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_21225_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_21225_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_21225_full: ### IGT changes ### Possible regressions * igt@perf@stress-open-close: - shard-apl: NOTRUN -> [DMESG-FAIL][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-apl8/igt@p...@stress-open-close.html Known issues Here are the changes found in Patchwork_21225_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_isolation@preservation-s3@vecs0: - shard-kbl: [PASS][2] -> [DMESG-WARN][3] ([i915#180]) +3 similar issues [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-kbl6/igt@gem_ctx_isolation@preservation...@vecs0.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-kbl1/igt@gem_ctx_isolation@preservation...@vecs0.html * igt@gem_eio@in-flight-suspend: - shard-tglb: [PASS][4] -> [INCOMPLETE][5] ([i915#456]) +1 similar issue [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb6/igt@gem_...@in-flight-suspend.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-tglb7/igt@gem_...@in-flight-suspend.html * igt@gem_exec_fair@basic-none-rrul@rcs0: - shard-glk: [PASS][6] -> [FAIL][7] ([i915#2842]) +2 similar issues [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk5/igt@gem_exec_fair@basic-none-r...@rcs0.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-glk9/igt@gem_exec_fair@basic-none-r...@rcs0.html * igt@gem_exec_fair@basic-none-vip@rcs0: - shard-kbl: [PASS][8] -> [FAIL][9] ([i915#2842]) +3 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-kbl6/igt@gem_exec_fair@basic-none-...@rcs0.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-kbl3/igt@gem_exec_fair@basic-none-...@rcs0.html * igt@gem_exec_params@no-bsd: - shard-tglb: NOTRUN -> [SKIP][10] ([fdo#109283]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-tglb2/igt@gem_exec_par...@no-bsd.html - shard-iclb: NOTRUN -> [SKIP][11] ([fdo#109283]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-iclb1/igt@gem_exec_par...@no-bsd.html * igt@gem_exec_whisper@basic-queues-forked-all: - shard-glk: [PASS][12] -> [DMESG-WARN][13] ([i915#118] / [i915#95]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk7/igt@gem_exec_whis...@basic-queues-forked-all.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-glk6/igt@gem_exec_whis...@basic-queues-forked-all.html * igt@gem_render_copy@y-tiled-to-vebox-x-tiled: - shard-glk: NOTRUN -> [SKIP][14] ([fdo#109271]) +3 similar issues [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-glk1/igt@gem_render_c...@y-tiled-to-vebox-x-tiled.html * igt@gem_userptr_blits@vma-merge: - shard-apl: NOTRUN -> [FAIL][15] ([i915#3318]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-apl8/igt@gem_userptr_bl...@vma-merge.html * igt@gen7_exec_parse@load-register-reg: - shard-iclb: NOTRUN -> [SKIP][16] ([fdo#109289]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-iclb1/igt@gen7_exec_pa...@load-register-reg.html - shard-tglb: NOTRUN -> [SKIP][17] ([fdo#109289]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-tglb2/igt@gen7_exec_pa...@load-register-reg.html * igt@gen9_exec_parse@bb-start-out: - shard-tglb: NOTRUN -> [SKIP][18] ([i915#2856]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-tglb6/igt@gen9_exec_pa...@bb-start-out.html * igt@i915_pm_dc@dc6-psr: - shard-iclb: [PASS][19] -> [FAIL][20] ([i915#454]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-iclb7/igt@i915_pm...@dc6-psr.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21225/shard-iclb3/igt@i915_pm...@dc6-psr.html * igt@i915_pm_rc6_residency@rc6-fence: - shard-tglb: NOTRUN -> [WARN][21] ([i915#2681]) [21]:
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Update memory bandwidth formulae (rev5)
== Series Details == Series: drm/i915: Update memory bandwidth formulae (rev5) URL : https://patchwork.freedesktop.org/series/95138/ State : success == Summary == CI Bug Log - changes from CI_DRM_10680_full -> Patchwork_21224_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_21224_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_eio@in-flight-suspend: - shard-tglb: [PASS][1] -> [INCOMPLETE][2] ([i915#456]) +2 similar issues [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb6/igt@gem_...@in-flight-suspend.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb7/igt@gem_...@in-flight-suspend.html * igt@gem_exec_fair@basic-deadline: - shard-kbl: NOTRUN -> [FAIL][3] ([i915#2846]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-kbl1/igt@gem_exec_f...@basic-deadline.html - shard-apl: NOTRUN -> [FAIL][4] ([i915#2846]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-apl1/igt@gem_exec_f...@basic-deadline.html * igt@gem_exec_fair@basic-flow@rcs0: - shard-tglb: [PASS][5] -> [FAIL][6] ([i915#2842]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb5/igt@gem_exec_fair@basic-f...@rcs0.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb6/igt@gem_exec_fair@basic-f...@rcs0.html * igt@gem_exec_fair@basic-none-rrul@rcs0: - shard-glk: [PASS][7] -> [FAIL][8] ([i915#2842]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-glk5/igt@gem_exec_fair@basic-none-r...@rcs0.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-glk8/igt@gem_exec_fair@basic-none-r...@rcs0.html * igt@gem_exec_fair@basic-none@vcs1: - shard-iclb: NOTRUN -> [FAIL][9] ([i915#2842]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-iclb1/igt@gem_exec_fair@basic-n...@vcs1.html * igt@gem_exec_fair@basic-none@vecs0: - shard-kbl: [PASS][10] -> [FAIL][11] ([i915#2842]) [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-kbl1/igt@gem_exec_fair@basic-n...@vecs0.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-kbl1/igt@gem_exec_fair@basic-n...@vecs0.html * igt@gem_exec_params@no-bsd: - shard-tglb: NOTRUN -> [SKIP][12] ([fdo#109283]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb5/igt@gem_exec_par...@no-bsd.html - shard-iclb: NOTRUN -> [SKIP][13] ([fdo#109283]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-iclb6/igt@gem_exec_par...@no-bsd.html * igt@gem_pread@exhaustion: - shard-kbl: NOTRUN -> [WARN][14] ([i915#2658]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-kbl4/igt@gem_pr...@exhaustion.html * igt@gem_render_copy@y-tiled-to-vebox-x-tiled: - shard-glk: NOTRUN -> [SKIP][15] ([fdo#109271]) +3 similar issues [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-glk6/igt@gem_render_c...@y-tiled-to-vebox-x-tiled.html * igt@gem_userptr_blits@dmabuf-sync: - shard-apl: NOTRUN -> [SKIP][16] ([fdo#109271] / [i915#3323]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-apl8/igt@gem_userptr_bl...@dmabuf-sync.html * igt@gen7_exec_parse@load-register-reg: - shard-iclb: NOTRUN -> [SKIP][17] ([fdo#109289]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-iclb6/igt@gen7_exec_pa...@load-register-reg.html - shard-tglb: NOTRUN -> [SKIP][18] ([fdo#109289]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb5/igt@gen7_exec_pa...@load-register-reg.html * igt@gen9_exec_parse@bb-start-out: - shard-tglb: NOTRUN -> [SKIP][19] ([i915#2856]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb3/igt@gen9_exec_pa...@bb-start-out.html * igt@i915_pm_rc6_residency@rc6-fence: - shard-tglb: NOTRUN -> [WARN][20] ([i915#2681]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb5/igt@i915_pm_rc6_reside...@rc6-fence.html - shard-iclb: NOTRUN -> [WARN][21] ([i915#1804] / [i915#2684]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-iclb6/igt@i915_pm_rc6_reside...@rc6-fence.html * igt@i915_pm_rpm@system-suspend-execbuf: - shard-tglb: [PASS][22] -> [INCOMPLETE][23] ([i915#2411] / [i915#456] / [i915#750]) [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_10680/shard-tglb3/igt@i915_pm_...@system-suspend-execbuf.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_21224/shard-tglb7/igt@i915_pm_...@system-suspend-execbuf.html
[Intel-gfx] [BUG 5.15-rc3] kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245!
When I tried to test patches applied to v5.15-rc3, I hit this bug (and hence can not test my code), on 32 bit x86. [ cut here ] kernel BUG at drivers/gpu/drm/i915/i915_sw_fence.c:245! invalid opcode: [#1] SMP PTI CPU: 3 PID: 1 Comm: swapper/0 Not tainted 5.14.0-rc1-test+ #456 Hardware name: MSI MS-7823/CSM-H87M-G43 (MS-7823), BIOS V1.6 02/22/2014 EIP: __i915_sw_fence_init+0x15/0x38 Code: 2b 3d 58 98 88 c1 74 05 e8 60 d9 58 00 8d 65 f4 5b 5e 5f 5d c3 3e 8d 74 26 00 55 89 e5 56 89 d6 53 85 d2 74 05 f6 c2 03 74 02 <0f> 0b 89 ca 8b 4d 08 89 c3 e8 48 94 ab ff 89 73 34 c7 43 38 01 00 EAX: c2508260 EBX: c2508000 ECX: c143de1e EDX: c09dfadd ESI: c09dfadd EDI: c45e7200 EBP: c26c9c68 ESP: c26c9c60 DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 EFLAGS: 00010202 CR0: 80050033 CR2: CR3: 019e2000 CR4: 001506f0 Call Trace: intel_context_init+0x112/0x145 intel_context_create+0x29/0x37 intel_ring_submission_setup+0x3cb/0x5a8 ? kfree+0x135/0x1c6 ? wa_init_finish+0x32/0x59 ? wa_init_finish+0x4f/0x59 ? intel_engine_init_ctx_wa+0x39a/0x3b3 intel_engines_init+0x2dd/0x4d0 ? gen6_bsd_submit_request+0x97/0x97 intel_gt_init+0x122/0x20d i915_gem_init+0x80/0xef i915_driver_probe+0x880/0xa90 ? i915_pci_remove+0x27/0x27 i915_pci_probe+0xdd/0xf6 ? __pm_runtime_resume+0x63/0x6b ? i915_pci_remove+0x27/0x27 pci_device_probe+0xbc/0x11e really_probe+0x13e/0x328 __driver_probe_device+0x140/0x176 driver_probe_device+0x1f/0x71 __driver_attach+0xf6/0x109 ? __device_attach_driver+0xbd/0xbd bus_for_each_dev+0x5b/0x88 driver_attach+0x19/0x1b ? __device_attach_driver+0xbd/0xbd bus_add_driver+0xf2/0x199 driver_register+0x8c/0xbe __pci_register_driver+0x5b/0x60 i915_register_pci_driver+0x19/0x1b i915_init+0x15/0x67 ? radeon_module_init+0x6a/0x6a do_one_initcall+0xce/0x21c ? rcu_read_lock_sched_held+0x35/0x6d ? trace_initcall_level+0x5f/0x99 kernel_init_freeable+0x1fb/0x247 ? rest_init+0x129/0x129 kernel_init+0x17/0xfd ret_from_fork+0x1c/0x28 Modules linked in: ---[ end trace 791dc89810d853da ]--- EIP: __i915_sw_fence_init+0x15/0x38 Code: 2b 3d 58 98 88 c1 74 05 e8 60 d9 58 00 8d 65 f4 5b 5e 5f 5d c3 3e 8d 74 26 00 55 89 e5 56 89 d6 53 85 d2 74 05 f6 c2 03 74 02 <0f> 0b 89 ca 8b 4d 08 89 c3 e8 48 94 ab ff 89 73 34 c7 43 38 01 00 EAX: c2508260 EBX: c2508000 ECX: c143de1e EDX: c09dfadd ESI: c09dfadd EDI: c45e7200 EBP: c26c9c68 ESP: c26c9c60 DS: 007b ES: 007b FS: 00d8 GS: SS: 0068 EFLAGS: 00010202 CR0: 80050033 CR2: CR3: 019e2000 CR4: 001506f0 Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b Kernel Offset: disabled ---[ end Kernel panic - not syncing: Attempted to kill init! exitcode=0x000b ]--- Attached is the dmesg and the config. I bisected it down to this commit: 3ffe82d701a4 ("drm/i915/xehp: handle new steering options") -- Steve mitest-config.gz Description: application/gzip mitest-dmesg.gz Description: application/gzip