Skip to content

Commit

Permalink
Merge tag 'drm-amdkfd-fixes-2015-01-13' of git://people.freedesktop.o…
Browse files Browse the repository at this point in the history
…rg/~gabbayo/linux into drm-fixes

- Remove the interrupt SW ring buffer impl. as it is not used by any module
  in amdkfd.

- Fix a sparse warning

* tag 'drm-amdkfd-fixes-2015-01-13' of git://people.freedesktop.org/~gabbayo/linux:
  drm/amdkfd: Fix sparse warning (different address space)
  drm/amdkfd: Drop interrupt SW ring buffer
  • Loading branch information
Dave Airlie committed Jan 20, 2015
2 parents 9e4fc22 + 8dfe58b commit 67cf2d3
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 213 deletions.
3 changes: 1 addition & 2 deletions drivers/gpu/drm/amd/amdkfd/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ amdkfd-y := kfd_module.o kfd_device.o kfd_chardev.o kfd_topology.o \
kfd_pasid.o kfd_doorbell.o kfd_flat_memory.o \
kfd_process.o kfd_queue.o kfd_mqd_manager.o \
kfd_kernel_queue.o kfd_packet_manager.o \
kfd_process_queue_manager.o kfd_device_queue_manager.o \
kfd_interrupt.o
kfd_process_queue_manager.o kfd_device_queue_manager.o

obj-$(CONFIG_HSA_AMD) += amdkfd.o
20 changes: 1 addition & 19 deletions drivers/gpu/drm/amd/amdkfd/kfd_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
goto kfd_topology_add_device_error;
}

if (kfd_interrupt_init(kfd)) {
dev_err(kfd_device,
"Error initializing interrupts for device (%x:%x)\n",
kfd->pdev->vendor, kfd->pdev->device);
goto kfd_interrupt_error;
}

if (!device_iommu_pasid_init(kfd)) {
dev_err(kfd_device,
"Error initializing iommuv2 for device (%x:%x)\n",
Expand Down Expand Up @@ -237,8 +230,6 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
device_queue_manager_error:
amd_iommu_free_device(kfd->pdev);
device_iommu_pasid_error:
kfd_interrupt_exit(kfd);
kfd_interrupt_error:
kfd_topology_remove_device(kfd);
kfd_topology_add_device_error:
kfd2kgd->fini_sa_manager(kfd->kgd);
Expand All @@ -254,7 +245,6 @@ void kgd2kfd_device_exit(struct kfd_dev *kfd)
if (kfd->init_complete) {
device_queue_manager_uninit(kfd->dqm);
amd_iommu_free_device(kfd->pdev);
kfd_interrupt_exit(kfd);
kfd_topology_remove_device(kfd);
}

Expand Down Expand Up @@ -296,13 +286,5 @@ int kgd2kfd_resume(struct kfd_dev *kfd)
/* This is called directly from KGD at ISR. */
void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry)
{
if (kfd->init_complete) {
spin_lock(&kfd->interrupt_lock);

if (kfd->interrupts_active
&& enqueue_ih_ring_entry(kfd, ih_ring_entry))
schedule_work(&kfd->interrupt_work);

spin_unlock(&kfd->interrupt_lock);
}
/* Process interrupts / schedule work as necessary */
}
2 changes: 1 addition & 1 deletion drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int create_compute_queue_nocpsch(struct device_queue_manager *dqm,
q->queue);

retval = mqd->load_mqd(mqd, q->mqd, q->pipe,
q->queue, q->properties.write_ptr);
q->queue, (uint32_t __user *) q->properties.write_ptr);
if (retval != 0) {
deallocate_hqd(dqm, q);
mqd->uninit_mqd(mqd, q->mqd, q->mqd_mem_obj);
Expand Down
176 changes: 0 additions & 176 deletions drivers/gpu/drm/amd/amdkfd/kfd_interrupt.c

This file was deleted.

15 changes: 0 additions & 15 deletions drivers/gpu/drm/amd/amdkfd/kfd_priv.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,22 +135,10 @@ struct kfd_dev {

struct kgd2kfd_shared_resources shared_resources;

void *interrupt_ring;
size_t interrupt_ring_size;
atomic_t interrupt_ring_rptr;
atomic_t interrupt_ring_wptr;
struct work_struct interrupt_work;
spinlock_t interrupt_lock;

/* QCM Device instance */
struct device_queue_manager *dqm;

bool init_complete;
/*
* Interrupts of interest to KFD are copied
* from the HW ring into a SW ring.
*/
bool interrupts_active;
};

/* KGD2KFD callbacks */
Expand Down Expand Up @@ -531,10 +519,7 @@ struct kfd_dev *kfd_device_by_pci_dev(const struct pci_dev *pdev);
struct kfd_dev *kfd_topology_enum_kfd_devices(uint8_t idx);

/* Interrupts */
int kfd_interrupt_init(struct kfd_dev *dev);
void kfd_interrupt_exit(struct kfd_dev *dev);
void kgd2kfd_interrupt(struct kfd_dev *kfd, const void *ih_ring_entry);
bool enqueue_ih_ring_entry(struct kfd_dev *kfd, const void *ih_ring_entry);

/* Power Management */
void kgd2kfd_suspend(struct kfd_dev *kfd);
Expand Down

0 comments on commit 67cf2d3

Please sign in to comment.