etnaviv: drm: Make use of etna_core_info
Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Lucas Stach <l.stach@pengutronix.de> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28574>
This commit is contained in:
committed by
Marge Bot
parent
3b150bcba8
commit
ad4b6cce30
@@ -57,13 +57,13 @@ struct etna_gpu *etna_gpu_new(struct etna_device *dev, unsigned int core)
|
||||
gpu->dev = dev;
|
||||
gpu->core = core;
|
||||
|
||||
gpu->model = get_param(dev, core, ETNAVIV_PARAM_GPU_MODEL);
|
||||
gpu->revision = get_param(dev, core, ETNAVIV_PARAM_GPU_REVISION);
|
||||
gpu->info.model = get_param(dev, core, ETNAVIV_PARAM_GPU_MODEL);
|
||||
gpu->info.revision = get_param(dev, core, ETNAVIV_PARAM_GPU_REVISION);
|
||||
|
||||
if (!gpu->model)
|
||||
if (!gpu->info.model)
|
||||
goto fail;
|
||||
|
||||
DEBUG_MSG(" GPU model: 0x%x (rev %x)", gpu->model, gpu->revision);
|
||||
DEBUG_MSG(" GPU model: 0x%x (rev %x)", gpu->info.model, gpu->info.revision);
|
||||
|
||||
return gpu;
|
||||
fail:
|
||||
@@ -86,10 +86,10 @@ int etna_gpu_get_param(struct etna_gpu *gpu, enum etna_param_id param,
|
||||
|
||||
switch(param) {
|
||||
case ETNA_GPU_MODEL:
|
||||
*value = gpu->model;
|
||||
*value = gpu->info.model;
|
||||
return 0;
|
||||
case ETNA_GPU_REVISION:
|
||||
*value = gpu->revision;
|
||||
*value = gpu->info.revision;
|
||||
return 0;
|
||||
case ETNA_GPU_FEATURES_0:
|
||||
*value = get_param(dev, core, ETNAVIV_PARAM_GPU_FEATURES_0);
|
||||
|
||||
@@ -39,6 +39,7 @@
|
||||
|
||||
#include <xf86drm.h>
|
||||
|
||||
#include "etna_core_info.h"
|
||||
#include "util/list.h"
|
||||
#include "util/log.h"
|
||||
#include "util/macros.h"
|
||||
@@ -121,8 +122,7 @@ struct etna_bo {
|
||||
struct etna_gpu {
|
||||
struct etna_device *dev;
|
||||
uint32_t core;
|
||||
uint32_t model;
|
||||
uint32_t revision;
|
||||
struct etna_core_info info;
|
||||
};
|
||||
|
||||
struct etna_pipe {
|
||||
|
||||
@@ -43,6 +43,7 @@ libetnaviv_drm = static_library(
|
||||
dependencies : [
|
||||
dep_libdrm,
|
||||
dep_valgrind,
|
||||
idep_etna_common,
|
||||
],
|
||||
build_by_default : false,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user