search for: nouveau_fuse

Displaying 4 results from an estimated 4 matches for "nouveau_fuse".

2014 Aug 24
8
[PATCH 1/3] subdev: add a pfuse subdev
...nd have been initialised. */ + NVDEV_SUBDEV_FUSE, NVDEV_SUBDEV_MXM, NVDEV_SUBDEV_MC, NVDEV_SUBDEV_BUS, diff --git a/nvkm/include/subdev/fuse.h b/nvkm/include/subdev/fuse.h new file mode 100644 index 0000000..2b1ddb2 --- /dev/null +++ b/nvkm/include/subdev/fuse.h @@ -0,0 +1,30 @@ +#ifndef __NOUVEAU_FUSE_H__ +#define __NOUVEAU_FUSE_H__ + +#include <core/subdev.h> +#include <core/device.h> + +struct nouveau_fuse { + struct nouveau_subdev base; +}; + +static inline struct nouveau_fuse * +nouveau_fuse(void *obj) +{ + return (void *)nv_device(obj)->subdev[NVDEV_SUBDEV_FUSE]; +} + +#defin...
2014 Aug 24
0
[PATCH 1/3] subdev: add a pfuse subdev
Hi Martin, I'm not very familiar with the function naming scheme but shouldn't nouveau_fuse_rd32 use the same prefix as xxxx_fuse_ctor instead of nouveau? Christian Le 24/08/2014 23:15, Martin Peres a ?crit : > We will use this subdev to disable temperature reading on cards that did not > get a sensor calibration in the factory. > > Signed-off-by: Martin Peres <martin.per...
2014 Aug 24
0
[PATCH 1/3] subdev: add a pfuse subdev
...ABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > + * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > + * OTHER DEALINGS IN THE SOFTWARE. > + * > + * Authors: Martin Peres > + */ > + > +#include <subdev/fuse.h> > + > +int > +_nouveau_fuse_init(struct nouveau_object *object) > +{ > + struct nouveau_fuse *fuse = (void *)object; > + int ret; > + > + ret = nouveau_subdev_init(&fuse->base); > + if (ret) > + return ret; > + If you want you can drop the check the extra variable. > + return 0; > +} &gt...
2014 Aug 24
0
[PATCH 3/3] therm/nv84+: do not expose non-calibrated internal temp sensor
...-) diff --git a/nvkm/subdev/therm/nv84.c b/nvkm/subdev/therm/nv84.c index 38b16d9..14e2e09 100644 --- a/nvkm/subdev/therm/nv84.c +++ b/nvkm/subdev/therm/nv84.c @@ -33,7 +33,12 @@ struct nv84_therm_priv { int nv84_temp_get(struct nouveau_therm *therm) { - return nv_rd32(therm, 0x20400); + struct nouveau_fuse *fuse = nouveau_fuse(therm); + + if (nv_ro32(fuse, 0x1a8) == 1) + return nv_rd32(therm, 0x20400); + else + return -ENODEV; } void -- 2.0.0