summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_device.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2015-01-29 11:45:31 +1000
committerDave Airlie <airlied@gmail.com>2015-01-29 11:45:31 +1000
commitb3869b17fd63bacb53ac4db4ff4ba093701e17be (patch)
tree073873d62957033f317bc413d9ea9fd5d5ff5a50 /drivers/gpu/drm/amd/amdkfd/kfd_device.c
parent7b83741bf76caad72bc8a701c26dde8d6751ff0f (diff)
parentc59c961ca511dc7ee2f4f7e9c224d16f5c76ca6e (diff)
downloadtalos-obmc-linux-b3869b17fd63bacb53ac4db4ff4ba093701e17be.tar.gz
talos-obmc-linux-b3869b17fd63bacb53ac4db4ff4ba093701e17be.zip
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux into drm-next
This backmerges drm-fixes into drm-next mainly for the amdkfd stuff, I'm not 100% confident, but it builds and the amdkfd folks can fix anything up. Signed-off-by: Dave Airlie <airlied@redhat.com> Conflicts: drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device.c')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device.c b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
index 1ba8332419fa..5bc32c26b989 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device.c
@@ -183,16 +183,15 @@ bool kgd2kfd_device_init(struct kfd_dev *kfd,
kfd->shared_resources = *gpu_resources;
/* calculate max size of mqds needed for queues */
- size = max_num_of_processes *
- max_num_of_queues_per_process *
- kfd->device_info->mqd_size_aligned;
+ size = max_num_of_queues_per_device *
+ kfd->device_info->mqd_size_aligned;
/*
* calculate max size of runlist packet.
* There can be only 2 packets at once
*/
- size += (max_num_of_processes * sizeof(struct pm4_map_process) +
- max_num_of_processes * max_num_of_queues_per_process *
+ size += (KFD_MAX_NUM_OF_PROCESSES * sizeof(struct pm4_map_process) +
+ max_num_of_queues_per_device *
sizeof(struct pm4_map_queues) + sizeof(struct pm4_runlist)) * 2;
/* Add size of HIQ & DIQ */
OpenPOWER on IntegriCloud