All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Nouveau] [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
@ 2022-08-16 18:04 ` Lyude Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Lyude Paul @ 2022-08-16 18:04 UTC (permalink / raw
  To: nouveau
  Cc: David Airlie, open list,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, Ben Skeggs,
	Daniel Vetter, stable

As it turns out: while Nvidia does actually have interlacing knobs on their
GPU still pretty much no current GPUs since Volta actually support it.
Trying interlacing on these GPUs will result in NVDisplay being quite
unhappy like so:

nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001

So let's fix this by following the same behavior Nvidia's driver does and
disable interlacing entirely.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 43a9d1e1cf71..8100c75ee731 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
 			connector->interlace_allowed =
 				nv_encoder->caps.dp_interlace;
 		else
-			connector->interlace_allowed = true;
+			connector->interlace_allowed =
+				drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
 		connector->doublescan_allowed = true;
 	} else
 	if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
@ 2022-08-16 18:04 ` Lyude Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Lyude Paul @ 2022-08-16 18:04 UTC (permalink / raw
  To: nouveau
  Cc: Karol Herbst, David Airlie, open list,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, Ben Skeggs,
	stable

As it turns out: while Nvidia does actually have interlacing knobs on their
GPU still pretty much no current GPUs since Volta actually support it.
Trying interlacing on these GPUs will result in NVDisplay being quite
unhappy like so:

nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001

So let's fix this by following the same behavior Nvidia's driver does and
disable interlacing entirely.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 43a9d1e1cf71..8100c75ee731 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
 			connector->interlace_allowed =
 				nv_encoder->caps.dp_interlace;
 		else
-			connector->interlace_allowed = true;
+			connector->interlace_allowed =
+				drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
 		connector->doublescan_allowed = true;
 	} else
 	if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
@ 2022-08-16 18:04 ` Lyude Paul
  0 siblings, 0 replies; 6+ messages in thread
From: Lyude Paul @ 2022-08-16 18:04 UTC (permalink / raw
  To: nouveau
  Cc: stable, Ben Skeggs, Karol Herbst, David Airlie, Daniel Vetter,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list

As it turns out: while Nvidia does actually have interlacing knobs on their
GPU still pretty much no current GPUs since Volta actually support it.
Trying interlacing on these GPUs will result in NVDisplay being quite
unhappy like so:

nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001

So let's fix this by following the same behavior Nvidia's driver does and
disable interlacing entirely.

Signed-off-by: Lyude Paul <lyude@redhat.com>
Cc: stable@vger.kernel.org
---
 drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
index 43a9d1e1cf71..8100c75ee731 100644
--- a/drivers/gpu/drm/nouveau/nouveau_connector.c
+++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
@@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
 			connector->interlace_allowed =
 				nv_encoder->caps.dp_interlace;
 		else
-			connector->interlace_allowed = true;
+			connector->interlace_allowed =
+				drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
 		connector->doublescan_allowed = true;
 	} else
 	if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
-- 
2.37.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [Nouveau] [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
  2022-08-16 18:04 ` Lyude Paul
  (?)
@ 2022-08-16 18:36   ` Karol Herbst
  -1 siblings, 0 replies; 6+ messages in thread
From: Karol Herbst @ 2022-08-16 18:36 UTC (permalink / raw
  To: Lyude Paul
  Cc: David Airlie, nouveau, open list,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, Ben Skeggs,
	Daniel Vetter, stable

On Tue, Aug 16, 2022 at 8:04 PM Lyude Paul <lyude@redhat.com> wrote:
>
> As it turns out: while Nvidia does actually have interlacing knobs on their
> GPU still pretty much no current GPUs since Volta actually support it.
> Trying interlacing on these GPUs will result in NVDisplay being quite
> unhappy like so:
>
> nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
> nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001
>
> So let's fix this by following the same behavior Nvidia's driver does and
> disable interlacing entirely.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index 43a9d1e1cf71..8100c75ee731 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
>                         connector->interlace_allowed =
>                                 nv_encoder->caps.dp_interlace;
>                 else
> -                       connector->interlace_allowed = true;
> +                       connector->interlace_allowed =
> +                               drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
>                 connector->doublescan_allowed = true;
>         } else
>         if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
> --
> 2.37.1
>

Reviewed-by: Karol Herbst <kherbst@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
@ 2022-08-16 18:36   ` Karol Herbst
  0 siblings, 0 replies; 6+ messages in thread
From: Karol Herbst @ 2022-08-16 18:36 UTC (permalink / raw
  To: Lyude Paul
  Cc: David Airlie, nouveau, open list,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, Ben Skeggs,
	stable

On Tue, Aug 16, 2022 at 8:04 PM Lyude Paul <lyude@redhat.com> wrote:
>
> As it turns out: while Nvidia does actually have interlacing knobs on their
> GPU still pretty much no current GPUs since Volta actually support it.
> Trying interlacing on these GPUs will result in NVDisplay being quite
> unhappy like so:
>
> nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
> nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001
>
> So let's fix this by following the same behavior Nvidia's driver does and
> disable interlacing entirely.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index 43a9d1e1cf71..8100c75ee731 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
>                         connector->interlace_allowed =
>                                 nv_encoder->caps.dp_interlace;
>                 else
> -                       connector->interlace_allowed = true;
> +                       connector->interlace_allowed =
> +                               drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
>                 connector->doublescan_allowed = true;
>         } else
>         if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
> --
> 2.37.1
>

Reviewed-by: Karol Herbst <kherbst@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] drm/nouveau/kms/nv140-: Disable interlacing
@ 2022-08-16 18:36   ` Karol Herbst
  0 siblings, 0 replies; 6+ messages in thread
From: Karol Herbst @ 2022-08-16 18:36 UTC (permalink / raw
  To: Lyude Paul
  Cc: nouveau, stable, Ben Skeggs, David Airlie, Daniel Vetter,
	open list:DRM DRIVER FOR NVIDIA GEFORCE/QUADRO GPUS, open list

On Tue, Aug 16, 2022 at 8:04 PM Lyude Paul <lyude@redhat.com> wrote:
>
> As it turns out: while Nvidia does actually have interlacing knobs on their
> GPU still pretty much no current GPUs since Volta actually support it.
> Trying interlacing on these GPUs will result in NVDisplay being quite
> unhappy like so:
>
> nouveau 0000:1f:00.0: disp: chid 0 stat 00004802 reason 4 [INVALID_ARG] mthd 2008 data 00000001 code 00080000
> nouveau 0000:1f:00.0: disp: chid 0 stat 10005080 reason 5 [INVALID_STATE] mthd 0200 data 00000001 code 00000001
>
> So let's fix this by following the same behavior Nvidia's driver does and
> disable interlacing entirely.
>
> Signed-off-by: Lyude Paul <lyude@redhat.com>
> Cc: stable@vger.kernel.org
> ---
>  drivers/gpu/drm/nouveau/nouveau_connector.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c
> index 43a9d1e1cf71..8100c75ee731 100644
> --- a/drivers/gpu/drm/nouveau/nouveau_connector.c
> +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c
> @@ -504,7 +504,8 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
>                         connector->interlace_allowed =
>                                 nv_encoder->caps.dp_interlace;
>                 else
> -                       connector->interlace_allowed = true;
> +                       connector->interlace_allowed =
> +                               drm->client.device.info.family < NV_DEVICE_INFO_V0_VOLTA;
>                 connector->doublescan_allowed = true;
>         } else
>         if (nv_encoder->dcb->type == DCB_OUTPUT_LVDS ||
> --
> 2.37.1
>

Reviewed-by: Karol Herbst <kherbst@redhat.com>


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-08-16 18:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-16 18:04 [Nouveau] [PATCH] drm/nouveau/kms/nv140-: Disable interlacing Lyude Paul
2022-08-16 18:04 ` Lyude Paul
2022-08-16 18:04 ` Lyude Paul
2022-08-16 18:36 ` [Nouveau] " Karol Herbst
2022-08-16 18:36   ` Karol Herbst
2022-08-16 18:36   ` Karol Herbst

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.