root/drivers/gpu/drm/etnaviv/etnaviv_hwdb.c

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

DEFINITIONS

This source file includes following definitions.
  1. etnaviv_fill_identity_from_hwdb

   1 // SPDX-License-Identifier: GPL-2.0
   2 /*
   3  * Copyright (C) 2018 Etnaviv Project
   4  */
   5 
   6 #include "etnaviv_gpu.h"
   7 
   8 static const struct etnaviv_chip_identity etnaviv_chip_identities[] = {
   9         {
  10                 .model = 0x7000,
  11                 .revision = 0x6214,
  12                 .stream_count = 16,
  13                 .register_max = 64,
  14                 .thread_count = 1024,
  15                 .shader_core_count = 4,
  16                 .vertex_cache_size = 16,
  17                 .vertex_output_buffer_size = 1024,
  18                 .pixel_pipes = 2,
  19                 .instruction_count = 512,
  20                 .num_constants = 320,
  21                 .buffer_size = 0,
  22                 .varyings_count = 16,
  23                 .features = 0xe0287cad,
  24                 .minor_features0 = 0xc1799eff,
  25                 .minor_features1 = 0xfefbfad9,
  26                 .minor_features2 = 0xeb9d4fbf,
  27                 .minor_features3 = 0xedfffced,
  28                 .minor_features4 = 0xdb0dafc7,
  29                 .minor_features5 = 0xbb5ac333,
  30                 .minor_features6 = 0xfc8ee200,
  31                 .minor_features7 = 0x03fbfa6f,
  32                 .minor_features8 = 0x00ef0ef0,
  33                 .minor_features9 = 0x0edbf03c,
  34                 .minor_features10 = 0x90044250,
  35                 .minor_features11 = 0x00000024,
  36         },
  37 };
  38 
  39 bool etnaviv_fill_identity_from_hwdb(struct etnaviv_gpu *gpu)
  40 {
  41         struct etnaviv_chip_identity *ident = &gpu->identity;
  42         int i;
  43 
  44         for (i = 0; i < ARRAY_SIZE(etnaviv_chip_identities); i++) {
  45                 if (etnaviv_chip_identities[i].model == ident->model &&
  46                     etnaviv_chip_identities[i].revision == ident->revision) {
  47                         memcpy(ident, &etnaviv_chip_identities[i],
  48                                sizeof(*ident));
  49                         return true;
  50                 }
  51         }
  52 
  53         return false;
  54 }

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