Skip to content

Fix D457 RGB sensor exposure control range issue - #12251

Merged
Nir-Az merged 6 commits into
realsenseai:developmentfrom
hsuys:fix_d457_rgb_exp_range
Jun 16, 2024
Merged

Nir-Az merged 6 commits into
realsenseai:developmentfrom
hsuys:fix_d457_rgb_exp_range

Conversation

@hsuys

@hsuys hsuys commented Oct 3, 2023

Copy link
Copy Markdown
Contributor

fix d457 rgb sensor exposure ctrl range issue

changes:
change to VIDIOC_QUERY_EXT_CTRL instead of VIDIOC_QUERYCTRL when calling ioctls

Tracked on: RSDSO-19295

struct v4l2_query_ext_ctrl query = {};
query.id = get_cid(option);
if (xioctl(_fd, VIDIOC_QUERYCTRL, &query) < 0)
if (xioctl(_fd, VIDIOC_QUERY_EXT_CTRL, &query) < 0)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Will this affect other controls as well?

Does this means this comment will be no longer relevant?

// Some controls (exposure, auto exposure, auto hue) do not seem to work on V4L2
                // Instead of throwing an error, return an empty range. This will cause this control to be omitted on our UI sample.
                // TODO: Figure out what can be done about these options and make this work

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@hsuys ?

@dmipx can you review this change as well?
It should work with Ubuntu and JetPack w/o any regressions

@SamerKhshiboun

Copy link
Copy Markdown
Contributor

@dmipx can you please review this ?
ROS users already complained about undefined range for rgb exposure.

@Nir-Az

Nir-Az commented Jun 4, 2024

Copy link
Copy Markdown
Collaborator

Closed and reopened to trigger CI

@Nir-Az

Nir-Az commented Jun 4, 2024

Copy link
Copy Markdown
Collaborator

@hsuys Verified on JP4, Any explanation to why it works? :)
According to the control description it support a control array, I wasn't expecting a logic change.

@hsuys

hsuys commented Jun 4, 2024

Copy link
Copy Markdown
Contributor Author

I can confirm that this change still works for LRS 2.55.1 on JP5.0.2 and v1.0.1.21 driver with D457 mipi camera. Sorry, I couldn't really explain why this would work except that the same control was used for get_xu_range()

@Nir-Az

Nir-Az commented Jun 5, 2024

Copy link
Copy Markdown
Collaborator

@hsuys since we cannot explain why it works I recommend minimize the change and to only change the mipi get_pu_range function to use it, instead if the main uvc function.
This way we have minimal impact.
Thoughts?

@hsuys

hsuys commented Jun 6, 2024

Copy link
Copy Markdown
Contributor Author

@Nir-Az, I agree. This fix should be for mipi sku to minimize the impact.

@Nir-Az
Nir-Az merged commit 1c7bf4c into realsenseai:development Jun 16, 2024
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