]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bmp.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / gpu / drm / nouveau / include / nvkm / subdev / bios / bmp.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
70c0f263
BS
2#ifndef __NVBIOS_BMP_H__
3#define __NVBIOS_BMP_H__
70c0f263 4static inline u16
d390b480 5bmp_version(struct nvkm_bios *bios)
70c0f263
BS
6{
7 if (bios->bmp_offset) {
7f5f518f
BS
8 return nvbios_rd08(bios, bios->bmp_offset + 5) << 8 |
9 nvbios_rd08(bios, bios->bmp_offset + 6);
70c0f263
BS
10 }
11
12 return 0x0000;
13}
14
15static inline u16
d390b480 16bmp_mem_init_table(struct nvkm_bios *bios)
70c0f263
BS
17{
18 if (bmp_version(bios) >= 0x0300)
7f5f518f 19 return nvbios_rd16(bios, bios->bmp_offset + 24);
70c0f263
BS
20 return 0x0000;
21}
22
23static inline u16
d390b480 24bmp_sdr_seq_table(struct nvkm_bios *bios)
70c0f263
BS
25{
26 if (bmp_version(bios) >= 0x0300)
7f5f518f 27 return nvbios_rd16(bios, bios->bmp_offset + 26);
70c0f263
BS
28 return 0x0000;
29}
30
31static inline u16
d390b480 32bmp_ddr_seq_table(struct nvkm_bios *bios)
70c0f263
BS
33{
34 if (bmp_version(bios) >= 0x0300)
7f5f518f 35 return nvbios_rd16(bios, bios->bmp_offset + 28);
70c0f263
BS
36 return 0x0000;
37}
70c0f263 38#endif