From patchwork Tue Jun 11 15:09:55 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rui Miguel Silva X-Patchwork-Id: 166463 Delivered-To: patch@linaro.org Received: by 2002:a92:4782:0:0:0:0:0 with SMTP id e2csp2485204ilk; Tue, 11 Jun 2019 08:10:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqxbyfG3MRjG/rS5T+Mt5kLC6m3j/5J4Hp4j02kZU+UgE1JnOvmVA+BVUy/tcpF5BB8S6/X7 X-Received: by 2002:a17:902:e282:: with SMTP id cf2mr53758557plb.301.1560265834887; Tue, 11 Jun 2019 08:10:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560265834; cv=none; d=google.com; s=arc-20160816; b=LjyWSenh17n25vEFF6U5u4aBVawnRXmrUSaEG+cGcvG4VETbqgdjiZQ6hf9gxOc7UA COBijNnfy3JE+udY74oUlokRsbXpqizv68NCMlNr2fImUuL/qncBAKRr4cW2cJaxs9tD QfiYYhnLzm/4L0rR1OI7mMHX6ZdBYkSgvYmtKbauf/F9N0AnES1CgOjtQBjZwhz6IsOJ bKvGdFJ8O5qmZYHloJL13pYAsnKRuzA4qcdEhX9SDW/wUBRTjtDevkc4n/9rIRLNcR35 ZvMgOD9EkOWtbSEv/sJzfvOWmFrVoz3xJsiSTqSxo/Xb366cxBxfxgA8Dr+yrPYHtlzi 2trQ== 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:dkim-signature; bh=dKk4lwmcZdnDRALP2wx/m8WSxyBG2vgW/OCx0FzeC8c=; b=KT1ogGyFAWLME9j8DqfJiQpItUiwQXi1HbrqaMWxpVly4Gi5xRPrEbSutUU6S0fc8C N5Amce1jyQUZ9HA+uhp/Ke/UN+reJdUHwreHj0XTth0beLlTpy7sMiCeJ66bsdkIt99k BN3tp8Wz2BvaRiBTWSBi8WujUb1QKqIJY4lDB09I8wN9Qp/hATvo9owtl+zUCsZ2zzit enHa8dOEdfPJIepbxkwoTUOrDrKIKOOiD9LbVxufHT+NOP5XfM343NUOSzPE5iKeKHmI IoJxkDlHkPl2kaai2is1280r3ULgOKIsm8tOlrAIZ5Noq4ND9rXjCzuAPRhT7QArZrRJ YD3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUHoFIhH; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h44si2636078pje.107.2019.06.11.08.10.34; Tue, 11 Jun 2019 08:10:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=aUHoFIhH; spf=pass (google.com: best guess record for domain of linux-media-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-media-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2404483AbfFKPKd (ORCPT + 3 others); Tue, 11 Jun 2019 11:10:33 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:39074 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2404447AbfFKPKd (ORCPT ); Tue, 11 Jun 2019 11:10:33 -0400 Received: by mail-wr1-f65.google.com with SMTP id x4so10816291wrt.6 for ; Tue, 11 Jun 2019 08:10:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dKk4lwmcZdnDRALP2wx/m8WSxyBG2vgW/OCx0FzeC8c=; b=aUHoFIhHG/QLKjJygOhwGp8+6I04xXhwq/HrXO6TimaAtLUW8fIdmB5FLW0pNLDp5g bDZ2Q+sJyfolXXv3+POVpRiP4D5LvcCwky4UT4hyFSrMK75uv3oaSNmSEk1kERzYQugE /V/+AJTS+AxOtnXxaawbc9m2pFom9K99iSFvnaaymu1iaQBKf9RpKlRWFjUaNNQSXu6x zpNhzt0OHVxhdJCXdxrje6owCLWvM00igzgqWtkGujwakvAPiuO2vWBBe6x1bX46W5JR OMBCUITF3SYb35+yILh/hy9vqjTpt0fp3GKFoMeg3o64WwGvtOZmh4wQSfO5Uz+89B6m tuXw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=dKk4lwmcZdnDRALP2wx/m8WSxyBG2vgW/OCx0FzeC8c=; b=ozWCRV/ucaJhVRJfTC2TR2opZ3F1lY/qAMSspw68jZ7PcpxIprbcsS2zASa4Ncxgpk Kx76JyIW3y4eEEAiVzKre6Gs/ECNn98iEDz1sx6ZpeRj8eJ9KEKwEQy8pYnk0PmDdLK7 h1fwJna6TLCMN1e9yr9YIwqwaSUsafyoz+M/6kddkcyBfTfEBRP+42bRGjN2twLes7Q7 ZemnYHJMXYxlRG0e34sRBYCzi5qUk+Q7aets4Z1L2XZA2djPg+j9bRM1gNi2wj7LrhSv f8MHcfQ+NnzII+tDSBQ60kQqMjJ5wd7iHIbJAUv19hT0vJpm9vtH0MIw5PKkYcGv4Vyi KDNQ== X-Gm-Message-State: APjAAAXnvxdta26JKGGli0TD7afzygrI/BaejK0xMAU6ed7Bx6ST+Wn2 3+sa0IoaFrivF6JkYXtAK+kAog== X-Received: by 2002:adf:ea44:: with SMTP id j4mr36676403wrn.123.1560265831937; Tue, 11 Jun 2019 08:10:31 -0700 (PDT) Received: from arch-late.local (a109-49-46-234.cpe.netcabo.pt. [109.49.46.234]) by smtp.gmail.com with ESMTPSA id c17sm10756281wrv.82.2019.06.11.08.10.23 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 08:10:30 -0700 (PDT) From: Rui Miguel Silva To: Hans Verkuil Cc: devel@driverdev.osuosl.org, linux-media@vger.kernel.org, Rui Miguel Silva , Sebastien Szymanski Subject: [PATCH] media: imx7-media-csi: get csi upstream endpoint Date: Tue, 11 Jun 2019 16:09:55 +0100 Message-Id: <20190611150955.8038-1-rui.silva@linaro.org> X-Mailer: git-send-email 2.22.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When the upstream endpoint is neither a mux nor a CSI2 module, just get the source pad directly upstream from the CSI. Fixes: 05f634040c0d ("media: staging/imx7: add imx7 CSI subdev driver") Reported-by: Sebastien Szymanski Signed-off-by: Rui Miguel Silva --- drivers/staging/media/imx/imx7-media-csi.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.22.0 diff --git a/drivers/staging/media/imx/imx7-media-csi.c b/drivers/staging/media/imx/imx7-media-csi.c index 9101566f3f67..8979ee0c8202 100644 --- a/drivers/staging/media/imx/imx7-media-csi.c +++ b/drivers/staging/media/imx/imx7-media-csi.c @@ -442,6 +442,14 @@ static int imx7_csi_get_upstream_endpoint(struct imx7_csi *csi, src = &csi->src_sd->entity; + /* + * if the source in neither a mux or csi2 get the one directly upstream + * from this csi + */ + if (src->function != MEDIA_ENT_F_VID_IF_BRIDGE && + src->function != MEDIA_ENT_F_VID_MUX) + src = &csi->sd.entity; + skip_video_mux: /* get source pad of entity directly upstream from src */ pad = imx_media_pipeline_pad(src, 0, 0, true);