1. 25 Feb, 2022 3 commits
    • Matthew Auld's avatar
      drm/i915/ttm: fixup the mock_bo · 8fbf2893
      Matthew Auld authored
      When running the mock selftests we currently blow up with:
      
      <6> [299.836278] i915: Running i915_gem_huge_page_mock_selftests/igt_mock_memory_region_huge_pages
      <1> [299.836356] BUG: kernel NULL pointer dereference, address: 00000000000000c8
      <1> [299.836361] #PF: supervisor read access in kernel mode
      <1> [299.836364] #PF: error_code(0x0000) - not-present page
      <6> [299.836367] PGD 0 P4D 0
      <4> [299.836369] Oops: 0000 [#1] PREEMPT SMP NOPTI
      <4> [299.836372] CPU: 1 PID: 1429 Comm: i915_selftest Tainted: G     U            5.17.0-rc4-CI-CI_DRM_11227+ #1
      <4> [299.836376] Hardware name: Intel(R) Client Systems NUC11TNHi5/NUC11TNBi5, BIOS TNTGL357.0042.2020.1221.1743 12/21/2020
      <4> [299.836380] RIP: 0010:ttm_resource_init+0x57/0x90 [ttm]
      <4> [299.836392] RSP: 0018:ffffc90001e4f680 EFLAGS: 00010203
      <4> [299.836395] RAX: 0000000000000000 RBX: ffffc90001e4f708 RCX: 0000000000000000
      <4> [299.836398] RDX: ffff888116172528 RSI: ffffc90001e4f6f8 RDI: 0000000000000000
      <4> [299.836401] RBP: ffffc90001e4f6f8 R08: 00000000000001b0 R09: ffff888116172528
      <4> [299.836403] R10: 0000000000000001 R11: 00000000a4cb2e51 R12: ffffc90001e4fa90
      <4> [299.836406] R13: ffff888116172528 R14: ffff888130d7f4b0 R15: ffff888130d7f400
      <4> [299.836409] FS:  00007ff241684500(0000) GS:ffff88849fe80000(0000) knlGS:0000000000000000
      <4> [299.836412] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4> [299.836416] CR2: 00000000000000c8 CR3: 0000000107b80001 CR4: 0000000000770ee0
      <4> [299.836418] PKRU: 55555554
      <4> [299.836420] Call Trace:
      <4> [299.836422]  <TASK>
      <4> [299.836423]  i915_ttm_buddy_man_alloc+0x68/0x240 [i915]
      
      ttm_resource_init() now needs to access the bo->bdev, and also wants to
      store the bo reference. Try to keep both working. The mock_bo is a hack
      so we can interface directly with the ttm managers alloc() and free() hooks for
      our mock testing, without invoking other TTM features like eviction,
      moves, etc.
      
      v2: make sure we only touch res->bo if the alloc() returns successfully
      
      Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/5123
      Fixes: 0e05fc49 ("drm/ttm: add common accounting to the resource mgr v3")
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Acked-by: default avatarChristian König <christian.koenig@amd.com>
      Reviewed-by: default avatarThomas Hellström <thomas.hellstrom@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220221121103.2473831-1-matthew.auld@intel.com
      8fbf2893
    • Tvrtko Ursulin's avatar
      Merge drm/drm-next into drm-intel-gt-next · db927686
      Tvrtko Ursulin authored
      Matt needed some buddy allocator changes for landing DG2 small BAR
      support patches.
      Signed-off-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      db927686
    • José Roberto de Souza's avatar
      drm/i915: Check stolen memory size before calling drm_mm_init · b8986c88
      José Roberto de Souza authored
      Add check for zero usable stolen memory before calling drm_mm_init
      to support configurations where stolen memory exists but is fully
      reserved.
      
      Also skip memory test in cases that usable stolen is smaller than
      page size(amount mapped and used to test memory).
      
      v2:
      - skiping test if available memory is smaller than page size (Lucas)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Signed-off-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarSteve Carbonari <steven.carbonari@intel.com>
      Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220223194946.725328-1-jose.souza@intel.com
      b8986c88
  2. 24 Feb, 2022 2 commits
    • Dave Airlie's avatar
      Merge tag 'drm-misc-next-2022-02-23' of git://anongit.freedesktop.org/drm/drm-misc into drm-next · 54f43c17
      Dave Airlie authored
      drm-misc-next for v5.18:
      
      UAPI Changes:
      
      Cross-subsystem Changes:
      - Split out panel-lvds and lvds dt bindings .
      - Put yes/no on/off disabled/enabled strings in linux/string_helpers.h
        and use it in drivers and tomoyo.
      - Clarify dma_fence_chain and dma_fence_array should never include eachother.
      - Flatten chains in syncobj's.
      - Don't double add in fbdev/defio when page is already enlisted.
      - Don't sort deferred-I/O pages by default in fbdev.
      
      Core Changes:
      - Fix missing pm_runtime_put_sync in bridge.
      - Set modifier support to only linear fb modifier if drivers don't
        advertise support.
      - As a result, we remove allow_fb_modifiers.
      - Add missing clear for EDID Deep Color Modes in drm_reset_display_info.
      - Assorted documentation updates.
      - Warn once in drm_clflush if there is no arch support.
      - Add missing select for dp helper in drm_panel_edp.
      - Assorted small fixes.
      - Improve fb-helper's clipping handling.
      - Don't dump shmem mmaps in a core dump.
      - Add accounting to ttm resource manager, and use it in amdgpu.
      - Allow querying the detected eDP panel through debugfs.
      - Add helpers for xrgb8888 to 8 and 1 bits gray.
      - Improve drm's buddy allocator.
      - Add selftests for the buddy allocator.
      
      Driver Changes:
      - Add support for nomodeset to a lot of drm drivers.
      - Use drm_module_*_driver in a lot of drm drivers.
      - Assorted small fixes to bridge/lt9611, v3d, vc4, vmwgfx, mxsfb, nouveau,
        bridge/dw-hdmi, panfrost, lima, ingenic, sprd, bridge/anx7625, ti-sn65dsi86.
      - Add bridge/it6505.
      - Create DP and DVI-I connectors in ast.
      - Assorted nouveau backlight fixes.
      - Rework amdgpu reset handling.
      - Add dt bindings for ingenic,jz4780-dw-hdmi.
      - Support reading edid through aux channel in ingenic.
      - Add a drm driver for Solomon SSD130x OLED displays.
      - Add simple support for sharp LQ140M1JW46.
      - Add more panels to nt35560.
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/686ec871-e77f-c230-22e5-9e3bb80f064a@linux.intel.com
      54f43c17
    • Dave Airlie's avatar
      Merge tag 'drm-intel-next-2022-02-23' of git://anongit.freedesktop.org/drm/drm-intel into drm-next · 7f44571b
      Dave Airlie authored
      Linux core:
      -----------
      iosys-map: Add offset to iosys_map_memcpy_to() (Lucas)
      iosys-map: Add a few more helpers (Lucas)
      
      i915 (display and core changes on drm-intel-next):
      --------------------------------------------------
      
      - Display's DBuf and watermark related fixes and improvements (Ville)
      - More i915 header and other code clean-up (Jani)
      - Display IPS fixes and improvements (Ville)
      - OPRegion fixes and cleanups (Jani)
      - Fix the plane end Y offset check for FBC (Ville)
      - DP 128b/132b updates (Jani)
      - Disable runtime pm wakeref tracking for the mock device selftest (Ville)
      - Many display code clean-up while targeting to fix up DP DFP 4:2:0 handling (Ville)
      - Bigjoiner state tracking and more bigjoiner related work (Ville)
      - Update DMC_DEBUG3 register for DG1 (Chuansheng)
      - SAGV fixes (Ville)
      - More GT register cleanup (Matt)
      - Fix build issue when using clang (Tong)
      - Display DG2 fixes (Matt)
      - ADL-P PHY related fixes (Imre)
      - PSR2 fixes (Jose)
      - Add PCH Support for Alder Lake N (Tejas)
      
      drm-intel-gt-next (drm-intel-gt-next-2022-02-17):
      -------------------------------------------------
      UAPI Changes:
      
      - Weak parallel submission support for execlists
      
        Minimal implementation of the parallel submission support for
        execlists backend that was previously only implemented for GuC.
        Support one sibling non-virtual engine.
      
      Core Changes:
      
      - Two backmerges of drm/drm-next for header file renames/changes and
        i915_regs reorganization
      
      Driver Changes:
      
      - Add new DG2 subplatform: DG2-G12 (Matt R)
      - Add new DG2 workarounds (Matt R, Ram, Bruce)
      - Handle pre-programmed WOPCM registers for DG2+ (Daniele)
      - Update guc shim control programming on XeHP SDV+ (Daniele)
      - Add RPL-S C0/D0 stepping information (Anusha)
      - Improve GuC ADS initialization to work on ARM64 on dGFX (Lucas)
      
      - Fix KMD and GuC race on accessing PMU busyness (Umesh)
      - Use PM timestamp instead of RING TIMESTAMP for reference in PMU with GuC (Umesh)
      - Report error on invalid reset notification from GuC (John)
      - Avoid WARN splat by holding RPM wakelock during PXP unbind (Juston)
      - Fixes to parallel submission implementation (Matt B.)
      - Improve GuC loading status check/error reports (John)
      - Tweak TTM LRU priority hint selection (Matt A.)
      - Align the plane_vma to min_page_size of stolen mem (Ram)
      
      - Introduce vma resources and implement async unbinding (Thomas)
      - Use struct vma_resource instead of struct vma_snapshot (Thomas)
      - Return some TTM accel move errors instead of trying memcpy move (Thomas)
      - Fix a race between vma / object destruction and unbinding (Thomas)
      - Remove short-term pins from execbuf (Maarten)
      - Update to GuC version 69.0.3 (John, Michal Wa.)
      - Improvements to GT reset paths in GuC backend (Matt B.)
      - Use shrinker_release_pages instead of writeback in shmem object hooks (Matt A., Tvrtko)
      - Use trylock instead of blocking lock when freeing GEM objects (Maarten)
      - Allocate intel_engine_coredump_alloc with ALLOW_FAIL (Matt B.)
      - Fixes to object unmapping and purging (Matt A)
      - Check for wedged device in GuC backend (John)
      - Avoid lockdep splat by locking dpt_obj around set_cache_level (Maarten)
      - Allow dead vm to unbind vma's without lock (Maarten)
      - s/engine->i915/i915/ for DG2 engine workarounds (Matt R)
      
      - Use to_gt() helper for GGTT accesses (Michal Wi.)
      - Selftest improvements (Matt B., Thomas, Ram)
      - Coding style and compiler warning fixes (Matt B., Jasmine, Andi, Colin, Gustavo, Dan)
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      
      From: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/YhbDan8wNZBR6FzF@intel.com
      7f44571b
  3. 23 Feb, 2022 19 commits
  4. 22 Feb, 2022 7 commits
  5. 21 Feb, 2022 7 commits
  6. 20 Feb, 2022 2 commits