Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
[profile/ivi/kernel-adaptation-intel-automotive.git] / drivers / gpu / drm / nouveau / core / include / subdev / bios / bmp.h
1 #ifndef __NVBIOS_BMP_H__
2 #define __NVBIOS_BMP_H__
3
4 static inline u16
5 bmp_version(struct nouveau_bios *bios)
6 {
7         if (bios->bmp_offset) {
8                 return nv_ro08(bios, bios->bmp_offset + 5) << 8 |
9                        nv_ro08(bios, bios->bmp_offset + 6);
10         }
11
12         return 0x0000;
13 }
14
15 static inline u16
16 bmp_mem_init_table(struct nouveau_bios *bios)
17 {
18         if (bmp_version(bios) >= 0x0300)
19                 return nv_ro16(bios, bios->bmp_offset + 24);
20         return 0x0000;
21 }
22
23 static inline u16
24 bmp_sdr_seq_table(struct nouveau_bios *bios)
25 {
26         if (bmp_version(bios) >= 0x0300)
27                 return nv_ro16(bios, bios->bmp_offset + 26);
28         return 0x0000;
29 }
30
31 static inline u16
32 bmp_ddr_seq_table(struct nouveau_bios *bios)
33 {
34         if (bmp_version(bios) >= 0x0300)
35                 return nv_ro16(bios, bios->bmp_offset + 28);
36         return 0x0000;
37 }
38
39 #endif