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

drivers: media: cfe: Set the CSI-2 link frequency correctly #5691

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

naushir
Copy link
Contributor

@naushir naushir commented Nov 1, 2023

Use the sensor provided link frequency to set the DPHY timing parameters on stream_on. This replaces the hard-coded 999 MHz value currently being used. As a fallback, revert to the original 999 Mhz link frequency.

As a drive-by, fix a 80-character line formatting error.

@njhollinghurst
Copy link
Contributor

LGTM

@6by9
Copy link
Contributor

6by9 commented Nov 1, 2023

This is only checking the adjacent node for a link frequency control. If the adjacent node is a mux or bridge, then it may not have a link frequency.

I'm just comparing to qcom camss which follows the full chain until it finds a MEDIA_ENT_F_CAM_SENSOR, but actually even that isn't perfect as a parallel to CSI2 bridge, or FPD-LinkIII bridge would mangle the link frequency required.
CIO2, IMX8, and IMX7 all appear to do the simple thing of just looking at the adjacent node.

I think the ideal is to follow the chain until you find a node which has a LINK_FREQUENCY control and use that. Both adjacent and end have issues.

@naushir
Copy link
Contributor Author

naushir commented Nov 1, 2023

I think the ideal is to follow the chain until you find a node which has a LINK_FREQUENCY control and use that. Both adjacent and end have issues.

Hmmm, more annoyances. Hopefully the new rev does this right...?

Use the sensor provided link frequency to set the DPHY timing parameters
on stream_on. This replaces the hard-coded 999 MHz value currently being
used. As a fallback, revert to the original 999 Mhz link frequency.

As a drive-by, fix a 80-character line formatting error.

Signed-off-by: Naushir Patuck <[email protected]>
@naushir
Copy link
Contributor Author

naushir commented Nov 1, 2023

I think this now looks to be the correct behavior for those pesky bridge/link entities!

@naushir
Copy link
Contributor Author

naushir commented Nov 2, 2023

If no objections, I'll merge this in later today.

@naushir naushir merged commit a113127 into raspberrypi:rpi-6.1.y Nov 2, 2023
12 checks passed
@naushir naushir deleted the cfe_link_freq branch November 2, 2023 11:24
popcornmix added a commit to raspberrypi/firmware that referenced this pull request Nov 2, 2023
kernel: fixup! arch/arm64: Add Revision, Serial, Model to cpuinfo
See: raspberrypi/linux#5690

kernel: Remove the Zero 2 W DT-based WLAN firmware selection
See: raspberrypi/linux#5499

kernel: drivers: media: cfe: Set the CSI-2 link frequency correctly
See: raspberrypi/linux#5691

kernel: dts: bcm2712-rpi-5-b: Create some dummy nodes
See: raspberrypi/linux#5693
popcornmix added a commit to raspberrypi/rpi-firmware that referenced this pull request Nov 2, 2023
kernel: fixup! arch/arm64: Add Revision, Serial, Model to cpuinfo
See: raspberrypi/linux#5690

kernel: Remove the Zero 2 W DT-based WLAN firmware selection
See: raspberrypi/linux#5499

kernel: drivers: media: cfe: Set the CSI-2 link frequency correctly
See: raspberrypi/linux#5691

kernel: dts: bcm2712-rpi-5-b: Create some dummy nodes
See: raspberrypi/linux#5693
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.

3 participants