All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
To: Ben Skeggs <bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org,
	linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: [PATCH 08/12] drm/nouveau/graph: enable when using external firmware
Date: Mon, 24 Mar 2014 17:42:30 +0900	[thread overview]
Message-ID: <1395650554-31925-9-git-send-email-acourbot@nvidia.com> (raw)
In-Reply-To: <1395650554-31925-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>

nvc0_graph_ctor() would only let the graphics engine be enabled if its
oclass has a proper microcode linked to it. This prevents GR from being
enabled at all on chips that rely exclusively on external firmware, even
though such a use-case is valid.

Relax the conditions enabling the GR engine to also include the case
where an external firmware has also been loaded.

Signed-off-by: Alexandre Courbot <acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
 drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 6ef8bf181b2d..f997a18f5760 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@ -1133,10 +1133,14 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 	struct nvc0_graph_oclass *oclass = (void *)bclass;
 	struct nouveau_device *device = nv_device(parent);
 	struct nvc0_graph_priv *priv;
+	bool use_fw;
 	int ret, i;
 
+	use_fw = nouveau_boolopt(device->cfgopt, "NvGrUseFW", false);
+
 	ret = nouveau_graph_create(parent, engine, bclass,
-				   (oclass->fecs.ucode != NULL), &priv);
+				   (oclass->fecs.ucode != NULL) || use_fw,
+				   &priv);
 	*pobject = nv_object(priv);
 	if (ret)
 		return ret;
@@ -1146,7 +1150,7 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
 	priv->base.units = nvc0_graph_units;
 
-	if (nouveau_boolopt(device->cfgopt, "NvGrUseFW", false)) {
+	if (use_fw) {
 		nv_info(priv, "using external firmware\n");
 		if (nvc0_graph_ctor_fw(priv, "fuc409c", &priv->fuc409c) ||
 		    nvc0_graph_ctor_fw(priv, "fuc409d", &priv->fuc409d) ||
-- 
1.9.1

WARNING: multiple messages have this Message-ID (diff)
From: Alexandre Courbot <acourbot@nvidia.com>
To: Ben Skeggs <bskeggs@redhat.com>
Cc: Thierry Reding <thierry.reding@gmail.com>,
	<nouveau@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>, <linux-tegra@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <gnurou@gmail.com>,
	Alexandre Courbot <acourbot@nvidia.com>
Subject: [PATCH 08/12] drm/nouveau/graph: enable when using external firmware
Date: Mon, 24 Mar 2014 17:42:30 +0900	[thread overview]
Message-ID: <1395650554-31925-9-git-send-email-acourbot@nvidia.com> (raw)
In-Reply-To: <1395650554-31925-1-git-send-email-acourbot@nvidia.com>

nvc0_graph_ctor() would only let the graphics engine be enabled if its
oclass has a proper microcode linked to it. This prevents GR from being
enabled at all on chips that rely exclusively on external firmware, even
though such a use-case is valid.

Relax the conditions enabling the GR engine to also include the case
where an external firmware has also been loaded.

Signed-off-by: Alexandre Courbot <acourbot@nvidia.com>
---
 drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
index 6ef8bf181b2d..f997a18f5760 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/nvc0.c
@@ -1133,10 +1133,14 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 	struct nvc0_graph_oclass *oclass = (void *)bclass;
 	struct nouveau_device *device = nv_device(parent);
 	struct nvc0_graph_priv *priv;
+	bool use_fw;
 	int ret, i;
 
+	use_fw = nouveau_boolopt(device->cfgopt, "NvGrUseFW", false);
+
 	ret = nouveau_graph_create(parent, engine, bclass,
-				   (oclass->fecs.ucode != NULL), &priv);
+				   (oclass->fecs.ucode != NULL) || use_fw,
+				   &priv);
 	*pobject = nv_object(priv);
 	if (ret)
 		return ret;
@@ -1146,7 +1150,7 @@ nvc0_graph_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
 
 	priv->base.units = nvc0_graph_units;
 
-	if (nouveau_boolopt(device->cfgopt, "NvGrUseFW", false)) {
+	if (use_fw) {
 		nv_info(priv, "using external firmware\n");
 		if (nvc0_graph_ctor_fw(priv, "fuc409c", &priv->fuc409c) ||
 		    nvc0_graph_ctor_fw(priv, "fuc409d", &priv->fuc409d) ||
-- 
1.9.1


  parent reply	other threads:[~2014-03-24  8:42 UTC|newest]

Thread overview: 100+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-24  8:42 [PATCH 00/12] drm/nouveau: support for GK20A, cont'd Alexandre Courbot
2014-03-24  8:42 ` Alexandre Courbot
     [not found] ` <1395650554-31925-1-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24  8:42   ` [PATCH 01/12] drm/nouveau: fix missing newline Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-2-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 21:49       ` Thierry Reding
2014-03-24 21:49         ` Thierry Reding
2014-03-24  8:42   ` [PATCH 02/12] drm/nouveau/timer: skip calibration on GK20A Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-3-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 21:54       ` Thierry Reding
2014-03-24 21:54         ` Thierry Reding
2014-03-26  4:19         ` Ben Skeggs
2014-03-26  4:19           ` Ben Skeggs
     [not found]           ` <CACAvsv54BF3cD6y59=kQ=1j-S9tGixTz_J3gx2mbOEkB2eQ4cA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-11  2:46             ` Alexandre Courbot
2014-04-11  2:46               ` Alexandre Courbot
     [not found]               ` <CAAVeFuK-6RAfmZ8Zi3+bX_ibmPxPKEy7oT9YiLJWXpLMx3PsFw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-11  7:31                 ` Ben Skeggs
2014-04-11  7:31                   ` Ben Skeggs
     [not found]                   ` <CACAvsv7Z7OfEx89FYm1F_+Lpb2q33Ay3zph3nRdNCj3PO=vR8w-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-11  7:34                     ` Alexandre Courbot
2014-04-11  7:34                       ` Alexandre Courbot
2014-04-14  8:35                       ` Ben Skeggs
2014-04-14  8:35                         ` Ben Skeggs
     [not found]                         ` <CACAvsv7gsRrXAk-=M08hjvhrRWvi80wrgRAp1M5T66zMa5ydtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-15  6:10                           ` Alexandre Courbot
2014-04-15  6:10                             ` Alexandre Courbot
2014-03-24  8:42   ` [PATCH 06/12] drm/nouveau/ibus: add GK20A support Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-7-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 22:34       ` Thierry Reding
2014-03-24 22:34         ` Thierry Reding
2014-04-02 13:52         ` Alexandre Courbot
2014-04-02 13:52           ` Alexandre Courbot
     [not found]           ` <CAAVeFuKezGqPnmi=XJW1FrL-3e8hyqdjuY83VEh496SLm+0mFQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-02 14:18             ` [Nouveau] " Ilia Mirkin
2014-04-02 14:18               ` Ilia Mirkin
     [not found]               ` <CAKb7Uvj_+s+PTbziGD_jb=ryk372vgxSTOrmxOZVGUghHnveAw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-02 14:22                 ` Alexandre Courbot
2014-04-02 14:22                   ` [Nouveau] " Alexandre Courbot
2014-03-24  8:42   ` [PATCH 07/12] drm/nouveau/fb: " Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
2014-03-24  8:42   ` Alexandre Courbot [this message]
2014-03-24  8:42     ` [PATCH 08/12] drm/nouveau/graph: enable when using external firmware Alexandre Courbot
     [not found]     ` <1395650554-31925-9-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 22:58       ` Thierry Reding
2014-03-24 22:58         ` Thierry Reding
2014-03-26  4:21         ` Ben Skeggs
2014-03-26  4:21           ` Ben Skeggs
2014-04-02 13:53           ` Alexandre Courbot
2014-04-02 13:53             ` Alexandre Courbot
2014-03-24  8:42   ` [PATCH 09/12] drm/nouveau/graph: pad firmware code at load time Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-10-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 23:02       ` Thierry Reding
2014-03-24 23:02         ` Thierry Reding
2014-03-26  4:22       ` Ben Skeggs
2014-03-26  4:22         ` [Nouveau] " Ben Skeggs
     [not found]         ` <CACAvsv6eCoWEU7ZNd5158-V3n=ZVo5O04CZa2EWE78e_tZEXPA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-02 13:54           ` Alexandre Courbot
2014-04-02 13:54             ` Alexandre Courbot
2014-03-24  8:42   ` [PATCH 10/12] drm/nouveau/graph: add GK20A support Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-11-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-26  4:24       ` Ben Skeggs
2014-03-26  4:24         ` Ben Skeggs
2014-04-02 14:03         ` Alexandre Courbot
2014-04-02 14:03           ` Alexandre Courbot
2014-04-02 23:11           ` Ben Skeggs
2014-04-02 23:11             ` Ben Skeggs
2014-03-24  8:42   ` [PATCH 11/12] drm/nouveau: support GK20A in nouveau_accel_init() Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-12-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 23:10       ` Thierry Reding
2014-03-24 23:10         ` Thierry Reding
2014-03-26  4:27         ` Ben Skeggs
2014-03-26  4:27           ` Ben Skeggs
2014-04-02 14:14           ` Alexandre Courbot
2014-04-02 14:23             ` [Nouveau] " Ilia Mirkin
2014-04-02 23:14               ` Ben Skeggs
     [not found]           ` <CACAvsv4FHqwAF6FOaMF1sQLwAfBOd6uFgsZ+VdwCHoR4qsVbVw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-04-16  5:57             ` Alexandre Courbot
2014-04-16  5:57               ` Alexandre Courbot
2014-03-24  8:42   ` [PATCH 12/12] drm/nouveau: support for probing GK20A Alexandre Courbot
2014-03-24  8:42     ` Alexandre Courbot
     [not found]     ` <1395650554-31925-13-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 23:11       ` Thierry Reding
2014-03-24 23:11         ` Thierry Reding
2014-03-26  4:28     ` [Nouveau] " Ben Skeggs
2014-03-26  4:28       ` Ben Skeggs
2014-04-02 14:19       ` Alexandre Courbot
2014-04-02 14:19         ` Alexandre Courbot
2014-03-24  8:42 ` [PATCH 03/12] drm/nouveau/bar: only ioremap BAR3 if it exists Alexandre Courbot
2014-03-24  8:42   ` Alexandre Courbot
     [not found]   ` <1395650554-31925-4-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 22:13     ` Thierry Reding
2014-03-24 22:13       ` Thierry Reding
2014-03-26  4:20       ` Ben Skeggs
2014-03-26  4:20         ` [Nouveau] " Ben Skeggs
2014-03-24  8:42 ` [PATCH 04/12] drm/nouveau/bar/nvc0: support chips without BAR3 Alexandre Courbot
2014-03-24  8:42   ` Alexandre Courbot
     [not found]   ` <1395650554-31925-5-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 22:10     ` Thierry Reding
2014-03-24 22:10       ` Thierry Reding
2014-04-02 13:47       ` Alexandre Courbot
2014-04-02 13:47         ` Alexandre Courbot
2014-03-24  8:42 ` [PATCH 05/12] drm/nouveau/fifo: add GK20A support Alexandre Courbot
2014-03-24  8:42   ` Alexandre Courbot
     [not found]   ` <1395650554-31925-6-git-send-email-acourbot-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
2014-03-24 22:14     ` Thierry Reding
2014-03-24 22:14       ` Thierry Reding
2014-03-24 13:19 ` [PATCH 00/12] drm/nouveau: support for GK20A, cont'd Lucas Stach
     [not found]   ` <1395667191.5062.18.camel-WzVe3FnzCwFR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2014-03-26  6:33     ` Alexandre Courbot
2014-03-26  6:33       ` Alexandre Courbot
     [not found]       ` <CAAVeFu+s+hrKdiHqxvxAOSnq-Jm_g3PY1wT3TgwpX1OGP-Niog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-03-26 10:33         ` Lucas Stach
2014-03-26 10:33           ` Lucas Stach
     [not found]           ` <1395830031.7930.8.camel-WzVe3FnzCwFR6QfukMTsflXZhhPuCNm+@public.gmane.org>
2014-03-27  3:50             ` Alexandre Courbot
2014-03-27  3:50               ` Alexandre Courbot

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=1395650554-31925-9-git-send-email-acourbot@nvidia.com \
    --to=acourbot-ddmlm1+adcrqt0dzr+alfa@public.gmane.org \
    --cc=bskeggs-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org \
    --cc=dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.