Skip to content

Conversation

pinchartl
Copy link
Contributor

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.

jmondi and others added 10 commits July 15, 2020 03:16
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 <[email protected]>
Acked-by: Tomasz Figa <[email protected]>
Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit cabc918 upstream

Signed-off-by: Laurent Pinchart <[email protected]>
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 <[email protected]>
Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit 915bd31 upstream

Signed-off-by: Laurent Pinchart <[email protected]>
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 <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit 9397a83 upstream

Signed-off-by: Laurent Pinchart <[email protected]>
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 <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit 9926c22 upstream

Signed-off-by: Laurent Pinchart <[email protected]>
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 <[email protected]>
Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit 926645d upstream

Signed-off-by: Laurent Pinchart <[email protected]>
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 <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit 344897e upstream

Signed-off-by: Laurent Pinchart <[email protected]>
Add an helper function to v4l2-ctrls to register controls associated
with a device property.

Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit e0a3606 upstream

Signed-off-by: Laurent Pinchart <[email protected]>
Parse device properties and register controls for them using the V4L2
fwnode properties helpers.

Signed-off-by: Laurent Pinchart <[email protected]>
Parse device properties and register controls for them using the newly
introduced helpers.

Signed-off-by: Jacopo Mondi <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>

Commit ad3a44c upstream

Signed-off-by: Laurent Pinchart <[email protected]>
Parse device properties and register controls for them using the V4L2
fwnode properties helpers.

Signed-off-by: Laurent Pinchart <[email protected]>
Copy link
Contributor

@pelwell pelwell left a 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.

@6by9
Copy link
Contributor

6by9 commented Jul 15, 2020

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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
@pinchartl pinchartl force-pushed the camera-orientation branch from 6d3b091 to f0f5a31 Compare July 15, 2020 22:46
@pinchartl
Copy link
Contributor Author

Comments addressed, branch updated. Please merge whenever convenient, I'll then push the corresponding libcamera changes.

@pelwell pelwell merged commit 2c8ec3b into raspberrypi:rpi-5.4.y Jul 16, 2020
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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants