Received: by 2002:a05:6a10:8c0a:0:0:0:0 with SMTP id go10csp6385592pxb; Wed, 17 Feb 2021 03:09:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJyGske/XWTrCDc6mhu5r4a9I/O7WwVROyrEf5N1+/lUO9+vGLr5cFMtz4W1kFtJ8qzVFSK/ X-Received: by 2002:a05:6402:5243:: with SMTP id t3mr18229639edd.361.1613560184710; Wed, 17 Feb 2021 03:09:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1613560184; cv=none; d=google.com; s=arc-20160816; b=XHtE6t6XT9NRNKp1CJbJqAzhHR3zfdoBXDChr9IYvm6eAgPwtExOCiDIbq9UYTB5ux ymg6W+uU3oDN2Q3rKdNG0Ku9ndiiMa+iVnbf4hopTX44vadMnCmOXaZp2ZhSV9xelZNm clMtWJ/WaLYk/VsUxxgNcs5Bbikd8LK8c9vOVUI4A52IoaSDxkJxH8haDup7SyPo2Q3b 9/RVggksp0k890rVJ0qYD8xLdyYFh5z6Vh/mLYLVkYS2fXqdpc2kR1SVMyDpZcaMNARA ZLcawrFglxTd0O6+J49C+Y5FqRz9A2qTy+ABm3Tp+cVi6FlMm9ctUlhxYduxAhzzcrtE Ma6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=BtOBKP8Jtor+YFs8+p9bqhmg075DZ0P/iwFiIwD9A2g=; b=DWXTta5tXK7wflWwILa0K5iQZEsd4bz9KNQ9eL6wKDMGQkuD53nFX6lUzUE8Ktfrqw SOvI5rRIsqJdoqOWDS41v/cQzUJc1svxR4Tw/NrRwgdrrRu6uyXj5j+JkXNZOq4NuSdA G1FXLkRKyeAlD0T9f+N/EdnFJKHAlQ9AlcW9LG76BJpz1+nhmz6ibi65CfRronE0laBI CUwJI0fOb1uZ5noCQVIsnZtx/xVMlAg+aVxt/eukDfa+kU+968ltskPhDHg/5I1ey05Y XQz6YLlS+vjeuq+j1m3YHtRCu6k3k0lxi6WzfiXEh5r1tOHW6w1hXk+CiB8LrpGA3s+6 iIVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Cxl9mh/n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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. [23.128.96.18]) by mx.google.com with ESMTP id f2si1222324ejl.488.2021.02.17.03.09.20; Wed, 17 Feb 2021 03:09:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="Cxl9mh/n"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S230332AbhBQLGk (ORCPT + 99 others); Wed, 17 Feb 2021 06:06:40 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32898 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231364AbhBQLFX (ORCPT ); Wed, 17 Feb 2021 06:05:23 -0500 Received: from mail-pg1-x52b.google.com (mail-pg1-x52b.google.com [IPv6:2607:f8b0:4864:20::52b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1132C061786 for ; Wed, 17 Feb 2021 03:04:43 -0800 (PST) Received: by mail-pg1-x52b.google.com with SMTP id o38so8248035pgm.9 for ; Wed, 17 Feb 2021 03:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=BtOBKP8Jtor+YFs8+p9bqhmg075DZ0P/iwFiIwD9A2g=; b=Cxl9mh/nNdhHmXNmwVji5GwMLL9JBYVG+4D2OZfwY9ZeaL1hE7TR6qKf5K73J4boQ7 cdoLkeETORFg7/mmDvC15V48vd03QROM3VjMeElcHYN/m/qU5OKi+vnKxxZkAarSU6kx SeW6addBNiGDnf0xOtPG5zNBg1FR8hcONUzPskboGhX5YDT45J4kdfvOsKp9tl6cZHmE 6/DU12CsOb4MgzSIhYWt820L03/mGUdpJncV9LakcSD0qKnBCHuNQRa4icWBJwRqbAHu zKU/774378Cns+YNYxg20bGRyMLw40lj3Z6/u+Mde4GVw3wL5xWS8O9SoIFR+HegP6j7 ztfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=BtOBKP8Jtor+YFs8+p9bqhmg075DZ0P/iwFiIwD9A2g=; b=B+C/a4nMnltIc2kR1xS+EOie+RvhMnFX4XNeXA425suEpQFQAKmG4QPnG3m5xdj8ju ret1ESDytfl56SVIFVqkb6BTbxgW77qVFMEHU6fXzWIbuob6qXbqQek8DB6BuagJ1CBo zwFi+hptlmWJD+2O5SByNuGbfS19KwA1aZUwtbf6no5B/7jB4AFJ0Mfv4mCLJRVVrmz8 j9BaeDIpdYN+QjejhcehGRtFf+KnyVP0Qtt+TU3KA9y6G1Vy2DXXg4m3c7V5YEqJ6Ztj zY/m3ycNOcSU2aN2aFW0XjbQTqyZUg/kj4/EtMe67Bfdq8WQ6d2Qi44vm2xi/e91sqa6 it+g== X-Gm-Message-State: AOAM531tuq0KkDPKp+X9yAYZD99VRg+nqTXMIf5A52TSLm25KN3L+7sE pYLeg5je9pqVvcKOHzDx/P92AnGBFh4MouVCpbDGuA== X-Received: by 2002:aa7:9281:0:b029:1ec:48b2:811c with SMTP id j1-20020aa792810000b02901ec48b2811cmr9331621pfa.18.1613559882353; Wed, 17 Feb 2021 03:04:42 -0800 (PST) MIME-Version: 1.0 References: <20210205104414.299732-1-robert.foss@linaro.org> <5fea18b2-307b-2b45-4bc7-d327022642b0@linaro.org> In-Reply-To: <5fea18b2-307b-2b45-4bc7-d327022642b0@linaro.org> From: Robert Foss Date: Wed, 17 Feb 2021 12:04:31 +0100 Message-ID: Subject: Re: [PATCH v4 00/22] Add support for the SDM845 Camera Subsystem To: Andrey Konovalov Cc: Todor Tomov , Andy Gross , Bjorn Andersson , Mauro Carvalho Chehab , Rob Herring , angelogioacchino.delregno@somainline.org, linux-media , MSM , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , linux-kernel , AngeloGioacchino Del Regno , Rob Herring , Sakari Ailus , Nicolas Boichat , Tomasz Figa , Azam Sadiq Pasha Kapatrala Syed , Sarvesh Sridutt , Laurent Pinchart , Jonathan Marek Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 10 Feb 2021 at 21:14, Andrey Konovalov wrote: > > Hi Robert, > > On 05.02.2021 13:43, Robert Foss wrote: > > This series implements support for the camera subsystem found in > > the SDM845 SOCs and the Titan 170 ISP. The support is partial > > in that it implements CSIPHY, CSID, and partial VFE support. > > > > The Titan generation of the ISP diverges a fair amount from the > > design of the previous architecture generation, CAMSS. As a result > > some pretty invasive refactoring is done in this series. It also > > means that at this time we're unable to implement support for all > > of the IP blocks contained. This is due to a combination of legal > > considerations with respect to the IP and its owner Qualcomm and > > time & man hour constrains on the Linaro side. > > > > The CSIPHY (CSI Physical Layer) & CSID (CSI Decoder) support is > > complete, but the VFE (Video Front End, which is referred to as IFE > > (Image Front End) in the Titan generation of ISPs) only has support > > for the RDI (Raw Dump Interface) which allows the raw output of > > the CSID to be written to memory. > > > > The 2nd interface implemented in the VFE silicon is the PIX > > interface, and camss does not support it for this generation of ISPs. > > The reason for this is that the PIX interface is used for sending > > image data to the BPS (Bayer Processing Section) & IPE (Image > > Processing Engine), but both of these units are beyond the scope > > of enabling basic ISP functionality for the SDM845. > > The problem is that for SDM845 the topology printed by media-ctl > still has the PIX devices. That is even though the PIX interface is not > supported for SDM845 in this driver, the msm_vfeN_pix subdevices > and the corresponding msm_vfeN_video3 devices are still created. > Your patchset is currently missing changes to the hardcoded: > > #define MSM_VFE_LINE_NUM 4 > > struct vfe_device { > ... > struct vfe_line line[MSM_VFE_LINE_NUM]; > ... > }; > > in drivers/media/platform/qcom/camss/camss-vfe.h. I had a look through the driver and made the line number variable for the different versions of hardware. This required touching most of the vfe related compilation units, but was a pretty mechanical change. Thanks for spotting this issue. > > > Thanks, > Andrey > > > Since the Titan architecture generation diverges quite a bit from > > the CAMSS generation, a lot of pretty major refactoring is carried > > out in this series. Both the CSID & VFE core paths are made more > > general and hardware version specific parts are broken out. > > The CSIPHY didn't require quite as radical changes and therefore > > keeps its current form. > > > > Tested on: > > - Qcom RB3 / db845c + camera mezzanine, which is SDM845 based > > - db410c + D3 Camera mezzanine, which is APQ8016 based > > > > Branch: > > - https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v1 > > - https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v2 > > - https://git.linaro.org/people/robert.foss/linux.git/log/?h=camss_sdm845_v3 > > > > > > Due to the dt-bindings supporting sdm660-camss, this series depends > > the sdm660 clock driver being upstreamed. I've linked this series below. > > > > SDM630/660 Multimedia and GPU clock controllers > > https://lkml.org/lkml/2020/9/26/166 > > > > > > Robert Foss (22): > > media: camss: Fix vfe_isr_comp_done() documentation > > media: camss: Fix vfe_isr comment typo > > media: camss: Replace trace_printk() with dev_dbg() > > media: camss: Add CAMSS_845 camss version > > media: camss: Make ISPIF subdevice optional > > media: camss: Refactor VFE HW version support > > media: camss: Add support for VFE hardware version Titan 170 > > media: camss: Add missing format identifiers > > media: camss: Refactor CSID HW version support > > media: camss: Add support for CSID hardware version Titan 170 > > media: camss: Add support for CSIPHY hardware version Titan 170 > > media: camss: Remove per VFE power domain toggling > > media: camss: Enable SDM845 > > dt-bindings: media: camss: Add qcom,msm8916-camss binding > > dt-bindings: media: camss: Add qcom,msm8996-camss binding > > dt-bindings: media: camss: Add qcom,sdm660-camss binding > > dt-bindings: media: camss: Add qcom,sdm845-camss binding > > MAINTAINERS: Change CAMSS documentation to use dtschema bindings > > media: dt-bindings: media: Remove qcom,camss documentation > > arm64: dts: sdm845: Add CAMSS ISP node > > arm64: dts: sdm845-db845c: Configure regulators for camss node > > arm64: dts: sdm845-db845c: Enable ov8856 sensor and connect to ISP > > > > .../devicetree/bindings/media/qcom,camss.txt | 236 ---- > > .../bindings/media/qcom,msm8916-camss.yaml | 256 ++++ > > .../bindings/media/qcom,msm8996-camss.yaml | 387 ++++++ > > .../bindings/media/qcom,sdm660-camss.yaml | 398 ++++++ > > .../bindings/media/qcom,sdm845-camss.yaml | 370 ++++++ > > MAINTAINERS | 2 +- > > arch/arm64/boot/dts/qcom/sdm845-db845c.dts | 23 +- > > arch/arm64/boot/dts/qcom/sdm845.dtsi | 135 ++ > > drivers/media/platform/qcom/camss/Makefile | 6 + > > .../platform/qcom/camss/camss-csid-170.c | 602 +++++++++ > > .../platform/qcom/camss/camss-csid-4-1.c | 338 +++++ > > .../platform/qcom/camss/camss-csid-4-7.c | 406 ++++++ > > .../media/platform/qcom/camss/camss-csid.c | 620 +-------- > > .../media/platform/qcom/camss/camss-csid.h | 178 ++- > > .../qcom/camss/camss-csiphy-3ph-1-0.c | 182 ++- > > .../media/platform/qcom/camss/camss-csiphy.c | 66 +- > > .../media/platform/qcom/camss/camss-ispif.c | 117 +- > > .../media/platform/qcom/camss/camss-ispif.h | 3 +- > > .../media/platform/qcom/camss/camss-vfe-170.c | 804 ++++++++++++ > > .../media/platform/qcom/camss/camss-vfe-4-1.c | 123 +- > > .../media/platform/qcom/camss/camss-vfe-4-7.c | 244 ++-- > > .../media/platform/qcom/camss/camss-vfe-4-8.c | 1164 +++++++++++++++++ > > .../platform/qcom/camss/camss-vfe-gen1.c | 763 +++++++++++ > > .../platform/qcom/camss/camss-vfe-gen1.h | 110 ++ > > drivers/media/platform/qcom/camss/camss-vfe.c | 840 +----------- > > drivers/media/platform/qcom/camss/camss-vfe.h | 118 +- > > .../media/platform/qcom/camss/camss-video.c | 100 ++ > > drivers/media/platform/qcom/camss/camss.c | 419 ++++-- > > drivers/media/platform/qcom/camss/camss.h | 17 +- > > 29 files changed, 6965 insertions(+), 2062 deletions(-) > > delete mode 100644 Documentation/devicetree/bindings/media/qcom,camss.txt > > create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8916-camss.yaml > > create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8996-camss.yaml > > create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm660-camss.yaml > > create mode 100644 Documentation/devicetree/bindings/media/qcom,sdm845-camss.yaml > > create mode 100644 drivers/media/platform/qcom/camss/camss-csid-170.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-1.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-csid-4-7.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-170.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-4-8.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.c > > create mode 100644 drivers/media/platform/qcom/camss/camss-vfe-gen1.h > >