root/drivers/gpu/drm/nouveau/include/nvkm/subdev/bios/bmp.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


DEFINITIONS

This source file includes following definitions.
  1. bmp_version
  2. bmp_mem_init_table
  3. bmp_sdr_seq_table
  4. bmp_ddr_seq_table

   1 /* SPDX-License-Identifier: MIT */
   2 #ifndef __NVBIOS_BMP_H__
   3 #define __NVBIOS_BMP_H__
   4 static inline u16
   5 bmp_version(struct nvkm_bios *bios)
   6 {
   7         if (bios->bmp_offset) {
   8                 return nvbios_rd08(bios, bios->bmp_offset + 5) << 8 |
   9                        nvbios_rd08(bios, bios->bmp_offset + 6);
  10         }
  11 
  12         return 0x0000;
  13 }
  14 
  15 static inline u16
  16 bmp_mem_init_table(struct nvkm_bios *bios)
  17 {
  18         if (bmp_version(bios) >= 0x0300)
  19                 return nvbios_rd16(bios, bios->bmp_offset + 24);
  20         return 0x0000;
  21 }
  22 
  23 static inline u16
  24 bmp_sdr_seq_table(struct nvkm_bios *bios)
  25 {
  26         if (bmp_version(bios) >= 0x0300)
  27                 return nvbios_rd16(bios, bios->bmp_offset + 26);
  28         return 0x0000;
  29 }
  30 
  31 static inline u16
  32 bmp_ddr_seq_table(struct nvkm_bios *bios)
  33 {
  34         if (bmp_version(bios) >= 0x0300)
  35                 return nvbios_rd16(bios, bios->bmp_offset + 28);
  36         return 0x0000;
  37 }
  38 #endif

/* [<][>][^][v][top][bottom][index][help] */