/* * sync fence merge tests * Copyright 2015-2016 Collabora Ltd. * * Based on the implementation from the Android Open Source Project, * * Copyright 2012 Google, Inc * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #include "sync.h" #include "sw_sync.h" #include "synctest.h" int test_fence_merge_same_fence(void) { int fence, valid, merged; int timeline = sw_sync_timeline_create(); valid = sw_sync_timeline_is_valid(timeline); ASSERT(valid, "Failure allocating timeline\n"); fence = sw_sync_fence_create(timeline, "allocFence", 5); valid = sw_sync_fence_is_valid(fence); ASSERT(valid, "Failure allocating fence\n"); merged = sync_merge("mergeFence", fence, fence); valid = sw_sync_fence_is_valid(fence); ASSERT(valid, "Failure merging fence\n"); ASSERT(sync_fence_count_with_status(merged, FENCE_STATUS_SIGNALED) == 0, "fence signaled too early!\n"); sw_sync_timeline_inc(timeline, 5); ASSERT(sync_fence_count_with_status(merged, FENCE_STATUS_SIGNALED) == 1, "fence did not signal!\n"); sw_sync_fence_destroy(merged); sw_sync_fence_destroy(fence); sw_sync_timeline_destroy(timeline); return 0; } cgi/linux/net-next.git/diff/drivers/usb/misc/ehset.c?h=nds-private-remove&id=3c223c19aea85d3dda1416c187915f4a30b04b1f'>diff
path: root/drivers/usb/misc/ehset.c
diff options
context:
space:
mode:
authorMarkus Mayer <mmayer@broadcom.com>2016-12-19 12:10:28 -0800
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2017-01-27 11:43:49 +0100
commit3c223c19aea85d3dda1416c187915f4a30b04b1f (patch)
tree2d2021f8161db3e9ed38b9a966a225b66dff8e58 /drivers/usb/misc/ehset.c
parent9b02c54bc951fca884ba5719f42a27e8240965bf (diff)
cpufreq: brcmstb-avs-cpufreq: properly retrieve P-state upon suspend
The AVS GET_PMAP command does return a P-state along with the P-map information. However, that P-state is the initial P-state when the P-map was first downloaded to AVS. It is *not* the current P-state. Therefore, we explicitly retrieve the P-state using the GET_PSTATE command. Signed-off-by: Markus Mayer <mmayer@broadcom.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/usb/misc/ehset.c')