diff mbox series

nouveau: don't fail driver load if no display hw present.

Message ID 20231115143933.261287-1-airlied@gmail.com (mailing list archive)
State New, archived
Headers show
Series nouveau: don't fail driver load if no display hw present. | expand

Commit Message

Dave Airlie Nov. 15, 2023, 2:39 p.m. UTC
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(+)

Comments

Nicolas Chauvet Nov. 15, 2023, 10:18 p.m. UTC | #1
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
diff mbox series

Patch

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);