1. 17 7月, 2014 1 次提交
    • O
      amdkfd: Add amdkfd skeleton driver · 4a488a7a
      Oded Gabbay 提交于
      This patch adds the amdkfd skeleton driver. The driver does nothing except
      define a /dev/kfd device.
      
      It returns -ENODEV on all amdkfd IOCTLs.
      
      v3: Move bool field to the end of structure, removed the pmc ioctls and added
      a meaningful error message for ioctl error.
      
      v5:
      
      Create a new folder drm/amd and move amdkfd from drm/radeon/ to drm/amd/
      Remove scheduler_class from kfd_priv.h as it was never used
      Add skeleton implementation of the Get Version IOCTL
      
      v6:
      Update module version to the correct number and remove the "default m" from the
      Kconfig file
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      4a488a7a
  2. 16 7月, 2014 1 次提交
    • O
      amdkfd: Add IOCTL set definitions of amdkfd · b7facbae
      Oded Gabbay 提交于
      - KFD_IOC_GET_VERSION:
      	Retrieves the interface version of amdkfd
      
      - KFD_IOC_CREATE_QUEUE:
      	Creates a usermode queue that runs on a specific GPU device
      
      - KFD_IOC_DESTROY_QUEUE:
      	Destroys an existing usermode queue
      
      - KFD_IOC_SET_MEMORY_POLICY:
      	Sets the memory policy of the default and alternate aperture of the
              calling process
      
      - KFD_IOC_GET_CLOCK_COUNTERS:
      	Retrieves counters (timestamps) of CPU and GPU
      
      - KFD_IOC_GET_PROCESS_APERTURES:
      	Retrieves information about process apertures that were initialized
              during the open() call of the amdkfd device
      
      - KFD_IOC_UPDATE_QUEUE:
      	Updates configuration of an existing usermode queue
      
      v3: Remove pragma pack and pmc ioctls. Added parameter for doorbell offset and
      a comment on counters
      
      v5:
      
      Add define for AQL queues.
      Fix arguments of Get Version IOCTL
      Make IOCTL's structures to be the same size on 32/64 bit
      
      v6: Change the version of the amdkfd-thunk interface
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      b7facbae
  3. 15 7月, 2014 2 次提交
    • O
      Update MAINTAINERS and CREDITS files with amdkfd info · 16423d67
      Oded Gabbay 提交于
      v6: Update entries to reflect new name & location of driver
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      16423d67
    • O
      drm/radeon: Add radeon <--> amdkfd interface · e28740ec
      Oded Gabbay 提交于
      This patch adds the interface between the radeon driver and the amdkfd driver.
      The interface implementation is contained in radeon_kfd.c and radeon_kfd.h.
      
      The interface itself is represented by a pointer to struct
      kfd_dev. The pointer is located inside radeon_device structure.
      
      All the register accesses that amdkfd need are done using this interface. This
      allows us to avoid direct register accesses in amdkfd proper,  while also
      avoiding locking between amdkfd and radeon.
      
      The single exception is the doorbells that are used in both of the drivers.
      However, because they are located in separate pci bar pages, the danger of
      sharing registers between the drivers is minimal.
      
      Having said that, we are planning to move the doorbells as well to radeon.
      
      v3:
      
      Add interface for sa manager init and fini. The init function will allocate a
      buffer on system memory and pin it to the GART address space via the radeon sa
      manager.
      
      All mappings of buffers to GART address space are done via the radeon sa
      manager. The interface of allocate memory will use the radeon sa manager to sub
      allocate from the single buffer that was allocated during the init function.
      
      Change lower_32/upper_32 calls to use linux macros
      
      Add documentation for the interface
      
      v4:
      
      Change ptr field type in kgd_mem from uint32_t* to void* to match to type that
      is returned by radeon_sa_bo_cpu_addr
      
      v5:
      
      Change format of mqd structure to work with latest KV firmware
      Add support for AQL queues creation to enable working with open-source HSA
      runtime.
      Move generic kfd-->kgd interface and other generic kgd definitions to a generic
      header file that will be used by AMD's radeon and amdgpu drivers
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      e28740ec
  4. 14 7月, 2014 1 次提交
  5. 28 1月, 2014 1 次提交
  6. 12 2月, 2014 1 次提交
  7. 16 1月, 2014 1 次提交
  8. 10 11月, 2014 1 次提交
    • O
      iommu/amd: fix accounting of device_state · a015c1e9
      Oded Gabbay 提交于
      This patch fixes a bug in the accounting of the device_state.
      In the current code, the device_state was put (decremented) too many times,
      which sometimes lead to the driver getting stuck permanently in
      put_device_state_wait(). That happen because the device_state->count would go
      below zero, which is never supposed to happen.
      
      The root cause is that the device_state was decremented in put_pasid_state()
      and put_pasid_state_wait() but also in all the functions that call those
      functions. Therefore, the device_state was decremented twice in each of these
      code paths.
      
      The fix is to decouple the device_state accounting from the pasid_state
      accounting - remove the call to put_device_state() from the
      put_pasid_state() and the put_pasid_state_wait())
      Signed-off-by: NOded Gabbay <oded.gabbay@amd.com>
      a015c1e9
  9. 13 11月, 2014 31 次提交