From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcin Slusarz Subject: Re: [Nouveau] [PATCH] drm/nouveau: Ack interrupts for some fuc engines Date: Mon, 25 Mar 2013 19:14:56 +0100 Message-ID: <20130325181456.GA8026@joi.lan> References: <5150175D.3070808@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <5150175D.3070808@gmail.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org To: Maarten Lankhorst Cc: nouveau@lists.freedesktop.org, "dri-devel@lists.freedesktop.org" List-Id: nouveau.vger.kernel.org On Mon, Mar 25, 2013 at 10:22:37AM +0100, Maarten Lankhorst wrote: > Fixes 100% cpu usage when the exit interrupt never got acked. > > Signed-off-by: Maarten Lankhorst > --- > diff --git a/drivers/gpu/drm/nouveau/core/core/falcon.c b/drivers/gpu/drm/nouveau/core/core/falcon.c > index e05c157..b11c5f3 100644 > --- a/drivers/gpu/drm/nouveau/core/core/falcon.c > +++ b/drivers/gpu/drm/nouveau/core/core/falcon.c > @@ -229,6 +229,24 @@ _nouveau_falcon_fini(struct nouveau_object *object, bool suspend) > return nouveau_engine_fini(&falcon->base, suspend); > } > > +void > +nouveau_falcon_intr(struct nouveau_subdev *subdev) > +{ > + struct nouveau_falcon *falcon = (void*)subdev; > + u32 intr = nv_ro32(falcon, 0x008); > + > + nv_wo32(falcon, 0x004, intr); > + > + if (intr & 0x10) { > + intr &= ~0x10; > + > + nv_info(falcon, "Exit interrupt called\n"); Do you really want to print it at "info" level? How frequent it is? > + } > + > + if (intr) > + nv_error(falcon, "Unhandled interrupt %08x\n", intr); > +} > + > int > nouveau_falcon_create_(struct nouveau_object *parent, > struct nouveau_object *engine,