search for: nvkm_i2c_pad_i2c

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

2018 Jul 17
2
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...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 > > _______________________________________________ > Nouvea...
2019 Apr 09
2
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...gt;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 index bea0dd33961e..46546...
2019 Apr 03
0
[PATCH] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...gt;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 index bea0dd33961e..46546...
2019 Apr 11
1
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
..._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); > >...
2019 Apr 10
0
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...; @@ -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/driver...
2018 Jul 16
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...*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
...(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 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