diff options
author | Lucas Stach <l.stach@pengutronix.de> | 2018-01-22 17:57:59 +0300 |
---|---|---|
committer | Lucas Stach <l.stach@pengutronix.de> | 2018-03-09 14:22:37 +0300 |
commit | 681c19c8bf34df58e6705ba4c1a1676474ef7799 (patch) | |
tree | ab2a9d3066a4bfd63dcd2bca57f5d160bd090e83 /drivers/gpu/drm/etnaviv/etnaviv_gpu.c | |
parent | 0538aaf927b205662a3f3d641ecbc8b0f3236e2a (diff) | |
download | linux-681c19c8bf34df58e6705ba4c1a1676474ef7799.tar.xz |
drm/etnaviv: add hardware database
New versions of the Vivante kernel driver don't trust the hardware feature
bits anymore, but use an internal hardware database. This also includes
more feature fields than are available in hardware.
As we can't trust the hardware feature bits to be correct anymore, we need
to replicate the HWDB in etanviv. For now only the GC7000L as found on
the i.MX8M is supported.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Diffstat (limited to 'drivers/gpu/drm/etnaviv/etnaviv_gpu.c')
-rw-r--r-- | drivers/gpu/drm/etnaviv/etnaviv_gpu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c index 42ad286d5ec0..dfb12717a742 100644 --- a/drivers/gpu/drm/etnaviv/etnaviv_gpu.c +++ b/drivers/gpu/drm/etnaviv/etnaviv_gpu.c @@ -374,6 +374,13 @@ static void etnaviv_hw_identify(struct etnaviv_gpu *gpu) dev_info(gpu->dev, "model: GC%x, revision: %x\n", gpu->identity.model, gpu->identity.revision); + /* + * If there is a match in the HWDB, we aren't interested in the + * remaining register values, as they might be wrong. + */ + if (etnaviv_fill_identity_from_hwdb(gpu)) + return; + gpu->identity.features = gpu_read(gpu, VIVS_HI_CHIP_FEATURE); /* Disable fast clear on GC700. */ |