/Linux-v5.10/drivers/gpu/drm/nouveau/nvkm/subdev/bios/ |
D | base.c | 26 #include <subdev/bios.h> 27 #include <subdev/bios/bmp.h> 28 #include <subdev/bios/bit.h> 29 #include <subdev/bios/image.h> 32 nvbios_addr(struct nvkm_bios *bios, u32 *addr, u8 size) in nvbios_addr() argument 36 if (*addr > bios->image0_size && bios->imaged_addr) { in nvbios_addr() 37 *addr -= bios->image0_size; in nvbios_addr() 38 *addr += bios->imaged_addr; in nvbios_addr() 41 if (unlikely(*addr + size >= bios->size)) { in nvbios_addr() 42 nvkm_error(&bios->subdev, "OOB %d %08x %08x\n", size, p, *addr); in nvbios_addr() [all …]
|
D | rammap.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/rammap.h> 29 nvbios_rammapTe(struct nvkm_bios *bios, u8 *ver, u8 *hdr, in nvbios_rammapTe() argument 35 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_rammapTe() 37 rammap = nvbios_rd32(bios, bit_P.offset + 4); in nvbios_rammapTe() 40 *ver = nvbios_rd08(bios, rammap + 0); in nvbios_rammapTe() 44 *hdr = nvbios_rd08(bios, rammap + 1); in nvbios_rammapTe() 45 *cnt = nvbios_rd08(bios, rammap + 5); in nvbios_rammapTe() 46 *len = nvbios_rd08(bios, rammap + 2); in nvbios_rammapTe() [all …]
|
D | Kbuild | 2 nvkm-y += nvkm/subdev/bios/base.o 3 nvkm-y += nvkm/subdev/bios/bit.o 4 nvkm-y += nvkm/subdev/bios/boost.o 5 nvkm-y += nvkm/subdev/bios/conn.o 6 nvkm-y += nvkm/subdev/bios/cstep.o 7 nvkm-y += nvkm/subdev/bios/dcb.o 8 nvkm-y += nvkm/subdev/bios/disp.o 9 nvkm-y += nvkm/subdev/bios/dp.o 10 nvkm-y += nvkm/subdev/bios/extdev.o 11 nvkm-y += nvkm/subdev/bios/fan.o [all …]
|
D | pll.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/bmp.h> 27 #include <subdev/bios/pll.h> 81 pll_limits_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in pll_limits_table() argument 86 if (!bit_entry(bios, 'C', &bit_C)) { in pll_limits_table() 88 data = nvbios_rd16(bios, bit_C.offset + 8); in pll_limits_table() 90 data = nvbios_rd32(bios, bit_C.offset + 0); in pll_limits_table() 92 *ver = nvbios_rd08(bios, data + 0); in pll_limits_table() 93 *hdr = nvbios_rd08(bios, data + 1); in pll_limits_table() [all …]
|
D | perf.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/perf.h> 30 nvbios_perf_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, in nvbios_perf_table() argument 36 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_perf_table() 38 perf = nvbios_rd32(bios, bit_P.offset + 0); in nvbios_perf_table() 40 *ver = nvbios_rd08(bios, perf + 0); in nvbios_perf_table() 41 *hdr = nvbios_rd08(bios, perf + 1); in nvbios_perf_table() 43 *cnt = nvbios_rd08(bios, perf + 5); in nvbios_perf_table() 44 *len = nvbios_rd08(bios, perf + 2); in nvbios_perf_table() [all …]
|
D | timing.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/timing.h> 29 nvbios_timingTe(struct nvkm_bios *bios, in nvbios_timingTe() argument 35 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_timingTe() 37 timing = nvbios_rd32(bios, bit_P.offset + 4); in nvbios_timingTe() 40 timing = nvbios_rd32(bios, bit_P.offset + 8); in nvbios_timingTe() 43 *ver = nvbios_rd08(bios, timing + 0); in nvbios_timingTe() 46 *hdr = nvbios_rd08(bios, timing + 1); in nvbios_timingTe() 47 *cnt = nvbios_rd08(bios, timing + 2); in nvbios_timingTe() [all …]
|
D | dp.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/dp.h> 29 nvbios_dp_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_dp_table() argument 33 if (!bit_entry(bios, 'd', &d)) { in nvbios_dp_table() 35 u16 data = nvbios_rd16(bios, d.offset); in nvbios_dp_table() 37 *ver = nvbios_rd08(bios, data + 0x00); in nvbios_dp_table() 45 *hdr = nvbios_rd08(bios, data + 0x01); in nvbios_dp_table() 46 *len = nvbios_rd08(bios, data + 0x02); in nvbios_dp_table() 47 *cnt = nvbios_rd08(bios, data + 0x03); in nvbios_dp_table() [all …]
|
D | init.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/bmp.h> 27 #include <subdev/bios/conn.h> 28 #include <subdev/bios/dcb.h> 29 #include <subdev/bios/dp.h> 30 #include <subdev/bios/gpio.h> 31 #include <subdev/bios/init.h> 32 #include <subdev/bios/ramcfg.h> 124 struct nvkm_bios *bios = init->subdev->device->bios; in init_conn() local [all …]
|
D | volt.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/volt.h> 29 nvbios_volt_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_volt_table() argument 34 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_volt_table() 36 volt = nvbios_rd32(bios, bit_P.offset + 0x0c); in nvbios_volt_table() 39 volt = nvbios_rd32(bios, bit_P.offset + 0x10); in nvbios_volt_table() 42 *ver = nvbios_rd08(bios, volt + 0); in nvbios_volt_table() 46 *cnt = nvbios_rd08(bios, volt + 2); in nvbios_volt_table() 47 *len = nvbios_rd08(bios, volt + 1); in nvbios_volt_table() [all …]
|
D | disp.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/disp.h> 29 nvbios_disp_table(struct nvkm_bios *bios, in nvbios_disp_table() argument 34 if (!bit_entry(bios, 'U', &U)) { in nvbios_disp_table() 36 u16 data = nvbios_rd16(bios, U.offset); in nvbios_disp_table() 38 *ver = nvbios_rd08(bios, data + 0x00); in nvbios_disp_table() 43 *hdr = nvbios_rd08(bios, data + 0x01); in nvbios_disp_table() 44 *len = nvbios_rd08(bios, data + 0x02); in nvbios_disp_table() 45 *cnt = nvbios_rd08(bios, data + 0x03); in nvbios_disp_table() [all …]
|
D | vmap.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/vmap.h> 29 nvbios_vmap_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_vmap_table() argument 34 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_vmap_table() 36 vmap = nvbios_rd32(bios, bit_P.offset + 0x20); in nvbios_vmap_table() 38 *ver = nvbios_rd08(bios, vmap + 0); in nvbios_vmap_table() 42 *hdr = nvbios_rd08(bios, vmap + 1); in nvbios_vmap_table() 43 *cnt = nvbios_rd08(bios, vmap + 3); in nvbios_vmap_table() 44 *len = nvbios_rd08(bios, vmap + 2); in nvbios_vmap_table() [all …]
|
D | i2c.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/dcb.h> 26 #include <subdev/bios/i2c.h> 29 dcb_i2c_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in dcb_i2c_table() argument 32 u16 dcb = dcb_table(bios, ver, hdr, cnt, len); in dcb_i2c_table() 35 i2c = nvbios_rd16(bios, dcb + 2); in dcb_i2c_table() 37 i2c = nvbios_rd16(bios, dcb + 4); in dcb_i2c_table() 41 nvkm_warn(&bios->subdev, "ccb %02x not supported\n", *ver); in dcb_i2c_table() 46 *ver = nvbios_rd08(bios, i2c + 0); in dcb_i2c_table() 47 *hdr = nvbios_rd08(bios, i2c + 1); in dcb_i2c_table() [all …]
|
D | pmu.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/image.h> 27 #include <subdev/bios/pmu.h> 30 nvbios_pmuTe(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_pmuTe() argument 35 if (!bit_entry(bios, 'p', &bit_p)) { in nvbios_pmuTe() 37 data = nvbios_rd32(bios, bit_p.offset + 0x00); in nvbios_pmuTe() 39 *ver = nvbios_rd08(bios, data + 0x00); /* maybe? */ in nvbios_pmuTe() 40 *hdr = nvbios_rd08(bios, data + 0x01); in nvbios_pmuTe() 41 *len = nvbios_rd08(bios, data + 0x02); in nvbios_pmuTe() [all …]
|
D | cstep.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/cstep.h> 29 nvbios_cstepTe(struct nvkm_bios *bios, in nvbios_cstepTe() argument 35 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_cstepTe() 37 cstep = nvbios_rd32(bios, bit_P.offset + 0x34); in nvbios_cstepTe() 40 *ver = nvbios_rd08(bios, cstep + 0); in nvbios_cstepTe() 43 *hdr = nvbios_rd08(bios, cstep + 1); in nvbios_cstepTe() 44 *cnt = nvbios_rd08(bios, cstep + 3); in nvbios_cstepTe() 45 *len = nvbios_rd08(bios, cstep + 2); in nvbios_cstepTe() [all …]
|
D | boost.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/boost.h> 29 nvbios_boostTe(struct nvkm_bios *bios, in nvbios_boostTe() argument 35 if (!bit_entry(bios, 'P', &bit_P)) { in nvbios_boostTe() 37 boost = nvbios_rd32(bios, bit_P.offset + 0x30); in nvbios_boostTe() 40 *ver = nvbios_rd08(bios, boost + 0); in nvbios_boostTe() 43 *hdr = nvbios_rd08(bios, boost + 1); in nvbios_boostTe() 44 *cnt = nvbios_rd08(bios, boost + 5); in nvbios_boostTe() 45 *len = nvbios_rd08(bios, boost + 2); in nvbios_boostTe() [all …]
|
D | conn.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/dcb.h> 26 #include <subdev/bios/conn.h> 29 nvbios_connTe(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in nvbios_connTe() argument 31 u32 dcb = dcb_table(bios, ver, hdr, cnt, len); in nvbios_connTe() 33 u32 data = nvbios_rd16(bios, dcb + 0x14); in nvbios_connTe() 35 *ver = nvbios_rd08(bios, data + 0); in nvbios_connTe() 36 *hdr = nvbios_rd08(bios, data + 1); in nvbios_connTe() 37 *cnt = nvbios_rd08(bios, data + 2); in nvbios_connTe() 38 *len = nvbios_rd08(bios, data + 3); in nvbios_connTe() [all …]
|
D | extdev.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/dcb.h> 26 #include <subdev/bios/extdev.h> 29 extdev_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *len, u8 *cnt) in extdev_table() argument 34 dcb = dcb_table(bios, &dcb_ver, &dcb_hdr, &dcb_cnt, &dcb_len); in extdev_table() 38 extdev = nvbios_rd16(bios, dcb + 18); in extdev_table() 42 *ver = nvbios_rd08(bios, extdev + 0); in extdev_table() 43 *hdr = nvbios_rd08(bios, extdev + 1); in extdev_table() 44 *cnt = nvbios_rd08(bios, extdev + 2); in extdev_table() 45 *len = nvbios_rd08(bios, extdev + 3); in extdev_table() [all …]
|
D | xpio.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/gpio.h> 26 #include <subdev/bios/xpio.h> 29 dcb_xpiod_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in dcb_xpiod_table() argument 31 u16 data = dcb_gpio_table(bios, ver, hdr, cnt, len); in dcb_xpiod_table() 33 u16 xpio = nvbios_rd16(bios, data + 0x04); in dcb_xpiod_table() 35 *ver = nvbios_rd08(bios, data + 0x00); in dcb_xpiod_table() 36 *hdr = nvbios_rd08(bios, data + 0x01); in dcb_xpiod_table() 37 *cnt = nvbios_rd08(bios, data + 0x02); in dcb_xpiod_table() 38 *len = nvbios_rd08(bios, data + 0x03); in dcb_xpiod_table() [all …]
|
D | mxm.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/mxm.h> 29 mxm_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr) in mxm_table() argument 31 struct nvkm_subdev *subdev = &bios->subdev; in mxm_table() 34 if (bit_entry(bios, 'x', &x)) { in mxm_table() 75 mxm_sor_map(struct nvkm_bios *bios, u8 conn) in mxm_sor_map() argument 77 struct nvkm_subdev *subdev = &bios->subdev; in mxm_sor_map() 79 u16 mxm = mxm_table(bios, &ver, &hdr); in mxm_sor_map() 81 u16 map = nvbios_rd16(bios, mxm + 4); in mxm_sor_map() [all …]
|
D | gpio.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/dcb.h> 26 #include <subdev/bios/gpio.h> 27 #include <subdev/bios/xpio.h> 30 dcb_gpio_table(struct nvkm_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len) in dcb_gpio_table() argument 33 u16 dcb = dcb_table(bios, ver, hdr, cnt, len); in dcb_gpio_table() 36 data = nvbios_rd16(bios, dcb + 0x0a); in dcb_gpio_table() 38 if (*ver >= 0x22 && nvbios_rd08(bios, dcb - 1) >= 0x13) in dcb_gpio_table() 39 data = nvbios_rd16(bios, dcb - 0x0f); in dcb_gpio_table() 42 *ver = nvbios_rd08(bios, data + 0x00); in dcb_gpio_table() [all …]
|
D | shadow.c | 27 #include <subdev/bios.h> 28 #include <subdev/bios/image.h> 39 shadow_fetch(struct nvkm_bios *bios, struct shadow *mthd, u32 upto) in shadow_fetch() argument 42 const u32 start = bios->size; in shadow_fetch() 44 if (nvbios_extend(bios, limit) > 0) { in shadow_fetch() 45 u32 read = mthd->func->read(data, start, limit - start, bios); in shadow_fetch() 46 bios->size = start + read; in shadow_fetch() 48 return bios->size >= upto; in shadow_fetch() 52 shadow_image(struct nvkm_bios *bios, int idx, u32 offset, struct shadow *mthd) in shadow_image() argument 54 struct nvkm_subdev *subdev = &bios->subdev; in shadow_image() [all …]
|
D | M0209.c | 24 #include <subdev/bios.h> 25 #include <subdev/bios/bit.h> 26 #include <subdev/bios/M0209.h> 29 nvbios_M0209Te(struct nvkm_bios *bios, in nvbios_M0209Te() argument 35 if (!bit_entry(bios, 'M', &bit_M)) { in nvbios_M0209Te() 37 data = nvbios_rd32(bios, bit_M.offset + 0x09); in nvbios_M0209Te() 39 *ver = nvbios_rd08(bios, data + 0x00); in nvbios_M0209Te() 42 *hdr = nvbios_rd08(bios, data + 0x01); in nvbios_M0209Te() 43 *len = nvbios_rd08(bios, data + 0x02); in nvbios_M0209Te() 44 *ssz = nvbios_rd08(bios, data + 0x03); in nvbios_M0209Te() [all …]
|
/Linux-v5.10/drivers/gpu/drm/amd/amdgpu/ |
D | amdgpu_bios.c | 36 * BIOS. 46 /* Check if current bios is an ATOM BIOS. 47 * Return true if it is ATOM BIOS. Otherwise, return false. 49 static bool check_atom_bios(uint8_t *bios, size_t size) in check_atom_bios() argument 53 if (!bios || size < 0x49) { in check_atom_bios() 58 if (!AMD_IS_VALID_VBIOS(bios)) { in check_atom_bios() 59 DRM_INFO("BIOS signature incorrect %x %x\n", bios[0], bios[1]); in check_atom_bios() 63 bios_header_start = bios[0x48] | (bios[0x49] << 8); in check_atom_bios() 65 DRM_INFO("Can't locate bios header\n"); in check_atom_bios() 71 DRM_INFO("BIOS header is broken\n"); in check_atom_bios() [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/ |
D | nouveau_bios.c | 51 * There's a few checksums in the BIOS, so here's a generic checking in nv_cksum() 66 static uint16_t clkcmptable(struct nvbios *bios, uint16_t clktable, int pxclk) in clkcmptable() argument 71 if (bios->major_version < 5) /* pre BIT */ in clkcmptable() 77 compareclk = ROM16(bios->data[clktable + compare_record_len * i]); in clkcmptable() 79 if (bios->major_version < 5) { in clkcmptable() 80 uint8_t tmdssub = bios->data[clktable + 2 + compare_record_len * i]; in clkcmptable() 81 scriptptr = ROM16(bios->data[bios->init_script_tbls_ptr + tmdssub * 2]); in clkcmptable() 83 scriptptr = ROM16(bios->data[clktable + 2 + compare_record_len * i]); in clkcmptable() 110 struct nvbios *bios = &drm->vbios; in call_lvds_manufacturer_script() local 111 …uint8_t sub = bios->data[bios->fp.xlated_entry + script] + (bios->fp.link_c_increment && dcbent->o… in call_lvds_manufacturer_script() [all …]
|
/Linux-v5.10/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/ |
D | bmp.h | 5 bmp_version(struct nvkm_bios *bios) in bmp_version() argument 7 if (bios->bmp_offset) { in bmp_version() 8 return nvbios_rd08(bios, bios->bmp_offset + 5) << 8 | in bmp_version() 9 nvbios_rd08(bios, bios->bmp_offset + 6); in bmp_version() 16 bmp_mem_init_table(struct nvkm_bios *bios) in bmp_mem_init_table() argument 18 if (bmp_version(bios) >= 0x0300) in bmp_mem_init_table() 19 return nvbios_rd16(bios, bios->bmp_offset + 24); in bmp_mem_init_table() 24 bmp_sdr_seq_table(struct nvkm_bios *bios) in bmp_sdr_seq_table() argument 26 if (bmp_version(bios) >= 0x0300) in bmp_sdr_seq_table() 27 return nvbios_rd16(bios, bios->bmp_offset + 26); in bmp_sdr_seq_table() [all …]
|