From: Yiwei Zhang Date: Wed, 5 Apr 2023 20:57:41 +0000 (-0700) Subject: venus: requires ringMonitoring X-Git-Tag: upstream/23.3.3~10228 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b285083cad445aae4467a4878ecadc2958cfcf5a;p=platform%2Fupstream%2Fmesa.git venus: requires ringMonitoring Signed-off-by: Yiwei Zhang Part-of: --- diff --git a/src/virtio/vulkan/vn_instance.c b/src/virtio/vulkan/vn_instance.c index b461792..e532fd6 100644 --- a/src/virtio/vulkan/vn_instance.c +++ b/src/virtio/vulkan/vn_instance.c @@ -133,19 +133,16 @@ vn_instance_init_ring(struct vn_instance *instance) instance->ring.id = (uintptr_t)ring; - struct VkRingMonitorInfoMESA monitor_info; - if (instance->experimental.ringMonitoring) { - ring->monitor.report_period_us = 3000000; - mtx_init(&ring->monitor.mutex, mtx_plain); - monitor_info = (struct VkRingMonitorInfoMESA){ - .sType = VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA, - .maxReportingPeriodMicroseconds = ring->monitor.report_period_us, - }; - } + ring->monitor.report_period_us = 3000000; + mtx_init(&ring->monitor.mutex, mtx_plain); + const struct VkRingMonitorInfoMESA monitor_info = { + .sType = VK_STRUCTURE_TYPE_RING_MONITOR_INFO_MESA, + .maxReportingPeriodMicroseconds = ring->monitor.report_period_us, + }; const struct VkRingCreateInfoMESA info = { .sType = VK_STRUCTURE_TYPE_RING_CREATE_INFO_MESA, - .pNext = instance->experimental.ringMonitoring ? &monitor_info : NULL, + .pNext = &monitor_info, .resourceId = instance->ring.shmem->res_id, .size = layout.shmem_size, .idleTimeout = 50ull * 1000 * 1000, @@ -232,7 +229,8 @@ vn_instance_init_experimental_features(struct vn_instance *instance) if (!exp_feats->memoryResourceAllocationSize || !exp_feats->globalFencing || !exp_feats->largeRing || - !exp_feats->syncFdFencing || !exp_feats->asyncRoundtrip) + !exp_feats->syncFdFencing || !exp_feats->asyncRoundtrip || + !exp_feats->ringMonitoring) return VK_ERROR_INITIALIZATION_FAILED; if (VN_DEBUG(INIT)) {