From patchwork Thu Oct 24 14:15:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dafna Hirschfeld X-Patchwork-Id: 11209849 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8D94C112C for ; Thu, 24 Oct 2019 14:16:00 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 738CF21925 for ; Thu, 24 Oct 2019 14:16:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405487AbfJXOQA (ORCPT ); Thu, 24 Oct 2019 10:16:00 -0400 Received: from bhuna.collabora.co.uk ([46.235.227.227]:53012 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726008AbfJXOP7 (ORCPT ); Thu, 24 Oct 2019 10:15:59 -0400 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: dafna) with ESMTPSA id 2091D2905AC From: Dafna Hirschfeld To: linux-media@vger.kernel.org Cc: dafna.hirschfeld@collabora.com, helen.koike@collabora.com, skhan@linuxfoundation.org, hverkuil@xs4all.nl, kernel@collabora.com, dafna3@gmail.com Subject: [PATCH v5 0/2] upon streaming, check that the pipeline starts with a source entity Date: Thu, 24 Oct 2019 16:15:52 +0200 Message-Id: <20191024141554.15248-1-dafna.hirschfeld@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The first patch in this patchset moves the dev field of each entity struct to the common struct vimc_ent_device. The second patch fixes a crashing bug when the pipeline does not start with a source entity. Fixes from v4: - NO changes in the first patch since v4 - The function vimc_streamer_pipeline_init now gets the media_entity as parameter and I changed the while loop to "while(ent)" since this the valid behaviour: loop until the source of the pipeline. All other cases should return from the while loop with "goto err". Also, after calling v4l2_subdev_call, if 'ret' is ENOIOCTCMD then it is set to 0 to make sure that ret is 0 when no error occurred. Dafna Hirschfeld (2): media: vimc: move the dev field of each entity to vimc_ent_dev media: vimc: upon streaming, check that the pipeline starts with a source entity drivers/media/platform/vimc/vimc-capture.c | 7 +- drivers/media/platform/vimc/vimc-common.c | 10 +++ drivers/media/platform/vimc/vimc-common.h | 7 ++ drivers/media/platform/vimc/vimc-debayer.c | 15 ++--- drivers/media/platform/vimc/vimc-scaler.c | 11 ++-- drivers/media/platform/vimc/vimc-sensor.c | 5 +- drivers/media/platform/vimc/vimc-streamer.c | 73 +++++++++++++-------- 7 files changed, 78 insertions(+), 50 deletions(-)