Lines Matching defs:core

15 #include "core.h"
115 struct venus_core *core;
337 struct device *dev = hdev->core->dev;
352 struct device *dev = hdev->core->dev;
359 const struct venus_resources *res = hdev->core->res;
365 writel(tbl[i].value, hdev->core->base + tbl[i].reg);
370 void __iomem *cpu_ic_base = hdev->core->cpu_ic_base;
373 if (IS_V6(hdev->core))
384 struct device *dev = hdev->core->dev;
432 static int venus_hfi_core_set_resource(struct venus_core *core, u32 id,
435 struct venus_hfi_device *hdev = to_hfi_priv(core);
458 struct device *dev = hdev->core->dev;
462 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
463 void __iomem *wrapper_base = hdev->core->wrapper_base;
466 if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
475 if (IS_V1(hdev->core))
494 if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
504 struct device *dev = hdev->core->dev;
505 void __iomem *wrapper_base = hdev->core->wrapper_base;
523 struct device *dev = hdev->core->dev;
524 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
542 dev_err(dev, "failed to reset venus core\n");
553 void __iomem *wrapper_base = hdev->core->wrapper_base;
554 void __iomem *vbif_base = hdev->core->vbif_base;
555 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
556 void __iomem *aon_base = hdev->core->aon_base;
557 struct device *dev = hdev->core->dev;
562 if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core)) {
565 if (IS_IRIS2_1(hdev->core))
595 if (IS_V4(hdev->core)) {
638 ret = venus_set_hw_state_suspend(hdev->core);
658 ret = venus_set_hw_state_resume(hdev->core);
671 venus_set_hw_state_suspend(hdev->core);
902 const struct venus_resources *res = hdev->core->res;
933 struct device *dev = hdev->core->dev;
934 const struct venus_resources *res = hdev->core->res;
942 if (IS_V1(hdev->core)) {
953 /* For specific venus core, it is mandatory to set the UBWC configuration */
965 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
975 struct device *dev = hdev->core->dev;
1036 struct device *dev = hdev->core->dev;
1067 static irqreturn_t venus_isr_thread(struct venus_core *core)
1069 struct venus_hfi_device *hdev = to_hfi_priv(core);
1077 res = hdev->core->res;
1082 msg_ret = hfi_process_msg_packet(core, pkt);
1088 venus_hfi_core_set_resource(core, res->vmem_id,
1109 static irqreturn_t venus_isr(struct venus_core *core)
1111 struct venus_hfi_device *hdev = to_hfi_priv(core);
1119 cpu_cs_base = hdev->core->cpu_cs_base;
1120 wrapper_base = hdev->core->wrapper_base;
1123 if (IS_IRIS2(core) || IS_IRIS2_1(core)) {
1135 if (!(IS_IRIS2(core) || IS_IRIS2_1(core)))
1141 static int venus_core_init(struct venus_core *core)
1143 struct venus_hfi_device *hdev = to_hfi_priv(core);
1144 struct device *dev = core->dev;
1170 static int venus_core_deinit(struct venus_core *core)
1172 struct venus_hfi_device *hdev = to_hfi_priv(core);
1181 static int venus_core_ping(struct venus_core *core, u32 cookie)
1183 struct venus_hfi_device *hdev = to_hfi_priv(core);
1191 static int venus_core_trigger_ssr(struct venus_core *core, u32 trigger_type)
1193 struct venus_hfi_device *hdev = to_hfi_priv(core);
1207 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1232 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1233 struct device *dev = hdev->core->dev;
1245 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1254 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1283 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1313 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1327 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1347 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1377 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1398 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1415 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1433 struct venus_hfi_device *hdev = to_hfi_priv(inst->core);
1444 static int venus_resume(struct venus_core *core)
1446 struct venus_hfi_device *hdev = to_hfi_priv(core);
1465 static int venus_suspend_1xx(struct venus_core *core)
1467 struct venus_hfi_device *hdev = to_hfi_priv(core);
1468 struct device *dev = core->dev;
1469 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
1525 void __iomem *wrapper_base = hdev->core->wrapper_base;
1526 void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base;
1527 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
1530 if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
1545 void __iomem *wrapper_base = hdev->core->wrapper_base;
1546 void __iomem *wrapper_tz_base = hdev->core->wrapper_tz_base;
1547 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
1550 if (IS_IRIS2(hdev->core) || IS_IRIS2_1(hdev->core))
1563 static int venus_suspend_3xx(struct venus_core *core)
1565 struct venus_hfi_device *hdev = to_hfi_priv(core);
1566 struct device *dev = core->dev;
1567 void __iomem *cpu_cs_base = hdev->core->cpu_cs_base;
1590 * 1. Check for ARM9 and video core to be idle by checking WFI bit
1592 * Control status register for video core.
1599 dev_err(dev, "wait for cpu and video core idle fail (%d)\n", ret);
1631 static int venus_suspend(struct venus_core *core)
1633 if (IS_V3(core) || IS_V4(core) || IS_V6(core))
1634 return venus_suspend_3xx(core);
1636 return venus_suspend_1xx(core);
1670 void venus_hfi_destroy(struct venus_core *core)
1672 struct venus_hfi_device *hdev = to_hfi_priv(core);
1674 core->priv = NULL;
1678 core->ops = NULL;
1681 int venus_hfi_create(struct venus_core *core)
1692 hdev->core = core;
1694 core->priv = hdev;
1695 core->ops = &venus_hfi_ops;
1705 core->priv = NULL;
1706 core->ops = NULL;
1710 void venus_hfi_queues_reinit(struct venus_core *core)
1712 struct venus_hfi_device *hdev = to_hfi_priv(core);