1. 10 1月, 2015 2 次提交
  2. 06 12月, 2014 1 次提交
  3. 04 12月, 2014 1 次提交
  4. 03 12月, 2014 2 次提交
  5. 26 11月, 2014 1 次提交
  6. 25 11月, 2014 3 次提交
  7. 22 11月, 2014 2 次提交
  8. 18 11月, 2014 1 次提交
  9. 10 11月, 2014 1 次提交
  10. 19 11月, 2014 1 次提交
  11. 17 11月, 2014 1 次提交
    • O
      amdkfd: use schedule() in sync_with_hw · 9a5634a7
      Oded Gabbay 提交于
      amdkfd uses cpu_relax() in its sync_with_hw() function. Because cpu_relax() is
      defined as 'REP; NOP' on x86_64, it will block the CPU from servicing
      IOMMU PPR requests.
      
      This may cause a deadlock, because sync_with_hw() won't be completed
      until the PPR request has been served.
      
      Therefore, we need to use schedule() instead of cpu_relax() as it is the
      minimum requirement to allow other threads to execute.
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      9a5634a7
  12. 21 11月, 2014 1 次提交
  13. 20 11月, 2014 8 次提交
  14. 09 11月, 2014 1 次提交
  15. 02 11月, 2014 1 次提交
  16. 17 7月, 2014 3 次提交
  17. 20 10月, 2014 1 次提交
    • O
      amdkfd: Implement the create/destroy/update queue IOCTLs · 39b027d9
      Oded Gabbay 提交于
      v3: Removed the use of internal typedefs, fixed debug prints, added checks
          for parameters and moved to using doorbell address from user
      
      v4: Extracted some of the code in the create queue ioctl to a different
          function that may be also called from other ioctls in the future.
          Also fixed the check of the ring size argument.
      
      v5:
      
      Add support for AQL queues creation to enable working with open-source HSA
      runtime
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      39b027d9
  18. 17 7月, 2014 9 次提交
    • A
      amdkfd: Add interrupt handling module · b3f5e6b4
      Andrew Lewycky 提交于
      This patch adds the interrupt handling module, in kfd_interrupt.c, and its
      related members in different data structures to the amdkfd driver.
      
      The amdkfd interrupt module maintains an internal interrupt ring per amdkfd
      device. The internal interrupt ring contains interrupts that needs further
      handling. The extra handling is deferred to a later time through a workqueue.
      
      There's no acknowledgment for the interrupts we use. The hardware simply queues
      a new interrupt each time without waiting.
      
      The fixed-size internal queue means that it's possible for us to lose
      interrupts because we have no back-pressure to the hardware.
      
      v3:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Change device init
      Made sure spin lock is taken only if init is complete
      Moved bool field to the end of the structure
      Signed-off-by: NAndrew Lewycky <Andrew.Lewycky@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      b3f5e6b4
    • B
      amdkfd: Add device queue manager module · 64c7f8cf
      Ben Goz 提交于
      The queue scheduler divides into two sections, one section is process bounded
      and the other section is device bounded.
      The device bounded section is handled by this module.
      The DQM module handles queue setup, update and tear-down from the device side.
      It also supports suspend/resume operation.
      
      v3: Changed device_init, added the use of the new gart allocation functions an
      Added documentation.
      
      v4:
      
      Fixed a race in DQM queue scheduler where dqm->lock must be held when accessing
      dqm->queue_count and dqm->processes_count. This fixes runlist IB allocation
      failures when DQM is under load.
      
      Fixed race in DQM queue destruction where queues being destroyed must be
      removed from qpd->queues_list prior to preemption, or concurrent queue
      creation activity may reschedule them while their MQD is destroyed.
      
      Fixed EOP queue size setting in CP_HPD_EOP_CONTROL, because the size is
      specified as (log2(size_dwords)-1). The previous calculation assumed the
      size was specified in bytes, which caused interference between EOP queues
      when multiple MEC pipelines were active.
      
      v5:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Change format of mqd structure to match latest KV firmware
      Add support for AQL queues creation to enable working with open-source HSA
      runtime
      Remove unused unmap_queue function
      Various fixes (Style, typos)
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NJay Cornwall <jay.cornwall@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      64c7f8cf
    • B
      amdkfd: Add process queue manager module · 45102048
      Ben Goz 提交于
      The queue scheduler divides into two sections, one section is process bounded
      and the other section is device bounded.
      The process bounded section is handled by this module. The PQM handles usermode
      queue setup, updates and tear-down.
      
      v3:
      
      Used kernel parameter to limit queues per process instead of define
      Added use of doorbell address from user
      
      v4:
      
      Modified pqm_create_queue so that only when creating usermode queues the
      driver should return the queue properties to the userspace.
      
      Added an info message print when no more queues can be opened because of the
      queue per process limitation
      
      v5:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Various fixes
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      45102048
    • B
      amdkfd: Add packet manager module · 241f24f8
      Ben Goz 提交于
      The packet manager module builds PM4 packets for the sole use of the CP
      scheduler. Those packets are used by the HIQ to submit runlists to the CP.
      
      v3:
      
      Removed include of cik_mqds.h
      Changed lower_32/upper_32 calls to use linux macros
      Used new gart allocation functions
      Added documentation
      
      v5:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Change format of mqd structure to match latest KV firmware
      Add support for AQL queues creation to enable working with open-source HSA
      runtime
      Always chain runlist if you have more than 1 process or if you have
      over-subscription over the number of queues.
      Various fixes (typos, style)
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      241f24f8
    • B
      amdkfd: Add module parameter of scheduling policy · 31c21fec
      Ben Goz 提交于
      This patch adds a new parameter to the amdkfd driver. This parameter enables
      the user to select the scheduling policy of the CP. The choices are:
      
      * CP Scheduling with support for over-subscription
      * CP Scheduling without support for over-subscription
      * Without CP Scheduling
      
      Note that the third option (Without CP scheduling) is only for debug purposes
      and bringup of new H/W. As such, it is _not_ guaranteed to work at all times on
      all H/W versions.
      
      v3: Fixed description of parameter, changed the permissions to read_only, added
      a verification of the value and added documentation
      
      v5: Set default sched_policy to HWS as it is now supported by firmware
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      31c21fec
    • B
      amdkfd: Add kernel queue module · ed6e6a34
      Ben Goz 提交于
      The kernel queue module enables the amdkfd to establish kernel queues, not
      exposed to user space.
      
      The kernel queues are used for HIQ (HSA Interface Queue) and DIQ (Debug
      Interface Queue) operations
      
      v3: Removed use of internal typedefs and added use of the new gart allocation
      functions
      
      v4: Fixed a miscalculation in kernel queue wrapping
      
      v5:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Change format of mqd structure to match latest KV firmware
      Add support for AQL queues creation to enable working with open-source HSA
      runtime
      Add define for kernel queue size
      Various fixes
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      ed6e6a34
    • B
      amdkfd: Add mqd_manager module · 6e99df57
      Ben Goz 提交于
      The mqd_manager module handles MQD data structures.
      MQD stands for Memory Queue Descriptor, which is used by the H/W to
      keep the usermode queue state in memory.
      
      v3:
      
      Removed new typedefs
      Removed pragma pack 4
      Remove cik_mqds.h file
      Changed lower_32/upper_32 calls to use linux macros
      Used new gart allocation functions
      Added documentation
      
      v4:
      
      Added missing initialization of the addr field in init_mqd()
      
      Setting the hqd persistent.preload_req bit ON so that when queues switches
      on/off, their context will kept and read from the mqd when the cp reassign
      them, and thus the dispatched workload context kept consistent without any
      interrupts.
      
      v5:
      
      Move amdkfd from drm/radeon/ to drm/amd/
      Change format of mqd structure to match latest KV firmware
      Add support for AQL queues creation to enable working with open-source HSA
      runtime.
      Various fixes
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      6e99df57
    • B
      amdkfd: Add queue module · ed8aab45
      Ben Goz 提交于
      The queue module enables allocating and initializing queues uniformly.
      
      v3: Removed typedef and redundant memset call. Broke long pr_debug print to one
      liners and Added documentation.
      
      v5: Move amdkfd from drm/radeon/ to drm/amd/
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      ed8aab45
    • O
      amdkfd: Add binding/unbinding calls to amd_iommu driver · b17f068a
      Oded Gabbay 提交于
      This patch adds the functions to bind and unbind pasid
      from a device through the amd_iommu driver.
      
      The unbind function is called when the mm_struct of the
      process is released.
      
      The bind function is not called here because it is called
      only in the IOCTLs which are not yet implemented at this
      stage of the patchset.
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      b17f068a