Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Kernel patches will need UVC_INFO_QUIRK #5147

Closed
dankamongmen opened this issue Oct 28, 2019 · 6 comments
Closed

Kernel patches will need UVC_INFO_QUIRK #5147

dankamongmen opened this issue Oct 28, 2019 · 6 comments

Comments

@dankamongmen
Copy link

dankamongmen commented Oct 28, 2019


Required Info
Camera Model D435
Firmware Version 5.11.15.0
Operating System & Version Debian Unstable
Kernel Version (Linux Only) 5.3.7
Platform ATX x86
SDK Version 2.29.0
Language C
Segment All

Issue Description

I've been keeping a copy of the Realsense kernel patches up-to-date against mainline. Recently, I started getting an OOPs on device attach. I traced this down to the USB device definitions, where UVC_QUIRK_APPEND_UVC_HEADER is being directly stashed into .driver_info. The 5.x series uvc model requires that this field be a pointer to a uvc device definition. The UVC_INFO_QUIRK macro is provided to facilitate this. By changing all .driver_info = UVC_QUIRK_APPEND_UVC_HEADER to .driver_info = UVC_INFO_QUIRK(UVC_QUIRK_APPEND_UVC_HEADER), the problem is resolved.

My current diff can be found at
https://www.dsscaw.com/resources/realsense-5.3.7.diff.

If you'd like to take this into the project, I can set up a proper PR.

@seebq
Copy link
Contributor

seebq commented Oct 28, 2019

As beneficiary of this, I won't pile on or +1, as we need others to validate, but can confirm we're using this.

@ev-mp
Copy link
Collaborator

ev-mp commented Oct 29, 2019

@dankamongmen , a similar adjustment has already been incorporated into LTS kernel v5.0 patches supported by SDK -
https://github.com/IntelRealSense/librealsense/blob/master/scripts/realsense-metadata-bionic-hwe.patch

.driver_info = UVC_INFO_META(V4L2_META_FMT_D4XX) },

Invoke the patches script ./scripts/patch-realsense-ubuntu-lts.sh with kernel 5.0 to pickup this implementation.

The implementation that you provide seem to be more generic, so can you confirm that you read all the metadata attributes and not only the header correctly ?

@dankamongmen
Copy link
Author

I may well be missing some -- I definitely get some dmesg output about uninitialized entity types (Processing 2 and 7, Camera 1 and 6, and Extension 8). I furthermore see some "failed to query UVC control 1 on unit 3", so it's quite possible. realsense-viewer seems to be functioning. How can I verify correct metadata attribute processing? Thank you for your time.

@ev-mp
Copy link
Collaborator

ev-mp commented Nov 10, 2019

@dankamongmen , you can check the metadata attributes in realsense-viewer:
Metadata_Show1

The warning failed to query UVC control 1 on unit 3 can be disregarded as SDK handles it internally.

@dankamongmen
Copy link
Author

Thanks, I should be able to look into this tomorrow (Monday 2019-11-11).

@RealSenseCustomerSupport
Copy link
Collaborator


Hi @dankamongmen,

Any update? Is the issue clarified and resolved?

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

No branches or pull requests

4 participants