Skip to content

Commit

Permalink
?[props]: allow unknown devices
Browse files Browse the repository at this point in the history
  • Loading branch information
artdeell authored Nov 20, 2023
1 parent 58f9318 commit bae2eed
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/panfrost/lib/pan_props.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,19 +82,29 @@ const struct panfrost_model panfrost_model_list[] = {
#undef HAS_ANISO
#undef MODEL

const struct panfrost_model panfrost_unknown_model = {
.gpu_id = 0,
.name = "Unknowm Mali device (Panfrost)",
.performance_counters = "AAAA",
.min_rev_anisotropic = NO_ANISO,
.tilebuffer_size = 8192,
.quirks = {},
}

/*
* Look up a supported model by its GPU ID, or return NULL if the model is not
* supported at this time.
*/
const struct panfrost_model *
panfrost_get_model(uint32_t gpu_id)
{

for (unsigned i = 0; i < ARRAY_SIZE(panfrost_model_list); ++i) {
if (panfrost_model_list[i].gpu_id == gpu_id)
return &panfrost_model_list[i];
}

return NULL;
return &panfrost_unknown_model;
}

/* Abstraction over the raw drm_panfrost_get_param ioctl for fetching
Expand Down

0 comments on commit bae2eed

Please sign in to comment.