Re: BUG: iio: mpu3050: Wrong temperature scale

2021-04-20 Thread Dmitry Osipenko
19.04.2021 13:07, Linus Walleij пишет: > On Mon, Apr 19, 2021 at 8:06 AM Dmitry Osipenko wrote: > >> The driver uses >> (x+23000)/280 formula for the conversion of raw temperature value, which >> gives 82C for x=0, thus apparently formula is wrong because x=5 >>

BUG: iio: mpu3050: Wrong temperature scale

2021-04-19 Thread Dmitry Osipenko
Hello, Svyatoslav and me found that the MPU3050 IIO driver reports temperature that is x10 larger than it should be on Asus Transformer TF201 and Acer A500 tablet devices running mainline kernel. The driver uses (x+23000)/280 formula for the conversion of raw temperature value, which gives 82C

Re: [PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-04-09 Thread Dmitry Osipenko
08.04.2021 17:07, Dmitry Osipenko пишет: >> Whatever happened to the idea of creating identity mappings based on the >> obscure tegra_fb_mem (or whatever it was called) command-line option? Is >> that command-line not universally passed to the kernel from bootloaders >>

Re: [PATCH v2] ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present

2021-04-08 Thread Dmitry Osipenko
epare(tegra->sata_clk); > - tegra_powergate_power_off(TEGRA_POWERGATE_SATA); > + if (!tegra->pdev->dev.pm_domain) > + tegra_powergate_power_off(TEGRA_POWERGATE_SATA); > > regulator_bulk_disable(tegra->soc->num_supplies, tegra->supplies); > } > Looks good, thank you. Reviewed-by: Dmitry Osipenko

Re: [PATCH v3 1/1] dt-bindings: memory: tegra20: emc: Convert to schema

2021-04-08 Thread Dmitry Osipenko
08.04.2021 23:29, Rob Herring пишет: > On Sun, Apr 04, 2021 at 06:55:01PM +0300, Dmitry Osipenko wrote: >> Convert Tegra20 External Memory Controller binding to schema. >> >> Signed-off-by: Dmitry Osipenko >> --- >> .../memory-controllers/nvidia,tegra20-emc.

Re: [PATCH v1] ata: ahci_tegra: call tegra_powergate_power_off only when PM domain is not present

2021-04-08 Thread Dmitry Osipenko
08.04.2021 19:40, Sowjanya Komatineni пишет: > This patch adds a check on present of PM domain and calls legacy power > domain API tegra_powergate_power_off() only when PM domain is not present. > > This is a follow-up patch to Tegra186 AHCI support patch series >

Re: [PATCH v4 3/3] ata: ahci_tegra: Add AHCI support for Tegra186

2021-04-08 Thread Dmitry Osipenko
08.04.2021 16:06, Thierry Reding пишет: > On Thu, Apr 08, 2021 at 02:25:19AM +0300, Dmitry Osipenko wrote: >> 08.04.2021 02:00, Sowjanya Komatineni пишет: >>> >>> On 4/7/21 3:57 PM, Sowjanya Komatineni wrote: >>>> >>>> On 4/7/21 2:36 PM, Dmit

Re: [PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-04-08 Thread Dmitry Osipenko
08.04.2021 16:26, Thierry Reding пишет: > On Thu, Apr 08, 2021 at 02:42:42AM -0700, Nicolin Chen wrote: >> On Mon, Mar 29, 2021 at 02:32:55AM +0300, Dmitry Osipenko wrote: >>> All consumer-grade Android and Chromebook devices show a splash screen >>> on boot and then d

Re: [PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-04-08 Thread Dmitry Osipenko
08.04.2021 15:40, Thierry Reding пишет: > On Mon, Mar 29, 2021 at 02:32:55AM +0300, Dmitry Osipenko wrote: >> All consumer-grade Android and Chromebook devices show a splash screen >> on boot and then display is left enabled when kernel is booted. This >> behaviour is u

Re: [PATCH v4 3/3] ata: ahci_tegra: Add AHCI support for Tegra186

2021-04-07 Thread Dmitry Osipenko
08.04.2021 02:00, Sowjanya Komatineni пишет: > > On 4/7/21 3:57 PM, Sowjanya Komatineni wrote: >> >> On 4/7/21 2:36 PM, Dmitry Osipenko wrote: >>> 07.04.2021 04:25, Sowjanya Komatineni пишет: >>>> +    if (!tegra->pdev->dev.pm_domain) { >>

Re: [PATCH v4 3/3] ata: ahci_tegra: Add AHCI support for Tegra186

2021-04-07 Thread Dmitry Osipenko
07.04.2021 04:25, Sowjanya Komatineni пишет: > + if (!tegra->pdev->dev.pm_domain) { > + ret = tegra_powergate_sequence_power_up(TEGRA_POWERGATE_SATA, > + tegra->sata_clk, > +

[PATCH v3 1/1] dt-bindings: memory: tegra20: emc: Convert to schema

2021-04-04 Thread Dmitry Osipenko
Convert Tegra20 External Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko --- .../memory-controllers/nvidia,tegra20-emc.txt | 130 .../nvidia,tegra20-emc.yaml | 303 ++ 2 files changed, 303 insertions(+), 130 deletions(-) delete

[PATCH v3 0/1] NVIDIA Tegra memory improvements

2021-04-04 Thread Dmitry Osipenko
maxItems instead of $ref phandle in schemas. Dmitry Osipenko (1): dt-bindings: memory: tegra20: emc: Convert to schema .../memory-controllers/nvidia,tegra20-emc.txt | 130 .../nvidia,tegra20-emc.yaml | 303 ++ 2 files changed, 303 insertions(+), 130

Re: [PATCH v2 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-04-04 Thread Dmitry Osipenko
02.04.2021 17:45, Dmitry Osipenko пишет: > 01.04.2021 18:55, Rob Herring пишет: >> On Wed, Mar 31, 2021 at 05:59:39PM +0300, Dmitry Osipenko wrote: >>> 31.03.2021 16:40, Rob Herring пишет: >>>> On Wed, 31 Mar 2021 02:04:44 +0300, Dmitry Osipenko wrote: >>

Re: [PATCH v2 0/6] NVIDIA Tegra memory improvements

2021-04-02 Thread Dmitry Osipenko
01.04.2021 20:54, Krzysztof Kozlowski пишет: > On 31/03/2021 01:04, Dmitry Osipenko wrote: >> Hi, >> >> This series replaces the raw voltage regulator with a power domain that >> will be managing SoC core voltage. The core power domain patches are still >

Re: [PATCH v2 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-04-02 Thread Dmitry Osipenko
01.04.2021 18:55, Rob Herring пишет: > On Wed, Mar 31, 2021 at 05:59:39PM +0300, Dmitry Osipenko wrote: >> 31.03.2021 16:40, Rob Herring пишет: >>> On Wed, 31 Mar 2021 02:04:44 +0300, Dmitry Osipenko wrote: >>>> Convert Tegra20 External Memory Controller binding t

Re: [PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-04-02 Thread Dmitry Osipenko
01.04.2021 11:55, Nicolin Chen пишет: > On Mon, Mar 29, 2021 at 02:32:56AM +0300, Dmitry Osipenko wrote: >> The previous commit fixes problem where display client was attaching too >> early to IOMMU during kernel boot in a multi-platform kernel configuration &

Re: [PATCH v4 1/6] soc/tegra: Add devm_tegra_core_dev_init_opp_table()

2021-03-31 Thread Dmitry Osipenko
18.03.2021 13:37, Dmitry Osipenko пишет: > 18.03.2021 13:32, Viresh Kumar пишет: >> On 18-03-21, 13:27, Dmitry Osipenko wrote: >>> 14.03.2021 19:48, Dmitry Osipenko пишет: >>>> Add common helper which initializes OPP table for Tegra SoC core devices. >>>&

Re: [PATCH v2 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-31 Thread Dmitry Osipenko
31.03.2021 16:40, Rob Herring пишет: > On Wed, 31 Mar 2021 02:04:44 +0300, Dmitry Osipenko wrote: >> Convert Tegra20 External Memory Controller binding to schema. >> >> Signed-off-by: Dmitry Osipenko >> --- >> .../memory-controllers/nvidia,tegra20-emc.txt | 13

[PATCH v2 6/6] memory: tegra: Print out info-level once per driver probe

2021-03-30 Thread Dmitry Osipenko
Probing of EMC drivers may be deferred and in this case we get duplicated info messages during kernel boot. Use dev_info_once() helper to silence the duplicated messages. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 12 ++-- drivers/memory/tegra/tegra20-emc.c

[PATCH v2 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
Convert Tegra20 External Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko --- .../memory-controllers/nvidia,tegra20-emc.txt | 130 .../nvidia,tegra20-emc.yaml | 294 ++ 2 files changed, 294 insertions(+), 130 deletions(-) delete

[PATCH v2 4/6] dt-bindings: memory: tegra20: mc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
Convert Tegra20 Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko --- .../memory-controllers/nvidia,tegra20-mc.txt | 40 -- .../memory-controllers/nvidia,tegra20-mc.yaml | 79 +++ 2 files changed, 79 insertions(+), 40 deletions(-) delete mode 100644

[PATCH v2 3/6] dt-bindings: memory: tegra124: emc: Replace core regulator with power domain

2021-03-30 Thread Dmitry Osipenko
, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra124-emc.yaml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.yaml b/Documentation

[PATCH v2 0/6] NVIDIA Tegra memory improvements

2021-03-30 Thread Dmitry Osipenko
are converted to schema. I also made a small improvement to the memory drivers. Changelog: v2: - Fixed typos in the converted schemas. - Corrected reg entry of tegra20-mc-gart schema to use fixed number of items. - Made power-domain to use maxItems instead of $ref phandle in schemas. Dmitry

[PATCH v2 2/6] dt-bindings: memory: tegra30: emc: Replace core regulator with power domain

2021-03-30 Thread Dmitry Osipenko
, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml| 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml b/Documentation

[PATCH v2 1/6] dt-bindings: memory: tegra20: emc: Replace core regulator with power domain

2021-03-30 Thread Dmitry Osipenko
, and thus, it's okay to change it. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra20-emc.txt| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20

Re: [PATCH v1 2/6] dt-bindings: memory: tegra30: emc: Replace core regulator with power domain

2021-03-30 Thread Dmitry Osipenko
31.03.2021 01:23, Rob Herring пишет: > On Mon, Mar 29, 2021 at 10:45:58PM +0300, Dmitry Osipenko wrote: >> Power domain fits much better than a voltage regulator in regards to >> a proper hardware description and from a software perspective as well. >> Hence repla

Re: [PATCH v5 3/5] i2c: add support for HiSilicon I2C controller

2021-03-30 Thread Dmitry Osipenko
d, 517 insertions(+) > create mode 100644 drivers/i2c/busses/i2c-hisi.c Reviewed-by: Dmitry Osipenko

Re: [PATCH v5 3/5] i2c: add support for HiSilicon I2C controller

2021-03-30 Thread Dmitry Osipenko
30.03.2021 19:24, Dmitry Osipenko пишет: >> +struct hisi_i2c_controller { >> +struct i2c_adapter adapter; >> +void __iomem *iobase; >> +struct device *dev; >> +int irq; >> + >> +/* Intermediates for recording the transfer proces

Re: [PATCH v5 1/5] i2c: core: add managed function for adding i2c adapters

2021-03-30 Thread Dmitry Osipenko
r *adap) > */ > #if IS_ENABLED(CONFIG_I2C) > int i2c_add_adapter(struct i2c_adapter *adap); > +int devm_i2c_add_adapter(struct device *dev, struct i2c_adapter *adapter); > void i2c_del_adapter(struct i2c_adapter *adap); > int i2c_add_numbered_adapter(struct i2c_adapter *adap); > > Reviewed-by: Dmitry Osipenko

Re: [PATCH v5 3/5] i2c: add support for HiSilicon I2C controller

2021-03-30 Thread Dmitry Osipenko
30.03.2021 17:19, Yicong Yang пишет: ... > +struct hisi_i2c_controller { > + struct i2c_adapter adapter; > + void __iomem *iobase; > + struct device *dev; > + int irq; > + > + /* Intermediates for recording the transfer process */ > + struct completion *completion; > +

Re: [PATCH v1 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 18:29, Dmitry Osipenko пишет: > 30.03.2021 11:48, Krzysztof Kozlowski пишет: >>> + power-domains: >>> +$ref: /schemas/types.yaml#/definitions/phandle >>> +description: >>> + Phandle of the SoC "core" power domain. >

Re: [PATCH v6 0/7] Couple improvements for Tegra clk driver

2021-03-30 Thread Dmitry Osipenko
20.03.2021 18:26, Dmitry Osipenko пишет: > This series fixes couple minor standalone problems of the Tegra clk > driver. Hello Stephen, Do you have any objects if Thierry will take this series into the Tegra tree? Or will you be able to take the patches into the clk tree? Please let u

Re: [PATCH v1 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 11:48, Krzysztof Kozlowski пишет: >> + "^emc-tables@[a-z0-9\\-]+$": > Why \ and - in the pattern? Good catch, I thought that '-' needs to be escaped, but then forgot to remove the unnecessary slashes.

Re: [PATCH v1 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 11:48, Krzysztof Kozlowski пишет: >> + nvidia,use-ram-code: >> +type: boolean >> +description: >> + If present, the emc-tables@ sub-nodes will be addressed. >> + >> +patternProperties: >> + "^emc-table@[0-9]+$": > This might not be easy but you should add constraints when

Re: [PATCH v1 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 11:48, Krzysztof Kozlowski пишет: >> + power-domains: >> +$ref: /schemas/types.yaml#/definitions/phandle >> +description: >> + Phandle of the SoC "core" power domain. > I think the core checks the type, so you only need to limit max items. > It's a bit confusing that

Re: [PATCH v1 4/6] dt-bindings: memory: tegra20: mc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 11:37, Krzysztof Kozlowski пишет: >> +properties: >> + compatible: >> +const: nvidia,tegra20-mc-gart >> + >> + reg: >> +minItems: 1 >> +maxItems: 2 > I think you always need two regs, don't you? If so, then better to use > "description" like in >

Re: [PATCH v1 4/6] dt-bindings: memory: tegra20: mc: Convert to schema

2021-03-30 Thread Dmitry Osipenko
30.03.2021 16:46, Rob Herring пишет: > On Tue, Mar 30, 2021 at 08:08:43AM -0500, Rob Herring wrote: >> On Mon, 29 Mar 2021 22:46:00 +0300, Dmitry Osipenko wrote: >>> Convert Tegra20 Memory Controller binding to schema. >>> >>> Signed-off-by: Dmitry Osipenko

[PATCH v1] i2c: Make i2c_recover_bus() to return -EBUSY if bus recovery unimplemented

2021-03-29 Thread Dmitry Osipenko
Signed-off-by: Dmitry Osipenko --- drivers/i2c/i2c-core-base.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/i2c/i2c-core-base.c b/drivers/i2c/i2c-core-base.c index f21362355973..7039b8a06f3a 100644 --- a/drivers/i2c/i2c-core-base.c +++ b/drivers/i2c/i2c-core-base.c

[PATCH v1 5/6] dt-bindings: memory: tegra20: emc: Convert to schema

2021-03-29 Thread Dmitry Osipenko
Convert Tegra20 External Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko --- .../memory-controllers/nvidia,tegra20-emc.txt | 130 .../nvidia,tegra20-emc.yaml | 294 ++ 2 files changed, 294 insertions(+), 130 deletions(-) delete

[PATCH v1 3/6] dt-bindings: memory: tegra124: emc: Replace core regulator with power domain

2021-03-29 Thread Dmitry Osipenko
, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra124-emc.yaml | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra124-emc.yaml b/Documentation

[PATCH v1 4/6] dt-bindings: memory: tegra20: mc: Convert to schema

2021-03-29 Thread Dmitry Osipenko
Convert Tegra20 Memory Controller binding to schema. Signed-off-by: Dmitry Osipenko --- .../memory-controllers/nvidia,tegra20-mc.txt | 40 -- .../memory-controllers/nvidia,tegra20-mc.yaml | 78 +++ 2 files changed, 78 insertions(+), 40 deletions(-) delete mode 100644

[PATCH v1 6/6] memory: tegra: Print out info-level once per driver probe

2021-03-29 Thread Dmitry Osipenko
Probing of EMC drivers may be deferred and in this case we get duplicated info messages during kernel boot. Use dev_info_once() helper to silence the duplicated messages. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra124-emc.c | 12 ++-- drivers/memory/tegra/tegra20-emc.c

[PATCH v1 2/6] dt-bindings: memory: tegra30: emc: Replace core regulator with power domain

2021-03-29 Thread Dmitry Osipenko
, and thus, it's okay to change it. Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra30-emc.yaml| 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra30-emc.yaml b/Documentation

[PATCH v1 1/6] dt-bindings: memory: tegra20: emc: Replace core regulator with power domain

2021-03-29 Thread Dmitry Osipenko
, and thus, it's okay to change it. Reviewed-by: Rob Herring Signed-off-by: Dmitry Osipenko --- .../bindings/memory-controllers/nvidia,tegra20-emc.txt| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/memory-controllers/nvidia,tegra20

[PATCH v1 0/6] NVIDIA Tegra memory improvements

2021-03-29 Thread Dmitry Osipenko
are converted to schema. I also made a small improvement to the memory drivers. Dmitry Osipenko (6): dt-bindings: memory: tegra20: emc: Replace core regulator with power domain dt-bindings: memory: tegra30: emc: Replace core regulator with power domain dt-bindings: memory: tegra124: emc

Re: [PATCH v1] i2c: tegra: Improve handling of i2c_recover_bus()

2021-03-29 Thread Dmitry Osipenko
29.03.2021 22:15, Wolfram Sang пишет: > On Mon, Mar 29, 2021 at 10:05:46PM +0300, Dmitry Osipenko wrote: >> The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up, >> which the case for older Tegra SoCs at the moment. This error code is then >> propagated to

[PATCH v1] i2c: tegra: Improve handling of i2c_recover_bus()

2021-03-29 Thread Dmitry Osipenko
The i2c_recover_bus() returns -EOPNOTSUPP if bus recovery isn't wired up, which the case for older Tegra SoCs at the moment. This error code is then propagated to I2C client and might be confusing, thus return -EIO instead. Signed-off-by: Dmitry Osipenko --- drivers/i2c/busses/i2c-tegra.c | 10

[PATCH v1] Input: elants_i2c - drop zero-checking of ABS_MT_TOUCH_MAJOR resolution

2021-03-28 Thread Dmitry Osipenko
Drop unnecessary zero-checking of ABS_MT_TOUCH_MAJOR resolution since there is no difference between setting resolution to 0 vs not setting it at all. This change makes code cleaner a tad. Suggested-by: Dmitry Torokhov Signed-off-by: Dmitry Osipenko --- drivers/input/touchscreen/elants_i2c.c

[PATCH v1 2/2] iommu/tegra-smmu: Revert workaround that was needed for Nyan Big Chromebook

2021-03-28 Thread Dmitry Osipenko
, revert it. Signed-off-by: Dmitry Osipenko --- drivers/iommu/tegra-smmu.c | 71 +- 1 file changed, 1 insertion(+), 70 deletions(-) diff --git a/drivers/iommu/tegra-smmu.c b/drivers/iommu/tegra-smmu.c index af1e4b5adb27..572a4544ae88 100644 --- a/drivers/iommu/tegra

[PATCH v1 1/2] iommu/tegra-smmu: Defer attachment of display clients

2021-03-28 Thread Dmitry Osipenko
perform DMA at that time. We can work around this problem by deferring the enable of SMMU translation for a specific devices, like a display controller, until the first IOMMU mapping is created, which works good enough in practice because by that time h/w is already stopped. Signed-off-by: Dmitry

Re: [PATCH v1] Input: elants_i2c - fix division by zero if firmware reports zero phys size

2021-03-28 Thread Dmitry Osipenko
28.03.2021 07:44, Dmitry Torokhov пишет: > Hi Dmitry, > > On Tue, Mar 02, 2021 at 01:08:24PM +0300, Dmitry Osipenko wrote: >> Touchscreen firmware of ASUS Transformer TF700T reports zeros for the phys >> size. Hence check whether the size is zero and don't set the resol

Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan

2021-03-28 Thread Dmitry Osipenko
28.03.2021 18:25, Dmitry Osipenko пишет: > 03.03.2021 12:47, Dmitry Osipenko пишет: >> 03.03.2021 02:08, Nicolin Chen пишет: >>> On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote: >>>> 25.02.2021 09:27, Nicolin Chen пишет: >>>> ... >>&g

Re: [PATCH] iommu/tegra-smmu: Fix mc errors on tegra124-nyan

2021-03-28 Thread Dmitry Osipenko
03.03.2021 12:47, Dmitry Osipenko пишет: > 03.03.2021 02:08, Nicolin Chen пишет: >> On Sat, Feb 27, 2021 at 12:59:17PM +0300, Dmitry Osipenko wrote: >>> 25.02.2021 09:27, Nicolin Chen пишет: >>> ... >>>>> The partially revert should be okay, but it's n

Re: [PATCH v1] Input: elants_i2c - fix division by zero if firmware reports zero phys size

2021-03-26 Thread Dmitry Osipenko
02.03.2021 13:08, Dmitry Osipenko пишет: > Touchscreen firmware of ASUS Transformer TF700T reports zeros for the phys > size. Hence check whether the size is zero and don't set the resolution in > this case. > > Reported-by: Jasper Korten > Signed-off-by: Dmitry Osipenko >

Re: [PATCH v1 1/2] memory: tegra20: Correct comment to MC_STAT registers writes

2021-03-26 Thread Dmitry Osipenko
26.03.2021 10:38, Krzysztof Kozlowski пишет: > On 25/03/2021 18:20, Dmitry Osipenko wrote: >> 24.03.2021 00:04, Dmitry Osipenko пишет: >>> The code was changed multiple times and the comment to MC_STAT >>> registers writes became slightly outdated. The MC_STAT programm

Re: [PATCH v4 3/6] dt-bindings: power: tegra: Add binding for core power domain

2021-03-25 Thread Dmitry Osipenko
25.03.2021 17:49, Thierry Reding пишет: > On Wed, Mar 24, 2021 at 02:01:29AM +0300, Dmitry Osipenko wrote: >> 24.03.2021 01:48, Rob Herring пишет: >>> On Sun, Mar 14, 2021 at 07:48:07PM +0300, Dmitry Osipenko wrote: >>>> All NVIDIA Tegra SoCs have a core power dom

Re: [PATCH v1 1/2] memory: tegra20: Correct comment to MC_STAT registers writes

2021-03-25 Thread Dmitry Osipenko
24.03.2021 00:04, Dmitry Osipenko пишет: > The code was changed multiple times and the comment to MC_STAT > registers writes became slightly outdated. The MC_STAT programming > now isn't hardcoded to the "bandwidth" mode, let's clarify this in > the comment. > > Si

Re: [PATCH v4 3/5] soc/tegra: pmc: Ensure that clock rates aren't too high

2021-03-25 Thread Dmitry Osipenko
25.03.2021 18:02, Dmitry Osipenko пишет: > 25.03.2021 17:39, Thierry Reding пишет: >> On Tue, Mar 02, 2021 at 03:25:00PM +0300, Dmitry Osipenko wrote: >>> Switch all clocks of a power domain to a safe rate which is suitable >>> for all possible voltages in order to ensur

Re: [PATCH v4 3/5] soc/tegra: pmc: Ensure that clock rates aren't too high

2021-03-25 Thread Dmitry Osipenko
25.03.2021 17:39, Thierry Reding пишет: > On Tue, Mar 02, 2021 at 03:25:00PM +0300, Dmitry Osipenko wrote: >> Switch all clocks of a power domain to a safe rate which is suitable >> for all possible voltages in order to ensure that hardware constraints >> aren't violated wh

Re: [PATCH v4 5/5] soc/tegra: pmc: Rate-limit error message about failed to acquire of reset

2021-03-25 Thread Dmitry Osipenko
25.03.2021 17:42, Thierry Reding пишет: > On Tue, Mar 02, 2021 at 03:25:02PM +0300, Dmitry Osipenko wrote: >> PMC domain could be easily bombarded with the enable requests if there is >> a problem in regards to acquiring reset control of a domain and kernel >> log will be f

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 01:23, John Hubbard пишет: > On 3/24/21 3:11 PM, Dmitry Osipenko wrote: >> 25.03.2021 01:01, John Hubbard пишет: >>> On 3/24/21 2:31 PM, Dmitry Osipenko wrote: >>>> ... >>>>> +#include >>>>> + >>>>> +stru

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 00:55, Minchan Kim пишет: >> The tags are incorrect, I haven't suggested this change. > During the development, you have suggested many things > to make it clean. That suggested-by couldn't represent > all the detail but wanted to give credit for you, too > since you spent the time to

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 00:55, Minchan Kim пишет: >>> +static ssize_t alloc_pages_success_show(struct kobject *kobj, >>> + struct kobj_attribute *attr, char *buf) >>> +{ >>> + struct cma *cma = cma_from_kobj(kobj); >>> + >>> + return sysfs_emit(buf, "%llu\n", >>> +

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 01:10, Dmitry Osipenko пишет: > 25.03.2021 00:55, Minchan Kim пишет: >>> There are no dereferences fixed by this patch. >> Let me add this: >> https://lore.kernel.org/linux-mm/20210316100433.17665-1-colin.k...@canonical.com/ >> > > The tag is invali

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 01:01, John Hubbard пишет: > On 3/24/21 2:31 PM, Dmitry Osipenko wrote: >> ... >>> +#include >>> + >>> +struct cma_kobject { >>> +    struct cma *cma; >>> +    struct kobject kobj; >> >> If you'll place the kobj as th

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 00:55, Minchan Kim пишет: >> There are no dereferences fixed by this patch. > Let me add this: > https://lore.kernel.org/linux-mm/20210316100433.17665-1-colin.k...@canonical.com/ > The tag is invalid now, since you squashed the fix. I think you may add "Co-developed-by: Colin Ian King

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
25.03.2021 00:31, Dmitry Osipenko пишет: >> Reported-by: Dmitry Osipenko >> Tested-by: Dmitry Osipenko >> Suggested-by: Dmitry Osipenko > The tags are incorrect, I haven't suggested this change. The reported-by also should be removed.

Re: [PATCH v7] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
e.kernel.org/linux-mm/ycoamxqt6dzkc...@kroah.com/ > > Reported-by: Dmitry Osipenko > Tested-by: Dmitry Osipenko > Suggested-by: Dmitry Osipenko The tags are incorrect, I haven't suggested this change. > Suggested-by: John Hubbard > Suggested-by: Matthew Wilcox >

Re: [PATCH] mm: cma: fix corruption cma_sysfs_alloc_pages_count

2021-03-24 Thread Dmitry Osipenko
24.03.2021 22:57, Minchan Kim пишет: > On Wed, Mar 24, 2021 at 10:49:58PM +0300, Dmitry Osipenko wrote: >> 24.03.2021 22:43, Dmitry Osipenko пишет: >>> 24.03.2021 22:20, Minchan Kim пишет: >>>> static int __init cma_sysfs_init(void) >>>> { >>>&g

Re: [PATCH] mm: cma: fix corruption cma_sysfs_alloc_pages_count

2021-03-24 Thread Dmitry Osipenko
24.03.2021 22:43, Dmitry Osipenko пишет: > 24.03.2021 22:20, Minchan Kim пишет: >> static int __init cma_sysfs_init(void) >> { >> -int i = 0; >> +struct kobject *cma_kobj_root; >> +struct cma_kobject *cma_kobj; >> struct cma *cma; >&g

Re: [PATCH] mm: cma: fix corruption cma_sysfs_alloc_pages_count

2021-03-24 Thread Dmitry Osipenko
24.03.2021 22:20, Minchan Kim пишет: > static int __init cma_sysfs_init(void) > { > - int i = 0; > + struct kobject *cma_kobj_root; > + struct cma_kobject *cma_kobj; > struct cma *cma; > + unsigned int i; > while (--i >= 0) { Do you realize that this doesn't work

Re: [PATCH v3 09/14] ARM: tegra: acer-a500: Rename avdd to vdda of touchscreen node

2021-03-24 Thread Dmitry Osipenko
24.03.2021 18:11, Thierry Reding пишет: > On Tue, Mar 02, 2021 at 03:09:58PM +0300, Dmitry Osipenko wrote: >> Rename avdd supply to vdda of the touchscreen node. The old supply name >> was incorrect. >> >> Signed-off-by: Dmitry Osipenko >> --- >> arch/arm

Re: [PATCH v6] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
24.03.2021 08:44, Minchan Kim пишет: > On Tue, Mar 23, 2021 at 09:47:27PM -0700, John Hubbard wrote: >> On 3/23/21 8:27 PM, Minchan Kim wrote: >> ... > +static int __init cma_sysfs_init(void) > +{ > + unsigned int i; > + > + cma_kobj_root = kobject_create_and_add("cma",

Re: [PATCH v6] mm: cma: support sysfs

2021-03-24 Thread Dmitry Osipenko
24.03.2021 04:05, Minchan Kim пишет: > +static struct kobject *cma_kobj_root; This should be a local variable. > +static struct kobj_type cma_ktype = { > + .release = cma_kobj_release, > + .sysfs_ops = _sysfs_ops, > + .default_groups = cma_groups I'd add a comma to the end, for

Re: [PATCH v4 3/6] dt-bindings: power: tegra: Add binding for core power domain

2021-03-23 Thread Dmitry Osipenko
24.03.2021 01:48, Rob Herring пишет: > On Sun, Mar 14, 2021 at 07:48:07PM +0300, Dmitry Osipenko wrote: >> All NVIDIA Tegra SoCs have a core power domain where majority of hardware >> blocks reside. Add binding for the core power domain. >> >> Signed-off-by: Dmitry Osi

Re: [PATCH v5] mm: cma: support sysfs

2021-03-23 Thread Dmitry Osipenko
23.03.2021 22:50, Minchan Kim пишет: > +#ifdef CONFIG_CMA_SYSFS > +void cma_sysfs_alloc_pages_count(struct cma *cma, size_t count); > +void cma_sysfs_fail_pages_count(struct cma *cma, size_t count); I'd also rename cma_sysfs_alloc_pages_count to cma_sysfs_account_success_pages and

Re: [PATCH v5] mm: cma: support sysfs

2021-03-23 Thread Dmitry Osipenko
24.03.2021 00:19, Dmitry Osipenko пишет: >> +if (!kobj) >> +goto out; >> + >> +kobj->cma = cma; >> +cma->kobj = kobj; >> +if (kobject_init_and_add(>kobj->kobj, _ktype, >> +

Re: [PATCH v5] mm: cma: support sysfs

2021-03-23 Thread Dmitry Osipenko
23.03.2021 22:50, Minchan Kim пишет: > Since CMA is getting used more widely, it's more important to > keep monitoring CMA statistics for system health since it's > directly related to user experience. > > This patch introduces sysfs statistics for CMA, in order to provide > some basic monitoring

[PATCH v1 2/2] memory: tegra20: Protect debug code with a lock

2021-03-23 Thread Dmitry Osipenko
Simultaneous accesses to MC_STAT h/w shouldn't be allowed since one collection process stomps on another. There is no good reason for polling stats in parallel in practice, nevertheless let's add a protection lock, just for consistency. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra

[PATCH v1 1/2] memory: tegra20: Correct comment to MC_STAT registers writes

2021-03-23 Thread Dmitry Osipenko
The code was changed multiple times and the comment to MC_STAT registers writes became slightly outdated. The MC_STAT programming now isn't hardcoded to the "bandwidth" mode, let's clarify this in the comment. Signed-off-by: Dmitry Osipenko --- drivers/memory/tegra/tegra20.c | 5 ++-

Re: [PATCH v4] mm: cma: support sysfs

2021-03-22 Thread Dmitry Osipenko
20.03.2021 10:52, Greg Kroah-Hartman пишет: .. >> I found the Greg's original argument and not sure that it's really >> worthwhile to worry about the copycats since this is not a driver's code.. >> >> Maybe we could just add a clarifying comment for the kobj, telling why >> it's okay for CMA.

Re: [PATCH v6 0/3] Support wakeup methods of Atmel maXTouch controllers

2021-03-21 Thread Dmitry Osipenko
22.03.2021 01:44, Dmitry Torokhov пишет: > Hi Dmitry, > > On Sat, Mar 20, 2021 at 07:02:43PM +0300, Dmitry Osipenko wrote: >> 02.03.2021 13:21, Dmitry Osipenko пишет: >>> Some Atmel maXTouch controllers, like mXT1386 and mXT3432S1 for example, >>> have a WA

Re: [PATCH v6 0/3] Support wakeup methods of Atmel maXTouch controllers

2021-03-20 Thread Dmitry Osipenko
02.03.2021 13:21, Dmitry Osipenko пишет: > Some Atmel maXTouch controllers, like mXT1386 and mXT3432S1 for example, > have a WAKE line that needs to be asserted in order to wake controller > from a deep sleep, otherwise it will be unusable. This series implements > support for the wa

[PATCH v6 2/7] clk: tegra: Fix refcounting of gate clocks

2021-03-20 Thread Dmitry Osipenko
any real problems for the drivers and boards supported by the kernel today. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-periph-gate.c | 72 +++-- drivers/clk/tegra/clk-periph.c | 11 + 2 files changed, 58 insertions(+), 25

[PATCH v6 5/7] MAINTAINERS: Hand Tegra clk driver to Jon and Thierry

2021-03-20 Thread Dmitry Osipenko
Peter and Prashant aren't actively maintaining Tegra clock driver anymore. Jonathan and Thierry will pick up maintaining of the driver from now on. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- CREDITS | 6 ++ MAINTAINERS | 4 ++-- 2 files changed, 8 insertions(+), 2

[PATCH v6 6/7] clk: tegra: Don't allow zero clock rate for PLLs

2021-03-20 Thread Dmitry Osipenko
on Samsung Galaxy Tab, which happened due to a bug in Tegra DRM driver that erroneously sets PLL rate to zero. This issues came over again recently during of kernel bring up on ASUS TF700T. Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-pll.c | 3 +++ 1 file changed, 3 insertions(+) diff

[PATCH v6 7/7] dt-bindings: clock: tegra: Convert to schema

2021-03-20 Thread Dmitry Osipenko
Convert NVIDIA Tegra clock bindings to schema. Signed-off-by: Dmitry Osipenko --- .../bindings/clock/nvidia,tegra114-car.txt| 63 -- .../bindings/clock/nvidia,tegra124-car.txt| 107 .../bindings/clock/nvidia,tegra124-car.yaml | 115

[PATCH v6 3/7] clk: tegra: Ensure that PLLU configuration is applied properly

2021-03-20 Thread Dmitry Osipenko
reprograms it, which could be unsafe to do. The correct way should be to skip enabling of the PLL if it's already enabled and then apply configuration to the outputs. This patch doesn't fix any known problems, it's a minor improvement. Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko

[PATCH v6 4/7] clk: tegra: Halve SCLK rate on Tegra20

2021-03-20 Thread Dmitry Osipenko
-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-tegra20.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/clk/tegra/clk-tegra20.c b/drivers/clk/tegra/clk-tegra20.c index 3efc651b42e3..3664593a5ba4 100644 --- a/drivers/clk/tegra/clk-tegra20

[PATCH v6 0/7] Couple improvements for Tegra clk driver

2021-03-20 Thread Dmitry Osipenko
ollected clk patches into a single series. Dmitry Osipenko (7): clk: tegra30: Use 300MHz for video decoder by default clk: tegra: Fix refcounting of gate clocks clk: tegra: Ensure that PLLU configuration is applied properly clk: tegra: Halve SCLK rate on Tegra20 MAINTAINERS: Hand Tegra clk drive

[PATCH v6 1/7] clk: tegra30: Use 300MHz for video decoder by default

2021-03-20 Thread Dmitry Osipenko
ot;) Acked-by: Thierry Reding Signed-off-by: Dmitry Osipenko --- drivers/clk/tegra/clk-tegra30.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/tegra/clk-tegra30.c b/drivers/clk/tegra/clk-tegra30.c index 16dbf83d2f62..a33688b2359e 100644 --- a/drivers/clk/tegra/c

[PATCH v1 2/2] usb: host: ehci-tegra: Select USB_GADGET Kconfig option

2021-03-20 Thread Dmitry Osipenko
emove the driver") Reported-by: kernel test robot Signed-off-by: Dmitry Osipenko --- drivers/usb/host/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/Kconfig b/drivers/usb/host/Kconfig index b94f2a070c05..df9428f1dc5e 100644 --- a/drivers/usb/host/Kconfig +++ b/d

[PATCH v1 1/2] ARM: multi_v7_defconfig: Stop using deprecated USB_EHCI_TEGRA

2021-03-20 Thread Dmitry Osipenko
The USB_EHCI_TEGRA option is deprecated now and replaced by USB_CHIPIDEA_TEGRA. Replace USB_EHCI_TEGRA with USB_CHIPIDEA_TEGRA in multi_v7_defconfig. Signed-off-by: Dmitry Osipenko --- arch/arm/configs/multi_v7_defconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 22:03, Minchan Kim пишет: > On Fri, Mar 19, 2021 at 09:48:11PM +0300, Dmitry Osipenko wrote: >> 19.03.2021 21:21, Minchan Kim пишет: >>> On Fri, Mar 19, 2021 at 08:56:06PM +0300, Dmitry Osipenko wrote: >>>> 19.03.2021 19:30, Minchan Kim пишет: >>>

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 21:18, Minchan Kim пишет: >>> +#define CMA_ATTR_RO(_name) \ >>> + static struct kobj_attribute _name##_attr = __ATTR_RO(_name) >>> + >>> +static ssize_t alloc_pages_success_show(struct kobject *kobj, >>> + struct kobj_attribute *attr, char *buf) >> The indentations

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 21:18, Minchan Kim пишет: >>> + if (ZERO_OR_NULL_PTR(cma_kobjs)) >>> + goto out; >>> + >>> + do { >>> + cma = _areas[i]; >>> + cma->kobj = _kobjs[i]; >> Does cma really need are pointer to cma_kobj? > Do you mean something like this? > > struct cma { >

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 21:21, Minchan Kim пишет: > On Fri, Mar 19, 2021 at 08:56:06PM +0300, Dmitry Osipenko wrote: >> 19.03.2021 19:30, Minchan Kim пишет: >>> +static void cma_kobj_release(struct kobject *kobj) >>> +{ >>> + struct cma_kobject *cma_kobj = container_of

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 19:30, Minchan Kim пишет: > +static void cma_kobj_release(struct kobject *kobj) > +{ > + struct cma_kobject *cma_kobj = container_of(kobj, struct cma_kobject, > kobj); > + > + kfree(cma_kobj); > +} Oh, wait.. I think this kfree wrong since cma_kobj belongs to the array.

Re: [PATCH v4] mm: cma: support sysfs

2021-03-19 Thread Dmitry Osipenko
19.03.2021 20:41, Dmitry Osipenko пишет: > 19.03.2021 20:29, Dmitry Osipenko пишет: >> +void cma_sysfs_alloc_pages_count(struct cma *cma, size_t count) >> +{ >> +atomic64_add(count, >nr_pages_succeeded); >> +} >> + >> +void cma_sysfs_fail

  1   2   3   4   5   6   7   8   9   10   >