* [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present.
@ 2023-11-05 20:37 Dave Airlie
2023-11-14 19:54 ` Danilo Krummrich
0 siblings, 1 reply; 6+ messages in thread
From: Dave Airlie @ 2023-11-05 20:37 UTC (permalink / raw)
To: dri-devel; +Cc: nouveau
From: Dave Airlie <airlied@redhat.com>
If we get back ENODEV don't fail load.
Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/270
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index d8c92521226d..f28f9a857458 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
if (nouveau_modeset != 2) {
ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
+ /* no display hw */
+ if (ret == -ENODEV) {
+ ret = 0;
+ goto disp_create_err;
+ }
if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
nouveau_display_create_properties(dev);
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present.
2023-11-05 20:37 Dave Airlie
@ 2023-11-14 19:54 ` Danilo Krummrich
2023-11-15 14:41 ` Dave Airlie
0 siblings, 1 reply; 6+ messages in thread
From: Danilo Krummrich @ 2023-11-14 19:54 UTC (permalink / raw)
To: Dave Airlie, dri-devel; +Cc: nouveau
On 11/5/23 21:37, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> If we get back ENODEV don't fail load.
Maybe worth to note why this is OK in this case, might not be obvious
to future readers of the code.
>
> Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
Maybe I'm missing something subtle here, but did you maybe pick the wrong
commit here? At a first glance it looks like commit 073bde453635
("drm/nouveau/kms/nv50-: disable dcb parsing") introduced the issue.
- Danilo
> Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/270
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index d8c92521226d..f28f9a857458 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
>
> if (nouveau_modeset != 2) {
> ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
> + /* no display hw */
> + if (ret == -ENODEV) {
> + ret = 0;
> + goto disp_create_err;
> + }
>
> if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
> nouveau_display_create_properties(dev);
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present.
@ 2023-11-15 14:39 ` airlied
0 siblings, 0 replies; 6+ messages in thread
From: airlied @ 2023-11-15 14:39 UTC (permalink / raw)
To: dri-devel; +Cc: nouveau, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
If we get back ENODEV don't fail load. There are nvidia devices
that don't have display blocks and the driver should work on those.
Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/270
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index d8c92521226d9..f28f9a8574586 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
if (nouveau_modeset != 2) {
ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
+ /* no display hw */
+ if (ret == -ENODEV) {
+ ret = 0;
+ goto disp_create_err;
+ }
if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
nouveau_display_create_properties(dev);
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] nouveau: don't fail driver load if no display hw present.
@ 2023-11-15 14:39 ` airlied
0 siblings, 0 replies; 6+ messages in thread
From: airlied @ 2023-11-15 14:39 UTC (permalink / raw)
To: dri-devel; +Cc: nouveau, Dave Airlie
From: Dave Airlie <airlied@redhat.com>
If we get back ENODEV don't fail load. There are nvidia devices
that don't have display blocks and the driver should work on those.
Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/270
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
index d8c92521226d9..f28f9a8574586 100644
--- a/drivers/gpu/drm/nouveau/nouveau_display.c
+++ b/drivers/gpu/drm/nouveau/nouveau_display.c
@@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
if (nouveau_modeset != 2) {
ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
+ /* no display hw */
+ if (ret == -ENODEV) {
+ ret = 0;
+ goto disp_create_err;
+ }
if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
nouveau_display_create_properties(dev);
--
2.41.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present.
2023-11-14 19:54 ` Danilo Krummrich
@ 2023-11-15 14:41 ` Dave Airlie
0 siblings, 0 replies; 6+ messages in thread
From: Dave Airlie @ 2023-11-15 14:41 UTC (permalink / raw)
To: Danilo Krummrich; +Cc: nouveau, dri-devel
On Wed, 15 Nov 2023 at 05:54, Danilo Krummrich <me@dakr.org> wrote:
>
> On 11/5/23 21:37, Dave Airlie wrote:
> > From: Dave Airlie <airlied@redhat.com>
> >
> > If we get back ENODEV don't fail load.
>
> Maybe worth to note why this is OK in this case, might not be obvious
> to future readers of the code.
Sent an updated version with that fixed.
>
> >
> > Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
>
> Maybe I'm missing something subtle here, but did you maybe pick the wrong
> commit here? At a first glance it looks like commit 073bde453635
> ("drm/nouveau/kms/nv50-: disable dcb parsing") introduced the issue.
>
Nope this commit causes the regression, as it powers off the display
core in devinit, which means later we don't detect it because GSP
doesn't power it back on.
Dave.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present.
2023-11-15 14:39 ` airlied
(?)
@ 2023-11-15 22:18 ` Nicolas Chauvet
-1 siblings, 0 replies; 6+ messages in thread
From: Nicolas Chauvet @ 2023-11-15 22:18 UTC (permalink / raw)
To: airlied; +Cc: nouveau, dri-devel, Dave Airlie
Le mer. 15 nov. 2023 à 15:40, <airlied@gmail.com> a écrit :
>
> From: Dave Airlie <airlied@redhat.com>
>
> If we get back ENODEV don't fail load. There are nvidia devices
> that don't have display blocks and the driver should work on those.
>
> Fixes: 15740541e8f0 ("drm/nouveau/devinit/tu102-: prepare for GSP-RM")
> Link: https://gitlab.freedesktop.org/drm/nouveau/-/issues/270
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> ---
> drivers/gpu/drm/nouveau/nouveau_display.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c
> index d8c92521226d9..f28f9a8574586 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_display.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_display.c
> @@ -726,6 +726,11 @@ nouveau_display_create(struct drm_device *dev)
>
> if (nouveau_modeset != 2) {
> ret = nvif_disp_ctor(&drm->client.device, "kmsDisp", 0, &disp->disp);
> + /* no display hw */
> + if (ret == -ENODEV) {
> + ret = 0;
> + goto disp_create_err;
> + }
>
> if (!ret && (disp->disp.outp_mask || drm->vbios.dcb.entries)) {
> nouveau_display_create_properties(dev);
> --
> 2.41.0
I have tested this patch on top of 6.7-rc1+ and this doesn't change
the situation on jetson-tx1 (gm20b)
Could it be that something else similar is missing on arm64 ?
Thanks
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-11-15 22:19 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-15 14:39 [Nouveau] [PATCH] nouveau: don't fail driver load if no display hw present airlied
2023-11-15 14:39 ` airlied
2023-11-15 22:18 ` [Nouveau] " Nicolas Chauvet
-- strict thread matches above, loose matches on Subject: below --
2023-11-05 20:37 Dave Airlie
2023-11-14 19:54 ` Danilo Krummrich
2023-11-15 14:41 ` Dave Airlie
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.