Skip to content
Snippets Groups Projects
  1. Apr 19, 2022
  2. Apr 16, 2022
    • Huang Rui's avatar
      drm/amdgpu/pm: fix the null pointer while the smu is disabled · 717e763d
      Huang Rui authored
      
      It needs to check if the pp_funcs is initialized while release the
      context, otherwise it will trigger null pointer panic while the software
      smu is not enabled.
      
      [ 1109.404555] BUG: kernel NULL pointer dereference, address: 0000000000000078
      [ 1109.404609] #PF: supervisor read access in kernel mode
      [ 1109.404638] #PF: error_code(0x0000) - not-present page
      [ 1109.404657] PGD 0 P4D 0
      [ 1109.404672] Oops: 0000 [#1] PREEMPT SMP NOPTI
      [ 1109.404701] CPU: 7 PID: 9150 Comm: amdgpu_test Tainted: G           OEL    5.16.0-custom #1
      [ 1109.404732] Hardware name: innotek GmbH VirtualBox/VirtualBox, BIOS VirtualBox 12/01/2006
      [ 1109.404765] RIP: 0010:amdgpu_dpm_force_performance_level+0x1d/0x170 [amdgpu]
      [ 1109.405109] Code: 5d c3 44 8b a3 f0 80 00 00 eb e5 66 90 0f 1f 44 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 08 4c 8b b7 f0 7d 00 00 <49> 83 7e 78 00 0f 84 f2 00 00 00 80 bf 87 80 00 00 00 48 89 fb 0f
      [ 1109.405176] RSP: 0018:ffffaf3083ad7c20 EFLAGS: 00010282
      [ 1109.405203] RAX: 0000000000000000 RBX: ffff9796b1c14600 RCX: 0000000002862007
      [ 1109.405229] RDX: ffff97968591c8c0 RSI: 0000000000000001 RDI: ffff9796a3700000
      [ 1109.405260] RBP: ffffaf3083ad7c50 R08: ffffffff9897de00 R09: ffff979688d9db60
      [ 1109.405286] R10: 0000000000000000 R11: ffff979688d9db90 R12: 0000000000000001
      [ 1109.405316] R13: ffff9796a3700000 R14: 0000000000000000 R15: ffff9796a3708fc0
      [ 1109.405345] FS:  00007ff055cff180(0000) GS:ffff9796bfdc0000(0000) knlGS:0000000000000000
      [ 1109.405378] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      [ 1109.405400] CR2: 0000000000000078 CR3: 000000000a394000 CR4: 00000000000506e0
      [ 1109.405434] Call Trace:
      [ 1109.405445]  <TASK>
      [ 1109.405456]  ? delete_object_full+0x1d/0x20
      [ 1109.405480]  amdgpu_ctx_set_stable_pstate+0x7c/0xa0 [amdgpu]
      [ 1109.405698]  amdgpu_ctx_fini.part.0+0xcb/0x100 [amdgpu]
      [ 1109.405911]  amdgpu_ctx_do_release+0x71/0x80 [amdgpu]
      [ 1109.406121]  amdgpu_ctx_ioctl+0x52d/0x550 [amdgpu]
      [ 1109.406327]  ? _raw_spin_unlock+0x1a/0x30
      [ 1109.406354]  ? drm_gem_handle_delete+0x81/0xb0 [drm]
      [ 1109.406400]  ? amdgpu_ctx_get_entity+0x2c0/0x2c0 [amdgpu]
      [ 1109.406609]  drm_ioctl_kernel+0xb6/0x140 [drm]
      
      Signed-off-by: default avatarHuang Rui <ray.huang@amd.com>
      Reviewed-by: default avatarAaron Liu <aaron.liu@amd.com>
      717e763d
  3. Apr 15, 2022
  4. Apr 14, 2022
    • Gavin Wan's avatar
      drm/amd/amdgpu: Remove static from variable in RLCG Reg RW. · e5c4741c
      Gavin Wan authored
      
      [why] These static variables saves the RLC Scratch registers address.
            When we installed multiple GPUs (for example: XGMI setting) and
            multiple GPUs call the function at same time. The RLC Scratch
            registers address are changed each other. Then it caused
            reading/writing to wrong GPU.
      
      [fix] Removed the static from the variables. The variables are
            in stack.
      
      Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarGavin Wan <Gavin.Wan@amd.com>
      Change-Id: Iee78849291d4f7a9688ecc5165bec70ee85cdfbe
      e5c4741c
    • Felix Kuehling's avatar
      drm/amdkfd: fix race condition in kfd_wait_on_events · 81150f6e
      Felix Kuehling authored
      
      Add the waiters to the wait queue during initialization, while holding the
      event spinlock. Otherwise the waiter will not get activated if the event
      signals before being added to the wait queue.
      
      Signed-off-by: default avatarFelix Kuehling <Felix.Kuehling@amd.com>
      Reviewed-by: default avatarPhilip <Yang&lt;Philip.Yang@amd.com>
      81150f6e
    • Rodrigo Siqueira's avatar
      Revert "drm/amd/display: Pass HostVM enable flag into DCN3.1 DML" · 8e65bdd1
      Rodrigo Siqueira authored
      
      This reverts commit 367b3e93.
      
      While we were testing DCN3.1 with a hub, we noticed that only one of 2
      connected displays lights up when using some specific display
      resolution. In summary, this was the setup:
      
      1. Displays:
       * Sharp LQ156M1JW26 (eDP): 1080@240
       * BENQ SW320 (DP): 4k@60
       * BENQ EX3203R (DP): 4k@60
      2. Hub: Club3D CSV-7300
      3. ASIC: DCN3.1
      
      After bisecting this issue, we figured out the commit mentioned above
      introduced this issue. We are investigating why this patch introduced
      this regression, but we need to revert it for now.
      
      Cc: Harry Wentland <harry.wentland@amd.com>
      Cc: Mark Broadworth <Mark.Broadworth@amd.com>
      Cc: Michael Strauss <michael.strauss@amd.com>
      Acked-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
      8e65bdd1
    • xinhui pan's avatar
      drm/amdgpu: Fix one use-after-free of VM · d3bd8f5f
      xinhui pan authored
      
      VM might already be freed when amdgpu_vm_tlb_seq_cb() is called.
      We see the calltrace below.
      
      Fix it by keeping the last flush fence around and wait for it to signal
      
      BUG kmalloc-4k (Not tainted): Poison overwritten
      
      0xffff9c88630414e8-0xffff9c88630414e8 @offset=5352. First byte 0x6c
      instead of 0x6b Allocated in amdgpu_driver_open_kms+0x9d/0x360 [amdgpu]
      age=44 cpu=0 pid=2343
       __slab_alloc.isra.0+0x4f/0x90
       kmem_cache_alloc_trace+0x6b8/0x7a0
       amdgpu_driver_open_kms+0x9d/0x360 [amdgpu]
       drm_file_alloc+0x222/0x3e0 [drm]
       drm_open+0x11d/0x410 [drm]
      Freed in amdgpu_driver_postclose_kms+0x3e9/0x550 [amdgpu] age=22 cpu=1
      pid=2485
       kfree+0x4a2/0x580
       amdgpu_driver_postclose_kms+0x3e9/0x550 [amdgpu]
       drm_file_free+0x24e/0x3c0 [drm]
       drm_close_helper.isra.0+0x90/0xb0 [drm]
       drm_release+0x97/0x1a0 [drm]
       __fput+0xb6/0x280
       ____fput+0xe/0x10
       task_work_run+0x64/0xb0
      
      Suggested-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarxinhui pan <xinhui.pan@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      d3bd8f5f
  5. Apr 13, 2022
  6. Apr 12, 2022
  7. Apr 11, 2022
Loading