* [RFC PATCH v2 01/18] dt-bindings: i2c: tegra: Document Tegra210 VI I2C clocks and power-domains
From: Sowjanya Komatineni @ 2020-06-17 1:41 UTC (permalink / raw)
To: skomatineni, thierry.reding, jonathanh, frankc, hverkuil,
sakari.ailus, robh+dt, helen.koike
Cc: digetx, sboyd, gregkh, linux-media, devicetree, linux-tegra,
linux-kernel, linux-i2c
In-Reply-To: <1592358094-23459-1-git-send-email-skomatineni@nvidia.com>
This patch documents missing clocks and power-domains of Tegra210 VI I2C.
Signed-off-by: Sowjanya Komatineni <skomatineni@nvidia.com>
---
.../devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | 19 +++++++++++++------
1 file changed, 13 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt
index 18c0de3..3f2f990 100644
--- a/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt
+++ b/Documentation/devicetree/bindings/i2c/nvidia,tegra20-i2c.txt
@@ -35,12 +35,12 @@ Required properties:
Due to above changes, Tegra114 I2C driver makes incompatible with
previous hardware driver. Hence, tegra114 I2C controller is compatible
with "nvidia,tegra114-i2c".
- nvidia,tegra210-i2c-vi: Tegra210 has one I2C controller that is part of the
- host1x domain and typically used for camera use-cases. This VI I2C
- controller is mostly compatible with the programming model of the
- regular I2C controllers with a few exceptions. The I2C registers start
- at an offset of 0xc00 (instead of 0), registers are 16 bytes apart
- (rather than 4) and the controller does not support slave mode.
+ nvidia,tegra210-i2c-vi: Tegra210 has one I2C controller that is on host1x bus
+ and is part of VE power domain and typically used for camera use-cases.
+ This VI I2C controller is mostly compatible with the programming model
+ of the regular I2C controllers with a few exceptions. The I2C registers
+ start at an offset of 0xc00 (instead of 0), registers are 16 bytes
+ apart (rather than 4) and the controller does not support slave mode.
- reg: Should contain I2C controller registers physical address and length.
- interrupts: Should contain I2C controller interrupts.
- address-cells: Address cells for I2C device address.
@@ -53,10 +53,17 @@ Required properties:
- fast-clk
Tegra114:
- div-clk
+ Tegra210:
+ - div-clk
+ - slow (only for nvidia,tegra210-i2c-vi compatible node)
- resets: Must contain an entry for each entry in reset-names.
See ../reset/reset.txt for details.
- reset-names: Must include the following entries:
- i2c
+- power-domains: Only for nvidia,tegra210-i2c-vi compatible node and must
+ include venc powergate node as vi i2c is part of VE power domain.
+ tegra210-i2c-vi:
+ - pd_venc
- dmas: Must contain an entry for each entry in clock-names.
See ../dma/dma.txt for details.
- dma-names: Must include the following entries:
--
2.7.4
^ permalink raw reply related
* [RFC PATCH v2 00/18] Support for Tegra video capture from external sensor
From: Sowjanya Komatineni @ 2020-06-17 1:41 UTC (permalink / raw)
To: skomatineni-DDmLM1+adcrQT0dZR+AlfA,
thierry.reding-Re5JQEeQqe8AvxtiuMwx3w,
jonathanh-DDmLM1+adcrQT0dZR+AlfA, frankc-DDmLM1+adcrQT0dZR+AlfA,
hverkuil-qWit8jRvyhVmR6Xm/wNWPw, sakari.ailus-X3B1VOXEql0,
robh+dt-DgEjT+Ai2ygdnm+yROfE0A,
helen.koike-ZGY8ohtN/8qB+jHODAdFcQ
Cc: digetx-Re5JQEeQqe8AvxtiuMwx3w, sboyd-DgEjT+Ai2ygdnm+yROfE0A,
gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r,
linux-media-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-i2c-u79uwXL29TY76Z2rM5mHXA
This series adds support for video capture from external camera sensor to
Tegra video driver.
Jetson TX1 has camera expansion connector and supports custom camera module
designed as per TX1 design specification.
This series also enables camera capture support for Jetson Nano which has
Raspberry PI camera header.
This series is tested with IMX219 camera sensor.
This series include,
VI I2C related fixes
- Camera sensor programming happens through VI I2C which is on host1x bus.
- These patches includes device tree and I2C driver fixes for VI I2C.
Tegra video driver updates
- TPG Vs Non-TPG based on Kconfig
- Support for external sensor video capture based on device graph from DT.
- Support for selection ioctl operations
- Tegra MIPI CSI pads calibration
- CSI T-CLK and T-HS settle time computation based on clock rates.
Host1x driver updates
- Adds API to allow creating mipi device for specific device node.
- Splits MIPI pads calibrate start and waiting for calibration to be done.
Device tree updates
- Adds camera connector 2V8, 1V8, 1V2 regulator supplies to Jetson TX1 DT.
- Enabled VI and CSI support in Jetson Nano DT.
Delta between patch versions:
[v2]: Includes below changes based on v1 feedback
- dt-binding document and the driver update for device graph to use
separate ports for sink endpoint and source endpoint for csi.
- Use data-lanes endpoint property for csi.
- Update tegra_mipi_request() to take device node pointer argument
rather than adding extra API.
- Remove checking for clk pointer before clk_disable.
Sowjanya Komatineni (18):
dt-bindings: i2c: tegra: Document Tegra210 VI I2C clocks and
power-domains
arm64: tegra: Add missing clocks and power-domains to Tegra210 VI I2C
i2c: tegra: Don't mark VI I2C as IRQ safe runtime PM
i2c: tegra: Fix the error path in tegra_i2c_runtime_resume
i2c: tegra: Fix runtime resume to re-init VI I2C
i2c: tegra: Avoid tegra_i2c_init_dma() for Tegra210 vi i2c
media: tegra-video: Fix channel format alignment
media: tegra-video: Enable TPG based on kernel config
media: tegra-video: Update format lookup to offset based
dt-bindings: tegra: Update VI and CSI bindings with port info
media: tegra-video: Add support for external sensor capture
media: tegra-video: Add support for selection ioctl ops
gpu: host1x: mipi: Update tegra_mipi_request() to be node based
gpu: host1x: mipi: Split tegra_mipi_calibrate and tegra_mipi_wait
media: tegra-video: Add CSI MIPI pads calibration
media: tegra-video: Compute settle times based on the clock rate
arm64: tegra: jetson-tx1: Add camera supplies
arm64: tegra: Enable Tegra VI CSI support for Jetson Nano
.../display/tegra/nvidia,tegra20-host1x.txt | 92 ++-
.../devicetree/bindings/i2c/nvidia,tegra20-i2c.txt | 19 +-
arch/arm64/boot/dts/nvidia/tegra210-p2597.dtsi | 41 ++
arch/arm64/boot/dts/nvidia/tegra210-p3450-0000.dts | 10 +
arch/arm64/boot/dts/nvidia/tegra210.dtsi | 6 +
drivers/gpu/drm/tegra/dsi.c | 9 +-
drivers/gpu/host1x/mipi.c | 30 +-
drivers/i2c/busses/i2c-tegra.c | 39 +-
drivers/staging/media/tegra-video/Kconfig | 7 +
drivers/staging/media/tegra-video/csi.c | 245 ++++++-
drivers/staging/media/tegra-video/csi.h | 8 +
drivers/staging/media/tegra-video/tegra210.c | 25 +-
drivers/staging/media/tegra-video/vi.c | 770 +++++++++++++++++++--
drivers/staging/media/tegra-video/vi.h | 23 +-
drivers/staging/media/tegra-video/video.c | 23 +-
include/linux/host1x.h | 4 +-
16 files changed, 1251 insertions(+), 100 deletions(-)
--
2.7.4
^ permalink raw reply
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Dmitry Osipenko @ 2020-06-16 21:25 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Emil Velikov, Thierry Reding, Thomas Zimmermann, Derek Basehore,
Sam Ravnborg, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <20200616174558.GA913-N3hz7ZxfLydczECFQUw77jytWr6r+dGw0E9HWUfgJXw@public.gmane.org>
16.06.2020 20:45, Laurent Pinchart пишет:
> On Tue, Jun 16, 2020 at 08:20:57PM +0300, Dmitry Osipenko wrote:
>> 16.06.2020 18:48, Emil Velikov пишет:
>>> On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>> 16.06.2020 01:26, Emil Velikov пишет:
>>>>> Hi Dmitry,
>>>>>
>>>>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> This series adds 180° display plane rotation support to the NVIDIA Tegra
>>>>>> DRM driver which is needed for devices that have display panel physically
>>>>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
>>>>>> DRM panel rotation is a new thing for a userspace, currently only
>>>>>> Opentegra Xorg driver handles the rotated display panel [2], but this
>>>>>> is good enough for the start.
>>>>>>
>>>>>> Note that later on it should be possible to implement a transparent 180°
>>>>>> display rotation for Tegra DRM driver which will remove the need to have
>>>>>> a bleeding edge userspace that knows how to rotate display planes and I'm
>>>>>> slowly working on it. For the starter we can go with the minimal rotation
>>>>>> support, so it's not a blocker.
>>>>>>
>>>>>> This series is based on the work that was made by Derek Basehore for the
>>>>>> Mediatek driver [3], his patch is included into this patchset. I added
>>>>>> my tested-by tag to the Derek's patch.
>>>>>>
>>>>>> Please review and apply, thanks in advance!
>>>>>>
>>>>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>>>>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
>>>>>> [3] https://lkml.org/lkml/2020/3/5/1119
>>>>>>
>>>>>> Changelog:
>>>>>>
>>>>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
>>>>>> turned out to be obsolete now.
>>>>>>
>>>>>> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
>>>>>>
>>>>>> Derek Basehore (1):
>>>>>> drm/panel: Add helper for reading DT rotation
>>>>>>
>>>>>> Dmitry Osipenko (4):
>>>>>> drm/panel: lvds: Set up panel orientation
>>>>>
>>>>> IMHO it's perfectly reasonable to report the panel orientation to
>>>>> userspace, which can apply plane rotation as needed.
>>>>>
>>>>> Although I see that this series, alike Derek's, has a couple of issues:
>>>>> - only a single panel driver is updated
>>>>> - rotation is _not_ listed as supported property, in said panel
>>>>> driver device-tree bindings
>>>>>
>>>>> My personal inclination is that we should aim for a comprehensive solution:
>>>>> - wire all panel drivers, as currently documented (quick grep list below)
>>>>> - document and wire-up the lvds and boe panels - as proposed by you
>>>>> and Derek respectively
>>>>>
>>>>> HTH
>>>>> Emil
>>>>>
>>>>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
>>>>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
>>>>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
>>>>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
>>>>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
>>>>
>>>> Rotation is a common DT panel property that is described in the
>>>> panel-common.yaml.
>>> The property was introduced almost exclusively for tiny drm panels.
>>> Those ones are a bit different from the rest (in panel/) -
>>> MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
>>>
>>> To make it a bit better, the rotation is seemingly performed in the
>>> tiny driver itself ouch.
>>>
>>>> This property is supported by all panel bindings
>>>> because these bindings inherent the common properties from the
>>>> panel-common.yaml.
>>>>
>>> Seems like that was an unintentional change with the conversion to YAML.
>>> Beforehand only a few selected panels had rotation. Upon closer look -
>>> some panels do have follow-up fixes, to remove/limit the implicit
>>> inclusion.
>>
>> Interesting.. my understanding that the rotation property is supposed to
>> be a generic property which represents physical orientation of a display
>> panel and hence it should be applicable to all panels.
>
> Adding a bit more food for thoughts, the DT rotation property for camera
> sensor modules has recently been documented with lots of details. See
> https://lore.kernel.org/linux-media/20200509090456.3496481-3-jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org/,
> part of the documentation may be useful for panels.
Thanks!
^ permalink raw reply
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Dmitry Osipenko @ 2020-06-16 21:16 UTC (permalink / raw)
To: Emil Velikov
Cc: Thierry Reding, Thomas Zimmermann, Derek Basehore, Sam Ravnborg,
Laurent Pinchart, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <CACvgo50BFH5qsPyWx9a1aZ4k5bzjSN-3KTU0BvnZ-nG-hfzKOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
16.06.2020 21:54, Emil Velikov пишет:
> On Tue, 16 Jun 2020 at 18:20, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>> 16.06.2020 18:48, Emil Velikov пишет:
>>> On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>> 16.06.2020 01:26, Emil Velikov пишет:
>>>>> Hi Dmitry,
>>>>>
>>>>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>>>
>>>>>> Hello!
>>>>>>
>>>>>> This series adds 180° display plane rotation support to the NVIDIA Tegra
>>>>>> DRM driver which is needed for devices that have display panel physically
>>>>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
>>>>>> DRM panel rotation is a new thing for a userspace, currently only
>>>>>> Opentegra Xorg driver handles the rotated display panel [2], but this
>>>>>> is good enough for the start.
>>>>>>
>>>>>> Note that later on it should be possible to implement a transparent 180°
>>>>>> display rotation for Tegra DRM driver which will remove the need to have
>>>>>> a bleeding edge userspace that knows how to rotate display planes and I'm
>>>>>> slowly working on it. For the starter we can go with the minimal rotation
>>>>>> support, so it's not a blocker.
>>>>>>
>>>>>> This series is based on the work that was made by Derek Basehore for the
>>>>>> Mediatek driver [3], his patch is included into this patchset. I added
>>>>>> my tested-by tag to the Derek's patch.
>>>>>>
>>>>>> Please review and apply, thanks in advance!
>>>>>>
>>>>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>>>>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
>>>>>> [3] https://lkml.org/lkml/2020/3/5/1119
>>>>>>
>>>>>> Changelog:
>>>>>>
>>>>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
>>>>>> turned out to be obsolete now.
>>>>>>
>>>>>> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
>>>>>>
>>>>>> Derek Basehore (1):
>>>>>> drm/panel: Add helper for reading DT rotation
>>>>>>
>>>>>> Dmitry Osipenko (4):
>>>>>> drm/panel: lvds: Set up panel orientation
>>>>>
>>>>> IMHO it's perfectly reasonable to report the panel orientation to
>>>>> userspace, which can apply plane rotation as needed.
>>>>>
>>>>> Although I see that this series, alike Derek's, has a couple of issues:
>>>>> - only a single panel driver is updated
>>>>> - rotation is _not_ listed as supported property, in said panel
>>>>> driver device-tree bindings
>>>>>
>>>>> My personal inclination is that we should aim for a comprehensive solution:
>>>>> - wire all panel drivers, as currently documented (quick grep list below)
>>>>> - document and wire-up the lvds and boe panels - as proposed by you
>>>>> and Derek respectively
>>>>>
>>>>> HTH
>>>>> Emil
>>>>>
>>>>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
>>>>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
>>>>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
>>>>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
>>>>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
>>>>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
>>>>
>>>> Rotation is a common DT panel property that is described in the
>>>> panel-common.yaml.
>>> The property was introduced almost exclusively for tiny drm panels.
>>> Those ones are a bit different from the rest (in panel/) -
>>> MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
>>>
>>> To make it a bit better, the rotation is seemingly performed in the
>>> tiny driver itself ouch.
>>>
>>>> This property is supported by all panel bindings
>>>> because these bindings inherent the common properties from the
>>>> panel-common.yaml.
>>>>
>>> Seems like that was an unintentional change with the conversion to YAML.
>>> Beforehand only a few selected panels had rotation. Upon closer look -
>>> some panels do have follow-up fixes, to remove/limit the implicit
>>> inclusion.
>>
>> Interesting.. my understanding that the rotation property is supposed to
>> be a generic property which represents physical orientation of a display
>> panel and hence it should be applicable to all panels.
>>
> You're spot on - it is/should be a generic property.
>
> I believe that in general many panels were mounted in the correct
> orientation so the property, kernel and userspace were slow to catch
> up. In some cases panels will use flip x+y to denote 180 rotation, yet
> lacking the rotation property.
> The s6e8aa0 is an example of the last oddity. To make it better, the
> two dts in-tree always set both flip x and y.
>
> Tl;Dr: Hysterical raisins
>
>>> Sam seems like you've done most of the YAML conversion. IMHO it would
>>> make sense to revisit the patches and inherit common properties only
>>> as applicable.
It looks to me that the conversion was done properly because rotation
property was added as a common panel property from the start.
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=b60c1be747418a07fbe04f8533394a64b27b6181
>>>> I don't think that it makes sense to wire up rotation property to all
>>>> panel drivers at once because those drivers will be untested, at least I
>>>> don't know anything about those other panels and can't test them. It
>>>> will be much better to support the rotation on by as-needed basis for
>>>> each panel driver individually.
>>>
>>> How about CCing the author and reviewer asking them to test the patch?
>>> The only place where the patches might cause an issue is with tiny,
>>> although patches would still be appreciated.
>>
>> There are quite a lot of panel drivers and I'm a bit doubtful that at
>> least half of devices that use those panels have any real use for the
>> rotation property. I could write the patches.. but in the end it could
>> be a wasted effort if nobody needs it, so I'd prefer not to do it.
>
> That's why I mentioned the rotation introduction or "confusion" if I
> may. Skimming through the pre/post YAML device tree bindings and grep
> through the panel themselves will greatly reduce the list.
> In other words: if neither binding documentation/in-tree dts nor panel
> mentions rotation - omit it.
I looked through the DT bindings and only those few tiny-DRM drivers use
the DT rotation property. The parsed rotation value passed to the MIPI
DBI core where it's validated and utilized further. I don't feel that
it's worthwhile to touch that code because switching it to the common
DRM helper for reading out DT orientation won't bring any real benefits.
The samsung-s6e8aa0 panel driver indeed uses the non-standard flip-x/y
DT properties in order to achieve the 180 rotation, but I'm not sure
whether it's worthwhile to touch this driver as well because it will
require the board's DT change.
The panel's orientation could be parsed by any panel driver and then
assigned as the connector's property in order to allow userspace/FB-core
to decide what to do with the rotated display. Apparently upstream
kernel supports only that one Samsung device which has display panel
mounted upside-down and it already uses the custom DT properties for
achieving the 180 rotation. So I don't quite see any panel drivers that
instantly could benefit from using the rotation property. Perhaps I can
add the orientation support to the panel-simple driver, but will it be
useful to anyone?
^ permalink raw reply
* Re: [PATCH 5.7 000/162] 5.7.3-rc2 review
From: Jon Hunter @ 2020-06-16 20:21 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
linux-0h96xk9xTtrk1uMJSBkQmQ, shuah-DgEjT+Ai2ygdnm+yROfE0A,
patches-ssFOTAMYnuFg9hUCZPvPmw,
ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA,
lkft-triage-cunTk1MwBs8s++Sfvej+rw, stable-u79uwXL29TY76Z2rM5mHXA,
linux-tegra
In-Reply-To: <20200616172615.453746383-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
On 16/06/2020 18:27, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.7.3 release.
> There are 162 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 18 Jun 2020 17:25:43 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.7.3-rc2.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.7.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.7:
11 builds: 11 pass, 0 fail
26 boots: 26 pass, 0 fail
56 tests: 56 pass, 0 fail
Linux version: 5.7.3-rc2-g55b987cbccd9
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Cheers
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH 5.6 000/158] 5.6.19-rc2 review
From: Jon Hunter @ 2020-06-16 20:20 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel-u79uwXL29TY76Z2rM5mHXA
Cc: torvalds-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
akpm-de/tnXTf+JLsfHDXvbKv3WD2FQJk+8+b,
linux-0h96xk9xTtrk1uMJSBkQmQ, shuah-DgEjT+Ai2ygdnm+yROfE0A,
patches-ssFOTAMYnuFg9hUCZPvPmw,
ben.hutchings-4yDnlxn2s6sWdaTGBSpHTA,
lkft-triage-cunTk1MwBs8s++Sfvej+rw, stable-u79uwXL29TY76Z2rM5mHXA,
linux-tegra
In-Reply-To: <20200616172611.492085670-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>
On 16/06/2020 18:26, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.6.19 release.
> There are 158 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 18 Jun 2020 17:25:39 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.6.19-rc2.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.6.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.6:
11 builds: 11 pass, 0 fail
24 boots: 24 pass, 0 fail
56 tests: 56 pass, 0 fail
Linux version: 5.6.19-rc2-gb60e06c98873
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Cheers
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH 5.4 000/131] 5.4.47-rc2 review
From: Jon Hunter @ 2020-06-16 20:20 UTC (permalink / raw)
To: Greg Kroah-Hartman, linux-kernel
Cc: torvalds, akpm, linux, shuah, patches, ben.hutchings, lkft-triage,
stable, linux-tegra
In-Reply-To: <20200616172616.044174583@linuxfoundation.org>
On 16/06/2020 18:27, Greg Kroah-Hartman wrote:
> This is the start of the stable review cycle for the 5.4.47 release.
> There are 131 patches in this series, all will be posted as a response
> to this one. If anyone has any issues with these being applied, please
> let me know.
>
> Responses should be made by Thu, 18 Jun 2020 17:25:49 +0000.
> Anything received after that time might be too late.
>
> The whole patch series can be found in one patch at:
> https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.47-rc2.gz
> or in the git tree and branch at:
> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
> and the diffstat can be found below.
>
> thanks,
>
> greg k-h
All tests are passing for Tegra ...
Test results for stable-v5.4:
11 builds: 11 pass, 0 fail
26 boots: 26 pass, 0 fail
56 tests: 56 pass, 0 fail
Linux version: 5.4.47-rc2-ga7debb64f8b4
Boards tested: tegra124-jetson-tk1, tegra186-p2771-0000,
tegra194-p2972-0000, tegra20-ventana,
tegra210-p2371-2180, tegra210-p3450-0000,
tegra30-cardhu-a04
Cheers
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH] ASoC: tegra: Fix reference count leaks.
From: Jon Hunter @ 2020-06-16 19:42 UTC (permalink / raw)
To: wu000273-OJFnDUYgAso, kjlu-OJFnDUYgAso
Cc: Liam Girdwood, Mark Brown, Jaroslav Kysela, Takashi Iwai,
Thierry Reding, YueHaibing, Ben Dooks, Edward Cragg,
alsa-devel-K7yf7f+aM1XWsZ/bQMPhNw,
linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-kernel-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20200613204422.24484-1-wu000273-OJFnDUYgAso@public.gmane.org>
On 13/06/2020 21:44, wu000273-OJFnDUYgAso@public.gmane.org wrote:
> From: Qiushi Wu <wu000273-OJFnDUYgAso@public.gmane.org>
>
> Calling pm_runtime_get_sync increments the counter even in case of
> failure, causing incorrect ref count if pm_runtime_put is not called in
> error handling paths. Call pm_runtime_put if pm_runtime_get_sync fails.
>
> Signed-off-by: Qiushi Wu <wu000273-OJFnDUYgAso@public.gmane.org>
> ---
> sound/soc/tegra/tegra30_ahub.c | 4 +++-
> sound/soc/tegra/tegra30_i2s.c | 4 +++-
> 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/sound/soc/tegra/tegra30_ahub.c b/sound/soc/tegra/tegra30_ahub.c
> index 635eacbd28d4..156e3b9d613c 100644
> --- a/sound/soc/tegra/tegra30_ahub.c
> +++ b/sound/soc/tegra/tegra30_ahub.c
> @@ -643,8 +643,10 @@ static int tegra30_ahub_resume(struct device *dev)
> int ret;
>
> ret = pm_runtime_get_sync(dev);
> - if (ret < 0)
> + if (ret < 0) {
> + pm_runtime_put(dev);
> return ret;
> + }
> ret = regcache_sync(ahub->regmap_ahub);
> ret |= regcache_sync(ahub->regmap_apbif);
> pm_runtime_put(dev);
> diff --git a/sound/soc/tegra/tegra30_i2s.c b/sound/soc/tegra/tegra30_i2s.c
> index d59882ec48f1..db5a8587bfa4 100644
> --- a/sound/soc/tegra/tegra30_i2s.c
> +++ b/sound/soc/tegra/tegra30_i2s.c
> @@ -567,8 +567,10 @@ static int tegra30_i2s_resume(struct device *dev)
> int ret;
>
> ret = pm_runtime_get_sync(dev);
> - if (ret < 0)
> + if (ret < 0) {
> + pm_runtime_put(dev);
> return ret;
> + }
> ret = regcache_sync(i2s->regmap);
> pm_runtime_put(dev);
Thanks.
Reviewed-by: Jon Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Cheers
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH 03/73] ARM: tegra: Remove simple regulators bus
From: Jon Hunter @ 2020-06-16 19:24 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <20200616135238.3001888-4-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 16/06/2020 14:51, Thierry Reding wrote:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The standard way to do this is to list out the regulators at the top
> level. Adopt the standard way to fix validation.
>
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm/boot/dts/tegra114-dalmore.dts | 129 +++++------
> arch/arm/boot/dts/tegra114-roth.dts | 120 +++++-----
> arch/arm/boot/dts/tegra114-tn7.dts | 65 +++---
> arch/arm/boot/dts/tegra124-jetson-tk1.dts | 238 +++++++++----------
> arch/arm/boot/dts/tegra124-nyan.dtsi | 259 ++++++++++-----------
> arch/arm/boot/dts/tegra124-venice2.dts | 265 ++++++++++------------
> arch/arm/boot/dts/tegra20-harmony.dts | 121 +++++-----
> arch/arm/boot/dts/tegra20-medcom-wide.dts | 66 +++---
> arch/arm/boot/dts/tegra20-paz00.dts | 38 ++--
> arch/arm/boot/dts/tegra20-plutux.dts | 66 +++---
> arch/arm/boot/dts/tegra20-seaboard.dts | 125 +++++-----
> arch/arm/boot/dts/tegra20-tamonten.dtsi | 39 +---
> arch/arm/boot/dts/tegra20-tec.dts | 66 +++---
> arch/arm/boot/dts/tegra20-trimslice.dts | 85 +++----
> arch/arm/boot/dts/tegra20-ventana.dts | 85 +++----
> arch/arm/boot/dts/tegra30-beaver.dts | 193 ++++++++--------
> arch/arm/boot/dts/tegra30-cardhu-a02.dts | 128 +++++------
> arch/arm/boot/dts/tegra30-cardhu-a04.dts | 149 ++++++------
> arch/arm/boot/dts/tegra30-cardhu.dtsi | 261 ++++++++++-----------
> 19 files changed, 1130 insertions(+), 1368 deletions(-)
...
> diff --git a/arch/arm/boot/dts/tegra124-venice2.dts b/arch/arm/boot/dts/tegra124-venice2.dts
> index 6a7a31c831c5..effdb303c7f7 100644
> --- a/arch/arm/boot/dts/tegra124-venice2.dts
> +++ b/arch/arm/boot/dts/tegra124-venice2.dts
> @@ -1077,164 +1077,145 @@ power {
>
> panel: panel {
> compatible = "lg,lp129qe";
> -
> + power-supply = <&vdd_3v3_panel>;
> backlight = <&backlight>;
> ddc-i2c-bus = <&dpaux>;
> };
Is this meant to be in this patch?
> diff --git a/arch/arm/boot/dts/tegra20-tamonten.dtsi b/arch/arm/boot/dts/tegra20-tamonten.dtsi
> index 20137fc578b1..95e6bccdb4f6 100644
> --- a/arch/arm/boot/dts/tegra20-tamonten.dtsi
> +++ b/arch/arm/boot/dts/tegra20-tamonten.dtsi
> @@ -495,40 +495,25 @@ usb-phy@c5008000 {
> status = "okay";
> };
>
> - sdhci@c8000600 {
> + mmc@c8000600 {
> cd-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_LOW>;
> wp-gpios = <&gpio TEGRA_GPIO(H, 3) GPIO_ACTIVE_HIGH>;
> bus-width = <4>;
> status = "okay";
> };
>
> - clocks {
> - compatible = "simple-bus";
> - #address-cells = <1>;
> - #size-cells = <0>;
> -
> - clk32k_in: clock@0 {
> - compatible = "fixed-clock";
> - reg = <0>;
> - #clock-cells = <0>;
> - clock-frequency = <32768>;
> - };
> + clk32k_in: clock@0 {
> + compatible = "fixed-clock";
> + clock-frequency = <32768>;
> + #clock-cells = <0>;
> };
The above appears in to be in the wrong patch.
> diff --git a/arch/arm/boot/dts/tegra30-cardhu-a02.dts b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
> index a02ec5082287..4899e05a0d9c 100644
> --- a/arch/arm/boot/dts/tegra30-cardhu-a02.dts
> +++ b/arch/arm/boot/dts/tegra30-cardhu-a02.dts
> @@ -9,87 +9,75 @@ / {
> model = "NVIDIA Tegra30 Cardhu A02 evaluation board";
> compatible = "nvidia,cardhu-a02", "nvidia,cardhu", "nvidia,tegra30";
>
> - sdhci@78000400 {
> + mmc@78000400 {
> status = "okay";
> power-gpios = <&gpio TEGRA_GPIO(D, 4) GPIO_ACTIVE_HIGH>;
> bus-width = <4>;
> keep-power-in-suspend;
> };
And here.
> diff --git a/arch/arm/boot/dts/tegra30-cardhu-a04.dts b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
> index 9234988624ec..c1c0ca628af1 100644
> --- a/arch/arm/boot/dts/tegra30-cardhu-a04.dts
> +++ b/arch/arm/boot/dts/tegra30-cardhu-a04.dts
> @@ -11,99 +11,86 @@ / {
> model = "NVIDIA Tegra30 Cardhu A04 (A05, A06, A07) evaluation board";
> compatible = "nvidia,cardhu-a04", "nvidia,cardhu", "nvidia,tegra30";
>
> - sdhci@78000400 {
> + mmc@78000400 {
> status = "okay";
> power-gpios = <&gpio TEGRA_GPIO(D, 3) GPIO_ACTIVE_HIGH>;
> bus-width = <4>;
> keep-power-in-suspend;
> };
And here.
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH 02/73] ARM: tegra: Remove simple clocks bus
From: Jon Hunter @ 2020-06-16 19:06 UTC (permalink / raw)
To: Thierry Reding
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
In-Reply-To: <20200616135238.3001888-3-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On 16/06/2020 14:51, Thierry Reding wrote:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> The standard way to do this is to list out the clocks at the top-level.
> Adopt the standard way to fix validation.
>
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> arch/arm/boot/dts/tegra114-dalmore.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra114-roth.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra114-tn7.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra124-jetson-tk1.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra124-nyan.dtsi | 15 ++++-----------
> arch/arm/boot/dts/tegra124-venice2.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra20-harmony.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra20-paz00.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra20-seaboard.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra20-trimslice.dts | 19 ++++++-------------
> arch/arm/boot/dts/tegra20-ventana.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra30-beaver.dts | 15 ++++-----------
> arch/arm/boot/dts/tegra30-cardhu.dtsi | 15 ++++-----------
> 13 files changed, 54 insertions(+), 145 deletions(-)
...
> diff --git a/arch/arm/boot/dts/tegra20-trimslice.dts b/arch/arm/boot/dts/tegra20-trimslice.dts
> index 8debd3d3c20d..5b26482a55b7 100644
> --- a/arch/arm/boot/dts/tegra20-trimslice.dts
> +++ b/arch/arm/boot/dts/tegra20-trimslice.dts
> @@ -366,30 +366,23 @@ usb-phy@c5008000 {
> status = "okay";
> };
>
> - sdhci@c8000000 {
> + mmc@c8000000 {
> status = "okay";
> broken-cd;
> bus-width = <4>;
> };
>
> - sdhci@c8000600 {
> + mmc@c8000600 {
> status = "okay";
> cd-gpios = <&gpio TEGRA_GPIO(P, 1) GPIO_ACTIVE_LOW>;
> wp-gpios = <&gpio TEGRA_GPIO(P, 2) GPIO_ACTIVE_HIGH>;
> bus-width = <4>;
> };
I think that the above belongs in patch 13/73.
Jon
--
nvpublic
^ permalink raw reply
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Emil Velikov @ 2020-06-16 18:54 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Thierry Reding, Thomas Zimmermann, Derek Basehore, Sam Ravnborg,
Laurent Pinchart, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <646b3f37-0f72-7f3b-388f-f71dbcdd5c84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Tue, 16 Jun 2020 at 18:20, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> 16.06.2020 18:48, Emil Velikov пишет:
> > On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>
> >> 16.06.2020 01:26, Emil Velikov пишет:
> >>> Hi Dmitry,
> >>>
> >>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>>>
> >>>> Hello!
> >>>>
> >>>> This series adds 180° display plane rotation support to the NVIDIA Tegra
> >>>> DRM driver which is needed for devices that have display panel physically
> >>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
> >>>> DRM panel rotation is a new thing for a userspace, currently only
> >>>> Opentegra Xorg driver handles the rotated display panel [2], but this
> >>>> is good enough for the start.
> >>>>
> >>>> Note that later on it should be possible to implement a transparent 180°
> >>>> display rotation for Tegra DRM driver which will remove the need to have
> >>>> a bleeding edge userspace that knows how to rotate display planes and I'm
> >>>> slowly working on it. For the starter we can go with the minimal rotation
> >>>> support, so it's not a blocker.
> >>>>
> >>>> This series is based on the work that was made by Derek Basehore for the
> >>>> Mediatek driver [3], his patch is included into this patchset. I added
> >>>> my tested-by tag to the Derek's patch.
> >>>>
> >>>> Please review and apply, thanks in advance!
> >>>>
> >>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> >>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
> >>>> [3] https://lkml.org/lkml/2020/3/5/1119
> >>>>
> >>>> Changelog:
> >>>>
> >>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
> >>>> turned out to be obsolete now.
> >>>>
> >>>> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
> >>>>
> >>>> Derek Basehore (1):
> >>>> drm/panel: Add helper for reading DT rotation
> >>>>
> >>>> Dmitry Osipenko (4):
> >>>> drm/panel: lvds: Set up panel orientation
> >>>
> >>> IMHO it's perfectly reasonable to report the panel orientation to
> >>> userspace, which can apply plane rotation as needed.
> >>>
> >>> Although I see that this series, alike Derek's, has a couple of issues:
> >>> - only a single panel driver is updated
> >>> - rotation is _not_ listed as supported property, in said panel
> >>> driver device-tree bindings
> >>>
> >>> My personal inclination is that we should aim for a comprehensive solution:
> >>> - wire all panel drivers, as currently documented (quick grep list below)
> >>> - document and wire-up the lvds and boe panels - as proposed by you
> >>> and Derek respectively
> >>>
> >>> HTH
> >>> Emil
> >>>
> >>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
> >>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
> >>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
> >>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
> >>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
> >>
> >> Rotation is a common DT panel property that is described in the
> >> panel-common.yaml.
> > The property was introduced almost exclusively for tiny drm panels.
> > Those ones are a bit different from the rest (in panel/) -
> > MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
> >
> > To make it a bit better, the rotation is seemingly performed in the
> > tiny driver itself ouch.
> >
> >> This property is supported by all panel bindings
> >> because these bindings inherent the common properties from the
> >> panel-common.yaml.
> >>
> > Seems like that was an unintentional change with the conversion to YAML.
> > Beforehand only a few selected panels had rotation. Upon closer look -
> > some panels do have follow-up fixes, to remove/limit the implicit
> > inclusion.
>
> Interesting.. my understanding that the rotation property is supposed to
> be a generic property which represents physical orientation of a display
> panel and hence it should be applicable to all panels.
>
You're spot on - it is/should be a generic property.
I believe that in general many panels were mounted in the correct
orientation so the property, kernel and userspace were slow to catch
up. In some cases panels will use flip x+y to denote 180 rotation, yet
lacking the rotation property.
The s6e8aa0 is an example of the last oddity. To make it better, the
two dts in-tree always set both flip x and y.
Tl;Dr: Hysterical raisins
> > Sam seems like you've done most of the YAML conversion. IMHO it would
> > make sense to revisit the patches and inherit common properties only
> > as applicable.
> >
> >> I don't think that it makes sense to wire up rotation property to all
> >> panel drivers at once because those drivers will be untested, at least I
> >> don't know anything about those other panels and can't test them. It
> >> will be much better to support the rotation on by as-needed basis for
> >> each panel driver individually.
> >
> > How about CCing the author and reviewer asking them to test the patch?
> > The only place where the patches might cause an issue is with tiny,
> > although patches would still be appreciated.
>
> There are quite a lot of panel drivers and I'm a bit doubtful that at
> least half of devices that use those panels have any real use for the
> rotation property. I could write the patches.. but in the end it could
> be a wasted effort if nobody needs it, so I'd prefer not to do it.
That's why I mentioned the rotation introduction or "confusion" if I
may. Skimming through the pre/post YAML device tree bindings and grep
through the panel themselves will greatly reduce the list.
In other words: if neither binding documentation/in-tree dts nor panel
mentions rotation - omit it.
-Emil
^ permalink raw reply
* Re: [PATCH v3] drm/tegra: Add zpos property for cursor planes
From: Dmitry Osipenko @ 2020-06-16 18:39 UTC (permalink / raw)
To: Thierry Reding
Cc: Jon Hunter, Ville Syrjälä, Daniel Stone,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20200616181449.3147258-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
16.06.2020 21:14, Thierry Reding пишет:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes
> have a zpos property") a warning is emitted if there's a mix of planes
> with and without a zpos property.
>
> On Tegra, cursor planes are always composited on top of all other
> planes, which is why they never had a zpos property attached to them.
> However, since the composition order is fixed, this is trivial to
> remedy by simply attaching an immutable zpos property to them.
>
> v3: do not hardcode zpos for overlay planes used as cursor (Dmitry)
> v2: hardcode cursor plane zpos to 255 instead of 0 (Ville)
>
> Reported-by: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/dc.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 83f31c6e891c..04d6848d19fc 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
> }
>
> drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
> + drm_plane_create_zpos_immutable_property(&plane->base, 255);
>
> return &plane->base;
> }
>
Looks nice, thanks! Since you dropped all other zpos changes for other
planes and given that the other planes have 255 for the max zpos, what
about to set the cursor's zpos to 256?
^ permalink raw reply
* [PATCH v3] drm/tegra: Add zpos property for cursor planes
From: Thierry Reding @ 2020-06-16 18:14 UTC (permalink / raw)
To: Thierry Reding
Cc: Jon Hunter, Ville Syrjälä, Dmitry Osipenko,
Daniel Stone, dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes
have a zpos property") a warning is emitted if there's a mix of planes
with and without a zpos property.
On Tegra, cursor planes are always composited on top of all other
planes, which is why they never had a zpos property attached to them.
However, since the composition order is fixed, this is trivial to
remedy by simply attaching an immutable zpos property to them.
v3: do not hardcode zpos for overlay planes used as cursor (Dmitry)
v2: hardcode cursor plane zpos to 255 instead of 0 (Ville)
Reported-by: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
---
drivers/gpu/drm/tegra/dc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index 83f31c6e891c..04d6848d19fc 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
}
drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
+ drm_plane_create_zpos_immutable_property(&plane->base, 255);
return &plane->base;
}
--
2.24.1
^ permalink raw reply related
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Laurent Pinchart @ 2020-06-16 17:45 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Emil Velikov, Thierry Reding, Thomas Zimmermann, Derek Basehore,
Sam Ravnborg, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <646b3f37-0f72-7f3b-388f-f71dbcdd5c84-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Tue, Jun 16, 2020 at 08:20:57PM +0300, Dmitry Osipenko wrote:
> 16.06.2020 18:48, Emil Velikov пишет:
> > On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>
> >> 16.06.2020 01:26, Emil Velikov пишет:
> >>> Hi Dmitry,
> >>>
> >>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>>>
> >>>> Hello!
> >>>>
> >>>> This series adds 180° display plane rotation support to the NVIDIA Tegra
> >>>> DRM driver which is needed for devices that have display panel physically
> >>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
> >>>> DRM panel rotation is a new thing for a userspace, currently only
> >>>> Opentegra Xorg driver handles the rotated display panel [2], but this
> >>>> is good enough for the start.
> >>>>
> >>>> Note that later on it should be possible to implement a transparent 180°
> >>>> display rotation for Tegra DRM driver which will remove the need to have
> >>>> a bleeding edge userspace that knows how to rotate display planes and I'm
> >>>> slowly working on it. For the starter we can go with the minimal rotation
> >>>> support, so it's not a blocker.
> >>>>
> >>>> This series is based on the work that was made by Derek Basehore for the
> >>>> Mediatek driver [3], his patch is included into this patchset. I added
> >>>> my tested-by tag to the Derek's patch.
> >>>>
> >>>> Please review and apply, thanks in advance!
> >>>>
> >>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> >>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
> >>>> [3] https://lkml.org/lkml/2020/3/5/1119
> >>>>
> >>>> Changelog:
> >>>>
> >>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
> >>>> turned out to be obsolete now.
> >>>>
> >>>> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
> >>>>
> >>>> Derek Basehore (1):
> >>>> drm/panel: Add helper for reading DT rotation
> >>>>
> >>>> Dmitry Osipenko (4):
> >>>> drm/panel: lvds: Set up panel orientation
> >>>
> >>> IMHO it's perfectly reasonable to report the panel orientation to
> >>> userspace, which can apply plane rotation as needed.
> >>>
> >>> Although I see that this series, alike Derek's, has a couple of issues:
> >>> - only a single panel driver is updated
> >>> - rotation is _not_ listed as supported property, in said panel
> >>> driver device-tree bindings
> >>>
> >>> My personal inclination is that we should aim for a comprehensive solution:
> >>> - wire all panel drivers, as currently documented (quick grep list below)
> >>> - document and wire-up the lvds and boe panels - as proposed by you
> >>> and Derek respectively
> >>>
> >>> HTH
> >>> Emil
> >>>
> >>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
> >>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
> >>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
> >>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
> >>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
> >>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
> >>
> >> Rotation is a common DT panel property that is described in the
> >> panel-common.yaml.
> > The property was introduced almost exclusively for tiny drm panels.
> > Those ones are a bit different from the rest (in panel/) -
> > MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
> >
> > To make it a bit better, the rotation is seemingly performed in the
> > tiny driver itself ouch.
> >
> >> This property is supported by all panel bindings
> >> because these bindings inherent the common properties from the
> >> panel-common.yaml.
> >>
> > Seems like that was an unintentional change with the conversion to YAML.
> > Beforehand only a few selected panels had rotation. Upon closer look -
> > some panels do have follow-up fixes, to remove/limit the implicit
> > inclusion.
>
> Interesting.. my understanding that the rotation property is supposed to
> be a generic property which represents physical orientation of a display
> panel and hence it should be applicable to all panels.
Adding a bit more food for thoughts, the DT rotation property for camera
sensor modules has recently been documented with lots of details. See
https://lore.kernel.org/linux-media/20200509090456.3496481-3-jacopo-AW8dsiIh9cEdnm+yROfE0A@public.gmane.org/,
part of the documentation may be useful for panels.
> > Sam seems like you've done most of the YAML conversion. IMHO it would
> > make sense to revisit the patches and inherit common properties only
> > as applicable.
> >
> >> I don't think that it makes sense to wire up rotation property to all
> >> panel drivers at once because those drivers will be untested, at least I
> >> don't know anything about those other panels and can't test them. It
> >> will be much better to support the rotation on by as-needed basis for
> >> each panel driver individually.
> >
> > How about CCing the author and reviewer asking them to test the patch?
> > The only place where the patches might cause an issue is with tiny,
> > although patches would still be appreciated.
>
> There are quite a lot of panel drivers and I'm a bit doubtful that at
> least half of devices that use those panels have any real use for the
> rotation property. I could write the patches.. but in the end it could
> be a wasted effort if nobody needs it, so I'd prefer not to do it.
--
Regards,
Laurent Pinchart
^ permalink raw reply
* Re: [PATCH] Input: document inhibiting
From: Randy Dunlap @ 2020-06-16 17:38 UTC (permalink / raw)
To: Andrzej Pietrasiewicz, linux-pm, linux-acpi, linux-kernel,
linux-iio, linux-arm-kernel, linux-samsung-soc, linux-input,
linux-tegra, patches, ibm-acpi-devel, platform-driver-x86
Cc: kernel, Nick Dyer, Laxman Dewangan, Peter Meerwald-Stadler,
Peter Hutterer, Fabio Estevam, Lars-Peter Clausen,
Krzysztof Kozlowski, Jonathan Hunter, Kukjin Kim, NXP Linux Team,
Sylvain Lemieux, Len Brown, Michael Hennerich, Sascha Hauer,
Henrique de Moraes Holschuh, Vladimir Zapolskiy, Hans de Goede,
Michał Mirosław, Barry Song, Dmitry Torokhov,
Rafael J . Wysocki
In-Reply-To: <20200616172909.21625-1-andrzej.p@collabora.com>
On 6/16/20 10:29 AM, Andrzej Pietrasiewicz wrote:
> Document inhibiting input devices and its relation to being
> a wakeup source.
>
> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
> ---
Hi,
I have some editorial comments. Please see below.
> @Hans, @Dmitry,
>
> My fist attempt at documenting inhibiting. Kindly look at it to see if I haven't got anything
> wrong.
>
> Andrzej
>
> Documentation/input/input-programming.rst | 36 +++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
>
> diff --git a/Documentation/input/input-programming.rst b/Documentation/input/input-programming.rst
> index 45a4c6e05e39..0cd1ad4504fb 100644
> --- a/Documentation/input/input-programming.rst
> +++ b/Documentation/input/input-programming.rst
> @@ -164,6 +164,42 @@ disconnects. Calls to both callbacks are serialized.
> The open() callback should return a 0 in case of success or any nonzero value
> in case of failure. The close() callback (which is void) must always succeed.
>
> +Inhibiting input devices
> +~~~~~~~~~~~~~~~~~~~~~~~~
> +
> +Inhibiting a device means ignoring input events from it. As such it is about maintaining
> +relationships with input handlers - either an already existing relationships, or
> +relationships to be established while the device is in inhibited state.
> +
> +If a device is inhibited, no input handler will receive events from it.
> +
> +The fact that nobody wants events from the device is exploited further, by calling device's
> +close() (if there are users) and open() (if there are users) on inhibit and uninhibit
> +operations, respectively. Indeed, the meaning of close() is to stop providing events
> +to the input core and that of open() is to start providing events to the input core.
> +
> +Inhibiting and uninhibiting is orthogonal to opening and closing the device by input
are
> +handlers. Userspace might want to inhibit a device in anticipation before any handler is
> +positively matched against it.
> +
> +Inhibiting and uninhibiting is orthogonal to device's being a wakeup source, too. Being a
are
> +wakeup source plays a role when the system is sleeping, not when the system is operating.
> +How drivers should program their interaction between inhibiting, sleeping and being a wakeup
> +source is driver-specific.
> +
> +Taking the analogy with the network devices - bringing a network interface down doesn't mean
> +that it should be impossible to be wake the system up on LAN through this interface. So, there
> +may be input drivers which should be considered wakeup sources even when inhibited. Actually,
> +in many i2c input devices their interrupt is declared a wakeup interrupt and its handling
I2C
> +happens in driver's core, which is not aware of input-specific inhibit (nor should it be).
> +Composite devices containing several interfaces can be inhibited on a per-interface basis and
> +e.g. inhibiting one interface shouldn't affect the device's capability of being a wakeup source.
> +
> +If a device is to be considered a wakeup source while inhibited, special care must be taken when
> +programming its suspend(), as it might need to call device's open(). Depending on what close()
> +means for the device in question not opening() it before going to sleep might make it impossible
in question, not
> +to provide any wakeup events. The device is going to sleep anyway.
> +
> Basic event types
> ~~~~~~~~~~~~~~~~~
>
>
thanks for documentation.
--
~Randy
^ permalink raw reply
* [PATCH] Input: document inhibiting
From: Andrzej Pietrasiewicz @ 2020-06-16 17:29 UTC (permalink / raw)
To: linux-pm, linux-acpi, linux-kernel, linux-iio, linux-arm-kernel,
linux-samsung-soc, linux-input, linux-tegra, patches,
ibm-acpi-devel, platform-driver-x86
Cc: Rafael J . Wysocki, Len Brown, Jonathan Cameron, Hartmut Knaack,
Lars-Peter Clausen, Peter Meerwald-Stadler, Kukjin Kim,
Krzysztof Kozlowski, Dmitry Torokhov, Shawn Guo, Sascha Hauer,
Pengutronix Kernel Team, Fabio Estevam, NXP Linux Team,
Vladimir Zapolskiy, Sylvain Lemieux, Laxman Dewangan,
Thierry Reding, Jonathan Hunter, Barry
In-Reply-To: <40988408-8f36-3a52-6439-34084de6b129@redhat.com>
Document inhibiting input devices and its relation to being
a wakeup source.
Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@collabora.com>
---
@Hans, @Dmitry,
My fist attempt at documenting inhibiting. Kindly look at it to see if I haven't got anything
wrong.
Andrzej
Documentation/input/input-programming.rst | 36 +++++++++++++++++++++++
1 file changed, 36 insertions(+)
diff --git a/Documentation/input/input-programming.rst b/Documentation/input/input-programming.rst
index 45a4c6e05e39..0cd1ad4504fb 100644
--- a/Documentation/input/input-programming.rst
+++ b/Documentation/input/input-programming.rst
@@ -164,6 +164,42 @@ disconnects. Calls to both callbacks are serialized.
The open() callback should return a 0 in case of success or any nonzero value
in case of failure. The close() callback (which is void) must always succeed.
+Inhibiting input devices
+~~~~~~~~~~~~~~~~~~~~~~~~
+
+Inhibiting a device means ignoring input events from it. As such it is about maintaining
+relationships with input handlers - either an already existing relationships, or
+relationships to be established while the device is in inhibited state.
+
+If a device is inhibited, no input handler will receive events from it.
+
+The fact that nobody wants events from the device is exploited further, by calling device's
+close() (if there are users) and open() (if there are users) on inhibit and uninhibit
+operations, respectively. Indeed, the meaning of close() is to stop providing events
+to the input core and that of open() is to start providing events to the input core.
+
+Inhibiting and uninhibiting is orthogonal to opening and closing the device by input
+handlers. Userspace might want to inhibit a device in anticipation before any handler is
+positively matched against it.
+
+Inhibiting and uninhibiting is orthogonal to device's being a wakeup source, too. Being a
+wakeup source plays a role when the system is sleeping, not when the system is operating.
+How drivers should program their interaction between inhibiting, sleeping and being a wakeup
+source is driver-specific.
+
+Taking the analogy with the network devices - bringing a network interface down doesn't mean
+that it should be impossible to be wake the system up on LAN through this interface. So, there
+may be input drivers which should be considered wakeup sources even when inhibited. Actually,
+in many i2c input devices their interrupt is declared a wakeup interrupt and its handling
+happens in driver's core, which is not aware of input-specific inhibit (nor should it be).
+Composite devices containing several interfaces can be inhibited on a per-interface basis and
+e.g. inhibiting one interface shouldn't affect the device's capability of being a wakeup source.
+
+If a device is to be considered a wakeup source while inhibited, special care must be taken when
+programming its suspend(), as it might need to call device's open(). Depending on what close()
+means for the device in question not opening() it before going to sleep might make it impossible
+to provide any wakeup events. The device is going to sleep anyway.
+
Basic event types
~~~~~~~~~~~~~~~~~
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Dmitry Osipenko @ 2020-06-16 17:20 UTC (permalink / raw)
To: Emil Velikov
Cc: Thierry Reding, Thomas Zimmermann, Derek Basehore, Sam Ravnborg,
Laurent Pinchart, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <CACvgo50oSMbgXw1vHwVT4hhGe6g3YzKQEohCLJdfDq+0UaN1jw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
16.06.2020 18:48, Emil Velikov пишет:
> On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>
>> 16.06.2020 01:26, Emil Velikov пишет:
>>> Hi Dmitry,
>>>
>>> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>>>>
>>>> Hello!
>>>>
>>>> This series adds 180° display plane rotation support to the NVIDIA Tegra
>>>> DRM driver which is needed for devices that have display panel physically
>>>> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
>>>> DRM panel rotation is a new thing for a userspace, currently only
>>>> Opentegra Xorg driver handles the rotated display panel [2], but this
>>>> is good enough for the start.
>>>>
>>>> Note that later on it should be possible to implement a transparent 180°
>>>> display rotation for Tegra DRM driver which will remove the need to have
>>>> a bleeding edge userspace that knows how to rotate display planes and I'm
>>>> slowly working on it. For the starter we can go with the minimal rotation
>>>> support, so it's not a blocker.
>>>>
>>>> This series is based on the work that was made by Derek Basehore for the
>>>> Mediatek driver [3], his patch is included into this patchset. I added
>>>> my tested-by tag to the Derek's patch.
>>>>
>>>> Please review and apply, thanks in advance!
>>>>
>>>> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>>>> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
>>>> [3] https://lkml.org/lkml/2020/3/5/1119
>>>>
>>>> Changelog:
>>>>
>>>> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
>>>> turned out to be obsolete now.
>>>>
>>>> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
>>>>
>>>> Derek Basehore (1):
>>>> drm/panel: Add helper for reading DT rotation
>>>>
>>>> Dmitry Osipenko (4):
>>>> drm/panel: lvds: Set up panel orientation
>>>
>>> IMHO it's perfectly reasonable to report the panel orientation to
>>> userspace, which can apply plane rotation as needed.
>>>
>>> Although I see that this series, alike Derek's, has a couple of issues:
>>> - only a single panel driver is updated
>>> - rotation is _not_ listed as supported property, in said panel
>>> driver device-tree bindings
>>>
>>> My personal inclination is that we should aim for a comprehensive solution:
>>> - wire all panel drivers, as currently documented (quick grep list below)
>>> - document and wire-up the lvds and boe panels - as proposed by you
>>> and Derek respectively
>>>
>>> HTH
>>> Emil
>>>
>>> Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
>>> Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
>>> Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
>>> Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
>>> Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
>>> Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
>>> Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
>>> Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
>>
>> Rotation is a common DT panel property that is described in the
>> panel-common.yaml.
> The property was introduced almost exclusively for tiny drm panels.
> Those ones are a bit different from the rest (in panel/) -
> MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
>
> To make it a bit better, the rotation is seemingly performed in the
> tiny driver itself ouch.
>
>> This property is supported by all panel bindings
>> because these bindings inherent the common properties from the
>> panel-common.yaml.
>>
> Seems like that was an unintentional change with the conversion to YAML.
> Beforehand only a few selected panels had rotation. Upon closer look -
> some panels do have follow-up fixes, to remove/limit the implicit
> inclusion.
Interesting.. my understanding that the rotation property is supposed to
be a generic property which represents physical orientation of a display
panel and hence it should be applicable to all panels.
> Sam seems like you've done most of the YAML conversion. IMHO it would
> make sense to revisit the patches and inherit common properties only
> as applicable.
>
>> I don't think that it makes sense to wire up rotation property to all
>> panel drivers at once because those drivers will be untested, at least I
>> don't know anything about those other panels and can't test them. It
>> will be much better to support the rotation on by as-needed basis for
>> each panel driver individually.
>
> How about CCing the author and reviewer asking them to test the patch?
> The only place where the patches might cause an issue is with tiny,
> although patches would still be appreciated.
There are quite a lot of panel drivers and I'm a bit doubtful that at
least half of devices that use those panels have any real use for the
rotation property. I could write the patches.. but in the end it could
be a wasted effort if nobody needs it, so I'd prefer not to do it.
^ permalink raw reply
* Re: [PATCH v2] drm/tegra: Add zpos property for cursor planes
From: Dmitry Osipenko @ 2020-06-16 16:38 UTC (permalink / raw)
To: Thierry Reding
Cc: Jon Hunter, Ville Syrjälä, Daniel Stone,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20200616161341.GA3009091@ulmo>
16.06.2020 19:13, Thierry Reding пишет:
> On Tue, Jun 16, 2020 at 06:54:35PM +0300, Dmitry Osipenko wrote:
>> 16.06.2020 15:17, Thierry Reding пишет:
>>> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>>
>>> As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes
>>> have a zpos property") a warning is emitted if there's a mix of planes
>>> with and without a zpos property.
>>>
>>> On Tegra, cursor planes are always composited on top of all other
>>> planes, which is why they never had a zpos property attached to them.
>>> However, since the composition order is fixed, this is trivial to
>>> remedy by simply attaching an immutable zpos property to them.
>>>
>>> Changes in v2:
>>> - hardcode cursor plane zpos to 255 instead of 0 (Ville)
>>>
>>> Reported-by: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>>> ---
>>> drivers/gpu/drm/tegra/dc.c | 9 +++++++--
>>> drivers/gpu/drm/tegra/hub.c | 2 +-
>>> 2 files changed, 8 insertions(+), 3 deletions(-)
>>>
>>> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
>>> index 83f31c6e891c..85408eed4685 100644
>>> --- a/drivers/gpu/drm/tegra/dc.c
>>> +++ b/drivers/gpu/drm/tegra/dc.c
>>> @@ -787,7 +787,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
>>> }
>>>
>>> drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
>>> - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
>>> + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
>>>
>>> err = drm_plane_create_rotation_property(&plane->base,
>>> DRM_MODE_ROTATE_0,
>>> @@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
>>> }
>>>
>>> drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
>>> + drm_plane_create_zpos_immutable_property(&plane->base, 255);
>>>
>>> return &plane->base;
>>> }
>>> @@ -1074,7 +1075,11 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
>>> }
>>>
>>> drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
>>> - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
>>> +
>>> + if (!cursor)
>>> + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
>>> + else
>>> + drm_plane_create_zpos_immutable_property(&plane->base, 255);
>>
>> On T20/30 we're are setting the plane's type to CURSOR because we want
>> to use one overlay plane for the mouse cursor. Nevertheless, it's still
>> a generic overlay plane that can change its z-position, and thus, it's
>> wrong to make zpos immutable here.
>
> But it doesn't really make sense for the cursor plane to change z-
> position, even if it's technically possible. We do want it to always be
> on top anyway. Doing it this way makes the cursor behave the same way
> irrespective of the Tegra generation that we're running on.
>
> Yes, that may not fully expose the capabilities of the hardware, but we
> are already restricting the hardware capabilities by exposing the
> overlay plane as a cursor plane in the first place.
Userspace is free to reuse cursor's plane for different purposes. For
example, cursor may be not needed at all and then cursor plane could be
used as a regular overlay plane.
The patch's title and commit's description says "*Add* zpos property for
cursor planes", but in this case zpos property already existed before
this patch, hence you're changing the old behavior here.
^ permalink raw reply
* Re: [PATCH v2] drm/tegra: Add zpos property for cursor planes
From: Thierry Reding @ 2020-06-16 16:13 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Jon Hunter, Ville Syrjälä, Daniel Stone,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <c34c97ab-08de-341e-05e5-77e2651d956f-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 3238 bytes --]
On Tue, Jun 16, 2020 at 06:54:35PM +0300, Dmitry Osipenko wrote:
> 16.06.2020 15:17, Thierry Reding пишет:
> > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes
> > have a zpos property") a warning is emitted if there's a mix of planes
> > with and without a zpos property.
> >
> > On Tegra, cursor planes are always composited on top of all other
> > planes, which is why they never had a zpos property attached to them.
> > However, since the composition order is fixed, this is trivial to
> > remedy by simply attaching an immutable zpos property to them.
> >
> > Changes in v2:
> > - hardcode cursor plane zpos to 255 instead of 0 (Ville)
> >
> > Reported-by: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> > drivers/gpu/drm/tegra/dc.c | 9 +++++++--
> > drivers/gpu/drm/tegra/hub.c | 2 +-
> > 2 files changed, 8 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> > index 83f31c6e891c..85408eed4685 100644
> > --- a/drivers/gpu/drm/tegra/dc.c
> > +++ b/drivers/gpu/drm/tegra/dc.c
> > @@ -787,7 +787,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
> > }
> >
> > drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
> > - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
> > + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
> >
> > err = drm_plane_create_rotation_property(&plane->base,
> > DRM_MODE_ROTATE_0,
> > @@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
> > }
> >
> > drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
> > + drm_plane_create_zpos_immutable_property(&plane->base, 255);
> >
> > return &plane->base;
> > }
> > @@ -1074,7 +1075,11 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
> > }
> >
> > drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
> > - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
> > +
> > + if (!cursor)
> > + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
> > + else
> > + drm_plane_create_zpos_immutable_property(&plane->base, 255);
>
> On T20/30 we're are setting the plane's type to CURSOR because we want
> to use one overlay plane for the mouse cursor. Nevertheless, it's still
> a generic overlay plane that can change its z-position, and thus, it's
> wrong to make zpos immutable here.
But it doesn't really make sense for the cursor plane to change z-
position, even if it's technically possible. We do want it to always be
on top anyway. Doing it this way makes the cursor behave the same way
irrespective of the Tegra generation that we're running on.
Yes, that may not fully expose the capabilities of the hardware, but we
are already restricting the hardware capabilities by exposing the
overlay plane as a cursor plane in the first place.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH v2] drm/tegra: Add zpos property for cursor planes
From: Dmitry Osipenko @ 2020-06-16 15:54 UTC (permalink / raw)
To: Thierry Reding
Cc: Jon Hunter, Ville Syrjälä, Daniel Stone,
dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <20200616121713.2983627-1-thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
16.06.2020 15:17, Thierry Reding пишет:
> From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
>
> As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes
> have a zpos property") a warning is emitted if there's a mix of planes
> with and without a zpos property.
>
> On Tegra, cursor planes are always composited on top of all other
> planes, which is why they never had a zpos property attached to them.
> However, since the composition order is fixed, this is trivial to
> remedy by simply attaching an immutable zpos property to them.
>
> Changes in v2:
> - hardcode cursor plane zpos to 255 instead of 0 (Ville)
>
> Reported-by: Jonathan Hunter <jonathanh-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> ---
> drivers/gpu/drm/tegra/dc.c | 9 +++++++--
> drivers/gpu/drm/tegra/hub.c | 2 +-
> 2 files changed, 8 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
> index 83f31c6e891c..85408eed4685 100644
> --- a/drivers/gpu/drm/tegra/dc.c
> +++ b/drivers/gpu/drm/tegra/dc.c
> @@ -787,7 +787,7 @@ static struct drm_plane *tegra_primary_plane_create(struct drm_device *drm,
> }
>
> drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
> - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
> + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
>
> err = drm_plane_create_rotation_property(&plane->base,
> DRM_MODE_ROTATE_0,
> @@ -957,6 +957,7 @@ static struct drm_plane *tegra_dc_cursor_plane_create(struct drm_device *drm,
> }
>
> drm_plane_helper_add(&plane->base, &tegra_cursor_plane_helper_funcs);
> + drm_plane_create_zpos_immutable_property(&plane->base, 255);
>
> return &plane->base;
> }
> @@ -1074,7 +1075,11 @@ static struct drm_plane *tegra_dc_overlay_plane_create(struct drm_device *drm,
> }
>
> drm_plane_helper_add(&plane->base, &tegra_plane_helper_funcs);
> - drm_plane_create_zpos_property(&plane->base, plane->index, 0, 255);
> +
> + if (!cursor)
> + drm_plane_create_zpos_property(&plane->base, plane->index, 0, 254);
> + else
> + drm_plane_create_zpos_immutable_property(&plane->base, 255);
On T20/30 we're are setting the plane's type to CURSOR because we want
to use one overlay plane for the mouse cursor. Nevertheless, it's still
a generic overlay plane that can change its z-position, and thus, it's
wrong to make zpos immutable here.
^ permalink raw reply
* Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM
From: Emil Velikov @ 2020-06-16 15:48 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Thierry Reding, Thomas Zimmermann, Derek Basehore, Sam Ravnborg,
Laurent Pinchart, Sean Paul, linux-tegra-u79uwXL29TY76Z2rM5mHXA,
Linux-Kernel@Vger. Kernel. Org, ML dri-devel
In-Reply-To: <8f789ef5-bebf-c869-784d-afda70fc1fb8-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
On Tue, 16 Jun 2020 at 12:40, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
>
> 16.06.2020 01:26, Emil Velikov пишет:
> > Hi Dmitry,
> >
> > On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko <digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >>
> >> Hello!
> >>
> >> This series adds 180° display plane rotation support to the NVIDIA Tegra
> >> DRM driver which is needed for devices that have display panel physically
> >> mounted upside-down, like Nexus 7 tablet device for example [1]. Since
> >> DRM panel rotation is a new thing for a userspace, currently only
> >> Opentegra Xorg driver handles the rotated display panel [2], but this
> >> is good enough for the start.
> >>
> >> Note that later on it should be possible to implement a transparent 180°
> >> display rotation for Tegra DRM driver which will remove the need to have
> >> a bleeding edge userspace that knows how to rotate display planes and I'm
> >> slowly working on it. For the starter we can go with the minimal rotation
> >> support, so it's not a blocker.
> >>
> >> This series is based on the work that was made by Derek Basehore for the
> >> Mediatek driver [3], his patch is included into this patchset. I added
> >> my tested-by tag to the Derek's patch.
> >>
> >> Please review and apply, thanks in advance!
> >>
> >> [1] https://patchwork.ozlabs.org/project/linux-tegra/patch/20200607154327.18589-3-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
> >> [2] https://github.com/grate-driver/xf86-video-opentegra/commit/28eb20a3959bbe5bc3a3b67e55977093fd5114ca
> >> [3] https://lkml.org/lkml/2020/3/5/1119
> >>
> >> Changelog:
> >>
> >> v2: - Dropped "drm/panel: Set display info in panel attach" patch, which
> >> turned out to be obsolete now.
> >>
> >> - Renamed the cover-latter, hopefully this will fix the bouncing emails.
> >>
> >> Derek Basehore (1):
> >> drm/panel: Add helper for reading DT rotation
> >>
> >> Dmitry Osipenko (4):
> >> drm/panel: lvds: Set up panel orientation
> >
> > IMHO it's perfectly reasonable to report the panel orientation to
> > userspace, which can apply plane rotation as needed.
> >
> > Although I see that this series, alike Derek's, has a couple of issues:
> > - only a single panel driver is updated
> > - rotation is _not_ listed as supported property, in said panel
> > driver device-tree bindings
> >
> > My personal inclination is that we should aim for a comprehensive solution:
> > - wire all panel drivers, as currently documented (quick grep list below)
> > - document and wire-up the lvds and boe panels - as proposed by you
> > and Derek respectively
> >
> > HTH
> > Emil
> >
> > Documentation/devicetree/bindings/display/himax,hx8357d.txt:2
> > Documentation/devicetree/bindings/display/ilitek,ili9225.txt:2
> > Documentation/devicetree/bindings/display/ilitek,ili9341.txt:2
> > Documentation/devicetree/bindings/display/ilitek,ili9486.yaml:2
> > Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt:2
> > Documentation/devicetree/bindings/display/panel/panel-common.yaml:2
> > Documentation/devicetree/bindings/display/sitronix,st7586.txt:1
> > Documentation/devicetree/bindings/display/sitronix,st7735r.yaml:2
>
> Rotation is a common DT panel property that is described in the
> panel-common.yaml.
The property was introduced almost exclusively for tiny drm panels.
Those ones are a bit different from the rest (in panel/) -
MIPI-DBI/SPI w/o (not connected at least) an actual GPU.
To make it a bit better, the rotation is seemingly performed in the
tiny driver itself ouch.
> This property is supported by all panel bindings
> because these bindings inherent the common properties from the
> panel-common.yaml.
>
Seems like that was an unintentional change with the conversion to YAML.
Beforehand only a few selected panels had rotation. Upon closer look -
some panels do have follow-up fixes, to remove/limit the implicit
inclusion.
Sam seems like you've done most of the YAML conversion. IMHO it would
make sense to revisit the patches and inherit common properties only
as applicable.
> I don't think that it makes sense to wire up rotation property to all
> panel drivers at once because those drivers will be untested, at least I
> don't know anything about those other panels and can't test them. It
> will be much better to support the rotation on by as-needed basis for
> each panel driver individually.
How about CCing the author and reviewer asking them to test the patch?
The only place where the patches might cause an issue is with tiny,
although patches would still be appreciated.
-Emil
^ permalink raw reply
* Re: [PATCH 07/38] dt-bindings: display: tegra: Convert to json-schema
From: Thierry Reding @ 2020-06-16 14:51 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <b20cede8-a9ee-c70d-913d-d0a05d7826b0-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1584 bytes --]
On Fri, Jun 12, 2020 at 06:54:45PM +0300, Dmitry Osipenko wrote:
> 12.06.2020 17:18, Thierry Reding пишет:
> > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > Convert the Tegra host1x controller bindings from the free-form text
> > format to json-schema.
> >
> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> ...
> > + memory-controllers:
> > + $ref: /schemas/types.yaml#/definitions/phandle-array
> > +
> > +required:
> > + - compatible
> > + - interrupts
> > + - interrupt-names
> > + - '#address-cells'
> > + - '#size-cells'
> > + - ranges
> > + - reg
> > + - clocks
> > + - clock-names
> > + - resets
> > + - reset-names
>
> This memory-controllers property didn't exist before the conversion. So
> this is not a pure conversion, which makes it a bit difficult to review
> the changes. Could you please factor out the addition of new properties
> into a separate patch?
The memory-controllers property was from an earlier draft of this series
and is no longer needed. I'll remove it.
In my opinion, these schema conversion patches are difficult to review
in general, especially the likes of this one for host1x because they are
fairly complex to begin with. All existing Tegra-based device trees do
pass validation (although there's a small patch needed to support the
unevaluatedProperties keyword that's new in json-schema draft-08), which
gives me some confidence that they are at least correct from a content
point of view.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH 08/38] dt-bindings: display: tegra: Document interconnect paths
From: Thierry Reding @ 2020-06-16 14:47 UTC (permalink / raw)
To: Dmitry Osipenko
Cc: Rob Herring, devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-tegra-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <82888e53-c539-7d61-666d-bd6dbc494bfe-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 4836 bytes --]
On Fri, Jun 12, 2020 at 06:52:44PM +0300, Dmitry Osipenko wrote:
> Hello Thierry,
>
> 12.06.2020 17:18, Thierry Reding пишет:
> > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> Commit description is missing, checkpatch should warn about it.
>
> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> > .../display/tegra/nvidia,tegra20-host1x.yaml | 52 ++++++++++++++++---
> > 1 file changed, 46 insertions(+), 6 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
> > index 3347e1b3c8f0..684fe25641f1 100644
> > --- a/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
> > +++ b/Documentation/devicetree/bindings/display/tegra/nvidia,tegra20-host1x.yaml
> > @@ -97,8 +97,17 @@ properties:
> > iommus:
> > $ref: "/schemas/iommu/iommu.yaml#/properties/iommus"
> >
> > - memory-controllers:
> > - $ref: /schemas/types.yaml#/definitions/phandle-array
>
> Why memory-controllers property is removed?
Because it was accidentally added in patch 7. This is leftover from an
earlier set of patches.
> > + interconnects:
> > + description: Description of the interconnect paths for the host1x
> > + controller; see ../interconnect/interconnect.txt for details.
> > + items:
> > + - description: memory read client for host1x
> > +
> > + interconnect-names:
> > + description: A list of names identifying each entry listed in the
> > + "interconnects" property.
> > + items:
> > + - const: dma-mem # read
>
> Please notice that Host1x has two memory clients: one for DMA engine and
> second I don't know what's for, maybe for indirect memory accesses. Why
> you skipped the second path?
I'm primarily targetting Tegra186 and Tegra194 with these patches
because we need the interconnects properties on those platforms in order
to correctly set the DMA masks at a global scope. For Tegra186 and
Tegra194 I can only see a single memory client for host1x.
Looking at the register documentation, the host1xw and host1xr clients
do exist on Tegra210 and earlier and they are used for indirect writes
and reads, respectively.
I don't think we use indirect reads/writes, so we can probably do
without the corresponding memory clients. Alternatively we could
conditionally add them on Tegra210 and earlier.
Thierry
> > required:
> > - compatible
> > @@ -489,6 +498,26 @@ allOf:
> > iommus:
> > $ref: "/schemas/types.yaml#/definitions/phandle-array"
> >
> > + #interconnects:
> > + # items:
> > + # - description: memory read client for window A
> > + # - description: memory read client for window B
> > + # - description: memory read client for window C
> > + # - description: memory read client for cursor
> > + # # disp only
> > + # - description: memory read client for window T
> > + # - description: memory read client for window D
> > +
> > + #interconnect-names:
> > + # items:
> > + # - const: wina
> > + # - const: winb
> > + # - const: winc
> > + # - const: cursor
> > + # # disp only
> > + # - const: wint
> > + # - const: wind
>
> Is this really intended to be commented out? Looks like this is an
> unfinished patch.
I started adding this after finishing Tegra186 and Tegra194, but then I
ran into various other issues and wanted to do this step by step, so I
plan to go back to Tegra210 and earlier later on and stub them out.
However, since I had already done the research I wanted to leave these
in here for later reference, so I didn't have to go back and look this
up again.
> In the patch [1] I used memory client names for the interconnect paths.
> I like yours variant of the naming, it is more intuitive.
I only noticed after posting this series that you had sent out the
series for interconnects and that it conflicted in the bindings.
But yeah, I do also like the contextual names better because they are
more intuitive.
> [1]
> https://patchwork.ozlabs.org/project/linux-tegra/patch/20200609131404.17523-23-digetx-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org/
>
> I'll rebase my series on top of yours patches once you'll get them into
> linux-next. Looking forward to v2!
There's quite a bit to review here, but I also have a couple of patches
that depend on these, so yeah, it'd be great if this could go in sooner
rather than later.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
* Re: [PATCH v7 2/6] drm/of: Make drm_of_find_panel_or_bridge() to check graph's presence
From: Dmitry Osipenko @ 2020-06-16 14:42 UTC (permalink / raw)
To: Laurent Pinchart
Cc: Thierry Reding, Sam Ravnborg, Rob Herring, Frank Rowand,
dri-devel, linux-tegra, devicetree, linux-kernel
In-Reply-To: <20200616012652.GG1629@pendragon.ideasonboard.com>
16.06.2020 04:26, Laurent Pinchart пишет:
> Hi Dmitry,
>
> Thank you for the patch.
>
> On Sun, Jun 14, 2020 at 08:22:30PM +0300, Dmitry Osipenko wrote:
>> When graph isn't defined in a device-tree, the of_graph_get_remote_node()
>> prints a noisy error message, telling that port node is not found. This is
>> undesirable behaviour in our case because absence of a panel/bridge graph
>> is a valid case. Let's check presence of the local port in a device-tree
>> before proceeding with parsing the graph.
>>
>> Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
>> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
>> ---
>> drivers/gpu/drm/drm_of.c | 13 ++++++++++++-
>> 1 file changed, 12 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c
>> index b50b44e76279..e0652c38f357 100644
>> --- a/drivers/gpu/drm/drm_of.c
>> +++ b/drivers/gpu/drm/drm_of.c
>> @@ -239,13 +239,24 @@ int drm_of_find_panel_or_bridge(const struct device_node *np,
>> struct drm_bridge **bridge)
>> {
>> int ret = -EPROBE_DEFER;
>> - struct device_node *remote;
>> + struct device_node *local, *remote;
>>
>> if (!panel && !bridge)
>> return -EINVAL;
>> if (panel)
>> *panel = NULL;
>>
>> + /*
>> + * of_graph_get_remote_node() produces a noisy error message if port
>> + * node isn't found and the absence of the port is a legit case here,
>> + * so at first we silently check presence of the local port.
>> + */
>> + local = of_graph_get_local_port(np);
>> + if (!local)
>> + return -ENODEV;
>> +
>> + of_node_put(local);
>> +
>
> The code looks fine, but you may want to take into account my proposal
> in 1/7 to instead create a of_graph_has_port() function. The could would
> be simpler here.
>
>> remote = of_graph_get_remote_node(np, port, endpoint);
>> if (!remote)
>> return -ENODEV;
>
I like yours proposals and will prepare v8 based on them, thanks!
^ permalink raw reply
* Re: [PATCH 30/38] dt-bindings: panel: Allow reg property for DSI panels
From: Thierry Reding @ 2020-06-16 14:35 UTC (permalink / raw)
To: Rob Herring; +Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, linux-tegra
In-Reply-To: <CAL_JsqL4wMN3+cd=WEUegGU9xwpj9DTXeKT6EwTRfqiS+y6fMw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]
On Fri, Jun 12, 2020 at 08:29:35AM -0600, Rob Herring wrote:
> On Fri, Jun 12, 2020 at 8:20 AM Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:
> >
> > From: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> >
> > For DSI panels the "reg" property is needed to represent the virtual
> > channel of the given panel.
> >
> > Signed-off-by: Thierry Reding <treding-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org>
> > ---
> > .../devicetree/bindings/display/panel/panel-simple.yaml | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > index d6cca1479633..34fe3d42b829 100644
> > --- a/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > +++ b/Documentation/devicetree/bindings/display/panel/panel-simple.yaml
> > @@ -267,6 +267,9 @@ properties:
> > # Winstar Display Corporation 3.5" QVGA (320x240) TFT LCD panel
> > - winstar,wf35ltiacd
> >
> > + reg:
> > + description: virtual channel for DSI panels
> > +
>
> panel-simple-dsi.yaml?
Heh... I had completely missed that. I've now replaced this patch with
one that moves the lg,lh500wx1-sd03 compatible string to the DSI schema.
Thierry
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox