Skip to content

Adding Camera RDI validation using YAVTA Test Scripts #88

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

brampran
Copy link

  • Introduced automated test scripts for validating camera RDI dumps using YAVTA and media-ctl
  • Compatible with Qualcomm Yocto-based Linux systems
  • Includes run.sh for test execution and README_Camera.md for usage instructions :x

- Introduced automated test scripts for validating camera RDI dumps using YAVTA and media-ctl
- Compatible with Qualcomm Yocto-based Linux systems
- Includes run.sh for test execution and README_Camera.md for usage instructions
:x
@abbajaj806
Copy link
Contributor

abbajaj806 commented Jun 18, 2025

Please resubmit the changes with proper signature (git commit -s -m "Commit Message")

log_info "=== Test Initialization ==="

log_info "Checking if dependency binary is available"
check_dependencies yavta
Copy link
Contributor

Choose a reason for hiding this comment

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

check_dependencies will support multiple arguments as below
check_dependencies yavta media-ctl

test_path=$(find_test_case_by_name "$TESTNAME")
cd "$test_path" || exit 1
# shellcheck disable=SC2034
res_file="./$TESTNAME.res"
Copy link
Contributor

Choose a reason for hiding this comment

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

res_file is not used anywhere. Will line#69, 72 be modified to use this?

cd "$test_path" || exit 1
# shellcheck disable=SC2034
res_file="./$TESTNAME.res"

Copy link
Contributor

Choose a reason for hiding this comment

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

res_file is not used anywhere in the script

rm -rf "${test_path}/Camera_RDI_Test.txt"
rm -rf "${test_path}/v4l2_camera_RDI_dump.res"
rm -rf "${test_path}/*.bin"

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this working.
IMO it should be - rm -rf "$test_path"/*.bin

- `yavta and media-ctl` (available in /usr/bin/)
- To find the exact /dev/media node for our camss driver
# media-ctl -p -d /dev/media 'y' | grep camss ['y' has to be replaced with media0 or media1 eg: /dev/media0, /dev/media1]
Output will be # driver qcom-camss [for probed media]
Copy link
Contributor

Choose a reason for hiding this comment

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

This is not coming properly in Markdown language. Can you check this once

echo "$TESTNAME FAIL" > "$test_path/$TESTNAME.res"
fi

log_info "-------------------Completed $TESTNAME Testcase----------------------------"
Copy link
Contributor

Choose a reason for hiding this comment

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

make sure run.sh have executable permission (chmod 755 )

- Introduced automated test scripts for validating camera RDI dumps using YAVTA and media-ctl
- Compatible with Qualcomm Yocto-based Linux systems
- Includes run.sh for test execution and README_Camera.md for usage instructions

Signed-off-by: Bhargav Ram Pranav Mutyalapalli <brampran@qti.qualcomm.com>
cd <this-repo>
scp -r Runner user@target_device_ip:<Path in device>
ssh user@target_device_ip
cd <Path in device> --> /var/Runner/suites/Multimedia/Camera/v4l2_camera_RDI_dump/ && chmod +x run.sh && ./run.sh
Copy link
Contributor

Choose a reason for hiding this comment

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

Not to use /var in the documentation. In place of /var use like #69 line. <path in device

```
Sample output:
```
sh-5.2# cd /var/Runner/suites/Multimedia/Camera/v4l2_camera_RDI_dump/
Copy link
Contributor

Choose a reason for hiding this comment

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

Here also.. you can refactor this line

@@ -0,0 +1,95 @@
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
# SPDX-License-Identifier: BSD-3-Clause-Clear
Copy link
Contributor

@smuppand smuppand Jun 23, 2025

Choose a reason for hiding this comment

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

Please remove comments for the Copyright. Also move this file under v4l2_camera_RDI_dump folder.


log_info "-------------------Camera commands execution start----------------------------"
# Run the test
mount -o rw,remount /
Copy link
Contributor

Choose a reason for hiding this comment

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

by default it will be rw. any reason why remount is required?

log_info "-------------------Camera commands execution start----------------------------"
# Run the test
mount -o rw,remount /
mount -o rw,remount /usr/
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't see any operations are being performed under /usr. Why do we require /usr remount?

rm -rf "${test_path}"/*.bin

yavta --no-query -w '0x009f0903 9' /dev/v4l-subdev0
yavta -B capture-mplane -n 5 -f SRGGB10P -s 1920x1080 /dev/video1 --capture=10 --file='frame-#.bin' >> "${test_path}/Camera_RDI_Test.txt"
Copy link
Contributor

Choose a reason for hiding this comment

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

/dev/video1 will be consistent across the devices as DT might be changing per device?

media-ctl -d /dev/media0 -V '"msm_csid0":0[fmt:SRGGB10/1920x1080 field:none]'
media-ctl -d /dev/media0 -V '"msm_vfe0_rdi0":0[fmt:SRGGB10/1920x1080 field:none]'
media-ctl -d /dev/media0 -l '"msm_tpg0":1->"msm_csid0":0[1]'
media-ctl -d /dev/media0 -l '"msm_csid0":1->"msm_vfe0_rdi0":0[1]'
Copy link
Contributor

Choose a reason for hiding this comment

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

Here it is /dev/media0 is common across the devices? if not, its better to make a robust to get the right dev node.

Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

Require few changes to make it more modularized, robut which will work across the targets. Along with these, please address the issues reported by checkers.

Copy link
Contributor

@smuppand smuppand left a comment

Choose a reason for hiding this comment

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

Please combine the commits into a single one to keep the history clean. It would also be helpful to create modular helper functions for media-ctl and yavta to dynamically fetch the device nodes, and use these in the run.sh script. Additionally, the media-ctl frame capture logic can be moved to a topology config, which will make it easier to add more configurations in the future.

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