* [PATCH] drm/nouveau/dispnv04: Remove dead code
@ 2020-04-30 20:26 Souptick Joarder
2020-04-30 20:51 ` [Nouveau] " Ilia Mirkin
0 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2020-04-30 20:26 UTC (permalink / raw)
To: bskeggs, airlied, daniel, tzimmermann, alexander.deucher, lyude, sam
Cc: nouveau, inux-kernel, dri-devel, Souptick Joarder
These are dead code since 3.10. If there is no plan to use
it further, these can be removed forever.
Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
---
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 28 ----------------------------
1 file changed, 28 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
index 1f08de4..ad0ef7d 100644
--- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
+++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
@@ -269,31 +269,11 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
horizStart = horizTotal - 5;
horizEnd = horizTotal - 2;
horizBlankEnd = horizTotal + 4;
-#if 0
- if (dev->overlayAdaptor && drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
- /* This reportedly works around some video overlay bandwidth problems */
- horizTotal += 2;
-#endif
}
if (mode->flags & DRM_MODE_FLAG_INTERLACE)
vertTotal |= 1;
-#if 0
- ErrorF("horizDisplay: 0x%X \n", horizDisplay);
- ErrorF("horizStart: 0x%X \n", horizStart);
- ErrorF("horizEnd: 0x%X \n", horizEnd);
- ErrorF("horizTotal: 0x%X \n", horizTotal);
- ErrorF("horizBlankStart: 0x%X \n", horizBlankStart);
- ErrorF("horizBlankEnd: 0x%X \n", horizBlankEnd);
- ErrorF("vertDisplay: 0x%X \n", vertDisplay);
- ErrorF("vertStart: 0x%X \n", vertStart);
- ErrorF("vertEnd: 0x%X \n", vertEnd);
- ErrorF("vertTotal: 0x%X \n", vertTotal);
- ErrorF("vertBlankStart: 0x%X \n", vertBlankStart);
- ErrorF("vertBlankEnd: 0x%X \n", vertBlankEnd);
-#endif
-
/*
* compute correct Hsync & Vsync polarity
*/
@@ -492,14 +472,6 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
/* Except for rare conditions I2C is enabled on the primary crtc */
if (nv_crtc->index == 0)
regp->crtc_eng_ctrl |= NV_CRTC_FSEL_I2C;
-#if 0
- /* Set overlay to desired crtc. */
- if (dev->overlayAdaptor) {
- NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(dev);
- if (pPriv->overlayCRTC == nv_crtc->index)
- regp->crtc_eng_ctrl |= NV_CRTC_FSEL_OVERLAY;
- }
-#endif
/* ADDRESS_SPACE_PNVM is the same as setting HCUR_ASI */
regp->cursor_cfg = NV_PCRTC_CURSOR_CONFIG_CUR_LINES_64 |
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Nouveau] [PATCH] drm/nouveau/dispnv04: Remove dead code
2020-04-30 20:26 [PATCH] drm/nouveau/dispnv04: Remove dead code Souptick Joarder
@ 2020-04-30 20:51 ` Ilia Mirkin
2020-05-01 13:23 ` Souptick Joarder
0 siblings, 1 reply; 4+ messages in thread
From: Ilia Mirkin @ 2020-04-30 20:51 UTC (permalink / raw)
To: Souptick Joarder
Cc: inux-kernel, David Airlie, nouveau, dri-devel, Ben Skeggs,
Thomas Zimmermann, Alex Deucher, Sam Ravnborg
Interesting. I do remember seeing some snow on NV5's overlay at high
resolutions. Wonder if it was because of this missing code...
On Thu, Apr 30, 2020 at 4:19 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> These are dead code since 3.10. If there is no plan to use
> it further, these can be removed forever.
>
> Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> ---
> drivers/gpu/drm/nouveau/dispnv04/crtc.c | 28 ----------------------------
> 1 file changed, 28 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> index 1f08de4..ad0ef7d 100644
> --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> @@ -269,31 +269,11 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
> horizStart = horizTotal - 5;
> horizEnd = horizTotal - 2;
> horizBlankEnd = horizTotal + 4;
> -#if 0
> - if (dev->overlayAdaptor && drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
> - /* This reportedly works around some video overlay bandwidth problems */
> - horizTotal += 2;
> -#endif
> }
>
> if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> vertTotal |= 1;
>
> -#if 0
> - ErrorF("horizDisplay: 0x%X \n", horizDisplay);
> - ErrorF("horizStart: 0x%X \n", horizStart);
> - ErrorF("horizEnd: 0x%X \n", horizEnd);
> - ErrorF("horizTotal: 0x%X \n", horizTotal);
> - ErrorF("horizBlankStart: 0x%X \n", horizBlankStart);
> - ErrorF("horizBlankEnd: 0x%X \n", horizBlankEnd);
> - ErrorF("vertDisplay: 0x%X \n", vertDisplay);
> - ErrorF("vertStart: 0x%X \n", vertStart);
> - ErrorF("vertEnd: 0x%X \n", vertEnd);
> - ErrorF("vertTotal: 0x%X \n", vertTotal);
> - ErrorF("vertBlankStart: 0x%X \n", vertBlankStart);
> - ErrorF("vertBlankEnd: 0x%X \n", vertBlankEnd);
> -#endif
> -
> /*
> * compute correct Hsync & Vsync polarity
> */
> @@ -492,14 +472,6 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
> /* Except for rare conditions I2C is enabled on the primary crtc */
> if (nv_crtc->index == 0)
> regp->crtc_eng_ctrl |= NV_CRTC_FSEL_I2C;
> -#if 0
> - /* Set overlay to desired crtc. */
> - if (dev->overlayAdaptor) {
> - NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(dev);
> - if (pPriv->overlayCRTC == nv_crtc->index)
> - regp->crtc_eng_ctrl |= NV_CRTC_FSEL_OVERLAY;
> - }
> -#endif
>
> /* ADDRESS_SPACE_PNVM is the same as setting HCUR_ASI */
> regp->cursor_cfg = NV_PCRTC_CURSOR_CONFIG_CUR_LINES_64 |
> --
> 1.9.1
>
> _______________________________________________
> Nouveau mailing list
> Nouveau@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Nouveau] [PATCH] drm/nouveau/dispnv04: Remove dead code
2020-04-30 20:51 ` [Nouveau] " Ilia Mirkin
@ 2020-05-01 13:23 ` Souptick Joarder
2020-05-01 13:30 ` Ilia Mirkin
0 siblings, 1 reply; 4+ messages in thread
From: Souptick Joarder @ 2020-05-01 13:23 UTC (permalink / raw)
To: Ilia Mirkin
Cc: inux-kernel, David Airlie, nouveau, dri-devel, Ben Skeggs,
Thomas Zimmermann, Alex Deucher, Sam Ravnborg
On Fri, May 1, 2020 at 2:21 AM Ilia Mirkin <imirkin@alum.mit.edu> wrote:
>
> Interesting. I do remember seeing some snow on NV5's overlay at high
> resolutions. Wonder if it was because of this missing code...
What was the problem ? Does enabling this dead code will fix the problem ?
>
> On Thu, Apr 30, 2020 at 4:19 PM Souptick Joarder <jrdr.linux@gmail.com> wrote:
> >
> > These are dead code since 3.10. If there is no plan to use
> > it further, these can be removed forever.
> >
> > Signed-off-by: Souptick Joarder <jrdr.linux@gmail.com>
> > ---
> > drivers/gpu/drm/nouveau/dispnv04/crtc.c | 28 ----------------------------
> > 1 file changed, 28 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/nouveau/dispnv04/crtc.c b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> > index 1f08de4..ad0ef7d 100644
> > --- a/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> > +++ b/drivers/gpu/drm/nouveau/dispnv04/crtc.c
> > @@ -269,31 +269,11 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
> > horizStart = horizTotal - 5;
> > horizEnd = horizTotal - 2;
> > horizBlankEnd = horizTotal + 4;
> > -#if 0
> > - if (dev->overlayAdaptor && drm->client.device.info.family >= NV_DEVICE_INFO_V0_CELSIUS)
> > - /* This reportedly works around some video overlay bandwidth problems */
> > - horizTotal += 2;
> > -#endif
> > }
> >
> > if (mode->flags & DRM_MODE_FLAG_INTERLACE)
> > vertTotal |= 1;
> >
> > -#if 0
> > - ErrorF("horizDisplay: 0x%X \n", horizDisplay);
> > - ErrorF("horizStart: 0x%X \n", horizStart);
> > - ErrorF("horizEnd: 0x%X \n", horizEnd);
> > - ErrorF("horizTotal: 0x%X \n", horizTotal);
> > - ErrorF("horizBlankStart: 0x%X \n", horizBlankStart);
> > - ErrorF("horizBlankEnd: 0x%X \n", horizBlankEnd);
> > - ErrorF("vertDisplay: 0x%X \n", vertDisplay);
> > - ErrorF("vertStart: 0x%X \n", vertStart);
> > - ErrorF("vertEnd: 0x%X \n", vertEnd);
> > - ErrorF("vertTotal: 0x%X \n", vertTotal);
> > - ErrorF("vertBlankStart: 0x%X \n", vertBlankStart);
> > - ErrorF("vertBlankEnd: 0x%X \n", vertBlankEnd);
> > -#endif
> > -
> > /*
> > * compute correct Hsync & Vsync polarity
> > */
> > @@ -492,14 +472,6 @@ static void nv_crtc_calc_state_ext(struct drm_crtc *crtc, struct drm_display_mod
> > /* Except for rare conditions I2C is enabled on the primary crtc */
> > if (nv_crtc->index == 0)
> > regp->crtc_eng_ctrl |= NV_CRTC_FSEL_I2C;
> > -#if 0
> > - /* Set overlay to desired crtc. */
> > - if (dev->overlayAdaptor) {
> > - NVPortPrivPtr pPriv = GET_OVERLAY_PRIVATE(dev);
> > - if (pPriv->overlayCRTC == nv_crtc->index)
> > - regp->crtc_eng_ctrl |= NV_CRTC_FSEL_OVERLAY;
> > - }
> > -#endif
> >
> > /* ADDRESS_SPACE_PNVM is the same as setting HCUR_ASI */
> > regp->cursor_cfg = NV_PCRTC_CURSOR_CONFIG_CUR_LINES_64 |
> > --
> > 1.9.1
> >
> > _______________________________________________
> > Nouveau mailing list
> > Nouveau@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/nouveau
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [Nouveau] [PATCH] drm/nouveau/dispnv04: Remove dead code
2020-05-01 13:23 ` Souptick Joarder
@ 2020-05-01 13:30 ` Ilia Mirkin
0 siblings, 0 replies; 4+ messages in thread
From: Ilia Mirkin @ 2020-05-01 13:30 UTC (permalink / raw)
To: Souptick Joarder
Cc: inux-kernel, David Airlie, nouveau, dri-devel, Ben Skeggs,
Thomas Zimmermann, Alex Deucher, Sam Ravnborg
On Fri, May 1, 2020 at 9:15 AM Souptick Joarder <jrdr.linux@gmail.com> wrote:
>
> On Fri, May 1, 2020 at 2:21 AM Ilia Mirkin <imirkin@alum.mit.edu> wrote:
> >
> > Interesting. I do remember seeing some snow on NV5's overlay at high
> > resolutions. Wonder if it was because of this missing code...
>
> What was the problem ? Does enabling this dead code will fix the problem ?
This "dead" code is essentially documentation. It's from the
xf86-video-nv driver which was the base of the dispnv04 code. It won't
compile as-is, which is why it's #if 0'd out.
-ilia
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-05-02 8:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-30 20:26 [PATCH] drm/nouveau/dispnv04: Remove dead code Souptick Joarder
2020-04-30 20:51 ` [Nouveau] " Ilia Mirkin
2020-05-01 13:23 ` Souptick Joarder
2020-05-01 13:30 ` Ilia Mirkin
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).