1. 03 6月, 2015 1 次提交
    • Y
      drm/amdkfd: Add static user-mode queues support · 992839ad
      Yair Shachar 提交于
      This patch adds support for static user-mode queues in QCM.
      Queues which are designated as static can NOT be preempted by
      the CP microcode when it is executing its scheduling algorithm.
      
      This is needed for supporting the debugger feature, because we
      can't allow the CP to preempt queues which are currently being debugged.
      
      The number of queues that can be designated as static is limited by the
      number of HQDs (Hardware Queue Descriptors).
      Signed-off-by: NYair Shachar <yair.shachar@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      992839ad
  2. 19 5月, 2015 2 次提交
  3. 23 2月, 2015 2 次提交
  4. 22 1月, 2015 1 次提交
  5. 18 1月, 2015 1 次提交
    • O
      drm/amdkfd: Allow user to limit only queues per device · b8cbab04
      Oded Gabbay 提交于
      This patch replaces the two current amdkfd module parameters with a new one.
      
      The current parameters that are being replaced are:
      
      - Maximum number of HSA processes
      - Maximum number of queues per process
      
      The new parameter that replaces them is called "Maximum queues per device"
      
      This replacement achieves two goals:
      
      - Allows the user to have as many HSA processes as it wants (until
        a maximum of 512 HSA processes in Kaveri).
      
      - Removes the limitation the user had on maximum number of queues per HSA
        process. E.g. the user can now have processes which only have one queue and
        other processes which have hundreds of queues, while before the user
        couldn't have more than 128 queues per process (as default).
      
      The default value of the new parameter is 4096 (32 * 128, which were the
      defaults of the old parameters). There is almost no additional GART memory
      required for the default case. As a reminder, this amount of queues requires a
      little bit below 4MB of GART memory.
      
      v2:
      In addition, This patch defines a new counter for queues accounting in the DQM
      structure. This is done because the current counter only counts active queues
      which allows the user to create more queues than the
      max_num_of_queues_per_device module parameter allows.
      
      However, we need the current counter for the runlist packet build process, so
      the solution is to have a dedicated counter for this accounting.
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      Reviewed-by: NBen Goz <ben.goz@amd.com>
      b8cbab04
  6. 10 1月, 2015 1 次提交
  7. 12 1月, 2015 2 次提交
    • B
      drm/amdkfd: Add initial VI support for DQM · a22fc854
      Ben Goz 提交于
      This patch starts to add support for the VI APU in the DQM module.
      
      Because most (more than 90%) of the DQM code is shared among AMD's APUs, we
      chose a design that performs most/all the code in the shared DQM file
      (kfd_device_queue_manager.c). If there is H/W specific code to be executed,
      than it is written in an asic-specific extension function for that H/W.
      
      That asic-specific extension function is called from the shared function at the
      appropriate time. This requires that for every asic-specific extension function
      that is implemented in a specific ASIC, there will be an equivalent
      implementation in ALL ASICs, even if those implementations are just stubs.
      
      That way we achieve:
      
      - Maintainability: by having one copy of most of the code, we only need to
        fix bugs at one locations
      
      - Readability: very clear what is the shared code and what is done per ASIC
      
      - Extensibility: very easy to add new H/W specific files/functions
      Signed-off-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      a22fc854
    • O
      drm/amdkfd: Encapsulate DQM functions in ops structure · 45c9a5e4
      Oded Gabbay 提交于
      This patch does some re-org on the device_queue_manager structure. It takes out
      all the function pointers from the structure and puts them in a new structure,
      called device_queue_manager_ops. Then, it puts an instance of that structure
      inside device_queue_manager.
      
      This re-org is done to prepare the DQM module to support more than one AMD APU
      (Kaveri).
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
      45c9a5e4
  8. 17 7月, 2014 2 次提交
    • 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 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