[Nouveau] [PATCH] drm/nouveau/kms: Implement KDB debug hooks for nouveau KMS.

Francisco Jerez currojerez at riseup.net
Thu Aug 26 09:55:41 PDT 2010


Chris Ball <cjb at laptop.org> writes:

> Hi Francisco,
>
>    > There is a problem with this on pre-nv20 cards. Fbcon
>    > acceleration won't work properly with IRQs disabled because you
>    > miss the context switching interrupts: You'll get a locked up
>    > fbcon if you hit sysrq-g when there's some process using the GPU.
>    > 
>    > I'd suggest disabling acceleration while in debug mode
>    > (e.g. using nouveau_fbcon_save_disable_accel()). That aside the
>    > patch looks good to me.
>
> Thanks very much for this.  Here's a (only compile-tested) patch for
> this, on top of jwessel's current kgdb-next branch.  Jason, would you
> mind testing on pre-nv20 and applying?
>
Thanks, it looks OK to me, and I just tested it successfully on
nv11. You can have my "Acked-by" on both nouveau patches if you need it.

> Thanks,
>
> - Chris.
>
>
> From: Chris Ball <cjb at laptop.org>
> Subject: [PATCH] drm/nouveau/kms: Avoid a hang entering KDB with VT accel on.
>
> Francisco Jerez advises that pre-nv20 cards would hang if we entered
> kdb with accel on and IRQs disabled, so we now disable accel before
> entering kdb and re-enable it on the way back out.
>
> Signed-off-by: Chris Ball <cjb at laptop.org>
> Cc: Francisco Jerez <currojerez at riseup.net>
> Cc: Jason Wessel <jason.wessel at windriver.com>
> ---
>  drivers/gpu/drm/nouveau/nv04_crtc.c |    9 +++++++++
>  1 files changed, 9 insertions(+), 0 deletions(-)
>
> diff --git a/drivers/gpu/drm/nouveau/nv04_crtc.c b/drivers/gpu/drm/nouveau/nv04_crtc.c
> index fb669dd..427f90e 100644
> --- a/drivers/gpu/drm/nouveau/nv04_crtc.c
> +++ b/drivers/gpu/drm/nouveau/nv04_crtc.c
> @@ -31,10 +31,11 @@
>  #include "nouveau_connector.h"
>  #include "nouveau_crtc.h"
>  #include "nouveau_fb.h"
>  #include "nouveau_hw.h"
>  #include "nvreg.h"
> +#include "nouveau_fbcon.h"
>  
>  static int
>  nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
>  			struct drm_framebuffer *old_fb);
>  
> @@ -858,10 +859,18 @@ nv04_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
>  static int
>  nv04_crtc_mode_set_base_atomic(struct drm_crtc *crtc,
>  			       struct drm_framebuffer *fb,
>  			       int x, int y, int enter)
>  {
> +	struct drm_nouveau_private *dev_priv = crtc->dev->dev_private;
> +	struct drm_device *dev = dev_priv->dev;
> +
> +	if (enter)
> +		nouveau_fbcon_save_disable_accel(dev);
> +	else
> +		nouveau_fbcon_restore_accel(dev);
> +
>  	return nv04_crtc_do_mode_set_base(crtc, fb, x, y, true);
>  }
>  
>  static void nv04_cursor_upload(struct drm_device *dev, struct nouveau_bo *src,
>  			       struct nouveau_bo *dst)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20100826/fb9a3833/attachment.pgp>


More information about the Nouveau mailing list