[libcamera-devel,2/2] utils: rkisp1: sync topology with upstream driver in capture script

Message ID 20200117145619.3321911-2-helen.koike@collabora.com
State Superseded
Headers show
Series
  • [libcamera-devel,1/2] libcamera: pipeline: rkisp1: sync topology with upstream driver
Related show

Commit Message

Helen Koike Jan. 17, 2020, 2:56 p.m. UTC
rkisp1 kernel driver was merged upstream with minor changes in the
topology from the original driver libcamera based it's first support to
rkisp1.

Adapt libcamera capture script to work with upstream driver.

* Remove subdevice dphy from the pipeline.
* Add resizer in the pipeline.
* Fix links.
* Update entity names.

Signed-off-by: Helen Koike <helen.koike@collabora.com>

---

changes in v2:
* New commit (splitted from previous one)
---
 utils/rkisp1/rkisp1-capture.sh | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

Comments

Helen Koike Jan. 17, 2020, 3 p.m. UTC | #1
On 1/17/20 12:56 PM, Helen Koike wrote:
> rkisp1 kernel driver was merged upstream with minor changes in the
> topology from the original driver libcamera based it's first support to
> rkisp1.
> 
> Adapt libcamera capture script to work with upstream driver.
> 
> * Remove subdevice dphy from the pipeline.
> * Add resizer in the pipeline.
> * Fix links.
> * Update entity names.
> 
> Signed-off-by: Helen Koike <helen.koike@collabora.com>

Please, ignore this patch, I sent by mistake. Please check v2.

Helen

> 
> ---
> 
> changes in v2:
> * New commit (splitted from previous one)
> ---
>  utils/rkisp1/rkisp1-capture.sh | 16 ++++++++--------
>  1 file changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
> index cffe9fe..4d09f5d 100755
> --- a/utils/rkisp1/rkisp1-capture.sh
> +++ b/utils/rkisp1/rkisp1-capture.sh
> @@ -68,14 +68,14 @@ configure_pipeline() {
>  
>  	$mediactl -r
>  
> -	$mediactl -l "'$sensor':0 -> 'rockchip-sy-mipi-dphy':0 [1]"
> -	$mediactl -l "'rockchip-sy-mipi-dphy':1 -> 'rkisp1-isp-subdev':0 [1]"
> -	$mediactl -l "'rkisp1-isp-subdev':2 -> 'rkisp1_mainpath':0 [1]"
> +	$mediactl -l "'$sensor':0 -> 'rkisp1_isp':0 [1]"
> +	$mediactl -l "'rkisp1_isp':2 -> 'rkisp1_resizer_mainpath':0 [1]"
>  
>  	$mediactl -V "\"$sensor\":0 [$format]"
> -	$mediactl -V "'rockchip-sy-mipi-dphy':1 [$format]"
> -	$mediactl -V "'rkisp1-isp-subdev':0 [$format crop:(0,0)/$sensor_size]"
> -	$mediactl -V "'rkisp1-isp-subdev':2 [fmt:$capture_mbus_code/$capture_size crop:(0,0)/$capture_size]"
> +	$mediactl -V "'rkisp1_isp':0 [$format crop:(0,0)/$sensor_size]"
> +	$mediactl -V "'rkisp1_isp':2 [fmt:$capture_mbus_code/$sensor_size crop:(0,0)/$sensor_size]"
> +	$mediactl -V "'rkisp1_resizer_mainpath':0 [fmt:$capture_mbus_code/$sensor_size crop:(0,0)/$sensor_size]"
> +	$mediactl -V "'rkisp1_resizer_mainpath':1 [fmt:$capture_mbus_code/$capture_size]"
>  }
>  
>  # Capture frames
> @@ -161,8 +161,8 @@ fi
>  
>  sensor_name=$1
>  
> -modprobe mipi_dphy_sy
> -modprobe video_rkisp1
> +modprobe phy_rockchip_dphy_rx0
> +modprobe rockchip_isp1
>  
>  sensor=$(find_sensor $sensor_name) || exit
>  mdev=$(find_media_device rkisp1) || exit
>

Patch

diff --git a/utils/rkisp1/rkisp1-capture.sh b/utils/rkisp1/rkisp1-capture.sh
index cffe9fe..4d09f5d 100755
--- a/utils/rkisp1/rkisp1-capture.sh
+++ b/utils/rkisp1/rkisp1-capture.sh
@@ -68,14 +68,14 @@  configure_pipeline() {
 
 	$mediactl -r
 
-	$mediactl -l "'$sensor':0 -> 'rockchip-sy-mipi-dphy':0 [1]"
-	$mediactl -l "'rockchip-sy-mipi-dphy':1 -> 'rkisp1-isp-subdev':0 [1]"
-	$mediactl -l "'rkisp1-isp-subdev':2 -> 'rkisp1_mainpath':0 [1]"
+	$mediactl -l "'$sensor':0 -> 'rkisp1_isp':0 [1]"
+	$mediactl -l "'rkisp1_isp':2 -> 'rkisp1_resizer_mainpath':0 [1]"
 
 	$mediactl -V "\"$sensor\":0 [$format]"
-	$mediactl -V "'rockchip-sy-mipi-dphy':1 [$format]"
-	$mediactl -V "'rkisp1-isp-subdev':0 [$format crop:(0,0)/$sensor_size]"
-	$mediactl -V "'rkisp1-isp-subdev':2 [fmt:$capture_mbus_code/$capture_size crop:(0,0)/$capture_size]"
+	$mediactl -V "'rkisp1_isp':0 [$format crop:(0,0)/$sensor_size]"
+	$mediactl -V "'rkisp1_isp':2 [fmt:$capture_mbus_code/$sensor_size crop:(0,0)/$sensor_size]"
+	$mediactl -V "'rkisp1_resizer_mainpath':0 [fmt:$capture_mbus_code/$sensor_size crop:(0,0)/$sensor_size]"
+	$mediactl -V "'rkisp1_resizer_mainpath':1 [fmt:$capture_mbus_code/$capture_size]"
 }
 
 # Capture frames
@@ -161,8 +161,8 @@  fi
 
 sensor_name=$1
 
-modprobe mipi_dphy_sy
-modprobe video_rkisp1
+modprobe phy_rockchip_dphy_rx0
+modprobe rockchip_isp1
 
 sensor=$(find_sensor $sensor_name) || exit
 mdev=$(find_media_device rkisp1) || exit