search for: nvkm_i2c_pad_acquir

Displaying 8 results from an estimated 8 matches for "nvkm_i2c_pad_acquir".

Did you mean: nvkm_i2c_pad_acquire
2019 Apr 09
2
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...rs/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c @@ -105,9 +105,15 @@ nvkm_i2c_aux_acquire(struct nvkm_i2c_aux *aux) { struct nvkm_i2c_pad *pad = aux->pad; int ret; + AUX_TRACE(aux, "acquire"); mutex_lock(&aux->mutex); - ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); + + if (aux->enabled) + ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); + else + ret = -EIO; + if (ret) mutex_unlock(&aux->mutex); return ret; @@ -145,6 +151,24 @@ nvkm_i2c_aux_del(struct nvkm_i2c_aux **paux) } } +void +nvkm_i2c_aux_init(struct nv...
2019 Apr 11
1
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...,9 +105,15 @@ nvkm_i2c_aux_acquire(struct nvkm_i2c_aux *aux) > > { > > struct nvkm_i2c_pad *pad = aux->pad; > > int ret; > > + > > AUX_TRACE(aux, "acquire"); > > mutex_lock(&aux->mutex); > > - ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); > > + > > + if (aux->enabled) > > + ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); > > + else > > + ret = -EIO; > > + > > if (ret) > > mutex_unlock(&au...
2019 Apr 10
0
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
.../nvkm/subdev/i2c/aux.c > @@ -105,9 +105,15 @@ nvkm_i2c_aux_acquire(struct nvkm_i2c_aux *aux) > { > struct nvkm_i2c_pad *pad = aux->pad; > int ret; > + > AUX_TRACE(aux, "acquire"); > mutex_lock(&aux->mutex); > - ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); > + > + if (aux->enabled) > + ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_AUX); > + else > + ret = -EIO; > + > if (ret) > mutex_unlock(&aux->mutex); > return ret; &...
2018 Jul 17
2
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...->dev; > int ret; > + > BUS_TRACE(bus, "acquire"); > + > + ret = pm_runtime_get_sync(dev); > + if (ret < 0 && ret != -EACCES) > + return ret; > + > mutex_lock(&bus->mutex); > ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_I2C); > - if (ret) > + if (ret) { > mutex_unlock(&bus->mutex); > + pm_runtime_put_autosuspend(dev); > + } > return ret; > } > > -- > 2.17.1 > > ____________________________________...
2019 Apr 03
0
[PATCH] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...mp;bus->mutex); + bus->enabled = false; + mutex_unlock(&bus->mutex); } void @@ -126,9 +139,15 @@ nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *bus) { struct nvkm_i2c_pad *pad = bus->pad; int ret; + BUS_TRACE(bus, "acquire"); mutex_lock(&bus->mutex); - ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_I2C); + + if (bus->enabled) + ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_I2C); + else + ret = -EIO; + if (ret) mutex_unlock(&bus->mutex); return ret; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.h b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.h in...
2018 Jul 16
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...) { struct nvkm_i2c_pad *pad = bus->pad; + struct device *dev = pad->i2c->subdev.device->dev; int ret; + BUS_TRACE(bus, "acquire"); + + ret = pm_runtime_get_sync(dev); + if (ret < 0 && ret != -EACCES) + return ret; + mutex_lock(&bus->mutex); ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_I2C); - if (ret) + if (ret) { mutex_unlock(&bus->mutex); + pm_runtime_put_autosuspend(dev); + } return ret; } -- 2.17.1
2018 Jul 17
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...gt; > BUS_TRACE(bus, "acquire"); > > + > > + ret = pm_runtime_get_sync(dev); > > + if (ret < 0 && ret != -EACCES) > > + return ret; > > + > > mutex_lock(&bus->mutex); > > ret = nvkm_i2c_pad_acquire(pad, NVKM_I2C_PAD_I2C); > > - if (ret) > > + if (ret) { > > mutex_unlock(&bus->mutex); > > + pm_runtime_put_autosuspend(dev); > > + } > > return ret; > > } > > > > -- > > 2.1...
2018 Jul 16
9
[PATCH 0/5] drm/nouveau: Fix a lot of nasty RPM bugs and deadlocks
This fixes quite a number of runtime PM bugs I found that have been causing some pretty nasty issues such as: - Deadlocking on boot - Connector probing potentially not working while the GPU is in runtime suspend - i2c char dev not working while the GPU is in runtime suspend - aux char dev not working while the GPU is in runtime suspend There's definitely more parts of nouveau that need