diff options
author | Joseph Greathouse <Joseph.Greathouse@amd.com> | 2020-01-15 15:23:44 -0600 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-04-28 16:20:30 -0400 |
commit | 29633d0e204df1e051d9036e4f493f228ac19fb4 (patch) | |
tree | 8816c701d96f4895a91686d5d28cb22ec7add1e9 /drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | |
parent | 5bb4b78be9c67b02a7f138850e9e89825181f555 (diff) | |
download | linux-29633d0e204df1e051d9036e4f493f228ac19fb4.tar.bz2 |
drm/amdkfd: Enable GWS based on FW Support
Rather than only enabling GWS support based on the hws_gws_support
modparm, also check whether the GPU's HWS firmware supports GWS.
Leave the old modparm in place in case users want to test GWS
on GPUs not yet in the support list.
v2: fix broken syntax from the first patch.
Signed-off-by: Joseph Greathouse <Joseph.Greathouse@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_chardev.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c index 5eb1314f500b..f8fa03a12add 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c @@ -1592,9 +1592,6 @@ static int kfd_ioctl_alloc_queue_gws(struct file *filep, struct queue *q; struct kfd_dev *dev; - if (!hws_gws_support) - return -ENODEV; - mutex_lock(&p->mutex); q = pqm_get_user_queue(&p->pqm, args->queue_id); @@ -1605,6 +1602,11 @@ static int kfd_ioctl_alloc_queue_gws(struct file *filep, goto out_unlock; } + if (!dev->gws) { + retval = -ENODEV; + goto out_unlock; + } + if (dev->dqm->sched_policy == KFD_SCHED_POLICY_NO_HWS) { retval = -ENODEV; goto out_unlock; |