Prepare the way for performance counters in perfmon
Hi folks,
This set of patches is just for clearing the way before introducing the infrastructure for performance counters in perfmon.
I'll try to publish a new version of my kernel interface based on nvif in a couple of days.
See you.
A message that is not in the archive (sent off-list or not yet received): 1410780342-2808-1-git-send-email-samuel.pitoiset-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH 1/3 lib: fix devices selection using -a
Signed-off-by Samuel Pitoiset <[email protected]>
--- lib/kern.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/kern.c +1 -1
@@ -173,7 +173,7 @@ drm_client_init(const char *name, u64 device, const char *cfg,if (ret = -ENOMEM , !(drm = *ppriv =malloc (sizeof (*drm)))) goto fail; -for (minor =DRM_RENDER_MIN ; minor <=DRM_RENDER_MAX ; minor++) { +for (minor =DRM_RENDER_MIN + device; minor <=DRM_RENDER_MAX ; minor++) {snprintf (path,sizeof (path),"/dev/dri/renderD%d" , minor);if ((drm->fd =open (path,O_RDWR ,0 )) <0 )continue ;
Signature · 1 line
2.0.0
PATCH 2/3 perfmon: remove unused nouveau_perfsig_wrap() function
In reply to a message not in the archiveSigned-off-by Samuel Pitoiset <[email protected]>
--- nvkm/engine/perfmon/base.c | 20 -------------------- nvkm/engine/perfmon/priv.h | 3 --- 2 files changed, 23 deletions(-)
nvkm/engine/perfmon/base.c +0 -20
@@ -80,26 +80,6 @@ nouveau_perfsig_find(struct nouveau_perfmon *ppm, const char *name, u32 size,return nouveau_perfsig_find_ (dom, name, size); } -struct nouveau_perfctr * -nouveau_perfsig_wrap (struct nouveau_perfmon *ppm,const char *name, -struct nouveau_perfdom **pdom) -{ -struct nouveau_perfsig *sig; -struct nouveau_perfctr *ctr; - - sig =nouveau_perfsig_find (ppm, name,strlen (name), pdom); -if (!sig) -return NULL ; - - ctr =kzalloc (sizeof (*ctr),GFP_KERNEL ); -if (ctr) { - ctr->signal[0 ] = sig; - ctr->logic_op =0xaaaa ; - } - -return ctr; -} -/******************************************************************************* * Perfmon object classes ******************************************************************************/
nvkm/engine/perfmon/priv.h +0 -3
@@ -31,9 +31,6 @@ struct nouveau_perfsig { };struct nouveau_perfdom ; -struct nouveau_perfctr * -nouveau_perfsig_wrap (struct nouveau_perfmon *,const char *, -struct nouveau_perfdom **);struct nouveau_specdom {u16 signal_nr;
Signature · 1 line
2.0.0
PATCH 3/3 perfmon: remove PDAEMON signals
In reply to a message not in the archiveAs discussed with Martin Peres, PDAEMON signals should be exposed through sysfs and not managed by the perfmon engine which is only used for performance counters.
Signed-off-by Samuel Pitoiset <[email protected]>
--- drm/Kbuild | 1 - drm/core/engine/perfmon/daemon.c | 1 - nvkm/engine/perfmon/Makefile.am | 1 - nvkm/engine/perfmon/daemon.c | 109 --------------------------------------- nvkm/engine/perfmon/nva3.c | 20 +------ nvkm/engine/perfmon/nvc0.c | 6 --- nvkm/engine/perfmon/nve0.c | 7 --- nvkm/engine/perfmon/nvf0.c | 5 -- nvkm/engine/perfmon/priv.h | 4 -- nvkm/include/engine/perfmon.h | 4 -- 10 files changed, 1 insertion(+), 157 deletions(-) delete mode 120000 drm/core/engine/perfmon/daemon.c delete mode 100644 nvkm/engine/perfmon/daemon.c
drm/Kbuild +0 -1
@@ -319,7 +319,6 @@ nouveau-y += core/engine/mpeg/nv44.o nouveau-y += core/engine/mpeg/nv50.o nouveau-y += core/engine/mpeg/nv84.o nouveau-y += core/engine/perfmon/base.o -nouveau-y += core/engine/perfmon/daemon.o nouveau-y += core/engine/perfmon/nv40.o nouveau-y += core/engine/perfmon/nv50.o nouveau-y += core/engine/perfmon/nv84.o
drm/core/engine/perfmon/daemon.c deleted +0 -1
@@ -1 +0,0 @@ -../../../../nvkm/engine/perfmon/daemon.c
nvkm/engine/perfmon/Makefile.am +0 -1
@@ -1,7 +1,6 @@ noinst_LTLIBRARIES = libperfmon.la libperfmon_la_SOURCES = base.c \ - daemon.c \ nv40.c \ nv50.c \ nv84.c \
nvkm/engine/perfmon/daemon.c deleted +0 -109
109 lines not on this page · raw message
nvkm/engine/perfmon/nva3.c +1 -19
@@ -65,29 +65,11 @@ nva3_perfmon[] = { {} }; -static int -nva3_perfmon_ctor (struct nouveau_object *parent,struct nouveau_object *engine, -struct nouveau_oclass *oclass,void *data,u32 size, -struct nouveau_object **object) -{ -int ret =nv40_perfmon_ctor (parent, engine, oclass, data, size, object); -if (ret ==0 ) { -struct nv40_perfmon_priv *priv = (void *)*object; - ret =nouveau_perfdom_new (&priv->base,"pwr" ,0 ,0 ,0 ,0 , - nva3_perfmon_pwr); -if (ret) -return ret; - - priv->base.last =3 ; - } -return ret; -} -struct nouveau_oclass * nva3_perfmon_oclass = &(struct nv40_perfmon_oclass ) { .base.handle =NV_ENGINE (PERFMON ,0xa3 ), .base.ofuncs = &(struct nouveau_ofuncs ) { - .ctor = nva3_perfmon_ctor, + .ctor = nv40_perfmon_ctor, .dtor = _nouveau_perfmon_dtor, .init = _nouveau_perfmon_init, .fini = _nouveau_perfmon_fini,
nvkm/engine/perfmon/nvc0.c +0 -6
@@ -124,11 +124,6 @@ nvc0_perfmon_ctor(struct nouveau_object *parent, struct nouveau_object *engine,if (ret)return ret; - ret =nouveau_perfdom_new (&priv->base,"pwr" ,0 ,0 ,0 ,0 , - nvc0_perfmon_pwr); -if (ret) -return ret; -/* HUB */ ret =nouveau_perfdom_new (&priv->base,"hub" ,0 ,0x1b0000 ,0 ,0x200 , nvc0_perfmon_hub);
@@ -157,7 +152,6 @@ nvc0_perfmon_ctor(struct nouveau_object *parent, struct nouveau_object *engine,nv_engine (priv)->cclass = &nouveau_perfmon_cclass;nv_engine (priv)->sclass = nouveau_perfmon_sclass; - priv->base.last =7 ;return 0 ; }
nvkm/engine/perfmon/nve0.c +0 -7
@@ -112,12 +112,6 @@ nve0_perfmon_ctor(struct nouveau_object *parent, struct nouveau_object *engine,if (ret)return ret; -/* PDAEMON */ - ret =nouveau_perfdom_new (&priv->base,"pwr" ,0 ,0 ,0 ,0 , - nve0_perfmon_pwr); -if (ret) -return ret; -/* HUB */ ret =nouveau_perfdom_new (&priv->base,"hub" ,0 ,0x1b0000 ,0 ,0x200 , nve0_perfmon_hub);
@@ -146,7 +140,6 @@ nve0_perfmon_ctor(struct nouveau_object *parent, struct nouveau_object *engine,nv_engine (priv)->cclass = &nouveau_perfmon_cclass;nv_engine (priv)->sclass = nouveau_perfmon_sclass; - priv->base.last =7 ;return 0 ; }
nvkm/engine/perfmon/nvf0.c +0 -5
@@ -49,11 +49,6 @@ nvf0_perfmon_ctor(struct nouveau_object *parent, struct nouveau_object *engine,if (ret)return ret; - ret =nouveau_perfdom_new (&priv->base,"pwr" ,0 ,0 ,0 ,0 , - nve0_perfmon_pwr); -if (ret) -return ret; -nv_engine (priv)->cclass = &nouveau_perfmon_cclass;nv_engine (priv)->sclass = nouveau_perfmon_sclass;return 0 ;
nvkm/engine/perfmon/priv.h +0 -4
@@ -38,10 +38,6 @@ struct nouveau_specdom {const struct nouveau_funcdom *func; }; -extern const struct nouveau_specdom nva3_perfmon_pwr[]; -extern const struct nouveau_specdom nvc0_perfmon_pwr[]; -extern const struct nouveau_specdom nve0_perfmon_pwr[]; -struct nouveau_perfdom {struct list_head head;struct list_head list;
nvkm/include/engine/perfmon.h +0 -4
@@ -15,10 +15,6 @@ struct nouveau_perfmon {struct list_head domains;u32 sequence; - -/*XXX: temp for daemon backend */ -u32 pwr[8 ]; -u32 last; }; static inline struct nouveau_perfmon *
Signature · 1 line
2.0.0