-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
raspberrypi: Report sensor orientation through DT #3723
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add the 'orientation' device property, used to specify the device mounting position. The property is particularly meaningful for mobile devices with a well defined usage orientation. Reviewed-by: Rob Herring <robh@kernel.org> Acked-by: Tomasz Figa <tfiga@chromium.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit cabc918 upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Replace the 'rotation' property description by providing a definition relative to the camera sensor pixel array coordinate system and the captured scene. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit 915bd31 upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add documentation for the V4L2_CID_CAMERA_ORIENTATION camera control. The newly added read-only control reports the camera device orientation relative to the usage orientation of the system the camera is installed on. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit 9397a83 upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add documentation for the V4L2_CID_CAMERA_SENSOR_ROTATION camera control. The newly added read-only control reports the rotation correction to be applied to images before displaying them to the user. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit 9926c22 upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add support for the newly defined V4L2_CID_CAMERA_ORIENTATION and V4L2_CID_CAMERA_SENSOR_ROTATION read-only controls used to report the camera device mounting position and orientation respectively. Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit 926645d upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add an helper function to parse common device properties in the same way as v4l2_fwnode_endpoint_parse() parses common endpoint properties. Parse the 'rotation' and 'orientation' properties from the firmware interface. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit 344897e upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add an helper function to v4l2-ctrls to register controls associated with a device property. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit e0a3606 upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Parse device properties and register controls for them using the V4L2 fwnode properties helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi <jacopo@jmondi.org> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org> Commit ad3a44c upstream Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Parse device properties and register controls for them using the V4L2 fwnode properties helpers. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
pelwell
reviewed
Jul 15, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a few very minor niggles with the overlays.
I'm good with the patchset, so it's only Phil's comments to address. |
Add a rotation DT overlay parameter to allow specifying the camera module mounting rotation. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add a rotation DT overlay parameter to allow specifying the camera module mounting rotation. Set the default rotation to 180 as the module is typically mounted upside-down. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Add a rotation DT overlay parameter to allow specifying the camera module mounting rotation. Set the default rotation to 180 as the module is typically mounted upside-down. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
pinchartl
force-pushed
the
camera-orientation
branch
from
July 15, 2020 22:46
6d3b091
to
f0f5a31
Compare
Comments addressed, branch updated. Please merge whenever convenient, I'll then push the corresponding libcamera changes. |
popcornmix
added a commit
to raspberrypi/firmware
that referenced
this pull request
Jul 17, 2020
See: raspberrypi/linux#3730 kernel: drm/vc4: Add DRM_MODE_FLAG_DBLCLK support to vc4-fkms See: raspberrypi/linux#3725 kernel: raspberrypi: Report sensor orientation through DT See: raspberrypi/linux#3723 kernel: correct SND_SOC_DAILINK_DEFS See: raspberrypi/linux#3722 kernel: ARM: dts: Select the actpwr LED trigger on Zeroes kernel: staging: vc04_services: isp: Rework lens shading to take a dmabuf See: raspberrypi/linux#3715 kernel: unicam clock changes See: raspberrypi/linux#3609 firmware: IL: camera: Fix stereoscopic pool allocations firmware: arm_loader: Add support for double clock/pixel_rep for FKMS See: raspberrypi/linux#3725 firmware: scalerlib: Set the default chroma location for YUV10 to match 8bit firmware: scalerlib: Set chroma_vrep correctly for YUV10COL firmware: isp: check the hi-res resize filter mode when the input crop changes
popcornmix
added a commit
to Hexxeh/rpi-firmware
that referenced
this pull request
Jul 17, 2020
See: raspberrypi/linux#3730 kernel: drm/vc4: Add DRM_MODE_FLAG_DBLCLK support to vc4-fkms See: raspberrypi/linux#3725 kernel: raspberrypi: Report sensor orientation through DT See: raspberrypi/linux#3723 kernel: correct SND_SOC_DAILINK_DEFS See: raspberrypi/linux#3722 kernel: ARM: dts: Select the actpwr LED trigger on Zeroes kernel: staging: vc04_services: isp: Rework lens shading to take a dmabuf See: raspberrypi/linux#3715 kernel: unicam clock changes See: raspberrypi/linux#3609 firmware: IL: camera: Fix stereoscopic pool allocations firmware: arm_loader: Add support for double clock/pixel_rep for FKMS See: raspberrypi/linux#3725 firmware: scalerlib: Set the default chroma location for YUV10 to match 8bit firmware: scalerlib: Set chroma_vrep correctly for YUV10COL firmware: isp: check the hi-res resize filter mode when the input crop changes
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This patch series reports sensor orientation through DT for the OV5647, IMX219 and IMX477. The first 8 patches are backported from mainline, while the last 5 patches are new.
All the patches, as well as the corresponding libcamera changes, have been posted to the libcamera-devel mailing list. The kernel and libcamera sides should be merged in lockstep, so please let me know when you plan to merge this and I'll push the corresponding changes to libcamera.