From mboxrd@z Thu Jan 1 00:00:00 1970 From: Emil Velikov Subject: Re: [PATCH 3/3] drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class Date: Tue, 30 Jul 2013 00:27:22 +0100 Message-ID: <51F6FA5A.3030703@gmail.com> References: <1375139118-17398-1-git-send-email-imirkin@alum.mit.edu> <1375139118-17398-3-git-send-email-imirkin@alum.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1375139118-17398-3-git-send-email-imirkin-FrUbXkNCsVf2fBVCVOL8/A@public.gmane.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org Errors-To: nouveau-bounces+gcfxn-nouveau=m.gmane.org-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org To: Ilia Mirkin Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org, Ben Skeggs List-Id: nouveau.vger.kernel.org On 30/07/13 00:05, Ilia Mirkin wrote: > Signed-off-by: Ilia Mirkin > --- > drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c > index 9f7c7d5..c190043 100644 > --- a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c > +++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c > @@ -284,7 +284,10 @@ nv31_mpeg_init(struct nouveau_object *object) > /* PMPEG init */ > nv_wr32(priv, 0x00b32c, 0x00000000); > nv_wr32(priv, 0x00b314, 0x00000100); > - nv_wr32(priv, 0x00b220, nv44_graph_class(priv) ? 0x00000044 : 0x00000031); > + if (nv_device(priv)->chipset >= 0x40 && nv44_graph_class(priv)) > + nv_wr32(priv, 0x00b220, 0x00000044); > + else > + nv_wr32(priv, 0x00b220, 0x00000031); Might be a nitpicking too much, but I believe the check makes more sense inside nv44_graph_class(), despite that this is the only nv3x context that uses it Emil > nv_wr32(priv, 0x00b300, 0x02001ec1); > nv_mask(priv, 0x00b32c, 0x00000001, 0x00000001); > >