Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2f6bd4da authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'amdkfd-fixes-2014-12-30' of git://people.freedesktop.org/~gabbayo/linux into linus

Highlights:

- Link order changes in drm/Makefile and drivers/Makefile to fix issue
  when amdkfd, radeon and amd_iommu_v2 are compiled inside the kernel
  image.

- Consider kernel configuration (using #IFDEFs) when radeon initializes
  amdkfd, due to a specific configuration that makes symbol_request()
  return a non-NULL value when a symbol doesn't exists. Rusty Russel
  is helping me to find the root cause, but it may take a while because
  of year-end so I'm sending this as a band-aid solution.

* tag 'amdkfd-fixes-2014-12-30' of git://people.freedesktop.org/~gabbayo/linux:
  drm/radeon: Init amdkfd only if it was compiled
  amdkfd: actually allocate longs for the pasid bitmask
  drm: Put amdkfd before radeon in drm Makefile
  drivers: Move iommu/ before gpu/ in Makefile
  amdkfd: Remove duplicate include
  amdkfd: Fixing topology bug in building sysfs nodes
  amdkfd: Fix accounting of device queues
parents 379a2d31 38c2adfb
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -50,7 +50,10 @@ obj-$(CONFIG_RESET_CONTROLLER) += reset/
obj-y				+= tty/
obj-y				+= char/

# gpu/ comes after char for AGP vs DRM startup
# iommu/ comes before gpu as gpu are using iommu controllers
obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/

# gpu/ comes after char for AGP vs DRM startup and after iommu
obj-y				+= gpu/

obj-$(CONFIG_CONNECTOR)		+= connector/
@@ -141,7 +144,6 @@ obj-y += clk/

obj-$(CONFIG_MAILBOX)		+= mailbox/
obj-$(CONFIG_HWSPINLOCK)	+= hwspinlock/
obj-$(CONFIG_IOMMU_SUPPORT)	+= iommu/
obj-$(CONFIG_REMOTEPROC)	+= remoteproc/
obj-$(CONFIG_RPMSG)		+= rpmsg/

+1 −1
Original line number Diff line number Diff line
@@ -37,6 +37,7 @@ obj-$(CONFIG_DRM_MIPI_DSI) += drm_mipi_dsi.o
obj-$(CONFIG_DRM_TTM)	+= ttm/
obj-$(CONFIG_DRM_TDFX)	+= tdfx/
obj-$(CONFIG_DRM_R128)	+= r128/
obj-$(CONFIG_HSA_AMD) += amd/amdkfd/
obj-$(CONFIG_DRM_RADEON)+= radeon/
obj-$(CONFIG_DRM_MGA)	+= mga/
obj-$(CONFIG_DRM_I810)	+= i810/
@@ -67,4 +68,3 @@ obj-$(CONFIG_DRM_IMX) += imx/
obj-y			+= i2c/
obj-y			+= panel/
obj-y			+= bridge/
obj-$(CONFIG_HSA_AMD) += amd/amdkfd/
+0 −1
Original line number Diff line number Diff line
@@ -31,7 +31,6 @@
#include <uapi/linux/kfd_ioctl.h>
#include <linux/time.h>
#include <linux/mm.h>
#include <linux/uaccess.h>
#include <uapi/asm-generic/mman-common.h>
#include <asm/processor.h>
#include "kfd_priv.h"
+11 −2
Original line number Diff line number Diff line
@@ -320,6 +320,7 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)
{
	int retval;
	struct mqd_manager *mqd;
	bool prev_active = false;

	BUG_ON(!dqm || !q || !q->mqd);

@@ -330,10 +331,18 @@ static int update_queue(struct device_queue_manager *dqm, struct queue *q)
		return -ENOMEM;
	}

	retval = mqd->update_mqd(mqd, q->mqd, &q->properties);
	if (q->properties.is_active == true)
		prev_active = true;

	/*
	 *
	 * check active state vs. the previous state
	 * and modify counter accordingly
	 */
	retval = mqd->update_mqd(mqd, q->mqd, &q->properties);
	if ((q->properties.is_active == true) && (prev_active == false))
		dqm->queue_count++;
	else
	else if ((q->properties.is_active == false) && (prev_active == true))
		dqm->queue_count--;

	if (sched_policy != KFD_SCHED_POLICY_NO_HWS)
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ int kfd_pasid_init(void)
{
	pasid_limit = max_num_of_processes;

	pasid_bitmap = kzalloc(BITS_TO_LONGS(pasid_limit), GFP_KERNEL);
	pasid_bitmap = kcalloc(BITS_TO_LONGS(pasid_limit), sizeof(long), GFP_KERNEL);
	if (!pasid_bitmap)
		return -ENOMEM;

Loading