Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1170267ybh; Thu, 12 Mar 2020 18:47:15 -0700 (PDT) X-Google-Smtp-Source: ADFU+vtMmVErlptDO3U0y3cIyUjPxh88ON9Og43mbeit0Yqrr8sNdSqRCG24eu3dcwjJ9lkRcykg X-Received: by 2002:a9d:10d:: with SMTP id 13mr9392227otu.334.1584064035522; Thu, 12 Mar 2020 18:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584064035; cv=none; d=google.com; s=arc-20160816; b=LBMqg8w0mfij0DLRyldacbI2FboA1uyFvNd7/iHRwgBHoFeB5i7MfZAUA6/EfEjm3D 4L7daUxvuZPRkC7xQ7rNe9OjXf9VTMX9jOFTJw0DBvx7zY/2+qJuSdBLIo8GFual89eY nKVSYBgwTtAy7C4WtRFhZdt7MVgfB5M86EMzufObrQw+ysNL4C/5gQTP/GcgEiMG+lTe 7cij6sU9fKZV0AjEcyWXVC4QTuXXbyebXLRjLRw/0dlhYNw5eOOKVCcxpgNvHJP65T2b vu78a838bTWXudEa+NP14ptzLChzeRWQC5eIZO62xbBpriYouf2f7OYEJ1ADeyCRP7OG 7GEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LCPdabpzpiQIicb6PSiAHu+gcs9D9FTNvAhIMpvxxGo=; b=wU4FI1d7Mo2KHZos++01TXn4w40uMvOAy7GHeNIXxPrBfxPWR7RoLRu4EQZlo6zYGX +bOkUXhpEHEY1C+grIJY2QBwb9BQdWYl49SB9Zc0cG92dE0r+OYBJb//EuZJRnjrdNae HWwsepcNpVVMpEy4evX0SEnHPFSuRjtLTR+ptrjaV9+6ifQN7h0yyGtrB2zPFfeXDXvS lnYrQNxzFZ+DCSJd1DRbWSpFQS4wCQVC0tqtS3LL9PajuAZXere2nVxVe6OddB2ItbEG vsZw1ESurjXH+hz07M0x9P/T1cReBCAk+VL4T8404LAEzS9jInUDxdlCS5yhtz3kHRyp CrlQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t25si3854380ott.228.2020.03.12.18.47.03; Thu, 12 Mar 2020 18:47:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726377AbgCMBqn (ORCPT + 99 others); Thu, 12 Mar 2020 21:46:43 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:48512 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726114AbgCMBqm (ORCPT ); Thu, 12 Mar 2020 21:46:42 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id A489728DA67 From: Helen Koike To: linux-media@vger.kernel.org Cc: mchehab@kernel.org, linux-kernel@vger.kernel.org, tfiga@chromium.org, linux-rockchip@lists.infradead.org, hans.verkuil@cisco.com, kernel@collabora.com, Helen Koike Subject: [PATCH 0/3] media: staging: rkisp1: allow simultaneous streaming from multiple capture devices Date: Thu, 12 Mar 2020 22:46:23 -0300 Message-Id: <20200313014626.3103091-1-helen.koike@collabora.com> X-Mailer: git-send-email 2.25.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This series adds support for simultaneous streaming from both capture devices (rkisp1_selfpath and rkisp1_mainpath). Patch 1/3 fixes return error handling from pm functions, which was preventing the second stream to start. Patch 2/3 don't allow .s_stream entity callback to be called if a stream is already enabled. Which fixes the issue when stopping one stream would also stop the other. Patch 3/3 serializes start/stop streaming calls, since they both read and modify the streaming status of all the entities in the piipeline. This series was tested with: SEN_DEV=/dev/v4l-subdev3 ISP_DEV=/dev/v4l-subdev0 RSZ_SP_DEV=/dev/v4l-subdev2 RSZ_MP_DEV=/dev/v4l-subdev1 CAP_SP_DEV=/dev/video1 CAP_MP_DEV=/dev/video0 WIDTH=1920 HEIGHT=1080 RAW_CODE=SRGGB10_1X10 YUV_CODE=YUYV8_2X8 v4l2-ctl --set-subdev-fmt pad=0,width=$WIDTH,height=$HEIGHT,code=$RAW_CODE -d $SEN_DEV v4l2-ctl --set-subdev-fmt pad=0,width=$WIDTH,height=$HEIGHT,code=$RAW_CODE -d $ISP_DEV v4l2-ctl --set-subdev-selection pad=0,target=crop,top=0,left=0,width=$WIDTH,height=$HEIGHT -d $ISP_DEV v4l2-ctl --set-subdev-selection pad=2,target=crop,top=0,left=0,width=$WIDTH,height=$HEIGHT -d $ISP_DEV v4l2-ctl --set-subdev-fmt pad=2,width=$WIDTH,height=$HEIGHT,code=$YUV_CODE -d $ISP_DEV v4l2-ctl --set-subdev-fmt pad=0,width=$WIDTH,height=$HEIGHT,code=$YUV_CODE -d $RSZ_SP_DEV v4l2-ctl --set-subdev-fmt pad=1,width=$WIDTH,height=$HEIGHT,code=$YUV_CODE -d $RSZ_SP_DEV v4l2-ctl --set-subdev-selection pad=0,target=crop,top=0,left=0,width=$WIDTH,height=$HEIGHT -d $RSZ_SP_DEV v4l2-ctl --set-subdev-fmt pad=0,width=$WIDTH,height=$HEIGHT,code=$YUV_CODE -d $RSZ_MP_DEV v4l2-ctl --set-subdev-fmt pad=1,width=$WIDTH,height=$HEIGHT,code=$YUV_CODE -d $RSZ_MP_DEV v4l2-ctl --set-subdev-selection pad=0,target=crop,top=0,left=0,width=$WIDTH,height=$HEIGHT -d $RSZ_MP_DEV v4l2-ctl -v width=$WIDTH,height=$HEIGHT,pixelformat=NV12 -d $CAP_SP_DEV v4l2-ctl -v width=$WIDTH,height=$HEIGHT,pixelformat=NV12 -d $CAP_MP_DEV sleep 1 v4l2-ctl --stream-mmap --stream-count=100 -d $CAP_SP_DEV --stream-to=/tmp/test_sp.raw & v4l2-ctl --stream-mmap --stream-count=100 -d $CAP_MP_DEV --stream-to=/tmp/test_mp.raw & wait echo "Completed" Helen Koike (3): media: staging: rkisp1: cap: fix return values from pm functions media: staging: rkisp1: do not call s_stream if the entity is still in use media: staging: rkisp1: cap: serialize start/stop stream drivers/staging/media/rkisp1/rkisp1-capture.c | 25 ++++++++++++++++--- drivers/staging/media/rkisp1/rkisp1-common.h | 2 ++ drivers/staging/media/rkisp1/rkisp1-dev.c | 2 ++ 3 files changed, 25 insertions(+), 4 deletions(-) -- 2.25.0