*/
void xe_call_for_each_graphics_ip(xe_graphics_fn xe_fn)
{
- const struct xe_graphics_desc *ip, *last = NULL;
+ const struct xe_graphics_desc *desc, *last = NULL;
- for (int i = 0; i < ARRAY_SIZE(graphics_ip_map); i++) {
- ip = graphics_ip_map[i].ip;
- if (ip == last)
+ for (int i = 0; i < ARRAY_SIZE(graphics_ips); i++) {
+ desc = graphics_ips[i].desc;
+ if (desc == last)
continue;
- xe_fn(ip);
- last = ip;
+ xe_fn(desc);
+ last = desc;
}
}
EXPORT_SYMBOL_IF_KUNIT(xe_call_for_each_graphics_ip);
*/
void xe_call_for_each_media_ip(xe_media_fn xe_fn)
{
- const struct xe_media_desc *ip, *last = NULL;
+ const struct xe_media_desc *desc, *last = NULL;
- for (int i = 0; i < ARRAY_SIZE(media_ip_map); i++) {
- ip = media_ip_map[i].ip;
- if (ip == last)
+ for (int i = 0; i < ARRAY_SIZE(media_ips); i++) {
+ desc = media_ips[i].desc;
+ if (desc == last)
continue;
- xe_fn(ip);
- last = ip;
+ xe_fn(desc);
+ last = desc;
}
}
EXPORT_SYMBOL_IF_KUNIT(xe_call_for_each_media_ip);
#undef PLATFORM
__diag_pop();
-/* Map of GMD_ID values to graphics IP */
-static const struct gmdid_map graphics_ip_map[] = {
+/* GMDID-based Graphics IPs */
+static const struct xe_ip graphics_ips[] = {
{ 1270, "Xe_LPG", &graphics_xelpg },
{ 1271, "Xe_LPG", &graphics_xelpg },
{ 1274, "Xe_LPG+", &graphics_xelpg },
{ 3001, "Xe3_LPG", &graphics_xe2 },
};
-/* Map of GMD_ID values to media IP */
-static const struct gmdid_map media_ip_map[] = {
+/* GMDID-based Media IPs */
+static const struct xe_ip media_ips[] = {
{ 1300, "Xe_LPM+", &media_xelpmp },
{ 1301, "Xe2_HPM", &media_xelpmp },
{ 2000, "Xe2_LPM", &media_xelpmp },
read_gmdid(xe, GMDID_GRAPHICS, &ver, graphics_revid);
- for (int i = 0; i < ARRAY_SIZE(graphics_ip_map); i++) {
- if (ver == graphics_ip_map[i].ver) {
+ for (int i = 0; i < ARRAY_SIZE(graphics_ips); i++) {
+ if (ver == graphics_ips[i].verx100) {
xe->info.graphics_verx100 = ver;
- xe->info.graphics_name = graphics_ip_map[i].name;
- *graphics = graphics_ip_map[i].ip;
+ xe->info.graphics_name = graphics_ips[i].name;
+ *graphics = graphics_ips[i].desc;
break;
}
if (ver == 0)
return;
- for (int i = 0; i < ARRAY_SIZE(media_ip_map); i++) {
- if (ver == media_ip_map[i].ver) {
+ for (int i = 0; i < ARRAY_SIZE(media_ips); i++) {
+ if (ver == media_ips[i].verx100) {
xe->info.media_verx100 = ver;
- xe->info.media_name = media_ip_map[i].name;
- *media = media_ip_map[i].ip;
+ xe->info.media_name = media_ips[i].name;
+ *media = media_ips[i].desc;
break;
}