Skip to content

Conversation

@xlz
Copy link
Member

@xlz xlz commented Dec 3, 2015

  • An OpenCL usability fix.
  • USB warmup protocol and pause

Tested on Debian and Ubuntu 14.04. Will test with Jetson and Windows later.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the pausing be moved out of the signal handler and into the main loop in Protonect.cpp?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After pausing, the main loop will waitForNewFrame() forever and never start() again. So no.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah right, makes sense. Do we care enough in this file to pull it out in a separate thread then?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have time to implement it at the moment just for an example.

I think a good solution is to use waitForNewFrame(frame, milliseconds), which needs wait_for(), a C++11 feature. This would need backporting wait_for() to tinythread. I have no idea how hard that is.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I looked at it more closely. wait_for is actually quite non-trivial to get right.

One other alternative is to catch the signal in the main loop and pause right there until one more signal, and then continue the main loop. But this still needs a bunch of #ifdef to use platform dependent timing functions or signal functions.

I think this example gets the point across, for the time being.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know if there is a boost dependency or you're avoiding one, but boost does provide this functionality.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boost dependency is being avoided. See #14

@floe floe added this to the 0.1 milestone Dec 4, 2015
xlz added 4 commits December 4, 2015 20:22
Beignet performs self-test and fails for Haswell and kernel 4.0-.
These environment variables override the self-test.

Set the variables by default:

export OCL_IGNORE_SELF_TEST=1
export OCL_STRICT_CONFORMANCE=0
Blob #3 is the main one in the firmware's 7 blobs, and should
represent version of other blobs, except the bootloader blobs
which is never updated and not to be bothered with about their
versions.

The official SDK uses only blob #3 to report the version. Use it
for the version number here.
To avoid a lot of

    WARN Event TRB for slot 1 ep 2 with no TDs queued?

in dmesg.
@RyanGordon
Copy link
Contributor

Just tested on my Mac again and it's working very well

@floe
Copy link
Contributor

floe commented Dec 9, 2015

Great - once I get a Windows test report, I'll merge it right away.

@xlz
Copy link
Member Author

xlz commented Dec 11, 2015

I'll post test results next week. I brought test machines today but forgot to bring HDMI cables to connect them to monitors.

@xlz xlz mentioned this pull request Dec 16, 2015
@xlz
Copy link
Member Author

xlz commented Dec 16, 2015

Caught and fixed one bug: SIGUSR1 is undefined on Windows and causes FTBFS.

Now tested on Jetson Ubuntu 14.04 and Windows 7/8 MSVC 2013/5.

@floe
Copy link
Contributor

floe commented Dec 17, 2015

Excellent, thanks.

floe added a commit that referenced this pull request Dec 17, 2015
@floe floe merged commit 81a59a1 into OpenKinect:master Dec 17, 2015
@xlz xlz deleted the mostly-usb-fixes branch December 25, 2015 03:46
@xlz xlz mentioned this pull request Feb 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants