Displaying 10 results from an estimated 10 matches for "nvkm_i2c_pad".
2019 Apr 09
2
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...uveau/nvkm/subdev/i2c/aux.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
index 4c1f547da463..b4e7404fe660 100644
--- a/drivers/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-&...
2019 Apr 11
1
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...i2c/aux.c
> > index 4c1f547da463..b4e7404fe660 100644
> > --- a/drivers/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)
> > +...
2019 Apr 10
0
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...s/gpu/drm/nouveau/nvkm/subdev/i2c/aux.c
> index 4c1f547da463..b4e7404fe660 100644
> --- a/drivers/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(pa...
2018 Jul 17
2
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...s.c
> index 807a2b67bd64..1de48c990b80 100644
> --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
> +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
> @@ -119,18 +119,28 @@ nvkm_i2c_bus_release(struct nvkm_i2c_bus *bus)
> BUS_TRACE(bus, "release");
> nvkm_i2c_pad_release(pad);
> mutex_unlock(&bus->mutex);
> + pm_runtime_put_autosuspend(pad->i2c->subdev.device->dev);
> }
>
> int
> nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *bus)
> {
> struct nvkm_i2c_pad *pad = bus->pad;
> + struct d...
2019 Apr 03
0
[PATCH] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...vkm/subdev/i2c/base.c
index 4f197b15acf6..54d9882f9931 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
@@ -160,8 +160,13 @@ nvkm_i2c_fini(struct nvkm_subdev *subdev, bool suspend)
{
struct nvkm_i2c *i2c = nvkm_i2c(subdev);
struct nvkm_i2c_pad *pad;
+ struct nvkm_i2c_bus *bus;
u32 mask;
+ list_for_each_entry(bus, &i2c->bus, head) {
+ nvkm_i2c_bus_fini(bus);
+ }
+
if ((mask = (1 << i2c->func->aux) - 1), i2c->func->aux_stat) {
i2c->func->aux_mask(i2c, NVKM_I2C_ANY, mask, 0);
i2c->func->aux_...
2018 Jul 16
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
index 807a2b67bd64..1de48c990b80 100644
--- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
@@ -119,18 +119,28 @@ nvkm_i2c_bus_release(struct nvkm_i2c_bus *bus)
BUS_TRACE(bus, "release");
nvkm_i2c_pad_release(pad);
mutex_unlock(&bus->mutex);
+ pm_runtime_put_autosuspend(pad->i2c->subdev.device->dev);
}
int
nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *bus)
{
struct nvkm_i2c_pad *pad = bus->pad;
+ struct device *dev = pad->i2c->subdev.device->dev;
int ret;
+...
2018 Jul 17
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...64..1de48c990b80 100644
> > --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
> > +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c
> > @@ -119,18 +119,28 @@ nvkm_i2c_bus_release(struct nvkm_i2c_bus *bus)
> > BUS_TRACE(bus, "release");
> > nvkm_i2c_pad_release(pad);
> > mutex_unlock(&bus->mutex);
> > + pm_runtime_put_autosuspend(pad->i2c->subdev.device->dev);
> > }
> >
> > int
> > nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *bus)
> > {
> > struct nvkm_i2c_pad *...
2019 Jun 26
0
[PATCH] drm/nouveau: Enable i2c pads & busses during preinit
.../i2c/base.c
+++ b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c
@@ -184,6 +184,25 @@ nvkm_i2c_fini(struct nvkm_subdev *subdev, bool suspend)
return 0;
}
+static int
+nvkm_i2c_preinit(struct nvkm_subdev *subdev)
+{
+ struct nvkm_i2c *i2c = nvkm_i2c(subdev);
+ struct nvkm_i2c_bus *bus;
+ struct nvkm_i2c_pad *pad;
+
+ /*
+ * We init our i2c busses as early as possible, since they may be
+ * needed by the vbios init scripts on some cards
+ */
+ list_for_each_entry(pad, &i2c->pad, head)
+ nvkm_i2c_pad_init(pad);
+ list_for_each_entry(bus, &i2c->bus, head)
+ nvkm_i2c_bus_init(bus);
+
+...
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
2019 Sep 23
8
[PATCH 0/8] Add workaround for fixing runpm
Changes since last sent:
* add a patch to set the device into DRM_SWITCH_POWER_CHANGING state
(can be dropped actually, I thought I was needing it, came up with a
different approach and forgot to delete it, doesn't hurt though)
* expose information about runtime suspending to nvkm so that we can run
the pcie workaround only on runtime suspend
Karol Herbst (8):
pci: disable ASPM