1. 18 May, 2020 4 commits
    • Andrey Grodzovsky's avatar
      drm/amdgpu: Add new ring callback to insert memory sync · 22301177
      Andrey Grodzovsky authored
      Used to flush and invalidate various caches.
      
      v2: Rename function hook
      Signed-off-by: default avatarAndrey Grodzovsky <andrey.grodzovsky@amd.com>
      Reviewed-by: default avatarLuben Tuikov <luben.tuikov@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      22301177
    • Kevin Wang's avatar
      drm/amdgpu: optimize amdgpu device attribute code · 4e01847c
      Kevin Wang authored
      unified amdgpu device attribute node functions:
      1. add some helper functions to create amdgpu device attribute node.
      2. create device node according to device attr flags on different VF mode.
      3. rename some functions name to adapt a new interface.
      
      v2:
      1. remove ATTR_STATE_DEAD, ATTR_STATE_ALIVE enum.
      2. rename callback function perform to attr_update.
      3. modify some variable names
      Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      4e01847c
    • Kevin Wang's avatar
      drm/amdgpu: add amdgpu_virt_get_vf_mode helper function · a7f28103
      Kevin Wang authored
      the swsmu or powerplay(hwmgr) need to handle task according to different VF mode,
      this function to help query vf mode.
      
      vf mode:
      1. SRIOV_VF_MODE_BARE_METAL: the driver work on host  OS (PF)
      2. SRIOV_VF_MODE_ONE_VF    : the driver work on guest OS with one VF
      3. SRIOV_VF_MODE_MULTI_VF  : the driver work on guest OS with multi VF
      Signed-off-by: default avatarKevin Wang <kevin1.wang@amd.com>
      Reviewed-by: default avatarHawking Zhang <Hawking.Zhang@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      a7f28103
    • Jiange Zhao's avatar
      drm/amdgpu: Add autodump debugfs node for gpu reset v8 · 728e7e0c
      Jiange Zhao authored
      When GPU got timeout, it would notify an interested part
      of an opportunity to dump info before actual GPU reset.
      
      A usermode app would open 'autodump' node under debugfs system
      and poll() for readable/writable. When a GPU reset is due,
      amdgpu would notify usermode app through wait_queue_head and give
      it 10 minutes to dump info.
      
      After usermode app has done its work, this 'autodump' node is closed.
      On node closure, amdgpu gets to know the dump is done through
      the completion that is triggered in release().
      
      There is no write or read callback because necessary info can be
      obtained through dmesg and umr. Messages back and forth between
      usermode app and amdgpu are unnecessary.
      
      v2: (1) changed 'registered' to 'app_listening'
          (2) add a mutex in open() to prevent race condition
      
      v3 (chk): grab the reset lock to avoid race in autodump_open,
                rename debugfs file to amdgpu_autodump,
                provide autodump_read as well,
                style and code cleanups
      
      v4: add 'bool app_listening' to differentiate situations, so that
          the node can be reopened; also, there is no need to wait for
          completion when no app is waiting for a dump.
      
      v5: change 'bool app_listening' to 'enum amdgpu_autodump_state'
          add 'app_state_mutex' for race conditions:
      	(1)Only 1 user can open this file node
      	(2)wait_dump() can only take effect after poll() executed.
      	(3)eliminated the race condition between release() and
      	   wait_dump()
      
      v6: removed 'enum amdgpu_autodump_state' and 'app_state_mutex'
          removed state checking in amdgpu_debugfs_wait_dump
          Improve on top of version 3 so that the node can be reopened.
      
      v7: move reinit_completion into open() so that only one user
          can open it.
      
      v8: remove complete_all() from amdgpu_debugfs_wait_dump().
      Signed-off-by: default avatarJiange Zhao <Jiange.Zhao@amd.com>
      Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
      Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
      728e7e0c
  2. 14 May, 2020 13 commits
  3. 13 May, 2020 7 commits
  4. 11 May, 2020 5 commits
  5. 08 May, 2020 11 commits