1. 16 8月, 2017 4 次提交
  2. 20 9月, 2016 1 次提交
  3. 22 6月, 2016 1 次提交
  4. 07 6月, 2015 1 次提交
  5. 03 6月, 2015 5 次提交
  6. 19 5月, 2015 5 次提交
    • O
      drm/amdkfd: Add module parameter of send_sigterm · 81663016
      Oded Gabbay 提交于
      This patch adds a new kernel module parameter to amdkfd,
      called send_sigterm.
      
      This parameter specifies whether amdkfd should send the
      SIGTERM signal to an HSA process, when the following conditions
      occur:
      
      1. The GPU triggers an exception regarding a kernel that was
         issued by this process.
      
      2. The HSA process isn't waiting on an event that handles
         this exception.
      
      The default behavior is not to send a SIGTERM and suffice
      with a dmesg error print.
      Reviewed-by: NBen Goz <ben.goz@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      81663016
    • A
      930c5ff4
    • A
      drm/amdkfd: Add memory exception handling · 59d3e8be
      Alexey Skidanov 提交于
      This patch adds Peripheral Page Request (PPR) failure processing
      and reporting.
      
      Bad address or pointer to a system memory block with inappropriate
      read/write permission cause such PPR failure during a user queue
      processing. PPR request handling is done by IOMMU driver notifying
      AMDKFD module on PPR failure.
      
      The process triggering a PPR failure will be notified by
      appropriate event or SIGTERM signal will be sent to it.
      
      v3:
      - Change all bool fields in struct kfd_memory_exception_failure to
        uint32_t
      Signed-off-by: NAlexey Skidanov <alexey.skidanov@gmail.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      59d3e8be
    • A
      drm/amdkfd: Add the events module · f3a39818
      Andrew Lewycky 提交于
      This patch adds the events module (kfd_events.c) and the interrupt
      handle module for Kaveri (cik_event_interrupt.c).
      
      The patch updates the interrupt_is_wanted(), so that it now calls the
      interrupt isr function specific for the device that received the
      interrupt. That function(implemented in cik_event_interrupt.c)
      returns whether this interrupt is of interest to us or not.
      
      The patch also updates the interrupt_wq(), so that it now calls the
      device's specific wq function, which checks the interrupt source
      and tries to signal relevant events.
      
      v2:
      
      Increase limit of signal events to 4096 per process
      Remove bitfields from struct cik_ih_ring_entry
      Rename radeon_kfd_event_mmap to kfd_event_mmap
      Add debug prints to allocate_free_slot and allocate_signal_page
      Make allocate_event_notification_slot return a correct value
      Add warning prints to create_signal_event
      Remove error print from IOCTL path
      Reformatted debug prints in kfd_event_mmap
      Map correct size (as received from mmap) in kfd_event_mmap
      
      v3:
      
      Reduce limit of signal events back to 256 per process
      Fix allocation of kernel memory for signal events
      Signed-off-by: NAndrew Lewycky <Andrew.Lewycky@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      f3a39818
    • A
      drm/amdkfd: Add interrupt handling module · 2249d558
      Andrew Lewycky 提交于
      This patch adds the interrupt handling module, 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.
      
      However, only interrupts that are "wanted" by amdkfd, are copied into
      the amdkfd s/w interrupt ring, in order to minimize the chances
      for overflow of the ring.
      Signed-off-by: NAndrew Lewycky <Andrew.Lewycky@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@gmail.com>
      2249d558
  7. 25 3月, 2015 2 次提交
  8. 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
  9. 10 1月, 2015 5 次提交
  10. 08 1月, 2015 1 次提交
  11. 07 1月, 2015 1 次提交
  12. 19 11月, 2014 1 次提交
  13. 20 11月, 2014 1 次提交
  14. 04 1月, 2015 1 次提交
    • B
      drm/amdkfd: Change MQD manager to be H/W specific · 4b8f589b
      Ben Goz 提交于
      The MQDs for CI and VI are different. Therefore, the MQD manager module need to
      be H/W specific.
      
      This patch splits the current MQD manager into three files:
      
      - kfd_mqd_manager.c, which contains common functions and initializes the
        specific mqd manager module according to the H/W
      
      - kfd_mqd_manager_cik.c, which contains Kaveri specific functions. This is
        basically the old kfd_mqd_manager.c
      
      - kfd_mqd_manager_vi.c, which will contain VI specific functions. Currently it
        is not implemented except for returning NULL on initialization.
      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>
      4b8f589b
  15. 01 1月, 2015 1 次提交
  16. 04 1月, 2015 2 次提交
  17. 17 7月, 2014 7 次提交
    • A
      amdkfd: Implement the Get Process Aperture IOCTL · 775921ed
      Alexey Skidanov 提交于
      v3: Fixed debug messages
      Signed-off-by: NAlexey Skidanov <Alexey.Skidanov@amd.com>
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      775921ed
    • 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