Searched refs:subdev (Results 1 - 200 of 631) sorted by relevance

1234

/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/device/
H A Dpriv.h5 #include <subdev/bar.h>
6 #include <subdev/bios.h>
7 #include <subdev/bus.h>
8 #include <subdev/clk.h>
9 #include <subdev/devinit.h>
10 #include <subdev/fb.h>
11 #include <subdev/fuse.h>
12 #include <subdev/gpio.h>
13 #include <subdev/i2c.h>
14 #include <subdev/ibus.h>
15 #include <subdev/instmem.h>
16 #include <subdev/ltc.h>
17 #include <subdev/mc.h>
18 #include <subdev/mmu.h>
19 #include <subdev/mxm.h>
20 #include <subdev/pci.h>
21 #include <subdev/pmu.h>
22 #include <subdev/therm.h>
23 #include <subdev/timer.h>
24 #include <subdev/volt.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/core/
H A Dsubdev.c24 #include <core/subdev.h>
76 nvkm_subdev_intr(struct nvkm_subdev *subdev) nvkm_subdev_intr() argument
78 if (subdev->func->intr) nvkm_subdev_intr()
79 subdev->func->intr(subdev); nvkm_subdev_intr()
83 nvkm_subdev_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_subdev_fini() argument
85 struct nvkm_device *device = subdev->device; nvkm_subdev_fini()
87 u32 pmc_enable = subdev->pmc_enable; nvkm_subdev_fini()
90 nvkm_trace(subdev, "%s running...\n", action); nvkm_subdev_fini()
93 if (subdev->func->fini) { nvkm_subdev_fini()
94 int ret = subdev->func->fini(subdev, suspend); nvkm_subdev_fini()
96 nvkm_error(subdev, "%s failed, %d\n", action, ret); nvkm_subdev_fini()
109 nvkm_trace(subdev, "%s completed in %lldus\n", action, time); nvkm_subdev_fini()
114 nvkm_subdev_preinit(struct nvkm_subdev *subdev) nvkm_subdev_preinit() argument
118 nvkm_trace(subdev, "preinit running...\n"); nvkm_subdev_preinit()
121 if (subdev->func->preinit) { nvkm_subdev_preinit()
122 int ret = subdev->func->preinit(subdev); nvkm_subdev_preinit()
124 nvkm_error(subdev, "preinit failed, %d\n", ret); nvkm_subdev_preinit()
130 nvkm_trace(subdev, "preinit completed in %lldus\n", time); nvkm_subdev_preinit()
135 nvkm_subdev_init(struct nvkm_subdev *subdev) nvkm_subdev_init() argument
140 nvkm_trace(subdev, "init running...\n"); nvkm_subdev_init()
143 if (subdev->func->oneinit && !subdev->oneinit) { nvkm_subdev_init()
145 nvkm_trace(subdev, "one-time init running...\n"); nvkm_subdev_init()
147 ret = subdev->func->oneinit(subdev); nvkm_subdev_init()
149 nvkm_error(subdev, "one-time init failed, %d\n", ret); nvkm_subdev_init()
153 subdev->oneinit = true; nvkm_subdev_init()
155 nvkm_trace(subdev, "one-time init completed in %lldus\n", time); nvkm_subdev_init()
158 if (subdev->func->init) { nvkm_subdev_init()
159 ret = subdev->func->init(subdev); nvkm_subdev_init()
161 nvkm_error(subdev, "init failed, %d\n", ret); nvkm_subdev_init()
167 nvkm_trace(subdev, "init completed in %lldus\n", time); nvkm_subdev_init()
174 struct nvkm_subdev *subdev = *psubdev; nvkm_subdev_del() local
177 if (subdev && !WARN_ON(!subdev->func)) { nvkm_subdev_del()
178 nvkm_trace(subdev, "destroy running...\n"); nvkm_subdev_del()
180 if (subdev->func->dtor) nvkm_subdev_del()
181 *psubdev = subdev->func->dtor(subdev); nvkm_subdev_del()
183 nvkm_trace(subdev, "destroy completed in %lldus\n", time); nvkm_subdev_del()
192 struct nvkm_subdev *subdev) nvkm_subdev_ctor()
195 subdev->func = func; nvkm_subdev_ctor()
196 subdev->device = device; nvkm_subdev_ctor()
197 subdev->index = index; nvkm_subdev_ctor()
198 subdev->pmc_enable = pmc_enable; nvkm_subdev_ctor()
200 __mutex_init(&subdev->mutex, name, &nvkm_subdev_lock_class[index]); nvkm_subdev_ctor()
201 subdev->debug = nvkm_dbgopt(device->dbgopt, name); nvkm_subdev_ctor()
190 nvkm_subdev_ctor(const struct nvkm_subdev_func *func, struct nvkm_device *device, int index, u32 pmc_enable, struct nvkm_subdev *subdev) nvkm_subdev_ctor() argument
H A Dengine.c28 #include <subdev/fb.h>
35 mutex_lock(&engine->subdev.mutex); nvkm_engine_unref()
37 nvkm_subdev_fini(&engine->subdev, false); nvkm_engine_unref()
38 mutex_unlock(&engine->subdev.mutex); nvkm_engine_unref()
47 mutex_lock(&engine->subdev.mutex); nvkm_engine_ref()
49 int ret = nvkm_subdev_init(&engine->subdev); nvkm_engine_ref()
52 mutex_unlock(&engine->subdev.mutex); nvkm_engine_ref()
56 mutex_unlock(&engine->subdev.mutex); nvkm_engine_ref()
64 struct nvkm_fb *fb = engine->subdev.device->fb; nvkm_engine_tile()
70 nvkm_engine_intr(struct nvkm_subdev *subdev) nvkm_engine_intr() argument
72 struct nvkm_engine *engine = nvkm_engine(subdev); nvkm_engine_intr()
78 nvkm_engine_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_engine_fini() argument
80 struct nvkm_engine *engine = nvkm_engine(subdev); nvkm_engine_fini()
87 nvkm_engine_init(struct nvkm_subdev *subdev) nvkm_engine_init() argument
89 struct nvkm_engine *engine = nvkm_engine(subdev); nvkm_engine_init()
90 struct nvkm_fb *fb = subdev->device->fb; nvkm_engine_init()
95 nvkm_trace(subdev, "init skipped, engine has no users\n"); nvkm_engine_init()
99 if (engine->func->oneinit && !engine->subdev.oneinit) { nvkm_engine_init()
100 nvkm_trace(subdev, "one-time init running...\n"); nvkm_engine_init()
104 nvkm_trace(subdev, "one-time init failed, %d\n", ret); nvkm_engine_init()
108 engine->subdev.oneinit = true; nvkm_engine_init()
110 nvkm_trace(subdev, "one-time init completed in %lldus\n", time); nvkm_engine_init()
122 nvkm_engine_dtor(struct nvkm_subdev *subdev) nvkm_engine_dtor() argument
124 struct nvkm_engine *engine = nvkm_engine(subdev); nvkm_engine_dtor()
144 pmc_enable, &engine->subdev); nvkm_engine_ctor()
148 nvkm_debug(&engine->subdev, "disabled\n"); nvkm_engine_ctor()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mxm/
H A Dpriv.h3 #define nvkm_mxm(p) container_of((p), struct nvkm_mxm, subdev)
4 #include <subdev/mxm.h>
9 struct nvkm_subdev subdev; member in struct:nvkm_mxm
H A Dbase.c27 #include <subdev/bios.h>
28 #include <subdev/bios/mxm.h>
29 #include <subdev/i2c.h>
46 struct nvkm_device *device = mxm->subdev.device; mxm_shadow_rom()
82 struct nvkm_subdev *subdev = &mxm->subdev; mxm_shadow_dsm() local
83 struct nvkm_device *device = subdev->device; mxm_shadow_dsm()
110 nvkm_debug(subdev, "DSM MXMS failed\n"); mxm_shadow_dsm()
118 nvkm_debug(subdev, "DSM MXMS returned 0x%llx\n", mxm_shadow_dsm()
134 struct nvkm_subdev *subdev = &mxm->subdev; wmi_wmmx_mxmi() local
143 nvkm_debug(subdev, "WMMX MXMI returned %d\n", status); wmi_wmmx_mxmi()
150 nvkm_debug(subdev, "WMMX MXMI version %d.%d\n", wmi_wmmx_mxmi()
154 nvkm_debug(subdev, "WMMX MXMI returned non-integer\n"); wmi_wmmx_mxmi()
164 struct nvkm_subdev *subdev = &mxm->subdev; mxm_shadow_wmi() local
172 nvkm_debug(subdev, "WMMX GUID not found\n"); mxm_shadow_wmi()
184 nvkm_debug(subdev, "WMMX MXMS returned %d\n", status); mxm_shadow_wmi()
218 nvkm_debug(&mxm->subdev, "checking %s\n", shadow->name); mxm_shadow()
244 nvkm_subdev_ctor(&nvkm_mxm, device, index, 0, &mxm->subdev); nvkm_mxm_new_()
248 nvkm_debug(&mxm->subdev, "no VBIOS data, nothing to do\n"); nvkm_mxm_new_()
252 nvkm_info(&mxm->subdev, "BIOS version %d.%d\n", ver >> 4, ver & 0x0f); nvkm_mxm_new_()
255 nvkm_warn(&mxm->subdev, "failed to locate valid SIS\n"); nvkm_mxm_new_()
268 nvkm_debug(&mxm->subdev, "MXMS Version %d.%d\n", nvkm_mxm_new_()
H A Dmxms.c50 nvkm_debug(&mxm->subdev, "unknown version %d.%d\n", mxms[4], mxms[5]); mxms_version()
74 nvkm_debug(&mxm->subdev, "checksum invalid\n"); mxms_checksum()
85 nvkm_debug(&mxm->subdev, "signature invalid\n"); mxms_valid()
99 struct nvkm_subdev *subdev = &mxm->subdev; mxms_foreach() local
144 nvkm_debug(subdev, "unknown descriptor type %d\n", type); mxms_foreach()
148 if (mxm->subdev.debug >= NV_DBG_DEBUG && (exec == NULL)) { mxms_foreach()
161 nvkm_debug(subdev, "%4s: %s\n", mxms_desc[type], data); mxms_foreach()
165 nvkm_debug(subdev, " %s\n", data); mxms_foreach()
H A Dnv50.c26 #include <subdev/bios.h>
27 #include <subdev/bios/conn.h>
28 #include <subdev/bios/dcb.h>
29 #include <subdev/bios/mxm.h>
52 struct nvkm_bios *bios = mxm->subdev.device->bios; mxm_match_dcb()
106 nvkm_debug(&mxm->subdev, "disable %d: %08x %08x\n", mxm_dcb_sanitise_entry()
179 struct nvkm_subdev *subdev = &mxm->subdev; mxm_show_unmatched() local
182 nvkm_info(subdev, "unmatched output device %016llx\n", desc); mxm_show_unmatched()
189 struct nvkm_subdev *subdev = &mxm->subdev; mxm_dcb_sanitise() local
190 struct nvkm_bios *bios = subdev->device->bios; mxm_dcb_sanitise()
194 nvkm_debug(subdev, "unsupported DCB version\n"); mxm_dcb_sanitise()
210 *pmxm = &mxm->subdev; nv50_mxm_new()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/ibus/
H A Dpriv.h4 #include <subdev/ibus.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/
H A Dmxm.h3 #include <core/subdev.h>
H A Dfuse.h3 #include <core/subdev.h>
7 struct nvkm_subdev subdev; member in struct:nvkm_fuse
H A Dvolt.h3 #include <core/subdev.h>
7 struct nvkm_subdev subdev; member in struct:nvkm_volt
H A Dgpio.h3 #include <core/subdev.h>
6 #include <subdev/bios.h>
7 #include <subdev/bios/gpio.h>
23 struct nvkm_subdev subdev; member in struct:nvkm_gpio
H A Dibus.h3 #include <core/subdev.h>
H A Dbar.h3 #include <core/subdev.h>
8 struct nvkm_subdev subdev; member in struct:nvkm_bar
H A Dbios.h3 #include <core/subdev.h>
6 struct nvkm_subdev subdev; member in struct:nvkm_bios
H A Dmc.h3 #include <core/subdev.h>
7 struct nvkm_subdev subdev; member in struct:nvkm_mc
H A Dtherm.h3 #include <core/subdev.h>
5 #include <subdev/bios.h>
6 #include <subdev/bios/therm.h>
7 #include <subdev/timer.h>
50 struct nvkm_subdev subdev; member in struct:nvkm_therm
H A Dbus.h3 #include <core/subdev.h>
7 struct nvkm_subdev subdev; member in struct:nvkm_bus
H A Dinstmem.h3 #include <core/subdev.h>
8 struct nvkm_subdev subdev; member in struct:nvkm_instmem
H A Ddevinit.h3 #include <core/subdev.h>
8 struct nvkm_subdev subdev; member in struct:nvkm_devinit
H A Dltc.h3 #include <core/subdev.h>
10 struct nvkm_subdev subdev; member in struct:nvkm_ltc
H A Dpci.h3 #include <core/subdev.h>
7 struct nvkm_subdev subdev; member in struct:nvkm_pci
H A Dfb.h3 #include <core/subdev.h>
5 #include <subdev/mmu.h>
50 struct nvkm_subdev subdev; member in struct:nvkm_fb
91 #include <subdev/bios.h>
92 #include <subdev/bios/ramcfg.h>
/linux-4.4.14/drivers/mtd/
H A Dmtdconcat.c46 struct mtd_info **subdev; member in struct:mtd_concat
51 * including the pointer array subdev points to:
76 struct mtd_info *subdev = concat->subdev[i]; concat_read() local
79 if (from >= subdev->size) { concat_read()
80 /* Not destined for this subdev */ concat_read()
82 from -= subdev->size; concat_read()
85 if (from + len > subdev->size) concat_read()
86 /* First part goes into this subdev */ concat_read()
87 size = subdev->size - from; concat_read()
89 /* Entire transaction goes into this subdev */ concat_read()
92 err = mtd_read(subdev, from, size, &retsize, buf); concat_read()
128 struct mtd_info *subdev = concat->subdev[i]; concat_write() local
131 if (to >= subdev->size) { concat_write()
133 to -= subdev->size; concat_write()
136 if (to + len > subdev->size) concat_write()
137 size = subdev->size - to; concat_write()
141 err = mtd_write(subdev, to, size, &retsize, buf); concat_write()
186 struct mtd_info *subdev = concat->subdev[i]; concat_writev() local
189 if (to >= subdev->size) { concat_writev()
190 to -= subdev->size; concat_writev()
194 size = min_t(uint64_t, total_len, subdev->size - to); concat_writev()
207 err = mtd_writev(subdev, &vecs_copy[entry_low], concat_writev()
242 struct mtd_info *subdev = concat->subdev[i]; concat_read_oob() local
244 if (from >= subdev->size) { concat_read_oob()
245 from -= subdev->size; concat_read_oob()
250 if (from + devops.len > subdev->size) concat_read_oob()
251 devops.len = subdev->size - from; concat_read_oob()
253 err = mtd_read_oob(subdev, from, &devops); concat_read_oob()
302 struct mtd_info *subdev = concat->subdev[i]; concat_write_oob() local
304 if (to >= subdev->size) { concat_write_oob()
305 to -= subdev->size; concat_write_oob()
310 if (to + devops.len > subdev->size) concat_write_oob()
311 devops.len = subdev->size - to; concat_write_oob()
313 err = mtd_write_oob(subdev, to, &devops); concat_write_oob()
378 struct mtd_info *subdev; concat_erase() local
444 subdev = concat->subdev[i]; concat_erase()
445 if (subdev->size <= erase->addr) { concat_erase()
446 erase->addr -= subdev->size; concat_erase()
447 offset += subdev->size; concat_erase()
460 subdev = concat->subdev[i]; /* get current subdevice */ concat_erase()
463 if (erase->addr + length > subdev->size) concat_erase()
464 erase->len = subdev->size - erase->addr; concat_erase()
469 if ((err = concat_dev_erase(subdev, erase))) { concat_erase()
486 offset += subdev->size; concat_erase()
504 struct mtd_info *subdev = concat->subdev[i]; concat_lock() local
507 if (ofs >= subdev->size) { concat_lock()
509 ofs -= subdev->size; concat_lock()
512 if (ofs + len > subdev->size) concat_lock()
513 size = subdev->size - ofs; concat_lock()
517 err = mtd_lock(subdev, ofs, size); concat_lock()
538 struct mtd_info *subdev = concat->subdev[i]; concat_unlock() local
541 if (ofs >= subdev->size) { concat_unlock()
543 ofs -= subdev->size; concat_unlock()
546 if (ofs + len > subdev->size) concat_unlock()
547 size = subdev->size - ofs; concat_unlock()
551 err = mtd_unlock(subdev, ofs, size); concat_unlock()
572 struct mtd_info *subdev = concat->subdev[i]; concat_sync() local
573 mtd_sync(subdev); concat_sync()
583 struct mtd_info *subdev = concat->subdev[i]; concat_suspend() local
584 if ((rc = mtd_suspend(subdev)) < 0) concat_suspend()
596 struct mtd_info *subdev = concat->subdev[i]; concat_resume() local
597 mtd_resume(subdev); concat_resume()
606 if (!mtd_can_have_bb(concat->subdev[0])) concat_block_isbad()
610 struct mtd_info *subdev = concat->subdev[i]; concat_block_isbad() local
612 if (ofs >= subdev->size) { concat_block_isbad()
613 ofs -= subdev->size; concat_block_isbad()
617 res = mtd_block_isbad(subdev, ofs); concat_block_isbad()
630 struct mtd_info *subdev = concat->subdev[i]; concat_block_markbad() local
632 if (ofs >= subdev->size) { concat_block_markbad()
633 ofs -= subdev->size; concat_block_markbad()
637 err = mtd_block_markbad(subdev, ofs); concat_block_markbad()
648 * - we don't support subdev spanning as we can't guarantee it'll work
659 struct mtd_info *subdev = concat->subdev[i]; concat_get_unmapped_area() local
661 if (offset >= subdev->size) { concat_get_unmapped_area()
662 offset -= subdev->size; concat_get_unmapped_area()
666 return mtd_get_unmapped_area(subdev, len, offset, flags); concat_get_unmapped_area()
678 struct mtd_info *mtd_concat_create(struct mtd_info *subdev[], /* subdevices to concatenate */ mtd_concat_create() argument
691 printk(KERN_NOTICE "(%d): \"%s\"\n", i, subdev[i]->name); mtd_concat_create()
703 concat->subdev = (struct mtd_info **) (concat + 1); mtd_concat_create()
709 concat->mtd.type = subdev[0]->type; mtd_concat_create()
710 concat->mtd.flags = subdev[0]->flags; mtd_concat_create()
711 concat->mtd.size = subdev[0]->size; mtd_concat_create()
712 concat->mtd.erasesize = subdev[0]->erasesize; mtd_concat_create()
713 concat->mtd.writesize = subdev[0]->writesize; mtd_concat_create()
716 if (max_writebufsize < subdev[i]->writebufsize) mtd_concat_create()
717 max_writebufsize = subdev[i]->writebufsize; mtd_concat_create()
720 concat->mtd.subpage_sft = subdev[0]->subpage_sft; mtd_concat_create()
721 concat->mtd.oobsize = subdev[0]->oobsize; mtd_concat_create()
722 concat->mtd.oobavail = subdev[0]->oobavail; mtd_concat_create()
723 if (subdev[0]->_writev) mtd_concat_create()
725 if (subdev[0]->_read_oob) mtd_concat_create()
727 if (subdev[0]->_write_oob) mtd_concat_create()
729 if (subdev[0]->_block_isbad) mtd_concat_create()
731 if (subdev[0]->_block_markbad) mtd_concat_create()
734 concat->mtd.ecc_stats.badblocks = subdev[0]->ecc_stats.badblocks; mtd_concat_create()
736 concat->subdev[0] = subdev[0]; mtd_concat_create()
739 if (concat->mtd.type != subdev[i]->type) { mtd_concat_create()
742 subdev[i]->name); mtd_concat_create()
745 if (concat->mtd.flags != subdev[i]->flags) { mtd_concat_create()
750 if ((concat->mtd.flags ^ subdev[i]-> mtd_concat_create()
754 subdev[i]->name); mtd_concat_create()
760 subdev[i]->flags & MTD_WRITEABLE; mtd_concat_create()
763 concat->mtd.size += subdev[i]->size; mtd_concat_create()
765 subdev[i]->ecc_stats.badblocks; mtd_concat_create()
766 if (concat->mtd.writesize != subdev[i]->writesize || mtd_concat_create()
767 concat->mtd.subpage_sft != subdev[i]->subpage_sft || mtd_concat_create()
768 concat->mtd.oobsize != subdev[i]->oobsize || mtd_concat_create()
769 !concat->mtd._read_oob != !subdev[i]->_read_oob || mtd_concat_create()
770 !concat->mtd._write_oob != !subdev[i]->_write_oob) { mtd_concat_create()
773 subdev[i]->name); mtd_concat_create()
776 concat->subdev[i] = subdev[i]; mtd_concat_create()
780 concat->mtd.ecclayout = subdev[0]->ecclayout; mtd_concat_create()
801 max_erasesize = curr_erasesize = subdev[0]->erasesize; mtd_concat_create()
804 if (subdev[i]->numeraseregions == 0) { mtd_concat_create()
806 if (subdev[i]->erasesize != curr_erasesize) { mtd_concat_create()
809 curr_erasesize = subdev[i]->erasesize; mtd_concat_create()
816 for (j = 0; j < subdev[i]->numeraseregions; j++) { mtd_concat_create()
819 if (subdev[i]->eraseregions[j].erasesize != mtd_concat_create()
823 subdev[i]->eraseregions[j]. mtd_concat_create()
866 curr_erasesize = subdev[0]->erasesize; mtd_concat_create()
869 if (subdev[i]->numeraseregions == 0) { mtd_concat_create()
871 if (subdev[i]->erasesize != curr_erasesize) { mtd_concat_create()
884 curr_erasesize = subdev[i]->erasesize; mtd_concat_create()
887 position += subdev[i]->size; mtd_concat_create()
891 for (j = 0; j < subdev[i]->numeraseregions; j++) { mtd_concat_create()
893 if (subdev[i]->eraseregions[j]. mtd_concat_create()
904 subdev[i]->eraseregions[j]. mtd_concat_create()
909 subdev[i]->eraseregions[j]. mtd_concat_create()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fuse/
H A Dpriv.h3 #define nvkm_fuse(p) container_of((p), struct nvkm_fuse, subdev)
4 #include <subdev/fuse.h>
H A Dbase.c33 nvkm_fuse_dtor(struct nvkm_subdev *subdev) nvkm_fuse_dtor() argument
35 return nvkm_fuse(subdev); nvkm_fuse_dtor()
50 nvkm_subdev_ctor(&nvkm_fuse, device, index, 0, &fuse->subdev); nvkm_fuse_new_()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/
H A Dfan.h3 #include <subdev/bios/therm.h>
H A Dinit.h5 struct nvkm_subdev *subdev; member in struct:nvbios_init
H A Dtiming.h3 #include <subdev/bios/ramcfg.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/pmu/
H A Dpriv.h3 #define nvkm_pmu(p) container_of((p), struct nvkm_pmu, subdev)
4 #include <subdev/pmu.h>
5 #include <subdev/pmu/fuc/os.h>
H A Dmemx.c19 struct nvkm_device *device = memx->pmu->subdev.device; memx_out()
45 struct nvkm_device *device = pmu->subdev.device; nvkm_memx_init()
75 struct nvkm_subdev *subdev = &pmu->subdev; nvkm_memx_fini() local
76 struct nvkm_device *device = subdev->device; nvkm_memx_fini()
92 nvkm_debug(subdev, "Exec took %uns, PMU_IN %08x\n", nvkm_memx_fini()
101 nvkm_debug(&memx->pmu->subdev, "R[%06x] = %08x\n", addr, data); nvkm_memx_wr32()
109 nvkm_debug(&memx->pmu->subdev, "R[%06x] & %08x == %08x, %d us\n", nvkm_memx_wait()
118 nvkm_debug(&memx->pmu->subdev, " DELAY = %d ns\n", nsec); nvkm_memx_nsec()
126 struct nvkm_subdev *subdev = &memx->pmu->subdev; nvkm_memx_wait_vblank() local
127 struct nvkm_device *device = subdev->device; nvkm_memx_wait_vblank()
148 nvkm_debug(subdev, "WAIT VBLANK !NO ACTIVE HEAD\n"); nvkm_memx_wait_vblank()
152 nvkm_debug(subdev, "WAIT VBLANK HEAD%d\n", head_sync); nvkm_memx_wait_vblank()
160 nvkm_debug(&memx->pmu->subdev, " MEM TRAIN\n"); nvkm_memx_train()
167 struct nvkm_device *device = pmu->subdev.device; nvkm_memx_train_result()
193 nvkm_debug(&memx->pmu->subdev, " HOST BLOCKED\n"); nvkm_memx_block()
200 nvkm_debug(&memx->pmu->subdev, " HOST UNBLOCKED\n"); nvkm_memx_unblock()
H A Dgk20a.c22 #define gk20a_pmu(p) container_of((p), struct gk20a_pmu, base.subdev)
25 #include <subdev/clk.h>
26 #include <subdev/timer.h>
27 #include <subdev/volt.h>
54 struct nvkm_clk *clk = pmu->base.subdev.device->clk; gk20a_pmu_dvfs_target()
62 struct nvkm_clk *clk = pmu->base.subdev.device->clk; gk20a_pmu_dvfs_get_cur_state()
73 struct nvkm_clk *clk = pmu->base.subdev.device->clk; gk20a_pmu_dvfs_get_target_state()
88 nvkm_trace(&pmu->base.subdev, "cur level = %d, new level = %d\n", gk20a_pmu_dvfs_get_target_state()
103 struct nvkm_device *device = pmu->base.subdev.device; gk20a_pmu_dvfs_get_dev_status()
112 struct nvkm_device *device = pmu->base.subdev.device; gk20a_pmu_dvfs_reset_dev_status()
124 struct nvkm_subdev *subdev = &pmu->base.subdev; gk20a_pmu_dvfs_work() local
125 struct nvkm_device *device = subdev->device; gk20a_pmu_dvfs_work()
141 nvkm_warn(subdev, "failed to get device status\n"); gk20a_pmu_dvfs_work()
150 nvkm_trace(subdev, "utilization = %d %%, avg_load = %d %%\n", gk20a_pmu_dvfs_work()
155 nvkm_warn(subdev, "failed to get current state\n"); gk20a_pmu_dvfs_work()
160 nvkm_trace(subdev, "set new state to %d\n", state); gk20a_pmu_dvfs_work()
170 gk20a_pmu_fini(struct nvkm_subdev *subdev, bool suspend) gk20a_pmu_fini() argument
172 struct gk20a_pmu *pmu = gk20a_pmu(subdev); gk20a_pmu_fini()
173 nvkm_timer_alarm_cancel(subdev->device->timer, &pmu->alarm); gk20a_pmu_fini()
178 gk20a_pmu_dtor(struct nvkm_subdev *subdev) gk20a_pmu_dtor() argument
180 return gk20a_pmu(subdev); gk20a_pmu_dtor()
184 gk20a_pmu_init(struct nvkm_subdev *subdev) gk20a_pmu_init() argument
186 struct gk20a_pmu *pmu = gk20a_pmu(subdev); gk20a_pmu_init()
187 struct nvkm_device *device = pmu->base.subdev.device; gk20a_pmu_init()
223 nvkm_subdev_ctor(&gk20a_pmu, device, index, 0, &pmu->base.subdev); gk20a_pmu_new()
H A Dbase.c26 #include <subdev/timer.h>
39 struct nvkm_subdev *subdev = &pmu->subdev; nvkm_pmu_send() local
40 struct nvkm_device *device = subdev->device; nvkm_pmu_send()
57 mutex_lock(&subdev->mutex); nvkm_pmu_send()
84 mutex_unlock(&subdev->mutex); nvkm_pmu_send()
94 struct nvkm_subdev *subdev = &pmu->subdev; nvkm_pmu_recv() local
95 struct nvkm_device *device = subdev->device; nvkm_pmu_recv()
135 nvkm_warn(subdev, "%c%c%c%c %08x %08x %08x %08x\n", nvkm_pmu_recv()
144 nvkm_pmu_intr(struct nvkm_subdev *subdev) nvkm_pmu_intr() argument
146 struct nvkm_pmu *pmu = nvkm_pmu(subdev); nvkm_pmu_intr()
147 struct nvkm_device *device = pmu->subdev.device; nvkm_pmu_intr()
154 nvkm_error(subdev, "UAS fault at %06x addr %08x\n", nvkm_pmu_intr()
169 nvkm_info(subdev, "wr32 %06x %08x\n", nvkm_pmu_intr()
177 nvkm_error(subdev, "intr %08x\n", intr); nvkm_pmu_intr()
183 nvkm_pmu_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_pmu_fini() argument
185 struct nvkm_pmu *pmu = nvkm_pmu(subdev); nvkm_pmu_fini()
186 struct nvkm_device *device = pmu->subdev.device; nvkm_pmu_fini()
194 nvkm_pmu_init(struct nvkm_subdev *subdev) nvkm_pmu_init() argument
196 struct nvkm_pmu *pmu = nvkm_pmu(subdev); nvkm_pmu_init()
197 struct nvkm_device *device = pmu->subdev.device; nvkm_pmu_init()
255 nvkm_pmu_dtor(struct nvkm_subdev *subdev) nvkm_pmu_dtor() argument
257 return nvkm_pmu(subdev); nvkm_pmu_dtor()
275 nvkm_subdev_ctor(&nvkm_pmu, device, index, 0, &pmu->subdev); nvkm_pmu_new_()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/timer/
H A Dnv04.c30 struct nvkm_subdev *subdev = &tmr->subdev; nv04_timer_time() local
31 struct nvkm_device *device = subdev->device; nv04_timer_time()
35 nvkm_debug(subdev, "time low : %08x\n", lo); nv04_timer_time()
36 nvkm_debug(subdev, "time high : %08x\n", hi); nv04_timer_time()
45 struct nvkm_device *device = tmr->subdev.device; nv04_timer_read()
59 struct nvkm_device *device = tmr->subdev.device; nv04_timer_alarm_fini()
66 struct nvkm_device *device = tmr->subdev.device; nv04_timer_alarm_init()
74 struct nvkm_subdev *subdev = &tmr->subdev; nv04_timer_intr() local
75 struct nvkm_device *device = subdev->device; nv04_timer_intr()
85 nvkm_error(subdev, "intr %08x\n", stat); nv04_timer_intr()
93 struct nvkm_subdev *subdev = &tmr->subdev; nv04_timer_init() local
94 struct nvkm_device *device = subdev->device; nv04_timer_init()
109 nvkm_warn(subdev, "unknown input clock freq\n"); nv04_timer_init()
128 nvkm_debug(subdev, "input frequency : %dHz\n", f); nv04_timer_init()
129 nvkm_debug(subdev, "numerator : %08x\n", n); nv04_timer_init()
130 nvkm_debug(subdev, "denominator : %08x\n", d); nv04_timer_init()
131 nvkm_debug(subdev, "timer frequency : %dHz\n", f * d / n); nv04_timer_init()
H A Dnv40.c30 struct nvkm_subdev *subdev = &tmr->subdev; nv40_timer_init() local
31 struct nvkm_device *device = subdev->device; nv40_timer_init()
46 nvkm_warn(subdev, "unknown input clock freq\n"); nv40_timer_init()
65 nvkm_debug(subdev, "input frequency : %dHz\n", f); nv40_timer_init()
66 nvkm_debug(subdev, "numerator : %08x\n", n); nv40_timer_init()
67 nvkm_debug(subdev, "denominator : %08x\n", d); nv40_timer_init()
68 nvkm_debug(subdev, "timer frequency : %dHz\n", f * d / n); nv40_timer_init()
H A Dnv41.c30 struct nvkm_subdev *subdev = &tmr->subdev; nv41_timer_init() local
31 struct nvkm_device *device = subdev->device; nv41_timer_init()
60 nvkm_debug(subdev, "input frequency : %dHz\n", f); nv41_timer_init()
61 nvkm_debug(subdev, "input multiplier: %d\n", m); nv41_timer_init()
62 nvkm_debug(subdev, "numerator : %08x\n", n); nv41_timer_init()
63 nvkm_debug(subdev, "denominator : %08x\n", d); nv41_timer_init()
64 nvkm_debug(subdev, "timer frequency : %dHz\n", (f * m) * d / n); nv41_timer_init()
H A Dpriv.h3 #define nvkm_timer(p) container_of((p), struct nvkm_timer, subdev)
4 #include <subdev/timer.h>
H A Dbase.c98 nvkm_timer_intr(struct nvkm_subdev *subdev) nvkm_timer_intr() argument
100 struct nvkm_timer *tmr = nvkm_timer(subdev); nvkm_timer_intr()
105 nvkm_timer_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_timer_fini() argument
107 struct nvkm_timer *tmr = nvkm_timer(subdev); nvkm_timer_fini()
113 nvkm_timer_init(struct nvkm_subdev *subdev) nvkm_timer_init() argument
115 struct nvkm_timer *tmr = nvkm_timer(subdev); nvkm_timer_init()
124 nvkm_timer_dtor(struct nvkm_subdev *subdev) nvkm_timer_dtor() argument
126 return nvkm_timer(subdev); nvkm_timer_dtor()
146 nvkm_subdev_ctor(&nvkm_timer, device, index, 0, &tmr->subdev); nvkm_timer_new_()
/linux-4.4.14/drivers/mtd/maps/
H A Dsa1100-flash.c36 struct sa_subdev_info subdev[0]; member in struct:sa_info
43 struct sa_subdev_info *subdev = container_of(map, struct sa_subdev_info, map); sa1100_set_vpp() local
49 subdev->plat->set_vpp(1); sa1100_set_vpp()
52 subdev->plat->set_vpp(0); sa1100_set_vpp()
57 static void sa1100_destroy_subdev(struct sa_subdev_info *subdev) sa1100_destroy_subdev() argument
59 if (subdev->mtd) sa1100_destroy_subdev()
60 map_destroy(subdev->mtd); sa1100_destroy_subdev()
61 if (subdev->map.virt) sa1100_destroy_subdev()
62 iounmap(subdev->map.virt); sa1100_destroy_subdev()
63 release_mem_region(subdev->map.phys, subdev->map.size); sa1100_destroy_subdev()
66 static int sa1100_probe_subdev(struct sa_subdev_info *subdev, struct resource *res) sa1100_probe_subdev() argument
85 subdev->map.bankwidth = (MSC0 & MSC_RBW) ? 2 : 4; sa1100_probe_subdev()
89 subdev->map.bankwidth = ((MSC0 >> 16) & MSC_RBW) ? 2 : 4; sa1100_probe_subdev()
93 if (!request_mem_region(phys, size, subdev->name)) { sa1100_probe_subdev()
98 if (subdev->plat->set_vpp) sa1100_probe_subdev()
99 subdev->map.set_vpp = sa1100_set_vpp; sa1100_probe_subdev()
101 subdev->map.phys = phys; sa1100_probe_subdev()
102 subdev->map.size = size; sa1100_probe_subdev()
103 subdev->map.virt = ioremap(phys, size); sa1100_probe_subdev()
104 if (!subdev->map.virt) { sa1100_probe_subdev()
109 simple_map_init(&subdev->map); sa1100_probe_subdev()
115 subdev->mtd = do_map_probe(subdev->plat->map_name, &subdev->map); sa1100_probe_subdev()
116 if (subdev->mtd == NULL) { sa1100_probe_subdev()
122 phys, (unsigned)(subdev->mtd->size >> 20), sa1100_probe_subdev()
123 subdev->map.bankwidth * 8); sa1100_probe_subdev()
128 sa1100_destroy_subdev(subdev); sa1100_probe_subdev()
139 if (info->mtd != info->subdev[0].mtd) sa1100_destroy()
144 sa1100_destroy_subdev(&info->subdev[i]); sa1100_destroy()
190 struct sa_subdev_info *subdev = &info->subdev[i]; sa1100_setup_mtd() local
197 subdev->map.name = subdev->name; sa1100_setup_mtd()
198 sprintf(subdev->name, "%s-%d", plat->name, i); sa1100_setup_mtd()
199 subdev->plat = plat; sa1100_setup_mtd()
201 ret = sa1100_probe_subdev(subdev, res); sa1100_setup_mtd()
220 strcpy(info->subdev[0].name, plat->name); sa1100_setup_mtd()
221 info->mtd = info->subdev[0].mtd; sa1100_setup_mtd()
229 cdev[i] = info->subdev[i].mtd; sa1100_setup_mtd()
/linux-4.4.14/drivers/media/platform/vsp1/
H A Dvsp1_rwpf.h18 #include <media/v4l2-subdev.h>
45 static inline struct vsp1_rwpf *to_rwpf(struct v4l2_subdev *subdev) to_rwpf() argument
47 return container_of(subdev, struct vsp1_rwpf, entity.subdev); to_rwpf()
53 int vsp1_rwpf_enum_mbus_code(struct v4l2_subdev *subdev,
56 int vsp1_rwpf_enum_frame_size(struct v4l2_subdev *subdev,
59 int vsp1_rwpf_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg,
61 int vsp1_rwpf_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg,
63 int vsp1_rwpf_get_selection(struct v4l2_subdev *subdev,
66 int vsp1_rwpf_set_selection(struct v4l2_subdev *subdev,
H A Dvsp1_lut.c18 #include <media/v4l2-subdev.h>
50 static long lut_ioctl(struct v4l2_subdev *subdev, unsigned int cmd, void *arg) lut_ioctl() argument
52 struct vsp1_lut *lut = to_lut(subdev); lut_ioctl()
68 static int lut_s_stream(struct v4l2_subdev *subdev, int enable) lut_s_stream() argument
70 struct vsp1_lut *lut = to_lut(subdev); lut_s_stream()
84 static int lut_enum_mbus_code(struct v4l2_subdev *subdev, lut_enum_mbus_code() argument
93 struct vsp1_lut *lut = to_lut(subdev); lut_enum_mbus_code()
116 static int lut_enum_frame_size(struct v4l2_subdev *subdev, lut_enum_frame_size() argument
120 struct vsp1_lut *lut = to_lut(subdev); lut_enum_frame_size()
147 static int lut_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, lut_get_format() argument
150 struct vsp1_lut *lut = to_lut(subdev); lut_get_format()
158 static int lut_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, lut_set_format() argument
161 struct vsp1_lut *lut = to_lut(subdev); lut_set_format()
227 struct v4l2_subdev *subdev; vsp1_lut_create() local
241 /* Initialize the V4L2 subdev. */ vsp1_lut_create()
242 subdev = &lut->entity.subdev; vsp1_lut_create()
243 v4l2_subdev_init(subdev, &lut_ops); vsp1_lut_create()
245 subdev->entity.ops = &vsp1_media_ops; vsp1_lut_create()
246 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_lut_create()
247 snprintf(subdev->name, sizeof(subdev->name), "%s lut", vsp1_lut_create()
249 v4l2_set_subdevdata(subdev, lut); vsp1_lut_create()
250 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_lut_create()
252 vsp1_entity_init_formats(subdev, NULL); vsp1_lut_create()
H A Dvsp1_hsit.h17 #include <media/v4l2-subdev.h>
31 static inline struct vsp1_hsit *to_hsit(struct v4l2_subdev *subdev) to_hsit() argument
33 return container_of(subdev, struct vsp1_hsit, entity.subdev); to_hsit()
H A Dvsp1_lif.h17 #include <media/v4l2-subdev.h>
30 static inline struct vsp1_lif *to_lif(struct v4l2_subdev *subdev) to_lif() argument
32 return container_of(subdev, struct vsp1_lif, entity.subdev); to_lif()
H A Dvsp1_lut.h17 #include <media/v4l2-subdev.h>
31 static inline struct vsp1_lut *to_lut(struct v4l2_subdev *subdev) to_lut() argument
33 return container_of(subdev, struct vsp1_lut, entity.subdev); to_lut()
H A Dvsp1_sru.h18 #include <media/v4l2-subdev.h>
33 static inline struct vsp1_sru *to_sru(struct v4l2_subdev *subdev) to_sru() argument
35 return container_of(subdev, struct vsp1_sru, entity.subdev); to_sru()
H A Dvsp1_hsit.c17 #include <media/v4l2-subdev.h>
38 static int hsit_s_stream(struct v4l2_subdev *subdev, int enable) hsit_s_stream() argument
40 struct vsp1_hsit *hsit = to_hsit(subdev); hsit_s_stream()
57 static int hsit_enum_mbus_code(struct v4l2_subdev *subdev, hsit_enum_mbus_code() argument
61 struct vsp1_hsit *hsit = to_hsit(subdev); hsit_enum_mbus_code()
75 static int hsit_enum_frame_size(struct v4l2_subdev *subdev, hsit_enum_frame_size() argument
79 struct vsp1_hsit *hsit = to_hsit(subdev); hsit_enum_frame_size()
106 static int hsit_get_format(struct v4l2_subdev *subdev, hsit_get_format() argument
110 struct vsp1_hsit *hsit = to_hsit(subdev); hsit_get_format()
118 static int hsit_set_format(struct v4l2_subdev *subdev, hsit_set_format() argument
122 struct vsp1_hsit *hsit = to_hsit(subdev); hsit_set_format()
183 struct v4l2_subdev *subdev; vsp1_hsit_create() local
202 /* Initialize the V4L2 subdev. */ vsp1_hsit_create()
203 subdev = &hsit->entity.subdev; vsp1_hsit_create()
204 v4l2_subdev_init(subdev, &hsit_ops); vsp1_hsit_create()
206 subdev->entity.ops = &vsp1_media_ops; vsp1_hsit_create()
207 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_hsit_create()
208 snprintf(subdev->name, sizeof(subdev->name), "%s %s", vsp1_hsit_create()
210 v4l2_set_subdevdata(subdev, hsit); vsp1_hsit_create()
211 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_hsit_create()
213 vsp1_entity_init_formats(subdev, NULL); vsp1_hsit_create()
H A Dvsp1_lif.c17 #include <media/v4l2-subdev.h>
43 static int lif_s_stream(struct v4l2_subdev *subdev, int enable) lif_s_stream() argument
46 struct vsp1_lif *lif = to_lif(subdev); lif_s_stream()
76 static int lif_enum_mbus_code(struct v4l2_subdev *subdev, lif_enum_mbus_code() argument
84 struct vsp1_lif *lif = to_lif(subdev); lif_enum_mbus_code()
108 static int lif_enum_frame_size(struct v4l2_subdev *subdev, lif_enum_frame_size() argument
112 struct vsp1_lif *lif = to_lif(subdev); lif_enum_frame_size()
136 static int lif_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, lif_get_format() argument
139 struct vsp1_lif *lif = to_lif(subdev); lif_get_format()
147 static int lif_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, lif_set_format() argument
150 struct vsp1_lif *lif = to_lif(subdev); lif_set_format()
213 struct v4l2_subdev *subdev; vsp1_lif_create() local
227 /* Initialize the V4L2 subdev. */ vsp1_lif_create()
228 subdev = &lif->entity.subdev; vsp1_lif_create()
229 v4l2_subdev_init(subdev, &lif_ops); vsp1_lif_create()
231 subdev->entity.ops = &vsp1_media_ops; vsp1_lif_create()
232 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_lif_create()
233 snprintf(subdev->name, sizeof(subdev->name), "%s lif", vsp1_lif_create()
235 v4l2_set_subdevdata(subdev, lif); vsp1_lif_create()
236 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_lif_create()
238 vsp1_entity_init_formats(subdev, NULL); vsp1_lif_create()
H A Dvsp1_bru.h18 #include <media/v4l2-subdev.h>
39 static inline struct vsp1_bru *to_bru(struct v4l2_subdev *subdev) to_bru() argument
41 return container_of(subdev, struct vsp1_bru, entity.subdev); to_bru()
H A Dvsp1_entity.c19 #include <media/v4l2-subdev.h>
49 if (!entity->subdev.ctrl_handler) vsp1_entity_set_streaming()
52 ret = v4l2_ctrl_handler_setup(entity->subdev.ctrl_handler); vsp1_entity_set_streaming()
73 return v4l2_subdev_get_try_format(&entity->subdev, cfg, pad); vsp1_entity_get_pad_format()
83 * @subdev: V4L2 subdevice
84 * @cfg: V4L2 subdev pad configuration
90 void vsp1_entity_init_formats(struct v4l2_subdev *subdev, vsp1_entity_init_formats() argument
96 for (pad = 0; pad < subdev->entity.num_pads - 1; ++pad) { vsp1_entity_init_formats()
103 v4l2_subdev_call(subdev, pad, set_fmt, cfg, &format); vsp1_entity_init_formats()
107 static int vsp1_entity_open(struct v4l2_subdev *subdev, vsp1_entity_open() argument
110 vsp1_entity_init_formats(subdev, fh->pad); vsp1_entity_open()
132 source = container_of(local->entity, struct vsp1_entity, subdev.entity); vsp1_entity_link_setup()
222 return media_entity_init(&entity->subdev.entity, num_pads, vsp1_entity_init()
230 if (entity->subdev.ctrl_handler) vsp1_entity_destroy()
231 v4l2_ctrl_handler_free(entity->subdev.ctrl_handler); vsp1_entity_destroy()
232 media_entity_cleanup(&entity->subdev.entity); vsp1_entity_destroy()
H A Dvsp1_uds.h17 #include <media/v4l2-subdev.h>
31 static inline struct vsp1_uds *to_uds(struct v4l2_subdev *subdev) to_uds() argument
33 return container_of(subdev, struct vsp1_uds, entity.subdev); to_uds()
H A Dvsp1_sru.c17 #include <media/v4l2-subdev.h>
124 static int sru_s_stream(struct v4l2_subdev *subdev, int enable) sru_s_stream() argument
126 struct vsp1_sru *sru = to_sru(subdev); sru_s_stream()
169 static int sru_enum_mbus_code(struct v4l2_subdev *subdev, sru_enum_mbus_code() argument
177 struct vsp1_sru *sru = to_sru(subdev); sru_enum_mbus_code()
200 static int sru_enum_frame_size(struct v4l2_subdev *subdev, sru_enum_frame_size() argument
204 struct vsp1_sru *sru = to_sru(subdev); sru_enum_frame_size()
234 static int sru_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, sru_get_format() argument
237 struct vsp1_sru *sru = to_sru(subdev); sru_get_format()
296 static int sru_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, sru_set_format() argument
299 struct vsp1_sru *sru = to_sru(subdev); sru_set_format()
346 struct v4l2_subdev *subdev; vsp1_sru_create() local
360 /* Initialize the V4L2 subdev. */ vsp1_sru_create()
361 subdev = &sru->entity.subdev; vsp1_sru_create()
362 v4l2_subdev_init(subdev, &sru_ops); vsp1_sru_create()
364 subdev->entity.ops = &vsp1_media_ops; vsp1_sru_create()
365 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_sru_create()
366 snprintf(subdev->name, sizeof(subdev->name), "%s sru", vsp1_sru_create()
368 v4l2_set_subdevdata(subdev, sru); vsp1_sru_create()
369 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_sru_create()
371 vsp1_entity_init_formats(subdev, NULL); vsp1_sru_create()
377 sru->entity.subdev.ctrl_handler = &sru->ctrls; vsp1_sru_create()
H A Dvsp1_uds.c17 #include <media/v4l2-subdev.h>
117 static int uds_s_stream(struct v4l2_subdev *subdev, int enable) uds_s_stream() argument
119 struct vsp1_uds *uds = to_uds(subdev); uds_s_stream()
171 static int uds_enum_mbus_code(struct v4l2_subdev *subdev, uds_enum_mbus_code() argument
179 struct vsp1_uds *uds = to_uds(subdev); uds_enum_mbus_code()
203 static int uds_enum_frame_size(struct v4l2_subdev *subdev, uds_enum_frame_size() argument
207 struct vsp1_uds *uds = to_uds(subdev); uds_enum_frame_size()
231 static int uds_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, uds_get_format() argument
234 struct vsp1_uds *uds = to_uds(subdev); uds_get_format()
278 static int uds_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, uds_set_format() argument
281 struct vsp1_uds *uds = to_uds(subdev); uds_set_format()
328 struct v4l2_subdev *subdev; vsp1_uds_create() local
343 /* Initialize the V4L2 subdev. */ vsp1_uds_create()
344 subdev = &uds->entity.subdev; vsp1_uds_create()
345 v4l2_subdev_init(subdev, &uds_ops); vsp1_uds_create()
347 subdev->entity.ops = &vsp1_media_ops; vsp1_uds_create()
348 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_uds_create()
349 snprintf(subdev->name, sizeof(subdev->name), "%s uds.%u", vsp1_uds_create()
351 v4l2_set_subdevdata(subdev, uds); vsp1_uds_create()
352 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_uds_create()
354 vsp1_entity_init_formats(subdev, NULL); vsp1_uds_create()
H A Dvsp1_bru.c17 #include <media/v4l2-subdev.h>
70 static int bru_s_stream(struct v4l2_subdev *subdev, int enable) bru_s_stream() argument
72 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity); bru_s_stream()
73 struct vsp1_bru *bru = to_bru(subdev); bru_s_stream()
185 static int bru_enum_mbus_code(struct v4l2_subdev *subdev, bru_enum_mbus_code() argument
193 struct vsp1_bru *bru = to_bru(subdev); bru_enum_mbus_code()
213 static int bru_enum_frame_size(struct v4l2_subdev *subdev, bru_enum_frame_size() argument
238 return v4l2_subdev_get_try_crop(&bru->entity.subdev, cfg, pad); bru_get_compose()
246 static int bru_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, bru_get_format() argument
249 struct vsp1_bru *bru = to_bru(subdev); bru_get_format()
285 static int bru_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, bru_set_format() argument
288 struct vsp1_bru *bru = to_bru(subdev); bru_set_format()
322 static int bru_get_selection(struct v4l2_subdev *subdev, bru_get_selection() argument
326 struct vsp1_bru *bru = to_bru(subdev); bru_get_selection()
348 static int bru_set_selection(struct v4l2_subdev *subdev, bru_set_selection() argument
352 struct vsp1_bru *bru = to_bru(subdev); bru_set_selection()
412 struct v4l2_subdev *subdev; vsp1_bru_create() local
426 /* Initialize the V4L2 subdev. */ vsp1_bru_create()
427 subdev = &bru->entity.subdev; vsp1_bru_create()
428 v4l2_subdev_init(subdev, &bru_ops); vsp1_bru_create()
430 subdev->entity.ops = &vsp1_media_ops; vsp1_bru_create()
431 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_bru_create()
432 snprintf(subdev->name, sizeof(subdev->name), "%s bru", vsp1_bru_create()
434 v4l2_set_subdevdata(subdev, bru); vsp1_bru_create()
435 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_bru_create()
437 vsp1_entity_init_formats(subdev, NULL); vsp1_bru_create()
444 bru->entity.subdev.ctrl_handler = &bru->ctrls; vsp1_bru_create()
H A Dvsp1_entity.h19 #include <media/v4l2-subdev.h>
71 struct v4l2_subdev subdev; member in struct:vsp1_entity
80 static inline struct vsp1_entity *to_vsp1_entity(struct v4l2_subdev *subdev) to_vsp1_entity() argument
82 return container_of(subdev, struct vsp1_entity, subdev); to_vsp1_entity()
96 void vsp1_entity_init_formats(struct v4l2_subdev *subdev,
H A Dvsp1_rpf.c16 #include <media/v4l2-subdev.h>
59 pipe = to_vsp1_pipeline(&rpf->entity.subdev.entity); rpf_s_ctrl()
75 static int rpf_s_stream(struct v4l2_subdev *subdev, int enable) rpf_s_stream() argument
77 struct vsp1_rwpf *rpf = to_rwpf(subdev); rpf_s_stream()
221 struct v4l2_subdev *subdev; vsp1_rpf_create() local
240 /* Initialize the V4L2 subdev. */ vsp1_rpf_create()
241 subdev = &rpf->entity.subdev; vsp1_rpf_create()
242 v4l2_subdev_init(subdev, &rpf_ops); vsp1_rpf_create()
244 subdev->entity.ops = &vsp1_media_ops; vsp1_rpf_create()
245 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_rpf_create()
246 snprintf(subdev->name, sizeof(subdev->name), "%s rpf.%u", vsp1_rpf_create()
248 v4l2_set_subdevdata(subdev, rpf); vsp1_rpf_create()
249 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_rpf_create()
251 vsp1_entity_init_formats(subdev, NULL); vsp1_rpf_create()
258 rpf->entity.subdev.ctrl_handler = &rpf->ctrls; vsp1_rpf_create()
282 &rpf->entity.subdev.entity, vsp1_rpf_create()
H A Dvsp1_wpf.c16 #include <media/v4l2-subdev.h>
74 static int wpf_s_stream(struct v4l2_subdev *subdev, int enable) wpf_s_stream() argument
76 struct vsp1_pipeline *pipe = to_vsp1_pipeline(&subdev->entity); wpf_s_stream()
77 struct vsp1_rwpf *wpf = to_rwpf(subdev); wpf_s_stream()
220 struct v4l2_subdev *subdev; vsp1_wpf_create() local
240 /* Initialize the V4L2 subdev. */ vsp1_wpf_create()
241 subdev = &wpf->entity.subdev; vsp1_wpf_create()
242 v4l2_subdev_init(subdev, &wpf_ops); vsp1_wpf_create()
244 subdev->entity.ops = &vsp1_media_ops; vsp1_wpf_create()
245 subdev->internal_ops = &vsp1_subdev_internal_ops; vsp1_wpf_create()
246 snprintf(subdev->name, sizeof(subdev->name), "%s wpf.%u", vsp1_wpf_create()
248 v4l2_set_subdevdata(subdev, wpf); vsp1_wpf_create()
249 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; vsp1_wpf_create()
251 vsp1_entity_init_formats(subdev, NULL); vsp1_wpf_create()
258 wpf->entity.subdev.ctrl_handler = &wpf->ctrls; vsp1_wpf_create()
287 ret = media_entity_create_link(&wpf->entity.subdev.entity, vsp1_wpf_create()
H A Dvsp1_rwpf.c14 #include <media/v4l2-subdev.h>
27 int vsp1_rwpf_enum_mbus_code(struct v4l2_subdev *subdev, vsp1_rwpf_enum_mbus_code() argument
44 int vsp1_rwpf_enum_frame_size(struct v4l2_subdev *subdev, vsp1_rwpf_enum_frame_size() argument
48 struct vsp1_rwpf *rwpf = to_rwpf(subdev); vsp1_rwpf_enum_frame_size()
80 return v4l2_subdev_get_try_crop(&rwpf->entity.subdev, cfg, RWPF_PAD_SINK); vsp1_rwpf_get_crop()
88 int vsp1_rwpf_get_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, vsp1_rwpf_get_format() argument
91 struct vsp1_rwpf *rwpf = to_rwpf(subdev); vsp1_rwpf_get_format()
99 int vsp1_rwpf_set_format(struct v4l2_subdev *subdev, struct v4l2_subdev_pad_config *cfg, vsp1_rwpf_set_format() argument
102 struct vsp1_rwpf *rwpf = to_rwpf(subdev); vsp1_rwpf_set_format()
148 int vsp1_rwpf_get_selection(struct v4l2_subdev *subdev, vsp1_rwpf_get_selection() argument
152 struct vsp1_rwpf *rwpf = to_rwpf(subdev); vsp1_rwpf_get_selection()
180 int vsp1_rwpf_set_selection(struct v4l2_subdev *subdev, vsp1_rwpf_set_selection() argument
184 struct vsp1_rwpf *rwpf = to_rwpf(subdev); vsp1_rwpf_set_selection()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvif/
H A Ddevice.h39 #include <subdev/bios.h>
40 #include <subdev/fb.h>
41 #include <subdev/mmu.h>
42 #include <subdev/bar.h>
43 #include <subdev/gpio.h>
44 #include <subdev/clk.h>
45 #include <subdev/i2c.h>
46 #include <subdev/timer.h>
47 #include <subdev/therm.h>
48 #include <subdev/pci.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/devinit/
H A Dnv50.c26 #include <subdev/bios.h>
27 #include <subdev/bios/dcb.h>
28 #include <subdev/bios/disp.h>
29 #include <subdev/bios/init.h>
30 #include <subdev/bios/pll.h>
31 #include <subdev/clk/pll.h>
32 #include <subdev/vga.h>
37 struct nvkm_subdev *subdev = &init->subdev; nv50_devinit_pll_set() local
38 struct nvkm_device *device = subdev->device; nv50_devinit_pll_set()
46 nvkm_error(subdev, "failed to retrieve pll data, %d\n", ret); nv50_devinit_pll_set()
50 ret = nv04_pll_calc(subdev, &info, freq, &N1, &M1, &N2, &M2, &P); nv50_devinit_pll_set()
52 nvkm_error(subdev, "failed pll calculation\n"); nv50_devinit_pll_set()
83 struct nvkm_device *device = init->subdev.device; nv50_devinit_disable()
97 struct nvkm_subdev *subdev = &init->base.subdev; nv50_devinit_preinit() local
98 struct nvkm_device *device = subdev->device; nv50_devinit_preinit()
116 nvkm_debug(subdev, "adaptor not initialised\n"); nv50_devinit_preinit()
126 struct nvkm_subdev *subdev = &init->base.subdev; nv50_devinit_init() local
127 struct nvkm_device *device = subdev->device; nv50_devinit_init()
142 .subdev = subdev, nv50_devinit_init()
H A Dbase.c27 #include <subdev/vga.h>
69 nvkm_devinit_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_devinit_fini() argument
71 struct nvkm_devinit *init = nvkm_devinit(subdev); nvkm_devinit_fini()
79 nvkm_devinit_preinit(struct nvkm_subdev *subdev) nvkm_devinit_preinit() argument
81 struct nvkm_devinit *init = nvkm_devinit(subdev); nvkm_devinit_preinit()
87 nvkm_lockvgac(subdev->device, false); nvkm_devinit_preinit()
92 nvkm_devinit_init(struct nvkm_subdev *subdev) nvkm_devinit_init() argument
94 struct nvkm_devinit *init = nvkm_devinit(subdev); nvkm_devinit_init()
101 nvkm_devinit_dtor(struct nvkm_subdev *subdev) nvkm_devinit_dtor() argument
103 struct nvkm_devinit *init = nvkm_devinit(subdev); nvkm_devinit_dtor()
110 nvkm_lockvgac(subdev->device, true); nvkm_devinit_dtor()
127 nvkm_subdev_ctor(&nvkm_devinit, device, index, 0, &init->subdev); nvkm_devinit_ctor()
H A Dpriv.h3 #define nvkm_devinit(p) container_of((p), struct nvkm_devinit, subdev)
4 #include <subdev/devinit.h>
H A Dgm204.c26 #include <subdev/bios.h>
27 #include <subdev/bios/bit.h>
28 #include <subdev/bios/pmu.h>
33 struct nvkm_device *device = init->base.subdev.device; pmu_code()
53 struct nvkm_device *device = init->base.subdev.device; pmu_data()
65 struct nvkm_device *device = init->base.subdev.device; pmu_args()
74 struct nvkm_device *device = init->base.subdev.device; pmu_exec()
84 struct nvkm_subdev *subdev = &init->base.subdev; pmu_load() local
85 struct nvkm_bios *bios = subdev->device->bios; pmu_load()
89 nvkm_error(subdev, "VBIOS PMU fuc %02x not found\n", type); pmu_load()
113 struct nvkm_subdev *subdev = &init->base.subdev; gm204_devinit_post() local
114 struct nvkm_device *device = subdev->device; gm204_devinit_post()
122 nvkm_error(subdev, "VBIOS PMU init data not found\n"); gm204_devinit_post()
H A Dgf100.c26 #include <subdev/bios.h>
27 #include <subdev/bios/init.h>
28 #include <subdev/bios/pll.h>
29 #include <subdev/clk/pll.h>
34 struct nvkm_subdev *subdev = &init->subdev; gf100_devinit_pll_set() local
35 struct nvkm_device *device = subdev->device; gf100_devinit_pll_set()
44 ret = gt215_pll_calc(subdev, &info, freq, &N, &fN, &M, &P); gf100_devinit_pll_set()
58 nvkm_warn(subdev, "%08x/%dKhz unimplemented\n", type, freq); gf100_devinit_pll_set()
69 struct nvkm_device *device = init->subdev.device; gf100_devinit_disable()
H A Dnv20.c29 #include <subdev/bios.h>
30 #include <subdev/bios/init.h>
35 struct nvkm_subdev *subdev = &init->subdev; nv20_devinit_meminit() local
36 struct nvkm_device *device = subdev->device; nv20_devinit_meminit()
44 nvkm_error(subdev, "failed to map fb\n"); nv20_devinit_meminit()
H A Dgt215.c26 #include <subdev/bios.h>
27 #include <subdev/bios/init.h>
28 #include <subdev/bios/pll.h>
29 #include <subdev/clk/pll.h>
34 struct nvkm_subdev *subdev = &init->subdev; gt215_devinit_pll_set() local
35 struct nvkm_device *device = subdev->device; gt215_devinit_pll_set()
44 ret = gt215_pll_calc(subdev, &info, freq, &N, &fN, &M, &P); gt215_devinit_pll_set()
57 nvkm_warn(subdev, "%08x/%dKhz unimplemented\n", type, freq); gt215_devinit_pll_set()
68 struct nvkm_device *device = init->subdev.device; gt215_devinit_disable()
105 struct nvkm_device *device = init->base.subdev.device; gt215_devinit_mmio()
H A Dnv10.c29 #include <subdev/bios.h>
30 #include <subdev/bios/init.h>
35 struct nvkm_subdev *subdev = &init->subdev; nv10_devinit_meminit() local
36 struct nvkm_device *device = subdev->device; nv10_devinit_meminit()
51 nvkm_error(subdev, "failed to map fb\n"); nv10_devinit_meminit()
H A Dnv05.c29 #include <subdev/bios.h>
30 #include <subdev/bios/bmp.h>
31 #include <subdev/bios/init.h>
32 #include <subdev/vga.h>
47 struct nvkm_subdev *subdev = &init->subdev; nv05_devinit_meminit() local
48 struct nvkm_device *device = subdev->device; nv05_devinit_meminit()
59 nvkm_error(subdev, "failed to map fb\n"); nv05_devinit_meminit()
H A Dnv04.c29 #include <subdev/bios.h>
30 #include <subdev/bios/init.h>
31 #include <subdev/bios/pll.h>
32 #include <subdev/clk/pll.h>
33 #include <subdev/vga.h>
38 struct nvkm_subdev *subdev = &init->subdev; nv04_devinit_meminit() local
39 struct nvkm_device *device = subdev->device; nv04_devinit_meminit()
47 nvkm_error(subdev, "failed to map fb\n"); nv04_devinit_meminit()
146 struct nvkm_device *device = init->subdev.device; setPLL_single()
201 struct nvkm_device *device = init->subdev.device; setPLL_double_highregs()
286 struct nvkm_device *device = init->subdev.device; setPLL_double_lowregs()
358 struct nvkm_subdev *subdev = &devinit->subdev; nv04_devinit_pll_set() local
359 struct nvkm_bios *bios = subdev->device->bios; nv04_devinit_pll_set()
370 ret = nv04_pll_calc(subdev, &info, freq, &N1, &M1, &N2, &M2, &P); nv04_devinit_pll_set()
396 return nvbios_init(&init->subdev, execute); nv04_devinit_post()
403 struct nvkm_subdev *subdev = &init->base.subdev; nv04_devinit_preinit() local
404 struct nvkm_device *device = subdev->device; nv04_devinit_preinit()
421 nvkm_debug(subdev, "adaptor not initialised\n"); nv04_devinit_preinit()
432 nvkm_wrvgaowner(init->base.subdev.device, init->owner); nv04_devinit_dtor()
H A Dgm107.c26 #include <subdev/bios.h>
27 #include <subdev/bios/init.h>
32 struct nvkm_device *device = init->subdev.device; gm107_devinit_disable()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bar/
H A Dpriv.h3 #define nvkm_bar(p) container_of((p), struct nvkm_bar, subdev)
4 #include <subdev/bar.h>
H A Dbase.c37 if (bar && bar->func->kmap && bar->subdev.oneinit) nvkm_bar_kmap()
49 nvkm_bar_oneinit(struct nvkm_subdev *subdev) nvkm_bar_oneinit() argument
51 struct nvkm_bar *bar = nvkm_bar(subdev); nvkm_bar_oneinit()
56 nvkm_bar_init(struct nvkm_subdev *subdev) nvkm_bar_init() argument
58 struct nvkm_bar *bar = nvkm_bar(subdev); nvkm_bar_init()
63 nvkm_bar_dtor(struct nvkm_subdev *subdev) nvkm_bar_dtor() argument
65 struct nvkm_bar *bar = nvkm_bar(subdev); nvkm_bar_dtor()
80 nvkm_subdev_ctor(&nvkm_bar, device, index, 0, &bar->subdev); nvkm_bar_ctor()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bus/
H A Dpriv.h3 #define nvkm_bus(p) container_of((p), struct nvkm_bus, subdev)
4 #include <subdev/bus.h>
H A Dnv31.c27 #include <subdev/gpio.h>
28 #include <subdev/therm.h>
33 struct nvkm_subdev *subdev = &bus->subdev; nv31_bus_intr() local
34 struct nvkm_device *device = subdev->device; nv31_bus_intr()
41 nvkm_subdev_intr(&gpio->subdev); nv31_bus_intr()
48 nvkm_error(subdev, "MMIO %s of %08x FAULT at %06x\n", nv31_bus_intr()
59 nvkm_subdev_intr(&therm->subdev); nv31_bus_intr()
65 nvkm_error(subdev, "intr %08x\n", stat); nv31_bus_intr()
73 struct nvkm_device *device = bus->subdev.device; nv31_bus_init()
H A Dhwsq.c27 struct nvkm_subdev *subdev; member in struct:nvkm_hwsq
44 nvkm_hwsq_init(struct nvkm_subdev *subdev, struct nvkm_hwsq **phwsq) nvkm_hwsq_init() argument
50 hwsq->subdev = subdev; nvkm_hwsq_init()
66 struct nvkm_subdev *subdev = hwsq->subdev; nvkm_hwsq_fini() local
67 struct nvkm_bus *bus = subdev->device->bus; nvkm_hwsq_fini()
75 nvkm_error(subdev, "hwsq exec failed: %d\n", ret); nvkm_hwsq_fini()
77 nvkm_error(subdev, "hwsq ucode too large\n"); nvkm_hwsq_fini()
82 nvkm_error(subdev, "\t%08x\n", ((u32 *)hwsq->c.data)[i]); nvkm_hwsq_fini()
93 nvkm_debug(hwsq->subdev, "R[%06x] = %08x\n", addr, data); nvkm_hwsq_wr32()
118 nvkm_debug(hwsq->subdev, " FLAG[%02x] = %d\n", flag, data); nvkm_hwsq_setf()
130 nvkm_debug(hwsq->subdev, " WAIT[%02x] = %d\n", flag, data); nvkm_hwsq_wait()
137 struct nvkm_subdev *subdev = hwsq->subdev; nvkm_hwsq_wait_vblank() local
138 struct nvkm_device *device = subdev->device; nvkm_hwsq_wait_vblank()
157 nvkm_debug(subdev, "WAIT VBLANK !NO ACTIVE HEAD\n"); nvkm_hwsq_wait_vblank()
161 nvkm_debug(subdev, "WAIT VBLANK HEAD%d\n", head_sync); nvkm_hwsq_wait_vblank()
175 nvkm_debug(hwsq->subdev, " DELAY = %d ns\n", nsec); nvkm_hwsq_nsec()
H A Dhwsq.h3 #include <subdev/bus.h>
6 struct nvkm_subdev *subdev; member in struct:hwsq
60 hwsq_init(struct hwsq *ram, struct nvkm_subdev *subdev) hwsq_init() argument
64 ret = nvkm_hwsq_init(subdev, &ram->hwsq); hwsq_init()
69 ram->subdev = subdev; hwsq_init()
77 if (ram->subdev) { hwsq_exec()
79 ram->subdev = NULL; hwsq_exec()
87 struct nvkm_device *device = ram->subdev->device; hwsq_rd32()
H A Dnv04.c27 #include <subdev/gpio.h>
29 #include <subdev/gpio.h>
34 struct nvkm_subdev *subdev = &bus->subdev; nv04_bus_intr() local
35 struct nvkm_device *device = subdev->device; nv04_bus_intr()
39 nvkm_error(subdev, "BUS ERROR\n"); nv04_bus_intr()
47 nvkm_subdev_intr(&gpio->subdev); nv04_bus_intr()
53 nvkm_error(subdev, "intr %08x\n", stat); nv04_bus_intr()
61 struct nvkm_device *device = bus->subdev.device; nv04_bus_init()
H A Dnv50.c27 #include <subdev/therm.h>
28 #include <subdev/timer.h>
33 struct nvkm_device *device = bus->subdev.device; nv50_bus_hwsq_exec()
55 struct nvkm_subdev *subdev = &bus->subdev; nv50_bus_intr() local
56 struct nvkm_device *device = subdev->device; nv50_bus_intr()
63 nvkm_error(subdev, "MMIO %s of %08x FAULT at %06x\n", nv50_bus_intr()
74 nvkm_subdev_intr(&therm->subdev); nv50_bus_intr()
80 nvkm_error(subdev, "intr %08x\n", stat); nv50_bus_intr()
88 struct nvkm_device *device = bus->subdev.device; nv50_bus_init()
H A Dbase.c27 nvkm_bus_intr(struct nvkm_subdev *subdev) nvkm_bus_intr() argument
29 struct nvkm_bus *bus = nvkm_bus(subdev); nvkm_bus_intr()
34 nvkm_bus_init(struct nvkm_subdev *subdev) nvkm_bus_init() argument
36 struct nvkm_bus *bus = nvkm_bus(subdev); nvkm_bus_init()
42 nvkm_bus_dtor(struct nvkm_subdev *subdev) nvkm_bus_dtor() argument
44 return nvkm_bus(subdev); nvkm_bus_dtor()
61 nvkm_subdev_ctor(&nvkm_bus, device, index, 0, &bus->subdev); nvkm_bus_new_()
H A Dgf100.c30 struct nvkm_subdev *subdev = &bus->subdev; gf100_bus_intr() local
31 struct nvkm_device *device = subdev->device; gf100_bus_intr()
38 nvkm_error(subdev, gf100_bus_intr()
52 nvkm_error(subdev, "intr %08x\n", stat); gf100_bus_intr()
60 struct nvkm_device *device = bus->subdev.device; gf100_bus_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/disp/
H A Dpiocnv50.c27 #include <subdev/timer.h>
33 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_pioc_fini() local
34 struct nvkm_device *device = subdev->device; nv50_disp_pioc_fini()
42 nvkm_error(subdev, "ch %d timeout: %08x\n", chid, nv50_disp_pioc_fini()
51 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_pioc_init() local
52 struct nvkm_device *device = subdev->device; nv50_disp_pioc_init()
60 nvkm_error(subdev, "ch %d timeout0: %08x\n", chid, nv50_disp_pioc_init()
71 nvkm_error(subdev, "ch %d timeout1: %08x\n", chid, nv50_disp_pioc_init()
H A Dpiocgf119.c27 #include <subdev/timer.h>
33 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_pioc_fini() local
34 struct nvkm_device *device = subdev->device; gf119_disp_pioc_fini()
42 nvkm_error(subdev, "ch %d fini: %08x\n", chid, gf119_disp_pioc_fini()
55 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_pioc_init() local
56 struct nvkm_device *device = subdev->device; gf119_disp_pioc_init()
69 nvkm_error(subdev, "ch %d init: %08x\n", chid, gf119_disp_pioc_init()
H A Dconn.h6 #include <subdev/bios.h>
7 #include <subdev/bios/conn.h>
27 nvkm_##l(&_conn->disp->engine.subdev, "conn %02x:%02x%02x: "f"\n", \
H A Dgf119.c27 #include <subdev/bios.h>
28 #include <subdev/bios/disp.h>
29 #include <subdev/bios/init.h>
30 #include <subdev/bios/pll.h>
31 #include <subdev/devinit.h>
36 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_vblank_init()
43 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_vblank_fini()
52 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_lookup() local
53 struct nvkm_bios *bios = subdev->device->bios; exec_lookup()
70 nvkm_error(subdev, "unknown SOR mc %08x\n", ctrl); exec_lookup()
97 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_script() local
98 struct nvkm_device *device = subdev->device; exec_script()
118 .subdev = subdev, exec_script()
135 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_clkcmp() local
136 struct nvkm_device *device = subdev->device; exec_clkcmp()
181 .subdev = subdev, exec_clkcmp()
205 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_intr_unk2_0() local
212 .subdev = subdev, gf119_disp_intr_unk2_0()
213 .bios = subdev->device->bios, gf119_disp_intr_unk2_0()
228 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_intr_unk2_1()
240 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_intr_unk2_2_tu()
301 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_intr_unk2_2()
355 struct nvkm_device *device = disp->base.engine.subdev.device; gf119_disp_intr_unk4_0()
367 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_intr_supervisor() local
368 struct nvkm_device *device = subdev->device; gf119_disp_intr_supervisor()
372 nvkm_debug(subdev, "supervisor %d\n", ffs(disp->super)); gf119_disp_intr_supervisor()
375 nvkm_debug(subdev, "head %d: %08x\n", head, mask[head]); gf119_disp_intr_supervisor()
383 nvkm_debug(subdev, "supervisor 1.0 - head %d\n", head); gf119_disp_intr_supervisor()
391 nvkm_debug(subdev, "supervisor 2.0 - head %d\n", head); gf119_disp_intr_supervisor()
397 nvkm_debug(subdev, "supervisor 2.1 - head %d\n", head); gf119_disp_intr_supervisor()
403 nvkm_debug(subdev, "supervisor 2.2 - head %d\n", head); gf119_disp_intr_supervisor()
411 nvkm_debug(subdev, "supervisor 3.0 - head %d\n", head); gf119_disp_intr_supervisor()
424 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_intr_error() local
425 struct nvkm_device *device = subdev->device; gf119_disp_intr_error()
430 nvkm_error(subdev, "chid %d mthd %04x data %08x %08x %08x\n", gf119_disp_intr_error()
450 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_intr() local
451 struct nvkm_device *device = subdev->device; gf119_disp_intr()
483 nvkm_warn(subdev, "intr24 %08x\n", stat); gf119_disp_intr()
H A Ddmacgf119.c28 #include <subdev/timer.h>
43 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_dmac_fini() local
44 struct nvkm_device *device = subdev->device; gf119_disp_dmac_fini()
54 nvkm_error(subdev, "ch %d fini: %08x\n", chid, gf119_disp_dmac_fini()
67 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_dmac_init() local
68 struct nvkm_device *device = subdev->device; gf119_disp_dmac_init()
87 nvkm_error(subdev, "ch %d init: %08x\n", chid, gf119_disp_dmac_init()
H A Dnv04.c35 struct nvkm_device *device = disp->engine.subdev.device; nv04_disp_vblank_init()
42 struct nvkm_device *device = disp->engine.subdev.device; nv04_disp_vblank_fini()
49 struct nvkm_subdev *subdev = &disp->engine.subdev; nv04_disp_intr() local
50 struct nvkm_device *device = subdev->device; nv04_disp_intr()
68 nvkm_info(subdev, "PVIDEO intr: %08x\n", pvideo); nv04_disp_intr()
H A Ddport.c28 #include <subdev/bios.h>
29 #include <subdev/bios/init.h>
30 #include <subdev/i2c.h>
53 struct nvkm_subdev *subdev = &disp->engine.subdev; dp_set_link_config() local
54 struct nvkm_bios *bios = subdev->device->bios; dp_set_link_config()
56 .subdev = subdev, dp_set_link_config()
264 struct nvkm_subdev *subdev = &disp->engine.subdev; dp_link_train_init() local
266 .subdev = subdev, dp_link_train_init()
267 .bios = subdev->device->bios, dp_link_train_init()
290 struct nvkm_subdev *subdev = &disp->engine.subdev; dp_link_train_fini() local
292 .subdev = subdev, dp_link_train_fini()
293 .bios = subdev->device->bios, dp_link_train_fini()
338 if (disp->base.engine.subdev.device->chipset < 0xd0) nvkm_dp_train()
H A Dcoregf119.c28 #include <subdev/timer.h>
178 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_core_fini() local
179 struct nvkm_device *device = subdev->device; gf119_disp_core_fini()
188 nvkm_error(subdev, "core fini: %08x\n", gf119_disp_core_fini()
201 struct nvkm_subdev *subdev = &disp->base.engine.subdev; gf119_disp_core_init() local
202 struct nvkm_device *device = subdev->device; gf119_disp_core_init()
220 nvkm_error(subdev, "core init: %08x\n", gf119_disp_core_init()
H A Dcorenv50.c28 #include <subdev/timer.h>
171 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_core_fini() local
172 struct nvkm_device *device = subdev->device; nv50_disp_core_fini()
181 nvkm_error(subdev, "core fini: %08x\n", nv50_disp_core_fini()
193 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_core_init() local
194 struct nvkm_device *device = subdev->device; nv50_disp_core_init()
218 nvkm_error(subdev, "core init: %08x\n", nv50_disp_core_init()
H A Ddacnv50.c28 #include <subdev/timer.h>
36 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_dac_power()
72 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_dac_sense() local
73 struct nvkm_device *device = subdev->device; nv50_dac_sense()
108 nvkm_debug(subdev, "DAC%d sense: %08x\n", outp->or, loadval); nv50_dac_sense()
H A Dchannv50.c39 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_mthd_list() local
40 struct nvkm_device *device = subdev->device; nv50_disp_mthd_list()
56 nvkm_printk_(subdev, debug, info, nv50_disp_mthd_list()
68 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_chan_mthd() local
73 if (debug > subdev->debug) nv50_disp_chan_mthd()
95 nvkm_printk_(subdev, debug, info, "%s%s:\n", cname, sname); nv50_disp_chan_mthd()
106 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_chan_uevent_fini()
115 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_chan_uevent_init()
161 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_chan_rd32()
171 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_chan_wr32()
197 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_chan_map()
H A Ddmacnv50.c30 #include <subdev/fb.h>
31 #include <subdev/timer.h>
60 struct nvkm_device *device = root->disp->base.engine.subdev.device; nv50_disp_dmac_child_new_()
89 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_dmac_child_get_()
140 struct nvkm_device *device = root->disp->base.engine.subdev.device; nv50_disp_dmac_new_()
191 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_dmac_fini() local
192 struct nvkm_device *device = subdev->device; nv50_disp_dmac_fini()
202 nvkm_error(subdev, "ch %d fini timeout, %08x\n", chid, nv50_disp_dmac_fini()
214 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_dmac_init() local
215 struct nvkm_device *device = subdev->device; nv50_disp_dmac_init()
234 nvkm_error(subdev, "ch %d init timeout, %08x\n", chid, nv50_disp_dmac_init()
H A Doutp.h5 #include <subdev/bios.h>
6 #include <subdev/bios/dcb.h>
49 nvkm_##l(&_outp->disp->engine.subdev, "outp %02x:%04x:%04x: "f"\n", \
H A Doutpdp.h6 nvkm_##l(&outp->base.disp->engine.subdev, "%02x:%04x:%04x: "f, \
15 #include <subdev/bios.h>
16 #include <subdev/bios/dp.h>
H A Dnv50.c30 #include <subdev/bios.h>
31 #include <subdev/bios/disp.h>
32 #include <subdev/bios/init.h>
33 #include <subdev/bios/pll.h>
34 #include <subdev/devinit.h>
166 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_vblank_fini()
173 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_vblank_init()
195 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_intr_error() local
196 struct nvkm_device *device = subdev->device; nv50_disp_intr_error()
207 nvkm_error(subdev, nv50_disp_intr_error()
231 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_lookup() local
232 struct nvkm_bios *bios = subdev->device->bios; exec_lookup()
249 nvkm_error(subdev, "unknown SOR mc %08x\n", ctrl); exec_lookup()
260 nvkm_error(subdev, "unknown PIOR mc %08x\n", ctrl); exec_lookup()
287 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_script() local
288 struct nvkm_device *device = subdev->device; exec_script()
329 .subdev = subdev, exec_script()
346 struct nvkm_subdev *subdev = &disp->base.engine.subdev; exec_clkcmp() local
347 struct nvkm_device *device = subdev->device; exec_clkcmp()
418 .subdev = subdev, exec_clkcmp()
442 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_intr_unk20_0() local
461 .subdev = subdev, nv50_disp_intr_unk20_0()
462 .bios = subdev->device->bios, nv50_disp_intr_unk20_0()
477 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_intr_unk20_1()
488 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_intr_unk20_2_dp() local
489 struct nvkm_device *device = subdev->device; nv50_disp_intr_unk20_2_dp()
588 nvkm_error(subdev, "unable to find suitable dp config\n"); nv50_disp_intr_unk20_2_dp()
608 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_intr_unk20_2()
700 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_intr_unk40_0_tmds()
716 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_intr_unk40_0()
734 struct nvkm_subdev *subdev = &disp->base.engine.subdev; nv50_disp_intr_supervisor() local
735 struct nvkm_device *device = subdev->device; nv50_disp_intr_supervisor()
739 nvkm_debug(subdev, "supervisor %08x %08x\n", disp->super, super); nv50_disp_intr_supervisor()
782 struct nvkm_device *device = disp->base.engine.subdev.device; nv50_disp_intr()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/therm/
H A Dnv40.c32 switch (therm->subdev.device->chipset) { nv40_sensor_style()
55 struct nvkm_device *device = therm->subdev.device; nv40_sensor_setup()
75 struct nvkm_device *device = therm->subdev.device; nv40_temp_get()
108 struct nvkm_subdev *subdev = &therm->subdev; nv40_fan_pwm_ctrl() local
109 struct nvkm_device *device = subdev->device; nv40_fan_pwm_ctrl()
114 nvkm_error(subdev, "unknown pwm ctrl for gpio %d\n", line); nv40_fan_pwm_ctrl()
123 struct nvkm_subdev *subdev = &therm->subdev; nv40_fan_pwm_get() local
124 struct nvkm_device *device = subdev->device; nv40_fan_pwm_get()
141 nvkm_error(subdev, "unknown pwm ctrl for gpio %d\n", line); nv40_fan_pwm_get()
151 struct nvkm_subdev *subdev = &therm->subdev; nv40_fan_pwm_set() local
152 struct nvkm_device *device = subdev->device; nv40_fan_pwm_set()
160 nvkm_error(subdev, "unknown pwm ctrl for gpio %d\n", line); nv40_fan_pwm_set()
170 struct nvkm_subdev *subdev = &therm->subdev; nv40_therm_intr() local
171 struct nvkm_device *device = subdev->device; nv40_therm_intr()
179 nvkm_error(subdev, "THERM received an IRQ: stat = %x\n", stat); nv40_therm_intr()
H A Dfan.c27 #include <subdev/bios/fan.h>
28 #include <subdev/gpio.h>
29 #include <subdev/timer.h>
35 struct nvkm_subdev *subdev = &therm->subdev; nvkm_fan_update() local
36 struct nvkm_timer *tmr = subdev->device->timer; nvkm_fan_update()
48 nvkm_debug(subdev, "FAN target: %d\n", target); nvkm_fan_update()
73 nvkm_debug(subdev, "FAN update: %d\n", duty); nvkm_fan_update()
126 struct nvkm_device *device = therm->subdev.device; nvkm_therm_fan_sense()
216 struct nvkm_timer *tmr = therm->subdev.device->timer; nvkm_therm_fan_fini()
225 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_fan_ctor() local
226 struct nvkm_device *device = subdev->device; nvkm_therm_fan_ctor()
237 nvkm_debug(subdev, "GPIO_FAN is in input mode\n"); nvkm_therm_fan_ctor()
253 nvkm_debug(subdev, "FAN control: %s\n", therm->fan->type); nvkm_therm_fan_ctor()
273 nvkm_debug(subdev, "parsing the fan table failed\n"); nvkm_therm_fan_ctor()
275 nvkm_error(subdev, "parsing both fan tables failed\n"); nvkm_therm_fan_ctor()
H A Dbase.c91 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_update() local
92 struct nvkm_timer *tmr = subdev->device->timer; nvkm_therm_update()
138 nvkm_debug(subdev, "FAN target request: %d%%\n", duty); nvkm_therm_update()
146 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_cstate() local
149 nvkm_debug(subdev, "default fan speed -> %d%%\n", fan); nvkm_therm_cstate()
167 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_fan_mode() local
168 struct nvkm_device *device = subdev->device; nvkm_therm_fan_mode()
190 nvkm_debug(subdev, "fan management: %s\n", name[mode]); nvkm_therm_fan_mode()
285 nvkm_therm_intr(struct nvkm_subdev *subdev) nvkm_therm_intr() argument
287 struct nvkm_therm *therm = nvkm_therm(subdev); nvkm_therm_intr()
293 nvkm_therm_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_therm_fini() argument
295 struct nvkm_therm *therm = nvkm_therm(subdev); nvkm_therm_fini()
312 nvkm_therm_oneinit(struct nvkm_subdev *subdev) nvkm_therm_oneinit() argument
314 struct nvkm_therm *therm = nvkm_therm(subdev); nvkm_therm_oneinit()
324 nvkm_therm_init(struct nvkm_subdev *subdev) nvkm_therm_init() argument
326 struct nvkm_therm *therm = nvkm_therm(subdev); nvkm_therm_init()
344 nvkm_therm_dtor(struct nvkm_subdev *subdev) nvkm_therm_dtor() argument
346 struct nvkm_therm *therm = nvkm_therm(subdev); nvkm_therm_dtor()
369 nvkm_subdev_ctor(&nvkm_therm, device, index, 0, &therm->subdev); nvkm_therm_new_()
H A Dgf119.c29 struct nvkm_subdev *subdev = &therm->subdev; pwm_info() local
30 struct nvkm_device *device = subdev->device; pwm_info()
48 nvkm_error(subdev, "GPIO %d unknown PWM: %08x\n", line, gpio); pwm_info()
55 struct nvkm_device *device = therm->subdev.device; gf119_fan_pwm_ctrl()
69 struct nvkm_device *device = therm->subdev.device; gf119_fan_pwm_get()
91 struct nvkm_device *device = therm->subdev.device; gf119_fan_pwm_set()
108 struct nvkm_device *device = therm->subdev.device; gf119_fan_pwm_clock()
121 struct nvkm_device *device = therm->subdev.device; gf119_therm_init()
H A Dnv50.c30 struct nvkm_subdev *subdev = &therm->subdev; pwm_info() local
47 nvkm_error(subdev, "unknown pwm ctrl for gpio %d\n", *line); pwm_info()
57 struct nvkm_device *device = therm->subdev.device; nv50_fan_pwm_ctrl()
68 struct nvkm_device *device = therm->subdev.device; nv50_fan_pwm_get()
85 struct nvkm_device *device = therm->subdev.device; nv50_fan_pwm_set()
98 struct nvkm_device *device = therm->subdev.device; nv50_fan_pwm_clock()
123 struct nvkm_device *device = therm->subdev.device; nv50_sensor_setup()
131 struct nvkm_device *device = therm->subdev.device; nv50_temp_get()
H A Dfanpwm.c28 #include <subdev/bios.h>
29 #include <subdev/bios/fan.h>
30 #include <subdev/gpio.h>
41 struct nvkm_device *device = therm->subdev.device; nvkm_fanpwm_get()
62 int card_type = therm->subdev.device->card_type; nvkm_fanpwm_set()
87 struct nvkm_device *device = therm->subdev.device; nvkm_fanpwm_create()
H A Dg84.c27 #include <subdev/fuse.h>
32 struct nvkm_device *device = therm->subdev.device; g84_temp_get()
43 struct nvkm_device *device = therm->subdev.device; g84_sensor_setup()
57 struct nvkm_subdev *subdev = &therm->subdev; g84_therm_program_alarms() local
58 struct nvkm_device *device = subdev->device; g84_therm_program_alarms()
80 nvkm_debug(subdev, g84_therm_program_alarms()
100 struct nvkm_device *device = therm->subdev.device; g84_therm_threshold_hyst_emulation()
141 struct nvkm_subdev *subdev = &therm->subdev; g84_therm_intr() local
142 struct nvkm_device *device = subdev->device; g84_therm_intr()
184 nvkm_error(subdev, "intr %08x\n", intr); g84_therm_intr()
196 struct nvkm_device *device = therm->subdev.device; g84_therm_fini()
H A Dtemp.c84 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_sensor_event() local
95 nvkm_info(subdev, nvkm_therm_sensor_event()
99 nvkm_info(subdev, "temperature (%i C) hit the '%s' threshold\n", nvkm_therm_sensor_event()
167 struct nvkm_timer *tmr = therm->subdev.device->timer; alarm_timer_callback()
197 nvkm_debug(&therm->subdev, nvkm_therm_program_alarms_polling()
221 struct nvkm_timer *tmr = therm->subdev.device->timer; nvkm_therm_sensor_fini()
235 nvkm_debug(&therm->subdev, "internal sensor: %s\n", sensor_avail); nvkm_therm_sensor_preinit()
241 struct nvkm_subdev *subdev = &therm->subdev; nvkm_therm_sensor_ctor() local
242 struct nvkm_bios *bios = subdev->device->bios; nvkm_therm_sensor_ctor()
249 nvkm_error(subdev, "nvbios_therm_sensor_parse failed\n"); nvkm_therm_sensor_ctor()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mc/
H A Dbase.c59 struct nvkm_device *device = mc->subdev.device; nvkm_mc_intr()
60 struct nvkm_subdev *subdev; nvkm_mc_intr() local
67 subdev = nvkm_device_subdev(device, map->unit); nvkm_mc_intr()
68 if (subdev) nvkm_mc_intr()
69 nvkm_subdev_intr(subdev); nvkm_mc_intr()
76 nvkm_error(&mc->subdev, "intr %08x\n", stat); nvkm_mc_intr()
81 nvkm_mc_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_mc_fini() argument
83 struct nvkm_mc *mc = nvkm_mc(subdev); nvkm_mc_fini()
89 nvkm_mc_init(struct nvkm_subdev *subdev) nvkm_mc_init() argument
91 struct nvkm_mc *mc = nvkm_mc(subdev); nvkm_mc_init()
99 nvkm_mc_dtor(struct nvkm_subdev *subdev) nvkm_mc_dtor() argument
101 return nvkm_mc(subdev); nvkm_mc_dtor()
120 nvkm_subdev_ctor(&nvkm_mc, device, index, 0, &mc->subdev); nvkm_mc_new_()
H A Dpriv.h3 #define nvkm_mc(p) container_of((p), struct nvkm_mc, subdev)
4 #include <subdev/mc.h>
H A Dnv04.c44 struct nvkm_device *device = mc->subdev.device; nv04_mc_intr_unarm()
52 struct nvkm_device *device = mc->subdev.device; nv04_mc_intr_rearm()
59 return nvkm_rd32(mc->subdev.device, 0x000100); nv04_mc_intr_mask()
65 struct nvkm_device *device = mc->subdev.device; nv04_mc_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/fb/
H A Dbase.c27 #include <subdev/bios.h>
28 #include <subdev/bios/M0203.h>
54 struct nvkm_device *device = fb->subdev.device; nvkm_fb_tile_prog()
67 struct nvkm_subdev *subdev = &bios->subdev; nvkm_fb_bios_memtype() local
68 struct nvkm_device *device = subdev->device; nvkm_fb_bios_memtype()
80 nvkm_warn(subdev, "M0203E type %02x\n", M0203E.type); nvkm_fb_bios_memtype()
85 nvkm_warn(subdev, "M0203E not matched!\n"); nvkm_fb_bios_memtype()
90 nvkm_fb_intr(struct nvkm_subdev *subdev) nvkm_fb_intr() argument
92 struct nvkm_fb *fb = nvkm_fb(subdev); nvkm_fb_intr()
98 nvkm_fb_oneinit(struct nvkm_subdev *subdev) nvkm_fb_oneinit() argument
100 struct nvkm_fb *fb = nvkm_fb(subdev); nvkm_fb_oneinit()
104 nvkm_error(subdev, "vram setup failed, %d\n", ret); nvkm_fb_oneinit()
112 nvkm_fb_init(struct nvkm_subdev *subdev) nvkm_fb_init() argument
114 struct nvkm_fb *fb = nvkm_fb(subdev); nvkm_fb_init()
132 nvkm_fb_dtor(struct nvkm_subdev *subdev) nvkm_fb_dtor() argument
134 struct nvkm_fb *fb = nvkm_fb(subdev); nvkm_fb_dtor()
159 nvkm_subdev_ctor(&nvkm_fb, device, index, 0, &fb->subdev); nvkm_fb_ctor()
H A Dramnv50.c30 #include <subdev/bios.h>
31 #include <subdev/bios/perf.h>
32 #include <subdev/bios/pll.h>
33 #include <subdev/bios/rammap.h>
34 #include <subdev/bios/timing.h>
35 #include <subdev/clk/pll.h>
36 #include <subdev/gpio.h>
76 struct nvkm_subdev *subdev = &ram->base.fb->subdev; nv50_ram_timing_calc() local
77 struct nvkm_device *device = subdev->device; nv50_ram_timing_calc()
142 nvkm_debug(subdev, " 220: %08x %08x %08x %08x\n", nv50_ram_timing_calc()
144 nvkm_debug(subdev, " 230: %08x %08x %08x %08x\n", nv50_ram_timing_calc()
146 nvkm_debug(subdev, " 240: %08x\n", timing[8]); nv50_ram_timing_calc()
155 struct nvkm_subdev *subdev = &ram->base.fb->subdev; nv50_ram_timing_read() local
156 struct nvkm_device *device = subdev->device; nv50_ram_timing_read()
194 struct nvkm_gpio *gpio = hwsq->base.subdev->device->gpio; nv50_ram_gpio()
223 struct nvkm_subdev *subdev = &ram->base.fb->subdev; nv50_ram_calc() local
224 struct nvkm_bios *bios = subdev->device->bios; nv50_ram_calc()
246 nvkm_error(subdev, "invalid/missing perftab entry\n"); nv50_ram_calc()
254 strap = nvbios_ramcfg_index(subdev); nv50_ram_calc()
256 nvkm_error(subdev, "invalid ramcfg strap\n"); nv50_ram_calc()
263 nvkm_error(subdev, "invalid/missing rammap entry "); nv50_ram_calc()
272 nvkm_error(subdev, "invalid/missing timing entry " nv50_ram_calc()
282 ret = ram_init(hwsq, subdev); nv50_ram_calc()
301 nvkm_error(subdev, "Could not calculate MR\n"); nv50_ram_calc()
305 if (subdev->device->chipset <= 0x96 && !next->bios.ramcfg_00_03_02) nv50_ram_calc()
331 ret = nv04_pll_calc(subdev, &mpll, freq, nv50_ram_calc()
360 if (subdev->device->chipset >= 0x92) nv50_ram_calc()
409 if (subdev->device->chipset <= 0x96) { nv50_ram_calc()
474 if (subdev->device->chipset <= 0x96 && next->bios.ramcfg_00_03_02) nv50_ram_calc()
484 struct nvkm_device *device = ram->base.fb->subdev.device; nv50_ram_prog()
520 mutex_lock(&ram->fb->subdev.mutex); nv50_ram_put()
522 mutex_unlock(&ram->fb->subdev.mutex); nv50_ram_put()
548 mutex_lock(&ram->fb->subdev.mutex); nv50_ram_get()
573 mutex_unlock(&ram->fb->subdev.mutex); nv50_ram_get()
581 mutex_unlock(&ram->fb->subdev.mutex); nv50_ram_get()
601 struct nvkm_subdev *subdev = &ram->fb->subdev; nv50_fb_vram_rblock() local
602 struct nvkm_device *device = subdev->device; nv50_fb_vram_rblock()
610 nvkm_debug(subdev, "memcfg %08x %08x %08x %08x\n", nv50_fb_vram_rblock()
624 nvkm_warn(subdev, "memory controller reports %d MiB VRAM\n", nv50_fb_vram_rblock()
632 nvkm_debug(subdev, "rblock %d bytes\n", rblock_size); nv50_fb_vram_rblock()
640 struct nvkm_device *device = fb->subdev.device; nv50_ram_ctor()
H A Dramnv40.c26 #include <subdev/bios.h>
27 #include <subdev/bios/bit.h>
28 #include <subdev/bios/init.h>
29 #include <subdev/bios/pll.h>
30 #include <subdev/clk/pll.h>
31 #include <subdev/timer.h>
37 struct nvkm_subdev *subdev = &ram->base.fb->subdev; nv40_ram_calc() local
38 struct nvkm_bios *bios = subdev->device->bios; nv40_ram_calc()
45 nvkm_error(subdev, "mclk pll data not found\n"); nv40_ram_calc()
49 ret = nv04_pll_calc(subdev, &pll, freq, &N1, &M1, &N2, &M2, &log2P); nv40_ram_calc()
70 struct nvkm_subdev *subdev = &ram->base.fb->subdev; nv40_ram_prog() local
71 struct nvkm_device *device = subdev->device; nv40_ram_prog()
155 .subdev = subdev, nv40_ram_prog()
210 struct nvkm_device *device = fb->subdev.device; nv40_ram_new()
H A Dramseq.h3 #include <subdev/bus/hwsq.h>
H A Dgf100.c40 struct nvkm_subdev *subdev = &fb->base.subdev; gf100_fb_intr() local
41 struct nvkm_device *device = subdev->device; gf100_fb_intr()
44 nvkm_debug(subdev, "PFFB intr\n"); gf100_fb_intr()
46 nvkm_debug(subdev, "PBFB intr\n"); gf100_fb_intr()
53 struct nvkm_device *device = fb->base.subdev.device; gf100_fb_init()
65 struct nvkm_device *device = fb->base.subdev.device; gf100_fb_dtor()
H A Dramgf100.c29 #include <subdev/bios.h>
30 #include <subdev/bios/pll.h>
31 #include <subdev/bios/rammap.h>
32 #include <subdev/bios/timing.h>
33 #include <subdev/clk.h>
34 #include <subdev/clk/pll.h>
35 #include <subdev/ltc.h>
112 struct nvkm_device *device = fb->subdev.device; gf100_ram_train()
132 struct nvkm_subdev *subdev = &ram->base.fb->subdev; gf100_ram_calc() local
133 struct nvkm_device *device = subdev->device; gf100_ram_calc()
151 nvkm_error(subdev, "invalid/missing rammap entry\n"); gf100_ram_calc()
156 strap = nvbios_ramcfg_index(subdev); gf100_ram_calc()
158 nvkm_error(subdev, "invalid ramcfg strap\n"); gf100_ram_calc()
164 nvkm_error(subdev, "invalid/missing ramcfg entry\n"); gf100_ram_calc()
174 nvkm_error(subdev, "invalid/missing timing entry\n"); gf100_ram_calc()
216 ret = gt215_pll_calc(subdev, &ram->refpll, ram->mempll.refclk, gf100_ram_calc()
219 nvkm_error(subdev, "unable to calc refpll\n"); gf100_ram_calc()
231 ret = gt215_pll_calc(subdev, &ram->mempll, freq, gf100_ram_calc()
234 nvkm_error(subdev, "unable to calc refpll\n"); gf100_ram_calc()
411 struct nvkm_device *device = ram->base.fb->subdev.device; gf100_ram_prog()
428 struct nvkm_ltc *ltc = ram->fb->subdev.device->ltc; gf100_ram_put()
435 mutex_lock(&ram->fb->subdev.mutex); gf100_ram_put()
439 mutex_unlock(&ram->fb->subdev.mutex); gf100_ram_put()
448 struct nvkm_ltc *ltc = ram->fb->subdev.device->ltc; gf100_ram_get()
470 mutex_lock(&ram->fb->subdev.mutex); gf100_ram_get()
489 mutex_unlock(&ram->fb->subdev.mutex); gf100_ram_get()
497 mutex_unlock(&ram->fb->subdev.mutex); gf100_ram_get()
521 struct nvkm_device *device = ram->base.fb->subdev.device; gf100_ram_init()
562 struct nvkm_subdev *subdev = &fb->subdev; gf100_ram_ctor() local
563 struct nvkm_device *device = subdev->device; gf100_ram_ctor()
575 nvkm_debug(subdev, "100800: %08x\n", nvkm_rd32(device, 0x100800)); gf100_ram_ctor()
576 nvkm_debug(subdev, "parts %08x mask %08x\n", parts, pmask); gf100_ram_ctor()
590 nvkm_debug(subdev, "%d: %d MiB\n", i, (u32)(psize >> 20)); gf100_ram_ctor()
631 struct nvkm_subdev *subdev = &fb->subdev; gf100_ram_new() local
632 struct nvkm_bios *bios = subdev->device->bios; gf100_ram_new()
646 nvkm_error(subdev, "mclk refpll data not found\n"); gf100_ram_new()
652 nvkm_error(subdev, "mclk pll data not found\n"); gf100_ram_new()
H A Dramfuc.h3 #include <subdev/fb.h>
4 #include <subdev/pmu.h>
60 int ret = nvkm_memx_init(fb->subdev.device->pmu, &ram->memx); ramfuc_init()
83 struct nvkm_device *device = ram->fb->subdev.device; ramfuc_rd32()
148 return nvkm_memx_train_result(fb->subdev.device->pmu, result, rsize); ramfuc_train_result()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/bios/
H A Dramcfg.c24 #include <subdev/bios.h>
25 #include <subdev/bios/bit.h>
26 #include <subdev/bios/ramcfg.h>
27 #include <subdev/bios/M0203.h>
30 nvbios_ramcfg_strap(struct nvkm_subdev *subdev) nvbios_ramcfg_strap() argument
32 return (nvkm_rd32(subdev->device, 0x101000) & 0x0000003c) >> 2; nvbios_ramcfg_strap()
51 nvbios_ramcfg_index(struct nvkm_subdev *subdev) nvbios_ramcfg_index() argument
53 struct nvkm_bios *bios = subdev->device->bios; nvbios_ramcfg_index()
54 u8 strap = nvbios_ramcfg_strap(subdev); nvbios_ramcfg_index()
H A Dmxm.c24 #include <subdev/bios.h>
25 #include <subdev/bios/bit.h>
26 #include <subdev/bios/mxm.h>
31 struct nvkm_subdev *subdev = &bios->subdev; mxm_table() local
35 nvkm_debug(subdev, "BIT 'x' table not present\n"); mxm_table()
42 nvkm_warn(subdev, "BIT 'x' table %d/%d unknown\n", *ver, *hdr); mxm_table()
77 struct nvkm_subdev *subdev = &bios->subdev; mxm_sor_map() local
94 nvkm_warn(subdev, "unknown sor map v%02x\n", ver); mxm_sor_map()
107 nvkm_warn(subdev, "missing sor map\n"); mxm_sor_map()
114 struct nvkm_subdev *subdev = &bios->subdev; mxm_ddc_map() local
131 nvkm_warn(subdev, "unknown ddc map v%02x\n", ver); mxm_ddc_map()
H A Dimage.c24 #include <subdev/bios.h>
25 #include <subdev/bios/image.h>
26 #include <subdev/bios/pcir.h>
27 #include <subdev/bios/npde.h>
32 struct nvkm_subdev *subdev = &bios->subdev; nvbios_imagen() local
45 nvkm_debug(subdev, "%08x: ROM signature (%04x) unknown\n", nvbios_imagen()
H A Dshadowramin.c33 struct nvkm_device *device = bios->subdev.device; pramin_read()
48 struct nvkm_device *device = priv->bios->subdev.device; pramin_fini()
57 struct nvkm_subdev *subdev = &bios->subdev; pramin_init() local
58 struct nvkm_device *device = subdev->device; pramin_init()
73 nvkm_debug(subdev, "... display disabled\n"); pramin_init()
83 nvkm_debug(subdev, "... not enabled\n"); pramin_init()
87 nvkm_debug(subdev, "... not in vram\n"); pramin_init()
100 nvkm_error(subdev, "... out of memory\n"); pramin_init()
H A Dshadow.c27 #include <subdev/bios.h>
28 #include <subdev/bios/image.h>
54 struct nvkm_subdev *subdev = &bios->subdev; shadow_image() local
65 nvkm_debug(subdev, "%08x: header fetch failed\n", shadow_image()
71 nvkm_debug(subdev, "image %d invalid\n", idx); shadow_image()
75 nvkm_debug(subdev, "%08x: type %02x, %d bytes\n", shadow_image()
79 nvkm_debug(subdev, "%08x: fetch failed\n", image.base); shadow_image()
87 nvkm_debug(subdev, "%08x: checksum failed\n", shadow_image()
110 struct nvkm_subdev *subdev = &bios->subdev; shadow_method() local
112 nvkm_debug(subdev, "trying %s...\n", name ? name : func->name); shadow_method()
123 nvkm_debug(subdev, "scored %d\n", mthd->score); shadow_method()
146 struct device *dev = bios->subdev.device->dev; shadow_fw_init()
166 struct nvkm_subdev *subdev = &bios->subdev; nvbios_shadow() local
167 struct nvkm_device *device = subdev->device; nvbios_shadow()
204 nvkm_error(subdev, "%s invalid\n", source); nvbios_shadow()
229 nvkm_error(subdev, "unable to locate usable image\n"); nvbios_shadow()
233 nvkm_debug(subdev, "using image from %s\n", best->func ? nvbios_shadow()
H A Dpriv.h3 #define nvkm_bios(p) container_of((p), struct nvkm_bios, subdev)
4 #include <subdev/bios.h>
H A Dbase.c26 #include <subdev/bios.h>
27 #include <subdev/bios/bmp.h>
28 #include <subdev/bios/bit.h>
87 nvkm_bios_dtor(struct nvkm_subdev *subdev) nvkm_bios_dtor() argument
89 struct nvkm_bios *bios = nvkm_bios(subdev); nvkm_bios_dtor()
108 nvkm_subdev_ctor(&nvkm_bios, device, index, 0, &bios->subdev); nvkm_bios_new()
118 nvkm_debug(&bios->subdev, "BMP version %x.%x\n", nvkm_bios_new()
126 nvkm_debug(&bios->subdev, "BIT signature found\n"); nvkm_bios_new()
143 nvkm_info(&bios->subdev, "version %02x.%02x.%02x.%02x.%02x\n", nvkm_bios_new()
H A Dnpde.c24 #include <subdev/bios.h>
25 #include <subdev/bios/npde.h>
26 #include <subdev/bios/pcir.h>
39 nvkm_debug(&bios->subdev, nvbios_npdeTe()
H A DM0203.c24 #include <subdev/bios.h>
25 #include <subdev/bios/bit.h>
26 #include <subdev/bios/M0203.h>
106 struct nvkm_subdev *subdev = &bios->subdev; nvbios_M0203Em() local
112 nvkm_warn(subdev, "M0203T not found\n"); nvbios_M0203Em()
123 nvkm_warn(subdev, "M0203T type %02x\n", M0203T.type); nvbios_M0203Em()
H A Di2c.c24 #include <subdev/bios.h>
25 #include <subdev/bios/dcb.h>
26 #include <subdev/bios/i2c.h>
41 nvkm_warn(&bios->subdev, "ccb %02x not supported\n", *ver); dcb_i2c_table()
73 struct nvkm_subdev *subdev = &bios->subdev; dcb_i2c_parse() local
130 nvkm_warn(subdev, "unknown i2c type %d\n", info->type); dcb_i2c_parse()
/linux-4.4.14/drivers/media/rc/img-ir/
H A Dimg-ir-sony.c18 unsigned int dev, subdev, func; img_ir_sony_scancode() local
27 subdev = 0; img_ir_sony_scancode()
36 subdev = 0; img_ir_sony_scancode()
46 subdev = raw & 0xff; /* next 8 bits */ img_ir_sony_scancode()
52 request->scancode = dev << 16 | subdev << 8 | func; img_ir_sony_scancode()
60 unsigned int dev, subdev, func; img_ir_sony_filter() local
66 subdev = (in->data >> 8) & 0xff; img_ir_sony_filter()
71 if (subdev & subdev_m) { img_ir_sony_filter()
72 /* can't encode subdev and higher device bits */ img_ir_sony_filter()
98 subdev &= subdev_m; img_ir_sony_filter()
103 subdev << 15; img_ir_sony_filter()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/mpeg/
H A Dnv50.c27 #include <subdev/timer.h>
39 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 128 * 4, nv50_mpeg_cclass_bind()
56 * PMPEG engine/subdev functions
62 struct nvkm_subdev *subdev = &mpeg->subdev; nv50_mpeg_intr() local
63 struct nvkm_device *device = subdev->device; nv50_mpeg_intr()
79 nvkm_info(subdev, "%08x %08x %08x %08x\n", nv50_mpeg_intr()
90 struct nvkm_subdev *subdev = &mpeg->subdev; nv50_mpeg_init() local
91 struct nvkm_device *device = subdev->device; nv50_mpeg_init()
111 nvkm_error(subdev, "timeout %08x\n", nv50_mpeg_init()
H A Dnv31.c28 #include <subdev/fb.h>
29 #include <subdev/timer.h>
42 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 16, align, nv31_mpeg_object_bind()
110 * PMPEG engine/subdev functions
117 struct nvkm_device *device = mpeg->engine.subdev.device; nv31_mpeg_tile()
166 struct nvkm_device *device = mpeg->engine.subdev.device; nv31_mpeg_mthd()
182 struct nvkm_subdev *subdev = &mpeg->engine.subdev; nv31_mpeg_intr() local
183 struct nvkm_device *device = subdev->device; nv31_mpeg_intr()
210 nvkm_error(subdev, "ch %d [%s] %08x %08x %08x %08x\n", nv31_mpeg_intr()
222 struct nvkm_subdev *subdev = &mpeg->subdev; nv31_mpeg_init() local
223 struct nvkm_device *device = subdev->device; nv31_mpeg_init()
243 nvkm_error(subdev, "timeout %08x\n", nv31_mpeg_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/instmem/
H A Dpriv.h3 #define nvkm_instmem(p) container_of((p), struct nvkm_instmem, subdev)
4 #include <subdev/instmem.h>
H A Dnv50.c28 #include <subdev/bar.h>
29 #include <subdev/fb.h>
30 #include <subdev/mmu.h>
74 struct nvkm_subdev *subdev = &iobj->imem->base.subdev; nv50_instobj_boot() local
75 struct nvkm_device *device = subdev->device; nv50_instobj_boot()
90 nvkm_warn(subdev, "PRAMIN ioremap failed\n"); nv50_instobj_boot()
94 nvkm_warn(subdev, "PRAMIN exhausted\n"); nv50_instobj_boot()
110 struct nvkm_bar *bar = imem->base.subdev.device->bar; nv50_instobj_acquire()
129 struct nvkm_device *device = imem->base.subdev.device; nv50_instobj_rd32()
147 struct nvkm_device *device = imem->base.subdev.device; nv50_instobj_wr32()
169 struct nvkm_ram *ram = iobj->imem->base.subdev.device->fb->ram; nv50_instobj_dtor()
198 struct nvkm_ram *ram = imem->base.subdev.device->fb->ram; nv50_instobj_new()
220 * instmem subdev implementation
H A Dbase.c27 #include <subdev/bar.h>
68 nvkm_bar_flush(iobj->imem->subdev.device->bar); nvkm_instobj_release()
220 * instmem subdev base implementation
236 nvkm_instmem_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_instmem_fini() argument
238 struct nvkm_instmem *imem = nvkm_instmem(subdev); nvkm_instmem_fini()
263 nvkm_instmem_oneinit(struct nvkm_subdev *subdev) nvkm_instmem_oneinit() argument
265 struct nvkm_instmem *imem = nvkm_instmem(subdev); nvkm_instmem_oneinit()
272 nvkm_instmem_init(struct nvkm_subdev *subdev) nvkm_instmem_init() argument
274 struct nvkm_instmem *imem = nvkm_instmem(subdev); nvkm_instmem_init()
293 nvkm_instmem_dtor(struct nvkm_subdev *subdev) nvkm_instmem_dtor() argument
295 struct nvkm_instmem *imem = nvkm_instmem(subdev); nvkm_instmem_dtor()
314 nvkm_subdev_ctor(&nvkm_instmem, device, index, 0, &imem->subdev); nvkm_instmem_ctor()
H A Dgk20a.c49 #include <subdev/fb.h>
50 #include <subdev/ltc.h>
138 struct device *dev = node->base.imem->base.subdev.device->dev; gk20a_instobj_cpu_map_dma()
185 nvkm_debug(&imem->base.subdev, "(GC) vaddr used: %x/%x\n", gk20a_instmem_vaddr_gc()
196 struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; gk20a_instobj_acquire()
217 nvkm_error(&imem->base.subdev, "cannot map instobj - " gk20a_instobj_acquire()
223 nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", gk20a_instobj_acquire()
237 struct nvkm_ltc *ltc = imem->base.subdev.device->ltc; gk20a_instobj_release()
299 nvkm_debug(&imem->base.subdev, "vaddr used: %x/%x\n", gk20a_instobj_dtor()
311 struct device *dev = imem->base.subdev.device->dev; gk20a_instobj_dtor_dma()
330 struct device *dev = imem->base.subdev.device->dev; gk20a_instobj_dtor_iommu()
394 struct nvkm_subdev *subdev = &imem->base.subdev; gk20a_instobj_ctor_dma() local
395 struct device *dev = subdev->device->dev; gk20a_instobj_ctor_dma()
407 nvkm_error(subdev, "cannot allocate DMA memory\n"); gk20a_instobj_ctor_dma()
413 nvkm_warn(subdev, gk20a_instobj_ctor_dma()
435 struct nvkm_subdev *subdev = &imem->base.subdev; gk20a_instobj_ctor_iommu() local
436 struct device *dev = subdev->device->dev; gk20a_instobj_ctor_iommu()
465 nvkm_error(subdev, "DMA mapping error!\n"); gk20a_instobj_ctor_iommu()
478 nvkm_error(subdev, "IOMMU space is full!\n"); gk20a_instobj_ctor_iommu()
489 nvkm_error(subdev, "IOMMU mapping failure: %d\n", ret); gk20a_instobj_ctor_iommu()
531 struct nvkm_subdev *subdev = &imem->base.subdev; gk20a_instobj_new() local
535 nvkm_debug(subdev, "%s (%s): size: %x align: %x\n", __func__, gk20a_instobj_new()
559 nvkm_debug(subdev, "alloc size: 0x%x, align: 0x%x, gaddr: 0x%llx\n", gk20a_instobj_new()
572 nvkm_warn(&base->subdev, "instobj LRU not empty!\n"); gk20a_instmem_dtor()
575 nvkm_warn(&base->subdev, "instobj vmap area not empty! " gk20a_instmem_dtor()
615 nvkm_info(&imem->base.subdev, "using IOMMU\n"); gk20a_instmem_new()
625 nvkm_info(&imem->base.subdev, "using DMA API\n"); gk20a_instmem_new()
H A Dnv04.c68 struct nvkm_device *device = iobj->imem->base.subdev.device; nv04_instobj_acquire()
81 struct nvkm_device *device = iobj->imem->base.subdev.device; nv04_instobj_rd32()
89 struct nvkm_device *device = iobj->imem->base.subdev.device; nv04_instobj_wr32()
97 mutex_lock(&iobj->imem->base.subdev.mutex); nv04_instobj_dtor()
99 mutex_unlock(&iobj->imem->base.subdev.mutex); nv04_instobj_dtor()
130 mutex_lock(&imem->base.subdev.mutex); nv04_instobj_new()
133 mutex_unlock(&imem->base.subdev.mutex); nv04_instobj_new()
138 * instmem subdev implementation
144 return nvkm_rd32(imem->subdev.device, 0x700000 + addr); nv04_instmem_rd32()
150 nvkm_wr32(imem->subdev.device, 0x700000 + addr, data); nv04_instmem_wr32()
157 struct nvkm_device *device = imem->base.subdev.device; nv04_instmem_oneinit()
/linux-4.4.14/drivers/media/usb/uvc/
H A Duvc_entity.c36 : &entity->subdev.entity; uvc_mc_register_entity()
54 : &remote->subdev.entity; uvc_mc_register_entity()
68 return v4l2_device_register_subdev(&chain->dev->vdev, &entity->subdev); uvc_mc_register_entity()
77 media_entity_cleanup(&entity->subdev.entity); uvc_mc_cleanup_entity()
87 v4l2_subdev_init(&entity->subdev, &uvc_subdev_ops); uvc_mc_init_entity()
88 strlcpy(entity->subdev.name, entity->name, uvc_mc_init_entity()
89 sizeof(entity->subdev.name)); uvc_mc_init_entity()
91 ret = media_entity_init(&entity->subdev.entity, uvc_mc_init_entity()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/fifo/
H A Dgk104.c30 #include <subdev/bar.h>
38 struct nvkm_device *device = fifo->engine.subdev.device; gk104_fifo_uevent_fini()
45 struct nvkm_device *device = fifo->engine.subdev.device; gk104_fifo_uevent_init()
54 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_runlist_update() local
55 struct nvkm_device *device = subdev->device; gk104_fifo_runlist_update()
59 mutex_lock(&subdev->mutex); gk104_fifo_runlist_update()
77 nvkm_error(subdev, "runlist %d update timeout\n", engine); gk104_fifo_runlist_update()
78 mutex_unlock(&subdev->mutex); gk104_fifo_runlist_update()
84 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_engine()
95 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_recover_work()
112 nvkm_subdev_fini(&engine->subdev, false); gk104_fifo_recover_work()
113 WARN_ON(nvkm_subdev_init(&engine->subdev)); gk104_fifo_recover_work()
126 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_recover() local
127 struct nvkm_device *device = subdev->device; gk104_fifo_recover()
130 nvkm_error(subdev, "%s engine fault on channel %d, recovering...\n", gk104_fifo_recover()
131 nvkm_subdev_name[engine->subdev.index], chid); gk104_fifo_recover()
138 fifo->mask |= 1ULL << engine->subdev.index; gk104_fifo_recover()
156 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_bind() local
157 struct nvkm_device *device = subdev->device; gk104_fifo_intr_bind()
163 nvkm_error(subdev, "BIND_ERROR %02x [%s]\n", code, en ? en->name : ""); gk104_fifo_intr_bind()
175 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_intr_sched_ctxsw()
211 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_sched() local
212 struct nvkm_device *device = subdev->device; gk104_fifo_intr_sched()
218 nvkm_error(subdev, "SCHED_ERROR %02x [%s]\n", code, en ? en->name : ""); gk104_fifo_intr_sched()
232 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_chsw() local
233 struct nvkm_device *device = subdev->device; gk104_fifo_intr_chsw()
235 nvkm_error(subdev, "CHSW_ERROR %08x\n", stat); gk104_fifo_intr_chsw()
242 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_dropped_fault() local
243 struct nvkm_device *device = subdev->device; gk104_fifo_intr_dropped_fault()
245 nvkm_error(subdev, "DROPPED_MMU_FAULT %08x\n", stat); gk104_fifo_intr_dropped_fault()
356 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_fault() local
357 struct nvkm_device *device = subdev->device; gk104_fifo_intr_fault()
401 nvkm_error(subdev, gk104_fifo_intr_fault()
452 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_pbdma_0() local
453 struct nvkm_device *device = subdev->device; gk104_fifo_intr_pbdma_0()
477 nvkm_error(subdev, "PBDMA%d: %08x [%s] ch %d [%010llx %s] " gk104_fifo_intr_pbdma_0()
500 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr_pbdma_1() local
501 struct nvkm_device *device = subdev->device; gk104_fifo_intr_pbdma_1()
509 nvkm_error(subdev, "PBDMA%d: %08x [%s] ch %d %08x %08x\n", gk104_fifo_intr_pbdma_1()
521 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_intr_runlist()
541 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_intr() local
542 struct nvkm_device *device = subdev->device; gk104_fifo_intr()
553 nvkm_error(subdev, "PIO_ERROR\n"); gk104_fifo_intr()
571 nvkm_error(subdev, "FB_FLUSH_TIMEOUT\n"); gk104_fifo_intr()
577 nvkm_error(subdev, "LB_ERROR\n"); gk104_fifo_intr()
623 nvkm_error(subdev, "INTR %08x\n", stat); gk104_fifo_intr()
633 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_fini()
643 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_oneinit()
682 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_init() local
683 struct nvkm_device *device = subdev->device; gk104_fifo_init()
689 nvkm_debug(subdev, "%d PBDMA unit(s)\n", fifo->spoon_nr); gk104_fifo_init()
H A Dgf100.c30 #include <subdev/bar.h>
38 struct nvkm_device *device = fifo->engine.subdev.device; gf100_fifo_uevent_init()
45 struct nvkm_device *device = fifo->engine.subdev.device; gf100_fifo_uevent_fini()
53 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_runlist_update() local
54 struct nvkm_device *device = subdev->device; gf100_fifo_runlist_update()
58 mutex_lock(&subdev->mutex); gf100_fifo_runlist_update()
76 nvkm_error(subdev, "runlist update timeout\n"); gf100_fifo_runlist_update()
77 mutex_unlock(&subdev->mutex); gf100_fifo_runlist_update()
100 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_engine()
120 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_recover_work()
137 nvkm_subdev_fini(&engine->subdev, false); gf100_fifo_recover_work()
138 WARN_ON(nvkm_subdev_init(&engine->subdev)); gf100_fifo_recover_work()
151 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_recover() local
152 struct nvkm_device *device = subdev->device; gf100_fifo_recover()
155 nvkm_error(subdev, "%s engine fault on channel %d, recovering...\n", gf100_fifo_recover()
156 nvkm_subdev_name[engine->subdev.index], chid); gf100_fifo_recover()
163 fifo->mask |= 1ULL << engine->subdev.index; gf100_fifo_recover()
176 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_intr_sched_ctxsw()
210 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr_sched() local
211 struct nvkm_device *device = subdev->device; gf100_fifo_intr_sched()
218 nvkm_error(subdev, "SCHED_ERROR %02x [%s]\n", code, en ? en->name : ""); gf100_fifo_intr_sched()
291 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr_fault() local
292 struct nvkm_device *device = subdev->device; gf100_fifo_intr_fault()
336 nvkm_error(subdev, gf100_fifo_intr_fault()
361 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr_pbdma() local
362 struct nvkm_device *device = subdev->device; gf100_fifo_intr_pbdma()
384 nvkm_error(subdev, "PBDMA%d: %08x [%s] ch %d [%010llx %s] " gf100_fifo_intr_pbdma()
399 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr_runlist() local
400 struct nvkm_device *device = subdev->device; gf100_fifo_intr_runlist()
410 nvkm_error(subdev, "RUNLIST %08x\n", intr); gf100_fifo_intr_runlist()
418 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr_engine_unit() local
419 struct nvkm_device *device = subdev->device; gf100_fifo_intr_engine_unit()
433 nvkm_error(subdev, "ENGINE %d %d %01x", gf100_fifo_intr_engine_unit()
443 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_intr_engine()
456 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_intr() local
457 struct nvkm_device *device = subdev->device; gf100_fifo_intr()
463 nvkm_warn(subdev, "INTR 00000001: %08x\n", intr); gf100_fifo_intr()
476 nvkm_warn(subdev, "INTR 00010000: %08x\n", intr); gf100_fifo_intr()
483 nvkm_warn(subdev, "INTR 01000000: %08x\n", intr); gf100_fifo_intr()
521 nvkm_error(subdev, "INTR %08x\n", stat); gf100_fifo_intr()
531 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_oneinit()
570 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gf100_fifo_init() local
571 struct nvkm_device *device = subdev->device; gf100_fifo_init()
578 nvkm_debug(subdev, "%d PBDMA unit(s)\n", fifo->spoon_nr); gf100_fifo_init()
H A Dgf100.h6 #include <subdev/mmu.h>
H A Dchannv50.c28 #include <subdev/mmu.h>
29 #include <subdev/timer.h>
34 switch (engine->subdev.index) { nv50_fifo_chan_engine_addr()
51 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; nv50_fifo_chan_engine_fini() local
52 struct nvkm_device *device = subdev->device; nv50_fifo_chan_engine_fini()
80 nvkm_error(subdev, "channel %d [%s] unload timeout\n", nv50_fifo_chan_engine_fini()
106 struct nvkm_gpuobj *engn = chan->engn[engine->subdev.index]; nv50_fifo_chan_engine_init()
133 nvkm_gpuobj_del(&chan->engn[engine->subdev.index]); nv50_fifo_chan_engine_dtor()
142 int engn = engine->subdev.index; nv50_fifo_chan_engine_ctor()
165 switch (object->engine->subdev.index) { nv50_fifo_chan_object_ctor()
183 struct nvkm_device *device = fifo->base.engine.subdev.device; nv50_fifo_chan_fini()
197 struct nvkm_device *device = fifo->base.engine.subdev.device; nv50_fifo_chan_init()
236 struct nvkm_device *device = fifo->base.engine.subdev.device; nv50_fifo_chan_ctor()
H A Dgpfifogf100.c28 #include <subdev/fb.h>
29 #include <subdev/timer.h>
37 switch (engine->subdev.index) { gf100_fifo_gpfifo_engine_addr()
57 struct nvkm_subdev *subdev = &chan->fifo->base.engine.subdev; gf100_fifo_gpfifo_engine_fini() local
58 struct nvkm_device *device = subdev->device; gf100_fifo_gpfifo_engine_fini()
67 nvkm_error(subdev, "channel %d [%s] kick timeout\n", gf100_fifo_gpfifo_engine_fini()
93 u64 addr = chan->engn[engine->subdev.index].vma.offset; gf100_fifo_gpfifo_engine_init()
108 nvkm_gpuobj_unmap(&chan->engn[engine->subdev.index].vma); gf100_fifo_gpfifo_engine_dtor()
109 nvkm_gpuobj_del(&chan->engn[engine->subdev.index].inst); gf100_fifo_gpfifo_engine_dtor()
118 int engn = engine->subdev.index; gf100_fifo_gpfifo_engine_ctor()
137 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_gpfifo_fini()
156 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_gpfifo_init()
198 struct nvkm_device *device = fifo->base.engine.subdev.device; gf100_fifo_gpfifo_new()
H A Dnv04.c30 #include <subdev/instmem.h>
31 #include <subdev/timer.h>
52 struct nvkm_device *device = fifo->base.engine.subdev.device;
88 struct nvkm_device *device = fifo->base.engine.subdev.device;
137 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; nv04_fifo_cache_error() local
138 struct nvkm_device *device = subdev->device; nv04_fifo_cache_error()
163 nvkm_error(subdev, "CACHE_ERROR - " nv04_fifo_cache_error()
188 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; nv04_fifo_dma_pusher() local
189 struct nvkm_device *device = subdev->device; nv04_fifo_dma_pusher()
206 nvkm_error(subdev, "DMA_PUSHER - " nv04_fifo_dma_pusher()
222 nvkm_error(subdev, "DMA_PUSHER - ch %d [%s] get %08x put %08x " nv04_fifo_dma_pusher()
241 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; nv04_fifo_intr() local
242 struct nvkm_device *device = subdev->device; nv04_fifo_intr()
288 nvkm_warn(subdev, "intr %08x\n", stat); nv04_fifo_intr()
300 struct nvkm_device *device = fifo->base.engine.subdev.device; nv04_fifo_init()
H A Dchang84.c28 #include <subdev/mmu.h>
29 #include <subdev/timer.h>
50 switch (engine->subdev.index) { g84_fifo_chan_engine()
70 switch (engine->subdev.index) { g84_fifo_chan_engine_addr()
95 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; g84_fifo_chan_engine_fini() local
96 struct nvkm_device *device = subdev->device; g84_fifo_chan_engine_fini()
114 nvkm_error(subdev, "channel %d [%s] unload timeout\n", g84_fifo_chan_engine_fini()
137 struct nvkm_gpuobj *engn = chan->engn[engine->subdev.index]; g84_fifo_chan_engine_init()
165 int engn = engine->subdev.index; g84_fifo_chan_engine_ctor()
181 switch (object->engine->subdev.index) { g84_fifo_chan_object_ctor()
209 struct nvkm_device *device = fifo->base.engine.subdev.device; g84_fifo_chan_init()
236 struct nvkm_device *device = fifo->base.engine.subdev.device; g84_fifo_chan_ctor()
H A Ddmanv40.c29 #include <subdev/instmem.h>
37 switch (engine->subdev.index) { nv40_fifo_dma_engine()
61 struct nvkm_device *device = fifo->base.engine.subdev.device; nv40_fifo_dma_engine_fini()
91 struct nvkm_device *device = fifo->base.engine.subdev.device; nv40_fifo_dma_engine_init()
99 inst = chan->engn[engine->subdev.index]->addr >> 4; nv40_fifo_dma_engine_init()
121 nvkm_gpuobj_del(&chan->engn[engine->subdev.index]); nv40_fifo_dma_engine_dtor()
130 const int engn = engine->subdev.index; nv40_fifo_dma_engine_ctor()
144 struct nvkm_instmem *imem = chan->fifo->base.engine.subdev.device->imem; nv40_fifo_dma_object_ctor()
149 switch (object->engine->subdev.index) { nv40_fifo_dma_object_ctor()
159 mutex_lock(&chan->fifo->base.engine.subdev.mutex); nv40_fifo_dma_object_ctor()
162 mutex_unlock(&chan->fifo->base.engine.subdev.mutex); nv40_fifo_dma_object_ctor()
189 struct nvkm_device *device = fifo->base.engine.subdev.device; nv40_fifo_dma_new()
H A Dgk104.h6 #include <subdev/mmu.h>
60 gk104_fifo_subdev_engine(int subdev) gk104_fifo_subdev_engine() argument
62 switch (subdev) { gk104_fifo_subdev_engine()
H A Dgpfifogk104.c28 #include <subdev/fb.h>
29 #include <subdev/mmu.h>
30 #include <subdev/timer.h>
39 struct nvkm_subdev *subdev = &fifo->base.engine.subdev; gk104_fifo_gpfifo_kick() local
40 struct nvkm_device *device = subdev->device; gk104_fifo_gpfifo_kick()
48 nvkm_error(subdev, "channel %d [%s] kick timeout\n", gk104_fifo_gpfifo_kick()
59 switch (engine->subdev.index) { gk104_fifo_gpfifo_engine_addr()
106 u64 addr = chan->engn[engine->subdev.index].vma.offset; gk104_fifo_gpfifo_engine_init()
121 nvkm_gpuobj_unmap(&chan->engn[engine->subdev.index].vma); gk104_fifo_gpfifo_engine_dtor()
122 nvkm_gpuobj_del(&chan->engn[engine->subdev.index].inst); gk104_fifo_gpfifo_engine_dtor()
131 int engn = engine->subdev.index; gk104_fifo_gpfifo_engine_ctor()
150 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_gpfifo_fini()
167 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_gpfifo_init()
211 struct nvkm_device *device = fifo->base.engine.subdev.device; gk104_fifo_gpfifo_new()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/volt/
H A Dbase.c26 #include <subdev/bios.h>
27 #include <subdev/bios/vmap.h>
28 #include <subdev/bios/volt.h>
52 struct nvkm_subdev *subdev = &volt->subdev; nvkm_volt_set() local
61 nvkm_debug(subdev, "set %duv: %d\n", uv, ret); nvkm_volt_set()
71 struct nvkm_bios *bios = volt->subdev.device->bios; nvkm_volt_map()
148 nvkm_volt_init(struct nvkm_subdev *subdev) nvkm_volt_init() argument
150 struct nvkm_volt *volt = nvkm_volt(subdev); nvkm_volt_init()
154 nvkm_debug(subdev, "current voltage unknown\n"); nvkm_volt_init()
157 nvkm_debug(subdev, "current voltage: %duv\n", ret); nvkm_volt_init()
162 nvkm_volt_dtor(struct nvkm_subdev *subdev) nvkm_volt_dtor() argument
164 return nvkm_volt(subdev); nvkm_volt_dtor()
180 nvkm_subdev_ctor(&nvkm_volt, device, index, 0, &volt->subdev); nvkm_volt_ctor()
189 nvkm_debug(&volt->subdev, "VID %02x: %duv\n", nvkm_volt_ctor()
H A Dgpio.c24 #include <subdev/volt.h>
25 #include <subdev/bios.h>
26 #include <subdev/bios/gpio.h>
27 #include <subdev/gpio.h>
37 struct nvkm_gpio *gpio = volt->subdev.device->gpio; nvkm_voltgpio_get()
56 struct nvkm_gpio *gpio = volt->subdev.device->gpio; nvkm_voltgpio_set()
73 struct nvkm_subdev *subdev = &volt->subdev; nvkm_voltgpio_init() local
74 struct nvkm_gpio *gpio = subdev->device->gpio; nvkm_voltgpio_init()
90 nvkm_debug(subdev, "VID bit %d has no GPIO\n", i); nvkm_voltgpio_init()
H A Dgk104.c26 #include <subdev/volt.h>
27 #include <subdev/gpio.h>
28 #include <subdev/bios.h>
29 #include <subdev/bios/volt.h>
41 struct nvkm_device *device = base->subdev.device; gk104_volt_get()
54 struct nvkm_device *device = base->subdev.device; gk104_volt_set()
100 /* now that we have a subdev, we can show an error if we found through gk104_volt_new()
105 nvkm_error(&volt->base.subdev, gk104_volt_new()
116 nvkm_debug(&volt->base.subdev, "Using %s mode\n", mode); gk104_volt_new()
H A Dpriv.h3 #define nvkm_volt(p) container_of((p), struct nvkm_volt, subdev)
4 #include <subdev/volt.h>
H A Dgk20a.c122 struct nvkm_subdev *subdev = &volt->base.subdev; gk20a_volt_vid_set() local
124 nvkm_debug(subdev, "set voltage as %duv\n", volt->base.vid[vid].uv); gk20a_volt_vid_set()
132 struct nvkm_subdev *subdev = &volt->base.subdev; gk20a_volt_set_id() local
137 nvkm_debug(subdev, "prev=%d, target=%d, condition=%d\n", gk20a_volt_set_id()
171 nvkm_info(&volt->base.subdev, "The default voltage is %duV\n", uv); gk20a_volt_new()
176 nvkm_debug(&volt->base.subdev, "%s - vid_nr = %d\n", __func__, gk20a_volt_new()
183 nvkm_debug(&volt->base.subdev, "%2d: vid=%d, uv=%d\n", i, gk20a_volt_new()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/clk/
H A Dmcp77.c28 #include <subdev/bios.h>
29 #include <subdev/bios/pll.h>
30 #include <subdev/timer.h>
44 struct nvkm_device *device = clk->base.subdev.device; read_div()
51 struct nvkm_device *device = clk->base.subdev.device; read_pll()
84 struct nvkm_subdev *subdev = &clk->base.subdev; mcp77_clk_read() local
85 struct nvkm_device *device = subdev->device; mcp77_clk_read()
160 nvkm_debug(subdev, "unknown clock source %d %08x\n", src, mast); mcp77_clk_read()
168 struct nvkm_subdev *subdev = &clk->base.subdev; calc_pll() local
172 ret = nvbios_pll_parse(subdev->device->bios, reg, &pll); calc_pll()
181 return nv04_pll_calc(subdev, &pll, clock, N, M, NULL, NULL, P); calc_pll()
209 struct nvkm_subdev *subdev = &clk->base.subdev; mcp77_clk_calc() local
273 nvkm_debug(subdev, "nvpll: %08x %08x %08x\n", mcp77_clk_calc()
275 nvkm_debug(subdev, " spll: %08x %08x %08x\n", mcp77_clk_calc()
277 nvkm_debug(subdev, " vdiv: %08x\n", clk->vdiv); mcp77_clk_calc()
279 nvkm_debug(subdev, "core: hrefm4\n"); mcp77_clk_calc()
281 nvkm_debug(subdev, "core: nvpll\n"); mcp77_clk_calc()
284 nvkm_debug(subdev, "shader: hrefm4\n"); mcp77_clk_calc()
286 nvkm_debug(subdev, "shader: nvpll\n"); mcp77_clk_calc()
288 nvkm_debug(subdev, "shader: spll\n"); mcp77_clk_calc()
291 nvkm_debug(subdev, "vdec: 500MHz\n"); mcp77_clk_calc()
293 nvkm_debug(subdev, "vdec: core\n"); mcp77_clk_calc()
302 struct nvkm_subdev *subdev = &clk->base.subdev; mcp77_clk_prog() local
303 struct nvkm_device *device = subdev->device; mcp77_clk_prog()
331 nvkm_warn(subdev, "Reclocking failed: unknown core clock\n"); mcp77_clk_prog()
352 nvkm_warn(subdev, "Reclocking failed: unknown sclk clock\n"); mcp77_clk_prog()
H A Dbase.c26 #include <subdev/bios.h>
27 #include <subdev/bios/boost.h>
28 #include <subdev/bios/cstep.h>
29 #include <subdev/bios/perf.h>
30 #include <subdev/fb.h>
31 #include <subdev/therm.h>
32 #include <subdev/volt.h>
43 struct nvkm_bios *bios = clk->subdev.device->bios; nvkm_clk_adjust()
80 struct nvkm_subdev *subdev = &clk->subdev; nvkm_cstate_prog() local
81 struct nvkm_device *device = subdev->device; nvkm_cstate_prog()
96 nvkm_error(subdev, "failed to raise fan speed: %d\n", ret); nvkm_cstate_prog()
104 nvkm_error(subdev, "failed to raise voltage: %d\n", ret); nvkm_cstate_prog()
118 nvkm_error(subdev, "failed to lower voltage: %d\n", ret); nvkm_cstate_prog()
124 nvkm_error(subdev, "failed to lower fan speed: %d\n", ret); nvkm_cstate_prog()
140 struct nvkm_bios *bios = clk->subdev.device->bios; nvkm_cstate_new()
177 struct nvkm_subdev *subdev = &clk->subdev; nvkm_pstate_prog() local
178 struct nvkm_ram *ram = subdev->device->fb->ram; nvkm_pstate_prog()
187 nvkm_debug(subdev, "setting performance state %d\n", pstatei); nvkm_pstate_prog()
207 struct nvkm_subdev *subdev = &clk->subdev; nvkm_pstate_work() local
214 nvkm_trace(subdev, "P %d PWR %d U(AC) %d U(DC) %d A %d T %d D %d\n", nvkm_pstate_work()
227 nvkm_trace(subdev, "-> %d\n", pstate); nvkm_pstate_work()
231 nvkm_error(subdev, "error setting pstate %d: %d\n", nvkm_pstate_work()
255 struct nvkm_subdev *subdev = &clk->subdev; nvkm_pstate_info() local
269 nvkm_debug(subdev, "%02x: %10d KHz\n", clock->name, lo); nvkm_pstate_info()
274 nvkm_debug(subdev, "%10d KHz\n", freq); nvkm_pstate_info()
290 nvkm_debug(subdev, "%s: %s %s %s\n", name, info[0], info[1], info[2]); nvkm_pstate_info()
309 struct nvkm_bios *bios = clk->subdev.device->bios; nvkm_pstate_new()
475 * subdev base class implementation
485 nvkm_clk_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_clk_fini() argument
487 struct nvkm_clk *clk = nvkm_clk(subdev); nvkm_clk_fini()
496 nvkm_clk_init(struct nvkm_subdev *subdev) nvkm_clk_init() argument
498 struct nvkm_clk *clk = nvkm_clk(subdev); nvkm_clk_init()
509 nvkm_error(subdev, "%02x freq unknown\n", clock->name); nvkm_clk_init()
530 nvkm_clk_dtor(struct nvkm_subdev *subdev) nvkm_clk_dtor() argument
532 struct nvkm_clk *clk = nvkm_clk(subdev); nvkm_clk_dtor()
562 nvkm_subdev_ctor(&nvkm_clk, device, index, 0, &clk->subdev); nvkm_clk_ctor()
H A Dpriv.h3 #define nvkm_clk(p) container_of((p), struct nvkm_clk, subdev)
4 #include <subdev/clk.h>
H A Dseq.h3 #include <subdev/bus/hwsq.h>
H A Dnv04.c27 #include <subdev/bios.h>
28 #include <subdev/bios/pll.h>
29 #include <subdev/devinit/nv04.h>
36 int ret = nv04_pll_calc(&clock->subdev, info, clk, &N1, &M1, &N2, &M2, &P); nv04_clk_pll_calc()
51 struct nvkm_device *device = clk->subdev.device; nv04_clk_pll_prog()
H A Dgk20a.c29 #include <subdev/timer.h>
127 struct nvkm_device *device = clk->base.subdev.device; gk20a_pllg_read_mnp()
152 struct nvkm_subdev *subdev = &clk->base.subdev; gk20a_pllg_calc_mnp() local
200 nvkm_debug(subdev, "low_PL %d(div%d), high_PL %d(div%d)", low_pl, gk20a_pllg_calc_mnp()
251 nvkm_debug(subdev, gk20a_pllg_calc_mnp()
261 nvkm_debug(subdev, gk20a_pllg_calc_mnp()
270 struct nvkm_subdev *subdev = &clk->base.subdev; gk20a_pllg_slide() local
271 struct nvkm_device *device = subdev->device; gk20a_pllg_slide()
319 nvkm_error(subdev, "gpcpll dynamic ramp timeout\n"); gk20a_pllg_slide()
329 struct nvkm_device *device = clk->base.subdev.device; _gk20a_pllg_enable()
337 struct nvkm_device *device = clk->base.subdev.device; _gk20a_pllg_disable()
345 struct nvkm_subdev *subdev = &clk->base.subdev; _gk20a_pllg_program_mnp() local
346 struct nvkm_device *device = subdev->device; _gk20a_pllg_program_mnp()
393 nvkm_debug(subdev, "%s: m=%d n=%d pl=%d\n", __func__, _gk20a_pllg_program_mnp()
445 struct nvkm_device *device = clk->base.subdev.device; gk20a_pllg_disable()
566 struct nvkm_subdev *subdev = &clk->base.subdev; gk20a_clk_read() local
567 struct nvkm_device *device = subdev->device; gk20a_clk_read()
576 nvkm_error(subdev, "invalid clock source %d\n", src); gk20a_clk_read()
614 struct nvkm_subdev *subdev = &clk->base.subdev; gk20a_clk_init() local
615 struct nvkm_device *device = subdev->device; gk20a_clk_init()
622 nvkm_error(subdev, "cannot initialize clock\n"); gk20a_clk_init()
667 nvkm_info(&clk->base.subdev, "parent clock rate: %d Mhz\n", gk20a_clk_new()
H A Dnv50.c28 #include <subdev/bios.h>
29 #include <subdev/bios/pll.h>
34 struct nvkm_device *device = clk->base.subdev.device; read_div()
54 struct nvkm_subdev *subdev = &clk->base.subdev; read_pll_src() local
55 struct nvkm_device *device = subdev->device; read_pll_src()
69 nvkm_error(subdev, "ref: bad pll %06x\n", base); read_pll_src()
97 nvkm_error(subdev, "ref: bad pll %06x\n", base); read_pll_src()
127 struct nvkm_subdev *subdev = &clk->base.subdev; read_pll_ref() local
128 struct nvkm_device *device = subdev->device; read_pll_ref()
147 nvkm_error(subdev, "bad pll %06x\n", base); read_pll_ref()
160 struct nvkm_device *device = clk->base.subdev.device; read_pll()
195 struct nvkm_subdev *subdev = &clk->base.subdev; nv50_clk_read() local
196 struct nvkm_device *device = subdev->device; nv50_clk_read()
320 nvkm_debug(subdev, "unknown clock source %d %08x\n", src, mast); nv50_clk_read()
327 struct nvkm_subdev *subdev = &clk->base.subdev; calc_pll() local
331 ret = nvbios_pll_parse(subdev->device->bios, reg, &pll); calc_pll()
340 return nv04_pll_calc(subdev, &pll, idx, N, M, NULL, NULL, P); calc_pll()
372 struct nvkm_subdev *subdev = &clk->base.subdev; nv50_clk_calc() local
373 struct nvkm_device *device = subdev->device; nv50_clk_calc()
384 out = clk_init(hwsq, subdev); nv50_clk_calc()
H A Dnv40.c28 #include <subdev/bios.h>
29 #include <subdev/bios/pll.h>
42 struct nvkm_device *device = clk->base.subdev.device; read_pll_1()
58 struct nvkm_device *device = clk->base.subdev.device; read_pll_2()
100 struct nvkm_subdev *subdev = &clk->base.subdev; nv40_clk_read() local
101 struct nvkm_device *device = subdev->device; nv40_clk_read()
119 nvkm_debug(subdev, "unknown clock source %d %08x\n", src, mast); nv40_clk_read()
127 struct nvkm_subdev *subdev = &clk->base.subdev; nv40_clk_calc_pll() local
131 ret = nvbios_pll_parse(subdev->device->bios, reg, &pll); nv40_clk_calc_pll()
138 ret = nv04_pll_calc(subdev, &pll, khz, N1, M1, N2, M2, log2P); nv40_clk_calc_pll()
189 struct nvkm_device *device = clk->base.subdev.device; nv40_clk_prog()
H A Dgk104.c28 #include <subdev/timer.h>
29 #include <subdev/bios.h>
30 #include <subdev/bios/pll.h>
52 struct nvkm_device *device = clk->base.subdev.device; read_vco()
62 struct nvkm_device *device = clk->base.subdev.device; read_pll()
108 struct nvkm_device *device = clk->base.subdev.device; read_div()
135 struct nvkm_device *device = clk->base.subdev.device; read_mem()
147 struct nvkm_device *device = clk->base.subdev.device; read_clk()
192 struct nvkm_subdev *subdev = &clk->base.subdev; gk104_clk_read() local
193 struct nvkm_device *device = subdev->device; gk104_clk_read()
217 nvkm_error(subdev, "invalid clock source %d\n", src); gk104_clk_read()
265 struct nvkm_subdev *subdev = &clk->base.subdev; calc_pll() local
266 struct nvkm_bios *bios = subdev->device->bios; calc_pll()
278 ret = gt215_pll_calc(subdev, &limits, freq, &N, NULL, &M, &P); calc_pll()
360 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_0()
370 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_1_0()
381 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_1_1()
389 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_2()
408 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_3()
419 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_4_0()
434 struct nvkm_device *device = clk->base.subdev.device; gk104_clk_prog_4_1()
H A Dgt215.c30 #include <subdev/bios.h>
31 #include <subdev/bios/pll.h>
32 #include <subdev/timer.h>
45 struct nvkm_device *device = clk->base.subdev.device; read_vco()
63 struct nvkm_device *device = clk->base.subdev.device; read_clk()
110 struct nvkm_device *device = clk->base.subdev.device; read_pll()
143 struct nvkm_subdev *subdev = &clk->base.subdev; gt215_clk_read() local
144 struct nvkm_device *device = subdev->device; gt215_clk_read()
172 nvkm_error(subdev, "unknown HOST clock source %d\n", hsrc); gt215_clk_read()
176 nvkm_error(subdev, "invalid clock source %d\n", src); gt215_clk_read()
236 struct nvkm_subdev *subdev = &clk->base.subdev; gt215_pll_info() local
252 ret = nvbios_pll_parse(subdev->device->bios, pll, &limits); gt215_pll_info()
260 ret = gt215_pll_calc(subdev, &limits, khz, &N, NULL, &M, &P); gt215_pll_info()
306 struct nvkm_device *device = clk->subdev.device; gt215_clk_pre()
341 struct nvkm_device *device = clk->subdev.device; gt215_clk_post()
354 struct nvkm_device *device = clk->base.subdev.device; disable_clk_src()
363 struct nvkm_device *device = clk->base.subdev.device; prog_pll()
407 struct nvkm_device *device = clk->base.subdev.device; prog_clk()
415 struct nvkm_device *device = clk->base.subdev.device; prog_host()
443 struct nvkm_device *device = clk->base.subdev.device; prog_core()
H A Dnv50.h6 #include <subdev/bus/hwsq.h>
H A Dpllgt215.c26 #include <subdev/bios.h>
27 #include <subdev/bios/pll.h>
30 gt215_pll_calc(struct nvkm_subdev *subdev, struct nvbios_pll *info, gt215_pll_calc() argument
82 nvkm_error(subdev, "unable to find matching pll values\n"); gt215_pll_calc()
H A Dgf100.c28 #include <subdev/bios.h>
29 #include <subdev/bios/pll.h>
30 #include <subdev/timer.h>
51 struct nvkm_device *device = clk->base.subdev.device; read_vco()
61 struct nvkm_device *device = clk->base.subdev.device; read_pll()
100 struct nvkm_device *device = clk->base.subdev.device; read_div()
127 struct nvkm_device *device = clk->base.subdev.device; read_clk()
153 struct nvkm_subdev *subdev = &clk->base.subdev; gf100_clk_read() local
154 struct nvkm_device *device = subdev->device; gf100_clk_read()
196 nvkm_error(subdev, "invalid clock source %d\n", src); gf100_clk_read()
244 struct nvkm_subdev *subdev = &clk->base.subdev; calc_pll() local
245 struct nvkm_bios *bios = subdev->device->bios; calc_pll()
257 ret = gt215_pll_calc(subdev, &limits, freq, &N, NULL, &M, &P); calc_pll()
339 struct nvkm_device *device = clk->base.subdev.device; gf100_clk_prog_0()
349 struct nvkm_device *device = clk->base.subdev.device; gf100_clk_prog_1()
361 struct nvkm_device *device = clk->base.subdev.device; gf100_clk_prog_2()
382 struct nvkm_device *device = clk->base.subdev.device; gf100_clk_prog_3()
397 struct nvkm_device *device = clk->base.subdev.device; gf100_clk_prog_4()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/gr/
H A Dnv50.c33 return nvkm_rd32(gr->engine.subdev.device, 0x1540); nv50_gr_units()
44 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 16, nv50_gr_object_bind()
71 int ret = nvkm_gpuobj_new(gr->base.engine.subdev.device, gr->size, nv50_gr_chan_bind()
75 nv50_grctx_fill(gr->base.engine.subdev.device, *pgpuobj); nv50_gr_chan_bind()
102 * PGRAPH engine/subdev functions
240 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nv50_gr_prop_trap() local
241 struct nvkm_device *device = subdev->device; nv50_gr_prop_trap()
255 nvkm_error(subdev, "TRAP_PROP - TP %d - CUDA_FAULT - Global read fault at address %02x%08x\n", nv50_gr_prop_trap()
260 nvkm_error(subdev, "TRAP_PROP - TP %d - CUDA_FAULT - Global write fault at address %02x%08x\n", nv50_gr_prop_trap()
264 nvkm_error(subdev, "TRAP_PROP - TP %d - Unknown CUDA fault at address %02x%08x\n", nv50_gr_prop_trap()
271 nvkm_error(subdev, "TRAP_PROP - TP %d - %08x [%s] - " nv50_gr_prop_trap()
275 nvkm_error(subdev, "TRAP_PROP - TP %d - e0c: %08x, e18: %08x, e1c: %08x, e20: %08x, e24: %08x\n", nv50_gr_prop_trap()
282 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nv50_gr_mp_trap() local
283 struct nvkm_device *device = subdev->device; nv50_gr_mp_trap()
307 nvkm_error(subdev, "TRAP_MP_EXEC - TP %d MP %d: " nv50_gr_mp_trap()
318 nvkm_error(subdev, "TRAP_MP_EXEC - TP %d: " nv50_gr_mp_trap()
326 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nv50_gr_tp_trap() local
327 struct nvkm_device *device = subdev->device; nv50_gr_tp_trap()
347 nvkm_error(subdev, "magic set %d:\n", i); nv50_gr_tp_trap()
349 nvkm_error(subdev, "\t%08x: %08x\n", r, nv50_gr_tp_trap()
354 nvkm_error(subdev, nv50_gr_tp_trap()
369 nvkm_error(subdev, "%s - TP%d: %08x [%s]\n", nv50_gr_tp_trap()
383 nvkm_error(subdev, "%s - TP%d: Unhandled ustatus %08x\n", name, i, ustatus); nv50_gr_tp_trap()
389 nvkm_warn(subdev, "%s - No TPs claiming errors?\n", name); nv50_gr_tp_trap()
396 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nv50_gr_trap_handler() local
397 struct nvkm_device *device = subdev->device; nv50_gr_trap_handler()
403 nvkm_error(subdev, "TRAP: no units reporting traps?\n"); nv50_gr_trap_handler()
413 nvkm_error(subdev, "TRAP_DISPATCH - no ustatus?\n"); nv50_gr_trap_handler()
428 nvkm_error(subdev, "TRAP DISPATCH_FAULT\n"); nv50_gr_trap_handler()
430 nvkm_error(subdev, nv50_gr_trap_handler()
438 nvkm_error(subdev, "no stuck command?\n"); nv50_gr_trap_handler()
454 nvkm_error(subdev, "TRAP DISPATCH_QUERY\n"); nv50_gr_trap_handler()
456 nvkm_error(subdev, nv50_gr_trap_handler()
463 nvkm_error(subdev, "no stuck command?\n"); nv50_gr_trap_handler()
471 nvkm_error(subdev, "TRAP_DISPATCH " nv50_gr_trap_handler()
488 nvkm_error(subdev, "TRAP_M2MF %08x [%s]\n", nv50_gr_trap_handler()
490 nvkm_error(subdev, "TRAP_M2MF %08x %08x %08x %08x\n", nv50_gr_trap_handler()
511 nvkm_error(subdev, "TRAP_VFETCH %08x [%s]\n", nv50_gr_trap_handler()
513 nvkm_error(subdev, "TRAP_VFETCH %08x %08x %08x %08x\n", nv50_gr_trap_handler()
531 nvkm_error(subdev, "TRAP_STRMOUT %08x [%s]\n", nv50_gr_trap_handler()
533 nvkm_error(subdev, "TRAP_STRMOUT %08x %08x %08x %08x\n", nv50_gr_trap_handler()
554 nvkm_error(subdev, "TRAP_CCACHE %08x [%s]\n", nv50_gr_trap_handler()
556 nvkm_error(subdev, "TRAP_CCACHE %08x %08x %08x %08x " nv50_gr_trap_handler()
578 nvkm_error(subdev, "TRAP_UNKC04 %08x\n", ustatus); nv50_gr_trap_handler()
610 nvkm_error(subdev, "TRAP: unknown %08x\n", status); nv50_gr_trap_handler()
621 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nv50_gr_intr() local
622 struct nvkm_device *device = subdev->device; nv50_gr_intr()
647 nvkm_error(subdev, "DATA_ERROR %08x [%s]\n", nv50_gr_intr()
664 nvkm_error(subdev, "%08x [%s] ch %d [%010llx %s] subc %d " nv50_gr_intr()
680 struct nvkm_device *device = gr->base.engine.subdev.device; nv50_gr_init()
H A Dgf100.c30 #include <subdev/fb.h>
31 #include <subdev/mc.h>
32 #include <subdev/pmu.h>
33 #include <subdev/timer.h>
46 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_zbc_clear_color()
62 struct nvkm_ltc *ltc = gr->base.engine.subdev.device->ltc; gf100_gr_zbc_color_get()
97 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_zbc_clear_depth()
109 struct nvkm_ltc *ltc = gr->base.engine.subdev.device->ltc; gf100_gr_zbc_depth_get()
287 ret = nvkm_gpuobj_new(gr->base.engine.subdev.device, gr->size, gf100_gr_chan_bind()
351 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_chan_new()
670 * PGRAPH engine/subdev functions
684 struct nvkm_ltc *ltc = gr->base.engine.subdev.device->ltc; gf100_gr_zbc_init()
710 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_wait_idle() local
711 struct nvkm_device *device = subdev->device; gf100_gr_wait_idle()
730 nvkm_error(subdev, gf100_gr_wait_idle()
739 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_mmio()
756 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_icmd()
794 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_mthd()
857 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_trap_gpc_rop() local
858 struct nvkm_device *device = subdev->device; gf100_gr_trap_gpc_rop()
869 nvkm_error(subdev, "GPC%d/PROP trap: %08x [%s] x = %u, y = %u, " gf100_gr_trap_gpc_rop()
899 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_trap_mp() local
900 struct nvkm_device *device = subdev->device; gf100_gr_trap_mp()
909 nvkm_error(subdev, "GPC%i/TPC%i/MP trap: " gf100_gr_trap_mp()
920 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_trap_tpc() local
921 struct nvkm_device *device = subdev->device; gf100_gr_trap_tpc()
926 nvkm_error(subdev, "GPC%d/TPC%d/TEX: %08x\n", gpc, tpc, trap); gf100_gr_trap_tpc()
938 nvkm_error(subdev, "GPC%d/TPC%d/POLY: %08x\n", gpc, tpc, trap); gf100_gr_trap_tpc()
945 nvkm_error(subdev, "GPC%d/TPC%d/L1C: %08x\n", gpc, tpc, trap); gf100_gr_trap_tpc()
951 nvkm_error(subdev, "GPC%d/TPC%d/%08x: unknown\n", gpc, tpc, stat); gf100_gr_trap_tpc()
958 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_trap_gpc() local
959 struct nvkm_device *device = subdev->device; gf100_gr_trap_gpc()
970 nvkm_error(subdev, "GPC%d/ZCULL: %08x\n", gpc, trap); gf100_gr_trap_gpc()
977 nvkm_error(subdev, "GPC%d/CCACHE: %08x\n", gpc, trap); gf100_gr_trap_gpc()
984 nvkm_error(subdev, "GPC%d/ESETUP: %08x\n", gpc, trap); gf100_gr_trap_gpc()
999 nvkm_error(subdev, "GPC%d/%08x: unknown\n", gpc, stat); gf100_gr_trap_gpc()
1006 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_trap_intr() local
1007 struct nvkm_device *device = subdev->device; gf100_gr_trap_intr()
1013 nvkm_error(subdev, "DISPATCH %08x\n", stat); gf100_gr_trap_intr()
1021 nvkm_error(subdev, "M2MF %08x\n", stat); gf100_gr_trap_intr()
1029 nvkm_error(subdev, "CCACHE %08x\n", stat); gf100_gr_trap_intr()
1037 nvkm_error(subdev, "SHADER %08x\n", stat); gf100_gr_trap_intr()
1045 nvkm_error(subdev, "UNK6 %08x\n", stat); gf100_gr_trap_intr()
1053 nvkm_error(subdev, "MACRO %08x\n", stat); gf100_gr_trap_intr()
1064 nvkm_error(subdev, "SKED: %08x [%s]\n", stat, sked); gf100_gr_trap_intr()
1090 nvkm_error(subdev, "ROP%d %08x %08x\n", gf100_gr_trap_intr()
1100 nvkm_error(subdev, "TRAP UNHANDLED %08x\n", trap); gf100_gr_trap_intr()
1108 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_ctxctl_debug_unit() local
1109 struct nvkm_device *device = subdev->device; gf100_gr_ctxctl_debug_unit()
1110 nvkm_error(subdev, "%06x - done %08x\n", base, gf100_gr_ctxctl_debug_unit()
1112 nvkm_error(subdev, "%06x - stat %08x %08x %08x %08x\n", base, gf100_gr_ctxctl_debug_unit()
1117 nvkm_error(subdev, "%06x - stat %08x %08x %08x %08x\n", base, gf100_gr_ctxctl_debug_unit()
1127 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_ctxctl_debug()
1139 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_ctxctl_isr() local
1140 struct nvkm_device *device = subdev->device; gf100_gr_ctxctl_isr()
1152 nvkm_error(subdev, "FECS MTHD subc %d class %04x " gf100_gr_ctxctl_isr()
1159 nvkm_error(subdev, "FECS ucode error %d\n", code); gf100_gr_ctxctl_isr()
1164 nvkm_error(subdev, "FECS watchdog timeout\n"); gf100_gr_ctxctl_isr()
1171 nvkm_error(subdev, "FECS %08x\n", stat); gf100_gr_ctxctl_isr()
1181 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_intr() local
1182 struct nvkm_device *device = subdev->device; gf100_gr_intr()
1218 nvkm_error(subdev, "ILLEGAL_MTHD ch %d [%010llx %s] " gf100_gr_intr()
1228 nvkm_error(subdev, "ILLEGAL_CLASS ch %d [%010llx %s] " gf100_gr_intr()
1238 nvkm_error(subdev, "DATA_ERROR %08x [%s] ch %d [%010llx %s] " gf100_gr_intr()
1247 nvkm_error(subdev, "TRAP ch %d [%010llx %s]\n", gf100_gr_intr()
1261 nvkm_error(subdev, "intr %08x\n", stat); gf100_gr_intr()
1273 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_init_fw()
1297 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_init_csdata()
1338 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_init_ctxctl() local
1339 struct nvkm_device *device = subdev->device; gf100_gr_init_ctxctl()
1430 nvkm_error(subdev, "failed to construct context\n"); gf100_gr_init_ctxctl()
1488 nvkm_error(subdev, "failed to construct context\n"); gf100_gr_init_ctxctl()
1500 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_oneinit()
1585 nvkm_pmu_pgob(gr->base.engine.subdev.device->pmu, false); gf100_gr_init_()
1630 struct nvkm_subdev *subdev = &gr->base.engine.subdev; gf100_gr_ctor_fw() local
1631 struct nvkm_device *device = subdev->device; gf100_gr_ctor_fw()
1650 nvkm_error(subdev, "failed to load %s\n", fwname); gf100_gr_ctor_fw()
1677 nvkm_info(&gr->base.engine.subdev, "using external firmware\n"); gf100_gr_ctor()
1702 struct nvkm_device *device = gr->base.engine.subdev.device; gf100_gr_init()
H A Dg84.c26 #include <subdev/timer.h>
96 struct nvkm_subdev *subdev = &gr->base.engine.subdev; nvkm_gr_vstatus_print() local
109 nvkm_error(subdev, "PGRAPH_VSTATUS%d: %08x [%s]\n", r, stat, msg); nvkm_gr_vstatus_print()
116 struct nvkm_subdev *subdev = &gr->base.engine.subdev; g84_gr_tlb_flush() local
117 struct nvkm_device *device = subdev->device; g84_gr_tlb_flush()
150 nvkm_error(subdev, "PGRAPH TLB flush idle timeout fail\n"); g84_gr_tlb_flush()
154 nvkm_error(subdev, "PGRAPH_STATUS %08x [%s]\n", tmp, status); g84_gr_tlb_flush()
/linux-4.4.14/drivers/gpu/host1x/
H A Dbus.c46 struct host1x_subdev *subdev; host1x_subdev_add() local
48 subdev = kzalloc(sizeof(*subdev), GFP_KERNEL); host1x_subdev_add()
49 if (!subdev) host1x_subdev_add()
52 INIT_LIST_HEAD(&subdev->list); host1x_subdev_add()
53 subdev->np = of_node_get(np); host1x_subdev_add()
56 list_add_tail(&subdev->list, &device->subdevs); host1x_subdev_add()
65 static void host1x_subdev_del(struct host1x_subdev *subdev) host1x_subdev_del() argument
67 list_del(&subdev->list); host1x_subdev_del()
68 of_node_put(subdev->np); host1x_subdev_del()
69 kfree(subdev); host1x_subdev_del()
94 struct host1x_subdev *subdev, host1x_subdev_register()
107 list_move_tail(&subdev->list, &device->active); host1x_subdev_register()
109 subdev->client = client; host1x_subdev_register()
123 struct host1x_subdev *subdev) __host1x_subdev_unregister()
125 struct host1x_client *client = subdev->client; __host1x_subdev_unregister()
143 subdev->client = NULL; __host1x_subdev_unregister()
145 list_move_tail(&subdev->list, &device->subdevs); __host1x_subdev_unregister()
159 struct host1x_subdev *subdev) host1x_subdev_unregister()
162 __host1x_subdev_unregister(device, subdev); host1x_subdev_unregister()
222 struct host1x_subdev *subdev; host1x_add_client() local
227 list_for_each_entry(subdev, &device->subdevs, list) { host1x_add_client()
228 if (subdev->np == client->dev->of_node) { host1x_add_client()
229 host1x_subdev_register(device, subdev, client); host1x_add_client()
244 struct host1x_subdev *subdev; host1x_del_client() local
249 list_for_each_entry(subdev, &device->active, list) { host1x_del_client()
250 if (subdev->client == client) { host1x_del_client()
251 host1x_subdev_unregister(device, subdev); host1x_del_client()
318 struct host1x_subdev *subdev, *sd; __host1x_device_del() local
324 list_for_each_entry_safe(subdev, sd, &device->active, list) { __host1x_device_del()
334 client = subdev->client; __host1x_device_del()
336 __host1x_subdev_unregister(device, subdev); __host1x_device_del()
345 list_for_each_entry_safe(subdev, sd, &device->subdevs, list) __host1x_device_del()
346 host1x_subdev_del(subdev); __host1x_device_del()
376 struct host1x_subdev *subdev; host1x_device_add() local
412 list_for_each_entry(subdev, &device->subdevs, list) { host1x_device_add()
413 if (subdev->np == client->dev->of_node) { host1x_device_add()
414 host1x_subdev_register(device, subdev, client); host1x_device_add()
93 host1x_subdev_register(struct host1x_device *device, struct host1x_subdev *subdev, struct host1x_client *client) host1x_subdev_register() argument
122 __host1x_subdev_unregister(struct host1x_device *device, struct host1x_subdev *subdev) __host1x_subdev_unregister() argument
158 host1x_subdev_unregister(struct host1x_device *device, struct host1x_subdev *subdev) host1x_subdev_unregister() argument
/linux-4.4.14/drivers/staging/comedi/kcomedilib/
H A Dkcomedilib_main.c90 if (insn->subdev >= dev->n_subdevices) { comedi_do_insn()
94 s = &dev->subdevices[insn->subdev]; comedi_do_insn()
98 "%d not usable subdevice\n", insn->subdev); comedi_do_insn()
138 int comedi_dio_get_config(struct comedi_device *dev, unsigned int subdev, comedi_dio_get_config() argument
148 insn.subdev = subdev; comedi_dio_get_config()
159 int comedi_dio_config(struct comedi_device *dev, unsigned int subdev, comedi_dio_config() argument
167 insn.subdev = subdev; comedi_dio_config()
174 int comedi_dio_bitfield2(struct comedi_device *dev, unsigned int subdev, comedi_dio_bitfield2() argument
185 n_chan = comedi_get_n_channels(dev, subdev); comedi_dio_bitfield2()
193 insn.subdev = subdev; comedi_dio_bitfield2()
/linux-4.4.14/drivers/media/platform/soc_camera/
H A Dsoc_camera_platform.c19 #include <media/v4l2-subdev.h>
24 struct v4l2_subdev subdev; member in struct:soc_camera_platform_priv
29 struct v4l2_subdev *subdev = platform_get_drvdata(pdev); get_priv() local
30 return container_of(subdev, struct soc_camera_platform_priv, subdev); get_priv()
162 /* soc-camera convention: control's drvdata points to the subdev */ soc_camera_platform_probe()
163 platform_set_drvdata(pdev, &priv->subdev); soc_camera_platform_probe()
169 v4l2_subdev_init(&priv->subdev, &platform_subdev_ops); soc_camera_platform_probe()
170 v4l2_set_subdevdata(&priv->subdev, p); soc_camera_platform_probe()
171 strncpy(priv->subdev.name, dev_name(&pdev->dev), V4L2_SUBDEV_NAME_SIZE); soc_camera_platform_probe()
173 return v4l2_device_register_subdev(&ici->v4l2_dev, &priv->subdev); soc_camera_platform_probe()
179 struct soc_camera_platform_info *p = v4l2_get_subdevdata(&priv->subdev); soc_camera_platform_remove()
182 v4l2_device_unregister_subdev(&priv->subdev); soc_camera_platform_remove()
H A Dsh_mobile_csi2.c29 #include <media/v4l2-subdev.h>
38 struct v4l2_subdev subdev; member in struct:sh_csi2
52 struct sh_csi2 *priv = container_of(sd, struct sh_csi2, subdev); sh_csi2_set_fmt()
132 struct sh_csi2 *priv = container_of(sd, struct sh_csi2, subdev); sh_csi2_g_mbus_config()
191 struct sh_csi2 *priv = container_of(sd, struct sh_csi2, subdev); sh_csi2_s_mbus_config()
261 struct device *dev = v4l2_get_subdevdata(&priv->subdev); sh_csi2_client_connect()
263 struct soc_camera_device *icd = v4l2_get_subdev_hostdata(&priv->subdev); sh_csi2_client_connect()
293 pm_runtime_put(v4l2_get_subdevdata(&priv->subdev)); sh_csi2_client_disconnect()
298 struct sh_csi2 *priv = container_of(sd, struct sh_csi2, subdev); sh_csi2_s_power()
355 priv->subdev.owner = THIS_MODULE; sh_csi2_probe()
356 priv->subdev.dev = &pdev->dev; sh_csi2_probe()
357 platform_set_drvdata(pdev, &priv->subdev); sh_csi2_probe()
359 v4l2_subdev_init(&priv->subdev, &sh_csi2_subdev_ops); sh_csi2_probe()
360 v4l2_set_subdevdata(&priv->subdev, &pdev->dev); sh_csi2_probe()
362 snprintf(priv->subdev.name, V4L2_SUBDEV_NAME_SIZE, "%s.mipi-csi", sh_csi2_probe()
365 ret = v4l2_async_register_subdev(&priv->subdev); sh_csi2_probe()
378 struct v4l2_subdev *subdev = platform_get_drvdata(pdev); sh_csi2_remove() local
379 struct sh_csi2 *priv = container_of(subdev, struct sh_csi2, subdev); sh_csi2_remove()
381 v4l2_async_unregister_subdev(&priv->subdev); sh_csi2_remove()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/ltc/
H A Dgm107.c26 #include <subdev/fb.h>
27 #include <subdev/timer.h>
32 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_cbc_clear()
41 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_cbc_wait()
57 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_zbc_clear_color()
68 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_zbc_clear_depth()
76 struct nvkm_subdev *subdev = &ltc->subdev; gm107_ltc_lts_isr() local
77 struct nvkm_device *device = subdev->device; gm107_ltc_lts_isr()
82 nvkm_error(subdev, "LTC%d_LTS%d: %08x\n", c, s, stat); gm107_ltc_lts_isr()
90 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_intr()
105 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_oneinit()
123 struct nvkm_device *device = ltc->subdev.device; gm107_ltc_init()
H A Dgf100.c27 #include <subdev/fb.h>
28 #include <subdev/timer.h>
33 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_cbc_clear()
42 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_cbc_wait()
58 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_zbc_clear_color()
69 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_zbc_clear_depth()
95 struct nvkm_subdev *subdev = &ltc->subdev; gf100_ltc_lts_intr() local
96 struct nvkm_device *device = subdev->device; gf100_ltc_lts_intr()
104 nvkm_error(subdev, "LTC%d_LTS%d: %08x [%s]\n", c, s, stat, msg); gf100_ltc_lts_intr()
113 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_intr()
128 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_invalidate()
134 nvkm_warn(&ltc->subdev, "LTC invalidate timeout\n"); gf100_ltc_invalidate()
137 nvkm_debug(&ltc->subdev, "LTC invalidate took %lld ns\n", taken); gf100_ltc_invalidate()
143 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_flush()
149 nvkm_warn(&ltc->subdev, "LTC flush timeout\n"); gf100_ltc_flush()
152 nvkm_debug(&ltc->subdev, "LTC flush took %lld ns\n", taken); gf100_ltc_flush()
160 struct nvkm_ram *ram = ltc->subdev.device->fb->ram; gf100_ltc_oneinit_tag_ram()
211 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_oneinit()
229 struct nvkm_device *device = ltc->subdev.device; gf100_ltc_init()
H A Dbase.c26 #include <subdev/fb.h>
85 nvkm_ltc_intr(struct nvkm_subdev *subdev) nvkm_ltc_intr() argument
87 struct nvkm_ltc *ltc = nvkm_ltc(subdev); nvkm_ltc_intr()
92 nvkm_ltc_oneinit(struct nvkm_subdev *subdev) nvkm_ltc_oneinit() argument
94 struct nvkm_ltc *ltc = nvkm_ltc(subdev); nvkm_ltc_oneinit()
99 nvkm_ltc_init(struct nvkm_subdev *subdev) nvkm_ltc_init() argument
101 struct nvkm_ltc *ltc = nvkm_ltc(subdev); nvkm_ltc_init()
114 nvkm_ltc_dtor(struct nvkm_subdev *subdev) nvkm_ltc_dtor() argument
116 struct nvkm_ltc *ltc = nvkm_ltc(subdev); nvkm_ltc_dtor()
117 struct nvkm_ram *ram = ltc->subdev.device->fb->ram; nvkm_ltc_dtor()
141 nvkm_subdev_ctor(&nvkm_ltc, device, index, 0, &ltc->subdev); nvkm_ltc_new_()
H A Dpriv.h3 #define nvkm_ltc(p) container_of((p), struct nvkm_ltc, subdev)
4 #include <subdev/ltc.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/pci/
H A Dbase.c29 #include <subdev/mc.h>
72 struct nvkm_mc *mc = pci->subdev.device->mc; nvkm_pci_intr()
85 nvkm_pci_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_pci_fini() argument
87 struct nvkm_pci *pci = nvkm_pci(subdev); nvkm_pci_fini()
101 nvkm_pci_preinit(struct nvkm_subdev *subdev) nvkm_pci_preinit() argument
103 struct nvkm_pci *pci = nvkm_pci(subdev); nvkm_pci_preinit()
110 nvkm_pci_init(struct nvkm_subdev *subdev) nvkm_pci_init() argument
112 struct nvkm_pci *pci = nvkm_pci(subdev); nvkm_pci_init()
134 nvkm_pci_dtor(struct nvkm_subdev *subdev) nvkm_pci_dtor() argument
136 struct nvkm_pci *pci = nvkm_pci(subdev); nvkm_pci_dtor()
140 return nvkm_pci(subdev); nvkm_pci_dtor()
159 nvkm_subdev_ctor(&nvkm_pci_func, device, index, 0, &pci->subdev); nvkm_pci_new_()
187 nvkm_debug(&pci->subdev, "MSI enabled\n"); nvkm_pci_new_()
H A Dpriv.h3 #define nvkm_pci(p) container_of((p), struct nvkm_pci, subdev)
4 #include <subdev/pci.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/
H A Dxtensa.c47 return nvkm_gpuobj_new(object->engine->subdev.device, 0x10000, align, nvkm_xtensa_cclass_bind()
60 struct nvkm_subdev *subdev = &xtensa->engine.subdev; nvkm_xtensa_intr() local
61 struct nvkm_device *device = subdev->device; nvkm_xtensa_intr()
69 nvkm_warn(subdev, "Watchdog interrupt, engine hung.\n"); nvkm_xtensa_intr()
73 nvkm_debug(subdev, "Enabling FIFO_CTRL\n"); nvkm_xtensa_intr()
82 struct nvkm_device *device = xtensa->engine.subdev.device; nvkm_xtensa_fini()
97 struct nvkm_subdev *subdev = &xtensa->engine.subdev; nvkm_xtensa_init() local
98 struct nvkm_device *device = subdev->device; nvkm_xtensa_init()
112 nvkm_warn(subdev, "unable to load firmware %s\n", name); nvkm_xtensa_init()
117 nvkm_warn(subdev, "firmware %s too large\n", name); nvkm_xtensa_init()
H A Dfalcon.c25 #include <subdev/timer.h>
48 return nvkm_gpuobj_new(object->engine->subdev.device, 256, nvkm_falcon_cclass_bind()
61 struct nvkm_subdev *subdev = &falcon->engine.subdev; nvkm_falcon_intr() local
62 struct nvkm_device *device = subdev->device; nvkm_falcon_intr()
81 nvkm_debug(subdev, "ucode halted\n"); nvkm_falcon_intr()
87 nvkm_error(subdev, "intr %08x\n", intr); nvkm_falcon_intr()
98 struct nvkm_device *device = falcon->engine.subdev.device; nvkm_falcon_fini()
129 struct nvkm_subdev *subdev = &falcon->engine.subdev; nvkm_falcon_oneinit() local
130 struct nvkm_device *device = subdev->device; nvkm_falcon_oneinit()
149 nvkm_debug(subdev, "falcon version: %d\n", falcon->version); nvkm_falcon_oneinit()
150 nvkm_debug(subdev, "secret level: %d\n", falcon->secret); nvkm_falcon_oneinit()
151 nvkm_debug(subdev, "code limit: %d\n", falcon->code.limit); nvkm_falcon_oneinit()
152 nvkm_debug(subdev, "data limit: %d\n", falcon->data.limit); nvkm_falcon_oneinit()
160 struct nvkm_subdev *subdev = &falcon->engine.subdev; nvkm_falcon_init() local
161 struct nvkm_device *device = subdev->device; nvkm_falcon_init()
214 nvkm_error(subdev, "unable to load firmware data\n"); nvkm_falcon_init()
229 nvkm_error(subdev, "unable to load firmware code\n"); nvkm_falcon_init()
240 nvkm_debug(subdev, "firmware: %s (%s)\n", name, falcon->data.data ? nvkm_falcon_init()
249 nvkm_error(subdev, "core allocation failed, %d\n", ret); nvkm_falcon_init()
273 nvkm_error(subdev, "ucode exceeds falcon limit(s)\n"); nvkm_falcon_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/include/nvkm/core/
H A Dengine.h3 #define nvkm_engine(p) container_of((p), struct nvkm_engine, subdev)
4 #include <core/subdev.h>
10 struct nvkm_subdev subdev; member in struct:nvkm_engine
/linux-4.4.14/drivers/media/i2c/
H A Dmt9t001.c27 #include <media/v4l2-subdev.h>
119 struct v4l2_subdev subdev; member in struct:mt9t001
140 return container_of(sd, struct mt9t001, subdev); to_mt9t001()
156 struct i2c_client *client = v4l2_get_subdevdata(&mt9t001->subdev); mt9t001_set_output_control()
173 struct i2c_client *client = v4l2_get_subdevdata(&mt9t001->subdev); mt9t001_reset()
221 struct i2c_client *client = v4l2_get_subdevdata(&mt9t001->subdev); __mt9t001_set_power()
243 * V4L2 subdev video operations
252 return v4l2_subdev_get_try_format(&mt9t001->subdev, cfg, pad); __mt9t001_get_pad_format()
266 return v4l2_subdev_get_try_crop(&mt9t001->subdev, cfg, pad); __mt9t001_get_pad_crop()
274 static int mt9t001_s_stream(struct v4l2_subdev *subdev, int enable) mt9t001_s_stream() argument
277 struct i2c_client *client = v4l2_get_subdevdata(subdev); mt9t001_s_stream()
279 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_s_stream()
329 static int mt9t001_enum_mbus_code(struct v4l2_subdev *subdev, mt9t001_enum_mbus_code() argument
340 static int mt9t001_enum_frame_size(struct v4l2_subdev *subdev, mt9t001_enum_frame_size() argument
355 static int mt9t001_get_format(struct v4l2_subdev *subdev, mt9t001_get_format() argument
359 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_get_format()
366 static int mt9t001_set_format(struct v4l2_subdev *subdev, mt9t001_set_format() argument
370 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_set_format()
404 static int mt9t001_get_selection(struct v4l2_subdev *subdev, mt9t001_get_selection() argument
408 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_get_selection()
417 static int mt9t001_set_selection(struct v4l2_subdev *subdev, mt9t001_set_selection() argument
421 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_set_selection()
469 * V4L2 subdev control operations
526 struct i2c_client *client = v4l2_get_subdevdata(&mt9t001->subdev); mt9t001_s_ctrl()
727 * V4L2 subdev core operations
730 static int mt9t001_set_power(struct v4l2_subdev *subdev, int on) mt9t001_set_power() argument
732 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_set_power()
756 * V4L2 subdev internal operations
759 static int mt9t001_registered(struct v4l2_subdev *subdev) mt9t001_registered() argument
761 struct i2c_client *client = v4l2_get_subdevdata(subdev); mt9t001_registered()
762 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_registered()
788 static int mt9t001_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9t001_open() argument
793 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9t001_open()
799 format = v4l2_subdev_get_try_format(subdev, fh->pad, 0); mt9t001_open()
806 return mt9t001_set_power(subdev, 1); mt9t001_open()
809 static int mt9t001_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9t001_close() argument
811 return mt9t001_set_power(subdev, 0); mt9t001_close()
911 mt9t001->subdev.ctrl_handler = &mt9t001->ctrls; mt9t001_probe()
931 v4l2_i2c_subdev_init(&mt9t001->subdev, client, &mt9t001_subdev_ops); mt9t001_probe()
932 mt9t001->subdev.internal_ops = &mt9t001_subdev_internal_ops; mt9t001_probe()
933 mt9t001->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; mt9t001_probe()
936 ret = media_entity_init(&mt9t001->subdev.entity, 1, &mt9t001->pad, 0); mt9t001_probe()
941 media_entity_cleanup(&mt9t001->subdev.entity); mt9t001_probe()
949 struct v4l2_subdev *subdev = i2c_get_clientdata(client); mt9t001_remove() local
950 struct mt9t001 *mt9t001 = to_mt9t001(subdev); mt9t001_remove()
953 v4l2_device_unregister_subdev(subdev); mt9t001_remove()
954 media_entity_cleanup(&subdev->entity); mt9t001_remove()
H A Dadp1653.c54 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); adp1653_update_hw()
93 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); adp1653_get_fault()
122 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); adp1653_strobe()
266 flash->subdev.ctrl_handler = &flash->ctrls; adp1653_init_controls()
271 * V4L2 subdev operations
277 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); adp1653_init_device()
315 ret = flash->platform_data->power(&flash->subdev, on); __adp1653_set_power()
333 flash->platform_data->power(&flash->subdev, 0); __adp1653_set_power()
341 adp1653_set_power(struct v4l2_subdev *subdev, int on) adp1653_set_power() argument
343 struct adp1653_flash *flash = to_adp1653_flash(subdev); adp1653_set_power()
397 struct v4l2_subdev *subdev = i2c_get_clientdata(client); adp1653_suspend() local
398 struct adp1653_flash *flash = to_adp1653_flash(subdev); adp1653_suspend()
409 struct v4l2_subdev *subdev = i2c_get_clientdata(client); adp1653_resume() local
410 struct adp1653_flash *flash = to_adp1653_flash(subdev); adp1653_resume()
507 v4l2_i2c_subdev_init(&flash->subdev, client, &adp1653_ops); adp1653_probe()
508 flash->subdev.internal_ops = &adp1653_internal_ops; adp1653_probe()
509 flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; adp1653_probe()
515 ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0); adp1653_probe()
519 flash->subdev.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; adp1653_probe()
531 struct v4l2_subdev *subdev = i2c_get_clientdata(client); adp1653_remove() local
532 struct adp1653_flash *flash = to_adp1653_flash(subdev); adp1653_remove()
534 v4l2_device_unregister_subdev(&flash->subdev); adp1653_remove()
536 media_entity_cleanup(&flash->subdev.entity); adp1653_remove()
H A Dmt9m032.c37 #include <media/v4l2-subdev.h>
146 struct v4l2_subdev subdev; member in struct:mt9m032
167 #define to_mt9m032(sd) container_of(sd, struct mt9m032, subdev)
169 (&((struct i2c_client *)v4l2_get_subdevdata(&(sensor)->subdev))->dev)
195 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_update_timing()
230 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_update_geom_timing()
251 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); update_formatter2()
280 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_setup_pll()
319 static int mt9m032_enum_mbus_code(struct v4l2_subdev *subdev, mt9m032_enum_mbus_code() argument
330 static int mt9m032_enum_frame_size(struct v4l2_subdev *subdev, mt9m032_enum_frame_size() argument
359 return v4l2_subdev_get_try_crop(&sensor->subdev, cfg, 0); __mt9m032_get_pad_crop()
381 return v4l2_subdev_get_try_format(&sensor->subdev, cfg, 0); __mt9m032_get_pad_format()
389 static int mt9m032_get_pad_format(struct v4l2_subdev *subdev, mt9m032_get_pad_format() argument
393 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_get_pad_format()
402 static int mt9m032_set_pad_format(struct v4l2_subdev *subdev, mt9m032_set_pad_format() argument
406 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_set_pad_format()
425 static int mt9m032_get_pad_selection(struct v4l2_subdev *subdev, mt9m032_get_pad_selection() argument
429 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_get_pad_selection()
441 static int mt9m032_set_pad_selection(struct v4l2_subdev *subdev, mt9m032_set_pad_selection() argument
445 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_set_pad_selection()
500 static int mt9m032_get_frame_interval(struct v4l2_subdev *subdev, mt9m032_get_frame_interval() argument
503 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_get_frame_interval()
513 static int mt9m032_set_frame_interval(struct v4l2_subdev *subdev, mt9m032_set_frame_interval() argument
516 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_set_frame_interval()
539 static int mt9m032_s_stream(struct v4l2_subdev *subdev, int streaming) mt9m032_s_stream() argument
541 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_s_stream()
554 * V4L2 subdev core operations
562 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_g_register()
582 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_s_register()
592 * V4L2 subdev control operations
597 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); update_read_mode2()
608 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_set_gain()
649 struct i2c_client *client = v4l2_get_subdevdata(&sensor->subdev); mt9m032_set_ctrl()
744 v4l2_i2c_subdev_init(&sensor->subdev, client, &mt9m032_ops); mt9m032_probe()
745 sensor->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; mt9m032_probe()
800 sensor->subdev.ctrl_handler = &sensor->ctrls; mt9m032_probe()
802 ret = media_entity_init(&sensor->subdev.entity, 1, &sensor->pad, 0); mt9m032_probe()
861 media_entity_cleanup(&sensor->subdev.entity); mt9m032_probe()
871 struct v4l2_subdev *subdev = i2c_get_clientdata(client); mt9m032_remove() local
872 struct mt9m032 *sensor = to_mt9m032(subdev); mt9m032_remove()
874 v4l2_device_unregister_subdev(subdev); mt9m032_remove()
876 media_entity_cleanup(&subdev->entity); mt9m032_remove()
H A Dmt9p031.c33 #include <media/v4l2-subdev.h>
123 struct v4l2_subdev subdev; member in struct:mt9p031
151 return container_of(sd, struct mt9p031, subdev); to_mt9p031()
167 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_set_output_control()
181 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_set_mode2()
195 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_reset()
233 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_clk_setup()
269 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_pll_enable()
298 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_pll_disable()
358 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); __mt9p031_set_power()
380 * V4L2 subdev video operations
385 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_set_params()
448 static int mt9p031_s_stream(struct v4l2_subdev *subdev, int enable) mt9p031_s_stream() argument
450 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_s_stream()
476 static int mt9p031_enum_mbus_code(struct v4l2_subdev *subdev, mt9p031_enum_mbus_code() argument
480 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_enum_mbus_code()
489 static int mt9p031_enum_frame_size(struct v4l2_subdev *subdev, mt9p031_enum_frame_size() argument
493 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_enum_frame_size()
513 return v4l2_subdev_get_try_format(&mt9p031->subdev, cfg, pad); __mt9p031_get_pad_format()
527 return v4l2_subdev_get_try_crop(&mt9p031->subdev, cfg, pad); __mt9p031_get_pad_crop()
535 static int mt9p031_get_format(struct v4l2_subdev *subdev, mt9p031_get_format() argument
539 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_get_format()
546 static int mt9p031_set_format(struct v4l2_subdev *subdev, mt9p031_set_format() argument
550 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_set_format()
584 static int mt9p031_get_selection(struct v4l2_subdev *subdev, mt9p031_get_selection() argument
588 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_get_selection()
597 static int mt9p031_set_selection(struct v4l2_subdev *subdev, mt9p031_set_selection() argument
601 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_set_selection()
647 * V4L2 subdev control operations
657 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_restore_blc()
681 struct i2c_client *client = v4l2_get_subdevdata(&mt9p031->subdev); mt9p031_s_ctrl()
882 * V4L2 subdev core operations
885 static int mt9p031_set_power(struct v4l2_subdev *subdev, int on) mt9p031_set_power() argument
887 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_set_power()
911 * V4L2 subdev internal operations
914 static int mt9p031_registered(struct v4l2_subdev *subdev) mt9p031_registered() argument
916 struct i2c_client *client = v4l2_get_subdevdata(subdev); mt9p031_registered()
917 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_registered()
943 static int mt9p031_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9p031_open() argument
945 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_open()
949 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9p031_open()
955 format = v4l2_subdev_get_try_format(subdev, fh->pad, 0); mt9p031_open()
967 return mt9p031_set_power(subdev, 1); mt9p031_open()
970 static int mt9p031_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9p031_close() argument
972 return mt9p031_set_power(subdev, 0); mt9p031_close()
1098 mt9p031->subdev.ctrl_handler = &mt9p031->ctrls; mt9p031_probe()
1111 v4l2_i2c_subdev_init(&mt9p031->subdev, client, &mt9p031_subdev_ops); mt9p031_probe()
1112 mt9p031->subdev.internal_ops = &mt9p031_subdev_internal_ops; mt9p031_probe()
1115 ret = media_entity_init(&mt9p031->subdev.entity, 1, &mt9p031->pad, 0); mt9p031_probe()
1119 mt9p031->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; mt9p031_probe()
1143 ret = v4l2_async_register_subdev(&mt9p031->subdev); mt9p031_probe()
1148 media_entity_cleanup(&mt9p031->subdev.entity); mt9p031_probe()
1157 struct v4l2_subdev *subdev = i2c_get_clientdata(client); mt9p031_remove() local
1158 struct mt9p031 *mt9p031 = to_mt9p031(subdev); mt9p031_remove()
1161 v4l2_async_unregister_subdev(subdev); mt9p031_remove()
1162 media_entity_cleanup(&subdev->entity); mt9p031_remove()
H A Dmt9v032.c32 #include <media/v4l2-subdev.h>
235 struct v4l2_subdev subdev; member in struct:mt9v032
270 return container_of(sd, struct mt9v032, subdev); to_mt9v032()
373 * V4L2 subdev video operations
382 return v4l2_subdev_get_try_format(&mt9v032->subdev, cfg, pad); __mt9v032_get_pad_format()
396 return v4l2_subdev_get_try_crop(&mt9v032->subdev, cfg, pad); __mt9v032_get_pad_crop()
404 static int mt9v032_s_stream(struct v4l2_subdev *subdev, int enable) mt9v032_s_stream() argument
409 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_s_stream()
453 static int mt9v032_enum_mbus_code(struct v4l2_subdev *subdev, mt9v032_enum_mbus_code() argument
464 static int mt9v032_enum_frame_size(struct v4l2_subdev *subdev, mt9v032_enum_frame_size() argument
479 static int mt9v032_get_format(struct v4l2_subdev *subdev, mt9v032_get_format() argument
483 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_get_format()
492 struct i2c_client *client = v4l2_get_subdevdata(&mt9v032->subdev); mt9v032_configure_pixel_rate()
514 static int mt9v032_set_format(struct v4l2_subdev *subdev, mt9v032_set_format() argument
518 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_set_format()
558 static int mt9v032_get_selection(struct v4l2_subdev *subdev, mt9v032_get_selection() argument
562 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_get_selection()
571 static int mt9v032_set_selection(struct v4l2_subdev *subdev, mt9v032_set_selection() argument
575 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_set_selection()
628 * V4L2 subdev control operations
731 * V4L2 subdev core operations
734 static int mt9v032_set_power(struct v4l2_subdev *subdev, int on) mt9v032_set_power() argument
736 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_set_power()
760 * V4L2 subdev internal operations
763 static int mt9v032_registered(struct v4l2_subdev *subdev) mt9v032_registered() argument
765 struct i2c_client *client = v4l2_get_subdevdata(subdev); mt9v032_registered()
766 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_registered()
810 static int mt9v032_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9v032_open() argument
812 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_open()
816 crop = v4l2_subdev_get_try_crop(subdev, fh->pad, 0); mt9v032_open()
822 format = v4l2_subdev_get_try_format(subdev, fh->pad, 0); mt9v032_open()
834 return mt9v032_set_power(subdev, 1); mt9v032_open()
837 static int mt9v032_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) mt9v032_close() argument
839 return mt9v032_set_power(subdev, 0); mt9v032_close()
1013 mt9v032->subdev.ctrl_handler = &mt9v032->ctrls; mt9v032_probe()
1044 v4l2_i2c_subdev_init(&mt9v032->subdev, client, &mt9v032_subdev_ops); mt9v032_probe()
1045 mt9v032->subdev.internal_ops = &mt9v032_subdev_internal_ops; mt9v032_probe()
1046 mt9v032->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; mt9v032_probe()
1049 ret = media_entity_init(&mt9v032->subdev.entity, 1, &mt9v032->pad, 0); mt9v032_probe()
1053 mt9v032->subdev.dev = &client->dev; mt9v032_probe()
1054 ret = v4l2_async_register_subdev(&mt9v032->subdev); mt9v032_probe()
1061 media_entity_cleanup(&mt9v032->subdev.entity); mt9v032_probe()
1068 struct v4l2_subdev *subdev = i2c_get_clientdata(client); mt9v032_remove() local
1069 struct mt9v032 *mt9v032 = to_mt9v032(subdev); mt9v032_remove()
1071 v4l2_async_unregister_subdev(subdev); mt9v032_remove()
1073 media_entity_cleanup(&subdev->entity); mt9v032_remove()
H A Das3645a.c106 * @subdev: V4L2 subdev
119 struct v4l2_subdev subdev; member in struct:as3645a
136 #define to_as3645a(sd) container_of(sd, struct as3645a, subdev)
141 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_write()
155 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_read()
290 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_read_fault()
328 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_get_ctrl()
375 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_set_ctrl()
476 * V4L2 subdev core operations
482 struct i2c_client *client = v4l2_get_subdevdata(&flash->subdev); as3645a_setup()
523 ret = flash->pdata->set_power(&flash->subdev, on); __as3645a_set_power()
534 flash->pdata->set_power(&flash->subdev, 0); __as3645a_set_power()
571 rval = as3645a_set_power(&flash->subdev, 1); as3645a_registered()
634 as3645a_set_power(&flash->subdev, 0); as3645a_registered()
671 struct v4l2_subdev *subdev = i2c_get_clientdata(client); as3645a_suspend() local
672 struct as3645a *flash = to_as3645a(subdev); as3645a_suspend()
688 struct v4l2_subdev *subdev = i2c_get_clientdata(client); as3645a_resume() local
689 struct as3645a *flash = to_as3645a(subdev); as3645a_resume()
802 flash->subdev.ctrl_handler = &flash->ctrls; as3645a_init_controls()
822 v4l2_i2c_subdev_init(&flash->subdev, client, &as3645a_ops); as3645a_probe()
823 flash->subdev.internal_ops = &as3645a_internal_ops; as3645a_probe()
824 flash->subdev.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; as3645a_probe()
830 ret = media_entity_init(&flash->subdev.entity, 0, NULL, 0); as3645a_probe()
834 flash->subdev.entity.type = MEDIA_ENT_T_V4L2_SUBDEV_FLASH; as3645a_probe()
849 struct v4l2_subdev *subdev = i2c_get_clientdata(client); as3645a_remove() local
850 struct as3645a *flash = to_as3645a(subdev); as3645a_remove()
852 v4l2_device_unregister_subdev(subdev); as3645a_remove()
854 media_entity_cleanup(&flash->subdev.entity); as3645a_remove()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/i2c/
H A Dbase.c31 #include <subdev/bios.h>
32 #include <subdev/bios/dcb.h>
33 #include <subdev/bios/i2c.h>
51 struct nvkm_bios *bios = i2c->subdev.device->bios; nvkm_i2c_bus_find()
129 nvkm_i2c_intr(struct nvkm_subdev *subdev) nvkm_i2c_intr() argument
131 struct nvkm_i2c *i2c = nvkm_i2c(subdev); nvkm_i2c_intr()
159 nvkm_i2c_fini(struct nvkm_subdev *subdev, bool suspend) nvkm_i2c_fini() argument
161 struct nvkm_i2c *i2c = nvkm_i2c(subdev); nvkm_i2c_fini()
178 nvkm_i2c_init(struct nvkm_subdev *subdev) nvkm_i2c_init() argument
180 struct nvkm_i2c *i2c = nvkm_i2c(subdev); nvkm_i2c_init()
196 nvkm_i2c_dtor(struct nvkm_subdev *subdev) nvkm_i2c_dtor() argument
198 struct nvkm_i2c *i2c = nvkm_i2c(subdev); nvkm_i2c_dtor()
257 nvkm_subdev_ctor(&nvkm_i2c, device, index, 0, &i2c->subdev); nvkm_i2c_new_()
269 nvkm_debug(&i2c->subdev, "ccb %02x: type %02x drive %02x " nvkm_i2c_new_()
284 nvkm_error(&i2c->subdev, "ccb %02x pad, %d\n", i, ret); nvkm_i2c_new_()
304 nvkm_error(&i2c->subdev, "ccb %02x bus, %d\n", i, ret); nvkm_i2c_new_()
319 nvkm_error(&i2c->subdev, "ccb %02x aux, %d\n", i, ret); nvkm_i2c_new_()
324 nvkm_warn(&i2c->subdev, "ccb %02x was ignored\n", i); nvkm_i2c_new_()
342 nvkm_debug(&i2c->subdev, "dcb %02x no bus\n", i); nvkm_i2c_new_()
354 nvkm_debug(&i2c->subdev, "dcb %02x drv %02x unknown\n", nvkm_i2c_new_()
365 nvkm_error(&i2c->subdev, "dcb %02x pad, %d\n", nvkm_i2c_new_()
378 nvkm_error(&i2c->subdev, "dcb %02x aux, %d\n", nvkm_i2c_new_()
388 nvkm_error(&i2c->subdev, "dcb %02x bus, %d\n", nvkm_i2c_new_()
H A Dbusnv50.c27 #include <subdev/vga.h>
39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv50_i2c_bus_drive_scl()
49 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv50_i2c_bus_drive_sda()
59 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv50_i2c_bus_sense_scl()
67 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv50_i2c_bus_sense_sda()
75 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv50_i2c_bus_init()
101 nvkm_warn(&pad->i2c->subdev, "bus %d unknown\n", drive); nv50_i2c_bus_new()
H A Dpriv.h3 #define nvkm_i2c(p) container_of((p), struct nvkm_i2c, subdev)
4 #include <subdev/i2c.h>
H A Dbusgf119.c36 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; gf119_i2c_bus_drive_scl()
44 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; gf119_i2c_bus_drive_sda()
52 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; gf119_i2c_bus_sense_scl()
60 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; gf119_i2c_bus_sense_sda()
68 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; gf119_i2c_bus_init()
H A Dbusnv04.c27 #include <subdev/vga.h>
39 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv04_i2c_bus_drive_scl()
50 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv04_i2c_bus_drive_sda()
61 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv04_i2c_bus_sense_scl()
69 struct nvkm_device *device = bus->base.pad->i2c->subdev.device; nv04_i2c_bus_sense_sda()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/cipher/
H A Dg84.c37 int ret = nvkm_gpuobj_new(object->engine->subdev.device, 16, g84_cipher_oclass_bind()
59 return nvkm_gpuobj_new(object->engine->subdev.device, 256, g84_cipher_cclass_bind()
82 struct nvkm_subdev *subdev = &cipher->subdev; g84_cipher_intr() local
83 struct nvkm_device *device = subdev->device; g84_cipher_intr()
96 nvkm_error(subdev, "%08x [%s] ch %d [%010llx %s] " g84_cipher_intr()
111 struct nvkm_device *device = cipher->subdev.device; g84_cipher_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/subdev/mmu/
H A Dnv41.c28 #include <subdev/timer.h>
72 struct nvkm_device *device = mmu->base.subdev.device; nv41_vm_flush()
74 mutex_lock(&mmu->base.subdev.mutex); nv41_vm_flush()
81 mutex_unlock(&mmu->base.subdev.mutex); nv41_vm_flush()
85 * MMU subdev
92 struct nvkm_device *device = mmu->base.subdev.device; nv41_mmu_oneinit()
111 struct nvkm_device *device = mmu->base.subdev.device; nv41_mmu_init()
H A Dpriv.h3 #define nvkm_mmu(p) container_of((p), struct nvkm_mmu, subdev)
4 #include <subdev/mmu.h>
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/ce/
H A Dgk104.c31 const u32 base = (ce->subdev.index - NVKM_ENGINE_CE0) * 0x1000; gk104_ce_intr()
32 struct nvkm_subdev *subdev = &ce->subdev; gk104_ce_intr() local
33 struct nvkm_device *device = subdev->device; gk104_ce_intr()
36 nvkm_warn(subdev, "intr %08x\n", stat); gk104_ce_intr()
H A Dgt215.c45 struct nvkm_subdev *subdev = &ce->engine.subdev; gt215_ce_intr() local
46 struct nvkm_device *device = subdev->device; gt215_ce_intr()
47 const u32 base = (subdev->index - NVKM_ENGINE_CE0) * 0x1000; gt215_ce_intr()
56 nvkm_error(subdev, "DISPATCH_ERROR %04x [%s] ch %d [%010llx %s] " gt215_ce_intr()
/linux-4.4.14/drivers/media/platform/xilinx/
H A Dxilinx-tpg.c24 #include <media/v4l2-subdev.h>
113 static inline struct xtpg_device *to_tpg(struct v4l2_subdev *subdev) to_tpg() argument
115 return container_of(subdev, struct xtpg_device, xvip.subdev); to_tpg()
170 static int xtpg_s_stream(struct v4l2_subdev *subdev, int enable) xtpg_s_stream() argument
172 struct xtpg_device *xtpg = to_tpg(subdev); xtpg_s_stream()
262 return v4l2_subdev_get_try_format(&xtpg->xvip.subdev, cfg, pad); __xtpg_get_pad_format()
270 static int xtpg_get_format(struct v4l2_subdev *subdev, xtpg_get_format() argument
274 struct xtpg_device *xtpg = to_tpg(subdev); xtpg_get_format()
281 static int xtpg_set_format(struct v4l2_subdev *subdev, xtpg_set_format() argument
285 struct xtpg_device *xtpg = to_tpg(subdev); xtpg_set_format()
323 static int xtpg_enum_frame_size(struct v4l2_subdev *subdev, xtpg_enum_frame_size() argument
329 format = v4l2_subdev_get_try_format(subdev, cfg, fse->pad); xtpg_enum_frame_size()
352 static int xtpg_open(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) xtpg_open() argument
354 struct xtpg_device *xtpg = to_tpg(subdev); xtpg_open()
357 format = v4l2_subdev_get_try_format(subdev, fh->pad, 0); xtpg_open()
361 format = v4l2_subdev_get_try_format(subdev, fh->pad, 1); xtpg_open()
368 static int xtpg_close(struct v4l2_subdev *subdev, struct v4l2_subdev_fh *fh) xtpg_close() argument
770 struct v4l2_subdev *subdev; xtpg_probe() local
830 subdev = &xtpg->xvip.subdev; xtpg_probe()
831 v4l2_subdev_init(subdev, &xtpg_ops); xtpg_probe()
832 subdev->dev = &pdev->dev; xtpg_probe()
833 subdev->internal_ops = &xtpg_internal_ops; xtpg_probe()
834 strlcpy(subdev->name, dev_name(&pdev->dev), sizeof(subdev->name)); xtpg_probe()
835 v4l2_set_subdevdata(subdev, xtpg); xtpg_probe()
836 subdev->flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; xtpg_probe()
837 subdev->entity.ops = &xtpg_media_ops; xtpg_probe()
839 ret = media_entity_init(&subdev->entity, xtpg->npads, xtpg->pads, 0); xtpg_probe()
864 subdev->ctrl_handler = &xtpg->ctrl_handler; xtpg_probe()
878 ret = v4l2_async_register_subdev(subdev); xtpg_probe()
880 dev_err(&pdev->dev, "failed to register subdev\n"); xtpg_probe()
888 media_entity_cleanup(&subdev->entity); xtpg_probe()
898 struct v4l2_subdev *subdev = &xtpg->xvip.subdev; xtpg_remove() local
900 v4l2_async_unregister_subdev(subdev); xtpg_remove()
902 media_entity_cleanup(&subdev->entity); xtpg_remove()
H A Dxilinx-vipp.c37 * @entity: media entity, from the corresponding V4L2 subdev
38 * @asd: subdev asynchronous registration information
39 * @subdev: V4L2 subdev
47 struct v4l2_subdev *subdev; member in struct:xvip_graph_entity
312 dev_err(xdev->dev, "failed to register subdev nodes\n"); xvip_graph_notify_complete()
318 struct v4l2_subdev *subdev, xvip_graph_notify_bound()
325 /* Locate the entity corresponding to the bound subdev and store the xvip_graph_notify_bound()
326 * subdev pointer. xvip_graph_notify_bound()
329 if (entity->node != subdev->dev->of_node) xvip_graph_notify_bound()
332 if (entity->subdev) { xvip_graph_notify_bound()
333 dev_err(xdev->dev, "duplicate subdev for node %s\n", xvip_graph_notify_bound()
338 dev_dbg(xdev->dev, "subdev %s bound\n", subdev->name); xvip_graph_notify_bound()
339 entity->entity = &subdev->entity; xvip_graph_notify_bound()
340 entity->subdev = subdev; xvip_graph_notify_bound()
344 dev_err(xdev->dev, "no entity for subdev %s\n", subdev->name); xvip_graph_notify_bound()
529 dev_err(xdev->dev, "no subdev found in graph\n"); xvip_graph_init()
317 xvip_graph_notify_bound(struct v4l2_async_notifier *notifier, struct v4l2_subdev *subdev, struct v4l2_async_subdev *asd) xvip_graph_notify_bound() argument
/linux-4.4.14/drivers/staging/media/davinci_vpfe/
H A Dvpfe_video.c32 /* get v4l2 subdev pointer to external subdev which is active */ vpfe_get_input_entity()
47 /* updates external subdev(sensor/decoder) which is active */ vpfe_update_current_ext_subdev()
52 struct v4l2_subdev *subdev; vpfe_update_current_ext_subdev() local
62 subdev = media_entity_to_v4l2_subdev(remote->entity); vpfe_update_current_ext_subdev()
65 if (!strcmp(vpfe_cfg->sub_devs[i].module_name, subdev->name)) { vpfe_update_current_ext_subdev()
76 /* find the v4l2 subdev pointer */ vpfe_update_current_ext_subdev()
80 video->current_ext_subdev->subdev = vpfe_dev->sd[i]; vpfe_update_current_ext_subdev()
85 /* get the subdev which is connected to the output video node */
98 /* get the format set at output pad of the adjacent subdev */
104 struct v4l2_subdev *subdev; __vpfe_video_get_format() local
109 subdev = vpfe_video_remote_subdev(video, &pad); __vpfe_video_get_format()
110 if (subdev == NULL) __vpfe_video_get_format()
117 ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt); __vpfe_video_get_format()
177 pr_err("Invalid external subdev\n"); vpfe_update_pipe_state()
216 struct v4l2_subdev *subdev; vpfe_video_validate_pipeline() local
226 subdev = vpfe_video_remote_subdev(pipe->outputs[0], NULL); vpfe_video_validate_pipeline()
227 if (subdev == NULL) vpfe_video_validate_pipeline()
232 pad = &subdev->entity.pads[0]; vpfe_video_validate_pipeline()
238 ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, vpfe_video_validate_pipeline()
250 subdev = media_entity_to_v4l2_subdev(pad->entity); vpfe_video_validate_pipeline()
254 ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &fmt_source); vpfe_video_validate_pipeline()
282 struct v4l2_subdev *subdev; vpfe_pipeline_enable() local
298 subdev = media_entity_to_v4l2_subdev(entity); vpfe_pipeline_enable()
299 ret = v4l2_subdev_call(subdev, video, s_stream, 1); vpfe_pipeline_enable()
322 struct v4l2_subdev *subdev; vpfe_pipeline_disable() local
339 subdev = media_entity_to_v4l2_subdev(entity); vpfe_pipeline_disable()
340 ret = v4l2_subdev_call(subdev, video, s_stream, 0); vpfe_pipeline_disable()
640 * fills v4l2_fmtdesc structure with output format set on adjacent subdev,
652 struct v4l2_subdev *subdev; vpfe_enum_fmt() local
659 /* since already subdev pad format is set, vpfe_enum_fmt()
672 /* get the remote subdev */ vpfe_enum_fmt()
673 subdev = vpfe_video_remote_subdev(video, NULL); vpfe_enum_fmt()
674 if (subdev == NULL) { vpfe_enum_fmt()
676 "invalid remote subdev for video node\n"); vpfe_enum_fmt()
681 /* get output format of remote subdev */ vpfe_enum_fmt()
682 ret = v4l2_subdev_call(subdev, pad, get_fmt, NULL, &sd_fmt); vpfe_enum_fmt()
685 "invalid remote subdev for video node\n"); vpfe_enum_fmt()
721 /* get adjacent subdev's output pad format */ vpfe_s_fmt()
737 * based on output format set on adjacent subdev
750 /* get adjacent subdev's output pad format */ vpfe_try_fmt()
778 /* enumerate from the subdev user has chosen through mc */ vpfe_enum_input()
812 * set input on external subdev
870 /* set standards set by subdev in video device */ vpfe_s_input()
882 * vpfe_querystd() - query std which is being input on external subdev
887 * call external subdev through v4l2_device_call_until_err to
913 * vpfe_s_std() - set std on external subdev
918 * set std pointed by std_id on external subdev by calling it using
968 * to external subdev
973 * enum dv_timings's which are supported by external subdev through
984 struct v4l2_subdev *subdev = video->current_ext_subdev->subdev; vpfe_enum_dv_timings() local
989 return v4l2_subdev_call(subdev, pad, enum_dv_timings, timings); vpfe_enum_dv_timings()
994 * to external subdev
999 * get dv_timings which is being input on external subdev through
1010 struct v4l2_subdev *subdev = video->current_ext_subdev->subdev; vpfe_query_dv_timings() local
1013 return v4l2_subdev_call(subdev, video, query_dv_timings, timings); vpfe_query_dv_timings()
1017 * vpfe_s_dv_timings() - set dv_timings on external subdev
1022 * set dv_timings pointed by timings on external subdev through
1043 * vpfe_g_dv_timings() - get dv_timings which is set on external subdev
1048 * get dv_timings which is set on external subdev through
1059 struct v4l2_subdev *subdev = video->current_ext_subdev->subdev; vpfe_g_dv_timings() local
1062 return v4l2_subdev_call(subdev, video, g_dv_timings, timings); vpfe_g_dv_timings()
H A Dvpfe.h26 #include <linux/v4l2-subdev.h>
47 /* v4l2 subdev */
48 struct v4l2_subdev *subdev; member in struct:vpfe_ext_subdev_info
74 /* information about each subdev */
H A Ddm365_resizer.c491 struct device *dev = resizer->crop_resizer.subdev.v4l2_dev->dev; resizer_configure_in_continious_mode()
669 struct device *dev = resizer->crop_resizer.subdev.v4l2_dev->dev; resizer_configure_in_single_shot_mode()
944 struct device *dev = resizer->crop_resizer.subdev.v4l2_dev->dev; resizer_get_configuration()
1200 * V4L2 subdev operations
1205 * @sd: pointer to v4l2 subdev structure
1212 struct device *dev = resizer->crop_resizer.subdev.v4l2_dev->dev; resizer_ioctl()
1216 if (&resizer->crop_resizer.subdev != sd) resizer_ioctl()
1260 * resizer_set_stream() - Enable/Disable streaming on resizer subdev
1261 * @sd: pointer to v4l2 subdev structure
1268 if (&resizer->crop_resizer.subdev != sd) resizer_set_stream()
1291 * @sd: pointer to subdev.
1292 * @cfg: V4L2 subdev pad config
1294 * @which: wanted subdev format.
1305 if (&resizer->crop_resizer.subdev == sd) __resizer_get_format()
1307 if (&resizer->resizer_a.subdev == sd) __resizer_get_format()
1309 if (&resizer->resizer_b.subdev == sd) __resizer_get_format()
1315 * resizer_try_format() - Handle try format by pad subdev method
1316 * @sd: pointer to subdev.
1317 * @cfg: V4L2 subdev pad config
1320 * @which: wanted subdev format.
1332 if ((&resizer->resizer_a.subdev == sd && pad == RESIZER_PAD_SINK) || resizer_try_format()
1333 (&resizer->resizer_b.subdev == sd && pad == RESIZER_PAD_SINK) || resizer_try_format()
1334 (&resizer->crop_resizer.subdev == sd && resizer_try_format()
1349 } else if (&resizer->resizer_a.subdev == sd && resizer_try_format()
1367 } else if (&resizer->resizer_b.subdev == sd && resizer_try_format()
1389 * resizer_set_format() - Handle set format by pads subdev method
1390 * @sd: pointer to v4l2 subdev structure
1391 * @cfg: V4L2 subdev pad config
1392 * @fmt: pointer to v4l2 subdev format structure
1411 if (&resizer->crop_resizer.subdev == sd) { resizer_set_format()
1427 } else if (&resizer->resizer_a.subdev == sd) { resizer_set_format()
1434 } else if (&resizer->resizer_b.subdev == sd) { resizer_set_format()
1450 * @sd: pointer to v4l2 subdev structure.
1451 * @cfg: V4L2 subdev pad config
1452 * @fmt: pointer to v4l2 subdev format structure
1472 * @cfg: V4L2 subdev pad config
1507 * @cfg: V4L2 subdev pad config
1532 * @fh: V4L2 subdev file handle.
1544 if (&resizer->crop_resizer.subdev == sd) { resizer_init_formats()
1568 } else if (&resizer->resizer_a.subdev == sd) { resizer_init_formats()
1584 } else if (&resizer->resizer_b.subdev == sd) { resizer_init_formats()
1605 /* subdev core operations */
1610 /* subdev internal operations */
1615 /* subdev video operations */
1620 /* subdev pad operations */
1628 /* subdev operations */
1657 if (&resizer->crop_resizer.subdev == sd) { resizer_link_setup()
1706 } else if (&resizer->resizer_a.subdev == sd) { resizer_link_setup()
1731 } else if (&resizer->resizer_b.subdev == sd) { resizer_link_setup()
1777 /* unregister subdev */ vpfe_resizer_unregister_entities()
1778 v4l2_device_unregister_subdev(&vpfe_rsz->crop_resizer.subdev); vpfe_resizer_unregister_entities()
1779 v4l2_device_unregister_subdev(&vpfe_rsz->resizer_a.subdev); vpfe_resizer_unregister_entities()
1780 v4l2_device_unregister_subdev(&vpfe_rsz->resizer_b.subdev); vpfe_resizer_unregister_entities()
1782 media_entity_cleanup(&vpfe_rsz->crop_resizer.subdev.entity); vpfe_resizer_unregister_entities()
1783 media_entity_cleanup(&vpfe_rsz->resizer_a.subdev.entity); vpfe_resizer_unregister_entities()
1784 media_entity_cleanup(&vpfe_rsz->resizer_b.subdev.entity); vpfe_resizer_unregister_entities()
1799 /* Register the crop resizer subdev */ vpfe_resizer_register_entities()
1800 ret = v4l2_device_register_subdev(vdev, &resizer->crop_resizer.subdev); vpfe_resizer_register_entities()
1802 pr_err("Failed to register crop resizer as v4l2-subdev\n"); vpfe_resizer_register_entities()
1805 /* Register Resizer-A subdev */ vpfe_resizer_register_entities()
1806 ret = v4l2_device_register_subdev(vdev, &resizer->resizer_a.subdev); vpfe_resizer_register_entities()
1808 pr_err("Failed to register resizer-a as v4l2-subdev\n"); vpfe_resizer_register_entities()
1811 /* Register Resizer-B subdev */ vpfe_resizer_register_entities()
1812 ret = v4l2_device_register_subdev(vdev, &resizer->resizer_b.subdev); vpfe_resizer_register_entities()
1814 pr_err("Failed to register resizer-b as v4l2-subdev\n"); vpfe_resizer_register_entities()
1834 ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 1, vpfe_resizer_register_entities()
1835 &resizer->resizer_a.subdev.entity, vpfe_resizer_register_entities()
1841 ret = media_entity_create_link(&resizer->crop_resizer.subdev.entity, 2, vpfe_resizer_register_entities()
1842 &resizer->resizer_b.subdev.entity, vpfe_resizer_register_entities()
1848 ret = media_entity_create_link(&resizer->resizer_a.subdev.entity, 1, vpfe_resizer_register_entities()
1854 ret = media_entity_create_link(&resizer->resizer_b.subdev.entity, 1, vpfe_resizer_register_entities()
1865 v4l2_device_unregister_subdev(&resizer->crop_resizer.subdev); vpfe_resizer_register_entities()
1866 v4l2_device_unregister_subdev(&resizer->resizer_a.subdev); vpfe_resizer_register_entities()
1867 v4l2_device_unregister_subdev(&resizer->resizer_b.subdev); vpfe_resizer_register_entities()
1868 media_entity_cleanup(&resizer->crop_resizer.subdev.entity); vpfe_resizer_register_entities()
1869 media_entity_cleanup(&resizer->resizer_a.subdev.entity); vpfe_resizer_register_entities()
1870 media_entity_cleanup(&resizer->resizer_b.subdev.entity); vpfe_resizer_register_entities()
1882 struct v4l2_subdev *sd = &vpfe_rsz->crop_resizer.subdev; vpfe_resizer_init()
1922 sd = &vpfe_rsz->resizer_a.subdev; vpfe_resizer_init()
1944 sd = &vpfe_rsz->resizer_b.subdev; vpfe_resizer_init()
/linux-4.4.14/drivers/gpu/drm/nouveau/nvkm/engine/sec/
H A Dg98.c45 struct nvkm_subdev *subdev = &sec->engine.subdev; g98_sec_intr() local
46 struct nvkm_device *device = subdev->device; g98_sec_intr()
55 nvkm_error(subdev, "DISPATCH_ERROR %04x [%s] ch %d [%010llx %s] " g98_sec_intr()
/linux-4.4.14/drivers/staging/comedi/
H A Dcomedilib.h24 int comedi_dio_get_config(struct comedi_device *dev, unsigned int subdev,
26 int comedi_dio_config(struct comedi_device *dev, unsigned int subdev,
28 int comedi_dio_bitfield2(struct comedi_device *dev, unsigned int subdev,
/linux-4.4.14/drivers/gpu/drm/nouveau/dispnv04/
H A Ddisp.h4 #include <subdev/bios/pll.h>
165 #include <subdev/bios.h>
166 #include <subdev/bios/init.h>
175 .subdev = &bios->subdev, nouveau_bios_run_init_table()
/linux-4.4.14/include/media/
H A Dv4l2-device.h25 #include <media/v4l2-subdev.h>
31 It allows easy access to sub-devices (see v4l2-subdev.h) and provides
106 /* Register a subdev with a v4l2 device. While registered the subdev module
111 /* Unregister a subdev with a v4l2 device. Can also be called if the subdev
115 /* Register device nodes for all subdev of the v4l2 device that are marked with
134 Ignore any errors. Note that you cannot add or delete a subdev
154 subdev while walking the subdevs list. */
177 a subdev while walking the subdevs list. */
190 add or delete a subdev while walking the subdevs list. */

Completed in 2156 milliseconds

1234