Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp3008498ybh; Mon, 16 Mar 2020 14:01:27 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuWxthrmiyJSrRCNreiIuUl6NVvgwKd9wUeseyAuy+3Mgm/K/hhmLk7t1Tb8K4LxUuk9GqQ X-Received: by 2002:aca:3255:: with SMTP id y82mr1139319oiy.44.1584392487725; Mon, 16 Mar 2020 14:01:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584392487; cv=none; d=google.com; s=arc-20160816; b=VwPqOX61ARXqjYAt+//8xwi+KpaI1uG/44e6DhV5NQsLkfXTa/b1JENhwLzAXnalDa 5sqcZyuogQkrKFXl9Xx6vZKDjuLSsIKqi4cvWfPQ+mruqHy4b7R/p2rWQgsL9S1gB08D 2zESZCBYxLzvg5vg+rI5oiDtQsAQErssJikger7Lo09mG5rnvWxJj7xVKCCNl1Y5dl4J 65CUP2AMPoVa1YRv57IvSSXNfEotWCrUEt9h1YPdUzLyVslcOampYwGrnw1Kfz4Omvrv 6zKfhvtAbvP/6annoPrsQZasx2uYe9pz0O7zfndIFX7VEzfGMduID+e5ncviX2FWSAgy JAXQ== 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=PUshsTuteTE5+bgvsyBRXcSnrAUvnPqaCJMwS6y4g/8=; b=PSUc8NPmhn1Njzmoud0hEn1nJGE7Y3l0VRa2kqkvzkxoMzjubWyN8an+dcgeAsZuZt mi9ujXVdibYblSXAxsCjr8Saqrpbfpb3Q8hbW3nWwutkQBSpQZsSCwez27Y1GHJl4iCu FmRiNvRuE+zzLXbfyPD/PwSIMFroicVa/+wMWcaZaLiwKtWEKx8334/5SlZfRTnzc4n4 w4xztWQ3eARXQeCArPxO9FYVD3QhrWTdyKp2/g4ynO0dIMCT32EY6VpWZo0iMBTKk5us DU8cTGq5lzdHlTKF966E7vtvQEN9dUMoK2zAwT7xBFnj0IeHX9lBKgc/+4h0nip9eid7 Xsgw== 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 h3si478476otm.254.2020.03.16.14.01.14; Mon, 16 Mar 2020 14:01:27 -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 S1732624AbgCPVA4 (ORCPT + 99 others); Mon, 16 Mar 2020 17:00:56 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:52458 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732571AbgCPVA4 (ORCPT ); Mon, 16 Mar 2020 17:00:56 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: koike) with ESMTPSA id 106DF28A3BA 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 v2 0/2] media: staging: rkisp1: allow simultaneous streaming from multiple capture devices Date: Mon, 16 Mar 2020 18:00:42 -0300 Message-Id: <20200316210044.595312-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). It depends on the following series for multistream to work properly, but it doesn't mean it can't be merged before: "media: add v4l2_pipeline_stream_{enable,disable} helpers" https://patchwork.linuxtv.org/cover/62233/ And it is also available at: https://gitlab.collabora.com/koike/linux/tree/rockchip/isp/multistream Patch 1/2 fixes return error handling from pm functions, which was preventing the second stream to start. Patch 2/2 serializes start/stop streaming calls, since they both and modify shared variables. Changes in v2: - Rebased on media/master - Removed the following patch from the series: "media: staging: rkisp1: do not call s_stream if the entity is still in use" It was replaced by "media: add v4l2_pipeline_stream_{enable,disable} helpers" https://patchwork.linuxtv.org/cover/62233/ 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 (2): media: staging: rkisp1: cap: fix return values from pm functions media: staging: rkisp1: cap: serialize start/stop stream drivers/staging/media/rkisp1/rkisp1-capture.c | 13 +++++++++++-- drivers/staging/media/rkisp1/rkisp1-common.h | 2 ++ drivers/staging/media/rkisp1/rkisp1-dev.c | 2 ++ 3 files changed, 15 insertions(+), 2 deletions(-) -- 2.25.0