Displaying 20 results from an estimated 103 matches for "nv_subdev".
Did you mean:
nvkm_subdev
2013 Jul 29
0
[PATCH] drm/nouveau: protect vm refcount with mutex
...uveau_vm_del(struct nouveau_vm *vm);
+
void
nouveau_vm_map_at(struct nouveau_vma *vma, u64 delta, struct nouveau_mem *node)
{
@@ -335,10 +337,10 @@ nouveau_vm_get(struct nouveau_vm *vm, u64 size, u32 page_shift,
return ret;
}
}
+ ++vm->refcount;
+ vma->vm = vm;
mutex_unlock(&nv_subdev(vmm)->mutex);
- vma->vm = NULL;
- nouveau_vm_ref(vm, &vma->vm, NULL);
vma->offset = (u64)vma->node->offset << 12;
#ifdef NOUVEAU_VM_POISON
if (vm->poison)
@@ -353,7 +355,7 @@ nouveau_vm_put(struct nouveau_vma *vma)
{
struct nouveau_vm *vm = vma->vm;
str...
2015 Apr 14
2
[PATCH 1/2] pm: prevent freeing the wrong engine context
...6c44..274457c 100644
--- a/drm/nouveau/nvkm/engine/pm/base.c
+++ b/drm/nouveau/nvkm/engine/pm/base.c
@@ -332,9 +332,12 @@ static void
nvkm_perfctx_dtor(struct nvkm_object *object)
{
struct nvkm_pm *ppm = (void *)object->engine;
+ struct nvkm_perfctx *ctx = (void *)object;
+
mutex_lock(&nv_subdev(ppm)->mutex);
- nvkm_engctx_destroy(&ppm->context->base);
- ppm->context = NULL;
+ nvkm_engctx_destroy(&ctx->base);
+ if (ppm->context == ctx)
+ ppm->context = NULL;
mutex_unlock(&nv_subdev(ppm)->mutex);
}
--
2.3.5
2014 Jul 21
1
[PATCH] perfmon: do not forget to destroy the engine context
.../engine/perfmon/base.c b/nvkm/engine/perfmon/base.c
index e9c5e51..7481003 100644
--- a/nvkm/engine/perfmon/base.c
+++ b/nvkm/engine/perfmon/base.c
@@ -303,6 +303,7 @@ nouveau_perfctx_dtor(struct nouveau_object *object)
{
struct nouveau_perfmon *ppm = (void *)object->engine;
mutex_lock(&nv_subdev(ppm)->mutex);
+ nouveau_engctx_destroy(&ppm->context->base);
ppm->context = NULL;
mutex_unlock(&nv_subdev(ppm)->mutex);
}
--
2.0.0
2013 Aug 12
0
[RFC PATCH] drm/nv50-nvd0: implement precise vblank timing support on nv50/nvc0.
...ruct nouveau_object *engine,
struct nouveau_oclass *oclass, void *data, u32 size,
@@ -1302,6 +1353,9 @@ nv50_disp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
nv_engine(priv)->sclass = nv50_disp_base_oclass;
nv_engine(priv)->cclass = &nv50_disp_cclass;
nv_subdev(priv)->intr = nv50_disp_intr;
+ priv->base.max_vblank_count = 0xffff;
+ priv->base.get_vblank_count = nv50_disp_get_vblank_count;
+ priv->base.get_scanoutpos = nv50_disp_get_scanoutpos;
INIT_WORK(&priv->supervisor, nv50_disp_intr_supervisor);
priv->sclass = nv50_disp_sclas...
2013 Sep 08
5
[PATCH 1/5] drm/nv31/mpeg: no need to set compat mode differently for nv44 gr
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
---
drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c | 6 +-----
1 file changed, 1 insertion(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c b/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
index c190043..5c54aa1 100644
--- a/drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
+++
2014 Feb 07
1
[PATCH] nouveau/drm/fifo: fix ENG_RUNLIST register address
...2);
nv_wr32(priv, 0x002274, (engine << 20) | (p >> 3));
- if (!nv_wait(priv, 0x002284 + (engine * 4), 0x00100000, 0x00000000))
+ if (!nv_wait(priv, 0x002284 + (engine * 8), 0x00100000, 0x00000000))
nv_error(priv, "runlist %d update timeout\n", engine);
mutex_unlock(&nv_subdev(priv)->mutex);
}
--
1.8.5.3
2013 Feb 03
2
[PATCH 2/3] drm/nv40/therm: reset temperature sensor on init
...return nouveau_therm_preinit(&priv->base.base);
}
+int
+nv40_therm_init(struct nouveau_object *object)
+{
+ struct nouveau_therm *therm = (void *)object;
+
+ nv40_sensor_setup(therm);
+
+ return _nouveau_therm_init(object);
+}
+
struct nouveau_oclass
nv40_therm_oclass = {
.handle = NV_SUBDEV(THERM, 0x40),
.ofuncs = &(struct nouveau_ofuncs) {
.ctor = nv40_therm_ctor,
.dtor = _nouveau_therm_dtor,
- .init = _nouveau_therm_init,
+ .init = nv40_therm_init,
.fini = _nouveau_therm_fini,
},
};
--
1.8.1
2013 Aug 12
2
[PATCH] drm/nouveau: fix ltcg memory initialization after suspend
...00000); /* INTR_EN &= ~0x10 */
+
+ nv_wr32(priv, 0x17e8d8, priv->part_nr);
+ if (nv_device(pfb)->card_type >= NV_E0)
+ nv_wr32(priv, 0x17e000, priv->part_nr);
+
+ nv_wr32(priv, 0x17e8d4, priv->tag_base);
+
+ return 0;
+}
+
struct nouveau_oclass
nvc0_ltcg_oclass = {
.handle = NV_SUBDEV(LTCG, 0xc0),
.ofuncs = &(struct nouveau_ofuncs) {
.ctor = nvc0_ltcg_ctor,
.dtor = nvc0_ltcg_dtor,
- .init = _nouveau_ltcg_init,
+ .init = nvc0_ltcg_init,
.fini = _nouveau_ltcg_fini,
},
};
2012 Nov 06
1
[PATCH] nouveau: Fix crash after D3
...se);
- if (ret)
- nv_warn(object, "failed fini, %d\n", ret);
+ pfuncs = nv_ofuncs(object);
+ if (pfuncs->fini) {
+ ret = nv_ofuncs(object)->fini(object, false);
+ if (ret)
+ nv_warn(object, "failed fini, %d\n", ret);
+ }
if (object->engine) {
mutex_lock(&nv_subdev(object->engine)->mutex);
--
1.7.10.4
2013 Jun 03
4
[PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
...+ const struct firmware *fw;
+ struct nouveau_device *device = nv_device(parent);
ret = nouveau_engine_create(parent, engine, oclass, true,
"PBSP", "bsp", &priv);
@@ -78,16 +120,105 @@ nv84_bsp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
nv_subdev(priv)->unit = 0x04008000;
nv_engine(priv)->cclass = &nv84_bsp_cclass;
nv_engine(priv)->sclass = nv84_bsp_sclass;
+
+ ret = request_firmware(&fw, "nouveau/nv84_bsp", &device->pdev->dev);
+ if (ret) {
+ nv_warn(priv, "Firmware for NV84 BSP unavailable.\n...
2013 Jun 04
0
[PATCH] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
...nv_device(parent);
>
> ret = nouveau_engine_create(parent, engine, oclass, true,
> "PBSP", "bsp", &priv);
> @@ -78,16 +120,105 @@ nv84_bsp_ctor(struct nouveau_object *parent, struct nouveau_object *engine,
> nv_subdev(priv)->unit = 0x04008000;
> nv_engine(priv)->cclass = &nv84_bsp_cclass;
> nv_engine(priv)->sclass = nv84_bsp_sclass;
> +
> + ret = request_firmware(&fw, "nouveau/nv84_bsp", &device->pdev->dev);
> + if (ret) {
> +...
2014 Feb 01
0
[RFC 13/16] drm/nouveau/ibus: add GK20A support
...nouveau_object *engine,
+ struct nouveau_oclass *oclass, void *data, u32 size,
+ struct nouveau_object **pobject)
+{
+ struct nvea_ibus_priv *priv;
+ int ret;
+
+ ret = nouveau_ibus_create(parent, engine, oclass, &priv);
+ *pobject = nv_object(priv);
+ if (ret)
+ return ret;
+
+ nv_subdev(priv)->intr = nvea_ibus_intr;
+ return 0;
+}
+
+struct nouveau_oclass
+nvea_ibus_oclass = {
+ .handle = NV_SUBDEV(IBUS, 0xea),
+ .ofuncs = &(struct nouveau_ofuncs) {
+ .ctor = nvea_ibus_ctor,
+ .dtor = _nouveau_ibus_dtor,
+ .init = nvea_ibus_init,
+ .fini = _nouveau_ibus_fini,
+ },
+};
-...
2014 Mar 24
0
[PATCH 06/12] drm/nouveau/ibus: add GK20A support
...nouveau_object *engine,
+ struct nouveau_oclass *oclass, void *data, u32 size,
+ struct nouveau_object **pobject)
+{
+ struct nvea_ibus_priv *priv;
+ int ret;
+
+ ret = nouveau_ibus_create(parent, engine, oclass, &priv);
+ *pobject = nv_object(priv);
+ if (ret)
+ return ret;
+
+ nv_subdev(priv)->intr = nvea_ibus_intr;
+ return 0;
+}
+
+struct nouveau_oclass
+nvea_ibus_oclass = {
+ .handle = NV_SUBDEV(IBUS, 0xea),
+ .ofuncs = &(struct nouveau_ofuncs) {
+ .ctor = nvea_ibus_ctor,
+ .dtor = _nouveau_ibus_dtor,
+ .init = nvea_ibus_init,
+ .fini = _nouveau_ibus_fini,
+ },
+};
-...
2012 May 20
16
nouveau_subdev & misc patches
Hello all, this series includes a wide range of fixes - from a few
month's old one-liners from Andreas Heider regarding vga_switcheroo, via a
null pointer dereference and double memory allocation, to a buffer overflow.
Please review and comment
---
drivers/gpu/drm/nouveau/nouveau_acpi.c | 3 ++-
drivers/gpu/drm/nouveau/nouveau_device.c | 26 +++++++++++++++-----------
2013 Nov 09
2
[PATCH] drm/nouveau/clk: Initial implementation for reclocking NVAA/NVAC
Reclocking of NVAA/NVAC is substantially different from NV50+, enough to justify a separate clock implementation. This code is a forward-port of reclocking code that has been sitting in a branch for a while, and has been tested on my NVAC. Traces show no significant reasons why this shouldn't work on NVAA, but testers are always welcome. And since these are IGPs without dedicated RAM to
2013 Feb 05
0
[PATCH] drm/nouveau: fix lockdep splat in display
...struct nouveau_engctx *ectx;
- int ret = -EBUSY;
+ int ret;
/* no context needed for channel objects... */
if (nv_mclass(parent) != NV_DEVICE_CLASS) {
@@ -707,14 +706,10 @@ nv50_disp_data_ctor(struct nouveau_object *parent,
}
/* allocate display hardware to client */
- mutex_lock(&nv_subdev(priv)->mutex);
- if (list_empty(&nv_engine(priv)->contexts)) {
- ret = nouveau_engctx_create(parent, engine, oclass, NULL,
- 0x10000, 0x10000,
- NVOBJ_FLAG_HEAP, &ectx);
- *pobject = nv_object(ectx);
- }
- mutex_unlock(&nv_subdev(priv)->mutex);
+ ret = nouveau...
2013 Jun 23
0
[PATCH v2] nouveau: Load firmware for BSP/VP engines on NV84-NV96, NVA0
...enable,
+ const char *iname, const char *fname,
+ int length, void **pobject)
+{
+ struct nouveau_xtensa *xtensa;
+ int ret;
+
+ ret = nouveau_engine_create_(parent, engine, oclass, enable, iname,
+ fname, length, pobject);
+ xtensa = *pobject;
+ if (ret)
+ return ret;
+
+ nv_subdev(xtensa)->intr = _nouveau_xtensa_intr;
+
+ xtensa->addr = addr;
+
+ return 0;
+}
+
+int
+_nouveau_xtensa_init(struct nouveau_object *object)
+{
+ struct nouveau_device *device = nv_device(object);
+ struct nouveau_xtensa *xtensa = (void *)object;
+ const struct firmware *fw;
+ int i, ret;
+ u3...
2013 Aug 31
2
[PATCH] drm/nouveau/therm: ack any pending IRQ at init v2
...= (void *)object;
+ int ret;
+
+ ret = nouveau_therm_init(&priv->base.base);
+ if (ret)
+ return ret;
+
+ /* ACK ptherm IRQs */
+ nv_wr32(object, 0x20100, 0xffffffff);
+ nv_wr32(object, 0x1100, 0x10000); /* PBUS */
+
+ return 0;
+}
+
struct nouveau_oclass
nv84_therm_oclass = {
.handle = NV_SUBDEV(THERM, 0x84),
.ofuncs = &(struct nouveau_ofuncs) {
.ctor = nv84_therm_ctor,
.dtor = _nouveau_therm_dtor,
- .init = _nouveau_therm_init,
+ .init = nv84_therm_init,
.fini = _nouveau_therm_fini,
},
};
diff --git a/drivers/gpu/drm/nouveau/core/subdev/therm/nva3.c b/drivers/gpu/drm/n...
2013 Aug 07
1
[PATCH] drm/nouveau: fix ltcg memory corruptions
...00000); /* INTR_EN &= ~0x10 */
+
+ nv_wr32(priv, 0x17e8d8, priv->part_nr);
+ if (nv_device(pfb)->card_type >= NV_E0)
+ nv_wr32(priv, 0x17e000, priv->part_nr);
+
+ nv_wr32(priv, 0x17e8d4, priv->tag_base);
+
+ return 0;
+}
+
struct nouveau_oclass
nvc0_ltcg_oclass = {
.handle = NV_SUBDEV(LTCG, 0xc0),
.ofuncs = &(struct nouveau_ofuncs) {
.ctor = nvc0_ltcg_ctor,
.dtor = nvc0_ltcg_dtor,
- .init = _nouveau_ltcg_init,
+ .init = nvc0_ltcg_init,
.fini = _nouveau_ltcg_fini,
},
};
2014 Feb 02
1
[RFC 13/16] drm/nouveau/ibus: add GK20A support
...uct nouveau_object **pobject)
> +{
> + struct nvea_ibus_priv *priv;
> + int ret;
> +
> + ret = nouveau_ibus_create(parent, engine, oclass, &priv);
> + *pobject = nv_object(priv);
> + if (ret)
> + return ret;
> +
> + nv_subdev(priv)->intr = nvea_ibus_intr;
> + return 0;
> +}
> +
> +struct nouveau_oclass
> +nvea_ibus_oclass = {
> + .handle = NV_SUBDEV(IBUS, 0xea),
> + .ofuncs = &(struct nouveau_ofuncs) {
> + .ctor = nvea_ibus_ctor,
> + .dtor =...