Ilia Mirkin
2013-Jul-29 23:05 UTC
[Nouveau] [PATCH 1/3] drm/nouveau: remove duplicate copy of nv44_graph_class
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- drivers/gpu/drm/nouveau/core/engine/graph/nv40.h | 3 +++ drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/nv40.h b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.h index 7da35a4..ad82093 100644 --- a/drivers/gpu/drm/nouveau/core/engine/graph/nv40.h +++ b/drivers/gpu/drm/nouveau/core/engine/graph/nv40.h @@ -1,6 +1,9 @@ #ifndef __NV40_GRAPH_H__ #define __NV40_GRAPH_H__ +#include <core/device.h> +#include <core/gpuobj.h> + /* returns 1 if device is one of the nv4x using the 0x4497 object class, * helpful to determine a number of other hardware features */ diff --git a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c index 716bf41..b10a143 100644 --- a/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c +++ b/drivers/gpu/drm/nouveau/core/subdev/instmem/nv40.c @@ -22,15 +22,9 @@ * Authors: Ben Skeggs */ -#include "nv04.h" +#include <engine/graph/nv40.h> -static inline int -nv44_graph_class(struct nv04_instmem_priv *priv) -{ - if ((nv_device(priv)->chipset & 0xf0) == 0x60) - return 1; - return !(0x0baf & (1 << (nv_device(priv)->chipset & 0x0f))); -} +#include "nv04.h" static int nv40_instmem_ctor(struct nouveau_object *parent, struct nouveau_object *engine, -- 1.8.1.5
Ilia Mirkin
2013-Jul-29 23:05 UTC
[Nouveau] [PATCH 2/3] drm/nv40/mpeg: write magic value to channel object to make it work
Looks like the rewrite in commit ebb945a94b ("drm/nouveau: port all engines to new engine module format") missed that one little detail. Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- drivers/gpu/drm/nouveau/core/engine/mpeg/nv40.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv40.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv40.c index f7c581a..5d39b5a 100644 --- a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv40.c +++ b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv40.c @@ -61,6 +61,8 @@ nv40_mpeg_context_ctor(struct nouveau_object *parent, if (ret) return ret; + nv_wo32(&chan->base.base, 0x78, 0x02001ec1); + return 0; } -- 1.8.1.5
Ilia Mirkin
2013-Jul-29 23:05 UTC
[Nouveau] [PATCH 3/3] drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> --- 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); nv_wr32(priv, 0x00b300, 0x02001ec1); nv_mask(priv, 0x00b32c, 0x00000001, 0x00000001); -- 1.8.1.5
Emil Velikov
2013-Jul-29 23:27 UTC
[Nouveau] [PATCH 3/3] drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
On 30/07/13 00:05, Ilia Mirkin wrote:> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu> > --- > 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); > >
Apparently Analagous Threads
- [PATCH 3/3] drm/nv31/mpeg: don't recognize nv3x cards as having nv44 graph class
- [PATCH 1/5] drm/nv31/mpeg: no need to set compat mode differently for nv44 gr
- [PATCH] drm/nv31/mpeg: no need to set compat mode differently for nv44 gr
- [PATCH 1/3] drm/nouveau: remove duplicate copy of nv44_graph_class
- [PATCH] drm/nv31-nv43/mpeg: inst not available on pre-nv44