int nouveau_gpio_init(struct nouveau_gpio *gpio) { int ret = nouveau_subdev_init(&gpio->base); if (ret == 0 && gpio->reset) { if (dmi_check_system(gpio_reset_ids)) gpio->reset(gpio, DCB_GPIO_UNUSED); } return ret; }
int _nouveau_mc_init(struct nouveau_object *object) { struct nouveau_mc *pmc = (void *)object; int ret = nouveau_subdev_init(&pmc->base); if (ret) return ret; nv_wr32(pmc, 0x000140, 0x00000001); return 0; }
int nouveau_fb_init(struct nouveau_fb *pfb) { int ret, i; ret = nouveau_subdev_init(&pfb->base); if (ret) return ret; for (i = 0; i < pfb->tile.regions; i++) pfb->tile.prog(pfb, i, &pfb->tile.region[i]); return 0; }
int nouveau_therm_init(struct nouveau_object *object) { struct nouveau_therm *therm = (void *)object; struct nouveau_therm_priv *priv = (void *)therm; int ret; ret = nouveau_subdev_init(&therm->base); if (ret) return ret; if (priv->fan.percent >= 0) therm->fan_set(therm, priv->fan.percent); return 0; }
int _nvkm_ltc_init(struct nouveau_object *object) { const struct nvkm_ltc_impl *impl = (void *)nv_oclass(object); struct nvkm_ltc_priv *priv = (void *)object; int ret, i; ret = nouveau_subdev_init(&priv->base.base); if (ret) return ret; for (i = priv->base.zbc_min; i <= priv->base.zbc_max; i++) { impl->zbc_clear_color(priv, i, priv->zbc_color[i]); impl->zbc_clear_depth(priv, i, priv->zbc_depth[i]); } return 0; }
int _nouveau_devinit_init(struct nouveau_object *object) { struct nouveau_devinit_impl *impl = (void *)object->oclass; struct nouveau_devinit *devinit = (void *)object; int ret; ret = nouveau_subdev_init(&devinit->base); if (ret) return ret; ret = nvbios_init(&devinit->base, devinit->post); if (ret) return ret; if (impl->disable) nv_device(devinit)->disable_mask |= impl->disable(devinit); return 0; }
int _nouveau_fb_init(struct nouveau_object *object) { struct nouveau_fb *pfb = (void *)object; int ret, i; ret = nouveau_subdev_init(&pfb->base); if (ret) return ret; ret = nv_ofuncs(pfb->ram)->init(nv_object(pfb->ram)); if (ret) return ret; for (i = 0; i < pfb->tile.regions; i++) pfb->tile.prog(pfb, i, &pfb->tile.region[i]); return 0; }
int _nouveau_volt_init(struct nouveau_object *object) { struct nouveau_volt *volt = (void *)object; int ret; ret = nouveau_subdev_init(&volt->base); if (ret) return ret; ret = volt->get(volt); if (ret < 0) { if (ret != -ENODEV) nv_debug(volt, "current voltage unknown\n"); return 0; } nv_info(volt, "GPU voltage: %duv\n", ret); return 0; }
int _nouveau_therm_init(struct nouveau_object *object) { struct nouveau_therm *therm = (void *)object; struct nouveau_therm_priv *priv = (void *)therm; int ret; ret = nouveau_subdev_init(&therm->base); if (ret) return ret; if (priv->suspend >= 0) { /* restore the pwm value only when on manual or auto mode */ if (priv->suspend > 0) nouveau_therm_fan_set(therm, true, priv->fan->percent); nouveau_therm_fan_mode(therm, priv->suspend); } nouveau_therm_sensor_init(therm); nouveau_therm_fan_init(therm); return 0; }
int _nouveau_subdev_init(struct nouveau_object *object) { return nouveau_subdev_init(nv_subdev(object)); }