Skip to content
Snippets Groups Projects
  1. Jul 01, 2022
  2. Jun 22, 2022
  3. May 18, 2022
  4. Apr 29, 2022
  5. Apr 27, 2022
  6. Apr 21, 2022
  7. Apr 20, 2022
  8. Apr 19, 2022
  9. Apr 15, 2022
  10. Apr 14, 2022
  11. Apr 13, 2022
  12. Apr 12, 2022
    • Matthew Auld's avatar
      drm/ttm: stop passing NULL fence in ttm_bo_move_sync_cleanup · c6346218
      Matthew Auld authored and Christian König's avatar Christian König committed
      
      If we hit the sync case, like when skipping clearing for kernel internal
      objects, or when falling back to cpu clearing, like in i915, we end up
      trying to add a NULL fence, but with some recent changes in this area
      this now just results in NULL deref in dma_resv_add_fence:
      
      <1>[    5.466383] BUG: kernel NULL pointer dereference, address: 0000000000000008
      <1>[    5.466384] #PF: supervisor read access in kernel mode
      <1>[    5.466385] #PF: error_code(0x0000) - not-present page
      <6>[    5.466386] PGD 0 P4D 0
      <4>[    5.466387] Oops: 0000 [#1] PREEMPT SMP NOPTI
      <4>[    5.466389] CPU: 5 PID: 267 Comm: modprobe Not tainted 5.18.0-rc2-CI-CI_DRM_11481+ #1
      <4>[    5.466391] RIP: 0010:dma_resv_add_fence+0x63/0x260
      <4>[    5.466395] Code: 38 85 c0 0f 84 df 01 00 00 0f 88 e8 01 00 00 83 c0 01 0f 88 df 01 00 00 8b 05 35 89 10 01 49 8d 5e 68 85 c0 0f 85 45 01 00 00 <48> 8b 45 08 48 3d c0 a5 0a 82 0f 84 5c 01 00 00 48 3d 60 a5 0a 82
      <4>[    5.466396] RSP: 0018:ffffc90000e974f8 EFLAGS: 00010202
      <4>[    5.466397] RAX: 0000000000000001 RBX: ffff888123e88b28 RCX: 00000000ffffffff
      <4>[    5.466398] RDX: 0000000000000001 RSI: ffffffff822e4f50 RDI: ffffffff8233f087
      <4>[    5.466399] RBP: 0000000000000000 R08: ffff8881313dbc80 R09: 0000000000000001
      <4>[    5.466399] R10: 0000000000000001 R11: 00000000da354294 R12: 0000000000000000
      <4>[    5.466400] R13: ffff88810927dc58 R14: ffff888123e88ac0 R15: ffff88810a88d600
      <4>[    5.466401] FS:  00007f5fa1193540(0000) GS:ffff88845d880000(0000) knlGS:0000000000000000
      <4>[    5.466402] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      <4>[    5.466402] CR2: 0000000000000008 CR3: 0000000106dd6003 CR4: 00000000003706e0
      <4>[    5.466403] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      <4>[    5.466404] DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      <4>[    5.466404] Call Trace:
      <4>[    5.466405]  <TASK>
      <4>[    5.466406]  ttm_bo_move_accel_cleanup+0x62/0x270 [ttm]
      <4>[    5.466411]  ? i915_rsgt_from_buddy_resource+0x185/0x1e0 [i915]
      <4>[    5.466529]  i915_ttm_move+0xfd/0x430 [i915]
      <4>[    5.466833]  ? dma_resv_reserve_fences+0x4e/0x320
      <4>[    5.466836]  ? ttm_bo_add_move_fence.constprop.20+0xf7/0x140 [ttm]
      <4>[    5.466841]  ttm_bo_handle_move_mem+0xa1/0x140 [ttm]
      <4>[    5.466845]  ttm_bo_validate+0xee/0x160 [ttm]
      <4>[    5.466849]  __i915_ttm_get_pages+0x4f/0x210 [i915]
      <4>[    5.466976]  i915_ttm_get_pages+0xad/0x140 [i915]
      <4>[    5.467094]  ____i915_gem_object_get_pages+0x32/0xf0 [i915]
      <4>[    5.467210]  __i915_gem_object_get_pages+0x89/0xa0 [i915]
      <4>[    5.467323]  i915_vma_get_pages+0x114/0x1d0 [i915]
      <4>[    5.467446]  i915_vma_pin_ww+0xd3/0xa90 [i915]
      <4>[    5.467570]  i915_vma_pin.constprop.10+0x119/0x1b0 [i915]
      <4>[    5.467700]  ? __mutex_unlock_slowpath+0x3e/0x2b0
      <4>[    5.467704]  intel_alloc_initial_plane_obj.isra.6+0x1a9/0x390 [i915]
      <4>[    5.467833]  intel_crtc_initial_plane_config+0x83/0x340 [i915]
      
      In the ttm_bo_move_sync_cleanup() case it seems we only really care
      about calling ttm_bo_wait_free_node(), so let's instead just call that
      directly.
      
      Signed-off-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Cc: Thomas Hellström <thomas.hellstrom@linux.intel.com>
      Cc: Christian König <christian.koenig@amd.com>
      Cc: Lucas De Marchi <lucas.demarchi@intel.com>
      Cc: Nirmoy Das <nirmoy.das@linux.intel.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220411085603.58156-1-matthew.auld@intel.com
      c6346218
    • Mika Kahola's avatar
      drm/fourcc: Introduce format modifier for DG2 clear color · 9035039e
      Mika Kahola authored and Imre Deak's avatar Imre Deak committed
      
      DG2 clear color render compression uses Tile4 layout. Therefore, we need
      to define a new format modifier for uAPI to support clear color rendering.
      
      v2:
        Display version is fixed. [Imre]
        KDoc is enhanced for cc modifier. [Nanley & Lionel]
      v3:
        Split out the modifier addition to a separate patch.
        Clarify the modifier layout description.
      
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarMika Kahola <mika.kahola@intel.com>
      cc: Anshuman Gupta <anshuman.gupta@intel.com>
      Signed-off-by: default avatarJuha-Pekka Heikkilä <juha-pekka.heikkila@intel.com>
      Signed-off-by: default avatarRamalingam C <ramalingam.c@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Acked-by: default avatarNanley Chery <nanley.g.chery@intel.com>
      Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Acked-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220411143405.1073845-4-imre.deak@intel.com
      9035039e
    • Matt Roper's avatar
      drm/fourcc: Introduce format modifiers for DG2 render and media compression · 764b2668
      Matt Roper authored and Imre Deak's avatar Imre Deak committed
      
      The render/media engines on DG2 unify render compression and media
      compression into a single format for the first time, using the Tile 4
      layout for main surfaces. The compression algorithm is different from
      any previous platform and the display engine must still be configured to
      decompress either a render or media compressed surface; as such, we
      need new RC and MC framebuffer modifiers to represent buffers in this
      format.
      
      v2: Clarify modifier layout description.
      
      Cc: dri-devel@lists.freedesktop.org
      Signed-off-by: default avatarMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Acked-by: default avatarNanley Chery <nanley.g.chery@intel.com>
      Reviewed-by: default avatarJuha-Pekka Heikkila <juhapekka.heikkila@gmail.com>
      Acked-by: default avatarMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220411143405.1073845-2-imre.deak@intel.com
      764b2668
  13. Apr 09, 2022
    • Waiman Long's avatar
      mm/sparsemem: fix 'mem_section' will never be NULL gcc 12 warning · a431dbbc
      Waiman Long authored
      The gcc 12 compiler reports a "'mem_section' will never be NULL" warning
      on the following code:
      
          static inline struct mem_section *__nr_to_section(unsigned long nr)
          {
          #ifdef CONFIG_SPARSEMEM_EXTREME
              if (!mem_section)
                      return NULL;
          #endif
              if (!mem_section[SECTION_NR_TO_ROOT(nr)])
                      return NULL;
             :
      
      It happens with CONFIG_SPARSEMEM_EXTREME off.  The mem_section definition
      is
      
          #ifdef CONFIG_SPARSEMEM_EXTREME
          extern struct mem_section **mem_section;
          #else
          extern struct mem_section mem_section[NR_SECTION_ROOTS][SECTIONS_PER_ROOT];
          #endif
      
      In the !CONFIG_SPARSEMEM_EXTREME case, mem_section is a static
      2-dimensional array and so the check "!mem_section[SECTION_NR_TO_ROOT(nr)]"
      doesn't make sense.
      
      Fix this warning by moving the "!mem_section[SECTION_NR_TO_ROOT(nr)]"
      check up inside the CONFIG_SPARSEMEM_EXTREME block and adding an
      explicit NR_SECTION_ROOTS check to make sure that there is no
      out-of-bound array access.
      
      Link: https://lkml.kernel.org/r/20220331180246.2746210-1-longman@redhat.com
      
      
      Fixes: 3e347261 ("sparsemem extreme implementation")
      Signed-off-by: default avatarWaiman Long <longman@redhat.com>
      Reported-by: default avatarJustin Forbes <jforbes@redhat.com>
      Cc: "Kirill A . Shutemov" <kirill.shutemov@linux.intel.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Rafael Aquini <aquini@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
      a431dbbc
  14. Apr 08, 2022
  15. Apr 07, 2022
Loading