Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Commit

Permalink
Debug DRM frequency detection issue.
Browse files Browse the repository at this point in the history
  • Loading branch information
xlz-jbleclere committed Jul 8, 2019
1 parent 2867249 commit 6c3911b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deployment/buildspec.yml
Expand Up @@ -87,7 +87,7 @@ phases:
-n drm_debug_tests
-z /dev/shm/drmlib_dev/.tox/debug/build/report artifacts/report.tar.gz
-r "source /dev/shm/aws-fpga/sdk_setup.sh && cd /dev/shm/drmlib_dev &&
sudo -E TOX_PARALLEL_NO_SPINNER=1 tox -p all -e aws-build-debug,cpp-debug,c-debug,integration-debug,coverage-debug -- --cred=/dev/shm/cred.json --server=${WS_ENV} -s"
sudo -E TOX_PARALLEL_NO_SPINNER=1 tox -p all -e aws-build-debug,cpp-debug,c-debug,integration-debug,coverage-debug -- --cred=/dev/shm/cred.json --server=${WS_ENV} -x -s"

# Build packages
- xlz
Expand Down
10 changes: 9 additions & 1 deletion source/drm_manager.cpp
Expand Up @@ -1125,13 +1125,21 @@ class DRM_LOCAL DrmManager::Impl {
Debug( "Detecting DRM frequency for {} ms", mFrequencyDetectionPeriod );

counterStart = getTimerCounterValue();
timeStart = TClock::now();
// Wait until counter starts decrementing
while (1) {
if ( getTimerCounterValue() != counterStart ) {
counterStart = getTimerCounterValue();
timeStart = TClock::now();
break;
}
}

/// Wait a fixed period of time
sleepOrExit( wait_duration );

counterEnd = getTimerCounterValue();
timeEnd = TClock::now();

if ( counterEnd == 0 )
Unreachable( "Frequency auto-detection failed: license timeout counter is 0" ); //LCOV_EXCL_LINE
if ( counterEnd > counterStart ) {
Expand Down

0 comments on commit 6c3911b

Please sign in to comment.