From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Dave Airlie <airlied@linux.ie>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
Oded Gabbay <oded.gabbay@amd.com>, Ben Goz <ben.goz@amd.com>
Subject: linux-next: manual merge of the drm tree with Linus' tree
Date: Thu, 29 Jan 2015 13:17:18 +1100 [thread overview]
Message-ID: <20150129131718.645dbb99@canb.auug.org.au> (raw)
[-- Attachment #1: Type: text/plain, Size: 3704 bytes --]
Hi Dave,
Today's linux-next merge of the drm tree got conflicts in
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c and
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h between commits
b8cbab042cd6 ("drm/amdkfd: Allow user to limit only queues per device")
and 9fa843e76d90 ("drm/amdkfd: Fix bug in call to init_pipelines()")
from Linus' tree and commits bcea30817574 ("drm/amdkfd: Add SDMA
user-mode queues support to QCM") and fe502804205e ("drm/amdkfd: Remove
call to deprecated init_memory interface") from the drm tree.
I fixed it up (hopefully - see below) and can carry the fix as
necessary (no action is required).
--
Cheers,
Stephen Rothwell sfr@canb.auug.org.au
diff --cc drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
index 0d8694f015c1,b189f9791c90..000000000000
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
@@@ -213,15 -161,8 +168,18 @@@ static int create_queue_nocpsch(struct
list_add(&q->list, &qpd->queues_list);
dqm->queue_count++;
+
+ /*
+ * Unconditionally increment this counter, regardless of the queue's
+ * type or whether the queue is active.
+ */
+ dqm->total_queue_count++;
+ pr_debug("Total of %d queues are accountable so far\n",
+ dqm->total_queue_count);
+
++
+ if (q->properties.type == KFD_QUEUE_TYPE_SDMA)
+ dqm->sdma_queue_count++;
mutex_unlock(&dqm->lock);
return 0;
}
@@@ -588,11 -488,7 +518,7 @@@ static int init_scheduler(struct device
pr_debug("kfd: In %s\n", __func__);
- retval = init_pipelines(dqm, get_pipes_num(dqm), KFD_DQM_FIRST_PIPE);
+ retval = init_pipelines(dqm, get_pipes_num(dqm), get_first_pipe(dqm));
- if (retval != 0)
- return retval;
-
- retval = init_memory(dqm);
return retval;
}
@@@ -843,14 -793,12 +845,19 @@@ static int create_queue_cpsch(struct de
mutex_lock(&dqm->lock);
+ if (dqm->total_queue_count >= max_num_of_queues_per_device) {
+ pr_warn("amdkfd: Can't create new usermode queue because %d queues were already created\n",
+ dqm->total_queue_count);
+ retval = -EPERM;
+ goto out;
+ }
+
- mqd = dqm->get_mqd_manager(dqm, KFD_MQD_TYPE_CIK_CP);
+ if (q->properties.type == KFD_QUEUE_TYPE_SDMA)
+ select_sdma_engine_id(q);
+
+ mqd = dqm->ops.get_mqd_manager(dqm,
+ get_mqd_type_from_queue_type(q->properties.type));
+
if (mqd == NULL) {
mutex_unlock(&dqm->lock);
return -ENOMEM;
@@@ -867,15 -815,9 +874,18 @@@
retval = execute_queues_cpsch(dqm, false);
}
+ /*
+ * Unconditionally increment this counter, regardless of the queue's
+ * type or whether the queue is active.
+ */
+ dqm->total_queue_count++;
+
+ pr_debug("Total of %d queues are accountable so far\n",
+ dqm->total_queue_count);
+
+ if (q->properties.type == KFD_QUEUE_TYPE_SDMA)
+ dqm->sdma_queue_count++;
+
out:
mutex_unlock(&dqm->lock);
return retval;
diff --cc drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
index 52035bf0c1cb,e7b17b28330e..000000000000
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
@@@ -130,9 -143,10 +143,11 @@@ struct device_queue_manager
struct list_head queues;
unsigned int processes_count;
unsigned int queue_count;
+ unsigned int total_queue_count;
+ unsigned int sdma_queue_count;
unsigned int next_pipe_to_allocate;
unsigned int *allocated_queues;
+ unsigned int sdma_bitmap;
unsigned int vmid_bitmap;
uint64_t pipelines_addr;
struct kfd_mem_obj *pipeline_mem;
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next reply other threads:[~2015-01-29 2:17 UTC|newest]
Thread overview: 143+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-29 2:17 Stephen Rothwell [this message]
2015-01-29 8:19 ` linux-next: manual merge of the drm tree with Linus' tree Oded Gabbay
-- strict thread matches above, loose matches on Subject: below --
2024-03-04 1:08 Stephen Rothwell
2024-03-04 0:47 Stephen Rothwell
2024-01-08 0:14 Stephen Rothwell
2023-06-19 1:17 Stephen Rothwell
2022-11-30 22:57 Stephen Rothwell
2022-11-27 23:58 Stephen Rothwell
2022-11-29 9:07 ` Geert Uytterhoeven
2022-11-17 2:13 Stephen Rothwell
2022-09-19 0:58 Stephen Rothwell
2022-09-19 7:58 ` Geert Uytterhoeven
2022-09-19 14:23 ` Nathan Chancellor
2022-02-28 3:17 Stephen Rothwell
2021-10-29 0:48 Stephen Rothwell
2021-10-29 6:52 ` Joonas Lahtinen
2021-10-11 0:37 Stephen Rothwell
2021-08-23 2:41 Stephen Rothwell
2021-08-24 0:12 ` Stephen Rothwell
2021-08-12 1:20 Stephen Rothwell
2021-07-01 0:52 Stephen Rothwell
2021-03-29 2:14 Stephen Rothwell
2021-03-30 7:36 ` Geert Uytterhoeven
2021-03-30 23:41 ` Stephen Rothwell
2021-02-01 1:30 Stephen Rothwell
2021-02-14 22:07 ` Stephen Rothwell
2021-01-18 0:56 Stephen Rothwell
2020-10-02 3:42 Stephen Rothwell
2020-05-25 3:51 Stephen Rothwell
2020-03-23 0:50 Stephen Rothwell
2019-11-13 1:38 Stephen Rothwell
2019-11-13 1:13 Stephen Rothwell
2019-11-13 0:58 Stephen Rothwell
2019-11-13 0:50 Stephen Rothwell
2019-11-13 0:46 Stephen Rothwell
2019-11-13 0:40 Stephen Rothwell
2019-08-26 3:12 Stephen Rothwell
2019-06-11 2:19 Stephen Rothwell
2018-06-04 3:09 Stephen Rothwell
2018-03-26 3:38 Stephen Rothwell
2018-03-22 6:37 Stephen Rothwell
2018-03-26 3:45 ` Stephen Rothwell
2018-03-13 1:15 Stephen Rothwell
2018-02-18 23:10 Stephen Rothwell
2018-02-20 20:15 ` Rodrigo Vivi
2018-02-18 23:02 Stephen Rothwell
2018-01-15 1:08 Stephen Rothwell
2017-11-23 23:37 Stephen Rothwell
2017-10-30 18:36 Mark Brown
2017-10-30 18:26 Mark Brown
2017-08-28 2:32 Stephen Rothwell
2017-07-31 2:24 Stephen Rothwell
2017-07-24 2:06 Stephen Rothwell
2017-07-24 2:09 ` Stephen Rothwell
2017-06-05 2:49 Stephen Rothwell
2017-04-05 0:30 Stephen Rothwell
2017-02-23 23:17 Stephen Rothwell
2016-09-28 1:57 Stephen Rothwell
2016-09-20 2:42 Stephen Rothwell
2016-09-20 12:25 ` Philipp Zabel
2016-09-05 3:58 Stephen Rothwell
2016-09-05 3:51 Stephen Rothwell
2016-07-29 1:45 Stephen Rothwell
2016-05-09 1:28 Stephen Rothwell
2016-05-09 1:27 Stephen Rothwell
2016-03-17 0:45 Stephen Rothwell
2016-03-17 1:43 ` Luis R. Rodriguez
2016-02-29 2:59 Stephen Rothwell
2015-12-07 3:38 Stephen Rothwell
2015-11-01 8:11 Stephen Rothwell
2015-07-27 1:14 Stephen Rothwell
2015-06-21 3:50 Stephen Rothwell
2015-06-22 7:20 ` Christian König
2015-05-11 3:07 Stephen Rothwell
2015-04-07 5:22 Stephen Rothwell
2015-01-22 2:22 Stephen Rothwell
2015-01-22 2:31 ` Dave Airlie
2015-01-22 2:57 ` Stephen Rothwell
2015-01-22 2:18 Stephen Rothwell
2015-01-22 2:15 Stephen Rothwell
2014-12-05 4:46 Stephen Rothwell
2014-12-05 4:39 Stephen Rothwell
2014-11-17 3:11 Stephen Rothwell
2014-11-17 9:47 ` Thierry Reding
2014-06-05 3:59 Stephen Rothwell
2014-06-05 3:54 Stephen Rothwell
2014-03-31 2:54 Stephen Rothwell
2014-03-24 2:01 Stephen Rothwell
2014-03-24 8:49 ` Jani Nikula
2013-12-19 2:09 Stephen Rothwell
2013-12-19 1:59 Stephen Rothwell
2013-11-07 2:21 Stephen Rothwell
2013-11-07 2:10 Stephen Rothwell
2013-10-28 5:58 Stephen Rothwell
2013-10-28 5:28 Stephen Rothwell
2013-10-28 5:11 Stephen Rothwell
2013-07-29 2:58 Stephen Rothwell
2013-07-26 3:01 Stephen Rothwell
2013-06-24 2:56 Stephen Rothwell
2013-06-17 3:09 Stephen Rothwell
2013-02-13 4:48 Stephen Rothwell
2012-11-30 1:22 Stephen Rothwell
2012-10-04 2:00 Stephen Rothwell
2012-10-04 1:54 Stephen Rothwell
2012-09-17 4:53 Stephen Rothwell
2012-08-24 2:20 Stephen Rothwell
2012-08-24 2:19 Stephen Rothwell
2012-08-24 7:13 ` Jani Nikula
2012-08-24 7:12 ` Dave Airlie
2012-08-24 20:29 ` Sedat Dilek
2012-07-19 1:38 Stephen Rothwell
2012-07-16 3:00 Stephen Rothwell
2012-06-29 3:30 Stephen Rothwell
2012-06-29 9:01 ` Daniel Vetter
2012-05-14 4:08 Stephen Rothwell
2012-05-07 3:45 Stephen Rothwell
2012-05-07 8:06 ` Daniel Vetter
2012-05-03 3:07 Stephen Rothwell
2012-04-13 3:38 Stephen Rothwell
2012-04-13 8:59 ` Daniel Vetter
2012-03-05 3:47 Stephen Rothwell
2011-12-28 2:53 Stephen Rothwell
2011-12-28 2:44 Stephen Rothwell
2011-12-21 3:18 Stephen Rothwell
2011-12-12 2:06 Stephen Rothwell
2011-03-09 3:41 Stephen Rothwell
2010-10-15 1:54 Stephen Rothwell
2010-10-03 23:30 Stephen Rothwell
2010-10-03 23:30 Stephen Rothwell
2010-04-28 3:58 Stephen Rothwell
2010-04-27 2:51 Stephen Rothwell
2010-04-12 5:06 Stephen Rothwell
2009-10-06 2:28 Stephen Rothwell
2009-10-08 2:35 ` Stephen Rothwell
2009-10-08 3:38 ` Dave Airlie
2009-10-08 3:44 ` Stephen Rothwell
2009-09-08 5:01 Stephen Rothwell
2009-08-20 5:27 Stephen Rothwell
2009-08-20 5:30 ` Dave Airlie
2009-08-20 6:43 ` Stephen Rothwell
2009-08-20 5:07 Stephen Rothwell
2009-08-05 3:44 Stephen Rothwell
2009-02-10 6:22 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150129131718.645dbb99@canb.auug.org.au \
--to=sfr@canb.auug.org.au \
--cc=airlied@linux.ie \
--cc=ben.goz@amd.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=oded.gabbay@amd.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).