Re: [Intel-gfx] [PATCH] drm/i915: fix header test with GCOV
On 2/21/20 9:49 PM, Masahiro Yamada wrote: > On Sat, Feb 22, 2020 at 2:25 PM Randy Dunlap wrote: >> >> On 2/21/20 8:53 PM, Masahiro Yamada wrote: >>> On Sat, Feb 22, 2020 at 1:43 PM Masahiro Yamada >>> wrote: Hi Jani, On Fri, Feb 21, 2020 at 7:54 PM Jani Nikula wrote: > > $(CC) with $(CFLAGS_GCOV) assumes the output filename with .gcno suffix > appended is writable. This is not the case when the output filename is > /dev/null: > > HDRTEST drivers/gpu/drm/i915/display/intel_frontbuffer.h > /dev/null:1:0: error: cannot open /dev/null.gcno > HDRTEST drivers/gpu/drm/i915/display/intel_ddi.h > /dev/null:1:0: error: cannot open /dev/null.gcno > make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: > drivers/gpu/drm/i915/display/intel_ddi.hdrtest] Error 1 > make[5]: *** Waiting for unfinished jobs > make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: > drivers/gpu/drm/i915/display/intel_frontbuffer.hdrtest] Error 1 > > Filter out $(CFLAGS_GVOC) from the header test $(c_flags) as they don't > make sense here anyway. Is GCOV the only case that produces a separate file? Could you also test CONFIG_DEBUG_INFO_SPLIT, please ? The GCC manual says this: -gsplit-dwarf Separate as much DWARF debugging information as possible into a separate output file with the extension .dwo. This option allows the build system to avoid linking files with debug information. To be useful, this option requires a debugger capable of reading .dwo files. >>> >>> >>> I just tested it. >>> >>> This is not a problem for header test >>> because cmd_hdrtest uses '-S' instead of '-c'. >>> >>> If '-c' were used, we would see a similar error. >>> >>> >>> So, gsplit-dwarf is OK. >> >> Yes, works for me also. >> >> (I think you have a faster build machine that I do. I began the build >> almost immediately after reading your email. :) > > > I use a reasonable PC for my development. > (core-i9 with 4 physical cores) > > > I just compiled under i915/ with this command: > > make drivers/gpu/drm/i915/ Good trick. I did a full build. -- ~Randy ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915: fix header test with GCOV
On 2/21/20 8:53 PM, Masahiro Yamada wrote: > On Sat, Feb 22, 2020 at 1:43 PM Masahiro Yamada wrote: >> >> Hi Jani, >> >> On Fri, Feb 21, 2020 at 7:54 PM Jani Nikula wrote: >>> >>> $(CC) with $(CFLAGS_GCOV) assumes the output filename with .gcno suffix >>> appended is writable. This is not the case when the output filename is >>> /dev/null: >>> >>> HDRTEST drivers/gpu/drm/i915/display/intel_frontbuffer.h >>> /dev/null:1:0: error: cannot open /dev/null.gcno >>> HDRTEST drivers/gpu/drm/i915/display/intel_ddi.h >>> /dev/null:1:0: error: cannot open /dev/null.gcno >>> make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: >>> drivers/gpu/drm/i915/display/intel_ddi.hdrtest] Error 1 >>> make[5]: *** Waiting for unfinished jobs >>> make[5]: *** [../drivers/gpu/drm/i915/Makefile:307: >>> drivers/gpu/drm/i915/display/intel_frontbuffer.hdrtest] Error 1 >>> >>> Filter out $(CFLAGS_GVOC) from the header test $(c_flags) as they don't >>> make sense here anyway. >> >> >> >> Is GCOV the only case that produces a separate file? >> >> Could you also test CONFIG_DEBUG_INFO_SPLIT, please ? >> >> >> The GCC manual says this: >> >> -gsplit-dwarf >> >>Separate as much DWARF debugging information as possible into a >> separate output >>file with the extension .dwo. This option allows the build system >> to avoid linking >>files with debug information. To be useful, this option requires a >> debugger >>capable of reading .dwo files. >> > > > I just tested it. > > This is not a problem for header test > because cmd_hdrtest uses '-S' instead of '-c'. > > If '-c' were used, we would see a similar error. > > > So, gsplit-dwarf is OK. Yes, works for me also. (I think you have a faster build machine that I do. I began the build almost immediately after reading your email. :) -- ~Randy ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for Security mitigation for Intel Gen7/7.5 HWs
== Series Details == Series: Security mitigation for Intel Gen7/7.5 HWs URL : https://patchwork.freedesktop.org/series/73686/ State : success == Summary == CI Bug Log - changes from CI_DRM_7969_full -> Patchwork_16639_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_16639_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_reuse@baggage: - shard-apl: [PASS][1] -> [TIMEOUT][2] ([fdo#112271]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-apl7/igt@gem_exec_re...@baggage.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-apl2/igt@gem_exec_re...@baggage.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#112146]) +3 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-iclb8/igt@gem_exec_sched...@preempt-other-chain-bsd.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-iclb4/igt@gem_exec_sched...@preempt-other-chain-bsd.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-apl: [PASS][5] -> [FAIL][6] ([i915#644]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-apl6/igt@gem_pp...@flink-and-close-vma-leak.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-apl1/igt@gem_pp...@flink-and-close-vma-leak.html * igt@gen9_exec_parse@allowed-all: - shard-kbl: [PASS][7] -> [DMESG-WARN][8] ([i915#716]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-kbl7/igt@gen9_exec_pa...@allowed-all.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-kbl2/igt@gen9_exec_pa...@allowed-all.html * igt@kms_cursor_crc@pipe-c-cursor-suspend: - shard-apl: [PASS][9] -> [DMESG-WARN][10] ([i915#180]) +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-apl2/igt@kms_cursor_...@pipe-c-cursor-suspend.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-apl6/igt@kms_cursor_...@pipe-c-cursor-suspend.html * igt@kms_flip@flip-vs-suspend-interruptible: - shard-kbl: [PASS][11] -> [DMESG-WARN][12] ([i915#180]) +2 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-kbl2/igt@kms_f...@flip-vs-suspend-interruptible.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-kbl7/igt@kms_f...@flip-vs-suspend-interruptible.html * igt@kms_plane@plane-panning-bottom-right-suspend-pipe-b-planes: - shard-skl: [PASS][13] -> [INCOMPLETE][14] ([i915#69]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-skl7/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-b-planes.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-skl10/igt@kms_pl...@plane-panning-bottom-right-suspend-pipe-b-planes.html * igt@kms_plane_alpha_blend@pipe-a-constant-alpha-min: - shard-skl: [PASS][15] -> [FAIL][16] ([fdo#108145]) +1 similar issue [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-skl3/igt@kms_plane_alpha_bl...@pipe-a-constant-alpha-min.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-skl4/igt@kms_plane_alpha_bl...@pipe-a-constant-alpha-min.html * igt@kms_plane_alpha_blend@pipe-c-coverage-7efc: - shard-skl: [PASS][17] -> [FAIL][18] ([fdo#108145] / [i915#265]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-skl3/igt@kms_plane_alpha_bl...@pipe-c-coverage-7efc.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-skl4/igt@kms_plane_alpha_bl...@pipe-c-coverage-7efc.html * igt@kms_plane_lowres@pipe-a-tiling-x: - shard-glk: [PASS][19] -> [FAIL][20] ([i915#899]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-glk1/igt@kms_plane_low...@pipe-a-tiling-x.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-glk3/igt@kms_plane_low...@pipe-a-tiling-x.html * igt@kms_psr@psr2_primary_mmap_cpu: - shard-iclb: [PASS][21] -> [SKIP][22] ([fdo#109441]) +3 similar issues [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-iclb2/igt@kms_psr@psr2_primary_mmap_cpu.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-iclb7/igt@kms_psr@psr2_primary_mmap_cpu.html * igt@perf_pmu@busy-no-semaphores-vcs1: - shard-iclb: [PASS][23] -> [SKIP][24] ([fdo#112080]) +11 similar issues [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7969/shard-iclb1/igt@perf_...@busy-no-semaphores-vcs1.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16639/shard-iclb6/igt@perf_...@busy-no-semaphores-vcs1.html * igt@prime_vgem@fence-wait-bsd2: - shard-iclb:
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/8] drm/i915/tgl: Extend Wa_1409825376 stepping
== Series Details == Series: series starting with [1/8] drm/i915/tgl: Extend Wa_1409825376 stepping URL : https://patchwork.freedesktop.org/series/73802/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16675 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/index.html Known issues Here are the changes found in Patchwork_16675 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-hsw-peppy: [PASS][1] -> [TIMEOUT][2] ([fdo#112271] / [i915#1084]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html - fi-byt-n2820: [PASS][3] -> [INCOMPLETE][4] ([i915#45]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-8700k: [PASS][5] -> [INCOMPLETE][6] ([i915#424]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][7] -> [DMESG-WARN][8] ([i915#585]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-icl-u2: [PASS][9] -> [FAIL][10] ([i915#217]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html * igt@prime_self_import@basic-with_fd_dup: - fi-tgl-y: [PASS][11] -> [DMESG-WARN][12] ([CI#94] / [i915#402]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@prime_self_import@basic-with_fd_dup.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-tgl-y/igt@prime_self_import@basic-with_fd_dup.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] +1 similar issue [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][15] ([i915#623]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [DMESG-WARN][19] ([i915#44]) -> [PASS][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16675/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424 [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44 [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 Participating hosts (48 -> 40)
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/tgl: Add Wa_1608008084
== Series Details == Series: drm/i915/tgl: Add Wa_1608008084 URL : https://patchwork.freedesktop.org/series/73801/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16674 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/index.html Known issues Here are the changes found in Patchwork_16674 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@contexts: - fi-byt-n2820: [PASS][1] -> [TIMEOUT][2] ([fdo#112271] / [i915#1084]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@contexts.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-byt-n2820/igt@gem_exec_paral...@contexts.html * igt@gem_exec_parallel@fds: - fi-byt-n2820: [PASS][3] -> [INCOMPLETE][4] ([i915#45]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@fds.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-byt-n2820/igt@gem_exec_paral...@fds.html * igt@i915_getparams_basic@basic-subslice-total: - fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@i915_getparams_ba...@basic-subslice-total.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-tgl-y/igt@i915_getparams_ba...@basic-subslice-total.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-8700k: [PASS][7] -> [INCOMPLETE][8] ([i915#424]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html * igt@i915_selftest@live_gt_contexts: - fi-bwr-2160:[PASS][9] -> [FAIL][10] ([i915#489]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-bwr-2160/igt@i915_selftest@live_gt_contexts.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-bwr-2160/igt@i915_selftest@live_gt_contexts.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][11] -> [DMESG-WARN][12] ([i915#585]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] +1 similar issue [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][15] ([i915#623]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][19] ([fdo#109315] / [i915#585]) -> [SKIP][20] ([fdo#109315]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16674/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#424]: https://gitlab.freedesktop.org/drm/intel/issues/424 [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45 [i915#489]: https://gitlab.freedesktop.org/drm/intel/issues/489 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 Participating hosts (48 -> 37) -- Additional (3): fi-byt-j1900 fi-skl-lmem fi-bsw-nick Missing(14): fi-ilk-m540 fi-bdw-5557u fi-hsw-4200u fi-hsw-peppy fi-skl-guc
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Push the GPU cancellation to the backend (rev2)
== Series Details == Series: drm/i915/gt: Push the GPU cancellation to the backend (rev2) URL : https://patchwork.freedesktop.org/series/73800/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16673 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16673 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16673, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16673: ### IGT changes ### Possible regressions * igt@i915_selftest@live_late_gt_pm: - fi-bsw-nick:NOTRUN -> [INCOMPLETE][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-bsw-nick/igt@i915_selftest@live_late_gt_pm.html Known issues Here are the changes found in Patchwork_16673 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@fds: - fi-byt-n2820: [PASS][2] -> [FAIL][3] ([i915#694]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@fds.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-byt-n2820/igt@gem_exec_paral...@fds.html * igt@gem_flink_basic@double-flink: - fi-tgl-y: [PASS][4] -> [DMESG-WARN][5] ([CI#94] / [i915#402]) +2 similar issues [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_flink_ba...@double-flink.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-tgl-y/igt@gem_flink_ba...@double-flink.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][6] -> [DMESG-WARN][7] ([i915#585]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - fi-tgl-y: [FAIL][8] ([CI#94]) -> [PASS][9] [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][10] ([CI#94] / [i915#402]) -> [PASS][11] +1 similar issue [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][12] ([i915#623]) -> [PASS][13] [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [DMESG-WARN][14] ([i915#44]) -> [PASS][15] [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][16] ([fdo#109315] / [i915#585]) -> [SKIP][17] ([fdo#109315]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][18] ([fdo#111407]) -> [FAIL][19] ([fdo#111096] / [i915#323]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16673/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]:
Re: [Intel-gfx] [PATCH 01/52] mm/sl[uo]b: export __kmalloc_track(_node)_caller
On Wed, 19 Feb 2020, Daniel Vetter wrote: > slab does this already, and I want to use this in a memory allocation > tracker in drm for stuff that's tied to the lifetime of a drm_device, > not the underlying struct device. Kinda like devres, but for drm. Would be better to export it without underscores. But ok. Acked-by: Christoph Lameter ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Avoid recursing onto active vma from the shrinker
== Series Details == Series: drm/i915: Avoid recursing onto active vma from the shrinker URL : https://patchwork.freedesktop.org/series/73799/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16672 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/index.html Known issues Here are the changes found in Patchwork_16672 that come from known issues: ### IGT changes ### Issues hit * igt@i915_selftest@live_execlists: - fi-icl-y: [PASS][1] -> [DMESG-FAIL][2] ([fdo#108569]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-y/igt@i915_selftest@live_execlists.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-icl-y/igt@i915_selftest@live_execlists.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([i915#585]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@prime_self_import@basic-llseek-bad: - fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@prime_self_imp...@basic-llseek-bad.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-tgl-y/igt@prime_self_imp...@basic-llseek-bad.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][7] ([CI#94] / [i915#402]) -> [PASS][8] +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][9] ([i915#623]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][11] ([fdo#109315] / [i915#585]) -> [SKIP][12] ([fdo#109315]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][13] ([fdo#111407]) -> [FAIL][14] ([fdo#111096] / [i915#323]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 Participating hosts (48 -> 37) -- Additional (2): fi-byt-j1900 fi-bsw-nick Missing(13): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-bwr-2160 fi-snb-2520m fi-ctg-p8600 fi-cfl-8109u fi-bdw-samus fi-byt-n2820 fi-byt-clapper fi-skl-6600u fi-snb-2600 Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7984 -> Patchwork_16672 CI-20190529: 20190529 CI_DRM_7984: ab1d770e389d9407be633b5afbe6859e0072ca9d @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5458: 5f7e4ae6a91ed2c104593b8abd5b71a6cc96fc10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_16672: 4a9e0b74f286c574d6940dd4b28e965c760f1949 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 4a9e0b74f286 drm/i915: Avoid recursing onto active vma from the shrinker == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16672/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/ehl: Donot reuse icl get and put dplls (rev2)
== Series Details == Series: drm/i915/ehl: Donot reuse icl get and put dplls (rev2) URL : https://patchwork.freedesktop.org/series/73681/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7968_full -> Patchwork_16638_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16638_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16638_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_16638_full: ### IGT changes ### Possible regressions * igt@runner@aborted: - shard-apl: NOTRUN -> [FAIL][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-apl6/igt@run...@aborted.html Known issues Here are the changes found in Patchwork_16638_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_balancer@hang: - shard-tglb: [PASS][2] -> [FAIL][3] ([i915#1277]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-tglb6/igt@gem_exec_balan...@hang.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-tglb3/igt@gem_exec_balan...@hang.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][4] -> [SKIP][5] ([fdo#110854]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-iclb1/igt@gem_exec_balan...@smoke.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-iclb8/igt@gem_exec_balan...@smoke.html * igt@gem_exec_schedule@pi-common-bsd: - shard-iclb: [PASS][6] -> [SKIP][7] ([i915#677]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-iclb3/igt@gem_exec_sched...@pi-common-bsd.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-iclb2/igt@gem_exec_sched...@pi-common-bsd.html * igt@gem_exec_schedule@pi-common-bsd1: - shard-iclb: [PASS][8] -> [SKIP][9] ([fdo#109276]) +23 similar issues [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-iclb2/igt@gem_exec_sched...@pi-common-bsd1.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-iclb5/igt@gem_exec_sched...@pi-common-bsd1.html * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [PASS][10] -> [SKIP][11] ([fdo#112146]) +3 similar issues [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-iclb6/igt@gem_exec_sched...@reorder-wide-bsd.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-iclb4/igt@gem_exec_sched...@reorder-wide-bsd.html * igt@gem_partial_pwrite_pread@writes-after-reads-snoop: - shard-hsw: [PASS][12] -> [FAIL][13] ([i915#694]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-hsw2/igt@gem_partial_pwrite_pr...@writes-after-reads-snoop.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-hsw8/igt@gem_partial_pwrite_pr...@writes-after-reads-snoop.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-glk: [PASS][14] -> [FAIL][15] ([i915#644]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-glk6/igt@gem_pp...@flink-and-close-vma-leak.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-glk7/igt@gem_pp...@flink-and-close-vma-leak.html - shard-apl: [PASS][16] -> [FAIL][17] ([i915#644]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-apl3/igt@gem_pp...@flink-and-close-vma-leak.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-apl7/igt@gem_pp...@flink-and-close-vma-leak.html * igt@i915_pm_rpm@system-suspend-devices: - shard-iclb: [PASS][18] -> [INCOMPLETE][19] ([i915#1185] / [i915#189]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-iclb4/igt@i915_pm_...@system-suspend-devices.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-iclb7/igt@i915_pm_...@system-suspend-devices.html * igt@kms_cursor_crc@pipe-b-cursor-256x85-sliding: - shard-hsw: [PASS][20] -> [INCOMPLETE][21] ([CI#80] / [i915#61]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-hsw1/igt@kms_cursor_...@pipe-b-cursor-256x85-sliding.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16638/shard-hsw2/igt@kms_cursor_...@pipe-b-cursor-256x85-sliding.html * igt@kms_cursor_legacy@flip-vs-cursor-atomic-transitions: - shard-skl: [PASS][22] -> [FAIL][23] ([IGT#5]) [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7968/shard-skl6/igt@kms_cursor_leg...@flip-vs-cursor-atomic-transitions.html [23]:
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/psr: Force PSR probe only after full initialization (rev7)
== Series Details == Series: drm/i915/psr: Force PSR probe only after full initialization (rev7) URL : https://patchwork.freedesktop.org/series/73436/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16671 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/index.html Known issues Here are the changes found in Patchwork_16671 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@contexts: - fi-byt-n2820: [PASS][1] -> [FAIL][2] ([i915#694]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@contexts.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-byt-n2820/igt@gem_exec_paral...@contexts.html * igt@gem_exec_parallel@fds: - fi-byt-n2820: [PASS][3] -> [TIMEOUT][4] ([fdo#112271] / [i915#1084]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@fds.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-byt-n2820/igt@gem_exec_paral...@fds.html * igt@i915_selftest@live_execlists: - fi-icl-y: [PASS][5] -> [INCOMPLETE][6] ([i915#140]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-y/igt@i915_selftest@live_execlists.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-icl-y/igt@i915_selftest@live_execlists.html * igt@i915_selftest@live_gtt: - fi-bxt-dsi: [PASS][7] -> [TIMEOUT][8] ([fdo#112271]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-bxt-dsi/igt@i915_selftest@live_gtt.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-bxt-dsi/igt@i915_selftest@live_gtt.html * igt@prime_self_import@basic-llseek-size: - fi-tgl-y: [PASS][9] -> [DMESG-WARN][10] ([CI#94] / [i915#402]) +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@prime_self_imp...@basic-llseek-size.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-tgl-y/igt@prime_self_imp...@basic-llseek-size.html Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - fi-tgl-y: [FAIL][11] ([CI#94]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] +1 similar issue [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][15] ([i915#623]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html Warnings * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [FAIL][18] ([fdo#111096] / [i915#323]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16671/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084 [i915#140]: https://gitlab.freedesktop.org/drm/intel/issues/140 [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694 Participating hosts (48 -> 42) -- Additional (4): fi-byt-j1900 fi-skl-lmem fi-gdg-551 fi-bsw-nick Missing(10): fi-ilk-m540 fi-tgl-u fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-bsw-kefka fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7984 -> Patchwork_16671 CI-20190529: 20190529 CI_DRM_7984: ab1d770e389d9407be633b5afbe6859e0072ca9d @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5458: 5f7e4ae6a91ed2c104593b8abd5b71a6cc96fc10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools
[Intel-gfx] ✓ Fi.CI.BAT: success for drm managed resources, v2
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16670 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/index.html Known issues Here are the changes found in Patchwork_16670 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-byt-n2820: [PASS][1] -> [INCOMPLETE][2] ([i915#45]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-8700k: [PASS][3] -> [TIMEOUT][4] ([fdo#112271]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-cfl-8700k/igt@i915_selftest@live_gem_contexts.html - fi-cml-s: [PASS][5] -> [DMESG-FAIL][6] ([i915#877]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cml-s/igt@i915_selftest@live_gem_contexts.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-cml-s/igt@i915_selftest@live_gem_contexts.html * igt@i915_selftest@live_gtt: - fi-skl-6600u: [PASS][7] -> [TIMEOUT][8] ([fdo#111732] / [fdo#112271]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-skl-6600u/igt@i915_selftest@live_gtt.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-skl-6600u/igt@i915_selftest@live_gtt.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][9] -> [DMESG-WARN][10] ([i915#585]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@kms_addfb_basic@addfb25-framebuffer-vs-set-tiling: - fi-tgl-y: [PASS][11] -> [DMESG-WARN][12] ([CI#94] / [i915#402]) +1 similar issue [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@kms_addfb_ba...@addfb25-framebuffer-vs-set-tiling.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-tgl-y/igt@kms_addfb_ba...@addfb25-framebuffer-vs-set-tiling.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] +1 similar issue [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][15] ([i915#623]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [DMESG-WARN][17] ([i915#44]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][19] ([fdo#109315] / [i915#585]) -> [SKIP][20] ([fdo#109315]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16670/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44 [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 [i915#877]: https://gitlab.freedesktop.org/drm/intel/issues/877 Participating hosts (48 -> 42) -- Additional (4): fi-byt-j1900 fi-skl-lmem fi-gdg-551 fi-bsw-nick Missing(10): fi-kbl-soraka fi-ilk-m540 fi-hsw-4200u fi-bdw-gvtdvm fi-byt-squawks fi-bsw-cyan fi-kbl-7500u fi-ctg-p8600 fi-byt-clapper
Re: [Intel-gfx] [PATCH] drm/i915/tgl: add Wa_1409085225, Wa_14010229206
Hi Matt, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-intel/for-linux-next] [also build test ERROR on drm-tip/drm-tip v5.6-rc2 next-20200221] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system. BTW, we also suggest to use '--base' option to specify the base tree in git format-patch, please see https://stackoverflow.com/a/37406982] url: https://github.com/0day-ci/linux/commits/Matt-Atwood/drm-i915-tgl-add-Wa_1409085225-Wa_14010229206/20200222-030001 base: git://anongit.freedesktop.org/drm-intel for-linux-next config: x86_64-randconfig-c002-20200221 (attached as .config) compiler: gcc-7 (Debian 7.5.0-5) 7.5.0 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 If you fix the issue, kindly add following tag Reported-by: kbuild test robot All errors (new ones prefixed by >>): drivers/gpu/drm/i915/gt/intel_workarounds.c: In function 'tgl_ctx_workarounds_init': >> drivers/gpu/drm/i915/gt/intel_workarounds.c:583:27: error: unused variable >> 'i915' [-Werror=unused-variable] struct drm_i915_private *i915 = engine->i915; ^~~~ Cyclomatic Complexity 5 include/linux/compiler.h:__read_once_size Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:constant_test_bit Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:variable_test_bit Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:ffs Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls Cyclomatic Complexity 1 arch/x86/include/asm/bitops.h:fls64 Cyclomatic Complexity 1 include/linux/log2.h:__ilog2_u64 Cyclomatic Complexity 3 include/linux/log2.h:is_power_of_2 Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_read Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_dec Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_fetch_add Cyclomatic Complexity 1 arch/x86/include/asm/atomic.h:arch_atomic_fetch_sub Cyclomatic Complexity 2 arch/x86/include/asm/atomic.h:arch_atomic_try_cmpxchg Cyclomatic Complexity 1 include/linux/err.h:ERR_PTR Cyclomatic Complexity 1 include/linux/err.h:PTR_ERR Cyclomatic Complexity 1 include/linux/err.h:ERR_CAST Cyclomatic Complexity 1 include/linux/spinlock.h:spinlock_check Cyclomatic Complexity 1 include/linux/spinlock.h:spin_unlock_irqrestore Cyclomatic Complexity 4 include/linux/rcupdate.h:rcu_read_lock Cyclomatic Complexity 1 arch/x86/include/asm/io.h:readl Cyclomatic Complexity 1 arch/x86/include/asm/io.h:writel Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_type Cyclomatic Complexity 28 include/linux/slab.h:kmalloc_index Cyclomatic Complexity 1 include/linux/slab.h:kmalloc_large Cyclomatic Complexity 4 include/linux/slab.h:kmalloc Cyclomatic Complexity 1 include/linux/kobject.h:kobject_name Cyclomatic Complexity 2 include/linux/device.h:dev_name Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_reg.h:i915_mmio_reg_offset Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_request.h:dma_fence_is_i915 Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_uncore.h:__raw_uncore_read32 Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_uncore.h:__raw_uncore_write32 Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_uncore.h:intel_uncore_read Cyclomatic Complexity 1 drivers/gpu/drm/i915/intel_uncore.h:intel_uncore_write Cyclomatic Complexity 2 drivers/gpu/drm/i915/intel_uncore.h:intel_uncore_rmw_fw Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_drv.h:__platform_mask_index Cyclomatic Complexity 1 drivers/gpu/drm/i915/i915_drv.h:__platform_mask_bit Cyclomatic Complexity 2 drivers/gpu/drm/i915/i915_drv.h:IS_PLATFORM Cyclomatic Complexity 1 drivers/gpu/drm/i915/gt/intel_workarounds.c:wa_init_start Cyclomatic Complexity 3 drivers/gpu/drm/i915/gt/intel_workarounds.c:is_nonpriv_flags_valid Cyclomatic Complexity 3 drivers/gpu/drm/i915/gt/intel_workarounds.c:mcr_range Cyclomatic Complexity 2 drivers/gpu/drm/i915/gt/selftest_workarounds.c:get_whitelist_reg Cyclomatic Complexity 2 drivers/gpu/drm/i915/gt/selftest_workarounds.c:reg_write Cyclomatic Complexity 5 drivers/gpu/drm/i915/gt/selftest_workarounds.c:wo_register Cyclomatic Complexity 2 drivers/gpu/drm/i915/gt/selftest_workarounds.c:ro_register Cyclomatic Complexity 3 drivers/gpu/drm/i915/gt/selftest_workarounds.c:whitelist_writable_count Cyclomatic Complexity 4 drivers/gpu/drm/i915/gt/selftest_workarounds.c:find_reg Cyclomatic Complexity 1 drivers/gpu/drm/i915/gt/selftest_workarounds.c:pardon_reg Cyclomatic Complexity 1 drivers/gpu/drm/i915/gt/selftest_workarounds.c:writeonly_reg Cyclomatic Complexity 1 include/linux/err.h:IS_ERR Cyclomatic Complexity 3 include/linux/err.h:IS_ERR_OR_NULL Cyclomatic Complexity 1 drivers/gpu/drm/i915/gem/i915_gem_object.h:i915_gem_object_ha
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm managed resources, v2
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: mm/sl[uo]b: export __kmalloc_track(_node)_caller Okay! ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm managed resources, v2
== Series Details == Series: drm managed resources, v2 URL : https://patchwork.freedesktop.org/series/73794/ State : warning == Summary == $ dim checkpatch origin/drm-tip d65ee94cba2c mm/sl[uo]b: export __kmalloc_track(_node)_caller -:58: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 28 lines checked 9c62343778a5 drm/i915: Don't clear drvdata in ->release -:35: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 9 lines checked 851da457d716 drm: add managed resources tied to drm_device -:62: ERROR:BAD_SIGN_OFF: Unrecognized email address: 'Neil Armstrong managed.final_kfree) + kfree(dev->managed.final_kfree); -:145: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(s), does MAINTAINERS need updating? #145: new file mode 100644 -:210: ERROR:POINTER_LOCATION: "foo * bar" should be "foo *bar" #210: FILE: drivers/gpu/drm/drm_managed.c:61: +static __always_inline struct drmres * alloc_dr(drmres_release_t release, -:238: CHECK:SPACING: No space is necessary after a cast #238: FILE: drivers/gpu/drm/drm_managed.c:89: + dr, dr->node.name, (unsigned long) dr->node.size); -:250: CHECK:SPACING: No space is necessary after a cast #250: FILE: drivers/gpu/drm/drm_managed.c:101: + dr, dr->node.name, (unsigned long) dr->node.size); -:256: CHECK:SPACING: No space is necessary after a cast #256: FILE: drivers/gpu/drm/drm_managed.c:107: + WARN_ON(dev < (struct drm_device *) parent); -:257: CHECK:SPACING: No space is necessary after a cast #257: FILE: drivers/gpu/drm/drm_managed.c:108: + WARN_ON(dev + 1 >= (struct drm_device *) (parent + ksize(parent))); -:269: ERROR:POINTER_LOCATION: "(foo*)" should be "(foo *)" #269: FILE: drivers/gpu/drm/drm_managed.c:120: + dr = alloc_dr(action, data ? sizeof(void*) : 0, -:342: CHECK:UNCOMMENTED_DEFINITION: spinlock_t definition without comment #342: FILE: include/drm/drm_device.h:79: + spinlock_t lock; -:354: WARNING:SPDX_LICENSE_TAG: Improper SPDX comment style for 'include/drm/drm_managed.h', please use '/*' instead #354: FILE: include/drm/drm_managed.h:1: +// SPDX-License-Identifier: GPL-2.0 -:354: WARNING:SPDX_LICENSE_TAG: Missing or malformed SPDX-License-Identifier tag in line 1 #354: FILE: include/drm/drm_managed.h:1: +// SPDX-License-Identifier: GPL-2.0 -:407: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 3 errors, 5 warnings, 5 checks, 297 lines checked 8133da7d60b2 drm: Set final_kfree in drm_dev_alloc -:15: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit 0a6659bdc5e8 ("drm/bochs: new driver")' #15: commit 0a6659bdc5e8221da99eebb176fd9591435e38de -:25: ERROR:GIT_COMMIT_ID: Please use git commit description style 'commit <12+ chars of sha1> ("")' - ie: 'commit b1df3a2b24a9 ("drm/virtio: add drm_driver.release callback.")' #25: commit b1df3a2b24a917f8853d43fe9683c0e360d2c33a -:42: WARNING:BAD_SIGN_OFF: Duplicate signature #42: Cc: Oleksandr Andrushchenko -:43: WARNING:BAD_SIGN_OFF: Duplicate signature #43: Cc: xen-de...@lists.xenproject.org -:85: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 2 errors, 3 warnings, 0 checks, 29 lines checked 3af3d1539d90 drm/mipi_dbi: Use drmm_add_final_kfree in all drivers -:188: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 111 lines checked 2fd445daeab3 drm/udl: Use drmm_add_final_kfree -:61: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 27 lines checked 671ab4640c01 drm/qxl: Use drmm_add_final_kfree -:46: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 22 lines checked 9c162f0327b0 drm/i915: Use drmm_add_final_kfree -:177: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 1 warnings, 0 checks, 114 lines checked dcaf642df1d3 drm/cirrus: Use drmm_add_final_kfree -:26: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:29: WARNING:OBSOLETE: drivers/gpu/drm/cirrus/cirrus.c is marked as 'obsolete' in the MAINTAINERS hierarchy. No unnecessary modifications please. -:73: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Daniel Vetter ' total: 0 errors, 3 warnings, 0 checks, 40 lines checked 2e6a7e985729 drm/v3d: Use drmm_add_final_kfree -:122: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal
[Intel-gfx] [PATCH 8/8] drm/i915/tgl: Extend Wa_1409767108 to B0
This Wa will also be needed by B0 stepping. BSpec: 52890 Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c index 8ba68ec6dc24..e9af21c08ff6 100644 --- a/drivers/gpu/drm/i915/display/intel_display_power.c +++ b/drivers/gpu/drm/i915/display/intel_display_power.c @@ -4982,7 +4982,7 @@ static void tgl_bw_buddy_init(struct drm_i915_private *dev_priv) const struct buddy_page_mask *table; int i; - if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_A0)) + if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_B0)) /* Wa_1409767108: tgl */ table = wa_1409767108_buddy_page_masks; else -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 1/8] drm/i915/tgl: Extend Wa_1409825376 stepping
This workaround is only fixed in C0 stepping to extend it to B0 too. BSpec: 52890 Cc: Radhakrishna Sripada Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/intel_pm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4305ccc4c683..57282b719ece 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1575,6 +1575,7 @@ IS_SUBPLATFORM(const struct drm_i915_private *i915, (IS_ICELAKE(p) && IS_REVID(p, since, until)) #define TGL_REVID_A0 0x0 +#define TGL_REVID_B0 0x1 #define IS_TGL_REVID(p, since, until) \ (IS_TIGERLAKE(p) && IS_REVID(p, since, until)) diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c index ffac0b862ca5..33149bccd117 100644 --- a/drivers/gpu/drm/i915/intel_pm.c +++ b/drivers/gpu/drm/i915/intel_pm.c @@ -6852,7 +6852,7 @@ static void tgl_init_clock_gating(struct drm_i915_private *dev_priv) I915_READ(POWERGATE_ENABLE) | vd_pg_enable); /* Wa_1409825376:tgl (pre-prod)*/ - if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_A0)) + if (IS_TGL_REVID(dev_priv, TGL_REVID_A0, TGL_REVID_B0)) I915_WRITE(GEN9_CLKGATE_DIS_3, I915_READ(GEN9_CLKGATE_DIS_3) | TGL_VRH_GATING_DIS); } -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 5/8] drm/i915/tgl: Extend Wa_1606931601 for all steppings
From: Anusha Srivatsa According to BSpec. Wa_1606931601 applies for all TGL steppings.This patch moves the WA implementation out of A0 only block of rcs_engine_wa_init(). The WA is has also been referred to by an alternate name Wa_1607090982. Bspec: 46045, 52890 Fixes: 3873fd1a43c7 ("drm/i915: Use engine wa list for Wa_1607090982") Cc: Mika Kuoppala Signed-off-by: Anusha Srivatsa Signed-off-by: José Roberto de Souza Reviewed-by: Matt Roper --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index e9619c493e6a..978a5b051ce9 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1365,11 +1365,6 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) GEN7_FF_THREAD_MODE, GEN12_FF_TESSELATION_DOP_GATE_DISABLE); - /* Wa_1606931601:tgl */ - wa_masked_en(wal, -GEN7_ROW_CHICKEN2, -GEN12_DISABLE_EARLY_READ); - /* * Wa_1409085225:tgl * Wa_14010229206:tgl @@ -1378,6 +1373,9 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) } if (IS_TIGERLAKE(i915)) { + /* Wa_1606931601:tgl */ + wa_masked_en(wal, GEN7_ROW_CHICKEN2, GEN12_DISABLE_EARLY_READ); + /* Wa_1409804808:tgl */ wa_masked_en(wal, GEN7_ROW_CHICKEN2, GEN12_PUSH_CONSTANT_DEREFERENCE_HOLD_DISABLE); -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 4/8] drm/i915/tgl: Add Wa_1409085225, Wa_14010229206
From: Matt Atwood Disable Push Constant buffer addition for TGL. v2: typos, add additional Wa reference v3: use REG_BIT macro, move to rcs_engine_wa_init, clean up commit message. Bspec: 52890 Cc: Rafael Antognolli Cc: Matt Roper Signed-off-by: Matt Atwood Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index fbed5bdc9e04..e9619c493e6a 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1369,6 +1369,12 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) wa_masked_en(wal, GEN7_ROW_CHICKEN2, GEN12_DISABLE_EARLY_READ); + + /* +* Wa_1409085225:tgl +* Wa_14010229206:tgl +*/ + wa_masked_en(wal, GEN9_ROW_CHICKEN4, GEN12_DISABLE_TDL_PUSH); } if (IS_TIGERLAKE(i915)) { diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index 49872a1dc7a4..78164fa9e574 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -9159,6 +9159,9 @@ enum { #define PUSH_CONSTANT_DEREF_DISABLE (1 << 8) #define GEN11_TDL_CLOCK_GATING_FIX_DISABLE (1 << 1) +#define GEN9_ROW_CHICKEN4 _MMIO(0xe48c) +#define GEN12_DISABLE_TDL_PUSH REG_BIT(9) + #define HSW_ROW_CHICKEN3 _MMIO(0xe49c) #define HSW_ROW_CHICKEN3_L3_GLOBAL_ATOMICS_DISABLE(1 << 6) -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 2/8] drm/i915/tgl: Implement Wa_1409804808
This workaround the CS not done issue on PIPE_CONTROL. BSpec: 52890 BSpec: 46218 Cc: Matt Roper Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 6 ++ drivers/gpu/drm/i915/i915_reg.h | 5 +++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 887e0dc701f7..57a5a39ee902 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1367,6 +1367,12 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) GEN12_DISABLE_EARLY_READ); } + if (IS_TIGERLAKE(i915)) { + /* Wa_1409804808:tgl */ + wa_masked_en(wal, GEN7_ROW_CHICKEN2, +GEN12_PUSH_CONSTANT_DEREFERENCE_HOLD_DISABLE); + } + if (IS_GEN(i915, 11)) { /* This is not an Wa. Enable for better image quality */ wa_masked_en(wal, diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index f45b5e86ec63..cfc238ffd4ae 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -9149,8 +9149,9 @@ enum { #define THROTTLE_12_5(7 << 2) #define DISABLE_EARLY_EOT(1 << 1) -#define GEN7_ROW_CHICKEN2 _MMIO(0xe4f4) -#define GEN12_DISABLE_EARLY_READ BIT(14) +#define GEN7_ROW_CHICKEN2 _MMIO(0xe4f4) +#define GEN12_DISABLE_EARLY_READ BIT(14) +#define GEN12_PUSH_CONSTANT_DEREFERENCE_HOLD_DISABLE BIT(8) #define GEN7_ROW_CHICKEN2_GT2 _MMIO(0xf4f4) #define DOP_CLOCK_GATING_DISABLE (1 << 0) -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 3/8] drm/i915/tgl: Implement Wa_1806527549
This will whitelist the HIZ_CHICKEN register so mesa can disable the optimizations and void hang when using D16_UNORM. Cc: Matt Roper Cc: Rafael Antognolli Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 4 drivers/gpu/drm/i915/i915_reg.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 57a5a39ee902..fbed5bdc9e04 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -598,6 +598,10 @@ static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, val, IS_TGL_REVID(engine->i915, TGL_REVID_A0, TGL_REVID_A0) ? 0 : FF_MODE2_TDS_TIMER_MASK); + + /* Wa_1806527549:tgl */ + WA_SET_BIT_MASKED(HIZ_CHICKEN, + GEN12_HZ_DEPTH_TEST_LE_GE_OPTIMIZATION_DISABLE); } static void diff --git a/drivers/gpu/drm/i915/i915_reg.h b/drivers/gpu/drm/i915/i915_reg.h index cfc238ffd4ae..49872a1dc7a4 100644 --- a/drivers/gpu/drm/i915/i915_reg.h +++ b/drivers/gpu/drm/i915/i915_reg.h @@ -7843,6 +7843,7 @@ enum { #define HIZ_CHICKEN_MMIO(0x7018) # define CHV_HZ_8X8_MODE_IN_1X (1 << 15) +# define GEN12_HZ_DEPTH_TEST_LE_GE_OPTIMIZATION_DISABLE(1 << 13) # define BDW_HIZ_POWER_COMPILER_CLOCK_GATING_DISABLE (1 << 3) #define GEN9_SLICE_COMMON_ECO_CHICKEN0 _MMIO(0x7308) -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 7/8] drm/i915/tgl: Add note about Wa_1607063988
This issue workaround in Wa_1607063988 has the same fix as Wa_1607138336, so just adding a note in the code. Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index bc5025c81c4f..cc3fbe3dfd9f 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1339,7 +1339,10 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) GEN9_CS_DEBUG_MODE1, FF_DOP_CLOCK_GATE_DISABLE); - /* Wa_1607138336:tgl */ + /* +* Wa_1607138336:tgl +* Wa_1607063988:tgl +*/ wa_write_or(wal, GEN9_CTX_PREEMPT_REG, GEN12_DISABLE_POSH_BUSY_FF_DOP_CG); -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 6/8] drm/i915/tgl: Add note to Wa_1607297627
Add note about the confliting information in BSpec about this WA. BSpec: 52890 Signed-off-by: José Roberto de Souza --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 978a5b051ce9..bc5025c81c4f 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -1344,9 +1344,13 @@ rcs_engine_wa_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) GEN9_CTX_PREEMPT_REG, GEN12_DISABLE_POSH_BUSY_FF_DOP_CG); - /* Wa_1607030317:tgl */ - /* Wa_1607186500:tgl */ - /* Wa_1607297627:tgl */ + /* +* Wa_1607030317:tgl +* Wa_1607186500:tgl +* Wa_1607297627:tgl there is 3 entries for this WA on BSpec, 2 +* of then says it is fixed on B0 the other one says it is +* permanent +*/ wa_masked_en(wal, GEN6_RC_SLEEP_PSMI_CONTROL, GEN12_WAIT_FOR_EVENT_POWER_DOWN_DISABLE | -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/selftests: Verify LRC isolation
== Series Details == Series: drm/i915/selftests: Verify LRC isolation URL : https://patchwork.freedesktop.org/series/73788/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16669 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16669 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16669, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16669: ### IGT changes ### Possible regressions * igt@i915_selftest@live_gt_lrc: - fi-icl-y: [PASS][1] -> [DMESG-FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-y/igt@i915_selftest@live_gt_lrc.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-y/igt@i915_selftest@live_gt_lrc.html - fi-icl-u3: [PASS][3] -> [DMESG-FAIL][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_gt_lrc.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-u3/igt@i915_selftest@live_gt_lrc.html - fi-icl-guc: [PASS][5] -> [DMESG-FAIL][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-guc/igt@i915_selftest@live_gt_lrc.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-guc/igt@i915_selftest@live_gt_lrc.html - fi-icl-u2: [PASS][7] -> [DMESG-FAIL][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u2/igt@i915_selftest@live_gt_lrc.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-u2/igt@i915_selftest@live_gt_lrc.html - fi-icl-dsi: [PASS][9] -> [DMESG-FAIL][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-dsi/igt@i915_selftest@live_gt_lrc.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-dsi/igt@i915_selftest@live_gt_lrc.html Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_selftest@live_gt_lrc: - {fi-ehl-1}: [PASS][11] -> [DMESG-FAIL][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-ehl-1/igt@i915_selftest@live_gt_lrc.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-ehl-1/igt@i915_selftest@live_gt_lrc.html Known issues Here are the changes found in Patchwork_16669 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-hsw-peppy: [PASS][13] -> [INCOMPLETE][14] ([i915#694] / [i915#816]) [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html - fi-byt-n2820: [PASS][15] -> [TIMEOUT][16] ([fdo#112271] / [i915#1084] / [i915#816]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@gem_exec_parallel@contexts: - fi-byt-n2820: [PASS][17] -> [FAIL][18] ([i915#694]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@contexts.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-byt-n2820/igt@gem_exec_paral...@contexts.html * igt@i915_getparams_basic@basic-subslice-total: - fi-tgl-y: [PASS][19] -> [DMESG-WARN][20] ([CI#94] / [i915#402]) +1 similar issue [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@i915_getparams_ba...@basic-subslice-total.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-tgl-y/igt@i915_getparams_ba...@basic-subslice-total.html * igt@i915_selftest@live_gtt: - fi-bxt-dsi: [PASS][21] -> [TIMEOUT][22] ([fdo#112271]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-bxt-dsi/igt@i915_selftest@live_gtt.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-bxt-dsi/igt@i915_selftest@live_gtt.html * igt@i915_selftest@live_hangcheck: - fi-icl-guc: [PASS][23] -> [INCOMPLETE][24] ([fdo#108569]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-guc/igt@i915_selftest@live_hangcheck.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16669/fi-icl-guc/igt@i915_selftest@live_hangcheck.html *
Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084
On Fri, Feb 21, 2020 at 04:36:53PM -0800, Jose Souza wrote: + CCing people involved in the patch fixed. On Fri, 2020-02-21 at 16:28 -0800, Lucas De Marchi wrote: Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 register. We can't read it back either from CPU or GPU. Since the other bits should be 0, recommendation to handle Wa_1604555607 is to actually just write the timer value. Do a write only and don't try to read it, neither before or after the WA is applied. Fixes: ff690b2111ba ("drm/i915/tgl: Implement Wa_1604555607") Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++- -- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 887e0dc701f7..0d76e1d6ec87 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -580,24 +580,22 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) { - u32 val; - /* Wa_1409142259:tgl */ WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3, GEN12_DISABLE_CPS_AWARE_COLOR_PIPE); - /* Wa_1604555607:tgl */ - val = intel_uncore_read(engine->uncore, FF_MODE2); - val &= ~FF_MODE2_TDS_TIMER_MASK; - val |= FF_MODE2_TDS_TIMER_128; /* -* FIXME: FF_MODE2 register is not readable till TGL B0. We can -* enable verification of WA from the later steppings, which enables -* the read of FF_MODE2. +* Wa_1604555607:gen12 +* FF_MODE2 register is not readable till TGL B0, either by CPU or GPU. The line above could be removed as the comments above explain it better, also BSpec don't say that it will be fixed in B0. 1604555607 was documented to be fixed in B0. Just saw it's not anymore. With that: Reviewed-by: José Roberto de Souza thanks Lucas De Marchi +* +* Wa_1608008084:gen12 +* FF_MODE2 register will return the wrong value when read. The default + * value for this register is zero for all fields and there are no bit +* masks. So instead of doing a RMW we should just write the TDS timer +* value for Wa_1604555607. */ - wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, val, - IS_TGL_REVID(engine->i915, TGL_REVID_A0, TGL_REVID_A0) ? 0 : - FF_MODE2_TDS_TIMER_MASK); + wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, + FF_MODE2_TDS_TIMER_128, 0); } static void ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915/selftests: Verify LRC isolation
== Series Details == Series: drm/i915/selftests: Verify LRC isolation URL : https://patchwork.freedesktop.org/series/73788/ State : warning == Summary == $ dim checkpatch origin/drm-tip 14585105911e drm/i915/selftests: Verify LRC isolation -:123: CHECK:PARENTHESIS_ALIGNMENT: Alignment should match open parenthesis #123: FILE: drivers/gpu/drm/i915/gt/selftest_lrc.c:4853: +record_registers(struct intel_context *ce, + struct i915_vma *before, -:432: WARNING:MEMORY_BARRIER: memory barrier without comment #432: FILE: drivers/gpu/drm/i915/gt/selftest_lrc.c:5162: + wmb(); total: 0 errors, 1 warnings, 1 checks, 537 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight()
== Series Details == Series: series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight() URL : https://patchwork.freedesktop.org/series/73784/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16668 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/index.html Known issues Here are the changes found in Patchwork_16668 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-byt-n2820: [PASS][1] -> [INCOMPLETE][2] ([i915#45]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([i915#585]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@kms_addfb_basic@bad-pitch-0: - fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) +1 similar issue [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@kms_addfb_ba...@bad-pitch-0.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-tgl-y/igt@kms_addfb_ba...@bad-pitch-0.html * igt@kms_chamelium@hdmi-crc-fast: - fi-icl-u2: [PASS][7] -> [FAIL][8] ([fdo#109635] / [i915#217]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u2/igt@kms_chamel...@hdmi-crc-fast.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-icl-u2/igt@kms_chamel...@hdmi-crc-fast.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][9] ([CI#94] / [i915#402]) -> [PASS][10] +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][11] ([i915#623]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [DMESG-WARN][13] ([i915#44]) -> [PASS][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][15] ([fdo#109315] / [i915#585]) -> [SKIP][16] ([fdo#109315]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][17] ([fdo#111407]) -> [FAIL][18] ([fdo#111096] / [i915#323]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16668/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217 [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#44]: https://gitlab.freedesktop.org/drm/intel/issues/44 [i915#45]: https://gitlab.freedesktop.org/drm/intel/issues/45 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 Participating hosts (48 -> 45) -- Additional (4): fi-byt-j1900 fi-skl-lmem fi-gdg-551 fi-bsw-nick Missing(7): fi-ilk-m540 fi-hsw-4200u fi-byt-squawks fi-bsw-cyan fi-ctg-p8600 fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7984 -> Patchwork_16668 CI-20190529: 20190529 CI_DRM_7984:
[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2)
== Series Details == Series: series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2) URL : https://patchwork.freedesktop.org/series/73665/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16667 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/index.html Known issues Here are the changes found in Patchwork_16667 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@fds: - fi-byt-n2820: [PASS][1] -> [FAIL][2] ([i915#694]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@fds.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-byt-n2820/igt@gem_exec_paral...@fds.html * igt@i915_selftest@live_gem_contexts: - fi-hsw-peppy: [PASS][3] -> [DMESG-FAIL][4] ([i915#722]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html - fi-byt-n2820: [PASS][5] -> [DMESG-FAIL][6] ([i915#1052]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-byt-n2820/igt@i915_selftest@live_gem_contexts.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][7] -> [DMESG-WARN][8] ([i915#585]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-icl-u2: [PASS][9] -> [FAIL][10] ([i915#217]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-icl-u2/igt@kms_chamel...@hdmi-hpd-fast.html * igt@prime_self_import@basic-with_fd_dup: - fi-tgl-y: [PASS][11] -> [DMESG-WARN][12] ([CI#94] / [i915#402]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@prime_self_import@basic-with_fd_dup.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-tgl-y/igt@prime_self_import@basic-with_fd_dup.html Possible fixes * igt@vgem_basic@dmabuf-export: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@vgem_ba...@dmabuf-export.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-tgl-y/igt@vgem_ba...@dmabuf-export.html Warnings * igt@amdgpu/amd_prime@amd-to-i915: - fi-icl-u3: [SKIP][15] ([fdo#109315] / [i915#585]) -> [SKIP][16] ([fdo#109315]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-icl-u3/igt@amdgpu/amd_pr...@amd-to-i915.html * igt@i915_selftest@live_gt_lrc: - fi-tgl-y: [DMESG-FAIL][17] ([CI#94] / [i915#1233]) -> [INCOMPLETE][18] ([CI#94] / [i915#1233]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@i915_selftest@live_gt_lrc.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-tgl-y/igt@i915_selftest@live_gt_lrc.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][19] ([fdo#111407]) -> [FAIL][20] ([fdo#111096] / [i915#323]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16667/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109315]: https://bugs.freedesktop.org/show_bug.cgi?id=109315 [fdo#111096]: https://bugs.freedesktop.org/show_bug.cgi?id=111096 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [i915#1052]: https://gitlab.freedesktop.org/drm/intel/issues/1052 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#217]: https://gitlab.freedesktop.org/drm/intel/issues/217 [i915#323]: https://gitlab.freedesktop.org/drm/intel/issues/323 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694 [i915#722]:
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight()
== Series Details == Series: series starting with [resend,1/2] drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight() URL : https://patchwork.freedesktop.org/series/73784/ State : warning == Summary == $ dim checkpatch origin/drm-tip 8beab9ed3934 drm/i915: panel: Use intel_panel_compute_brightness() from pwm_setup_backlight() dc2359f4d6a7 drm/i915: Add invert-brightness quirk for Thundersoft TST178 tablet -:35: WARNING:LONG_LINE: line over 100 characters #35: FILE: drivers/gpu/drm/i915/display/intel_quirks.c:91: + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "To be filled by O.E.M."), total: 0 errors, 1 warnings, 0 checks, 16 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v4 00/14] drm/i915: Add support for HDCP 1.4 over MST connectors
On Tue, 2020-02-18 at 17:02 -0500, Sean Paul wrote: > From: Sean Paul > > Hey all, > Back with a v4. Rebased on latest drm-tip. > > Biggest change was adding the QUERY_STREAM_ENCRYPTION_STATUS check > which > ensures not only the link to the first branch is encrypted, but also > that the channel iteself is also protected. > > Sean > nit, i915_display_info debugfs for intel_dp_mst_info() doesn't show "HDCP version: " Juston > Sean Paul (14): > drm/i915: Fix sha_text population code > drm/i915: Clear the repeater bit on HDCP disable > drm/i915: WARN if HDCP signalling is enabled upon disable > drm/i915: Intercept Aksv writes in the aux hooks > drm/i915: Use the cpu_transcoder in intel_hdcp to toggle HDCP > signalling > drm/i915: Factor out hdcp->value assignments > drm/i915: Protect workers against disappearing connectors > drm/i915: Don't fully disable HDCP on a port if multiple pipes are > using it > drm/i915: Support DP MST in enc_to_dig_port() function > drm/i915: Use ddi_update_pipe in intel_dp_mst > drm/i915: Factor out HDCP shim functions from dp for use by dp_mst > drm/i915: Add connector to hdcp_shim->check_link() > drm/mst: Add support for QUERY_STREAM_ENCRYPTION_STATUS MST > sideband > message > drm/i915: Add HDCP 1.4 support for MST connectors > > drivers/gpu/drm/drm_dp_mst_topology.c | 117 +++ > drivers/gpu/drm/i915/Makefile | 1 + > drivers/gpu/drm/i915/display/intel_ddi.c | 26 +- > drivers/gpu/drm/i915/display/intel_ddi.h | 2 + > .../drm/i915/display/intel_display_types.h| 30 +- > drivers/gpu/drm/i915/display/intel_dp.c | 620 +-- > drivers/gpu/drm/i915/display/intel_dp.h | 7 + > drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 705 > ++ > drivers/gpu/drm/i915/display/intel_dp_mst.c | 15 + > drivers/gpu/drm/i915/display/intel_hdcp.c | 199 +++-- > drivers/gpu/drm/i915/display/intel_hdmi.c | 23 +- > include/drm/drm_dp_helper.h | 3 + > include/drm/drm_dp_mst_helper.h | 44 ++ > include/drm/drm_hdcp.h| 3 + > 14 files changed, 1127 insertions(+), 668 deletions(-) > create mode 100644 drivers/gpu/drm/i915/display/intel_dp_hdcp.c > ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2)
== Series Details == Series: series starting with [1/7] dma-buf: add dynamic DMA-buf handling v15 (rev2) URL : https://patchwork.freedesktop.org/series/73665/ State : warning == Summary == $ dim checkpatch origin/drm-tip bbe4554189c9 dma-buf: add dynamic DMA-buf handling v15 -:10: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #10: called when the importer doesn't implement dynamic handling, move notification -:452: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 2 warnings, 0 checks, 374 lines checked 8f2764b25c54 drm/ttm: remove the backing store if no placement is given -:36: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 18 lines checked f2a3730c8546 drm/amdgpu: use allowed_domains for exported DMA-bufs -:36: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 17 lines checked 05e75c342e5c drm/amdgpu: add amdgpu_dma_buf_pin/unpin v2 -:125: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 97 lines checked a6fd0e83a07b drm/amdgpu: implement amdgpu_gem_prime_move_notify v2 -:123: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 97 lines checked 78ca4fbdb56b dma-buf: drop dynamic_mapping flag -:97: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 65 lines checked 2360e467ebfb dma-buf: make move_notify mandatory if importer_ops are provided -:72: WARNING:NO_AUTHOR_SIGN_OFF: Missing Signed-off-by: line by nominal patch author 'Christian König ' total: 0 errors, 1 warnings, 0 checks, 48 lines checked ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084
+ CCing people involved in the patch fixed. On Fri, 2020-02-21 at 16:28 -0800, Lucas De Marchi wrote: > Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 > register. We can't read it back either from CPU or GPU. Since the > other > bits should be 0, recommendation to handle Wa_1604555607 is to > actually > just write the timer value. > > Do a write only and don't try to read it, neither before or after > the WA is applied. > > Fixes: ff690b2111ba ("drm/i915/tgl: Implement Wa_1604555607") > Signed-off-by: Lucas De Marchi > --- > drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++- > -- > 1 file changed, 10 insertions(+), 12 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c > b/drivers/gpu/drm/i915/gt/intel_workarounds.c > index 887e0dc701f7..0d76e1d6ec87 100644 > --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c > +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c > @@ -580,24 +580,22 @@ static void icl_ctx_workarounds_init(struct > intel_engine_cs *engine, > static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, >struct i915_wa_list *wal) > { > - u32 val; > - > /* Wa_1409142259:tgl */ > WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3, > GEN12_DISABLE_CPS_AWARE_COLOR_PIPE); > > - /* Wa_1604555607:tgl */ > - val = intel_uncore_read(engine->uncore, FF_MODE2); > - val &= ~FF_MODE2_TDS_TIMER_MASK; > - val |= FF_MODE2_TDS_TIMER_128; > /* > - * FIXME: FF_MODE2 register is not readable till TGL B0. We can > - * enable verification of WA from the later steppings, which > enables > - * the read of FF_MODE2. > + * Wa_1604555607:gen12 > + * FF_MODE2 register is not readable till TGL B0, either by CPU > or GPU. The line above could be removed as the comments above explain it better, also BSpec don't say that it will be fixed in B0. With that: Reviewed-by: José Roberto de Souza > + * > + * Wa_1608008084:gen12 > + * FF_MODE2 register will return the wrong value when read. The > default > + * value for this register is zero for all fields and there are > no bit > + * masks. So instead of doing a RMW we should just write the > TDS timer > + * value for Wa_1604555607. >*/ > - wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, val, > -IS_TGL_REVID(engine->i915, TGL_REVID_A0, TGL_REVID_A0) ? > 0 : > - FF_MODE2_TDS_TIMER_MASK); > + wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, > +FF_MODE2_TDS_TIMER_128, 0); > } > > static void ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend
Hi Chris, On Fri, Feb 21, 2020 at 11:51:35PM +, Chris Wilson wrote: > Upon unregistering the user interface, we mark the GPU as wedged to > ensure we push no new work to the GPU, and to flush all current work > from the GPU. Move this call to the GT backend. > > Signed-off-by: Chris Wilson > Cc: Andi Shyti Reviewed-by: Andi Shyti Thanks, Chris, Andi ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Correctly terminate connector iteration
== Series Details == Series: drm/i915: Correctly terminate connector iteration URL : https://patchwork.freedesktop.org/series/73779/ State : success == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_1 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/index.html Known issues Here are the changes found in Patchwork_1 that come from known issues: ### IGT changes ### Issues hit * igt@gem_exec_parallel@contexts: - fi-byt-n2820: [PASS][1] -> [FAIL][2] ([i915#694]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_exec_paral...@contexts.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-byt-n2820/igt@gem_exec_paral...@contexts.html * igt@i915_selftest@live_sanitycheck: - fi-icl-u3: [PASS][3] -> [DMESG-WARN][4] ([i915#585]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-icl-u3/igt@i915_selftest@live_sanitycheck.html * igt@vgem_basic@unload: - fi-tgl-y: [PASS][5] -> [DMESG-WARN][6] ([CI#94] / [i915#402]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@vgem_ba...@unload.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-tgl-y/igt@vgem_ba...@unload.html Possible fixes * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][7] ([i915#623]) -> [PASS][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][9] ([fdo#111407]) -> [PASS][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html * igt@vgem_basic@dmabuf-export: - fi-tgl-y: [DMESG-WARN][11] ([CI#94] / [i915#402]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@vgem_ba...@dmabuf-export.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/fi-tgl-y/igt@vgem_ba...@dmabuf-export.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#585]: https://gitlab.freedesktop.org/drm/intel/issues/585 [i915#623]: https://gitlab.freedesktop.org/drm/intel/issues/623 [i915#694]: https://gitlab.freedesktop.org/drm/intel/issues/694 Participating hosts (48 -> 41) -- Additional (5): fi-byt-j1900 fi-gdg-551 fi-skl-lmem fi-kbl-7560u fi-bsw-nick Missing(12): fi-kbl-soraka fi-ilk-m540 fi-bsw-n3050 fi-hsw-4200u fi-hsw-peppy fi-byt-squawks fi-bsw-cyan fi-snb-2520m fi-ctg-p8600 fi-bsw-kefka fi-byt-clapper fi-bdw-samus Build changes - * CI: CI-20190529 -> None * Linux: CI_DRM_7984 -> Patchwork_1 CI-20190529: 20190529 CI_DRM_7984: ab1d770e389d9407be633b5afbe6859e0072ca9d @ git://anongit.freedesktop.org/gfx-ci/linux IGT_5458: 5f7e4ae6a91ed2c104593b8abd5b71a6cc96fc10 @ git://anongit.freedesktop.org/xorg/app/intel-gpu-tools Patchwork_1: 8b3ecb1c50c0d1fb615622b246093f202f0d1b08 @ git://anongit.freedesktop.org/gfx-ci/linux == Linux commits == 8b3ecb1c50c0 drm/i915: Correctly terminate connector iteration == Logs == For more details see: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_1/index.html ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH] drm/i915/tgl: Add Wa_1608008084
Wa_1608008084 is an additional WA that applies to writes on FF_MODE2 register. We can't read it back either from CPU or GPU. Since the other bits should be 0, recommendation to handle Wa_1604555607 is to actually just write the timer value. Do a write only and don't try to read it, neither before or after the WA is applied. Fixes: ff690b2111ba ("drm/i915/tgl: Implement Wa_1604555607") Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 22 ++--- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workarounds.c b/drivers/gpu/drm/i915/gt/intel_workarounds.c index 887e0dc701f7..0d76e1d6ec87 100644 --- a/drivers/gpu/drm/i915/gt/intel_workarounds.c +++ b/drivers/gpu/drm/i915/gt/intel_workarounds.c @@ -580,24 +580,22 @@ static void icl_ctx_workarounds_init(struct intel_engine_cs *engine, static void tgl_ctx_workarounds_init(struct intel_engine_cs *engine, struct i915_wa_list *wal) { - u32 val; - /* Wa_1409142259:tgl */ WA_SET_BIT_MASKED(GEN11_COMMON_SLICE_CHICKEN3, GEN12_DISABLE_CPS_AWARE_COLOR_PIPE); - /* Wa_1604555607:tgl */ - val = intel_uncore_read(engine->uncore, FF_MODE2); - val &= ~FF_MODE2_TDS_TIMER_MASK; - val |= FF_MODE2_TDS_TIMER_128; /* -* FIXME: FF_MODE2 register is not readable till TGL B0. We can -* enable verification of WA from the later steppings, which enables -* the read of FF_MODE2. +* Wa_1604555607:gen12 +* FF_MODE2 register is not readable till TGL B0, either by CPU or GPU. +* +* Wa_1608008084:gen12 +* FF_MODE2 register will return the wrong value when read. The default +* value for this register is zero for all fields and there are no bit +* masks. So instead of doing a RMW we should just write the TDS timer +* value for Wa_1604555607. */ - wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, val, - IS_TGL_REVID(engine->i915, TGL_REVID_A0, TGL_REVID_A0) ? 0 : - FF_MODE2_TDS_TIMER_MASK); + wa_add(wal, FF_MODE2, FF_MODE2_TDS_TIMER_MASK, + FF_MODE2_TDS_TIMER_128, 0); } static void -- 2.24.0 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/huc: Fix error reported by I915_PARAM_HUC_STATUS (rev2)
== Series Details == Series: drm/i915/huc: Fix error reported by I915_PARAM_HUC_STATUS (rev2) URL : https://patchwork.freedesktop.org/series/72419/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7984 -> Patchwork_16665 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16665 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16665, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16665: ### IGT changes ### Possible regressions * igt@i915_selftest@live_gt_lrc: - fi-kbl-x1275: [PASS][1] -> [DMESG-FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-x1275/igt@i915_selftest@live_gt_lrc.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-kbl-x1275/igt@i915_selftest@live_gt_lrc.html Known issues Here are the changes found in Patchwork_16665 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-hsw-peppy: [PASS][3] -> [TIMEOUT][4] ([fdo#112271] / [i915#1084]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html - fi-byt-n2820: [PASS][5] -> [INCOMPLETE][6] ([i915#45]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@gem_flink_basic@bad-flink: - fi-tgl-y: [PASS][7] -> [DMESG-WARN][8] ([CI#94] / [i915#402]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_flink_ba...@bad-flink.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-tgl-y/igt@gem_flink_ba...@bad-flink.html * igt@kms_chamelium@dp-edid-read: - fi-icl-u2: [PASS][9] -> [FAIL][10] ([fdo#109635] / [i915#217]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-icl-u2/igt@kms_chamel...@dp-edid-read.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-icl-u2/igt@kms_chamel...@dp-edid-read.html Possible fixes * igt@gem_exec_suspend@basic-s4-devices: - fi-tgl-y: [FAIL][11] ([CI#94]) -> [PASS][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-tgl-y/igt@gem_exec_susp...@basic-s4-devices.html * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][13] ([CI#94] / [i915#402]) -> [PASS][14] +1 similar issue [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@gem_mmap_...@basic.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-tgl-y/igt@gem_mmap_...@basic.html * igt@i915_selftest@live_gem_contexts: - fi-cfl-guc: [DMESG-FAIL][15] ([i915#623]) -> [PASS][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-cfl-guc/igt@i915_selftest@live_gem_contexts.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [DMESG-WARN][17] ([i915#44]) -> [PASS][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html Warnings * igt@i915_selftest@live_gt_lrc: - fi-tgl-y: [DMESG-FAIL][19] ([CI#94] / [i915#1233]) -> [INCOMPLETE][20] ([CI#94] / [i915#1233]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-tgl-y/igt@i915_selftest@live_gt_lrc.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-tgl-y/igt@i915_selftest@live_gt_lrc.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [FAIL][21] ([fdo#111407]) -> [FAIL][22] ([fdo#111096] / [i915#323]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7984/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16665/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#109635]: https://bugs.freedesktop.org/show_bug.cgi?id=109635 [fdo#111096]:
[Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend
Upon unregistering the user interface, we mark the GPU as wedged to ensure we push no new work to the GPU, and to flush all current work from the GPU. Move this call to the GT backend. Signed-off-by: Chris Wilson Cc: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 7 +++ drivers/gpu/drm/i915/i915_drv.c| 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index cd64f81a3e60..3dea8881e915 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -644,6 +644,13 @@ void intel_gt_driver_remove(struct intel_gt *gt) void intel_gt_driver_unregister(struct intel_gt *gt) { intel_rps_driver_unregister(>rps); + + /* +* Upon unregistering the device to prevent any new users, cancel +* all in-flight requests so that we can quickly unbind the active +* resources. +*/ + intel_gt_set_wedged(gt); } void intel_gt_driver_release(struct intel_gt *gt) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 759d333448e1..80574833d28e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1494,13 +1494,6 @@ void i915_driver_remove(struct drm_i915_private *i915) i915_driver_unregister(i915); - /* -* After unregistering the device to prevent any new users, cancel -* all in-flight requests so that we can quickly unbind the active -* resources. -*/ - intel_gt_set_wedged(>gt); - /* Flush any external code that still may be under the RCU lock */ synchronize_rcu(); -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/hotplug: Use phy to get the hpd_pin instead of the port (rev4)
== Series Details == Series: drm/i915/hotplug: Use phy to get the hpd_pin instead of the port (rev4) URL : https://patchwork.freedesktop.org/series/72747/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16637_full Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16637_full absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16637_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_16637_full: ### IGT changes ### Possible regressions * igt@gem_eio@context-create: - shard-skl: [PASS][1] -> [FAIL][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl10/igt@gem_...@context-create.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-skl2/igt@gem_...@context-create.html * igt@kms_flip@flip-vs-dpms-interruptible: - shard-apl: [PASS][3] -> [DMESG-WARN][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl1/igt@kms_f...@flip-vs-dpms-interruptible.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-apl8/igt@kms_f...@flip-vs-dpms-interruptible.html - shard-kbl: [PASS][5] -> [DMESG-WARN][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl3/igt@kms_f...@flip-vs-dpms-interruptible.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-kbl7/igt@kms_f...@flip-vs-dpms-interruptible.html Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_whisper@basic-fds-forked}: - shard-iclb: [PASS][7] -> [INCOMPLETE][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb2/igt@gem_exec_whis...@basic-fds-forked.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb2/igt@gem_exec_whis...@basic-fds-forked.html Known issues Here are the changes found in Patchwork_16637_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([fdo#110841]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb3/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb2/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#110854]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb1/igt@gem_exec_balan...@smoke.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb7/igt@gem_exec_balan...@smoke.html * igt@gem_exec_schedule@fifo-bsd1: - shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109276]) +9 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb1/igt@gem_exec_sched...@fifo-bsd1.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb7/igt@gem_exec_sched...@fifo-bsd1.html * igt@gem_exec_schedule@pi-distinct-iova-bsd: - shard-iclb: [PASS][15] -> [SKIP][16] ([i915#677]) +1 similar issue [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb7/igt@gem_exec_sched...@pi-distinct-iova-bsd.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb1/igt@gem_exec_sched...@pi-distinct-iova-bsd.html * igt@gem_exec_schedule@reorder-wide-bsd: - shard-iclb: [PASS][17] -> [SKIP][18] ([fdo#112146]) +5 similar issues [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb3/igt@gem_exec_sched...@reorder-wide-bsd.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-iclb2/igt@gem_exec_sched...@reorder-wide-bsd.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-kbl: [PASS][19] -> [FAIL][20] ([i915#644]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl1/igt@gem_pp...@flink-and-close-vma-leak.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-kbl4/igt@gem_pp...@flink-and-close-vma-leak.html * igt@gem_softpin@noreloc-s3: - shard-skl: [PASS][21] -> [INCOMPLETE][22] ([i915#69]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl7/igt@gem_soft...@noreloc-s3.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16637/shard-skl6/igt@gem_soft...@noreloc-s3.html * igt@gem_workarounds@suspend-resume-fd: - shard-kbl: [PASS][23] -> [DMESG-WARN][24]
[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Use intel_plane_data_rate for min_cdclk calculation (rev3)
== Series Details == Series: drm/i915: Use intel_plane_data_rate for min_cdclk calculation (rev3) URL : https://patchwork.freedesktop.org/series/73718/ State : failure == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16664 Summary --- **FAILURE** Serious unknown changes coming with Patchwork_16664 absolutely need to be verified manually. If you think the reported changes have nothing to do with the changes introduced in Patchwork_16664, please notify your bug team to allow them to document this new failure mode, which will reduce false positives in CI. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16664: ### IGT changes ### Possible regressions * igt@kms_cursor_legacy@basic-busy-flip-before-cursor-legacy: - fi-pnv-d510:[PASS][1] -> [DMESG-WARN][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-pnv-d510/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-pnv-d510/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html - fi-gdg-551: [PASS][3] -> [DMESG-WARN][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-gdg-551/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-gdg-551/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html - fi-bwr-2160:[PASS][5] -> [DMESG-WARN][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-bwr-2160/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-bwr-2160/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html - fi-blb-e6850: [PASS][7] -> [DMESG-WARN][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-blb-e6850/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-blb-e6850/igt@kms_cursor_leg...@basic-busy-flip-before-cursor-legacy.html Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@kms_busy@basic@flip}: - fi-icl-guc: [PASS][9] -> [INCOMPLETE][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-guc/igt@kms_busy@ba...@flip.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-icl-guc/igt@kms_busy@ba...@flip.html - fi-hsw-4770:[PASS][11] -> [INCOMPLETE][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-hsw-4770/igt@kms_busy@ba...@flip.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-hsw-4770/igt@kms_busy@ba...@flip.html - {fi-tgl-u}: [PASS][13] -> [INCOMPLETE][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-tgl-u/igt@kms_busy@ba...@flip.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-tgl-u/igt@kms_busy@ba...@flip.html - fi-cfl-guc: [PASS][15] -> [INCOMPLETE][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-cfl-guc/igt@kms_busy@ba...@flip.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-cfl-guc/igt@kms_busy@ba...@flip.html - fi-bsw-n3050: [PASS][17] -> [INCOMPLETE][18] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-bsw-n3050/igt@kms_busy@ba...@flip.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-bsw-n3050/igt@kms_busy@ba...@flip.html - fi-skl-guc: [PASS][19] -> [INCOMPLETE][20] [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-skl-guc/igt@kms_busy@ba...@flip.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-skl-guc/igt@kms_busy@ba...@flip.html - fi-ilk-650: [PASS][21] -> [INCOMPLETE][22] [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-ilk-650/igt@kms_busy@ba...@flip.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-ilk-650/igt@kms_busy@ba...@flip.html - fi-ivb-3770:[PASS][23] -> [INCOMPLETE][24] [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-ivb-3770/igt@kms_busy@ba...@flip.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-ivb-3770/igt@kms_busy@ba...@flip.html - fi-icl-y: [PASS][25] -> [INCOMPLETE][26] [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-y/igt@kms_busy@ba...@flip.html [26]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16664/fi-icl-y/igt@kms_busy@ba...@flip.html - fi-hsw-4770r: [PASS][27] -> [INCOMPLETE][28] [27]:
Re: [Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add Wa_22010178259:tgl (rev2)
On Fri, Feb 21, 2020 at 10:45:07PM +, Patchwork wrote: > == Series Details == > > Series: drm/i915/tgl: Add Wa_22010178259:tgl (rev2) > URL : https://patchwork.freedesktop.org/series/73255/ > State : success > > == Summary == > > CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16634_full > > > Summary > --- > > **SUCCESS** > > No regressions found. > Applied to dinq. Thanks Jose for the review. Matt > > > Known issues > > > Here are the changes found in Patchwork_16634_full that come from known > issues: > > ### IGT changes ### > > Issues hit > > * igt@gem_ctx_shared@exec-shared-gtt-bsd2: > - shard-tglb: [PASS][1] -> [FAIL][2] ([i915#616]) >[1]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-tglb1/igt@gem_ctx_sha...@exec-shared-gtt-bsd2.html >[2]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-tglb7/igt@gem_ctx_sha...@exec-shared-gtt-bsd2.html > > * igt@gem_exec_schedule@out-order-bsd2: > - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276]) +8 similar > issues >[3]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb4/igt@gem_exec_sched...@out-order-bsd2.html >[4]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb6/igt@gem_exec_sched...@out-order-bsd2.html > > * igt@gem_exec_schedule@pi-shared-iova-bsd: > - shard-iclb: [PASS][5] -> [SKIP][6] ([i915#677]) >[5]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb7/igt@gem_exec_sched...@pi-shared-iova-bsd.html >[6]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb4/igt@gem_exec_sched...@pi-shared-iova-bsd.html > > * igt@gem_exec_schedule@preempt-queue-bsd: > - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +1 similar > issue >[7]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb3/igt@gem_exec_sched...@preempt-queue-bsd.html >[8]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb2/igt@gem_exec_sched...@preempt-queue-bsd.html > > * igt@gem_softpin@noreloc-s3: > - shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#69]) >[9]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl7/igt@gem_soft...@noreloc-s3.html >[10]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-skl6/igt@gem_soft...@noreloc-s3.html > > * igt@gem_tiled_partial_pwrite_pread@writes-after-reads: > - shard-hsw: [PASS][11] -> [FAIL][12] ([i915#817]) >[11]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-hsw2/igt@gem_tiled_partial_pwrite_pr...@writes-after-reads.html >[12]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-hsw6/igt@gem_tiled_partial_pwrite_pr...@writes-after-reads.html > > * igt@gem_workarounds@suspend-resume-context: > - shard-apl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +2 > similar issues >[13]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl7/igt@gem_workarou...@suspend-resume-context.html >[14]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-apl1/igt@gem_workarou...@suspend-resume-context.html > > * igt@gen7_exec_parse@basic-allocation: > - shard-hsw: [PASS][15] -> [FAIL][16] ([i915#694]) >[15]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-hsw7/igt@gen7_exec_pa...@basic-allocation.html >[16]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-hsw5/igt@gen7_exec_pa...@basic-allocation.html > > * igt@i915_selftest@live_gt_heartbeat: > - shard-apl: [PASS][17] -> [DMESG-FAIL][18] ([fdo#112406]) >[17]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl6/igt@i915_selftest@live_gt_heartbeat.html >[18]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-apl6/igt@i915_selftest@live_gt_heartbeat.html > > * igt@kms_cursor_crc@pipe-a-cursor-suspend: > - shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +7 > similar issues >[19]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl6/igt@kms_cursor_...@pipe-a-cursor-suspend.html >[20]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-kbl4/igt@kms_cursor_...@pipe-a-cursor-suspend.html > > * igt@kms_flip@flip-vs-suspend: > - shard-skl: [PASS][21] -> [INCOMPLETE][22] ([i915#221]) >[21]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl2/igt@kms_f...@flip-vs-suspend.html >[22]: > https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-skl4/igt@kms_f...@flip-vs-suspend.html > > * igt@kms_plane_lowres@pipe-a-tiling-x: > - shard-glk: [PASS][23] -> [FAIL][24] ([i915#899]) >[23]: > https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-glk5/igt@kms_plane_low...@pipe-a-tiling-x.html >
[Intel-gfx] [PATCH] drm/i915/gt: Push the GPU cancellation to the backend
Upon unregistering the user interface, we mark the GPU as wedged to ensure we push no new work to the GPU, and to flush all current work from the GPU. Move this call to the GT backend. Signed-off-by: Chris Wilson Cc: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 7 +++ drivers/gpu/drm/i915/i915_drv.c| 7 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt/intel_gt.c index cd64f81a3e60..1ee99462451c 100644 --- a/drivers/gpu/drm/i915/gt/intel_gt.c +++ b/drivers/gpu/drm/i915/gt/intel_gt.c @@ -644,6 +644,13 @@ void intel_gt_driver_remove(struct intel_gt *gt) void intel_gt_driver_unregister(struct intel_gt *gt) { intel_rps_driver_unregister(>rps); + + /* +* Upon unregistering the device to prevent any new users, cancel +* all in-flight requests so that we can quickly unbind the active +* resources. +*/ + intel_gt_set_wedged(>gt); } void intel_gt_driver_release(struct intel_gt *gt) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 759d333448e1..80574833d28e 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1494,13 +1494,6 @@ void i915_driver_remove(struct drm_i915_private *i915) i915_driver_unregister(i915); - /* -* After unregistering the device to prevent any new users, cancel -* all in-flight requests so that we can quickly unbind the active -* resources. -*/ - intel_gt_set_wedged(>gt); - /* Flush any external code that still may be under the RCU lock */ synchronize_rcu(); -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/tgl: Add Wa_22010178259:tgl (rev2)
== Series Details == Series: drm/i915/tgl: Add Wa_22010178259:tgl (rev2) URL : https://patchwork.freedesktop.org/series/73255/ State : success == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16634_full Summary --- **SUCCESS** No regressions found. Known issues Here are the changes found in Patchwork_16634_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_ctx_shared@exec-shared-gtt-bsd2: - shard-tglb: [PASS][1] -> [FAIL][2] ([i915#616]) [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-tglb1/igt@gem_ctx_sha...@exec-shared-gtt-bsd2.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-tglb7/igt@gem_ctx_sha...@exec-shared-gtt-bsd2.html * igt@gem_exec_schedule@out-order-bsd2: - shard-iclb: [PASS][3] -> [SKIP][4] ([fdo#109276]) +8 similar issues [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb4/igt@gem_exec_sched...@out-order-bsd2.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb6/igt@gem_exec_sched...@out-order-bsd2.html * igt@gem_exec_schedule@pi-shared-iova-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([i915#677]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb7/igt@gem_exec_sched...@pi-shared-iova-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb4/igt@gem_exec_sched...@pi-shared-iova-bsd.html * igt@gem_exec_schedule@preempt-queue-bsd: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#112146]) +1 similar issue [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb3/igt@gem_exec_sched...@preempt-queue-bsd.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-iclb2/igt@gem_exec_sched...@preempt-queue-bsd.html * igt@gem_softpin@noreloc-s3: - shard-skl: [PASS][9] -> [INCOMPLETE][10] ([i915#69]) [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl7/igt@gem_soft...@noreloc-s3.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-skl6/igt@gem_soft...@noreloc-s3.html * igt@gem_tiled_partial_pwrite_pread@writes-after-reads: - shard-hsw: [PASS][11] -> [FAIL][12] ([i915#817]) [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-hsw2/igt@gem_tiled_partial_pwrite_pr...@writes-after-reads.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-hsw6/igt@gem_tiled_partial_pwrite_pr...@writes-after-reads.html * igt@gem_workarounds@suspend-resume-context: - shard-apl: [PASS][13] -> [DMESG-WARN][14] ([i915#180]) +2 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl7/igt@gem_workarou...@suspend-resume-context.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-apl1/igt@gem_workarou...@suspend-resume-context.html * igt@gen7_exec_parse@basic-allocation: - shard-hsw: [PASS][15] -> [FAIL][16] ([i915#694]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-hsw7/igt@gen7_exec_pa...@basic-allocation.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-hsw5/igt@gen7_exec_pa...@basic-allocation.html * igt@i915_selftest@live_gt_heartbeat: - shard-apl: [PASS][17] -> [DMESG-FAIL][18] ([fdo#112406]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl6/igt@i915_selftest@live_gt_heartbeat.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-apl6/igt@i915_selftest@live_gt_heartbeat.html * igt@kms_cursor_crc@pipe-a-cursor-suspend: - shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([i915#180]) +7 similar issues [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl6/igt@kms_cursor_...@pipe-a-cursor-suspend.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-kbl4/igt@kms_cursor_...@pipe-a-cursor-suspend.html * igt@kms_flip@flip-vs-suspend: - shard-skl: [PASS][21] -> [INCOMPLETE][22] ([i915#221]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl2/igt@kms_f...@flip-vs-suspend.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-skl4/igt@kms_f...@flip-vs-suspend.html * igt@kms_plane_lowres@pipe-a-tiling-x: - shard-glk: [PASS][23] -> [FAIL][24] ([i915#899]) [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-glk5/igt@kms_plane_low...@pipe-a-tiling-x.html [24]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16634/shard-glk5/igt@kms_plane_low...@pipe-a-tiling-x.html * igt@kms_psr2_su@frontbuffer: - shard-iclb: [PASS][25] -> [SKIP][26] ([fdo#109642] / [fdo#111068]) [25]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb2/igt@kms_psr2...@frontbuffer.html [26]:
[Intel-gfx] [CI] drm/i915: Avoid recursing onto active vma from the shrinker
We mark the vma as active while binding it in order to protect outselves from being shrunk under mempressure. This only works if we are strict in not attempting to shrink active objects. <6> [472.618968] Workqueue: events_unbound fence_work [i915] <4> [472.618970] Call Trace: <4> [472.618974] ? __schedule+0x2e5/0x810 <4> [472.618978] schedule+0x37/0xe0 <4> [472.618982] schedule_preempt_disabled+0xf/0x20 <4> [472.618984] __mutex_lock+0x281/0x9c0 <4> [472.618987] ? mark_held_locks+0x49/0x70 <4> [472.618989] ? _raw_spin_unlock_irqrestore+0x47/0x60 <4> [472.619038] ? i915_vma_unbind+0xae/0x110 [i915] <4> [472.619084] ? i915_vma_unbind+0xae/0x110 [i915] <4> [472.619122] i915_vma_unbind+0xae/0x110 [i915] <4> [472.619165] i915_gem_object_unbind+0x1dc/0x400 [i915] <4> [472.619208] i915_gem_shrink+0x328/0x660 [i915] <4> [472.619250] ? i915_gem_shrink_all+0x38/0x60 [i915] <4> [472.619282] i915_gem_shrink_all+0x38/0x60 [i915] <4> [472.619325] vm_alloc_page.constprop.25+0x1aa/0x240 [i915] <4> [472.619330] ? rcu_read_lock_sched_held+0x4d/0x80 <4> [472.619363] ? __alloc_pd+0xb/0x30 [i915] <4> [472.619366] ? module_assert_mutex_or_preempt+0xf/0x30 <4> [472.619368] ? __module_address+0x23/0xe0 <4> [472.619371] ? is_module_address+0x26/0x40 <4> [472.619374] ? static_obj+0x34/0x50 <4> [472.619376] ? lockdep_init_map+0x4d/0x1e0 <4> [472.619407] setup_page_dma+0xd/0x90 [i915] <4> [472.619437] alloc_pd+0x29/0x50 [i915] <4> [472.619470] __gen8_ppgtt_alloc+0x443/0x6b0 [i915] <4> [472.619503] gen8_ppgtt_alloc+0xd7/0x300 [i915] <4> [472.619535] ppgtt_bind_vma+0x2a/0xe0 [i915] <4> [472.619577] __vma_bind+0x26/0x40 [i915] <4> [472.619611] fence_work+0x1c/0x90 [i915] <4> [472.619617] process_one_work+0x26a/0x620 Fixes: 2850748ef876 ("drm/i915: Pull i915_vma_pin under the vm->mutex") Signed-off-by: Chris Wilson Cc: Tvrtko Ursulin Reviewed-by: Tvrtko Ursulin --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c index 7eaa2ab01de3..830d3f96e1f6 100644 --- a/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c +++ b/drivers/gpu/drm/i915/gem/i915_gem_shrinker.c @@ -256,8 +256,7 @@ unsigned long i915_gem_shrink_all(struct drm_i915_private *i915) with_intel_runtime_pm(>runtime_pm, wakeref) { freed = i915_gem_shrink(i915, -1UL, NULL, I915_SHRINK_BOUND | - I915_SHRINK_UNBOUND | - I915_SHRINK_ACTIVE); + I915_SHRINK_UNBOUND); } return freed; @@ -336,7 +335,6 @@ i915_gem_shrinker_oom(struct notifier_block *nb, unsigned long event, void *ptr) freed_pages = 0; with_intel_runtime_pm(>runtime_pm, wakeref) freed_pages += i915_gem_shrink(i915, -1UL, NULL, - I915_SHRINK_ACTIVE | I915_SHRINK_BOUND | I915_SHRINK_UNBOUND | I915_SHRINK_WRITEBACK); -- 2.25.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✓ Fi.CI.BAT: success for dma-buf: Precheck for a valid dma_fence before acquiring the reference
== Series Details == Series: dma-buf: Precheck for a valid dma_fence before acquiring the reference URL : https://patchwork.freedesktop.org/series/73772/ State : success == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16663 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16663: ### IGT changes ### Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * igt@i915_pm_rpm@module-reload: - {fi-kbl-7560u}: NOTRUN -> [CRASH][1] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-kbl-7560u/igt@i915_pm_...@module-reload.html Known issues Here are the changes found in Patchwork_16663 that come from known issues: ### IGT changes ### Issues hit * igt@gem_close_race@basic-threads: - fi-hsw-peppy: [PASS][2] -> [TIMEOUT][3] ([fdo#112271] / [i915#1084]) [2]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html [3]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-hsw-peppy/igt@gem_close_r...@basic-threads.html * igt@i915_selftest@live_execlists: - fi-icl-y: [PASS][4] -> [DMESG-FAIL][5] ([fdo#108569]) [4]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-y/igt@i915_selftest@live_execlists.html [5]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-icl-y/igt@i915_selftest@live_execlists.html * igt@i915_selftest@live_gem_contexts: - fi-hsw-peppy: [PASS][6] -> [DMESG-FAIL][7] ([i915#722]) [6]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html [7]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-hsw-peppy/igt@i915_selftest@live_gem_contexts.html * igt@i915_selftest@live_gtt: - fi-skl-6600u: [PASS][8] -> [TIMEOUT][9] ([fdo#111732] / [fdo#112271]) [8]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-skl-6600u/igt@i915_selftest@live_gtt.html [9]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-skl-6600u/igt@i915_selftest@live_gtt.html * igt@kms_addfb_basic@addfb25-bad-modifier: - fi-tgl-y: [PASS][10] -> [DMESG-WARN][11] ([CI#94] / [i915#402]) +1 similar issue [10]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-tgl-y/igt@kms_addfb_ba...@addfb25-bad-modifier.html [11]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-tgl-y/igt@kms_addfb_ba...@addfb25-bad-modifier.html * igt@kms_chamelium@dp-crc-fast: - fi-cml-u2: [PASS][12] -> [FAIL][13] ([i915#262]) [12]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-cml-u2/igt@kms_chamel...@dp-crc-fast.html [13]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-cml-u2/igt@kms_chamel...@dp-crc-fast.html * igt@kms_chamelium@hdmi-hpd-fast: - fi-kbl-7500u: [PASS][14] -> [FAIL][15] ([fdo#111407]) [14]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html [15]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-kbl-7500u/igt@kms_chamel...@hdmi-hpd-fast.html * igt@kms_frontbuffer_tracking@basic: - fi-hsw-peppy: [PASS][16] -> [DMESG-WARN][17] ([i915#44]) [16]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-hsw-peppy/igt@kms_frontbuffer_track...@basic.html Possible fixes * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][18] ([CI#94] / [i915#402]) -> [PASS][19] +1 similar issue [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-tgl-y/igt@gem_mmap_...@basic.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16663/fi-tgl-y/igt@gem_mmap_...@basic.html {name}: This element is suppressed. This means it is ignored when computing the status of the difference (SUCCESS, WARNING, or FAILURE). [CI#94]: https://gitlab.freedesktop.org/gfx-ci/i915-infra/issues/94 [fdo#108569]: https://bugs.freedesktop.org/show_bug.cgi?id=108569 [fdo#111407]: https://bugs.freedesktop.org/show_bug.cgi?id=111407 [fdo#111732]: https://bugs.freedesktop.org/show_bug.cgi?id=111732 [fdo#112271]: https://bugs.freedesktop.org/show_bug.cgi?id=112271 [i915#1084]: https://gitlab.freedesktop.org/drm/intel/issues/1084 [i915#1233]: https://gitlab.freedesktop.org/drm/intel/issues/1233 [i915#262]: https://gitlab.freedesktop.org/drm/intel/issues/262 [i915#402]: https://gitlab.freedesktop.org/drm/intel/issues/402 [i915#44]:
Re: [Intel-gfx] [PATCH i-g-t v4 2/2] i915/gem_ctx_isolation: Check engine relative registers (revised)
On 2/14/20 6:33 PM, Dale B Stimson wrote: From: Chris Wilson Some of the non-privileged registers are at the same offset on each engine. We can improve our coverage for unknown HW layout by using the reported engine->mmio_base for relative offsets. Subsequent to sign-off by Chris Wilson, added by Dale B Stimson: Modify previous "i915/gem_ctx_isolation: Check engine relative registers" to support alternative mmio_base infrastructure API. Signed-off-by: Chris Wilson Signed-off-by: Dale B Stimson Acked-by: Robert M. Fosha --- lib/i915/gem_mmio_base.c | 7 +- tests/i915/gem_ctx_isolation.c | 229 - 2 files changed, 141 insertions(+), 95 deletions(-) diff --git a/lib/i915/gem_mmio_base.c b/lib/i915/gem_mmio_base.c index d1b83221a..c712b4431 100644 --- a/lib/i915/gem_mmio_base.c +++ b/lib/i915/gem_mmio_base.c @@ -286,13 +286,14 @@ struct eng_mmio_base_table_s *gem_engine_mmio_base_info_get(int fd_dev) { struct eng_mmio_base_table_s *mbp = NULL; - /* If and when better ways are provided to find the mmio_base -* information, they may be added them here in order of preference. + /* If and when more desirable ways exist to find the mmio_base +* information, they may be added here, in order of consideration. */ #if 0 + /* Anticipating a future method: */ if (!mbp) - mbp = _mmio_base_info_get_via_sysfs(fd_dev); + mbp = _gem_engine_mmio_base_info_get_sysfs(fd_dev); #endif if (!mbp) diff --git a/tests/i915/gem_ctx_isolation.c b/tests/i915/gem_ctx_isolation.c index 1b66fec11..07ffbb84a 100644 --- a/tests/i915/gem_ctx_isolation.c +++ b/tests/i915/gem_ctx_isolation.c @@ -70,6 +70,7 @@ static const struct named_register { uint32_t ignore_bits; uint32_t write_mask; /* some registers bits do not exist */ bool masked; + bool relative; } nonpriv_registers[] = { { "NOPID", NOCTX, RCS0, 0x2094 }, { "MI_PREDICATE_RESULT_2", NOCTX, RCS0, 0x23bc }, @@ -109,7 +110,6 @@ static const struct named_register { { "PS_DEPTH_COUNT_1", GEN8, RCS0, 0x22f8, 2 }, { "BB_OFFSET", GEN8, RCS0, 0x2158, .ignore_bits = 0x7 }, { "MI_PREDICATE_RESULT_1", GEN8, RCS0, 0x241c }, - { "CS_GPR", GEN8, RCS0, 0x2600, 32 }, { "OA_CTX_CONTROL", GEN8, RCS0, 0x2360 }, { "OACTXID", GEN8, RCS0, 0x2364 }, { "PS_INVOCATION_COUNT_2", GEN8, RCS0, 0x2448, 2, .write_mask = ~0x3 }, @@ -138,79 +138,56 @@ static const struct named_register { { "CTX_PREEMPT", NOCTX /* GEN10 */, RCS0, 0x2248 }, { "CS_CHICKEN1", GEN11, RCS0, 0x2580, .masked = true }, - { "HDC_CHICKEN1", GEN_RANGE(10, 10), RCS0, 0x7304, .masked = true }, /* Privileged (enabled by w/a + FORCE_TO_NONPRIV) */ { "CTX_PREEMPT", NOCTX /* GEN9 */, RCS0, 0x2248 }, { "CS_CHICKEN1", GEN_RANGE(9, 10), RCS0, 0x2580, .masked = true }, { "COMMON_SLICE_CHICKEN2", GEN_RANGE(9, 9), RCS0, 0x7014, .masked = true }, - { "HDC_CHICKEN1", GEN_RANGE(9, 9), RCS0, 0x7304, .masked = true }, + { "HDC_CHICKEN1", GEN_RANGE(9, 10), RCS0, 0x7304, .masked = true }, { "SLICE_COMMON_ECO_CHICKEN1", GEN_RANGE(11, 11) /* + glk */, RCS0, 0x731c, .masked = true }, { "L3SQREG4", NOCTX /* GEN9:skl,kbl */, RCS0, 0xb118, .write_mask = ~0x10 }, { "HALF_SLICE_CHICKEN7", GEN_RANGE(11, 11), RCS0, 0xe194, .masked = true }, { "SAMPLER_MODE", GEN_RANGE(11, 11), RCS0, 0xe18c, .masked = true }, - { "BCS_GPR", GEN9, BCS0, 0x22600, 32 }, { "BCS_SWCTRL", GEN8, BCS0, 0x22200, .write_mask = 0x3, .masked = true }, { "MFC_VDBOX1", NOCTX, VCS0, 0x12800, 64 }, { "MFC_VDBOX2", NOCTX, VCS1, 0x1c800, 64 }, - { "VCS0_GPR", GEN_RANGE(9, 10), VCS0, 0x12600, 32 }, - { "VCS1_GPR", GEN_RANGE(9, 10), VCS1, 0x1c600, 32 }, - { "VECS_GPR", GEN_RANGE(9, 10), VECS0, 0x1a600, 32 }, - - { "VCS0_GPR", GEN11, VCS0, 0x1c0600, 32 }, - { "VCS1_GPR", GEN11, VCS1, 0x1c4600, 32 }, - { "VCS2_GPR", GEN11, VCS2, 0x1d0600, 32 }, - { "VCS3_GPR", GEN11, VCS3, 0x1d4600, 32 }, - { "VECS_GPR", GEN11, VECS0, 0x1c8600, 32 }, + { "xCS_GPR", GEN9, ALL, 0x600, 32, .relative = true }, {} }, ignore_registers[] = { { "RCS timestamp", GEN6, ~0u, 0x2358 }, { "BCS timestamp", GEN7, ~0u, 0x22358 }, - { "VCS0 timestamp", GEN_RANGE(7, 10), ~0u, 0x12358 }, - { "VCS1 timestamp", GEN_RANGE(7, 10), ~0u, 0x1c358 }, - { "VECS timestamp", GEN_RANGE(8, 10), ~0u, 0x1a358 }, - - { "VCS0 timestamp", GEN11, ~0u, 0x1c0358 }, - { "VCS1 timestamp", GEN11, ~0u, 0x1c4358 }, - { "VCS2 timestamp", GEN11, ~0u, 0x1d0358 }, - { "VCS3 timestamp", GEN11, ~0u, 0x1d4358 }, - { "VECS timestamp", GEN11, ~0u, 0x1c8358 }, + { "xCS timestamp", GEN8, ALL, 0x358, .relative = true }, /* huc read only */ - { "BSD0 0x2000",
Re: [Intel-gfx] [PATCH i-g-t v4 1/2] i915/gem_mmio_base.c - get mmio_base from debugfs (if possible)
On 2/14/20 6:33 PM, Dale B Stimson wrote: Signed-off-by: Dale B Stimson Acked-by: Robert M. Fosha --- lib/Makefile.sources | 2 + lib/i915/gem_mmio_base.c | 353 +++ lib/i915/gem_mmio_base.h | 19 +++ lib/igt.h| 1 + lib/meson.build | 1 + 5 files changed, 376 insertions(+) create mode 100644 lib/i915/gem_mmio_base.c create mode 100644 lib/i915/gem_mmio_base.h diff --git a/lib/Makefile.sources b/lib/Makefile.sources index 3e573f267..4c5d50d5d 100644 --- a/lib/Makefile.sources +++ b/lib/Makefile.sources @@ -7,6 +7,8 @@ lib_source_list = \ i915/gem_context.h \ i915/gem_engine_topology.c \ i915/gem_engine_topology.h \ + i915/gem_mmio_base.c\ + i915/gem_mmio_base.h\ i915/gem_scheduler.c\ i915/gem_scheduler.h\ i915/gem_submission.c \ diff --git a/lib/i915/gem_mmio_base.c b/lib/i915/gem_mmio_base.c new file mode 100644 index 0..d1b83221a --- /dev/null +++ b/lib/i915/gem_mmio_base.c @@ -0,0 +1,353 @@ +// Copyright (C) 2020 Intel Corporation +// +// SPDX-License-Identifier: MIT + +#include + +#include + +#include "igt.h" + +struct eng_mmio_base_s { + char name[8]; + uint32_t mmio_base; +}; + +struct eng_mmio_base_table_s { + unsigned int mb_cnt; + struct eng_mmio_base_s mb_tab[GEM_MAX_ENGINES]; +}; + + +static struct eng_mmio_base_table_s *_gem_engine_mmio_info_dup( + const struct eng_mmio_base_table_s *mbpi) +{ + struct eng_mmio_base_table_s *mbpo; + size_t nbytes; + + nbytes = offsetof(typeof(struct eng_mmio_base_table_s), mb_tab[mbpi->mb_cnt]); + mbpo = malloc(nbytes); + igt_assert(mbpo); + memcpy(mbpo, mbpi, nbytes); + + return mbpo; +} + +void gem_engine_mmio_base_info_free(struct eng_mmio_base_table_s *mbp) +{ + if (mbp) + free(mbp); +} + +static void _gem_engine_mmio_info_legacy_add(struct eng_mmio_base_table_s *mbp, + const char *eng_name, uint32_t mmio_base) +{ + if (mmio_base) { + strncpy(mbp->mb_tab[mbp->mb_cnt].name, eng_name, + sizeof(mbp->mb_tab[0].name)); + mbp->mb_tab[mbp->mb_cnt].mmio_base = mmio_base; + mbp->mb_cnt++; + } +} + +/** + * _gem_engine_mmio_base_info_get_legacy: + * @fd_dev: file descriptor upon which device is open or -1 to use defaults. + * + * Provides per-engine mmio_base information from legacy built-in values + * for the case when the information is not otherwise available. + * + * Returns: + * Pointer to dynamically allocated struct eng_mmio_base_table_s describing + * engine config or NULL. + * The allocated size does not include unused engine entries. + * If non-NULL, it is caller's responsibility to free. + */ +static struct eng_mmio_base_table_s *_gem_engine_mmio_base_info_get_legacy(int fd_dev) +{ + int gen; + uint32_t mmio_base; + struct eng_mmio_base_table_s mbt; + struct eng_mmio_base_table_s *mbp; + + memset(, 0, sizeof(mbt)); + + gen = intel_gen(intel_get_drm_devid(fd_dev)); + + /* The mmio_base values for engine instances 1 and higher cannot +* be reliability determinated a priori. */ + + _gem_engine_mmio_info_legacy_add(, "rcs0", 0x2000); + _gem_engine_mmio_info_legacy_add(, "bcs0", 0x22000); + + if (gen < 6) + mmio_base = 0x4000; + else if (gen < 11) + mmio_base = 0x12000; + else + mmio_base = 0x1c; + _gem_engine_mmio_info_legacy_add(, "vcs0", mmio_base); + + if (gen < 11) + mmio_base = 0x1a000; + else + mmio_base = 0x1c8000; + _gem_engine_mmio_info_legacy_add(, "vecs0", mmio_base); + + if (mbt.mb_cnt <= 0) + return NULL; + + mbp = _gem_engine_mmio_info_dup(); + + return mbp; +} + + +/** + * _gem_engine_mmio_base_info_get_debugfs: + * @fd_dev: file descriptor upon which device is open or -1 to use defaults. + * + * Obtains per-engine mmio_base information from debugfs. + * + * Returns: + * Pointer to dynamically allocated struct eng_mmio_base_table_s describing + * engine config or NULL. + * The allocated size does not include unused engine entries. + * If non-NULL, it is caller's responsibility to free. + * + * Looking in debugfs for per-engine instances of: + * + * ... + * MMIO base: + * + * Example of relevant lines from debugfs: + * vcs0 + * MMIO base: 0x001c + * vcs1 + * MMIO base: 0x001d + * + * In order to qualify as the introduction of a new per-engine section, an + * input line must consist solely of an engine name. An engine name must + * be 7 or fewer characters in length and must consist of an engine class + * name of 3 or more lower case characters followed by an instance
[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gt: Protect signaler walk with RCU (rev2)
== Series Details == Series: drm/i915/gt: Protect signaler walk with RCU (rev2) URL : https://patchwork.freedesktop.org/series/73601/ State : success == Summary == CI Bug Log - changes from CI_DRM_7967_full -> Patchwork_16633_full Summary --- **SUCCESS** No regressions found. Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16633_full: ### IGT changes ### Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@gem_exec_whisper@basic-contexts-forked}: - shard-tglb: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-tglb2/igt@gem_exec_whis...@basic-contexts-forked.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-tglb6/igt@gem_exec_whis...@basic-contexts-forked.html Known issues Here are the changes found in Patchwork_16633_full that come from known issues: ### IGT changes ### Issues hit * igt@gem_busy@close-race: - shard-tglb: [PASS][3] -> [INCOMPLETE][4] ([i915#977]) [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-tglb7/igt@gem_b...@close-race.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-tglb1/igt@gem_b...@close-race.html * igt@gem_ctx_shared@exec-single-timeline-bsd: - shard-iclb: [PASS][5] -> [SKIP][6] ([fdo#110841]) [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb3/igt@gem_ctx_sha...@exec-single-timeline-bsd.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-iclb4/igt@gem_ctx_sha...@exec-single-timeline-bsd.html * igt@gem_exec_balancer@smoke: - shard-iclb: [PASS][7] -> [SKIP][8] ([fdo#110854]) [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb1/igt@gem_exec_balan...@smoke.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-iclb5/igt@gem_exec_balan...@smoke.html * igt@gem_exec_schedule@pi-shared-iova-bsd: - shard-iclb: [PASS][9] -> [SKIP][10] ([i915#677]) +1 similar issue [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb7/igt@gem_exec_sched...@pi-shared-iova-bsd.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-iclb1/igt@gem_exec_sched...@pi-shared-iova-bsd.html * igt@gem_exec_schedule@preempt-other-chain-bsd: - shard-iclb: [PASS][11] -> [SKIP][12] ([fdo#112146]) +5 similar issues [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb8/igt@gem_exec_sched...@preempt-other-chain-bsd.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-iclb2/igt@gem_exec_sched...@preempt-other-chain-bsd.html * igt@gem_exec_schedule@preempt-queue-bsd1: - shard-iclb: [PASS][13] -> [SKIP][14] ([fdo#109276]) +11 similar issues [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-iclb1/igt@gem_exec_sched...@preempt-queue-bsd1.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-iclb3/igt@gem_exec_sched...@preempt-queue-bsd1.html * igt@gem_ppgtt@flink-and-close-vma-leak: - shard-kbl: [PASS][15] -> [FAIL][16] ([i915#644]) [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl1/igt@gem_pp...@flink-and-close-vma-leak.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-kbl7/igt@gem_pp...@flink-and-close-vma-leak.html * igt@gen7_exec_parse@basic-allocation: - shard-hsw: [PASS][17] -> [FAIL][18] ([i915#694]) [17]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-hsw7/igt@gen7_exec_pa...@basic-allocation.html [18]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-hsw8/igt@gen7_exec_pa...@basic-allocation.html * igt@gen9_exec_parse@allowed-all: - shard-kbl: [PASS][19] -> [DMESG-WARN][20] ([i915#716]) [19]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-kbl7/igt@gen9_exec_pa...@allowed-all.html [20]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-kbl3/igt@gen9_exec_pa...@allowed-all.html * igt@i915_selftest@live_gt_heartbeat: - shard-skl: [PASS][21] -> [DMESG-FAIL][22] ([fdo#112406]) [21]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-skl1/igt@i915_selftest@live_gt_heartbeat.html [22]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16633/shard-skl3/igt@i915_selftest@live_gt_heartbeat.html * igt@kms_cursor_crc@pipe-c-cursor-suspend: - shard-apl: [PASS][23] -> [DMESG-WARN][24] ([i915#180]) +1 similar issue [23]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7967/shard-apl2/igt@kms_cursor_...@pipe-c-cursor-suspend.html [24]:
[Intel-gfx] ✓ Fi.CI.BAT: success for Refactor Gen11+ SAGV support (rev2)
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : success == Summary == CI Bug Log - changes from CI_DRM_7983 -> Patchwork_16662 Summary --- **SUCCESS** No regressions found. External URL: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/index.html Possible new issues --- Here are the unknown changes that may have been introduced in Patchwork_16662: ### IGT changes ### Suppressed The following results come from untrusted machines, tests, or statuses. They do not affect the overall result. * {igt@kms_busy@basic@flip}: - fi-icl-guc: [PASS][1] -> [INCOMPLETE][2] [1]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-guc/igt@kms_busy@ba...@flip.html [2]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-icl-guc/igt@kms_busy@ba...@flip.html - {fi-tgl-u}: [PASS][3] -> [INCOMPLETE][4] [3]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-tgl-u/igt@kms_busy@ba...@flip.html [4]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-tgl-u/igt@kms_busy@ba...@flip.html - fi-skl-guc: [PASS][5] -> [INCOMPLETE][6] [5]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-skl-guc/igt@kms_busy@ba...@flip.html [6]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-skl-guc/igt@kms_busy@ba...@flip.html - fi-icl-y: [PASS][7] -> [INCOMPLETE][8] [7]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-y/igt@kms_busy@ba...@flip.html [8]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-icl-y/igt@kms_busy@ba...@flip.html - fi-skl-6700k2: [PASS][9] -> [INCOMPLETE][10] [9]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-skl-6700k2/igt@kms_busy@ba...@flip.html [10]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-skl-6700k2/igt@kms_busy@ba...@flip.html - fi-icl-u2: [PASS][11] -> [INCOMPLETE][12] [11]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-u2/igt@kms_busy@ba...@flip.html [12]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-icl-u2/igt@kms_busy@ba...@flip.html - fi-icl-dsi: [PASS][13] -> [INCOMPLETE][14] [13]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-icl-dsi/igt@kms_busy@ba...@flip.html [14]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-icl-dsi/igt@kms_busy@ba...@flip.html - {fi-ehl-1}: [PASS][15] -> [INCOMPLETE][16] [15]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-ehl-1/igt@kms_busy@ba...@flip.html [16]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-ehl-1/igt@kms_busy@ba...@flip.html * igt@runner@aborted: - {fi-ehl-1}: NOTRUN -> [FAIL][17] [17]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-ehl-1/igt@run...@aborted.html Known issues Here are the changes found in Patchwork_16662 that come from known issues: ### IGT changes ### Issues hit * igt@i915_pm_rpm@module-reload: - fi-kbl-8809g: [PASS][18] -> [INCOMPLETE][19] ([i915#151]) [18]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-kbl-8809g/igt@i915_pm_...@module-reload.html [19]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-kbl-8809g/igt@i915_pm_...@module-reload.html * igt@kms_force_connector_basic@force-connector-state: - fi-kbl-guc: [PASS][20] -> [INCOMPLETE][21] ([i915#938]) [20]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-kbl-guc/igt@kms_force_connector_ba...@force-connector-state.html [21]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-kbl-guc/igt@kms_force_connector_ba...@force-connector-state.html Possible fixes * igt@gem_close_race@basic-threads: - fi-byt-j1900: [INCOMPLETE][22] ([i915#45]) -> [PASS][23] [22]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-byt-j1900/igt@gem_close_r...@basic-threads.html [23]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-byt-j1900/igt@gem_close_r...@basic-threads.html - fi-byt-n2820: [INCOMPLETE][24] ([i915#45]) -> [PASS][25] [24]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-byt-n2820/igt@gem_close_r...@basic-threads.html [25]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-byt-n2820/igt@gem_close_r...@basic-threads.html * igt@gem_mmap_gtt@basic: - fi-tgl-y: [DMESG-WARN][26] ([CI#94] / [i915#402]) -> [PASS][27] [26]: https://intel-gfx-ci.01.org/tree/drm-tip/CI_DRM_7983/fi-tgl-y/igt@gem_mmap_...@basic.html [27]: https://intel-gfx-ci.01.org/tree/drm-tip/Patchwork_16662/fi-tgl-y/igt@gem_mmap_...@basic.html Warnings * igt@gem_exec_suspend@basic-s4-devices: - fi-tgl-y: [FAIL][28] ([CI#94]) -> [DMESG-WARN][29]
Re: [Intel-gfx] [PATCH 02/51] drm/i915: Don't clear drvdata in ->release
Quoting Daniel Vetter (2020-02-21 21:02:30) > For two reasons: > > - The driver core clears this already for us after we're unloaded in > __device_release_driver(). Even if we abort before loading? History notes that i915_pci_remove was called with a stale pointer on error. -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Refactor Gen11+ SAGV support (rev2)
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : warning == Summary == $ dim sparse origin/drm-tip Sparse version: v0.6.0 Commit: drm/i915: Start passing latency as parameter Okay! Commit: drm/i915: Introduce skl_plane_wm_level accessor. Okay! Commit: drm/i915: Init obj state in intel_atomic_get_old/new_global_obj_state Okay! Commit: drm/i915: Refactor intel_can_enable_sagv +drivers/gpu/drm/i915/intel_pm.c:3851:6: warning: symbol 'intel_compute_sagv_mask' was not declared. Should it be static? +drivers/gpu/drm/i915/intel_pm.c:3905:6: warning: symbol 'intel_calculate_sagv_result' was not declared. Should it be static? Commit: drm/i915: Added required new PCode commands Okay! Commit: drm/i915: Restrict qgv points which don't have enough bandwidth. Okay! Commit: drm/i915: Enable SAGV support for Gen12 Okay! ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH v4-CI] drm/i915/psr: Force PSR probe only after full initialization
Commit 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") was forcing the state compute too earlier causing errors because not everything was initialized, so here moving to the end of i915_driver_modeset_probe() when the display is all initialized. Also fixing the place where it disarm the force probe as during the atomic check phase errors could happen like the ones due locking and it would cause PSR to never be enabled if that happens. Leaving the disarm to the atomic commit phase, intel_psr_enable() or intel_psr_update() will be called even if the current state do not allow PSR to be enabled. v2: Check if intel_dp is null in intel_psr_force_mode_changed_set() v3: Check intel_dp before get dev_priv v4: - renamed intel_psr_force_mode_changed_set() to intel_psr_set_force_mode_changed() - removed the set parameter from intel_psr_set_force_mode_changed() - not calling intel_psr_set_force_mode_changed() from intel_psr_enable/update(), directly setting it after the same checks that intel_psr_set_force_mode_changed() does - moved intel_psr_set_force_mode_changed() arm call to i915_driver_modeset_probe() as it is a better for a PSR call, all the functions calls happening between the old and the new function call will cause issue Fixes: 60c6a14b489b ("drm/i915/display: Force the state compute phase once to enable PSR") Closes: https://gitlab.freedesktop.org/drm/intel/issues/1151 Tested-by: Ross Zwisler Reported-by: Ross Zwisler Cc: Gwan-gyeong Mun Cc: Jani Nikula Cc: Anshuman Gupta Reviewed-by: Gwan-gyeong Mun Signed-off-by: José Roberto de Souza --- Somehow Ross took over the patchwork of this patch and I can't re-test this patch so sending it again. drivers/gpu/drm/i915/display/intel_psr.c | 25 drivers/gpu/drm/i915/display/intel_psr.h | 1 + drivers/gpu/drm/i915/i915_drv.c | 3 +++ drivers/gpu/drm/i915/i915_drv.h | 2 +- 4 files changed, 26 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c index b4942b6445ae..7e754201f54d 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.c +++ b/drivers/gpu/drm/i915/display/intel_psr.c @@ -936,10 +936,12 @@ void intel_psr_enable(struct intel_dp *intel_dp, { struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); - if (!crtc_state->has_psr) + if (!CAN_PSR(dev_priv) || dev_priv->psr.dp != intel_dp) return; - if (drm_WARN_ON(_priv->drm, !CAN_PSR(dev_priv))) + dev_priv->psr.force_mode_changed = false; + + if (!crtc_state->has_psr) return; drm_WARN_ON(_priv->drm, dev_priv->drrs.dp); @@ -1099,6 +1101,8 @@ void intel_psr_update(struct intel_dp *intel_dp, if (!CAN_PSR(dev_priv) || READ_ONCE(psr->dp) != intel_dp) return; + dev_priv->psr.force_mode_changed = false; + mutex_lock(_priv->psr.lock); enable = crtc_state->has_psr && psr_global_enabled(dev_priv); @@ -1629,7 +1633,7 @@ void intel_psr_atomic_check(struct drm_connector *connector, struct drm_crtc_state *crtc_state; if (!CAN_PSR(dev_priv) || !new_state->crtc || - dev_priv->psr.initially_probed) + !dev_priv->psr.force_mode_changed) return; intel_connector = to_intel_connector(connector); @@ -1640,5 +1644,18 @@ void intel_psr_atomic_check(struct drm_connector *connector, crtc_state = drm_atomic_get_new_crtc_state(new_state->state, new_state->crtc); crtc_state->mode_changed = true; - dev_priv->psr.initially_probed = true; +} + +void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp) +{ + struct drm_i915_private *dev_priv; + + if (!intel_dp) + return; + + dev_priv = dp_to_i915(intel_dp); + if (!CAN_PSR(dev_priv) || intel_dp != dev_priv->psr.dp) + return; + + dev_priv->psr.force_mode_changed = true; } diff --git a/drivers/gpu/drm/i915/display/intel_psr.h b/drivers/gpu/drm/i915/display/intel_psr.h index c58a1d438808..274fc6bb6221 100644 --- a/drivers/gpu/drm/i915/display/intel_psr.h +++ b/drivers/gpu/drm/i915/display/intel_psr.h @@ -40,5 +40,6 @@ bool intel_psr_enabled(struct intel_dp *intel_dp); void intel_psr_atomic_check(struct drm_connector *connector, struct drm_connector_state *old_state, struct drm_connector_state *new_state); +void intel_psr_set_force_mode_changed(struct intel_dp *intel_dp); #endif /* __INTEL_PSR_H__ */ diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 759d333448e1..066934327345 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -58,6 +58,7 @@ #include "display/intel_hotplug.h" #include "display/intel_overlay.h" #include "display/intel_pipe_crc.h" +#include
[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Refactor Gen11+ SAGV support (rev2)
== Series Details == Series: Refactor Gen11+ SAGV support (rev2) URL : https://patchwork.freedesktop.org/series/73703/ State : warning == Summary == $ dim checkpatch origin/drm-tip ba1e4cbe4558 drm/i915: Start passing latency as parameter 2712b33bd072 drm/i915: Introduce skl_plane_wm_level accessor. 535a61cedba3 drm/i915: Init obj state in intel_atomic_get_old/new_global_obj_state -:12: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #12: also in intel_atomic_get_old_global_obj_state and intel_atomic_get_new_global_obj_state -:45: WARNING:LINE_SPACING: Missing a blank line after declarations #45: FILE: drivers/gpu/drm/i915/display/intel_bw.c:395: + struct intel_global_state *bw_state; + bw_state = intel_atomic_get_new_global_obj_state(state, _priv->bw_obj); total: 0 errors, 2 warnings, 0 checks, 49 lines checked 236d09415710 drm/i915: Refactor intel_can_enable_sagv -:77: WARNING:COMMIT_LOG_LONG_LINE: Possible unwrapped commit description (prefer a maximum 75 chars per line) #77: when using skl_plane_wm_level accessor, as we had previously for Gen11+ -:211: CHECK:LINE_SPACING: Please don't use multiple blank lines #211: FILE: drivers/gpu/drm/i915/display/intel_global_state.h:87: + -:306: CHECK:LINE_SPACING: Please don't use multiple blank lines #306: FILE: drivers/gpu/drm/i915/intel_pm.c:3812: + + -:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'state->active_pipes == dev_priv->active_pipes' #367: FILE: drivers/gpu/drm/i915/intel_pm.c:3873: + if ((state->active_pipes == dev_priv->active_pipes) && + (total_affected_planes == 0)) { -:367: CHECK:UNNECESSARY_PARENTHESES: Unnecessary parentheses around 'total_affected_planes == 0' #367: FILE: drivers/gpu/drm/i915/intel_pm.c:3873: + if ((state->active_pipes == dev_priv->active_pipes) && + (total_affected_planes == 0)) { -:413: WARNING:LINE_SPACING: Missing a blank line after declarations #413: FILE: drivers/gpu/drm/i915/intel_pm.c:3919: + int active_pipe_bit = dev_priv->active_pipes & BIT(pipe); + if (active_pipe_bit) { -:590: CHECK:LINE_SPACING: Please don't use multiple blank lines #590: FILE: drivers/gpu/drm/i915/intel_pm.c:4820: + + -:683: WARNING:LONG_LINE: line over 100 characters #683: FILE: drivers/gpu/drm/i915/intel_pm.c:5893: + old_wm->sagv_wm0.min_ddb_alloc : old_wm->wm[0].min_ddb_alloc; -:686: WARNING:LONG_LINE: line over 100 characters #686: FILE: drivers/gpu/drm/i915/intel_pm.c:5896: + new_wm->sagv_wm0.min_ddb_alloc : new_wm->wm[0].min_ddb_alloc; -:798: WARNING:LONG_LINE: line over 100 characters #798: FILE: drivers/gpu/drm/i915/intel_pm.c:6135: + _crtc_state->wm.skl.optimal.planes[plane_id])) { total: 0 errors, 5 warnings, 5 checks, 718 lines checked b2dfa073b7e0 drm/i915: Added required new PCode commands 53edf17a30f9 drm/i915: Restrict qgv points which don't have enough bandwidth. c3ca73c4675f drm/i915: Enable SAGV support for Gen12 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH v4] drm/i915/psr: Force PSR probe only after full initialization
On Fri, 2020-02-21 at 12:11 -0800, Souza, Jose wrote: > On Fri, 2020-02-21 at 20:04 +, Mun, Gwan-gyeong wrote: > > On Thu, 2020-02-20 at 15:15 -0800, José Roberto de Souza wrote: > > > Commit 60c6a14b489b ("drm/i915/display: Force the state compute > > > phase > > > once to enable PSR") was forcing the state compute too earlier > > > causing errors because not everything was initialized, so here > > > moving to the end of i915_driver_modeset_probe() when the display > > > is > > > all initialized. > > > > > > Also fixing the place where it disarm the force probe as during > > > the > > > atomic check phase errors could happen like the ones due locking > > > and > > > it would cause PSR to never be enabled if that happens. > > > Leaving the disarm to the atomic commit phase, intel_psr_enable() > > > or > > > intel_psr_update() will be called even if the current state do > > > not > > > allow PSR to be enabled. > > > > > > v2: Check if intel_dp is null in > > > intel_psr_force_mode_changed_set() > > > v3: Check intel_dp before get dev_priv > > > v4: > > > - renamed intel_psr_force_mode_changed_set() to > > > intel_psr_set_force_mode_changed() > > > - removed the set parameter from > > > intel_psr_set_force_mode_changed() > > > - not calling intel_psr_set_force_mode_changed() from > > > intel_psr_enable/update(), directly setting it after the same > > > checks > > > that intel_psr_set_force_mode_changed() does > > > - moved intel_psr_set_force_mode_changed() arm call to > > > i915_driver_modeset_probe() as it is a better for a PSR call, all > > > the > > > functions calls happening between the old and the new function > > > call > > > will cause issue > > > > > > Fixes: 60c6a14b489b ("drm/i915/display: Force the state compute > > > phase > > > once to enable PSR") > > > Closes: https://gitlab.freedesktop.org/drm/intel/issues/1151 > > > Tested-by: Ross Zwisler > > > Reported-by: Ross Zwisler > > > Cc: Gwan-gyeong Mun > > > Cc: Jani Nikula > > > Cc: Anshuman Gupta > > > Signed-off-by: José Roberto de Souza > > > --- > > > drivers/gpu/drm/i915/display/intel_psr.c | 25 > > > > > > > > > drivers/gpu/drm/i915/display/intel_psr.h | 1 + > > > drivers/gpu/drm/i915/i915_drv.c | 3 +++ > > > drivers/gpu/drm/i915/i915_drv.h | 2 +- > > > 4 files changed, 26 insertions(+), 5 deletions(-) > > > > > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c > > > b/drivers/gpu/drm/i915/display/intel_psr.c > > > index b4942b6445ae..7e754201f54d 100644 > > > --- a/drivers/gpu/drm/i915/display/intel_psr.c > > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c > > > @@ -936,10 +936,12 @@ void intel_psr_enable(struct intel_dp > > > *intel_dp, > > > { > > > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); > > > > > > - if (!crtc_state->has_psr) > > Enabling of crtc_state->has_psr is handled on > > intel_psr_compute_config(). > > And the intel_psr_compute_config() checks "CAN_PSR(dev_priv) and > > intel_dp != dev_priv->psr.dp". > > therefore if we have this line "if (!crtc_state->has_psr)", we > > don't > > need to add "if (!CAN_PSR(dev_priv) || dev_priv->psr.dp != > > intel_dp)" > > crtc_state->has_psr will only be set to true if the state allows, we > don't want to keep computing pipe configuration for every following > page flip if PSR can not be enable(like PSR setup time do not fit in > vblank). > Yes, you are right. we also have to handle the case which can not support PSR. (I missed those cases.) > That is why it is unseting force_mode_changed even if crtc_state- > > has_psr is false. > > Except that, looks good to me. > > > > Reviewed-by: Gwan-gyeong Mun > > > > > + if (!CAN_PSR(dev_priv) || dev_priv->psr.dp != intel_dp) > > > return; > > > > > > - if (drm_WARN_ON(_priv->drm, !CAN_PSR(dev_priv))) > > > + dev_priv->psr.force_mode_changed = false; > > > + > > > + if (!crtc_state->has_psr) > > > return; > > > > > > drm_WARN_ON(_priv->drm, dev_priv->drrs.dp); > > > @@ -1099,6 +1101,8 @@ void intel_psr_update(struct intel_dp > > > *intel_dp, > > > if (!CAN_PSR(dev_priv) || READ_ONCE(psr->dp) != intel_dp) > > > return; > > > > > > + dev_priv->psr.force_mode_changed = false; > > > + > > > mutex_lock(_priv->psr.lock); > > > > > > enable = crtc_state->has_psr && psr_global_enabled(dev_priv); > > > @@ -1629,7 +1633,7 @@ void intel_psr_atomic_check(struct > > > drm_connector *connector, > > > struct drm_crtc_state *crtc_state; > > > > > > if (!CAN_PSR(dev_priv) || !new_state->crtc || > > > - dev_priv->psr.initially_probed) > > > + !dev_priv->psr.force_mode_changed) > > > return; > > > > > > intel_connector = to_intel_connector(connector); > > > @@ -1640,5 +1644,18 @@ void intel_psr_atomic_check(struct > > > drm_connector *connector, > > > crtc_state = drm_atomic_get_new_crtc_state(new_state->state, > > > new_state->crtc); > > >
[Intel-gfx] ✗ Fi.CI.BUILD: failure for series starting with [1/3] drm/i915: Flush idle barriers when waiting (rev2)
== Series Details == Series: series starting with [1/3] drm/i915: Flush idle barriers when waiting (rev2) URL : https://patchwork.freedesktop.org/series/73751/ State : failure == Summary == Applying: drm/i915: Flush idle barriers when waiting Applying: drm/i915: Allow userspace to specify ringsize on construction Applying: drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl Using index info to reconstruct a base tree... M drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c Falling back to patching base and 3-way merge... Auto-merging drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c CONFLICT (content): Merge conflict in drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c error: Failed to merge in the changes. hint: Use 'git am --show-current-patch' to see the failed patch Patch failed at 0003 drm/i915/gem: Only call eb_lookup_vma once during execbuf ioctl When you have resolved this problem, run "git am --continue". If you prefer to skip this patch, run "git am --skip" instead. To restore the original branch and stop patching, run "git am --abort". ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Re: [Intel-gfx] [PATCH 52/52] drm: Add docs for managed resources
Hi Daniel. > What I miss in all of this is how do other subsystems deal > with the different lifetime of their stuff? > Or maybe only drm really has this issue? > Anything we could learn from others? Reading through the thread - this is all covered in more than sufficient details in other mails. So forget this comment. Sam ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 41/51] drm/tidss: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... I'm pretty sure this one blows up already under KASAN because it's using devm_drm_dev_init, and later on devm_kzalloc. Hence the memory will get freed before the final drm_dev_put (all from the devres code), but the cleanup in that final drm_dev_put will access the just freed memory. Unfortunately fixing this properly needs slightly more work, namely drmm_ versions for all the drm objects (planes, crtc, ...), so that the cleanup actually happens before even drmm_kzalloc would release the underlying memory. Not quite there yet. v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Jyri Sarha Cc: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4 drivers/gpu/drm/tidss/tidss_kms.c | 19 +-- drivers/gpu/drm/tidss/tidss_kms.h | 1 - 3 files changed, 5 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index 460d5e9d0cf4..ad449d104306 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -103,11 +103,7 @@ static const struct dev_pm_ops tidss_pm_ops = { static void tidss_release(struct drm_device *ddev) { - struct tidss_device *tidss = ddev->dev_private; - drm_kms_helper_poll_fini(ddev); - - tidss_modeset_cleanup(tidss); } DEFINE_DRM_GEM_CMA_FOPS(tidss_fops); diff --git a/drivers/gpu/drm/tidss/tidss_kms.c b/drivers/gpu/drm/tidss/tidss_kms.c index 5311e0f1c551..87e07e0e4eae 100644 --- a/drivers/gpu/drm/tidss/tidss_kms.c +++ b/drivers/gpu/drm/tidss/tidss_kms.c @@ -208,7 +208,9 @@ int tidss_modeset_init(struct tidss_device *tidss) dev_dbg(tidss->dev, "%s\n", __func__); - drm_mode_config_init(ddev); + ret = drm_mode_config_init(ddev); + if (ret) + return ret; ddev->mode_config.min_width = 8; ddev->mode_config.min_height = 8; @@ -220,11 +222,11 @@ int tidss_modeset_init(struct tidss_device *tidss) ret = tidss_dispc_modeset_init(tidss); if (ret) - goto err_mode_config_cleanup; + return ret; ret = drm_vblank_init(ddev, tidss->num_crtcs); if (ret) - goto err_mode_config_cleanup; + return ret; /* Start with vertical blanking interrupt reporting disabled. */ for (i = 0; i < tidss->num_crtcs; ++i) @@ -235,15 +237,4 @@ int tidss_modeset_init(struct tidss_device *tidss) dev_dbg(tidss->dev, "%s done\n", __func__); return 0; - -err_mode_config_cleanup: - drm_mode_config_cleanup(ddev); - return ret; -} - -void tidss_modeset_cleanup(struct tidss_device *tidss) -{ - struct drm_device *ddev = >ddev; - - drm_mode_config_cleanup(ddev); } diff --git a/drivers/gpu/drm/tidss/tidss_kms.h b/drivers/gpu/drm/tidss/tidss_kms.h index dda5625d0128..99aaff099f22 100644 --- a/drivers/gpu/drm/tidss/tidss_kms.h +++ b/drivers/gpu/drm/tidss/tidss_kms.h @@ -10,6 +10,5 @@ struct tidss_device; int tidss_modeset_init(struct tidss_device *tidss); -void tidss_modeset_cleanup(struct tidss_device *tidss); #endif -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 44/51] drm/gm12u320: Use helpers for shutdown/suspend/resume
Also there's a race in the disconnect implemenation. First shut down, then unplug, leaves a window where userspace could sneak in and restart the entire machinery. With this we can also delete the very un-atomic global pipe_enabled tracking. Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/gm12u320.c | 16 +++- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index 65dfb87ccb13..c22b2ee470eb 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -88,7 +88,6 @@ struct gm12u320_device { struct usb_device *udev; unsigned char *cmd_buf; unsigned char *data_buf[GM12U320_BLOCK_COUNT]; - bool pipe_enabled; struct { bool run; struct workqueue_struct *workq; @@ -589,7 +588,6 @@ static void gm12u320_pipe_enable(struct drm_simple_display_pipe *pipe, gm12u320_fb_mark_dirty(plane_state->fb, ); gm12u320_start_fb_update(gm12u320); - gm12u320->pipe_enabled = true; } static void gm12u320_pipe_disable(struct drm_simple_display_pipe *pipe) @@ -597,7 +595,6 @@ static void gm12u320_pipe_disable(struct drm_simple_display_pipe *pipe) struct gm12u320_device *gm12u320 = pipe->crtc.dev->dev_private; gm12u320_stop_fb_update(gm12u320); - gm12u320->pipe_enabled = false; } static void gm12u320_pipe_update(struct drm_simple_display_pipe *pipe, @@ -733,22 +730,17 @@ static int gm12u320_usb_probe(struct usb_interface *interface, static void gm12u320_usb_disconnect(struct usb_interface *interface) { struct drm_device *dev = usb_get_intfdata(interface); - struct gm12u320_device *gm12u320 = dev->dev_private; - gm12u320_stop_fb_update(gm12u320); drm_dev_unplug(dev); + drm_atomic_helper_shutdown(dev); } static __maybe_unused int gm12u320_suspend(struct usb_interface *interface, pm_message_t message) { struct drm_device *dev = usb_get_intfdata(interface); - struct gm12u320_device *gm12u320 = dev->dev_private; - if (gm12u320->pipe_enabled) - gm12u320_stop_fb_update(gm12u320); - - return 0; + return drm_mode_config_helper_suspend(dev); } static __maybe_unused int gm12u320_resume(struct usb_interface *interface) @@ -757,10 +749,8 @@ static __maybe_unused int gm12u320_resume(struct usb_interface *interface) struct gm12u320_device *gm12u320 = dev->dev_private; gm12u320_set_ecomode(gm12u320); - if (gm12u320->pipe_enabled) - gm12u320_start_fb_update(gm12u320); - return 0; + return drm_mode_config_helper_resume(dev); } static const struct usb_device_id id_table[] = { -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 34/51] drm/meson: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: This driver gets its devm_ stuff all wrong wrt drm_device and anything hanging off that. Not the only one unfortunately. v2: Explain why this cleanup is possible (Laurent). Reviewed-by: Neil Armstrong Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Neil Armstrong Cc: Kevin Hilman Cc: linux-amlo...@lists.infradead.org Cc: linux-arm-ker...@lists.infradead.org --- drivers/gpu/drm/meson/meson_drv.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/meson/meson_drv.c b/drivers/gpu/drm/meson/meson_drv.c index b5f5eb7b4bb9..ae94d14ab7bc 100644 --- a/drivers/gpu/drm/meson/meson_drv.c +++ b/drivers/gpu/drm/meson/meson_drv.c @@ -284,7 +284,9 @@ static int meson_drv_bind_master(struct device *dev, bool has_components) /* Remove early framebuffers (ie. simplefb) */ meson_remove_framebuffers(); - drm_mode_config_init(drm); + ret = drm_mode_config_init(drm); + if (ret) + goto free_drm; drm->mode_config.max_width = 3840; drm->mode_config.max_height = 2160; drm->mode_config.funcs = _mode_config_funcs; @@ -379,7 +381,6 @@ static void meson_drv_unbind(struct device *dev) drm_dev_unregister(drm); drm_irq_uninstall(drm); drm_kms_helper_poll_fini(drm); - drm_mode_config_cleanup(drm); drm_dev_put(drm); } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 48/51] drm/mipi-dbi: Drop explicit drm_mode_config_cleanup call
Allows us to drop the drm_driver.release callback from all drivers, and remove the mipi_dbi_release() function. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: David Lechner Cc: Kamlesh Gurudasani Cc: "Noralf Trønnes" Cc: Sam Ravnborg --- drivers/gpu/drm/drm_mipi_dbi.c | 16 drivers/gpu/drm/tiny/hx8357d.c | 1 - drivers/gpu/drm/tiny/ili9225.c | 1 - drivers/gpu/drm/tiny/ili9341.c | 1 - drivers/gpu/drm/tiny/ili9486.c | 1 - drivers/gpu/drm/tiny/mi0283qt.c | 1 - drivers/gpu/drm/tiny/st7586.c | 1 - drivers/gpu/drm/tiny/st7735r.c | 1 - include/drm/drm_mipi_dbi.h | 1 - 9 files changed, 24 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 9de1586659be..c0060a1c569f 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -582,22 +582,6 @@ int mipi_dbi_dev_init(struct mipi_dbi_dev *dbidev, } EXPORT_SYMBOL(mipi_dbi_dev_init); -/** - * mipi_dbi_release - DRM driver release helper - * @drm: DRM device - * - * This function finalizes and frees _dbi. - * - * Drivers can use this as their _driver->release callback. - */ -void mipi_dbi_release(struct drm_device *drm) -{ - DRM_DEBUG_DRIVER("\n"); - - drm_mode_config_cleanup(drm); -} -EXPORT_SYMBOL(mipi_dbi_release); - /** * mipi_dbi_hw_reset - Hardware reset of controller * @dbi: MIPI DBI structure diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index c88b84366dc5..af7f3d10aac3 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -196,7 +196,6 @@ DEFINE_DRM_GEM_CMA_FOPS(hx8357d_fops); static struct drm_driver hx8357d_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= mipi_dbi_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .debugfs_init = mipi_dbi_debugfs_init, .name = "hx8357d", diff --git a/drivers/gpu/drm/tiny/ili9225.c b/drivers/gpu/drm/tiny/ili9225.c index fa998a16026c..118477af4491 100644 --- a/drivers/gpu/drm/tiny/ili9225.c +++ b/drivers/gpu/drm/tiny/ili9225.c @@ -346,7 +346,6 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9225_fops); static struct drm_driver ili9225_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= mipi_dbi_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .name = "ili9225", .desc = "Ilitek ILI9225", diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c index 945e15169866..e152de369019 100644 --- a/drivers/gpu/drm/tiny/ili9341.c +++ b/drivers/gpu/drm/tiny/ili9341.c @@ -152,7 +152,6 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9341_fops); static struct drm_driver ili9341_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= mipi_dbi_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .debugfs_init = mipi_dbi_debugfs_init, .name = "ili9341", diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index 38d293cf5377..577aea662aa4 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -165,7 +165,6 @@ DEFINE_DRM_GEM_CMA_FOPS(ili9486_fops); static struct drm_driver ili9486_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= mipi_dbi_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .debugfs_init = mipi_dbi_debugfs_init, .name = "ili9486", diff --git a/drivers/gpu/drm/tiny/mi0283qt.c b/drivers/gpu/drm/tiny/mi0283qt.c index b8c973bc2347..decaf57053ff 100644 --- a/drivers/gpu/drm/tiny/mi0283qt.c +++ b/drivers/gpu/drm/tiny/mi0283qt.c @@ -156,7 +156,6 @@ DEFINE_DRM_GEM_CMA_FOPS(mi0283qt_fops); static struct drm_driver mi0283qt_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= mipi_dbi_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .debugfs_init = mipi_dbi_debugfs_init, .name = "mi0283qt", diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index
[Intel-gfx] [PATCH 47/51] drm/mipi-dbi: Move drm_mode_config_init into mipi library
7/7 drivers agree that's the right choice, let's do this. This avoids duplicating the same old error checking code over all 7 drivers, which is the motivation here. Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: David Lechner Cc: Kamlesh Gurudasani Cc: "Noralf Trønnes" Cc: Sam Ravnborg --- drivers/gpu/drm/drm_mipi_dbi.c | 4 drivers/gpu/drm/tiny/hx8357d.c | 2 -- drivers/gpu/drm/tiny/ili9225.c | 2 -- drivers/gpu/drm/tiny/ili9341.c | 2 -- drivers/gpu/drm/tiny/ili9486.c | 2 -- drivers/gpu/drm/tiny/mi0283qt.c | 2 -- drivers/gpu/drm/tiny/st7586.c | 2 -- drivers/gpu/drm/tiny/st7735r.c | 2 -- 8 files changed, 4 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index a678e07508d4..9de1586659be 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -510,6 +510,10 @@ int mipi_dbi_dev_init_with_formats(struct mipi_dbi_dev *dbidev, if (!dbidev->dbi.command) return -EINVAL; + ret = drm_mode_config_init(drm); + if (ret) + return ret; + dbidev->tx_buf = devm_kmalloc(drm->dev, tx_buf_size, GFP_KERNEL); if (!dbidev->tx_buf) return -ENOMEM; diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index 42bc5dadcb1c..c88b84366dc5 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -239,8 +239,6 @@ static int hx8357d_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dc = devm_gpiod_get(dev, "dc", GPIOD_OUT_LOW); if (IS_ERR(dc)) { DRM_DEV_ERROR(dev, "Failed to get gpio 'dc'\n"); diff --git a/drivers/gpu/drm/tiny/ili9225.c b/drivers/gpu/drm/tiny/ili9225.c index aae88dc5b3f7..fa998a16026c 100644 --- a/drivers/gpu/drm/tiny/ili9225.c +++ b/drivers/gpu/drm/tiny/ili9225.c @@ -390,8 +390,6 @@ static int ili9225_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) { DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c index 7d40cb4ff72b..945e15169866 100644 --- a/drivers/gpu/drm/tiny/ili9341.c +++ b/drivers/gpu/drm/tiny/ili9341.c @@ -197,8 +197,6 @@ static int ili9341_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dbi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) { DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index 7d735fc67498..38d293cf5377 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -211,8 +211,6 @@ static int ili9486_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) { DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); diff --git a/drivers/gpu/drm/tiny/mi0283qt.c b/drivers/gpu/drm/tiny/mi0283qt.c index 8555a56bce8c..b8c973bc2347 100644 --- a/drivers/gpu/drm/tiny/mi0283qt.c +++ b/drivers/gpu/drm/tiny/mi0283qt.c @@ -201,8 +201,6 @@ static int mi0283qt_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dbi->reset = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) { DRM_DEV_ERROR(dev, "Failed to get gpio 'reset'\n"); diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index 427c2561f5f4..1f1a576be93c 100644 --- a/drivers/gpu/drm/tiny/st7586.c +++ b/drivers/gpu/drm/tiny/st7586.c @@ -331,8 +331,6 @@ static int st7586_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - bufsize = (st7586_mode.vdisplay + 2) / 3 * st7586_mode.hdisplay; dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index b447235c3d47..0f48a5a2d3d7 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -212,8 +212,6 @@ static int st7735r_probe(struct spi_device *spi) } drmm_add_final_kfree(drm, dbidev); - drm_mode_config_init(drm); - dbi->reset = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); if (IS_ERR(dbi->reset)) { DRM_DEV_ERROR(dev, "Failed to get
[Intel-gfx] [PATCH 42/51] drm/gm12u320: More drmm_
The drm_mode_config_cleanup call we can drop, and all the allocations we can switch over to drmm_kzalloc. Unfortunately the work queue is still present, so can't get rid of the drm_driver->release function outright. Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/gm12u320.c | 18 +++--- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index 3928f69bbd3d..5bd26fc6fafa 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -160,7 +160,7 @@ static int gm12u320_usb_alloc(struct gm12u320_device *gm12u320) int i, block_size; const char *hdr; - gm12u320->cmd_buf = kmalloc(CMD_SIZE, GFP_KERNEL); + gm12u320->cmd_buf = drmm_kmalloc(>dev, CMD_SIZE, GFP_KERNEL); if (!gm12u320->cmd_buf) return -ENOMEM; @@ -173,7 +173,8 @@ static int gm12u320_usb_alloc(struct gm12u320_device *gm12u320) hdr = data_block_header; } - gm12u320->data_buf[i] = kzalloc(block_size, GFP_KERNEL); + gm12u320->data_buf[i] = drmm_kzalloc(>dev, +block_size, GFP_KERNEL); if (!gm12u320->data_buf[i]) return -ENOMEM; @@ -192,15 +193,8 @@ static int gm12u320_usb_alloc(struct gm12u320_device *gm12u320) static void gm12u320_usb_free(struct gm12u320_device *gm12u320) { - int i; - if (gm12u320->fb_update.workq) destroy_workqueue(gm12u320->fb_update.workq); - - for (i = 0; i < GM12U320_BLOCK_COUNT; i++) - kfree(gm12u320->data_buf[i]); - - kfree(gm12u320->cmd_buf); } static int gm12u320_misc_request(struct gm12u320_device *gm12u320, @@ -636,7 +630,6 @@ static void gm12u320_driver_release(struct drm_device *dev) struct gm12u320_device *gm12u320 = dev->dev_private; gm12u320_usb_free(gm12u320); - drm_mode_config_cleanup(dev); } DEFINE_DRM_GEM_FOPS(gm12u320_fops); @@ -693,7 +686,10 @@ static int gm12u320_usb_probe(struct usb_interface *interface, dev->dev_private = gm12u320; drmm_add_final_kfree(dev, gm12u320); - drm_mode_config_init(dev); + ret = drm_mode_config_init(dev); + if (ret) + goto err_put; + dev->mode_config.min_width = GM12U320_USER_WIDTH; dev->mode_config.max_width = GM12U320_USER_WIDTH; dev->mode_config.min_height = GM12U320_HEIGHT; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 46/51] drm/repaper: Drop explicit drm_mode_config_cleanup call
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/repaper.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c index 4741ff670ec9..2f70fb1be200 100644 --- a/drivers/gpu/drm/tiny/repaper.c +++ b/drivers/gpu/drm/tiny/repaper.c @@ -909,13 +909,6 @@ static const struct drm_mode_config_funcs repaper_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static void repaper_release(struct drm_device *drm) -{ - DRM_DEBUG_DRIVER("\n"); - - drm_mode_config_cleanup(drm); -} - static const uint32_t repaper_formats[] = { DRM_FORMAT_XRGB, }; @@ -953,7 +946,6 @@ DEFINE_DRM_GEM_CMA_FOPS(repaper_fops); static struct drm_driver repaper_driver = { .driver_features= DRIVER_GEM | DRIVER_MODESET | DRIVER_ATOMIC, .fops = _fops, - .release= repaper_release, DRM_GEM_CMA_VMAP_DRIVER_OPS, .name = "repaper", .desc = "Pervasive Displays RePaper e-ink panels", -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 40/51] drm/mtk: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 9 - 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 0563c681..947b2cbe2836 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -162,7 +162,9 @@ static int mtk_drm_kms_init(struct drm_device *drm) } private->mutex_dev = >dev; - drm_mode_config_init(drm); + ret = drm_mode_config_init(drm); + if (ret) + return ret; drm->mode_config.min_width = 64; drm->mode_config.min_height = 64; @@ -179,7 +181,7 @@ static int mtk_drm_kms_init(struct drm_device *drm) ret = component_bind_all(drm->dev, drm); if (ret) - goto err_config_cleanup; + return ret; /* * We currently support two fixed data streams, each optional, @@ -255,8 +257,6 @@ static int mtk_drm_kms_init(struct drm_device *drm) dma_dev->dma_parms = NULL; err_component_unbind: component_unbind_all(drm->dev, drm); -err_config_cleanup: - drm_mode_config_cleanup(drm); return ret; } @@ -272,7 +272,6 @@ static void mtk_drm_kms_deinit(struct drm_device *drm) private->dma_dev->dma_parms = NULL; component_unbind_all(drm->dev, drm); - drm_mode_config_cleanup(drm); } static const struct file_operations mtk_drm_fops = { -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 51/51] drm: Add docs for managed resources
All collected together to provide a consistent story in one patch, instead of the somewhat bumpy refactor-evolution leading to this. Also some thoughts on what the next steps could be: - Create a macro called devm_drm_dev_alloc() which essentially wraps the kzalloc(); devm_drm_dev_init(); drmm_add_final_kfree() combo. Needs to be a macro since we'll have to do some typeof trickery and casting to make this fully generic for all drivers that embed struct drm_device into their own thing. - A lot of the simple drivers now have essentially just drm_dev_unplug(); drm_atomic_helper_shutdown(); as their $bus_driver->remove hook. We could create a devm_mode_config_reset which sets drm_atomic_helper_shutdown as it's cleanup action, and a devm_drm_dev_register with drm_dev_unplug as it's cleanup action, and simple drivers wouldn't have a need for a ->remove function at all, and we could delete them. - For more complicated drivers we need drmm_ versions of a _lot_ more things. All the userspace visible objects (crtc, plane, encoder, crtc), anything else hanging of those (maybe a drmm_get_edid, at least for panels and other built-in stuff). Also some more thoughts on why we're not reusing devm_ with maybe a fake struct device embedded into the drm_device (we can't use the kdev, since that's in each drm_minor). - Code review gets extremely tricky, since every time you see a devm_ you need to carefully check whether the fake device (with the drm_device lifetim) or the real device (with the lifetim of the underlying physical device and driver binding) are used. That's not going to help at all, and we have enormous amounts of drivers who use devm_ where they really shouldn't. Having different types makes sure the compiler type checks this for us and ensures correctness. - The set of functions are very much non-overlapping. E.g. devm_ioremap makes total sense, drmm_ioremap has the wrong lifetime, since hw resources need to be cleaned out at driver unbind and wont outlive that like a drm_device. Similar, but other way round for drmm_connector_init (which is the only correct version, devm_ for drm_connector is just buggy). Simply not having the wrong version again prevents bugs. Finally I guess this opens a huge todo for all the drivers. I'm semi-tempted to do a tree-wide s/devm_kzalloc/drmm_kzalloc/ since most likely that'll fix an enormous amount of bugs and most likely not cause any issues at all (aside from maybe holding onto memory slightly too long). v2: - Doc improvements from Laurent. - Also add kerneldoc for the new drmm_add_action_or_reset. Cc: Laurent Pinchart Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Daniel Vetter --- Documentation/gpu/drm-internals.rst | 6 +++ drivers/gpu/drm/drm_drv.c | 18 +++-- drivers/gpu/drm/drm_managed.c | 61 + include/drm/drm_drv.h | 4 ++ include/drm/drm_managed.h | 58 +++ 5 files changed, 144 insertions(+), 3 deletions(-) diff --git a/Documentation/gpu/drm-internals.rst b/Documentation/gpu/drm-internals.rst index a6b6145fda78..12272b168580 100644 --- a/Documentation/gpu/drm-internals.rst +++ b/Documentation/gpu/drm-internals.rst @@ -138,6 +138,12 @@ Managed Resources .. kernel-doc:: drivers/gpu/drm/drm_managed.c :doc: managed resources +.. kernel-doc:: drivers/gpu/drm/drm_managed.c + :export: + +.. kernel-doc:: include/drm/drm_managed.h + :internal: + Bus-specific Device Registration and PCI Support diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index bb326b9bcde0..f86b2bae0fa0 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -260,9 +260,15 @@ void drm_minor_release(struct drm_minor *minor) * any other resources allocated at device initialization and drop the driver's * reference to _device using drm_dev_put(). * - * Note that the lifetime rules for _device instance has still a lot of - * historical baggage. Hence use the reference counting provided by - * drm_dev_get() and drm_dev_put() only carefully. + * Note that any allocation or resource which is visible to userspace must be + * released only when the final drm_dev_put() is called, and not when the + * driver is unbound from the underlying physical struct Best to use + * _device managed resources with drmm_add_action(), drmm_kmalloc() and + * related functions. + * + * devres managed resources like devm_kmalloc() can only be used for resources + * directly related to the underlying hardware device, and only used in code + * paths fully protected by drm_dev_enter() and drm_dev_exit(). * * Display driver example * ~~ @@ -606,6 +612,9 @@ static void drm_dev_init_release(struct drm_device *dev, void *res) * arbitrary offset, you must supply a _driver.release callback and control * the finalization
[Intel-gfx] [PATCH 31/51] drm/ingenic: Drop explicit drm_mode_config_cleanup call
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 06c195af714e..587369f6c0d7 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -489,11 +489,6 @@ static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg) return IRQ_HANDLED; } -static void ingenic_drm_release(struct drm_device *drm) -{ - drm_mode_config_cleanup(drm); -} - static int ingenic_drm_enable_vblank(struct drm_crtc *crtc) { struct ingenic_drm *priv = drm_crtc_get_priv(crtc); @@ -537,7 +532,6 @@ static struct drm_driver ingenic_drm_driver_data = { .gem_prime_mmap = drm_gem_cma_prime_mmap, .irq_handler= ingenic_drm_irq_handler, - .release= ingenic_drm_release, }; static const struct drm_plane_funcs ingenic_drm_primary_plane_funcs = { @@ -638,7 +632,10 @@ static int ingenic_drm_probe(struct platform_device *pdev) } drmm_add_final_kfree(drm, priv); - drm_mode_config_init(drm); + ret = drm_mode_config_init(drm); + if (ret) + return ret; + drm->mode_config.min_width = 0; drm->mode_config.min_height = 0; drm->mode_config.max_width = soc_info->max_width; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 21/51] drm: Use drmm_ for drm_dev_init cleanup
Well for the simple stuff at least, vblank, gem and minor cleanup I want to further split up as a demonstration. v2: We need to clear drm_device->dev otherwise the debug drm printing after our cleanup hook (e.g. in drm_manged_release) will chase released memory and result in a use-after-free. Not really pretty, but oh well. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 48 --- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 782fd5d6f8b2..1f7ab88d9435 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -580,6 +580,23 @@ static void drm_fs_inode_free(struct inode *inode) *used. */ +static void drm_dev_init_release(struct drm_device *dev, void *res) +{ + drm_legacy_ctxbitmap_cleanup(dev); + drm_legacy_remove_map_hash(dev); + drm_fs_inode_free(dev->anon_inode); + + put_device(dev->dev); + /* Prevent use-after-free in drm_managed_release when debugging is +* enabled. Slightly awkward, but can't really be helped. */ + dev->dev = NULL; + mutex_destroy(>master_mutex); + mutex_destroy(>clientlist_mutex); + mutex_destroy(>filelist_mutex); + mutex_destroy(>struct_mutex); + drm_legacy_destroy_members(dev); +} + /** * drm_dev_init - Initialise new DRM device * @dev: DRM device @@ -647,11 +664,15 @@ int drm_dev_init(struct drm_device *dev, mutex_init(>clientlist_mutex); mutex_init(>master_mutex); + ret = drmm_add_action(dev, drm_dev_init_release, NULL); + if (ret) + return ret; + dev->anon_inode = drm_fs_inode_new(); if (IS_ERR(dev->anon_inode)) { ret = PTR_ERR(dev->anon_inode); DRM_ERROR("Cannot allocate anonymous inode: %d\n", ret); - goto err_free; + goto err; } if (drm_core_check_feature(dev, DRIVER_RENDER)) { @@ -688,19 +709,12 @@ int drm_dev_init(struct drm_device *dev, if (drm_core_check_feature(dev, DRIVER_GEM)) drm_gem_destroy(dev); err_ctxbitmap: - drm_legacy_ctxbitmap_cleanup(dev); - drm_legacy_remove_map_hash(dev); err_minors: drm_minor_free(dev, DRM_MINOR_PRIMARY); drm_minor_free(dev, DRM_MINOR_RENDER); - drm_fs_inode_free(dev->anon_inode); -err_free: - put_device(dev->dev); - mutex_destroy(>master_mutex); - mutex_destroy(>clientlist_mutex); - mutex_destroy(>filelist_mutex); - mutex_destroy(>struct_mutex); - drm_legacy_destroy_members(dev); +err: + drm_managed_release(dev); + return ret; } EXPORT_SYMBOL(drm_dev_init); @@ -763,20 +777,8 @@ void drm_dev_fini(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_GEM)) drm_gem_destroy(dev); - drm_legacy_ctxbitmap_cleanup(dev); - drm_legacy_remove_map_hash(dev); - drm_fs_inode_free(dev->anon_inode); - drm_minor_free(dev, DRM_MINOR_PRIMARY); drm_minor_free(dev, DRM_MINOR_RENDER); - - put_device(dev->dev); - - mutex_destroy(>master_mutex); - mutex_destroy(>clientlist_mutex); - mutex_destroy(>filelist_mutex); - mutex_destroy(>struct_mutex); - drm_legacy_destroy_members(dev); } EXPORT_SYMBOL(drm_dev_fini); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 45/51] drm/gm12u320: Simplify upload work
Instead of having a work item that never stops (which really should be a kthread), with a dedicated workqueue to not upset anyone else, use a delayed work. A bunch of changes: - We can throw out all the custom wakeup and requeue logic and state tracking. If we schedule the work with a 0 delay it'll get scheduled immediately. - Persistent state (frame & draw_status_timeout) need to be moved out of the work. - diff is bigger than the changes, biggest chunk is reindenting the work fn because it lost its while loop. Lots of code deleting as consequence all over. Specifically we can delete the drm_driver.release code now! Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/gm12u320.c | 170 +--- 1 file changed, 67 insertions(+), 103 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index c22b2ee470eb..46f5cea335a7 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -89,13 +89,12 @@ struct gm12u320_device { unsigned char *cmd_buf; unsigned char *data_buf[GM12U320_BLOCK_COUNT]; struct { - bool run; - struct workqueue_struct *workq; - struct work_struct work; - wait_queue_head_twaitq; + struct delayed_work work; struct mutex lock; struct drm_framebuffer *fb; struct drm_rect rect; + int frame; + int draw_status_timeout; } fb_update; }; @@ -183,19 +182,9 @@ static int gm12u320_usb_alloc(struct gm12u320_device *gm12u320) data_block_footer, DATA_BLOCK_FOOTER_SIZE); } - gm12u320->fb_update.workq = create_singlethread_workqueue(DRIVER_NAME); - if (!gm12u320->fb_update.workq) - return -ENOMEM; - return 0; } -static void gm12u320_usb_free(struct gm12u320_device *gm12u320) -{ - if (gm12u320->fb_update.workq) - destroy_workqueue(gm12u320->fb_update.workq); -} - static int gm12u320_misc_request(struct gm12u320_device *gm12u320, u8 req_a, u8 req_b, u8 arg_a, u8 arg_b, u8 arg_c, u8 arg_d) @@ -338,80 +327,76 @@ static void gm12u320_copy_fb_to_blocks(struct gm12u320_device *gm12u320) static void gm12u320_fb_update_work(struct work_struct *work) { struct gm12u320_device *gm12u320 = - container_of(work, struct gm12u320_device, fb_update.work); - int draw_status_timeout = FIRST_FRAME_TIMEOUT; + container_of(to_delayed_work(work), struct gm12u320_device, +fb_update.work); int block, block_size, len; - int frame = 0; int ret = 0; - while (gm12u320->fb_update.run) { - gm12u320_copy_fb_to_blocks(gm12u320); - - for (block = 0; block < GM12U320_BLOCK_COUNT; block++) { - if (block == GM12U320_BLOCK_COUNT - 1) - block_size = DATA_LAST_BLOCK_SIZE; - else - block_size = DATA_BLOCK_SIZE; - - /* Send data command to device */ - memcpy(gm12u320->cmd_buf, cmd_data, CMD_SIZE); - gm12u320->cmd_buf[8] = block_size & 0xff; - gm12u320->cmd_buf[9] = block_size >> 8; - gm12u320->cmd_buf[20] = 0xfc - block * 4; - gm12u320->cmd_buf[21] = block | (frame << 7); - - ret = usb_bulk_msg(gm12u320->udev, - usb_sndbulkpipe(gm12u320->udev, DATA_SND_EPT), - gm12u320->cmd_buf, CMD_SIZE, , - CMD_TIMEOUT); - if (ret || len != CMD_SIZE) - goto err; - - /* Send data block to device */ - ret = usb_bulk_msg(gm12u320->udev, - usb_sndbulkpipe(gm12u320->udev, DATA_SND_EPT), - gm12u320->data_buf[block], block_size, - , DATA_TIMEOUT); - if (ret || len != block_size) - goto err; - - /* Read status */ - ret = usb_bulk_msg(gm12u320->udev, - usb_rcvbulkpipe(gm12u320->udev, DATA_RCV_EPT), - gm12u320->cmd_buf, READ_STATUS_SIZE, , - CMD_TIMEOUT); - if (ret || len != READ_STATUS_SIZE) - goto err; - } + gm12u320_copy_fb_to_blocks(gm12u320); + + for (block = 0; block <
[Intel-gfx] [PATCH 43/51] drm/gm12u320: Use devm_drm_dev_init
Only drops the drm_dev_put, but hey a few lines! Signed-off-by: Daniel Vetter Cc: Hans de Goede Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/gm12u320.c | 19 +++ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index 5bd26fc6fafa..65dfb87ccb13 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -678,7 +678,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface, init_waitqueue_head(>fb_update.waitq); dev = >dev; - ret = drm_dev_init(dev, _drm_driver, >dev); + ret = devm_drm_dev_init(>dev, dev, _drm_driver); if (ret) { kfree(gm12u320); return ret; @@ -688,7 +688,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface, ret = drm_mode_config_init(dev); if (ret) - goto err_put; + return ret; dev->mode_config.min_width = GM12U320_USER_WIDTH; dev->mode_config.max_width = GM12U320_USER_WIDTH; @@ -698,15 +698,15 @@ static int gm12u320_usb_probe(struct usb_interface *interface, ret = gm12u320_usb_alloc(gm12u320); if (ret) - goto err_put; + return ret; ret = gm12u320_set_ecomode(gm12u320); if (ret) - goto err_put; + return ret; ret = gm12u320_conn_init(gm12u320); if (ret) - goto err_put; + return ret; ret = drm_simple_display_pipe_init(>dev, >pipe, @@ -716,22 +716,18 @@ static int gm12u320_usb_probe(struct usb_interface *interface, gm12u320_pipe_modifiers, >conn); if (ret) - goto err_put; + return ret; drm_mode_config_reset(dev); usb_set_intfdata(interface, dev); ret = drm_dev_register(dev, 0); if (ret) - goto err_put; + return ret; drm_fbdev_generic_setup(dev, 0); return 0; - -err_put: - drm_dev_put(dev); - return ret; } static void gm12u320_usb_disconnect(struct usb_interface *interface) @@ -741,7 +737,6 @@ static void gm12u320_usb_disconnect(struct usb_interface *interface) gm12u320_stop_fb_update(gm12u320); drm_dev_unplug(dev); - drm_dev_put(dev); } static __maybe_unused int gm12u320_suspend(struct usb_interface *interface, -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 27/51] drm/bochs: Remove leftover drm_atomic_helper_shutdown
Small mistake that crept into commit 81da8c3b8d3df6f05b11300b7d17ccd1f3017fab Author: Gerd Hoffmann Date: Tue Feb 11 14:52:18 2020 +0100 drm/bochs: add drm_driver.release callback where drm_atomic_helper_shutdown was left in both places. The ->release callback really shouldn't touch hardware. Cc: Gerd Hoffmann Signed-off-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_kms.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index 8066d7d370d5..e8cc8156d773 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -166,6 +166,5 @@ void bochs_kms_fini(struct bochs_device *bochs) if (!bochs->dev->mode_config.num_connector) return; - drm_atomic_helper_shutdown(bochs->dev); drm_mode_config_cleanup(bochs->dev); } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 39/51] drm/shmob: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-...@vger.kernel.org --- drivers/gpu/drm/shmobile/shmob_drm_drv.c | 2 -- drivers/gpu/drm/shmobile/shmob_drm_kms.c | 6 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/shmobile/shmob_drm_drv.c b/drivers/gpu/drm/shmobile/shmob_drm_drv.c index b8c0930959c7..ae9d6b8d3ca8 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_drv.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_drv.c @@ -192,7 +192,6 @@ static int shmob_drm_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); drm_irq_uninstall(ddev); drm_dev_put(ddev); @@ -288,7 +287,6 @@ static int shmob_drm_probe(struct platform_device *pdev) drm_irq_uninstall(ddev); err_modeset_cleanup: drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); err_free_drm_dev: drm_dev_put(ddev); diff --git a/drivers/gpu/drm/shmobile/shmob_drm_kms.c b/drivers/gpu/drm/shmobile/shmob_drm_kms.c index c51197b6fd85..e6e34bb75ba0 100644 --- a/drivers/gpu/drm/shmobile/shmob_drm_kms.c +++ b/drivers/gpu/drm/shmobile/shmob_drm_kms.c @@ -126,7 +126,11 @@ static const struct drm_mode_config_funcs shmob_drm_mode_config_funcs = { int shmob_drm_modeset_init(struct shmob_drm_device *sdev) { - drm_mode_config_init(sdev->ddev); + int ret; + + ret = drm_mode_config_init(sdev->ddev); + if (ret) + return ret; shmob_drm_crtc_create(sdev); shmob_drm_encoder_create(sdev); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 29/51] drm/cirrus: Drop explicit drm_mode_config_cleanup call
We can even delete the drm_driver.release hook now! This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: virtualizat...@lists.linux-foundation.org --- drivers/gpu/drm/cirrus/cirrus.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c b/drivers/gpu/drm/cirrus/cirrus.c index a9d789a56536..6ac0286810ec 100644 --- a/drivers/gpu/drm/cirrus/cirrus.c +++ b/drivers/gpu/drm/cirrus/cirrus.c @@ -510,11 +510,15 @@ static const struct drm_mode_config_funcs cirrus_mode_config_funcs = { .atomic_commit = drm_atomic_helper_commit, }; -static void cirrus_mode_config_init(struct cirrus_device *cirrus) +static int cirrus_mode_config_init(struct cirrus_device *cirrus) { struct drm_device *dev = >dev; + int ret; + + ret = drm_mode_config_init(dev); + if (ret) + return ret; - drm_mode_config_init(dev); dev->mode_config.min_width = 0; dev->mode_config.min_height = 0; dev->mode_config.max_width = CIRRUS_MAX_PITCH / 2; @@ -522,15 +526,12 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus) dev->mode_config.preferred_depth = 16; dev->mode_config.prefer_shadow = 0; dev->mode_config.funcs = _mode_config_funcs; + + return 0; } /* -- */ -static void cirrus_release(struct drm_device *dev) -{ - drm_mode_config_cleanup(dev); -} - DEFINE_DRM_GEM_FOPS(cirrus_fops); static struct drm_driver cirrus_driver = { @@ -544,7 +545,6 @@ static struct drm_driver cirrus_driver = { .fops= _fops, DRM_GEM_SHMEM_DRIVER_OPS, - .release = cirrus_release, }; static int cirrus_pci_probe(struct pci_dev *pdev, @@ -591,7 +591,9 @@ static int cirrus_pci_probe(struct pci_dev *pdev, if (cirrus->mmio == NULL) goto err_unmap_vram; - cirrus_mode_config_init(cirrus); + ret = cirrus_mode_config_init(cirrus); + if (ret) + goto err_cleanup; ret = cirrus_conn_init(cirrus); if (ret < 0) @@ -613,7 +615,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev, return 0; err_cleanup: - drm_mode_config_cleanup(dev); iounmap(cirrus->mmio); err_unmap_vram: iounmap(cirrus->vram); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 33/51] drm/mcde: More devm_drm_dev_init
Auto-unwind ftw, now possible with the fixed drm_device related management. Aside, clk/regulator seem to be missing devm versions for a bunch of functions, preventing a pile of these simpler drivers from outright losing their ->remove hook. Reviewed-by: Linus Walleij Signed-off-by: Daniel Vetter Cc: Linus Walleij --- drivers/gpu/drm/mcde/mcde_drv.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index b8ca5e51..3e92a44397cf 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -312,7 +312,7 @@ static int mcde_probe(struct platform_device *pdev) return -ENOMEM; mcde->dev = dev; - ret = drm_dev_init(>drm, _drm_driver, dev); + ret = devm_drm_dev_init(dev, >drm, _drm_driver); if (ret) { kfree(mcde); return ret; @@ -331,12 +331,12 @@ static int mcde_probe(struct platform_device *pdev) if (IS_ERR(mcde->epod)) { ret = PTR_ERR(mcde->epod); dev_err(dev, "can't get EPOD regulator\n"); - goto dev_unref; + return ret; } ret = regulator_enable(mcde->epod); if (ret) { dev_err(dev, "can't enable EPOD regulator\n"); - goto dev_unref; + return ret; } mcde->vana = devm_regulator_get(dev, "vana"); if (IS_ERR(mcde->vana)) { @@ -487,8 +487,6 @@ static int mcde_probe(struct platform_device *pdev) regulator_disable(mcde->vana); regulator_epod_off: regulator_disable(mcde->epod); -dev_unref: - drm_dev_put(drm); return ret; } @@ -502,7 +500,6 @@ static int mcde_remove(struct platform_device *pdev) clk_disable_unprepare(mcde->mcde_clk); regulator_disable(mcde->vana); regulator_disable(mcde->epod); - drm_dev_put(drm); return 0; } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 24/51] drm: Manage drm_vblank_cleanup with drmm_
Nothing special here, except that this is the first time that we automatically clean up something that's initialized with an explicit driver call. But the cleanup was done at the very of the release sequence for all drivers, and that's still the case. At least without more uses of drmm_ through explicit driver calls. Also for this one we need drmm_kcalloc, so lets add those v2: Sort includes (Laurent) Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 1 - drivers/gpu/drm/drm_internal.h | 1 - drivers/gpu/drm/drm_vblank.c | 31 --- include/drm/drm_managed.h | 16 4 files changed, 28 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 7b3df1188da9..b8db2cc4a19b 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -752,7 +752,6 @@ EXPORT_SYMBOL(devm_drm_dev_init); */ void drm_dev_fini(struct drm_device *dev) { - drm_vblank_cleanup(dev); } EXPORT_SYMBOL(drm_dev_fini); diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index cb09e95a795e..e67015d07c4c 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -94,7 +94,6 @@ void drm_managed_release(struct drm_device *dev); /* drm_vblank.c */ void drm_vblank_disable_and_save(struct drm_device *dev, unsigned int pipe); -void drm_vblank_cleanup(struct drm_device *dev); /* IOCTLS */ int drm_wait_vblank_ioctl(struct drm_device *dev, void *data, diff --git a/drivers/gpu/drm/drm_vblank.c b/drivers/gpu/drm/drm_vblank.c index 47fc4339ec7f..5a6ec8aa0873 100644 --- a/drivers/gpu/drm/drm_vblank.c +++ b/drivers/gpu/drm/drm_vblank.c @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -425,14 +426,10 @@ static void vblank_disable_fn(struct timer_list *t) spin_unlock_irqrestore(>vbl_lock, irqflags); } -void drm_vblank_cleanup(struct drm_device *dev) +static void drm_vblank_init_release(struct drm_device *dev, void *ptr) { unsigned int pipe; - /* Bail if the driver didn't call drm_vblank_init() */ - if (dev->num_crtcs == 0) - return; - for (pipe = 0; pipe < dev->num_crtcs; pipe++) { struct drm_vblank_crtc *vblank = >vblank[pipe]; @@ -441,10 +438,6 @@ void drm_vblank_cleanup(struct drm_device *dev) del_timer_sync(>disable_timer); } - - kfree(dev->vblank); - - dev->num_crtcs = 0; } /** @@ -453,25 +446,29 @@ void drm_vblank_cleanup(struct drm_device *dev) * @num_crtcs: number of CRTCs supported by @dev * * This function initializes vblank support for @num_crtcs display pipelines. - * Cleanup is handled by the DRM core, or through calling drm_dev_fini() for - * drivers with a _driver.release callback. + * Cleanup is handled automatically through a cleanup function added with + * drmm_add_action(). * * Returns: * Zero on success or a negative error code on failure. */ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) { - int ret = -ENOMEM; + int ret; unsigned int i; spin_lock_init(>vbl_lock); spin_lock_init(>vblank_time_lock); + dev->vblank = drmm_kcalloc(dev, num_crtcs, sizeof(*dev->vblank), GFP_KERNEL); + if (!dev->vblank) + return -ENOMEM; + dev->num_crtcs = num_crtcs; - dev->vblank = kcalloc(num_crtcs, sizeof(*dev->vblank), GFP_KERNEL); - if (!dev->vblank) - goto err; + ret = drmm_add_action(dev, drm_vblank_init_release, NULL); + if (ret) + return ret; for (i = 0; i < num_crtcs; i++) { struct drm_vblank_crtc *vblank = >vblank[i]; @@ -486,10 +483,6 @@ int drm_vblank_init(struct drm_device *dev, unsigned int num_crtcs) DRM_INFO("Supports vblank timestamp caching Rev 2 (21.10.2013).\n"); return 0; - -err: - dev->num_crtcs = 0; - return ret; } EXPORT_SYMBOL(drm_vblank_init); diff --git a/include/drm/drm_managed.h b/include/drm/drm_managed.h index 5280209dff92..2b1ba2ad5582 100644 --- a/include/drm/drm_managed.h +++ b/include/drm/drm_managed.h @@ -4,6 +4,7 @@ #define _DRM_MANAGED_H_ #include +#include #include struct drm_device; @@ -28,6 +29,21 @@ static inline void *drmm_kzalloc(struct drm_device *dev, size_t size, gfp_t gfp) { return drmm_kmalloc(dev, size, gfp | __GFP_ZERO); } +static inline void *drmm_kmalloc_array(struct drm_device *dev, + size_t n, size_t size, gfp_t flags) +{ + size_t bytes; + + if (unlikely(check_mul_overflow(n, size, ))) + return NULL; + + return drmm_kmalloc(dev, bytes, flags); +} +static inline void *drmm_kcalloc(struct drm_device *dev, +size_t n, size_t size, gfp_t flags) +{ + return drmm_kmalloc_array(dev, n, size, flags |
[Intel-gfx] [PATCH 50/51] drm/udl: drop drm_driver.release hook
There's only two functions called from that: drm_kms_helper_poll_fini() and udl_free_urb_list(). Both of these are also called from the ubs_driver->disconnect hook, so entirely pointless to do the same again in the ->release hook. Furthermore by the time we clean up the drm_driver we really shouldn't be touching hardware anymore, so stopping the poll worker and freeing the urb allocations in ->disconnect is the right thing to do. Now disconnect still cleans things up before unregistering the driver, but that's a different issue. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Sean Paul Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: Emil Velikov Cc: Gerd Hoffmann Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: Thomas Gleixner Cc: Alex Deucher --- drivers/gpu/drm/udl/udl_drv.c | 6 -- drivers/gpu/drm/udl/udl_drv.h | 1 - drivers/gpu/drm/udl/udl_main.c | 10 -- 3 files changed, 17 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index b447fb053e78..7f140898df3e 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -34,14 +34,8 @@ static int udl_usb_resume(struct usb_interface *interface) DEFINE_DRM_GEM_FOPS(udl_driver_fops); -static void udl_driver_release(struct drm_device *dev) -{ - udl_fini(dev); -} - static struct drm_driver driver = { .driver_features = DRIVER_ATOMIC | DRIVER_GEM | DRIVER_MODESET, - .release = udl_driver_release, /* gem hooks */ .gem_create_object = udl_driver_gem_create_object, diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index 1de7eb1b6aac..2642f94a63fc 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -76,7 +76,6 @@ int udl_submit_urb(struct drm_device *dev, struct urb *urb, size_t len); void udl_urb_completion(struct urb *urb); int udl_init(struct udl_device *udl); -void udl_fini(struct drm_device *dev); int udl_render_hline(struct drm_device *dev, int log_bpp, struct urb **urb_ptr, const char *front, char **urb_buf_ptr, diff --git a/drivers/gpu/drm/udl/udl_main.c b/drivers/gpu/drm/udl/udl_main.c index 538718919916..f5d27f2a5654 100644 --- a/drivers/gpu/drm/udl/udl_main.c +++ b/drivers/gpu/drm/udl/udl_main.c @@ -351,13 +351,3 @@ int udl_drop_usb(struct drm_device *dev) udl_free_urb_list(dev); return 0; } - -void udl_fini(struct drm_device *dev) -{ - struct udl_device *udl = to_udl(dev); - - drm_kms_helper_poll_fini(dev); - - if (udl->urbs.count) - udl_free_urb_list(dev); -} -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 19/51] drm: Cleanups after drmm_add_final_kfree rollout
A few things: - Update the example driver in the documentation. - We can drop the old kfree in drm_dev_release. - Add a WARN_ON check in drm_dev_register to make sure everyone calls drmm_add_final_kfree and there's no leaks. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 9e62e28bbc62..1ee606b4a4f9 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -297,8 +297,6 @@ void drm_minor_release(struct drm_minor *minor) * * drm_mode_config_cleanup(drm); * drm_dev_fini(drm); - * kfree(priv->userspace_facing); - * kfree(priv); * } * * static struct drm_driver driver_drm_driver = { @@ -326,10 +324,11 @@ void drm_minor_release(struct drm_minor *minor) * kfree(drm); * return ret; * } + * drmm_add_final_kfree(drm, priv); * * drm_mode_config_init(drm); * - * priv->userspace_facing = kzalloc(..., GFP_KERNEL); + * priv->userspace_facing = drmm_kzalloc(..., GFP_KERNEL); * if (!priv->userspace_facing) * return -ENOMEM; * @@ -834,10 +833,6 @@ static void drm_dev_release(struct kref *ref) dev->driver->release(dev); } else { drm_dev_fini(dev); - if (!dev->managed.final_kfree) { - WARN_ON(!list_empty(>managed.resources)); - kfree(dev); - } } drm_managed_release(dev); @@ -960,6 +955,8 @@ int drm_dev_register(struct drm_device *dev, unsigned long flags) struct drm_driver *driver = dev->driver; int ret; + WARN_ON(!dev->managed.final_kfree); + if (drm_dev_needs_global_mutex(dev)) mutex_lock(_global_mutex); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 23/51] drm: Manage drm_gem_init with drmm_
We might want to look into pushing this down into drm_mm_init, but that would mean rolling out return codes to a pile of functions unfortunately. So let's leave that for now. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 8 +--- drivers/gpu/drm/drm_gem.c | 21 ++--- drivers/gpu/drm/drm_internal.h | 1 - 3 files changed, 11 insertions(+), 19 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 03a1fb377830..7b3df1188da9 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -688,13 +688,10 @@ int drm_dev_init(struct drm_device *dev, ret = drm_dev_set_unique(dev, dev_name(parent)); if (ret) - goto err_setunique; + goto err; return 0; -err_setunique: - if (drm_core_check_feature(dev, DRIVER_GEM)) - drm_gem_destroy(dev); err: drm_managed_release(dev); @@ -756,9 +753,6 @@ EXPORT_SYMBOL(devm_drm_dev_init); void drm_dev_fini(struct drm_device *dev) { drm_vblank_cleanup(dev); - - if (drm_core_check_feature(dev, DRIVER_GEM)) - drm_gem_destroy(dev); } EXPORT_SYMBOL(drm_dev_fini); diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm_gem.c index 0b6e6623735e..31095e0f6b9f 100644 --- a/drivers/gpu/drm/drm_gem.c +++ b/drivers/gpu/drm/drm_gem.c @@ -44,6 +44,7 @@ #include #include #include +#include #include #include @@ -77,6 +78,12 @@ * up at a later date, and as our interface with shmfs for memory allocation. */ +static void +drm_gem_init_release(struct drm_device *dev, void *ptr) +{ + drm_vma_offset_manager_destroy(dev->vma_offset_manager); +} + /** * drm_gem_init - Initialize the GEM device fields * @dev: drm_devic structure to initialize @@ -89,7 +96,8 @@ drm_gem_init(struct drm_device *dev) mutex_init(>object_name_lock); idr_init_base(>object_name_idr, 1); - vma_offset_manager = kzalloc(sizeof(*vma_offset_manager), GFP_KERNEL); + vma_offset_manager = drmm_kzalloc(dev, sizeof(*vma_offset_manager), + GFP_KERNEL); if (!vma_offset_manager) { DRM_ERROR("out of memory\n"); return -ENOMEM; @@ -100,16 +108,7 @@ drm_gem_init(struct drm_device *dev) DRM_FILE_PAGE_OFFSET_START, DRM_FILE_PAGE_OFFSET_SIZE); - return 0; -} - -void -drm_gem_destroy(struct drm_device *dev) -{ - - drm_vma_offset_manager_destroy(dev->vma_offset_manager); - kfree(dev->vma_offset_manager); - dev->vma_offset_manager = NULL; + return drmm_add_action(dev, drm_gem_init_release, NULL); } /** diff --git a/drivers/gpu/drm/drm_internal.h b/drivers/gpu/drm/drm_internal.h index 8c2628dfc6c7..cb09e95a795e 100644 --- a/drivers/gpu/drm/drm_internal.h +++ b/drivers/gpu/drm/drm_internal.h @@ -144,7 +144,6 @@ void drm_sysfs_lease_event(struct drm_device *dev); /* drm_gem.c */ struct drm_gem_object; int drm_gem_init(struct drm_device *dev); -void drm_gem_destroy(struct drm_device *dev); int drm_gem_handle_create_tail(struct drm_file *file_priv, struct drm_gem_object *obj, u32 *handlep); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 30/51] drm/cirrus: Fully embrace devm_
With the drm_device lifetime fun cleaned up there's nothing in the way anymore to use devm_ for everything hw releated. Do it, and in the process, throw out the entire onion unwinding. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc: Emil Velikov Cc: Thomas Zimmermann Cc: virtualizat...@lists.linux-foundation.org --- drivers/gpu/drm/cirrus/cirrus.c | 44 +++-- 1 file changed, 14 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c b/drivers/gpu/drm/cirrus/cirrus.c index 6ac0286810ec..1b78a2f88f69 100644 --- a/drivers/gpu/drm/cirrus/cirrus.c +++ b/drivers/gpu/drm/cirrus/cirrus.c @@ -558,7 +558,7 @@ static int cirrus_pci_probe(struct pci_dev *pdev, if (ret) return ret; - ret = pci_enable_device(pdev); + ret = pcim_enable_device(pdev); if (ret) return ret; @@ -569,39 +569,38 @@ static int cirrus_pci_probe(struct pci_dev *pdev, ret = -ENOMEM; cirrus = kzalloc(sizeof(*cirrus), GFP_KERNEL); if (cirrus == NULL) - goto err_pci_release; + return ret; dev = >dev; - ret = drm_dev_init(dev, _driver, >dev); + ret = devm_drm_dev_init(>dev, dev, _driver); if (ret) { kfree(cirrus); - goto err_pci_release; + return ret; } dev->dev_private = cirrus; drmm_add_final_kfree(dev, cirrus); - ret = -ENOMEM; - cirrus->vram = ioremap(pci_resource_start(pdev, 0), - pci_resource_len(pdev, 0)); + cirrus->vram = devm_ioremap(>dev, pci_resource_start(pdev, 0), + pci_resource_len(pdev, 0)); if (cirrus->vram == NULL) - goto err_dev_put; + return -ENOMEM; - cirrus->mmio = ioremap(pci_resource_start(pdev, 1), - pci_resource_len(pdev, 1)); + cirrus->mmio = devm_ioremap(>dev, pci_resource_start(pdev, 1), + pci_resource_len(pdev, 1)); if (cirrus->mmio == NULL) - goto err_unmap_vram; + return -ENOMEM; ret = cirrus_mode_config_init(cirrus); if (ret) - goto err_cleanup; + return ret; ret = cirrus_conn_init(cirrus); if (ret < 0) - goto err_cleanup; + return ret; ret = cirrus_pipe_init(cirrus); if (ret < 0) - goto err_cleanup; + return ret; drm_mode_config_reset(dev); @@ -609,33 +608,18 @@ static int cirrus_pci_probe(struct pci_dev *pdev, pci_set_drvdata(pdev, dev); ret = drm_dev_register(dev, 0); if (ret) - goto err_cleanup; + return ret; drm_fbdev_generic_setup(dev, dev->mode_config.preferred_depth); return 0; - -err_cleanup: - iounmap(cirrus->mmio); -err_unmap_vram: - iounmap(cirrus->vram); -err_dev_put: - drm_dev_put(dev); -err_pci_release: - pci_release_regions(pdev); - return ret; } static void cirrus_pci_remove(struct pci_dev *pdev) { struct drm_device *dev = pci_get_drvdata(pdev); - struct cirrus_device *cirrus = dev->dev_private; drm_dev_unplug(dev); drm_atomic_helper_shutdown(dev); - iounmap(cirrus->mmio); - iounmap(cirrus->vram); - drm_dev_put(dev); - pci_release_regions(pdev); } static const struct pci_device_id pciidlist[] = { -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 25/51] drm: Garbage collect drm_dev_fini
It has become empty. Given the few users I figured not much point splitting this up. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/cirrus/cirrus.c | 1 - drivers/gpu/drm/drm_drv.c | 23 +-- drivers/gpu/drm/drm_mipi_dbi.c| 1 - drivers/gpu/drm/i915/i915_drv.c | 9 .../gpu/drm/i915/selftests/mock_gem_device.c | 2 -- drivers/gpu/drm/ingenic/ingenic-drm.c | 1 - drivers/gpu/drm/mcde/mcde_drv.c | 1 - drivers/gpu/drm/tidss/tidss_drv.c | 2 -- drivers/gpu/drm/tiny/gm12u320.c | 1 - drivers/gpu/drm/tiny/repaper.c| 1 - drivers/gpu/drm/udl/udl_drv.c | 1 - drivers/gpu/drm/vgem/vgem_drv.c | 1 - drivers/gpu/drm/vkms/vkms_drv.c | 1 - drivers/gpu/drm/xen/xen_drm_front.c | 2 -- include/drm/drm_drv.h | 5 +--- 15 files changed, 2 insertions(+), 50 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c b/drivers/gpu/drm/cirrus/cirrus.c index 2232556ce34c..a9d789a56536 100644 --- a/drivers/gpu/drm/cirrus/cirrus.c +++ b/drivers/gpu/drm/cirrus/cirrus.c @@ -529,7 +529,6 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus) static void cirrus_release(struct drm_device *dev) { drm_mode_config_cleanup(dev); - drm_dev_fini(dev); } DEFINE_DRM_GEM_FOPS(cirrus_fops); diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index b8db2cc4a19b..3cf40864d4a6 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -283,7 +283,6 @@ void drm_minor_release(struct drm_minor *minor) * struct driver_device *priv = container_of(...); * * drm_mode_config_cleanup(drm); - * drm_dev_fini(drm); * } * * static struct drm_driver driver_drm_driver = { @@ -738,23 +737,6 @@ int devm_drm_dev_init(struct device *parent, } EXPORT_SYMBOL(devm_drm_dev_init); -/** - * drm_dev_fini - Finalize a dead DRM device - * @dev: DRM device - * - * Finalize a dead DRM device. This is the converse to drm_dev_init() and - * frees up all data allocated by it. All driver private data should be - * finalized first. Note that this function does not free the @dev, that is - * left to the caller. - * - * The ref-count of @dev must be zero, and drm_dev_fini() should only be called - * from a _driver.release callback. - */ -void drm_dev_fini(struct drm_device *dev) -{ -} -EXPORT_SYMBOL(drm_dev_fini); - /** * drm_dev_alloc - Allocate new DRM device * @driver: DRM driver to allocate device for @@ -803,11 +785,8 @@ static void drm_dev_release(struct kref *ref) { struct drm_device *dev = container_of(ref, struct drm_device, ref); - if (dev->driver->release) { + if (dev->driver->release) dev->driver->release(dev); - } else { - drm_dev_fini(dev); - } drm_managed_release(dev); diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 069603dfcd10..a678e07508d4 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -591,7 +591,6 @@ void mipi_dbi_release(struct drm_device *drm) DRM_DEBUG_DRIVER("\n"); drm_mode_config_cleanup(drm); - drm_dev_fini(drm); } EXPORT_SYMBOL(mipi_dbi_release); diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index ae81c74d0136..68e8446bbb4d 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -1387,13 +1387,6 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) return i915; } -static void i915_driver_destroy(struct drm_i915_private *i915) -{ - struct pci_dev *pdev = i915->drm.pdev; - - drm_dev_fini(>drm); -} - /** * i915_driver_probe - setup chip and create an initial config * @pdev: PCI device @@ -1484,7 +1477,6 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) pci_disable_device(pdev); out_fini: i915_probe_error(i915, "Device initialization failed (%d)\n", ret); - i915_driver_destroy(i915); drm_dev_put(>drm); return ret; } @@ -1548,7 +1540,6 @@ static void i915_driver_release(struct drm_device *dev) intel_runtime_pm_driver_release(rpm); i915_driver_late_release(dev_priv); - i915_driver_destroy(dev_priv); } static int i915_driver_open(struct drm_device *dev, struct drm_file *file) diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 9b06d5ec889a..00683af97a94 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -76,7 +76,6 @@ static void mock_device_release(struct drm_device *dev) drm_mode_config_cleanup(>drm); - drm_dev_fini(>drm);
[Intel-gfx] [PATCH 38/51] drm/stm: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). Acked-by: Philippe Cornu Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Yannick Fertre Cc: Philippe Cornu Cc: Benjamin Gaignard Cc: Vincent Abriou Cc: Maxime Coquelin Cc: Alexandre Torgue Cc: linux-st...@st-md-mailman.stormreply.com Cc: linux-arm-ker...@lists.infradead.org --- drivers/gpu/drm/stm/drv.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/stm/drv.c b/drivers/gpu/drm/stm/drv.c index ea9fcbdc68b3..5b374531dd8c 100644 --- a/drivers/gpu/drm/stm/drv.c +++ b/drivers/gpu/drm/stm/drv.c @@ -88,7 +88,9 @@ static int drv_load(struct drm_device *ddev) ddev->dev_private = (void *)ldev; - drm_mode_config_init(ddev); + ret = drm_mode_config_init(ddev); + if (ret) + return ret; /* * set max width and height as default value. @@ -103,7 +105,7 @@ static int drv_load(struct drm_device *ddev) ret = ltdc_load(ddev); if (ret) - goto err; + return ret; drm_mode_config_reset(ddev); drm_kms_helper_poll_init(ddev); @@ -111,9 +113,6 @@ static int drv_load(struct drm_device *ddev) platform_set_drvdata(pdev, ddev); return 0; -err: - drm_mode_config_cleanup(ddev); - return ret; } static void drv_unload(struct drm_device *ddev) @@ -122,7 +121,6 @@ static void drv_unload(struct drm_device *ddev) drm_kms_helper_poll_fini(ddev); ltdc_unload(ddev); - drm_mode_config_cleanup(ddev); } static __maybe_unused int drv_suspend(struct device *dev) -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 35/51] drm/pl111: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: This driver gets its devm_ stuff all wrong wrt drm_device and anything hanging off that. Not the only one unfortunately. v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Eric Anholt --- drivers/gpu/drm/pl111/pl111_drv.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index aa8aa8d9e405..87b9b32c90a8 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c @@ -90,10 +90,13 @@ static int pl111_modeset_init(struct drm_device *dev) struct drm_panel *panel = NULL; struct drm_bridge *bridge = NULL; bool defer = false; - int ret = 0; + int ret; int i; - drm_mode_config_init(dev); + ret = drm_mode_config_init(dev); + if (ret) + return ret; + mode_config = >mode_config; mode_config->funcs = _config_funcs; mode_config->min_width = 1; @@ -154,7 +157,7 @@ static int pl111_modeset_init(struct drm_device *dev) DRM_MODE_CONNECTOR_Unknown); if (IS_ERR(bridge)) { ret = PTR_ERR(bridge); - goto out_config; + goto finish; } } else if (bridge) { dev_info(dev->dev, "Using non-panel bridge\n"); @@ -197,8 +200,6 @@ static int pl111_modeset_init(struct drm_device *dev) out_bridge: if (panel) drm_panel_bridge_remove(bridge); -out_config: - drm_mode_config_cleanup(dev); finish: return ret; } @@ -343,7 +344,6 @@ static int pl111_amba_remove(struct amba_device *amba_dev) drm_dev_unregister(drm); if (priv->panel) drm_panel_bridge_remove(priv->bridge); - drm_mode_config_cleanup(drm); drm_dev_put(drm); of_reserved_mem_device_release(dev); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 36/51] drm/rcar-du: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Kieran Bingham Cc: linux-renesas-...@vger.kernel.org --- drivers/gpu/drm/rcar-du/rcar_du_drv.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_kms.c | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c index 654e2dd08146..3e67cf70f040 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c @@ -530,7 +530,6 @@ static int rcar_du_remove(struct platform_device *pdev) drm_dev_unregister(ddev); drm_kms_helper_poll_fini(ddev); - drm_mode_config_cleanup(ddev); drm_dev_put(ddev); diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c index fcfd916227d1..dcdc1580b511 100644 --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c @@ -712,7 +712,9 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu) unsigned int i; int ret; - drm_mode_config_init(dev); + ret = drm_mode_config_init(dev); + if (ret) + return ret; dev->mode_config.min_width = 0; dev->mode_config.min_height = 0; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 26/51] drm: Manage drm_mode_config_init with drmm_
drm_mode_config_cleanup is idempotent, so no harm in calling this twice. This allows us to gradually switch drivers over by removing explicit drm_mode_config_cleanup calls. With this step it's not also possible that (at least for simple drivers) automatic resource cleanup can be done correctly without a drm_driver->release hook. Therefore allow this now in devm_drm_dev_init(). Also with drmm_ explicit drm_driver->release hooks are kinda not the best option, so deprecate that hook to discourage future users. v2: Fixup the example in the kerneldoc too. v3: - For paranoia, double check that minor->dev == dev in the release hook, because I botched the pointer math in the drmm library. - Call drm_mode_config_cleanup when drmm_add_action fails, we'd be missing some mutex_destroy and ida_cleanup otherwise (Laurent) v4: Add a drmm_add_action_or_reset (like devm_ has) to encapsulate this pattern (Noralf). Cc: Laurent Pinchart Cc: "Noralf Trønnes" Cc: Sam Ravnborg Cc: Thomas Zimmermann Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 23 +++ drivers/gpu/drm/drm_managed.c | 14 ++ drivers/gpu/drm/drm_mode_config.c | 13 - include/drm/drm_managed.h | 7 +++ include/drm/drm_mode_config.h | 2 +- 5 files changed, 41 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 3cf40864d4a6..bb326b9bcde0 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -98,6 +98,8 @@ static void drm_minor_alloc_release(struct drm_device *dev, void *data) struct drm_minor *minor = data; unsigned long flags; + WARN_ON(dev != minor->dev); + put_device(minor->kdev); spin_lock_irqsave(_minor_lock, flags); @@ -267,8 +269,7 @@ void drm_minor_release(struct drm_minor *minor) * * The following example shows a typical structure of a DRM display driver. * The example focus on the probe() function and the other functions that is - * almost always present and serves as a demonstration of devm_drm_dev_init() - * usage with its accompanying drm_driver->release callback. + * almost always present and serves as a demonstration of devm_drm_dev_init(). * * .. code-block:: c * @@ -278,16 +279,8 @@ void drm_minor_release(struct drm_minor *minor) * struct clk *pclk; * }; * - * static void driver_drm_release(struct drm_device *drm) - * { - * struct driver_device *priv = container_of(...); - * - * drm_mode_config_cleanup(drm); - * } - * * static struct drm_driver driver_drm_driver = { * [...] - * .release = driver_drm_release, * }; * * static int driver_probe(struct platform_device *pdev) @@ -312,7 +305,9 @@ void drm_minor_release(struct drm_minor *minor) * } * drmm_add_final_kfree(drm, priv); * - * drm_mode_config_init(drm); + * ret = drm_mode_config_init(drm); + * if (ret) + * return ret; * * priv->userspace_facing = drmm_kzalloc(..., GFP_KERNEL); * if (!priv->userspace_facing) @@ -710,8 +705,7 @@ static void devm_drm_dev_init_release(void *data) * @driver: DRM driver * * Managed drm_dev_init(). The DRM device initialized with this function is - * automatically put on driver detach using drm_dev_put(). You must supply a - * _driver.release callback to control the finalization explicitly. + * automatically put on driver detach using drm_dev_put(). * * RETURNS: * 0 on success, or error code on failure. @@ -722,9 +716,6 @@ int devm_drm_dev_init(struct device *parent, { int ret; - if (WARN_ON(!driver->release)) - return -EINVAL; - ret = drm_dev_init(dev, driver, parent); if (ret) return ret; diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c index 626656369f0b..6376be01bbc8 100644 --- a/drivers/gpu/drm/drm_managed.c +++ b/drivers/gpu/drm/drm_managed.c @@ -134,6 +134,20 @@ int __drmm_add_action(struct drm_device *dev, } EXPORT_SYMBOL(__drmm_add_action); +int __drmm_add_action_or_reset(struct drm_device *dev, + drmres_release_t action, + void *data, const char *name) +{ + int ret; + + ret = __drmm_add_action(dev, action, data, name); + if (ret) + action(dev, data); + + return ret; +} +EXPORT_SYMBOL(__drmm_add_action_or_reset); + void drmm_remove_action(struct drm_device *dev, drmres_release_t action, void *data) diff --git a/drivers/gpu/drm/drm_mode_config.c b/drivers/gpu/drm/drm_mode_config.c index 08e6eff6a179..6f7005bc597f 100644 --- a/drivers/gpu/drm/drm_mode_config.c +++ b/drivers/gpu/drm/drm_mode_config.c @@ -25,6 +25,7 @@ #include #include #include +#include #include
[Intel-gfx] [PATCH 37/51] drm/rockchip: Drop explicit drm_mode_config_cleanup call
It's (almost, there's some iommu stuff without significance) right above the drm_dev_put(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). Aside: Another driver with a bit much devm_kzalloc, which should probably use drmm_kzalloc instead ... v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Sandy Huang Cc: "Heiko Stübner" Cc: linux-arm-ker...@lists.infradead.org Cc: linux-rockc...@lists.infradead.org --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 10 +++--- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c index 20ecb1508a22..d0eba21eebc9 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_drv.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_drv.c @@ -135,7 +135,9 @@ static int rockchip_drm_bind(struct device *dev) if (ret) goto err_free; - drm_mode_config_init(drm_dev); + ret = drm_mode_config_init(drm_dev); + if (ret) + goto err_free; rockchip_drm_mode_config_init(drm_dev); @@ -174,11 +176,8 @@ static int rockchip_drm_bind(struct device *dev) err_unbind_all: component_unbind_all(dev, drm_dev); err_mode_config_cleanup: - drm_mode_config_cleanup(drm_dev); rockchip_iommu_cleanup(drm_dev); err_free: - drm_dev->dev_private = NULL; - dev_set_drvdata(dev, NULL); drm_dev_put(drm_dev); return ret; } @@ -194,11 +193,8 @@ static void rockchip_drm_unbind(struct device *dev) drm_atomic_helper_shutdown(drm_dev); component_unbind_all(dev, drm_dev); - drm_mode_config_cleanup(drm_dev); rockchip_iommu_cleanup(drm_dev); - drm_dev->dev_private = NULL; - dev_set_drvdata(dev, NULL); drm_dev_put(drm_dev); } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 32/51] drm/mcde: Drop explicit drm_mode_config_cleanup call
Allows us to drop the drm_driver.release callback. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Reviewed-by: Linus Walleij Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Linus Walleij --- drivers/gpu/drm/mcde/mcde_drv.c | 22 ++ 1 file changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index a543ebf3d541..b8ca5e51 100644 --- a/drivers/gpu/drm/mcde/mcde_drv.c +++ b/drivers/gpu/drm/mcde/mcde_drv.c @@ -184,13 +184,13 @@ static int mcde_modeset_init(struct drm_device *drm) ret = drm_vblank_init(drm, 1); if (ret) { dev_err(drm->dev, "failed to init vblank\n"); - goto out_config; + return ret; } ret = mcde_display_init(drm); if (ret) { dev_err(drm->dev, "failed to init display\n"); - goto out_config; + return ret; } /* @@ -204,7 +204,7 @@ static int mcde_modeset_init(struct drm_device *drm) mcde->bridge); if (ret) { dev_err(drm->dev, "failed to attach display output bridge\n"); - goto out_config; + return ret; } drm_mode_config_reset(drm); @@ -212,17 +212,6 @@ static int mcde_modeset_init(struct drm_device *drm) drm_fbdev_generic_setup(drm, 32); return 0; - -out_config: - drm_mode_config_cleanup(drm); - return ret; -} - -static void mcde_release(struct drm_device *drm) -{ - struct mcde *mcde = drm->dev_private; - - drm_mode_config_cleanup(drm); } DEFINE_DRM_GEM_CMA_FOPS(drm_fops); @@ -230,7 +219,6 @@ DEFINE_DRM_GEM_CMA_FOPS(drm_fops); static struct drm_driver mcde_drm_driver = { .driver_features = DRIVER_MODESET | DRIVER_GEM | DRIVER_ATOMIC, - .release = mcde_release, .lastclose = drm_fb_helper_lastclose, .ioctls = NULL, .fops = _fops, @@ -258,7 +246,9 @@ static int mcde_drm_bind(struct device *dev) struct drm_device *drm = dev_get_drvdata(dev); int ret; - drm_mode_config_init(drm); + ret = drm_mode_config_init(drm); + if (ret) + return ret; ret = component_bind_all(drm->dev, drm); if (ret) { -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 49/51] drm/udl: Drop explicit drm_mode_config_cleanup call
It's right above the drm_dev_put(). This allows us to delete a bit of onion unwinding in udl_modeset_init(). This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Sean Paul Cc: Daniel Vetter Cc: Thomas Zimmermann Cc: Emil Velikov Cc: Gerd Hoffmann Cc: "Noralf Trønnes" Cc: Thomas Gleixner Cc: Sam Ravnborg --- drivers/gpu/drm/udl/udl_drv.c | 1 - drivers/gpu/drm/udl/udl_drv.h | 1 - drivers/gpu/drm/udl/udl_modeset.c | 21 ++--- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index 8b78c356beb5..b447fb053e78 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -37,7 +37,6 @@ DEFINE_DRM_GEM_FOPS(udl_driver_fops); static void udl_driver_release(struct drm_device *dev) { udl_fini(dev); - udl_modeset_cleanup(dev); } static struct drm_driver driver = { diff --git a/drivers/gpu/drm/udl/udl_drv.h b/drivers/gpu/drm/udl/udl_drv.h index e67227c44cc4..1de7eb1b6aac 100644 --- a/drivers/gpu/drm/udl/udl_drv.h +++ b/drivers/gpu/drm/udl/udl_drv.h @@ -68,7 +68,6 @@ struct udl_device { /* modeset */ int udl_modeset_init(struct drm_device *dev); -void udl_modeset_cleanup(struct drm_device *dev); struct drm_connector *udl_connector_init(struct drm_device *dev); struct urb *udl_get_urb(struct drm_device *dev); diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c index d59ebac70b15..cad0c87f8de6 100644 --- a/drivers/gpu/drm/udl/udl_modeset.c +++ b/drivers/gpu/drm/udl/udl_modeset.c @@ -468,7 +468,9 @@ int udl_modeset_init(struct drm_device *dev) struct drm_connector *connector; int ret; - drm_mode_config_init(dev); + ret = drm_mode_config_init(dev); + if (ret) + return ret; dev->mode_config.min_width = 640; dev->mode_config.min_height = 480; @@ -482,10 +484,8 @@ int udl_modeset_init(struct drm_device *dev) dev->mode_config.funcs = _mode_funcs; connector = udl_connector_init(dev); - if (IS_ERR(connector)) { - ret = PTR_ERR(connector); - goto err_drm_mode_config_cleanup; - } + if (IS_ERR(connector)) + return PTR_ERR(connector); format_count = ARRAY_SIZE(udl_simple_display_pipe_formats); @@ -494,18 +494,9 @@ int udl_modeset_init(struct drm_device *dev) udl_simple_display_pipe_formats, format_count, NULL, connector); if (ret) - goto err_drm_mode_config_cleanup; + return ret; drm_mode_config_reset(dev); return 0; - -err_drm_mode_config_cleanup: - drm_mode_config_cleanup(dev); - return ret; -} - -void udl_modeset_cleanup(struct drm_device *dev) -{ - drm_mode_config_cleanup(dev); } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 20/51] drm: Handle dev->unique with drmm_
We need to add a drmm_kstrdup for this, but let's start somewhere. This is not exactly perfect onion unwinding, but it's jsut a kfree so doesn't really matter at all. Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 5 ++--- drivers/gpu/drm/drm_managed.c | 16 include/drm/drm_managed.h | 1 + 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 1ee606b4a4f9..782fd5d6f8b2 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -777,7 +777,6 @@ void drm_dev_fini(struct drm_device *dev) mutex_destroy(>filelist_mutex); mutex_destroy(>struct_mutex); drm_legacy_destroy_members(dev); - kfree(dev->unique); } EXPORT_SYMBOL(drm_dev_fini); @@ -1063,8 +1062,8 @@ EXPORT_SYMBOL(drm_dev_unregister); */ int drm_dev_set_unique(struct drm_device *dev, const char *name) { - kfree(dev->unique); - dev->unique = kstrdup(name, GFP_KERNEL); + drmm_kfree(dev, dev->unique); + dev->unique = drmm_kstrdup(dev, name, GFP_KERNEL); return dev->unique ? 0 : -ENOMEM; } diff --git a/drivers/gpu/drm/drm_managed.c b/drivers/gpu/drm/drm_managed.c index a36d4604ee18..cc917187a723 100644 --- a/drivers/gpu/drm/drm_managed.c +++ b/drivers/gpu/drm/drm_managed.c @@ -149,6 +149,22 @@ void *drmm_kmalloc(struct drm_device *dev, size_t size, gfp_t gfp) } EXPORT_SYMBOL(drmm_kmalloc); +char *drmm_kstrdup(struct drm_device *dev, const char *s, gfp_t gfp) +{ + size_t size; + char *buf; + + if (!s) + return NULL; + + size = strlen(s) + 1; + buf = drmm_kmalloc(dev, size, gfp); + if (buf) + memcpy(buf, s, size); + return buf; +} +EXPORT_SYMBOL_GPL(drmm_kstrdup); + void drmm_kfree(struct drm_device *dev, void *data) { struct drmres *dr_match = NULL, *dr; diff --git a/include/drm/drm_managed.h b/include/drm/drm_managed.h index 7b5df7d09b19..89e6fce9f689 100644 --- a/include/drm/drm_managed.h +++ b/include/drm/drm_managed.h @@ -24,6 +24,7 @@ static inline void *drmm_kzalloc(struct drm_device *dev, size_t size, gfp_t gfp) { return drmm_kmalloc(dev, size, gfp | __GFP_ZERO); } +char *drmm_kstrdup(struct drm_device *dev, const char *s, gfp_t gfp); void drmm_kfree(struct drm_device *dev, void *data); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 22/51] drm: manage drm_minor cleanup with drmm_
The cleanup here is somewhat tricky, since we can't tell apart the allocated minor index from 0. So register a cleanup action first, and if the index allocation fails, unregister that cleanup action again to avoid bad mistakes. The kdev for the minor already handles NULL, so no problem there. Hence add drmm_remove_action() to the drm_managed library. v2: Make pointer math around void ** consistent with what Laurent suggested. Cc: Laurent Pinchart Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_drv.c | 74 +-- drivers/gpu/drm/drm_managed.c | 28 + include/drm/drm_managed.h | 4 ++ 3 files changed, 59 insertions(+), 47 deletions(-) diff --git a/drivers/gpu/drm/drm_drv.c b/drivers/gpu/drm/drm_drv.c index 1f7ab88d9435..03a1fb377830 100644 --- a/drivers/gpu/drm/drm_drv.c +++ b/drivers/gpu/drm/drm_drv.c @@ -93,19 +93,35 @@ static struct drm_minor **drm_minor_get_slot(struct drm_device *dev, } } +static void drm_minor_alloc_release(struct drm_device *dev, void *data) +{ + struct drm_minor *minor = data; + unsigned long flags; + + put_device(minor->kdev); + + spin_lock_irqsave(_minor_lock, flags); + idr_remove(_minors_idr, minor->index); + spin_unlock_irqrestore(_minor_lock, flags); +} + static int drm_minor_alloc(struct drm_device *dev, unsigned int type) { struct drm_minor *minor; unsigned long flags; int r; - minor = kzalloc(sizeof(*minor), GFP_KERNEL); + minor = drmm_kzalloc(dev, sizeof(*minor), GFP_KERNEL); if (!minor) return -ENOMEM; minor->type = type; minor->dev = dev; + r = drmm_add_action(dev, drm_minor_alloc_release, minor); + if (r) + return r; + idr_preload(GFP_KERNEL); spin_lock_irqsave(_minor_lock, flags); r = idr_alloc(_minors_idr, @@ -116,47 +132,18 @@ static int drm_minor_alloc(struct drm_device *dev, unsigned int type) spin_unlock_irqrestore(_minor_lock, flags); idr_preload_end(); - if (r < 0) - goto err_free; + if (r < 0) { + drmm_remove_action(dev, drm_minor_alloc_release, minor); + return r; + } minor->index = r; - minor->kdev = drm_sysfs_minor_alloc(minor); - if (IS_ERR(minor->kdev)) { - r = PTR_ERR(minor->kdev); - goto err_index; - } + if (IS_ERR(minor->kdev)) + return PTR_ERR(minor->kdev); *drm_minor_get_slot(dev, type) = minor; return 0; - -err_index: - spin_lock_irqsave(_minor_lock, flags); - idr_remove(_minors_idr, minor->index); - spin_unlock_irqrestore(_minor_lock, flags); -err_free: - kfree(minor); - return r; -} - -static void drm_minor_free(struct drm_device *dev, unsigned int type) -{ - struct drm_minor **slot, *minor; - unsigned long flags; - - slot = drm_minor_get_slot(dev, type); - minor = *slot; - if (!minor) - return; - - put_device(minor->kdev); - - spin_lock_irqsave(_minor_lock, flags); - idr_remove(_minors_idr, minor->index); - spin_unlock_irqrestore(_minor_lock, flags); - - kfree(minor); - *slot = NULL; } static int drm_minor_register(struct drm_device *dev, unsigned int type) @@ -678,16 +665,16 @@ int drm_dev_init(struct drm_device *dev, if (drm_core_check_feature(dev, DRIVER_RENDER)) { ret = drm_minor_alloc(dev, DRM_MINOR_RENDER); if (ret) - goto err_minors; + goto err; } ret = drm_minor_alloc(dev, DRM_MINOR_PRIMARY); if (ret) - goto err_minors; + goto err; ret = drm_legacy_create_map_hash(dev); if (ret) - goto err_minors; + goto err; drm_legacy_ctxbitmap_init(dev); @@ -695,7 +682,7 @@ int drm_dev_init(struct drm_device *dev, ret = drm_gem_init(dev); if (ret) { DRM_ERROR("Cannot initialize graphics execution manager (GEM)\n"); - goto err_ctxbitmap; + goto err; } } @@ -708,10 +695,6 @@ int drm_dev_init(struct drm_device *dev, err_setunique: if (drm_core_check_feature(dev, DRIVER_GEM)) drm_gem_destroy(dev); -err_ctxbitmap: -err_minors: - drm_minor_free(dev, DRM_MINOR_PRIMARY); - drm_minor_free(dev, DRM_MINOR_RENDER); err: drm_managed_release(dev); @@ -776,9 +759,6 @@ void drm_dev_fini(struct drm_device *dev) if (drm_core_check_feature(dev, DRIVER_GEM)) drm_gem_destroy(dev); - - drm_minor_free(dev, DRM_MINOR_PRIMARY); - drm_minor_free(dev, DRM_MINOR_RENDER); } EXPORT_SYMBOL(drm_dev_fini); diff --git a/drivers/gpu/drm/drm_managed.c
[Intel-gfx] [PATCH 28/51] drm/bochs: Drop explicit drm_mode_config_cleanup
Instead rely on the automatic clean, for which we just need to check that drm_mode_config_init succeeded. To avoid an inversion in the cleanup we also have to move the dev_private allocation over to drmm_kzalloc. This is made possible by a preceeding patch which added a drmm_ cleanup action to drm_mode_config_init(), hence all we need to do to ensure that drm_mode_config_cleanup() is run on final drm_device cleanup is check the new error code for _init(). v2: Explain why this cleanup is possible (Laurent). Cc: Laurent Pinchart Signed-off-by: Daniel Vetter Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org --- drivers/gpu/drm/bochs/bochs.h | 1 - drivers/gpu/drm/bochs/bochs_drv.c | 6 ++ drivers/gpu/drm/bochs/bochs_kms.c | 14 +- 3 files changed, 7 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs.h b/drivers/gpu/drm/bochs/bochs.h index 917767173ee6..e5bd1d517a18 100644 --- a/drivers/gpu/drm/bochs/bochs.h +++ b/drivers/gpu/drm/bochs/bochs.h @@ -92,7 +92,6 @@ void bochs_mm_fini(struct bochs_device *bochs); /* bochs_kms.c */ int bochs_kms_init(struct bochs_device *bochs); -void bochs_kms_fini(struct bochs_device *bochs); /* bochs_fbdev.c */ extern const struct drm_mode_config_funcs bochs_mode_funcs; diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index addb0568c1af..e18c51de1196 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -7,6 +7,7 @@ #include #include +#include #include "bochs.h" @@ -21,10 +22,7 @@ static void bochs_unload(struct drm_device *dev) { struct bochs_device *bochs = dev->dev_private; - bochs_kms_fini(bochs); bochs_mm_fini(bochs); - kfree(bochs); - dev->dev_private = NULL; } static int bochs_load(struct drm_device *dev) @@ -32,7 +30,7 @@ static int bochs_load(struct drm_device *dev) struct bochs_device *bochs; int ret; - bochs = kzalloc(sizeof(*bochs), GFP_KERNEL); + bochs = drmm_kzalloc(dev, sizeof(*bochs), GFP_KERNEL); if (bochs == NULL) return -ENOMEM; dev->dev_private = bochs; diff --git a/drivers/gpu/drm/bochs/bochs_kms.c b/drivers/gpu/drm/bochs/bochs_kms.c index e8cc8156d773..8285c03a6a95 100644 --- a/drivers/gpu/drm/bochs/bochs_kms.c +++ b/drivers/gpu/drm/bochs/bochs_kms.c @@ -134,7 +134,11 @@ const struct drm_mode_config_funcs bochs_mode_funcs = { int bochs_kms_init(struct bochs_device *bochs) { - drm_mode_config_init(bochs->dev); + int ret; + + ret = drm_mode_config_init(bochs->dev); + if (ret) + return ret; bochs->dev->mode_config.max_width = 8192; bochs->dev->mode_config.max_height = 8192; @@ -160,11 +164,3 @@ int bochs_kms_init(struct bochs_device *bochs) return 0; } - -void bochs_kms_fini(struct bochs_device *bochs) -{ - if (!bochs->dev->mode_config.num_connector) - return; - - drm_mode_config_cleanup(bochs->dev); -} -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 15/51] drm/repaper: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Reviewed-by: Noralf Trønnes Signed-off-by: Daniel Vetter Cc: "Noralf Trønnes" --- drivers/gpu/drm/tiny/repaper.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/tiny/repaper.c b/drivers/gpu/drm/tiny/repaper.c index f5ebcaf7ee3a..df5654ef53ee 100644 --- a/drivers/gpu/drm/tiny/repaper.c +++ b/drivers/gpu/drm/tiny/repaper.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -910,13 +911,10 @@ static const struct drm_mode_config_funcs repaper_mode_config_funcs = { static void repaper_release(struct drm_device *drm) { - struct repaper_epd *epd = drm_to_epd(drm); - DRM_DEBUG_DRIVER("\n"); drm_mode_config_cleanup(drm); drm_dev_fini(drm); - kfree(epd); } static const uint32_t repaper_formats[] = { @@ -1024,6 +1022,7 @@ static int repaper_probe(struct spi_device *spi) kfree(epd); return ret; } + drmm_add_final_kfree(drm, epd); drm_mode_config_init(drm); drm->mode_config.funcs = _mode_config_funcs; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 17/51] drm/gm12u320: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Hans de Goede --- drivers/gpu/drm/tiny/gm12u320.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tiny/gm12u320.c b/drivers/gpu/drm/tiny/gm12u320.c index a48173441ae0..524ca0941cf9 100644 --- a/drivers/gpu/drm/tiny/gm12u320.c +++ b/drivers/gpu/drm/tiny/gm12u320.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include #include @@ -637,7 +638,6 @@ static void gm12u320_driver_release(struct drm_device *dev) gm12u320_usb_free(gm12u320); drm_mode_config_cleanup(dev); drm_dev_fini(dev); - kfree(gm12u320); } DEFINE_DRM_GEM_FOPS(gm12u320_fops); @@ -692,6 +692,7 @@ static int gm12u320_usb_probe(struct usb_interface *interface, return ret; } dev->dev_private = gm12u320; + drmm_add_final_kfree(dev, gm12u320); drm_mode_config_init(dev); dev->mode_config.min_width = GM12U320_USER_WIDTH; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 05/51] drm/mipi_dbi: Use drmm_add_final_kfree in all drivers
They all share mipi_dbi_release so we need to switch them all together. With this we can drop the final kfree from the release function. Aside, I think we could perhaps have a tiny additional helper for these mipi_dbi drivers, the first few lines around devm_drm_dev_init are all the same (except for the drm_driver pointer). Reviewed-by: Noralf Trønnes Tested-by: Noralf Trønnes Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc: Eric Anholt Cc: David Lechner Cc: Kamlesh Gurudasani Cc: "Noralf Trønnes" Cc: Sam Ravnborg Signed-off-by: Daniel Vetter --- drivers/gpu/drm/drm_mipi_dbi.c | 3 --- drivers/gpu/drm/tiny/hx8357d.c | 2 ++ drivers/gpu/drm/tiny/ili9225.c | 2 ++ drivers/gpu/drm/tiny/ili9341.c | 2 ++ drivers/gpu/drm/tiny/ili9486.c | 2 ++ drivers/gpu/drm/tiny/mi0283qt.c | 2 ++ drivers/gpu/drm/tiny/st7586.c | 2 ++ drivers/gpu/drm/tiny/st7735r.c | 2 ++ 8 files changed, 14 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_mipi_dbi.c b/drivers/gpu/drm/drm_mipi_dbi.c index 558baf989f5a..069603dfcd10 100644 --- a/drivers/gpu/drm/drm_mipi_dbi.c +++ b/drivers/gpu/drm/drm_mipi_dbi.c @@ -588,13 +588,10 @@ EXPORT_SYMBOL(mipi_dbi_dev_init); */ void mipi_dbi_release(struct drm_device *drm) { - struct mipi_dbi_dev *dbidev = drm_to_mipi_dbi_dev(drm); - DRM_DEBUG_DRIVER("\n"); drm_mode_config_cleanup(drm); drm_dev_fini(drm); - kfree(dbidev); } EXPORT_SYMBOL(mipi_dbi_release); diff --git a/drivers/gpu/drm/tiny/hx8357d.c b/drivers/gpu/drm/tiny/hx8357d.c index 9af8ff84974f..42bc5dadcb1c 100644 --- a/drivers/gpu/drm/tiny/hx8357d.c +++ b/drivers/gpu/drm/tiny/hx8357d.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include #include @@ -236,6 +237,7 @@ static int hx8357d_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/ili9225.c b/drivers/gpu/drm/tiny/ili9225.c index 802fb8dde1b6..aae88dc5b3f7 100644 --- a/drivers/gpu/drm/tiny/ili9225.c +++ b/drivers/gpu/drm/tiny/ili9225.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -387,6 +388,7 @@ static int ili9225_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/ili9341.c b/drivers/gpu/drm/tiny/ili9341.c index 33b51dc7faa8..7d40cb4ff72b 100644 --- a/drivers/gpu/drm/tiny/ili9341.c +++ b/drivers/gpu/drm/tiny/ili9341.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -194,6 +195,7 @@ static int ili9341_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/ili9486.c b/drivers/gpu/drm/tiny/ili9486.c index 5084b38c1a71..7d735fc67498 100644 --- a/drivers/gpu/drm/tiny/ili9486.c +++ b/drivers/gpu/drm/tiny/ili9486.c @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -208,6 +209,7 @@ static int ili9486_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/mi0283qt.c b/drivers/gpu/drm/tiny/mi0283qt.c index e2cfd9a17143..8555a56bce8c 100644 --- a/drivers/gpu/drm/tiny/mi0283qt.c +++ b/drivers/gpu/drm/tiny/mi0283qt.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include @@ -198,6 +199,7 @@ static int mi0283qt_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/st7586.c b/drivers/gpu/drm/tiny/st7586.c index 9ef559dd3191..427c2561f5f4 100644 --- a/drivers/gpu/drm/tiny/st7586.c +++ b/drivers/gpu/drm/tiny/st7586.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #include @@ -328,6 +329,7 @@ static int st7586_probe(struct spi_device *spi) kfree(dbidev); return ret; } + drmm_add_final_kfree(drm, dbidev); drm_mode_config_init(drm); diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c index 18b925df6e51..b447235c3d47 100644 --- a/drivers/gpu/drm/tiny/st7735r.c +++ b/drivers/gpu/drm/tiny/st7735r.c @@ -21,6 +21,7 @@ #include #include #include +#include #include #define ST7735R_FRMCTR10xb1 @@ -209,6 +210,7 @@ static int st7735r_probe(struct spi_device *spi) kfree(dbidev); return ret; } +
[Intel-gfx] [PATCH 11/51] drm/tidss: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Jyri Sarha Cc: Tomi Valkeinen --- drivers/gpu/drm/tidss/tidss_drv.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_drv.c b/drivers/gpu/drm/tidss/tidss_drv.c index d95e4be2c7b9..32a85628dbec 100644 --- a/drivers/gpu/drm/tidss/tidss_drv.c +++ b/drivers/gpu/drm/tidss/tidss_drv.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include "tidss_dispc.h" @@ -109,8 +110,6 @@ static void tidss_release(struct drm_device *ddev) tidss_modeset_cleanup(tidss); drm_dev_fini(ddev); - - kfree(tidss); } DEFINE_DRM_GEM_CMA_FOPS(tidss_fops); @@ -154,6 +153,7 @@ static int tidss_probe(struct platform_device *pdev) kfree(ddev); return ret; } + drmm_add_final_kfree(ddev, tidss); tidss->dev = dev; tidss->feat = of_device_get_match_data(dev); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 08/51] drm/i915: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. The mock device in the selftests needed it's pci_device split up from the drm_device. In the future we could simplify this again by allocating the pci_device as a managed allocation too. v2: I overlooked that i915_driver_destroy is also called in the unwind code of the error path. There we need a drm_dev_put. Similar for the mock object. Now the problem with that is that the drm_driver->release callbacks for both the real driver and the mock one assume everything has been set up. Hence going through that path for a partially set up driver will result in issues. Quickest fix is to disable the ->release() hook until the driver is fully initialized, and keep the onion unwinding. Long term would be cleanest to move everything over to drmm_ release actions, but that's a lot of work for a big driver like i915. Plus more core work needed first anyway. Signed-off-by: Daniel Vetter Cc: Jani Nikula Cc: Joonas Lahtinen Cc: Rodrigo Vivi Cc: Chris Wilson Cc: Tvrtko Ursulin Cc: Matthew Auld Cc: Andi Shyti Cc: Mika Kuoppala Cc: Daniele Ceraolo Spurio Cc: Daniel Vetter Cc: Abdiel Janulgue Cc: intel-gfx@lists.freedesktop.org --- drivers/gpu/drm/i915/i915_drv.c| 9 - drivers/gpu/drm/i915/i915_drv.h| 3 +++ .../gpu/drm/i915/selftests/mock_gem_device.c | 18 +- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 8b8a9c9a9b2a..ae81c74d0136 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include @@ -1371,6 +1372,7 @@ i915_driver_create(struct pci_dev *pdev, const struct pci_device_id *ent) } i915->drm.dev_private = i915; + drmm_add_final_kfree(>drm, i915); i915->drm.pdev = pdev; pci_set_drvdata(pdev, i915); @@ -1390,7 +1392,6 @@ static void i915_driver_destroy(struct drm_i915_private *i915) struct pci_dev *pdev = i915->drm.pdev; drm_dev_fini(>drm); - kfree(i915); } /** @@ -1466,6 +1467,8 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) i915_welcome_messages(i915); + i915->do_release = true; + return 0; out_cleanup_hw: @@ -1482,6 +1485,7 @@ int i915_driver_probe(struct pci_dev *pdev, const struct pci_device_id *ent) out_fini: i915_probe_error(i915, "Device initialization failed (%d)\n", ret); i915_driver_destroy(i915); + drm_dev_put(>drm); return ret; } @@ -1528,6 +1532,9 @@ static void i915_driver_release(struct drm_device *dev) struct drm_i915_private *dev_priv = to_i915(dev); struct intel_runtime_pm *rpm = _priv->runtime_pm; + if (!dev_priv->do_release) + return; + disable_rpm_wakeref_asserts(rpm); i915_gem_driver_release(dev_priv); diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 4305ccc4c683..6e88eae40a87 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -884,6 +884,9 @@ struct i915_selftest_stash { struct drm_i915_private { struct drm_device drm; + /* FIXME: Device release actions should all be moved to drmm_ */ + bool do_release; + const struct intel_device_info __info; /* Use INTEL_INFO() to access. */ struct intel_runtime_info __runtime; /* Use RUNTIME_INFO() to access. */ struct intel_driver_caps caps; diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 3b8986983afc..9b06d5ec889a 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -25,6 +25,8 @@ #include #include +#include + #include "gt/intel_gt.h" #include "gt/intel_gt_requests.h" #include "gt/mock_engine.h" @@ -55,6 +57,9 @@ static void mock_device_release(struct drm_device *dev) { struct drm_i915_private *i915 = to_i915(dev); + if (!i915->do_release) + return; + mock_device_flush(i915); intel_gt_driver_remove(>gt); @@ -114,9 +119,14 @@ struct drm_i915_private *mock_gem_device(void) struct pci_dev *pdev; int err; - pdev = kzalloc(sizeof(*pdev) + sizeof(*i915), GFP_KERNEL); + pdev = kzalloc(sizeof(*pdev), GFP_KERNEL); if (!pdev) goto err; + i915 = kzalloc(sizeof(*i915), GFP_KERNEL); + if (!i915) { + kfree(pdev); + goto err; + } device_initialize(>dev); pdev->class = PCI_BASE_CLASS_DISPLAY << 16; @@ -141,10 +151,13 @@ struct drm_i915_private *mock_gem_device(void) err = drm_dev_init(>drm, _driver, >dev); if (err) { pr_err("Failed to initialise mock GEM device:
[Intel-gfx] [PATCH 06/51] drm/udl: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. v2: We need drm_dev_put to unroll the driver creation (once drm_dev_init and drmm_add_final_kfree suceeded), otherwise the drmm_ magic doesn't happen. v3: Actually squash in the fixup (Laurent). Signed-off-by: Daniel Vetter Cc: Laurent Pinchart Cc: Dave Airlie Cc: Sean Paul Cc: Thomas Zimmermann Cc: Emil Velikov Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc: Thomas Gleixner Cc: Sam Ravnborg --- drivers/gpu/drm/udl/udl_drv.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/udl/udl_drv.c b/drivers/gpu/drm/udl/udl_drv.c index e6c1cd77d4d4..6a5594946096 100644 --- a/drivers/gpu/drm/udl/udl_drv.c +++ b/drivers/gpu/drm/udl/udl_drv.c @@ -10,6 +10,7 @@ #include #include #include +#include #include #include #include @@ -38,7 +39,6 @@ static void udl_driver_release(struct drm_device *dev) udl_fini(dev); udl_modeset_cleanup(dev); drm_dev_fini(dev); - kfree(dev); } static struct drm_driver driver = { @@ -77,11 +77,11 @@ static struct udl_device *udl_driver_create(struct usb_interface *interface) udl->udev = udev; udl->drm.dev_private = udl; + drmm_add_final_kfree(>drm, udl); r = udl_init(udl); if (r) { - drm_dev_fini(>drm); - kfree(udl); + drm_dev_put(>drm); return ERR_PTR(r); } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 16/51] drm/inigenic: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Paul Cercueil --- drivers/gpu/drm/ingenic/ingenic-drm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm.c b/drivers/gpu/drm/ingenic/ingenic-drm.c index 6d47ef7b148c..12b14aed05cd 100644 --- a/drivers/gpu/drm/ingenic/ingenic-drm.c +++ b/drivers/gpu/drm/ingenic/ingenic-drm.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include #include @@ -490,11 +491,8 @@ static irqreturn_t ingenic_drm_irq_handler(int irq, void *arg) static void ingenic_drm_release(struct drm_device *drm) { - struct ingenic_drm *priv = drm_device_get_priv(drm); - drm_mode_config_cleanup(drm); drm_dev_fini(drm); - kfree(priv); } static int ingenic_drm_enable_vblank(struct drm_crtc *crtc) @@ -639,6 +637,7 @@ static int ingenic_drm_probe(struct platform_device *pdev) kfree(priv); return ret; } + drmm_add_final_kfree(drm, priv); drm_mode_config_init(drm); drm->mode_config.min_width = 0; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 13/51] drm/vgem: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. v2: After drm_dev_init/drmm_add_final_kfree we need to clean up everything through a drm_dev_put. Rework the unwind code to match that. Signed-off-by: Daniel Vetter Cc: Daniel Vetter Cc: Emil Velikov Cc: Chris Wilson Cc: Sean Paul Cc: Eric Anholt Cc: Rob Clark Cc: Sam Ravnborg --- drivers/gpu/drm/vgem/vgem_drv.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vgem/vgem_drv.c b/drivers/gpu/drm/vgem/vgem_drv.c index 909eba43664a..7486014e9149 100644 --- a/drivers/gpu/drm/vgem/vgem_drv.c +++ b/drivers/gpu/drm/vgem/vgem_drv.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include "vgem_drv.h" @@ -432,8 +433,6 @@ static void vgem_release(struct drm_device *dev) platform_device_unregister(vgem->platform); drm_dev_fini(>drm); - - kfree(vgem); } static struct drm_driver vgem_driver = { @@ -489,16 +488,19 @@ static int __init vgem_init(void) _device->platform->dev); if (ret) goto out_unregister; + drmm_add_final_kfree(_device->drm, vgem_device); /* Final step: expose the device/driver to userspace */ - ret = drm_dev_register(_device->drm, 0); + ret = drm_dev_register(_device->drm, 0); if (ret) - goto out_fini; + goto out_put; return 0; -out_fini: - drm_dev_fini(_device->drm); +out_put: + drm_dev_put(_device->drm); + return ret; + out_unregister: platform_device_unregister(vgem_device->platform); out_free: -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 01/51] mm/sl[uo]b: export __kmalloc_track(_node)_caller
slab does this already, and I want to use this in a memory allocation tracker in drm for stuff that's tied to the lifetime of a drm_device, not the underlying struct device. Kinda like devres, but for drm. Acked-by: Andrew Morton Signed-off-by: Daniel Vetter Cc: Christoph Lameter Cc: Pekka Enberg Cc: David Rientjes Cc: Joonsoo Kim Cc: Andrew Morton Cc: linux...@kvack.org -- I plan to merge this through drm-misc-next (with Andrew's ack) once the remainder of the drm series is in shape. -Daniel --- mm/slob.c | 2 ++ mm/slub.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/mm/slob.c b/mm/slob.c index fa53e9f73893..ac2aecfbc7a8 100644 --- a/mm/slob.c +++ b/mm/slob.c @@ -524,6 +524,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfp, unsigned long caller) { return __do_kmalloc_node(size, gfp, NUMA_NO_NODE, caller); } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, @@ -531,6 +532,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfp, { return __do_kmalloc_node(size, gfp, node, caller); } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif void kfree(const void *block) diff --git a/mm/slub.c b/mm/slub.c index be2854b5b1c9..7271fb235ed8 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4358,6 +4358,7 @@ void *__kmalloc_track_caller(size_t size, gfp_t gfpflags, unsigned long caller) return ret; } +EXPORT_SYMBOL(__kmalloc_track_caller); #ifdef CONFIG_NUMA void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, @@ -4388,6 +4389,7 @@ void *__kmalloc_node_track_caller(size_t size, gfp_t gfpflags, return ret; } +EXPORT_SYMBOL(__kmalloc_node_track_caller); #endif #ifdef CONFIG_SYSFS -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 18/51] drm/: Use drmm_add_final_kfree
These are the leftover drivers that didn't have a ->release hook that needed to be updated. Signed-off-by: Daniel Vetter Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Russell King Cc: Hans de Goede --- drivers/gpu/drm/arm/display/komeda/komeda_kms.c | 2 ++ drivers/gpu/drm/armada/armada_drv.c | 2 ++ drivers/gpu/drm/vboxvideo/vbox_drv.c| 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c index 442d4656150a..16dfd5cdb66c 100644 --- a/drivers/gpu/drm/arm/display/komeda/komeda_kms.c +++ b/drivers/gpu/drm/arm/display/komeda/komeda_kms.c @@ -14,6 +14,7 @@ #include #include #include +#include #include #include @@ -271,6 +272,7 @@ struct komeda_kms_dev *komeda_kms_attach(struct komeda_dev *mdev) err = drm_dev_init(drm, _kms_driver, mdev->dev); if (err) goto free_kms; + drmm_add_final_kfree(drm, kms); drm->dev_private = mdev; diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index 197dca3fc84c..dd9ed71ed942 100644 --- a/drivers/gpu/drm/armada/armada_drv.c +++ b/drivers/gpu/drm/armada/armada_drv.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include #include @@ -103,6 +104,7 @@ static int armada_drm_bind(struct device *dev) kfree(priv); return ret; } + drmm_add_final_kfree(>drm, priv); /* Remove early framebuffers */ ret = drm_fb_helper_remove_conflicting_framebuffers(NULL, diff --git a/drivers/gpu/drm/vboxvideo/vbox_drv.c b/drivers/gpu/drm/vboxvideo/vbox_drv.c index 8512d970a09f..13eaae7921f5 100644 --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -17,6 +17,7 @@ #include #include #include +#include #include "vbox_drv.h" @@ -54,6 +55,7 @@ static int vbox_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) vbox->ddev.pdev = pdev; vbox->ddev.dev_private = vbox; pci_set_drvdata(pdev, vbox); + drmm_add_final_kfree(>ddev, vbox); mutex_init(>hw_mutex); ret = pci_enable_device(pdev); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 10/51] drm/v3d: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. I also noticed that the unwind code is wrong, after drm_dev_init the drm_device owns the v3d allocation, so the kfree(v3d) is a double-free. Reorder the setup to fix this issue. After a bit more prep in drivers and drm core v3d should be able to switch over to devm_drm_dev_init, which should clean this up further. Acked-by: Eric Anholt Signed-off-by: Daniel Vetter Cc: Eric Anholt --- drivers/gpu/drm/v3d/v3d_drv.c | 38 ++- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_drv.c b/drivers/gpu/drm/v3d/v3d_drv.c index eaa8e9682373..8d0c0daaac81 100644 --- a/drivers/gpu/drm/v3d/v3d_drv.c +++ b/drivers/gpu/drm/v3d/v3d_drv.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include "v3d_drv.h" @@ -257,13 +258,23 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) v3d->pdev = pdev; drm = >drm; + ret = drm_dev_init(>drm, _drm_driver, dev); + if (ret) { + kfree(v3d); + return ret; + } + + platform_set_drvdata(pdev, drm); + drm->dev_private = v3d; + drmm_add_final_kfree(drm, v3d); + ret = map_regs(v3d, >hub_regs, "hub"); if (ret) - goto dev_free; + goto dev_destroy; ret = map_regs(v3d, >core_regs[0], "core0"); if (ret) - goto dev_free; + goto dev_destroy; mmu_debug = V3D_READ(V3D_MMU_DEBUG_INFO); dev->coherent_dma_mask = @@ -281,21 +292,21 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) ret = PTR_ERR(v3d->reset); if (ret == -EPROBE_DEFER) - goto dev_free; + goto dev_destroy; v3d->reset = NULL; ret = map_regs(v3d, >bridge_regs, "bridge"); if (ret) { dev_err(dev, "Failed to get reset control or bridge regs\n"); - goto dev_free; + goto dev_destroy; } } if (v3d->ver < 41) { ret = map_regs(v3d, >gca_regs, "gca"); if (ret) - goto dev_free; + goto dev_destroy; } v3d->mmu_scratch = dma_alloc_wc(dev, 4096, >mmu_scratch_paddr, @@ -303,23 +314,16 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) if (!v3d->mmu_scratch) { dev_err(dev, "Failed to allocate MMU scratch page\n"); ret = -ENOMEM; - goto dev_free; + goto dev_destroy; } pm_runtime_use_autosuspend(dev); pm_runtime_set_autosuspend_delay(dev, 50); pm_runtime_enable(dev); - ret = drm_dev_init(>drm, _drm_driver, dev); - if (ret) - goto dma_free; - - platform_set_drvdata(pdev, drm); - drm->dev_private = v3d; - ret = v3d_gem_init(drm); if (ret) - goto dev_destroy; + goto dma_free; ret = v3d_irq_init(v3d); if (ret) @@ -335,12 +339,10 @@ static int v3d_platform_drm_probe(struct platform_device *pdev) v3d_irq_disable(v3d); gem_destroy: v3d_gem_destroy(drm); -dev_destroy: - drm_dev_put(drm); dma_free: dma_free_wc(dev, 4096, v3d->mmu_scratch, v3d->mmu_scratch_paddr); -dev_free: - kfree(v3d); +dev_destroy: + drm_dev_put(drm); return ret; } -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 09/51] drm/cirrus: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. I also noticed that cirrus forgot to call drm_dev_fini(). v2: Don't call kfree(cirrus) after we've handed overship of that to drm_device and the drmm_ stuff. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: Daniel Vetter Cc: "Noralf Trønnes" Cc: Linus Walleij Cc: Sam Ravnborg Cc: Thomas Zimmermann Cc: virtualizat...@lists.linux-foundation.org --- drivers/gpu/drm/cirrus/cirrus.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus.c b/drivers/gpu/drm/cirrus/cirrus.c index d2ff63ce8eaf..2232556ce34c 100644 --- a/drivers/gpu/drm/cirrus/cirrus.c +++ b/drivers/gpu/drm/cirrus/cirrus.c @@ -35,6 +35,7 @@ #include #include #include +#include #include #include #include @@ -527,10 +528,8 @@ static void cirrus_mode_config_init(struct cirrus_device *cirrus) static void cirrus_release(struct drm_device *dev) { - struct cirrus_device *cirrus = dev->dev_private; - drm_mode_config_cleanup(dev); - kfree(cirrus); + drm_dev_fini(dev); } DEFINE_DRM_GEM_FOPS(cirrus_fops); @@ -575,9 +574,12 @@ static int cirrus_pci_probe(struct pci_dev *pdev, dev = >dev; ret = drm_dev_init(dev, _driver, >dev); - if (ret) - goto err_free_cirrus; + if (ret) { + kfree(cirrus); + goto err_pci_release; + } dev->dev_private = cirrus; + drmm_add_final_kfree(dev, cirrus); ret = -ENOMEM; cirrus->vram = ioremap(pci_resource_start(pdev, 0), @@ -618,8 +620,6 @@ static int cirrus_pci_probe(struct pci_dev *pdev, iounmap(cirrus->vram); err_dev_put: drm_dev_put(dev); -err_free_cirrus: - kfree(cirrus); err_pci_release: pci_release_regions(pdev); return ret; -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx
[Intel-gfx] [PATCH 07/51] drm/qxl: Use drmm_add_final_kfree
With this we can drop the final kfree from the release function. Signed-off-by: Daniel Vetter Cc: Dave Airlie Cc: Gerd Hoffmann Cc: virtualizat...@lists.linux-foundation.org Cc: spice-de...@lists.freedesktop.org --- drivers/gpu/drm/qxl/qxl_drv.c | 2 -- drivers/gpu/drm/qxl/qxl_kms.c | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_drv.c b/drivers/gpu/drm/qxl/qxl_drv.c index 4fda3f9b29f4..09102e2efabc 100644 --- a/drivers/gpu/drm/qxl/qxl_drv.c +++ b/drivers/gpu/drm/qxl/qxl_drv.c @@ -144,8 +144,6 @@ static void qxl_drm_release(struct drm_device *dev) */ qxl_modeset_fini(qdev); qxl_device_fini(qdev); - dev->dev_private = NULL; - kfree(qdev); } static void diff --git a/drivers/gpu/drm/qxl/qxl_kms.c b/drivers/gpu/drm/qxl/qxl_kms.c index 70b20ee4741a..09d7b5f6d172 100644 --- a/drivers/gpu/drm/qxl/qxl_kms.c +++ b/drivers/gpu/drm/qxl/qxl_kms.c @@ -27,6 +27,7 @@ #include #include +#include #include #include "qxl_drv.h" @@ -121,6 +122,7 @@ int qxl_device_init(struct qxl_device *qdev, qdev->ddev.pdev = pdev; pci_set_drvdata(pdev, >ddev); qdev->ddev.dev_private = qdev; + drmm_add_final_kfree(>ddev, qdev); mutex_init(>gem.mutex); mutex_init(>update_area_mutex); -- 2.24.1 ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx