Message ID | 20220522162802.208275-1-luca@z3ntu.xyz (mailing list archive) |
---|---|
Headers |
Received: from vger.kernel.org ([23.128.96.18]) by www.linuxtv.org with esmtp (Exim 4.92) (envelope-from <linux-media-owner@vger.kernel.org>) id 1nsoRY-005dsX-N2; Sun, 22 May 2022 16:28:37 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244897AbiEVQ2Z (ORCPT <rfc822;mkrufky@linuxtv.org> + 1 other); Sun, 22 May 2022 12:28:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239510AbiEVQ2X (ORCPT <rfc822;linux-media@vger.kernel.org>); Sun, 22 May 2022 12:28:23 -0400 Received: from mail.z3ntu.xyz (mail.z3ntu.xyz [128.199.32.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 808221408F; Sun, 22 May 2022 09:28:19 -0700 (PDT) Received: from g550jk.arnhem.chello.nl (a246182.upc-a.chello.nl [62.163.246.182]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id B6911CCD0A; Sun, 22 May 2022 16:28:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1653236896; bh=cFYMSBAR5nSWZ0V5OXR+W0l5hCGPr4sB3AoRi8xys+4=; h=From:To:Cc:Subject:Date; b=iVZTYNDWMtYnxOqKI2d4yO/XY1JfnODk3MAUvdBefihwUkYHlS0jfyJSF5YL0O4pP OwDLMqLOELknLhzYVhHLIKP95udmQbml9g1dqKEx2+4qJnAByos0Z/W07SESrs2DkY Ucx6f33YBZK9LQBZcCpKQJq8OGmgFNx1Pp0qP3vA= From: Luca Weiss <luca@z3ntu.xyz> To: linux-arm-msm@vger.kernel.org Cc: ~postmarketos/upstreaming@lists.sr.ht, phone-devel@vger.kernel.org, Loic Poulain <loic.poulain@linaro.org>, Robert Foss <robert.foss@linaro.org>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Todor Tomov <todor.too@gmail.com>, Andy Gross <agross@kernel.org>, Bjorn Andersson <bjorn.andersson@linaro.org>, Mauro Carvalho Chehab <mchehab@kernel.org>, linux-i2c@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, matti.lehtimaki@gmail.com, Luca Weiss <luca@z3ntu.xyz> Subject: [RFC PATCH 00/14] CAMSS support for MSM8974 Date: Sun, 22 May 2022 18:27:48 +0200 Message-Id: <20220522162802.208275-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.3 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FROM_SUSPICIOUS_NTLD, FROM_SUSPICIOUS_NTLD_FP,PDS_OTHER_BAD_TLD,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-LSpam-Score: -2.3 (--) X-LSpam-Report: No, score=-2.3 required=5.0 tests=BAYES_00=-1.9,DKIM_SIGNED=0.1,HEADER_FROM_DIFFERENT_DOMAINS=0.5,MAILING_LIST_MULTI=-1,T_DKIM_INVALID=0.01 autolearn=ham autolearn_force=no |
Series |
CAMSS support for MSM8974
|
|
Message
Luca Weiss
May 22, 2022, 4:27 p.m. UTC
This RFC series adds support for CAMSS and CCI that are found on msm8974, including the OV8865 found on the FP2. The only reason it's marked RFC is that CAMSS doesn't behave properly on this SoC without the last commit which is obviously not upstreamable. Not sure if this should be a blocker for including most of the other patches because other than that it seems to work fine and I can get a picture from the camera sensor. When/if msm8974 gets IOMMU support I hope this should be resolved and it works without this hack. I think at least the CCI patches could get applied as they're not dependent on the CAMSS hack? Luca Weiss (5): dt-bindings: i2c: qcom-cci: add QCOM MSM8974 compatible ARM: dts: qcom: msm8974: add CCI bus ARM: dts: qcom: msm8974: add CAMSS node ARM: dts: qcom: msm8974-FP2: Add OV8865 rear camera [DNM] media: camss: hacks for MSM8974 Matti Lehtimäki (9): media: dt-bindings: media: camss: Add qcom,msm8974-camss binding media: camss: Add CAMSS_8x74 camss version media: camss: vfe: Add support for 8x74 media: camss: video: Add support for 8x74 media: camss: csid: Add support for 8x74 media: camss: ispif: Add support for 8x74 media: camss: csiphy: Add support for 8x74 media: camss: Add 8x74 resources i2c: qcom-cci: add msm8974 compatible .../devicetree/bindings/i2c/i2c-qcom-cci.txt | 7 +- .../bindings/media/qcom,msm8974-camss.yaml | 321 ++++++++++++++++++ arch/arm/boot/dts/qcom-msm8974.dtsi | 184 ++++++++++ .../dts/qcom-msm8974pro-fairphone-fp2.dts | 70 ++++ drivers/i2c/busses/i2c-qcom-cci.c | 35 ++ drivers/media/platform/qcom/camss/Kconfig | 4 +- .../media/platform/qcom/camss/camss-csid.c | 3 +- .../media/platform/qcom/camss/camss-csiphy.c | 4 +- .../media/platform/qcom/camss/camss-ispif.c | 5 +- drivers/media/platform/qcom/camss/camss-vfe.c | 7 +- .../media/platform/qcom/camss/camss-video.c | 17 +- drivers/media/platform/qcom/camss/camss.c | 161 +++++++++ drivers/media/platform/qcom/camss/camss.h | 1 + 13 files changed, 801 insertions(+), 18 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8974-camss.yaml
Comments
On 22/05/2022 19:27, Luca Weiss wrote: > This RFC series adds support for CAMSS and CCI that are found on > msm8974, including the OV8865 found on the FP2. > > The only reason it's marked RFC is that CAMSS doesn't behave properly on > this SoC without the last commit which is obviously not upstreamable. > Not sure if this should be a blocker for including most of the other > patches because other than that it seems to work fine and I can get a > picture from the camera sensor. When/if msm8974 gets IOMMU support I > hope this should be resolved and it works without this hack. > > I think at least the CCI patches could get applied as they're not > dependent on the CAMSS hack? I'd also vote for the camcc patches to be applied. As for the camss, I'd suggest to get them verified to work properly with a hacked/non-upstreamable/etc. IOMMU driver if one exists. Otherwise we can easily get into a situation where we merge up code that contains bugs itself. Another option might be to actually check whether the device has an IOMMU attached (see device_iommu_mapped()) and to select whether the driver should use SG or CONTIG depending on that. As an additional note regarding the offset issue you've mentioned. It looks like there is an issue with the swiotlb. On the IFC6410 (apq8064, no IOMMU) I got an issue with the PCI-attached networking card. Received packets are offset by 4 (IIRC) bytes. The same type of adapter works on db820c (apq8096, working IOMMU). What kind of issues did you observe with the camss? If it looks like the issue I had, it might be a symptom of a more generic issue. > > Luca Weiss (5): > dt-bindings: i2c: qcom-cci: add QCOM MSM8974 compatible > ARM: dts: qcom: msm8974: add CCI bus > ARM: dts: qcom: msm8974: add CAMSS node > ARM: dts: qcom: msm8974-FP2: Add OV8865 rear camera > [DNM] media: camss: hacks for MSM8974 > > Matti Lehtimäki (9): > media: dt-bindings: media: camss: Add qcom,msm8974-camss binding > media: camss: Add CAMSS_8x74 camss version > media: camss: vfe: Add support for 8x74 > media: camss: video: Add support for 8x74 > media: camss: csid: Add support for 8x74 > media: camss: ispif: Add support for 8x74 > media: camss: csiphy: Add support for 8x74 > media: camss: Add 8x74 resources > i2c: qcom-cci: add msm8974 compatible > > .../devicetree/bindings/i2c/i2c-qcom-cci.txt | 7 +- > .../bindings/media/qcom,msm8974-camss.yaml | 321 ++++++++++++++++++ > arch/arm/boot/dts/qcom-msm8974.dtsi | 184 ++++++++++ > .../dts/qcom-msm8974pro-fairphone-fp2.dts | 70 ++++ > drivers/i2c/busses/i2c-qcom-cci.c | 35 ++ > drivers/media/platform/qcom/camss/Kconfig | 4 +- > .../media/platform/qcom/camss/camss-csid.c | 3 +- > .../media/platform/qcom/camss/camss-csiphy.c | 4 +- > .../media/platform/qcom/camss/camss-ispif.c | 5 +- > drivers/media/platform/qcom/camss/camss-vfe.c | 7 +- > .../media/platform/qcom/camss/camss-video.c | 17 +- > drivers/media/platform/qcom/camss/camss.c | 161 +++++++++ > drivers/media/platform/qcom/camss/camss.h | 1 + > 13 files changed, 801 insertions(+), 18 deletions(-) > create mode 100644 Documentation/devicetree/bindings/media/qcom,msm8974-camss.yaml >
On Mon, May 23, 2022 at 03:39:53PM +0300, Dmitry Baryshkov wrote: > On 22/05/2022 19:27, Luca Weiss wrote: > > This RFC series adds support for CAMSS and CCI that are found on > > msm8974, including the OV8865 found on the FP2. > > > > The only reason it's marked RFC is that CAMSS doesn't behave properly on > > this SoC without the last commit which is obviously not upstreamable. > > Not sure if this should be a blocker for including most of the other > > patches because other than that it seems to work fine and I can get a > > picture from the camera sensor. When/if msm8974 gets IOMMU support I > > hope this should be resolved and it works without this hack. > > > > I think at least the CCI patches could get applied as they're not > > dependent on the CAMSS hack? > > I'd also vote for the camcc patches to be applied. > > As for the camss, I'd suggest to get them verified to work properly with a > hacked/non-upstreamable/etc. IOMMU driver if one exists. Otherwise we can > easily get into a situation where we merge up code that contains bugs > itself. Last I checked, there's no IOMMU driver for msm8974 that works with an upstream kernel at the moment. About 2 years ago, I took a stab at attempting to enable IOMMU for the display and ran into some issues that I documented at: https://lore.kernel.org/lkml/20200109002606.35653-1-masneyb@onstation.org/ I'm not familiar with this part of the hardware and haven't had time since then to look into this further. Brian