search for: nvkm_i2c_bus

Displaying 20 results from an estimated 25 matches for "nvkm_i2c_bus".

Did you mean: nvkm_i2c_aux
2019 Apr 09
2
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...ons(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h index eef54e9b5d77..7957eafa5f0e 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h @@ -38,6 +38,7 @@ struct nvkm_i2c_bus { struct mutex mutex; struct list_head head; struct i2c_adapter i2c; + u8 enabled; }; int nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *); @@ -57,6 +58,7 @@ struct nvkm_i2c_aux { struct mutex mutex; struct list_head head; struct i2c_adapter i2c; + u8 enabled; u32 intr; }; diff --gi...
2019 Apr 11
1
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...de/nvkm/subdev/i2c.h > > b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > > index eef54e9b5d77..7957eafa5f0e 100644 > > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > > @@ -38,6 +38,7 @@ struct nvkm_i2c_bus { > > struct mutex mutex; > > struct list_head head; > > struct i2c_adapter i2c; > > + u8 enabled; > > }; > > > > int nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *); > > @@ -57,6 +58,7 @@ struct nvkm_i2c_aux { > >...
2019 Apr 03
0
[PATCH] drm/nouveau/i2c: Disable i2c bus access after ->fini()
...ion(-) diff --git a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h index eef54e9b5d77..7c45056c47dd 100644 --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h @@ -36,6 +36,7 @@ struct nvkm_i2c_bus { int id; struct mutex mutex; + u8 enabled; struct list_head head; struct i2c_adapter i2c; }; diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c b/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/base.c index 4f197b15acf6..54d9882f9931 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c...
2019 Apr 10
0
[PATCH v2] drm/nouveau/i2c: Disable i2c bus access after ->fini()
.../drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > index eef54e9b5d77..7957eafa5f0e 100644 > --- a/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > +++ b/drivers/gpu/drm/nouveau/include/nvkm/subdev/i2c.h > @@ -38,6 +38,7 @@ struct nvkm_i2c_bus { > struct mutex mutex; > struct list_head head; > struct i2c_adapter i2c; > + u8 enabled; > }; > > int nvkm_i2c_bus_acquire(struct nvkm_i2c_bus *); > @@ -57,6 +58,7 @@ struct nvkm_i2c_aux { > struct mutex mutex; > struct...
2018 Jul 17
2
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...; > diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/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_acquir...
2018 Jul 16
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...ertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/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 = bu...
2018 Jul 17
0
[PATCH 4/5] drm/nouveau: Grab RPM ref when i2c bus is in use
...drivers/gpu/drm/nouveau/nvkm/subdev/i2c/bus.c b/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); > > } > > >...
2016 Mar 25
0
[PATCH 3/4] iccsense: split sensor into own struct
..._iccsense_sensor* +nvkm_iccsense_create_sensor(struct nvkm_iccsense *iccsense, u8 id) +{ + + struct nvkm_subdev *subdev = &iccsense->subdev; + struct nvkm_bios *bios = subdev->device->bios; + struct nvkm_i2c *i2c = subdev->device->i2c; + struct nvbios_extdev_func extdev; + struct nvkm_i2c_bus *i2c_bus; + struct nvkm_iccsense_sensor *sensor; + u8 addr; + + if (!i2c || !bios || nvbios_extdev_parse(bios, id, &extdev)) + return NULL; + + if (extdev.type == 0xff) + return NULL; + + if (extdev.type != NVBIOS_EXTDEV_INA209 && + extdev.type != NVBIOS_EXTDEV_INA219 && +...
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
2016 Mar 25
7
[PATCH 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does drm/nouveau/include/nvkm/subdev/iccsense.h | 6 +- drm/nouveau/nouveau_hwmon.c
2020 Mar 26
0
[PATCH 5/6] drm/nouveau/therm: convert to use i2c_new_client_device()
...--git a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c index 03b355dabab3..abf3eda683f0 100644 --- a/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c +++ b/drivers/gpu/drm/nouveau/nvkm/subdev/therm/ic.c @@ -36,8 +36,8 @@ probe_monitoring_device(struct nvkm_i2c_bus *bus, request_module("%s%s", I2C_MODULE_PREFIX, info->type); - client = i2c_new_device(&bus->i2c, info); - if (!client) + client = i2c_new_client_device(&bus->i2c, info); + if (IS_ERR(client)) return false; if (!client->dev.driver || -- 2.20.1
2019 Jun 26
0
[PATCH] drm/nouveau: Enable i2c pads & busses during preinit
.../gpu/drm/nouveau/nvkm/subdev/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) +...
2020 Mar 26
2
[PATCH 0/6] gpu: convert to use new I2C API
We are deprecating calls which return NULL in favor of new variants which return an ERR_PTR. Only build tested. Wolfram Sang (6): drm/amdgpu: convert to use i2c_new_client_device() drm/gma500: convert to use i2c_new_client_device() drm/i2c/sil164: convert to use i2c_new_client_device() drm/i2c/tda998x: convert to use i2c_new_client_device() drm/nouveau/therm: convert to use
2020 Feb 12
0
[PATCH 1/4] drm/nouveau/kms/nv50-: Probe SOR caps for DP interlacing support
...)) { + ret = nv50_mstm_new(nv_encoder, + &nv_connector->aux, + 16, + connector->base.id, + &nv_encoder->dp.mstm); + if (ret) + return ret; + } + nv_encoder->dp.caps.interlace = !!(caps & 0x04000000); } } else { struct nvkm_i2c_bus *bus = diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 9a9a7f5003d3..97a84daf8eab 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c @@ -509,7 +509,11 @@ nouveau_connector_set_encode...
2016 Mar 28
4
[PATCH v2 0/4] Configure Power Sensors
The power sensors can be configured to sample the readout values over time. Nvidia does this too, so nouveau should probably do that too. v2: use list_del and rework an error message Karol Herbst (4): iccsense: remove read function iccsense: convert to linked list iccsense: split sensor into own struct iccsense: configure sensors like nvidia does
2018 Sep 13
4
[PATCH 1/2] drm/nouveau: Disable atomic support on a per-device basis
From: Ville Syrjälä <ville.syrjala at linux.intel.com> We now have per-device driver_features, so let's use that to disable atomic only for pre-nv50. Cc: Ben Skeggs <bskeggs at redhat.com> Cc: Lyude Paul <lyude at redhat.com> Cc: nouveau at lists.freedesktop.org Cc: Daniel Vetter <daniel.vetter at ffwll.ch> Reviewed-by: Daniel Vetter <daniel.vetter at ffwll.ch>
2016 Feb 20
0
[PATCH v4 3/6] iccsense: implement for ina209, ina219 and ina3221
...f(*iccsense->rails) * stbl.nr_entry, + GFP_KERNEL); + if (!iccsense->rails) + return -ENOMEM; + + for (i = 0; i < stbl.nr_entry; ++i) { + struct pwr_rail_t *r = &stbl.rail[i]; + struct nvbios_extdev_func extdev; + struct nvkm_iccsense_rail *rail; + struct nvkm_i2c_bus *i2c_bus; + + if (!r->mode) + continue; + + if (nvbios_extdev_parse(bios, r->extdev_id, &extdev)) + continue; + + if (extdev.bus) + i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_SEC); + else + i2c_bus = nvkm_i2c_bus_find(i2c, NVKM_I2C_BUS_PRI); + if (!i2c_bus) + continue; +...
2016 Feb 17
0
[PATCH 1/2] power sensor support
...TWARE OR THE USE OR + * OTHER DEALINGS IN THE SOFTWARE. + * + * Authors: Martin Peres + */ +#include "priv.h" + +#include <subdev/i2c.h> +#include <subdev/bios.h> +#include <subdev/bios/iccsense.h> + +struct iccsense_ina3221_priv { + struct nvkm_iccsense base; + + struct nvkm_i2c_bus *i2c_bus; + u8 rails_mohm[3]; +}; + +static int +ina3221_poll_power_lane(struct i2c_adapter *adap, uint8_t id, uint8_t shunt) +{ + int vbus, vshunt; + + if (id > 2) + return -EINVAL; + + if (shunt == 0) + return 0; + + vshunt = nv_rd16i2cr(adap, 0x40, 1 + (id * 2)); + vbus = nv_rd16i2cr(adap,...
2016 Feb 17
3
[PATCH 0/2] Support for INA3221 power sensor
The INA3221 is usually found on mid and high end kepler+ gpus Marins Patch implements the new iccsense subdev and all needed bits for the INA3221 power sensor. My Patch implements the hwmon power1 interface to expose the current power consumption through hwmon (and can be read out via sysfs or the sensors tool) Please test these patches for Fermi+ GPUs, that nothing gets messed up and works as
2016 Feb 20
12
[PATCH v4 0/6] Suppor for various power sensors on GF100+
This is a complete rework from the first version I sent out. Now the implementation is more centered around the power_rails we find in the SENSE table instead of extdev centered. This makes the implementation a lot easier and straightforward. I've added support for the INA219, INA209 and INA3221 sensors found on multiple Fermi and Kepler cards. The power consumption is also exported via