* [PATCHv4-next 1/3] arm64: dts: meson: odroid-c2: p5v0 is the main 5V power input
From: Anand Moon @ 2019-09-02 5:49 UTC (permalink / raw)
To: Rob Herring, Martin Blumenstingl, Jerome Brunet, Neil Armstrong,
Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
In-Reply-To: <20190902054935.4899-1-linux.amoon@gmail.com>
As per the schematic Monolithic Power Systems MP2161GJ-C499
supply a fixed output voltage of 5.0V. This supplies linked
to VDD_EE, HDMI_P5V0, USB_POWER, VCCK, VDDIO_AO1V8, VDDIO_AO3V3,
VDD3V3, DDR3_1V5 according to the schematics.
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
Rebased on linux-next.
Added Acked by Martin.
Fixed the commit message to add misssing VDDIO_AO3V3 and VDD3V3.
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 6039adda12ee..0cb5831d9daf 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -50,6 +50,15 @@
};
};
+ p5v0: regulator-p5v0 {
+ compatible = "regulator-fixed";
+
+ regulator-name = "P5V0";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
tflash_vdd: regulator-tflash_vdd {
/*
* signal name from schematics: TFLASH_VDD_EN
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCHv4-next 2/3] arm64: dts: meson: odroid-c2: Add missing linking regulator to usb bus
From: Anand Moon @ 2019-09-02 5:49 UTC (permalink / raw)
To: Rob Herring, Martin Blumenstingl, Jerome Brunet, Neil Armstrong,
Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
In-Reply-To: <20190902054935.4899-1-linux.amoon@gmail.com>
Add missing linking regulator node to usb bus for power usb devices.
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
Re-base on linux-next
Added Ack from Martin.
Changes from previous patch
[1] https://lore.kernel.org/patchwork/patch/1031243/
split the changes and add the comments to power source
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 0cb5831d9daf..d4c8b896dd26 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -36,8 +36,15 @@
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
+ /*
+ * signal name from schematics: PWREN
+ */
gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
enable-active-high;
+ /*
+ * signal name from sehematics: USB_POWER
+ */
+ vin-supply = <&p5v0>;
};
leds {
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [PATCHv4-next 3/3] arm64: dts: meson: odroid-c2: Disable usb_otg bus to avoid power failed warning
From: Anand Moon @ 2019-09-02 5:49 UTC (permalink / raw)
To: Rob Herring, Martin Blumenstingl, Jerome Brunet, Neil Armstrong,
Kevin Hilman
Cc: devicetree, linux-kernel, linux-arm-kernel, linux-amlogic
In-Reply-To: <20190902054935.4899-1-linux.amoon@gmail.com>
usb_otg bus needs to get initialize from the u-boot to be configured
to used as power source to SBC or usb otg port will get configured
as host device. Right now this support is missing in the u-boot and
phy driver so to avoid power failed warning, we would disable this
feature until proper fix is found.
[ 2.716048] phy phy-c0000000.phy.0: USB ID detect failed!
[ 2.720186] phy phy-c0000000.phy.0: phy poweron failed --> -22
[ 2.726001] ------------[ cut here ]------------
[ 2.730583] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8
[ 2.738983] Modules linked in:
[ 2.742005] CPU: 0 PID: 12 Comm: kworker/0:1 Not tainted 5.2.9-1-ARCH #1
[ 2.748643] Hardware name: Hardkernel ODROID-C2 (DT)
[ 2.753566] Workqueue: events deferred_probe_work_func
[ 2.758649] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 2.763394] pc : _regulator_put+0x3c/0xe8
[ 2.767361] lr : _regulator_put+0x3c/0xe8
[ 2.771326] sp : ffff000011aa3a50
[ 2.774604] x29: ffff000011aa3a50 x28: ffff80007ed1b600
[ 2.779865] x27: ffff80007f7036a8 x26: ffff80007f7036a8
[ 2.785126] x25: 0000000000000000 x24: ffff000011a44458
[ 2.790387] x23: ffff000011344218 x22: 0000000000000009
[ 2.795649] x21: ffff000011aa3b68 x20: ffff80007ed1b500
[ 2.800910] x19: ffff80007ed1b500 x18: 0000000000000010
[ 2.806171] x17: 000000005be5943c x16: 00000000f1c73b29
[ 2.811432] x15: ffffffffffffffff x14: ffff0000117396c8
[ 2.816694] x13: ffff000091aa37a7 x12: ffff000011aa37af
[ 2.821955] x11: ffff000011763000 x10: ffff000011aa3730
[ 2.827216] x9 : 00000000ffffffd0 x8 : ffff000010871760
[ 2.832477] x7 : 00000000000000d0 x6 : ffff0000119d151b
[ 2.837739] x5 : 000000000000000f x4 : 0000000000000000
[ 2.843000] x3 : 0000000000000000 x2 : 38104b2678c20100
[ 2.848261] x1 : 0000000000000000 x0 : 0000000000000024
[ 2.853523] Call trace:
[ 2.855940] _regulator_put+0x3c/0xe8
[ 2.859562] regulator_put+0x34/0x48
[ 2.863098] regulator_bulk_free+0x40/0x58
[ 2.867153] devm_regulator_bulk_release+0x24/0x30
[ 2.871896] release_nodes+0x1f0/0x2e0
[ 2.875604] devres_release_all+0x64/0xa4
[ 2.879571] really_probe+0x1c8/0x3e0
[ 2.883194] driver_probe_device+0xe4/0x138
[ 2.887334] __device_attach_driver+0x90/0x110
[ 2.891733] bus_for_each_drv+0x8c/0xd8
[ 2.895527] __device_attach+0xdc/0x160
[ 2.899322] device_initial_probe+0x24/0x30
[ 2.903463] bus_probe_device+0x9c/0xa8
[ 2.907258] deferred_probe_work_func+0xa0/0xf0
[ 2.911745] process_one_work+0x1b4/0x408
[ 2.915711] worker_thread+0x54/0x4b8
[ 2.919334] kthread+0x12c/0x130
[ 2.922526] ret_from_fork+0x10/0x1c
[ 2.926060] ---[ end trace 51a68f4c0035d6c0 ]---
[ 2.930691] ------------[ cut here ]------------
[ 2.935242] WARNING: CPU: 0 PID: 12 at drivers/regulator/core.c:2039 _regulator_put+0x3c/0xe8
[ 2.943653] Modules linked in:
[ 2.946675] CPU: 0 PID: 12 Comm: kworker/0:1 Tainted: G W 5.2.9-1-ARCH #1
[ 2.954694] Hardware name: Hardkernel ODROID-C2 (DT)
[ 2.959613] Workqueue: events deferred_probe_work_func
[ 2.964700] pstate: 60000005 (nZCv daif -PAN -UAO)
[ 2.969445] pc : _regulator_put+0x3c/0xe8
[ 2.973412] lr : _regulator_put+0x3c/0xe8
[ 2.977377] sp : ffff000011aa3a50
[ 2.980655] x29: ffff000011aa3a50 x28: ffff80007ed1b600
[ 2.985916] x27: ffff80007f7036a8 x26: ffff80007f7036a8
[ 2.991177] x25: 0000000000000000 x24: ffff000011a44458
[ 2.996439] x23: ffff000011344218 x22: 0000000000000009
[ 3.001700] x21: ffff000011aa3b68 x20: ffff80007ed1bd00
[ 3.006961] x19: ffff80007ed1bd00 x18: 0000000000000010
[ 3.012222] x17: 000000005be5943c x16: 00000000f1c73b29
[ 3.017484] x15: ffffffffffffffff x14: ffff0000117396c8
[ 3.022745] x13: ffff000091aa37a7 x12: ffff000011aa37af
[ 3.028006] x11: ffff000011763000 x10: ffff000011aa3730
[ 3.033267] x9 : 00000000ffffffd0 x8 : ffff000010871760
[ 3.038528] x7 : 00000000000000fd x6 : ffff0000119d151b
[ 3.043790] x5 : 000000000000000f x4 : 0000000000000000
[ 3.049051] x3 : 0000000000000000 x2 : 38104b2678c20100
[ 3.054312] x1 : 0000000000000000 x0 : 0000000000000024
[ 3.059574] Call trace:
[ 3.061991] _regulator_put+0x3c/0xe8
[ 3.065613] regulator_put+0x34/0x48
[ 3.069149] regulator_bulk_free+0x40/0x58
[ 3.073203] devm_regulator_bulk_release+0x24/0x30
[ 3.077947] release_nodes+0x1f0/0x2e0
[ 3.081655] devres_release_all+0x64/0xa4
[ 3.085622] really_probe+0x1c8/0x3e0
[ 3.089245] driver_probe_device+0xe4/0x138
[ 3.093385] __device_attach_driver+0x90/0x110
[ 3.097784] bus_for_each_drv+0x8c/0xd8
[ 3.101578] __device_attach+0xdc/0x160
[ 3.105373] device_initial_probe+0x24/0x30
[ 3.109514] bus_probe_device+0x9c/0xa8
[ 3.113309] deferred_probe_work_func+0xa0/0xf0
[ 3.117796] process_one_work+0x1b4/0x408
[ 3.121762] worker_thread+0x54/0x4b8
[ 3.125384] kthread+0x12c/0x130
[ 3.128575] ret_from_fork+0x10/0x1c
[ 3.132110] ---[ end trace 51a68f4c0035d6c1 ]---
[ 3.136753] dwc2: probe of c9000000.usb failed with error -22
Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes")
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Acked-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
Rebased on linux-next
Added Acked by Martin
[0] https://patchwork.kernel.org/patch/10757569/
Earlier my approach to initialize the usb0 bus was limited, some more
phy tuning is required both at driver and u-boot to get this feature
working. So for now just disable this.
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index d4c8b896dd26..3e51f0835c8d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -312,7 +312,7 @@
};
&usb0_phy {
- status = "okay";
+ status = "disabled";
phy-supply = <&usb_otg_pwr>;
};
@@ -322,7 +322,7 @@
};
&usb0 {
- status = "okay";
+ status = "disabled";
};
&usb1 {
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] [RFC] i2c: imx: make use of format specifier %dE
From: Oleksij Rempel @ 2019-09-02 5:58 UTC (permalink / raw)
To: Wolfram Sang, Uwe Kleine-König
Cc: Jani Nikula, Petr Mladek, Sergey Senozhatsky, Jonathan Corbet,
Shawn Guo, linux-doc, linux-kernel, Steven Rostedt,
Oleksij Rempel, Enrico Weigelt, linux-i2c, kernel, Andrew Morton,
Fabio Estevam, linux-arm-kernel, NXP Linux Team
In-Reply-To: <20190829203912.GU3740@ninjato>
On 29.08.19 22:39, Wolfram Sang wrote:
> On Thu, Aug 29, 2019 at 06:29:05AM +0200, Uwe Kleine-König wrote:
>> I created a patch that teaches printk et al to emit a symbolic error
>> name for an error valued integer[1]. With that applied
>>
>> dev_err(&pdev->dev, "can't enable I2C clock, ret=%dE\n", ret);
>>
>> emits
>>
>> ... can't enable I2C clock, ret=EIO
>>
>> if ret is -EIO. Petr Mladek (i.e. one of the printk maintainers) had
>> concerns if this would be well received and worth the effort. He asked
>> to present it to a few subsystems. So for now, this patch converting the
>> i2c-imx driver shouldn't be applied yet but it would be great to get
>> some feedback about if you think that being able to easily printk (for
>> example) "EIO" instead of "-5" is a good idea. Would it help you? Do you
>> think it helps your users?
>
> Yes, it would help me. And users, too, I am quite sure. For me, if I mix
> up two numbers while debugging, I am hunting ghosts for a while until I
> realize my mistake. So:
>
> Acked-by: Wolfram Sang <wsa@the-dreams.de>
>
> I think the main drawback is that ERRORCODES in vsprintf.c now need
> maintenance, but I think it is worth the effort. I'd be interested in
> the overhead in size this causes, but I also think it is worth the
> effort. (It could even be compiled out if we have some generic Kconfig
> symbol for smaller kernels).
I like it, at least it will safe me some time.
I tested this patch together with the vprintf patch, so result looks like:
[ 0.281843] imx-i2c 21a0000.i2c: can't enable I2C clock, ret=EIO
[ 0.281891] imx-i2c: probe of 21a0000.i2c failed with error -5
Tested-by: Oleksij Rempel <o.rempel@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Kind regards,
Oleksij Rempel
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 7/9] sparc64: numa: check the node id consistently for sparc64
From: Yunsheng Lin @ 2019-09-02 6:08 UTC (permalink / raw)
To: David Miller
Cc: dalias, linux-sh, peterz, catalin.marinas, dave.hansen,
heiko.carstens, linuxarm, jiaxun.yang, linux-mips, mwb, paulus,
hpa, sparclinux, chenhc, will, cai, linux-s390, ysato, mpe, x86,
rppt, borntraeger, dledford, mingo, jeffrey.t.kirsher, benh,
jhogan, nfont, mattst88, len.brown, gor, anshuman.khandual, bp,
luto, tglx, naveen.n.rao, linux-arm-kernel, rth, axboe,
linuxppc-dev, linux-kernel, ralf, tbogendoerfer, paul.burton,
linux-alpha, ink, akpm, robin.murphy
In-Reply-To: <20190831.130250.1236116087422472663.davem@davemloft.net>
On 2019/9/1 4:02, David Miller wrote:
> From: Yunsheng Lin <linyunsheng@huawei.com>
> Date: Sat, 31 Aug 2019 16:57:04 +0800
>
>> Did you mean sparc64 system does not has ACPI, the device's node id will
>> not specified by ACPI, so the ACPI is unrelated here?
>
> Yes, sparc64 never has and never will have ACPI.
>
> This is also true for several other platforms where you have made this
> change.
>
> The assumption of your entire patch set is that the semantics of the
> NUMA node ID are somehow completely defined by ACPI semantics. Which
> is not true.
Thanks for pointing out.
The NUMA node id in sparc64 system is defined by DT semantics?
>
> .
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 8/9] mips: numa: check the node id consistently for mips ip27
From: Yunsheng Lin @ 2019-09-02 6:11 UTC (permalink / raw)
To: Paul Burton
Cc: dalias@libc.org, linux-sh@vger.kernel.org, peterz@infradead.org,
catalin.marinas@arm.com, dave.hansen@linux.intel.com,
heiko.carstens@de.ibm.com, linuxarm@huawei.com,
jiaxun.yang@flygoat.com, linux-mips@vger.kernel.org,
mwb@linux.vnet.ibm.com, paulus@samba.org, hpa@zytor.com,
sparclinux@vger.kernel.org, chenhc@lemote.com, will@kernel.org,
cai@lca.pw, linux-s390@vger.kernel.org,
ysato@users.sourceforge.jp, mpe@ellerman.id.au, x86@kernel.org,
rppt@linux.ibm.com, borntraeger@de.ibm.com, dledford@redhat.com,
mingo@redhat.com, jeffrey.t.kirsher@intel.com,
benh@kernel.crashing.org, jhogan@kernel.org,
nfont@linux.vnet.ibm.com, mattst88@gmail.com, len.brown@intel.com,
gor@linux.ibm.com, anshuman.khandual@arm.com, bp@alien8.de,
luto@kernel.org, tglx@linutronix.de,
naveen.n.rao@linux.vnet.ibm.com,
linux-arm-kernel@lists.infradead.org, rth@twiddle.net,
axboe@kernel.dk, linuxppc-dev@lists.ozlabs.org,
linux-kernel@vger.kernel.org, ralf@linux-mips.org,
tbogendoerfer@suse.de, linux-alpha@vger.kernel.org,
ink@jurassic.park.msu.ru, akpm@linux-foundation.org,
robin.murphy@arm.com, davem@davemloft.net
In-Reply-To: <20190831154547.qzh6j4jwg5o5y4db@pburton-laptop>
On 2019/8/31 23:45, Paul Burton wrote:
> Hi Yunsheng,
>
> On Sat, Aug 31, 2019 at 01:58:22PM +0800, Yunsheng Lin wrote:
>> According to Section 6.2.14 from ACPI spec 6.3 [1], the setting
>> of proximity domain is optional, as below:
>>
>> This optional object is used to describe proximity domain
>> associations within a machine. _PXM evaluates to an integer
>> that identifies a device as belonging to a Proximity Domain
>> defined in the System Resource Affinity Table (SRAT).
>>
>> Since mips ip27 uses hub_data instead of node_to_cpumask_map,
>> this patch checks node id with the below case before returning
>> &hub_data(node)->h_cpus:
>> 1. if node_id >= MAX_COMPACT_NODES, return cpu_none_mask
>> 2. if node_id < 0, return cpu_online_mask
>> 3. if hub_data(node) is NULL, return cpu_online_mask
>>
>> [1] https://uefi.org/sites/default/files/resources/ACPI_6_3_final_Jan30.pdf
>
> Similar to David's comment on the sparc patch, these systems don't use
> ACPI so I don't see from your commit message why this change would be
> relevant.
>
> This same comment applies to patch 9 too.
Thanks for pointing out.
MIPS's NUMA node id is also defined by DT?
>
> Thanks,
> Paul
>
>>
>> Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
>> ---
>> arch/mips/include/asm/mach-ip27/topology.h | 15 ++++++++++++---
>> 1 file changed, 12 insertions(+), 3 deletions(-)
>>
>> diff --git a/arch/mips/include/asm/mach-ip27/topology.h b/arch/mips/include/asm/mach-ip27/topology.h
>> index 965f079..914a55a 100644
>> --- a/arch/mips/include/asm/mach-ip27/topology.h
>> +++ b/arch/mips/include/asm/mach-ip27/topology.h
>> @@ -15,9 +15,18 @@ struct cpuinfo_ip27 {
>> extern struct cpuinfo_ip27 sn_cpu_info[NR_CPUS];
>>
>> #define cpu_to_node(cpu) (sn_cpu_info[(cpu)].p_nodeid)
>> -#define cpumask_of_node(node) ((node) == -1 ? \
>> - cpu_all_mask : \
>> - &hub_data(node)->h_cpus)
>> +
>> +static inline const struct cpumask *cpumask_of_node(int node)
>> +{
>> + if (node >= MAX_COMPACT_NODES)
>> + return cpu_none_mask;
>> +
>> + if (node < 0 || !hub_data(node))
>> + return cpu_online_mask;
>> +
>> + return &hub_data(node)->h_cpus;
>> +}
>> +
>> struct pci_bus;
>> extern int pcibus_to_node(struct pci_bus *);
>>
>> --
>> 2.8.1
>>
>
> .
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH bpf-next] arm64: bpf: optimize modulo operation
From: jerinj @ 2019-09-02 6:14 UTC (permalink / raw)
To: netdev, Daniel Borkmann, Alexei Starovoitov, Zi Shen Lim,
Catalin Marinas, Will Deacon, Martin KaFai Lau, Song Liu,
Yonghong Song, open list:BPF JIT for ARM64,
moderated list:ARM64 PORT (AARCH64 ARCHITECTURE), open list
Cc: Jerin Jacob
From: Jerin Jacob <jerinj@marvell.com>
Optimize modulo operation instruction generation by
using single MSUB instruction vs MUL followed by SUB
instruction scheme.
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
---
arch/arm64/net/bpf_jit.h | 3 +++
arch/arm64/net/bpf_jit_comp.c | 6 ++----
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/net/bpf_jit.h b/arch/arm64/net/bpf_jit.h
index cb7ab50b7657..eb73f9f72c46 100644
--- a/arch/arm64/net/bpf_jit.h
+++ b/arch/arm64/net/bpf_jit.h
@@ -171,6 +171,9 @@
/* Rd = Ra + Rn * Rm */
#define A64_MADD(sf, Rd, Ra, Rn, Rm) aarch64_insn_gen_data3(Rd, Ra, Rn, Rm, \
A64_VARIANT(sf), AARCH64_INSN_DATA3_MADD)
+/* Rd = Ra - Rn * Rm */
+#define A64_MSUB(sf, Rd, Ra, Rn, Rm) aarch64_insn_gen_data3(Rd, Ra, Rn, Rm, \
+ A64_VARIANT(sf), AARCH64_INSN_DATA3_MSUB)
/* Rd = Rn * Rm */
#define A64_MUL(sf, Rd, Rn, Rm) A64_MADD(sf, Rd, A64_ZR, Rn, Rm)
diff --git a/arch/arm64/net/bpf_jit_comp.c b/arch/arm64/net/bpf_jit_comp.c
index f5b437f8a22b..cdc79de0c794 100644
--- a/arch/arm64/net/bpf_jit_comp.c
+++ b/arch/arm64/net/bpf_jit_comp.c
@@ -409,8 +409,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
break;
case BPF_MOD:
emit(A64_UDIV(is64, tmp, dst, src), ctx);
- emit(A64_MUL(is64, tmp, tmp, src), ctx);
- emit(A64_SUB(is64, dst, dst, tmp), ctx);
+ emit(A64_MSUB(is64, dst, dst, tmp, src), ctx);
break;
}
break;
@@ -516,8 +515,7 @@ static int build_insn(const struct bpf_insn *insn, struct jit_ctx *ctx,
case BPF_ALU64 | BPF_MOD | BPF_K:
emit_a64_mov_i(is64, tmp2, imm, ctx);
emit(A64_UDIV(is64, tmp, dst, tmp2), ctx);
- emit(A64_MUL(is64, tmp, tmp, tmp2), ctx);
- emit(A64_SUB(is64, dst, dst, tmp), ctx);
+ emit(A64_MSUB(is64, dst, dst, tmp, tmp2), ctx);
break;
case BPF_ALU | BPF_LSH | BPF_K:
case BPF_ALU64 | BPF_LSH | BPF_K:
--
2.23.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH v4 3/4] dt-bindings: Add Qualcomm USB SuperSpeed PHY bindings
From: Jorge Ramirez @ 2019-09-02 6:23 UTC (permalink / raw)
To: Stephen Boyd, Bjorn Andersson
Cc: mark.rutland, robh, jackp, devicetree, gregkh, linux-usb,
khasim.mohammed, linux-kernel, kishon, linux-arm-msm, andy.gross,
shawn.guo, linux-arm-kernel
In-Reply-To: <5d696ad2.1c69fb81.977ea.39e5@mx.google.com>
On 8/30/19 20:28, Stephen Boyd wrote:
> Quoting Bjorn Andersson (2019-08-30 09:45:20)
>> On Fri 30 Aug 09:01 PDT 2019, Stephen Boyd wrote:
>>
>>> Quoting Jorge Ramirez (2019-08-29 00:03:48)
>>>> On 2/23/19 17:52, Bjorn Andersson wrote:
>>>>> On Thu 07 Feb 03:17 PST 2019, Jorge Ramirez-Ortiz wrote:
>>>>>> +
>>>>>> +Required child nodes:
>>>>>> +
>>>>>> +- usb connector node as defined in bindings/connector/usb-connector.txt
>>>>>> + containing the property vbus-supply.
>>>>>> +
>>>>>> +Example:
>>>>>> +
>>>>>> +usb3_phy: usb3-phy@78000 {
>>>>>> + compatible = "qcom,snps-usb-ssphy";
>>>>>> + reg = <0x78000 0x400>;
>>>>>> + #phy-cells = <0>;
>>>>>> + clocks = <&rpmcc RPM_SMD_LN_BB_CLK>,
>>>>>> + <&gcc GCC_USB_HS_PHY_CFG_AHB_CLK>,
>>>>>> + <&gcc GCC_USB3_PHY_PIPE_CLK>;
>>>>>> + clock-names = "ref", "phy", "pipe";
>>>>>> + resets = <&gcc GCC_USB3_PHY_BCR>,
>>>>>> + <&gcc GCC_USB3PHY_PHY_BCR>;
>>>>>> + reset-names = "com", "phy";
>>>>>> + vdd-supply = <&vreg_l3_1p05>;
>>>>>> + vdda1p8-supply = <&vreg_l5_1p8>;
>>>>>> + usb3_c_connector: usb3-c-connector {
>>>
>>> Node name should be 'connector', not usb3-c-connector.
>>>
>>
>> It probably has to be usb-c-connector, because we have a
>> micro-usb-connector on the same board.
>
> Ok. Or connector@1 and connector@2? Our toplevel node container story is
> sort of sad because we have to play tricks with node names. But in the
> example, just connector I presume?
>
>>
>>>>>
>>>>> The USB-C connector is attached both to the HS and SS PHYs, so I think
>>>>> you should represent this external to this node and use of_graph to
>>>>> query it.
>>>>
>>>> but AFAICS we wont be able to retrieve the vbux-supply from an external
>>>> node (that interface does not exist).
>>>>
>>>> rob, do you have a suggestion?
>>>
>>> Shouldn't the vbus supply be in the phy? Or is this a situation where
>>> the phy itself doesn't have the vbus supply going to it because the PMIC
>>> gets in the way and handles the vbus for the connector by having the SoC
>>> communicate with the PMIC about when to turn the vbus on and off, etc?
>>>
>>
>> That's correct, the VBUS comes out of the PMIC and goes directly to the
>> connector.
>>
>> The additional complicating factor here is that the connector is wired
>> to a USB2 phy as well, so we need to wire up detection and vbus control
>> to both of them - but I think this will be fine, if we can only figure
>> out a sane way of getting hold of the vbus-supply.
>>
>
> Does it really matter to describe this situation though? Maybe it's
> simpler to throw the vbus supply into the phy and control it from the
> phy driver, even if it never really goes there. Or put it into the
> toplevel usb controller?
>
that would work for me - the connector definition seemed a better way to
explain the connectivity but since we cant retrieve the supply from the
external node is not of much functional use.
but please let me know how to proceed. shall I add the supply back to
the phy?
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] PCI: Remove unused includes and superfluous struct declaration
From: kbuild test robot @ 2019-09-02 6:31 UTC (permalink / raw)
To: Krzysztof Wilczynski
Cc: devicetree, Lorenzo Pieralisi, Jingoo Han, Joerg Roedel,
linux-pci, linux-kernel, iommu, Rob Herring, Bjorn Helgaas,
kbuild-all, Thomas Petazzoni, Gustavo Pimentel, Frank Rowand,
linux-arm-kernel
In-Reply-To: <20190901112506.8469-1-kw@linux.com>
[-- Attachment #1: Type: text/plain, Size: 18112 bytes --]
Hi Krzysztof,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Krzysztof-Wilczynski/PCI-Remove-unused-includes-and-superfluous-struct-declaration/20190902-040019
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gcc (GCC) 7.4.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
GCC_VERSION=7.4.0 make.cross ARCH=arm64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/linux/list.h:9:0,
from include/linux/kobject.h:19,
from include/linux/of.h:17,
from include/linux/irqdomain.h:35,
from include/linux/acpi.h:13,
from include/linux/acpi_iort.h:10,
from drivers/irqchip/irq-gic-v3-its-pci-msi.c:7:
drivers/irqchip/irq-gic-v3-its-pci-msi.c: In function 'its_pci_msi_vec_count':
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:37:12: error: implicit declaration of function 'pci_msi_vec_count'; did you mean 'its_pci_msi_vec_count'? [-Werror=implicit-function-declaration]
msi = max(pci_msi_vec_count(pdev), 0);
^
include/linux/kernel.h:821:22: note: in definition of macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:845:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:861:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:37:8: note: in expansion of macro 'max'
msi = max(pci_msi_vec_count(pdev), 0);
^~~
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:38:13: error: implicit declaration of function 'pci_msix_vec_count'; did you mean 'its_pci_msi_vec_count'? [-Werror=implicit-function-declaration]
msix = max(pci_msix_vec_count(pdev), 0);
^
include/linux/kernel.h:821:22: note: in definition of macro '__typecheck'
(!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
^
include/linux/kernel.h:845:24: note: in expansion of macro '__safe_cmp'
__builtin_choose_expr(__safe_cmp(x, y), \
^~~~~~~~~~
include/linux/kernel.h:861:19: note: in expansion of macro '__careful_cmp'
#define max(x, y) __careful_cmp(x, y, >)
^~~~~~~~~~~~~
drivers/irqchip/irq-gic-v3-its-pci-msi.c:38:9: note: in expansion of macro 'max'
msix = max(pci_msix_vec_count(pdev), 0);
^~~
drivers/irqchip/irq-gic-v3-its-pci-msi.c: In function 'its_pci_msi_prepare':
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:60:7: error: implicit declaration of function 'dev_is_pci'; did you mean 'dev_to_psd'? [-Werror=implicit-function-declaration]
if (!dev_is_pci(dev))
^~~~~~~~~~
dev_to_psd
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:65:9: error: implicit declaration of function 'to_pci_dev'; did you mean 'atomic_dec'? [-Werror=implicit-function-declaration]
pdev = to_pci_dev(dev);
^~~~~~~~~~
atomic_dec
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:65:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
pdev = to_pci_dev(dev);
^
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:70:2: error: implicit declaration of function 'pci_for_each_dma_alias'; did you mean 'xas_for_each_conflict'? [-Werror=implicit-function-declaration]
pci_for_each_dma_alias(pdev, its_get_pci_alias, &alias_dev);
^~~~~~~~~~~~~~~~~~~~~~
xas_for_each_conflict
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:71:36: error: dereferencing pointer to incomplete type 'struct pci_dev'
if (alias_dev != pdev && alias_dev->subordinate)
^~
>> drivers/irqchip/irq-gic-v3-its-pci-msi.c:72:3: error: implicit declaration of function 'pci_walk_bus' [-Werror=implicit-function-declaration]
pci_walk_bus(alias_dev->subordinate, its_pci_msi_vec_count,
^~~~~~~~~~~~
cc1: some warnings being treated as errors
--
drivers/irqchip/irq-gic-v2m.c: In function 'gicv2m_acpi_init':
>> drivers/irqchip/irq-gic-v2m.c:558:2: error: implicit declaration of function 'pci_msi_register_fwnode_provider'; did you mean 'acpi_bus_register_driver'? [-Werror=implicit-function-declaration]
pci_msi_register_fwnode_provider(&gicv2m_get_fwnode);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
acpi_bus_register_driver
cc1: some warnings being treated as errors
--
In file included from drivers/pci/controller/pci-thunder-pem.c:11:0:
include/linux/pci-acpi.h: In function 'acpi_find_root_bridge_handle':
>> include/linux/pci-acpi.h:34:29: error: dereferencing pointer to incomplete type 'struct pci_dev'
struct pci_bus *pbus = pdev->bus;
^~
>> include/linux/pci-acpi.h:37:10: error: implicit declaration of function 'pci_is_root_bus'; did you mean 'acpi_is_root_bridge'? [-Werror=implicit-function-declaration]
while (!pci_is_root_bus(pbus))
^~~~~~~~~~~~~~~
acpi_is_root_bridge
>> include/linux/pci-acpi.h:38:14: error: dereferencing pointer to incomplete type 'struct pci_bus'
pbus = pbus->parent;
^~
In file included from include/linux/acpi.h:32:0,
from include/linux/pci-acpi.h:12,
from drivers/pci/controller/pci-thunder-pem.c:11:
>> include/acpi/acpi_bus.h:411:23: warning: passing argument 1 of 'is_acpi_device_node' makes pointer from integer without a cast [-Wint-conversion]
is_acpi_device_node(__to_acpi_device_node_fwnode) ? \
^
>> include/linux/acpi.h:43:30: note: in expansion of macro 'to_acpi_device_node'
#define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
^~~~~~~~~~~~~~~~~~~
>> include/linux/acpi.h:46:46: note: in expansion of macro 'ACPI_COMPANION'
#define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev))
^~~~~~~~~~~~~~
>> include/linux/pci-acpi.h:40:9: note: in expansion of macro 'ACPI_HANDLE'
return ACPI_HANDLE(pbus->bridge);
^~~~~~~~~~~
include/acpi/acpi_bus.h:399:6: note: expected 'const struct fwnode_handle *' but argument is of type 'int'
bool is_acpi_device_node(const struct fwnode_handle *fwnode);
^~~~~~~~~~~~~~~~~~~
In file included from drivers/pci/controller/pci-thunder-pem.c:7:0:
>> include/linux/kernel.h:972:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
void *__mptr = (void *)(ptr); \
^
>> include/acpi/acpi_bus.h:412:4: note: in expansion of macro 'container_of'
container_of(__to_acpi_device_node_fwnode, \
^~~~~~~~~~~~
>> include/linux/acpi.h:43:30: note: in expansion of macro 'to_acpi_device_node'
#define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
^~~~~~~~~~~~~~~~~~~
>> include/linux/acpi.h:46:46: note: in expansion of macro 'ACPI_COMPANION'
#define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev))
^~~~~~~~~~~~~~
>> include/linux/pci-acpi.h:40:9: note: in expansion of macro 'ACPI_HANDLE'
return ACPI_HANDLE(pbus->bridge);
^~~~~~~~~~~
In file included from include/linux/build_bug.h:5:0,
from include/linux/bitfield.h:10,
from drivers/pci/controller/pci-thunder-pem.c:6:
>> include/linux/kernel.h:973:32: error: invalid type argument of unary '*' (have 'int')
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:973:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:973:20: note: in expansion of macro '__same_type'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~
>> include/acpi/acpi_bus.h:412:4: note: in expansion of macro 'container_of'
container_of(__to_acpi_device_node_fwnode, \
^~~~~~~~~~~~
>> include/linux/acpi.h:43:30: note: in expansion of macro 'to_acpi_device_node'
#define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
^~~~~~~~~~~~~~~~~~~
>> include/linux/acpi.h:46:46: note: in expansion of macro 'ACPI_COMPANION'
#define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev))
^~~~~~~~~~~~~~
>> include/linux/pci-acpi.h:40:9: note: in expansion of macro 'ACPI_HANDLE'
return ACPI_HANDLE(pbus->bridge);
^~~~~~~~~~~
include/linux/kernel.h:974:18: error: invalid type argument of unary '*' (have 'int')
!__same_type(*(ptr), void), \
^~~~~~
include/linux/compiler.h:330:9: note: in definition of macro '__compiletime_assert'
if (!(condition)) \
^~~~~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/kernel.h:973:2: note: in expansion of macro 'BUILD_BUG_ON_MSG'
BUILD_BUG_ON_MSG(!__same_type(*(ptr), ((type *)0)->member) && \
^~~~~~~~~~~~~~~~
include/linux/kernel.h:974:6: note: in expansion of macro '__same_type'
!__same_type(*(ptr), void), \
^~~~~~~~~~~
>> include/acpi/acpi_bus.h:412:4: note: in expansion of macro 'container_of'
container_of(__to_acpi_device_node_fwnode, \
^~~~~~~~~~~~
>> include/linux/acpi.h:43:30: note: in expansion of macro 'to_acpi_device_node'
#define ACPI_COMPANION(dev) to_acpi_device_node((dev)->fwnode)
^~~~~~~~~~~~~~~~~~~
>> include/linux/acpi.h:46:46: note: in expansion of macro 'ACPI_COMPANION'
#define ACPI_HANDLE(dev) acpi_device_handle(ACPI_COMPANION(dev))
^~~~~~~~~~~~~~
vim +71 drivers/irqchip/irq-gic-v3-its-pci-msi.c
723344dd0b2aa1 Tomasz Nowicki 2016-09-12 @7 #include <linux/acpi_iort.h>
f130420e51df30 Marc Zyngier 2015-07-28 8 #include <linux/msi.h>
f130420e51df30 Marc Zyngier 2015-07-28 9 #include <linux/of.h>
f130420e51df30 Marc Zyngier 2015-07-28 10 #include <linux/of_irq.h>
f130420e51df30 Marc Zyngier 2015-07-28 11 #include <linux/of_pci.h>
f130420e51df30 Marc Zyngier 2015-07-28 12
f130420e51df30 Marc Zyngier 2015-07-28 13 static void its_mask_msi_irq(struct irq_data *d)
f130420e51df30 Marc Zyngier 2015-07-28 14 {
f130420e51df30 Marc Zyngier 2015-07-28 15 pci_msi_mask_irq(d);
f130420e51df30 Marc Zyngier 2015-07-28 16 irq_chip_mask_parent(d);
f130420e51df30 Marc Zyngier 2015-07-28 17 }
f130420e51df30 Marc Zyngier 2015-07-28 18
f130420e51df30 Marc Zyngier 2015-07-28 19 static void its_unmask_msi_irq(struct irq_data *d)
f130420e51df30 Marc Zyngier 2015-07-28 20 {
f130420e51df30 Marc Zyngier 2015-07-28 21 pci_msi_unmask_irq(d);
f130420e51df30 Marc Zyngier 2015-07-28 22 irq_chip_unmask_parent(d);
f130420e51df30 Marc Zyngier 2015-07-28 23 }
f130420e51df30 Marc Zyngier 2015-07-28 24
f130420e51df30 Marc Zyngier 2015-07-28 25 static struct irq_chip its_msi_irq_chip = {
f130420e51df30 Marc Zyngier 2015-07-28 26 .name = "ITS-MSI",
f130420e51df30 Marc Zyngier 2015-07-28 27 .irq_unmask = its_unmask_msi_irq,
f130420e51df30 Marc Zyngier 2015-07-28 28 .irq_mask = its_mask_msi_irq,
f130420e51df30 Marc Zyngier 2015-07-28 29 .irq_eoi = irq_chip_eoi_parent,
f130420e51df30 Marc Zyngier 2015-07-28 30 .irq_write_msi_msg = pci_msi_domain_write_msg,
f130420e51df30 Marc Zyngier 2015-07-28 31 };
f130420e51df30 Marc Zyngier 2015-07-28 32
3403b0259d152c Robin Murphy 2017-05-31 33 static int its_pci_msi_vec_count(struct pci_dev *pdev, void *data)
f130420e51df30 Marc Zyngier 2015-07-28 34 {
3403b0259d152c Robin Murphy 2017-05-31 35 int msi, msix, *count = data;
f130420e51df30 Marc Zyngier 2015-07-28 36
f130420e51df30 Marc Zyngier 2015-07-28 @37 msi = max(pci_msi_vec_count(pdev), 0);
f130420e51df30 Marc Zyngier 2015-07-28 @38 msix = max(pci_msix_vec_count(pdev), 0);
3403b0259d152c Robin Murphy 2017-05-31 39 *count += max(msi, msix);
f130420e51df30 Marc Zyngier 2015-07-28 40
3403b0259d152c Robin Murphy 2017-05-31 41 return 0;
f130420e51df30 Marc Zyngier 2015-07-28 42 }
f130420e51df30 Marc Zyngier 2015-07-28 43
f130420e51df30 Marc Zyngier 2015-07-28 44 static int its_get_pci_alias(struct pci_dev *pdev, u16 alias, void *data)
f130420e51df30 Marc Zyngier 2015-07-28 45 {
3403b0259d152c Robin Murphy 2017-05-31 46 struct pci_dev **alias_dev = data;
f130420e51df30 Marc Zyngier 2015-07-28 47
3403b0259d152c Robin Murphy 2017-05-31 48 *alias_dev = pdev;
f130420e51df30 Marc Zyngier 2015-07-28 49
f130420e51df30 Marc Zyngier 2015-07-28 50 return 0;
f130420e51df30 Marc Zyngier 2015-07-28 51 }
f130420e51df30 Marc Zyngier 2015-07-28 52
f130420e51df30 Marc Zyngier 2015-07-28 53 static int its_pci_msi_prepare(struct irq_domain *domain, struct device *dev,
f130420e51df30 Marc Zyngier 2015-07-28 54 int nvec, msi_alloc_info_t *info)
f130420e51df30 Marc Zyngier 2015-07-28 55 {
3403b0259d152c Robin Murphy 2017-05-31 56 struct pci_dev *pdev, *alias_dev;
54456db9a23753 Marc Zyngier 2015-07-28 57 struct msi_domain_info *msi_info;
30800b3a1fb14c Marc Zyngier 2018-05-31 58 int alias_count = 0, minnvec = 1;
f130420e51df30 Marc Zyngier 2015-07-28 59
f130420e51df30 Marc Zyngier 2015-07-28 @60 if (!dev_is_pci(dev))
f130420e51df30 Marc Zyngier 2015-07-28 61 return -EINVAL;
f130420e51df30 Marc Zyngier 2015-07-28 62
54456db9a23753 Marc Zyngier 2015-07-28 63 msi_info = msi_get_domain_info(domain->parent);
54456db9a23753 Marc Zyngier 2015-07-28 64
f130420e51df30 Marc Zyngier 2015-07-28 @65 pdev = to_pci_dev(dev);
3403b0259d152c Robin Murphy 2017-05-31 66 /*
3403b0259d152c Robin Murphy 2017-05-31 67 * If pdev is downstream of any aliasing bridges, take an upper
3403b0259d152c Robin Murphy 2017-05-31 68 * bound of how many other vectors could map to the same DevID.
3403b0259d152c Robin Murphy 2017-05-31 69 */
3403b0259d152c Robin Murphy 2017-05-31 @70 pci_for_each_dma_alias(pdev, its_get_pci_alias, &alias_dev);
3403b0259d152c Robin Murphy 2017-05-31 @71 if (alias_dev != pdev && alias_dev->subordinate)
3403b0259d152c Robin Murphy 2017-05-31 @72 pci_walk_bus(alias_dev->subordinate, its_pci_msi_vec_count,
3403b0259d152c Robin Murphy 2017-05-31 73 &alias_count);
f130420e51df30 Marc Zyngier 2015-07-28 74
54456db9a23753 Marc Zyngier 2015-07-28 75 /* ITS specific DeviceID, as the core ITS ignores dev. */
ccf91e68a4357e David Daney 2015-10-08 76 info->scratchpad[0].ul = pci_msi_domain_get_msi_rid(domain, pdev);
54456db9a23753 Marc Zyngier 2015-07-28 77
30800b3a1fb14c Marc Zyngier 2018-05-31 78 /*
30800b3a1fb14c Marc Zyngier 2018-05-31 79 * Always allocate a power of 2, and special case device 0 for
30800b3a1fb14c Marc Zyngier 2018-05-31 80 * broken systems where the DevID is not wired (and all devices
30800b3a1fb14c Marc Zyngier 2018-05-31 81 * appear as DevID 0). For that reason, we generously allocate a
30800b3a1fb14c Marc Zyngier 2018-05-31 82 * minimum of 32 MSIs for DevID 0. If you want more because all
30800b3a1fb14c Marc Zyngier 2018-05-31 83 * your devices are aliasing to DevID 0, consider fixing your HW.
30800b3a1fb14c Marc Zyngier 2018-05-31 84 */
147c8f376e5526 Marc Zyngier 2018-05-27 85 nvec = max(nvec, alias_count);
30800b3a1fb14c Marc Zyngier 2018-05-31 86 if (!info->scratchpad[0].ul)
30800b3a1fb14c Marc Zyngier 2018-05-31 87 minnvec = 32;
30800b3a1fb14c Marc Zyngier 2018-05-31 88 nvec = max_t(int, minnvec, roundup_pow_of_two(nvec));
147c8f376e5526 Marc Zyngier 2018-05-27 89 return msi_info->ops->msi_prepare(domain->parent, dev, nvec, info);
f130420e51df30 Marc Zyngier 2015-07-28 90 }
f130420e51df30 Marc Zyngier 2015-07-28 91
:::::: The code at line 71 was first introduced by commit
:::::: 3403b0259d152c3ca67b32bb710f826bc17c0d16 irqchip/gic-v3-its: Fix MSI alias accounting
:::::: TO: Robin Murphy <robin.murphy@arm.com>
:::::: CC: Marc Zyngier <marc.zyngier@arm.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 45257 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCHv3 00/10] soc: ti: add OMAP PRM driver (for reset)
From: Tero Kristo @ 2019-09-02 6:50 UTC (permalink / raw)
To: santosh.shilimkar, ssantosh, linux-omap, tony, s-anna, p.zabel
Cc: devicetree, linux-arm-kernel
In-Reply-To: <f7d6a2fb-175c-361b-00ff-ddde67700daa@oracle.com>
On 30/08/2019 19:50, santosh.shilimkar@oracle.com wrote:
> On 8/30/19 5:18 AM, Tero Kristo wrote:
>> Hi,
>>
>> V3 of the series, ended up re-sending the whole series as I squashed one
>> patch from v2 and because of that the ordering has changed a bit. Changes
>> in v3 contain fixes for the comments from Philipp Zabel.
>>
>> - added spinlock to protect register writes
>> - added own xlate function to prevent bad reset IDs to be registered
>> - use mask for the valid reset detection instead of parsing reset map
>> - fixed reset status bit handling
>> - used iopoll macro instead of handwritten poll loop for timeouts
>> - squashed patch #6 into #4 from v2 of the series
>> - some other minor fixes.
>>
>> This series still depends on the clk driver changes for the reset<->clk
>> syncing [1].
>>
> This has to wait for another merge window. It will also take care of
> dependencies landing in mainline. Will push this to linux-next as
> soon as v5.4-rc1 is out. Please remind me in case you don't see it
> in next after 5.4-rc1.
Yep it is very late so did not expect it getting in, just wanted to get
the patches rolling. I still hope to see the clock patches getting in
this cycle due to dependency, lets keep fingers crossed.
-Tero
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/2] arm64: dts: allwinner: h6: Introduce Tanix TX6 board
From: Rong Chen @ 2019-09-02 7:05 UTC (permalink / raw)
To: Jernej Škrabec, kbuild test robot
Cc: mark.rutland, devicetree, linux-kernel, mripard, wens, robh+dt,
kbuild-all, linux-arm-kernel
In-Reply-To: <7640522.c0V0aH5rf2@jernej-laptop>
Hi,
On 8/19/19 2:59 AM, Jernej Škrabec wrote:
> Dne nedelja, 18. avgust 2019 ob 20:42:49 CEST je kbuild test robot napisal(a):
>> Hi Jernej,
>>
>> Thank you for the patch! Yet something to improve:
>>
>> [auto build test ERROR on linus/master]
>> [cannot apply to v5.3-rc4 next-20190816]
>> [if your patch is applied to the wrong git tree, please drop us a note to
>> help improve the system]
>>
>> url:
>> https://github.com/0day-ci/linux/commits/Jernej-Skrabec/dt-bindings-arm-sun
>> xi-Add-compatible-for-Tanix-TX6-board/20190819-002034 config:
>> arm64-defconfig (attached as .config)
>> compiler: aarch64-linux-gcc (GCC) 7.4.0
>> reproduce:
>> wget
>> https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O
>> ~/bin/make.cross chmod +x ~/bin/make.cross
>> # save the attached .config to linux build tree
>> GCC_VERSION=7.4.0 make.cross ARCH=arm64
>>
>> If you fix the issue, kindly add following tag
>> Reported-by: kbuild test robot <lkp@intel.com>
>>
>> All errors (new ones prefixed by >>):
>>>> Error: arch/arm64/boot/dts/allwinner/sun50i-h6-tanix-tx6.dts:83.1-6 Label
>>>> or path r_ir not found FATAL ERROR: Syntax error parsing input tree
> Strange, Allwinner tree has commit, which introduces r_ir node:
> https://git.kernel.org/pub/scm/linux/kernel/git/sunxi/linux.git/commit/?
> h=sunxi/dt-for-5.4&id=9267811aad3524c857cf2e16bbadd8c569e15ab9
>
> Maybe kbuild test robot tree doesn't have it?
The tree is in our list.
https://github.com/intel/lkp-tests/blob/master/repo/linux/sunxi
Robot also tries to apply patches to a git tree to test. Maybe your
patch was applied to a wrong git tree.
Best Regards,
Rong Chen
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v4 02/10] KVM: arm/arm64: Factor out hypercall handling from PSCI code
From: kbuild test robot @ 2019-09-02 7:06 UTC (permalink / raw)
To: Steven Price
Cc: Mark Rutland, Christoffer Dall, linux-kernel, kvm,
Radim =?unknown-8bit?B?S3LEjW3DocWZ?=, Marc Zyngier,
Suzuki K Pouloze, linux-doc, Russell King, Steven Price,
James Morse, kbuild-all, Catalin Marinas, Paolo Bonzini,
Julien Thierry, Will Deacon, kvmarm, linux-arm-kernel
In-Reply-To: <20190830084255.55113-3-steven.price@arm.com>
[-- Attachment #1: Type: text/plain, Size: 11454 bytes --]
Hi Steven,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[cannot apply to v5.3-rc6 next-20190830]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Steven-Price/arm64-Stolen-time-support/20190901-185152
config: i386-randconfig-a002-201935 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-11) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
In file included from include/kvm/arm_hypercalls.h:7:0,
from <command-line>:0:
>> arch/x86/include/asm/kvm_emulate.h:349:22: error: 'NR_VCPU_REGS' undeclared here (not in a function)
unsigned long _regs[NR_VCPU_REGS];
^~~~~~~~~~~~
In file included from <command-line>:0:0:
>> include/kvm/arm_hypercalls.h:9:33: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
int kvm_hvc_call_handler(struct kvm_vcpu *vcpu);
^~~~~~~~
include/kvm/arm_hypercalls.h:11:45: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
static inline u32 smccc_get_function(struct kvm_vcpu *vcpu)
^~~~~~~~
include/kvm/arm_hypercalls.h: In function 'smccc_get_function':
>> include/kvm/arm_hypercalls.h:13:9: error: implicit declaration of function 'vcpu_get_reg' [-Werror=implicit-function-declaration]
return vcpu_get_reg(vcpu, 0);
^~~~~~~~~~~~
include/kvm/arm_hypercalls.h: At top level:
include/kvm/arm_hypercalls.h:16:51: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
static inline unsigned long smccc_get_arg1(struct kvm_vcpu *vcpu)
^~~~~~~~
include/kvm/arm_hypercalls.h:21:51: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
static inline unsigned long smccc_get_arg2(struct kvm_vcpu *vcpu)
^~~~~~~~
include/kvm/arm_hypercalls.h:26:51: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
static inline unsigned long smccc_get_arg3(struct kvm_vcpu *vcpu)
^~~~~~~~
include/kvm/arm_hypercalls.h:31:44: warning: 'struct kvm_vcpu' declared inside parameter list will not be visible outside of this definition or declaration
static inline void smccc_set_retval(struct kvm_vcpu *vcpu,
^~~~~~~~
include/kvm/arm_hypercalls.h: In function 'smccc_set_retval':
>> include/kvm/arm_hypercalls.h:37:2: error: implicit declaration of function 'vcpu_set_reg'; did you mean 'smccc_set_retval'? [-Werror=implicit-function-declaration]
vcpu_set_reg(vcpu, 0, a0);
^~~~~~~~~~~~
smccc_set_retval
cc1: some warnings being treated as errors
vim +/NR_VCPU_REGS +349 arch/x86/include/asm/kvm_emulate.h
a584539b24b87d arch/x86/include/asm/kvm_emulate.h Paolo Bonzini 2015-04-01 290
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 291 struct x86_emulate_ctxt {
0225fb509d51fc arch/x86/include/asm/kvm_emulate.h Mathias Krause 2012-08-30 292 const struct x86_emulate_ops *ops;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 293
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 294 /* Register state before/after emulation. */
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 295 unsigned long eflags;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 296 unsigned long eip; /* eip before instruction emulation */
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 297 /* Emulated execution mode, represented by an X86EMUL_MODE value. */
9d1b39a967871b arch/x86/include/asm/kvm_emulate.h Gleb Natapov 2012-09-03 298 enum x86emul_mode mode;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 299
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 300 /* interruptibility state, as a result of execution of STI or MOV SS */
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 301 int interruptibility;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 302
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 303 bool perm_ok; /* do not check permissions if true */
b51e974fcdabd0 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 304 bool ud; /* inject an #UD if host doesn't support insn */
c8401dda2f0a00 arch/x86/include/asm/kvm_emulate.h Paolo Bonzini 2017-06-07 305 bool tf; /* TF value before instruction (after for syscall/sysret) */
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 306
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 307 bool have_exception;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 308 struct x86_exception exception;
9dac77fa4011bd arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 309
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 310 /*
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 311 * decode cache
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 312 */
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 313
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 314 /* current opcode length in bytes */
1ce19dc16ce913 arch/x86/include/asm/kvm_emulate.h Borislav Petkov 2013-09-22 315 u8 opcode_len;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 316 u8 b;
c4f035c60dad45 arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-04-04 317 u8 intercept;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 318 u8 op_bytes;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 319 u8 ad_bytes;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 320 struct operand src;
0dc8d10f7d848b arch/x86/include/asm/kvm_x86_emulate.h Guillaume Thouvenin 2008-12-04 321 struct operand src2;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 322 struct operand dst;
ef65c88912cafe arch/x86/include/asm/kvm_emulate.h Avi Kivity 2010-07-29 323 int (*execute)(struct x86_emulate_ctxt *ctxt);
d09beabd7cd4cf arch/x86/include/asm/kvm_emulate.h Joerg Roedel 2011-04-04 324 int (*check_perm)(struct x86_emulate_ctxt *ctxt);
41061cdb98a0be arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 325 /*
41061cdb98a0be arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 326 * The following six fields are cleared together,
41061cdb98a0be arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 327 * the rest are initialized unconditionally in x86_decode_insn
41061cdb98a0be arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 328 * or elsewhere
41061cdb98a0be arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 329 */
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 330 bool rip_relative;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 331 u8 rex_prefix;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 332 u8 lock_prefix;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 333 u8 rep_prefix;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 334 /* bitmaps of registers in _regs[] that can be read */
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 335 u32 regs_valid;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 336 /* bitmaps of registers in _regs[] that have been written */
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 337 u32 regs_dirty;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 338 /* modrm */
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 339 u8 modrm;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 340 u8 modrm_mod;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 341 u8 modrm_reg;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 342 u8 modrm_rm;
09ee57cdae3156 arch/x86/include/asm/kvm_emulate.h Avi Kivity 2010-08-01 343 u8 modrm_seg;
573e80fe04db1a arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 344 u8 seg_override;
c44b4c6ab80eef arch/x86/include/asm/kvm_emulate.h Bandan Das 2014-04-16 345 u64 d;
36dd9bb5ce32bc arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-06-01 346 unsigned long _eip;
cbd27ee783f1e5 arch/x86/include/asm/kvm_emulate.h Avi Kivity 2012-06-10 347 struct operand memop;
b5c9ff731f3cee arch/x86/include/asm/kvm_emulate.h Takuya Yoshikawa 2011-05-25 348 /* Fields above regs are cleared together. */
dd856efafe6097 arch/x86/include/asm/kvm_emulate.h Avi Kivity 2012-08-27 @349 unsigned long _regs[NR_VCPU_REGS];
f09ed83e211d25 arch/x86/include/asm/kvm_emulate.h Avi Kivity 2011-09-13 350 struct operand *memopp;
6226686954c4cc drivers/kvm/x86_emulate.h Avi Kivity 2007-11-20 351 struct fetch_cache fetch;
7b262e90fc20a4 arch/x86/include/asm/kvm_emulate.h Gleb Natapov 2010-03-18 352 struct read_cache io_read;
9de41573675cba arch/x86/include/asm/kvm_emulate.h Gleb Natapov 2010-04-28 353 struct read_cache mem_read;
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 354 };
e4e03deda83b1f drivers/kvm/x86_emulate.h Laurent Vivier 2007-09-18 355
:::::: The code at line 349 was first introduced by commit
:::::: dd856efafe6097a5c9104725c2bca74430423db8 KVM: x86 emulator: access GPRs on demand
:::::: TO: Avi Kivity <avi@redhat.com>
:::::: CC: Marcelo Tosatti <mtosatti@redhat.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 30130 bytes --]
[-- Attachment #3: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [PATCH] drm/mcde: Some fixes to handling video mode
From: Linus Walleij @ 2019-09-02 7:17 UTC (permalink / raw)
To: dri-devel, Maarten Lankhorst, Maxime Ripard, Sean Paul
Cc: Linus Walleij, Stephan Gerhold, linux-arm-kernel
The video DSI mode had not really been tested. These fixes makes
it more likely to work on real hardware:
- Set the HS clock to something the video mode reported by the
panel can handle rather than the max HS rate.
- Put the active width (x width) in the right bits and the VSA
(vertical sync active) in the right bits (those were swapped).
- Calculate the packet sizes in bytes as in the vendor driver,
rather than in bits.
- Handle negative result in front/back/sync packages and fall
back to zero like in the vendor driver.
Cc: Stephan Gerhold <stephan@gerhold.net>
Fixes: 5fc537bfd000 ("drm/mcde: Add new driver for ST-Ericsson MCDE")
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/gpu/drm/mcde/mcde_dsi.c | 60 ++++++++++++++++++++++-----------
1 file changed, 41 insertions(+), 19 deletions(-)
diff --git a/drivers/gpu/drm/mcde/mcde_dsi.c b/drivers/gpu/drm/mcde/mcde_dsi.c
index 90659d190d78..f5079f0e24ca 100644
--- a/drivers/gpu/drm/mcde/mcde_dsi.c
+++ b/drivers/gpu/drm/mcde/mcde_dsi.c
@@ -365,11 +365,12 @@ void mcde_dsi_te_request(struct mipi_dsi_device *mdsi)
static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
const struct drm_display_mode *mode)
{
- u8 bpp = mipi_dsi_pixel_format_to_bpp(d->mdsi->format);
+ /* cpp, characters per pixel, number of bytes per pixel */
+ u8 cpp = mipi_dsi_pixel_format_to_bpp(d->mdsi->format) / 8;
u64 bpl;
- u32 hfp;
- u32 hbp;
- u32 hsa;
+ int hfp;
+ int hbp;
+ int hsa;
u32 blkline_pck, line_duration;
u32 blkeol_pck, blkeol_duration;
u32 val;
@@ -420,13 +421,13 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
writel(val, d->regs + DSI_VID_MAIN_CTL);
/* Vertical frame parameters are pretty straight-forward */
- val = mode->vdisplay << DSI_VID_VSIZE_VSA_LENGTH_SHIFT;
+ val = mode->vdisplay << DSI_VID_VSIZE_VACT_LENGTH_SHIFT;
/* vertical front porch */
val |= (mode->vsync_start - mode->vdisplay)
<< DSI_VID_VSIZE_VFP_LENGTH_SHIFT;
/* vertical sync active */
val |= (mode->vsync_end - mode->vsync_start)
- << DSI_VID_VSIZE_VACT_LENGTH_SHIFT;
+ << DSI_VID_VSIZE_VSA_LENGTH_SHIFT;
/* vertical back porch */
val |= (mode->vtotal - mode->vsync_end)
<< DSI_VID_VSIZE_VBP_LENGTH_SHIFT;
@@ -437,21 +438,25 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
* horizontal resolution is given in pixels and must be re-calculated
* into bytes since this is what the hardware expects.
*
+ * hfp = horizontal front porch in bytes
+ * hbp = horizontal back porch in bytes
+ * hsa = horizontal sync active in bytes
+ *
* 6 + 2 is HFP header + checksum
*/
- hfp = (mode->hsync_start - mode->hdisplay) * bpp - 6 - 2;
+ hfp = (mode->hsync_start - mode->hdisplay) * cpp - 6 - 2;
if (d->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO_SYNC_PULSE) {
/*
* 6 is HBP header + checksum
* 4 is RGB header + checksum
*/
- hbp = (mode->htotal - mode->hsync_end) * bpp - 4 - 6;
+ hbp = (mode->htotal - mode->hsync_end) * cpp - 4 - 6;
/*
* 6 is HBP header + checksum
* 4 is HSW packet bytes
* 4 is RGB header + checksum
*/
- hsa = (mode->hsync_end - mode->hsync_start) * bpp - 4 - 4 - 6;
+ hsa = (mode->hsync_end - mode->hsync_start) * cpp - 4 - 4 - 6;
} else {
/*
* HBP includes both back porch and sync
@@ -459,11 +464,23 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
* 4 is HSW packet bytes
* 4 is RGB header + checksum
*/
- hbp = (mode->htotal - mode->hsync_start) * bpp - 4 - 4 - 6;
- /* HSA is not considered in this mode and set to 0 */
+ hbp = (mode->htotal - mode->hsync_start) * cpp - 4 - 4 - 6;
+ /* HSA is not present in this mode and set to 0 */
+ hsa = 0;
+ }
+ if (hfp < 0) {
+ dev_info(d->dev, "hfp negative, set to 0\n");
+ hfp = 0;
+ }
+ if (hbp < 0) {
+ dev_info(d->dev, "hbp negative, set to 0\n");
+ hbp = 0;
+ }
+ if (hsa < 0) {
+ dev_info(d->dev, "hsa negative, set to 0\n");
hsa = 0;
}
- dev_dbg(d->dev, "hfp: %u, hbp: %u, hsa: %u\n",
+ dev_dbg(d->dev, "hfp: %u, hbp: %u, hsa: %u bytes\n",
hfp, hbp, hsa);
/* Frame parameters: horizontal sync active */
@@ -475,7 +492,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
writel(val, d->regs + DSI_VID_HSIZE1);
/* RGB data length (bytes on one scanline) */
- val = mode->hdisplay * (bpp / 8);
+ val = mode->hdisplay * cpp;
writel(val, d->regs + DSI_VID_HSIZE2);
/* TODO: further adjustments for TVG mode here */
@@ -507,7 +524,7 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
}
line_duration = (blkline_pck + 6) / d->mdsi->lanes;
- dev_dbg(d->dev, "line duration %u\n", line_duration);
+ dev_dbg(d->dev, "line duration %u bytes\n", line_duration);
val = line_duration << DSI_VID_DPHY_TIME_REG_LINE_DURATION_SHIFT;
/*
* This is the time to perform LP->HS on D-PHY
@@ -517,17 +534,18 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
writel(val, d->regs + DSI_VID_DPHY_TIME);
/* Calculate block end of line */
- blkeol_pck = bpl - mode->hdisplay * bpp - 6;
+ blkeol_pck = bpl - mode->hdisplay * cpp - 6;
blkeol_duration = (blkeol_pck + 6) / d->mdsi->lanes;
- dev_dbg(d->dev, "blkeol pck: %u, duration: %u\n",
- blkeol_pck, blkeol_duration);
+ dev_dbg(d->dev, "blkeol pck: %u bytes, duration: %u bytes\n",
+ blkeol_pck, blkeol_duration);
if (d->mdsi->mode_flags & MIPI_DSI_MODE_VIDEO_BURST) {
/* Set up EOL clock for burst mode */
val = readl(d->regs + DSI_VID_BLKSIZE1);
val |= blkeol_pck << DSI_VID_BLKSIZE1_BLKEOL_PCK_SHIFT;
writel(val, d->regs + DSI_VID_BLKSIZE1);
- writel(blkeol_pck, d->regs + DSI_VID_VCA_SETTING2);
+ writel(blkeol_pck & DSI_VID_VCA_SETTING2_EXACT_BURST_LIMIT_MASK,
+ d->regs + DSI_VID_VCA_SETTING2);
writel(blkeol_duration, d->regs + DSI_VID_PCK_TIME);
writel(blkeol_duration - 6, d->regs + DSI_VID_VCA_SETTING1);
@@ -535,9 +553,11 @@ static void mcde_dsi_setup_video_mode(struct mcde_dsi *d,
/* Maximum line limit */
val = readl(d->regs + DSI_VID_VCA_SETTING2);
+ val &= ~DSI_VID_VCA_SETTING2_MAX_LINE_LIMIT_MASK;
val |= blkline_pck <<
DSI_VID_VCA_SETTING2_EXACT_BURST_LIMIT_SHIFT;
writel(val, d->regs + DSI_VID_VCA_SETTING2);
+ dev_dbg(d->dev, "blkline pck: %u bytes\n", blkline_pck);
/* Put IF1 into video mode */
val = readl(d->regs + DSI_MCTL_MAIN_DATA_CTL);
@@ -699,7 +719,9 @@ static void mcde_dsi_bridge_mode_set(struct drm_bridge *bridge,
lp_freq = d->mdsi->lp_rate;
else
lp_freq = DSI_DEFAULT_LP_FREQ_HZ;
- if (d->mdsi->hs_rate)
+ if (pixel_clock_hz)
+ hs_freq = pixel_clock_hz;
+ else if (d->mdsi->hs_rate)
hs_freq = d->mdsi->hs_rate;
else
hs_freq = DSI_DEFAULT_HS_FREQ_HZ;
--
2.21.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH] spi: ep93xx: Repair SPI CS lookup tables
From: Lukasz Majewski @ 2019-09-02 7:18 UTC (permalink / raw)
To: Alexander Sverdlin
Cc: Hartley Sweeten, Linus Walleij, Russell King, stable, linux-spi,
linux-gpio, Mark Brown, linux-arm-kernel
In-Reply-To: <20190831180402.10008-1-alexander.sverdlin@gmail.com>
[-- Attachment #1.1: Type: text/plain, Size: 3660 bytes --]
On Sat, 31 Aug 2019 20:04:02 +0200
Alexander Sverdlin <alexander.sverdlin@gmail.com> wrote:
> The actual device name of the SPI controller being registered on
> EP93xx is "spi0" (as seen by gpiod_find_lookup_table()). This patch
> fixes all relevant lookup tables and the following failure (seen on
> EDB9302):
>
> ep93xx-spi ep93xx-spi.0: failed to register SPI master
> ep93xx-spi: probe of ep93xx-spi.0 failed with error -22
>
> Fixes: 1dfbf334f1236 ("spi: ep93xx: Convert to use CS GPIO
> descriptors") Cc: stable@vger.kernel.org
> Signed-off-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>
> ---
> arch/arm/mach-ep93xx/edb93xx.c | 2 +-
> arch/arm/mach-ep93xx/simone.c | 2 +-
> arch/arm/mach-ep93xx/ts72xx.c | 4 ++--
> arch/arm/mach-ep93xx/vision_ep9307.c | 2 +-
> 4 files changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/arch/arm/mach-ep93xx/edb93xx.c
> b/arch/arm/mach-ep93xx/edb93xx.c index 1f0da76a39de..7b7280c21ee0
> 100644 --- a/arch/arm/mach-ep93xx/edb93xx.c
> +++ b/arch/arm/mach-ep93xx/edb93xx.c
> @@ -103,7 +103,7 @@ static struct spi_board_info
> edb93xx_spi_board_info[] __initdata = { };
>
> static struct gpiod_lookup_table edb93xx_spi_cs_gpio_table = {
> - .dev_id = "ep93xx-spi.0",
> + .dev_id = "spi0",
> .table = {
> GPIO_LOOKUP("A", 6, "cs", GPIO_ACTIVE_LOW),
> { },
> diff --git a/arch/arm/mach-ep93xx/simone.c
> b/arch/arm/mach-ep93xx/simone.c index e2658e22bba1..8a53b74dc4b2
> 100644 --- a/arch/arm/mach-ep93xx/simone.c
> +++ b/arch/arm/mach-ep93xx/simone.c
> @@ -73,7 +73,7 @@ static struct spi_board_info simone_spi_devices[]
> __initdata = {
> * v1.3 parts will still work, since the signal on SFRMOUT is
> automatic. */
> static struct gpiod_lookup_table simone_spi_cs_gpio_table = {
> - .dev_id = "ep93xx-spi.0",
> + .dev_id = "spi0",
> .table = {
> GPIO_LOOKUP("A", 1, "cs", GPIO_ACTIVE_LOW),
> { },
> diff --git a/arch/arm/mach-ep93xx/ts72xx.c
> b/arch/arm/mach-ep93xx/ts72xx.c index 582e06e104fd..e0e1b11032f1
> 100644 --- a/arch/arm/mach-ep93xx/ts72xx.c
> +++ b/arch/arm/mach-ep93xx/ts72xx.c
> @@ -267,7 +267,7 @@ static struct spi_board_info bk3_spi_board_info[]
> __initdata = {
> * goes through CPLD
> */
> static struct gpiod_lookup_table bk3_spi_cs_gpio_table = {
> - .dev_id = "ep93xx-spi.0",
> + .dev_id = "spi0",
> .table = {
> GPIO_LOOKUP("F", 3, "cs", GPIO_ACTIVE_LOW),
> { },
> @@ -316,7 +316,7 @@ static struct spi_board_info ts72xx_spi_devices[]
> __initdata = { };
>
> static struct gpiod_lookup_table ts72xx_spi_cs_gpio_table = {
> - .dev_id = "ep93xx-spi.0",
> + .dev_id = "spi0",
> .table = {
> /* DIO_17 */
> GPIO_LOOKUP("F", 2, "cs", GPIO_ACTIVE_LOW),
> diff --git a/arch/arm/mach-ep93xx/vision_ep9307.c
> b/arch/arm/mach-ep93xx/vision_ep9307.c index
> a88a1d807b32..cbcba3136d74 100644 ---
> a/arch/arm/mach-ep93xx/vision_ep9307.c +++
> b/arch/arm/mach-ep93xx/vision_ep9307.c @@ -242,7 +242,7 @@ static
> struct spi_board_info vision_spi_board_info[] __initdata = { };
>
> static struct gpiod_lookup_table vision_spi_cs_gpio_table = {
> - .dev_id = "ep93xx-spi.0",
> + .dev_id = "spi0",
> .table = {
> GPIO_LOOKUP_IDX("A", 6, "cs", 0, GPIO_ACTIVE_LOW),
> GPIO_LOOKUP_IDX("A", 7, "cs", 1, GPIO_ACTIVE_LOW),
Reviewed-by: Lukasz Majewski <lukma@denx.de>
Best regards,
Lukasz Majewski
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH v2 2/9] x86: numa: check the node id consistently for x86
From: Peter Zijlstra @ 2019-09-02 7:25 UTC (permalink / raw)
To: Yunsheng Lin
Cc: dalias, linux-sh, catalin.marinas, dave.hansen, heiko.carstens,
linuxarm, jiaxun.yang, linux-kernel, mwb, paulus, hpa, sparclinux,
chenhc, will, linux-s390, ysato, mpe, x86, rppt, borntraeger,
dledford, mingo, jeffrey.t.kirsher, benh, jhogan, nfont, mattst88,
len.brown, gor, anshuman.khandual, ink, cai, luto, tglx,
naveen.n.rao, linux-arm-kernel, rth, axboe, robin.murphy,
linux-mips, ralf, tbogendoerfer, paul.burton, linux-alpha, bp,
akpm, linuxppc-dev, davem
In-Reply-To: <ae64285f-5134-4147-7b02-34bb5d519e8c@huawei.com>
On Mon, Sep 02, 2019 at 01:46:51PM +0800, Yunsheng Lin wrote:
> On 2019/9/1 0:12, Peter Zijlstra wrote:
> > 1) because even it is not set, the device really does belong to a node.
> > It is impossible a device will have magic uniform access to memory when
> > CPUs cannot.
>
> So it means dev_to_node() will return either NUMA_NO_NODE or a
> valid node id?
NUMA_NO_NODE := -1, which is not a valid node number. It is also, like I
said, not a valid device location on a NUMA system.
Just because ACPI/BIOS is shit, doesn't mean the device doesn't have a
node association. It just means we don't know and might have to guess.
> > 2) is already true today, cpumask_of_node() requires a valid node_id.
>
> Ok, most of the user does check node_id before calling
> cpumask_of_node(), but does a little different type of checking:
>
> 1) some does " < 0" check;
> 2) some does "== NUMA_NO_NODE" check;
> 3) some does ">= MAX_NUMNODES" check;
> 4) some does "< 0 || >= MAX_NUMNODES || !node_online(node)" check.
The one true way is:
'(unsigned)node_id >= nr_node_ids'
> > 3) is just wrong and increases overhead for everyone.
>
> Ok, cpumask_of_node() is also used in some critical path such
> as scheduling, which may not need those checking, the overhead
> is unnecessary.
>
> But for non-critical path such as setup or configuration path,
> it better to have consistent checking, and also simplify the
> user code that calls cpumask_of_node().
>
> Do you think it is worth the trouble to add a new function
> such as cpumask_of_node_check(maybe some other name) to do
> consistent checking?
>
> Or caller just simply check if dev_to_node()'s return value is
> NUMA_NO_NODE before calling cpumask_of_node()?
It is not a matter of convenience. The function is called
cpumask_of_node(), when node < 0 || node >= nr_node_ids, it is not a
valid node, therefore the function shouldn't return anything except an
error.
Also note that the CONFIG_DEBUG_PER_CPU_MAPS version of
cpumask_of_node() already does this (although it wants the below fix).
---
diff --git a/arch/x86/mm/numa.c b/arch/x86/mm/numa.c
index e6dad600614c..5f49c10201c7 100644
--- a/arch/x86/mm/numa.c
+++ b/arch/x86/mm/numa.c
@@ -861,7 +861,7 @@ void numa_remove_cpu(int cpu)
*/
const struct cpumask *cpumask_of_node(int node)
{
- if (node >= nr_node_ids) {
+ if ((unsigned)node >= nr_node_ids) {
printk(KERN_WARNING
"cpumask_of_node(%d): node > nr_node_ids(%u)\n",
node, nr_node_ids);
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* Re: [PATCH v5 00/18] add thermal driver for h6
From: Maxime Ripard @ 2019-09-02 7:27 UTC (permalink / raw)
To: Yangtao Li, rui.zhang, edubezval, daniel.lezcano, robh+dt,
mark.rutland, wens, mchehab+samsung, davem, gregkh,
Jonathan.Cameron, nicolas.ferre, devicetree, linux-kernel,
linux-arm-kernel, linux-pm
In-Reply-To: <20190901215214.f4vbxemdd7mf3gun@core.my.home>
Hi,
On Sun, Sep 01, 2019 at 11:52:14PM +0200, Ondřej Jirman wrote:
> Hello Yangtao,
>
> On Sat, Aug 10, 2019 at 05:28:11AM +0000, Yangtao Li wrote:
> > This patchset add support for A64, H3, H5, H6 and R40 thermal sensor.
> >
> > Thx to Icenowy and Vasily.
> >
> > BTY, do a cleanup in thermal makfile.
>
> I've added support for A83T and also some cleanups, according to my
> feedback:
>
> https://megous.com/git/linux/log/?h=ths-5.3
>
> Feel free to pick up whatever you like from that tree.
>
> For others, there are also DTS patches in that tree for H3, H5, A83T, and H6, so
> that shoul make testing of this driver easier.
I'm not convinced that always expanding the number of SoC supported is
the best strategy to get this merged. Usually, keeping the same
feature set across version, consolidating that, and then once it's in
sending the new SoC support works best.
Maxime
--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [RFC 1/9] dt-bindings: arm: samsung: Convert Samsung board/soc bindings to json-schema
From: Krzysztof Kozlowski @ 2019-09-02 7:32 UTC (permalink / raw)
To: Rob Herring
Cc: Mark Rutland, Alessandro Zummo, Alexandre Belloni,
Lars-Peter Clausen, Arnd Bergmann, devicetree,
open list:IIO SUBSYSTEM AND DRIVERS, Marek Szyprowski,
linux-kernel@vger.kernel.org, Tomasz Figa, linux-samsung-soc,
moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE,
Peter Meerwald-Stadler, Hartmut Knaack, Olof Johansson,
open list:REAL TIME CLOCK (RTC) SUBSYSTEM, notify,
Jonathan Cameron, Paweł Chmiel
In-Reply-To: <CAL_Jsq+5MpPSjRtFp-xf8P0rBuArMFbum7yadcHNBQz_N=Ergg@mail.gmail.com>
On Mon, 26 Aug 2019 at 13:38, Rob Herring <robh+dt@kernel.org> wrote:
>
> On Fri, Aug 23, 2019 at 9:54 AM Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >
> > Convert Samsung S5P and Exynos SoC bindings to DT schema format using
> > json-schema. This is purely conversion of already documented bindings
> > so it does not cover all of DTS in the Linux kernel (few S5P/Exynos and
> > all S3C are missing).
> >
> > Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
> >
> > ---
> >
> > If the schema looks sensible, I will continue on converting other
> > SoC and driver bindings and later adding missing schemas (S3C
> > SoCs).
>
> Looks pretty good.
>
> > ---
> > .../bindings/arm/samsung/samsung-boards.txt | 83 --------
> > .../bindings/arm/samsung/samsung-boards.yaml | 188 ++++++++++++++++++
> > 2 files changed, 188 insertions(+), 83 deletions(-)
> > delete mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.txt
> > create mode 100644 Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
>
>
> > diff --git a/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
> > new file mode 100644
> > index 000000000000..e963fd70c436
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/arm/samsung/samsung-boards.yaml
> > @@ -0,0 +1,188 @@
> > +# SPDX-License-Identifier: GPL-2.0
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/arm/samsung/samsung-boards.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Samsung Exynos and S5P SoC based boards
> > +
> > +maintainers:
> > + - Krzysztof Kozlowski <krzk@kernel.org>
> > +
> > +properties:
> > + $nodename:
> > + const: '/'
> > + compatible:
> > + oneOf:
> > + - description: S5PV210 based Aries boards
> > + items:
> > + - enum:
> > + - samsung,fascinate4g # Samsung Galaxy S Fascinate 4G (SGH-T959P)
> > + - samsung,galaxys # Samsung Galaxy S (i9000)
> > + - const: samsung,aries
> > + - const: samsung,s5pv210
> > +
> > + - description: Exynos3250 based boards
> > + items:
> > + - enum:
> > + - samsung,monk # Samsung Simband
> > + - samsung,rinato # Samsung Gear2
> > + - const: samsung,exynos3250
> > + - const: samsung,exynos3
> > +
> > + - description: Samsung ARTIK5 boards
> > + items:
> > + - enum:
> > + - samsung,artik5-eval # Samsung ARTIK5 eval board
> > + - const: samsung,artik5 # Samsung ARTIK5 module
> > + - const: samsung,exynos3250
> > + - const: samsung,exynos3
> > +
> > + - description: Exynos4210 based boards
> > + items:
> > + - enum:
> > + - insignal,origen # Insignal Origen
> > + - samsung,smdkv310 # Samsung SMDKV310 eval
> > + - samsung,trats # Samsung Tizen Reference
> > + - samsung,universal_c210 # Samsung C210
> > + - const: samsung,exynos4210
> > + - const: samsung,exynos4
> > +
> > + - description: Exynos4412 based boards
> > + items:
> > + - enum:
> > + - friendlyarm,tiny4412 # FriendlyARM TINY4412
> > + - hardkernel,odroid-u3 # Hardkernel Odroid U3
> > + - hardkernel,odroid-x # Hardkernel Odroid X
> > + - hardkernel,odroid-x2 # Hardkernel Odroid X2
> > + - insignal,origen4412 # Insignal Origen
> > + - samsung,smdk4412 # Samsung SMDK4412 eval
> > + - topeet,itop4412-elite # TOPEET Elite base
> > + - const: samsung,exynos4412
> > + - const: samsung,exynos4
> > +
> > + - description: Samsung Midas family boards
> > + items:
> > + - enum:
> > + - samsung,i9300 # Samsung GT-I9300
> > + - samsung,i9305 # Samsung GT-I9305
> > + - samsung,n710x # Samsung GT-N7100/GT-N7105
> > + - samsung,trats2 # Samsung Tizen Reference
> > + - const: samsung,midas
> > + - const: samsung,exynos4412
> > + - const: samsung,exynos4
> > +
> > + - description: Exynos5250 based boards
> > + items:
> > + - enum:
> > + - google,snow-rev5 # Google Snow Rev 5+
> > + - google,spring # Google Spring
> > + - insignal,arndale # Insignal Arndale
> > + - samsung,smdk5250 # Samsung SMDK5250 eval
> > + - const: samsung,exynos5250
> > + - const: samsung,exynos5
> > +
> > + - description: Google Snow Boards (Rev 4+)
> > + items:
> > + - enum:
> > + - google,snow-rev4
>
> const here as I wouldn't expect this list to grow.
OK
>
> > + - const: google,snow
> > + - const: samsung,exynos5250
> > + - const: samsung,exynos5
> > +
> > + - description: Exynos5260 based boards
> > + items:
> > + - enum:
> > + - samsung,xyref5260 # Samsung Xyref5260 eval
> > + - const: samsung,exynos5260
> > + - const: samsung,exynos5
> > +
> > + - description: Exynos5410 based boards
> > + items:
> > + - enum:
> > + - hardkernel,odroid-xu # Hardkernel Odroid XU
> > + - samsung,smdk5410 # Samsung SMDK5410 eval
> > + - const: samsung,exynos5410
> > + - const: samsung,exynos5
> > +
> > + - description: Exynos5420 based boards
> > + items:
> > + - enum:
> > + - insignal,arndale-octa # Insignal Arndale Octa
> > + - samsung,smdk5420 # Samsung SMDK5420 eval
> > + - const: samsung,exynos5420
> > + - const: samsung,exynos5
> > +
> > + - description: Google Peach Pit Boards (Rev 6+)
> > + items:
> > + - enum:
> > + - google,pit-rev16
>
> const
OK
>
> > + - const: google,pit-rev15
> > + - const: google,pit-rev14
> > + - const: google,pit-rev13
> > + - const: google,pit-rev12
> > + - const: google,pit-rev11
> > + - const: google,pit-rev10
> > + - const: google,pit-rev9
> > + - const: google,pit-rev8
> > + - const: google,pit-rev7
> > + - const: google,pit-rev6
> > + - const: google,pit
> > + - const: google,peach
> > + - const: samsung,exynos5420
> > + - const: samsung,exynos5
> > +
> > + - description: Exynos5800 based boards
> > + items:
> > + - enum:
> > + - hardkernel,odroid-xu3 # Hardkernel Odroid XU3
> > + - hardkernel,odroid-xu3-lite # Hardkernel Odroid XU3 Lite
> > + - hardkernel,odroid-xu4 # Hardkernel Odroid XU4
> > + - hardkernel,odroid-hc1 # Hardkernel Odroid HC1
> > + - const: samsung,exynos5800
> > + - const: samsung,exynos5
> > +
> > + - description: Google Peach Pi Boards (Rev 10+)
> > + items:
> > + - enum:
> > + - google,pi-rev16
> > + - const: google,pi-rev15
> > + - const: google,pi-rev14
> > + - const: google,pi-rev13
> > + - const: google,pi-rev12
> > + - const: google,pi-rev11
> > + - const: google,pi-rev10
> > + - const: google,pi
> > + - const: google,peach
> > + - const: samsung,exynos5800
> > + - const: samsung,exynos5
> > +
> > + - description: Exynos5433 based boards
> > + items:
> > + - enum:
> > + - samsung,tm2 # Samsung TM2
> > + - samsung,tm2e # Samsung TM2E
> > + - const: samsung,exynos5433
> > +
> > + firmware:
>
> This should be moved to its own file.
Indeed, thanks for the review.
Best regards,
Krzysztof
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 2/7] dt-bindings: arm-smmu: Add binding for nvidia, smmu-v2
From: Thierry Reding @ 2019-09-02 7:38 UTC (permalink / raw)
To: Krishna Reddy
Cc: Timo Alho, Thierry Reding, Mikko Perttunen,
linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org,
Pritesh Raithatha, Thomas Zeng (SW-TEGRA), Sachin Nikam,
linux-tegra@vger.kernel.org, Yu-Huan Hsu, Juha Tukkinen,
Robin Murphy, Alexander Van Brunt,
linux-arm-kernel@lists.infradead.org
In-Reply-To: <BYAPR12MB271012F225E35C1459E58D07B3BD0@BYAPR12MB2710.namprd12.prod.outlook.com>
[-- Attachment #1.1: Type: text/plain, Size: 1963 bytes --]
On Fri, Aug 30, 2019 at 06:12:08PM +0000, Krishna Reddy wrote:
> >> + "nidia,smmu-v2"
> >> "qcom,smmu-v2"
>
> >I agree with Mikko that the compatible must be at least SoC-specific, but potentially even instance-specific (e.g. "nvidia,tegra194-gpu-smmu")
> > depending on how many of these parallel-SMMU configurations might be hiding in current and future SoCs.
>
> I am correcting the spelling mistake pointed by Mikko. The NVIDIA SMMUv2 implementation is getting used beyond Tegra194 SOC.
> To be able to use the smmu compatible string across multiple SOC's, "nvidia,smmu-v2" compatible string is chosen.
> Are you suggesting to make it soc specific and add another one in future?
Yeah, I think that's the safest thing to do. Even if we're using the
same implementation in future SoCs, chances are there will be some
changes. Even if the changes are just fixes, having a SoC-specific
compatible string will ensure we can apply workarounds only to the
implementations that are missing the fixes.
So I think "nvidia,tegra194-smmu" is a good candidate. It uniquely
identifies the instantiation of the IP in Tegra194. Also, if it ever
turns out that the instantiation of the SMMU in the next Tegra
generation is *exactly* the same (even if highly unlikely), there's
nothing wrong with reusing the "nvidia,tegra194-smmu".
We've done similar things in the past, where some new IP was mostly
compatible with old IP. Typically we still include a new compatible
string in case any errata are discovered subsequently. It's not uncommon
to see things like:
compatible = "nvidia,tegra124-xyz", "nvidia,tegra20-xyz";
Basically this means that this is the IP that was also used in Tegra20
and the same Tegra20 driver can be used to drive this hardware on
Tegra124. The Tegra124-specific compatible string may enable newer
features if there's a driver that supports it.
Thierry
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/3] ASoC: xlnx: add Xilinx logicPD-I2S FPGA IP support
From: Michal Simek @ 2019-09-02 7:39 UTC (permalink / raw)
To: Miquel Raynal, Liam Girdwood, Mark Brown, Jaroslav Kysela,
Takashi Iwai
Cc: Mark Rutland, devicetree, alsa-devel,
Maruthi Srinivas Bayyavarapu, Michal Simek, Rob Herring,
Thomas Petazzoni, praveenv, alexandre, linux-arm-kernel
In-Reply-To: <20190830210607.22644-1-miquel.raynal@bootlin.com>
Hi Miquel
On 30. 08. 19 23:06, Miquel Raynal wrote:
> This IP is very simple so this driver manage both the DAI and the PCM
> streams, hence the presence of both components in this driver.
>
> There are plenty available interruptions when capturing or playing
> back audio that can be triggered but the only one that fits the ALSA
> sound system is the XFER_DONE which is used to bound sound
> periods. Other interrupts are masked. Please note that capture and
> playback are not possible at the same time though.
>
> Capture seems to work (at least it creates a file with something
> inside) but I have no capture mechanism on the board to actually test
> that it works correctly.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
>
> Hello,
>
> This is my first contribution in the sound subsystem, I hope I've
> understood the core but I might be entirely wrong as well, so please
> do not hesitate to be critical on my choices.
>
> Thanks,
> Miquèl
>
> sound/soc/xilinx/Kconfig | 7 +
> sound/soc/xilinx/Makefile | 2 +
> sound/soc/xilinx/xlnx-logicpd-i2s.c | 468 ++++++++++++++++++++++++++++
What IP is this?
https://www.xilinx.com/products/intellectual-property/audio-i2s.html
https://github.com/Xilinx/linux-xlnx/blob/master/sound/soc/xilinx/xlnx_i2s.c
Anyway I am adding Praveen and Maruthi to take a look.
Thanks,
Michal
> 3 files changed, 477 insertions(+)
> create mode 100644 sound/soc/xilinx/xlnx-logicpd-i2s.c
>
> diff --git a/sound/soc/xilinx/Kconfig b/sound/soc/xilinx/Kconfig
> index 47f606b924e4..b62cae6750b9 100644
> --- a/sound/soc/xilinx/Kconfig
> +++ b/sound/soc/xilinx/Kconfig
> @@ -7,6 +7,13 @@ config SND_SOC_XILINX_I2S
> PCM data. In receiver mode, IP receives PCM audio and
> encapsulates PCM in AES format and sends AES data.
>
> +config SND_SOC_XILINX_LOGICPD_I2S
> + tristate "Audio support for the Xilinx logicPD I2S"
> + help
> + Select this option to enable Xilinx logicPD I2S slave
> + transceiver. This enables I2S playback and capture using
> + Xilinx/logicPD IP.
> +
> config SND_SOC_XILINX_AUDIO_FORMATTER
> tristate "Audio support for the the Xilinx audio formatter"
> help
> diff --git a/sound/soc/xilinx/Makefile b/sound/soc/xilinx/Makefile
> index d79fd38b094b..d127c30f8fe2 100644
> --- a/sound/soc/xilinx/Makefile
> +++ b/sound/soc/xilinx/Makefile
> @@ -1,5 +1,7 @@
> snd-soc-xlnx-i2s-objs := xlnx_i2s.o
> obj-$(CONFIG_SND_SOC_XILINX_I2S) += snd-soc-xlnx-i2s.o
> +snd-soc-xlnx-logicpd-i2s-objs := xlnx-logicpd-i2s.o
> +obj-$(CONFIG_SND_SOC_XILINX_LOGICPD_I2S) += snd-soc-xlnx-logicpd-i2s.o
> snd-soc-xlnx-formatter-pcm-objs := xlnx_formatter_pcm.o
> obj-$(CONFIG_SND_SOC_XILINX_AUDIO_FORMATTER) += snd-soc-xlnx-formatter-pcm.o
> snd-soc-xlnx-spdif-objs := xlnx_spdif.o
> diff --git a/sound/soc/xilinx/xlnx-logicpd-i2s.c b/sound/soc/xilinx/xlnx-logicpd-i2s.c
> new file mode 100644
> index 000000000000..325a5bb6978a
> --- /dev/null
> +++ b/sound/soc/xilinx/xlnx-logicpd-i2s.c
> @@ -0,0 +1,468 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Xilinx logicPD logiI2S - I2S slave transceiver v2 support
> + *
> + * Copyright (C) 2019 Bootlin
> + *
> + * Author: Miquel Raynal <miquel.raynal@bootlin.com>
> + */
> +
> +#include <linux/dma-mapping.h>
> +#include <linux/io.h>
> +#include <linux/module.h>
> +#include <linux/of.h>
> +#include <linux/of_platform.h>
> +#include <linux/platform_device.h>
> +#include <sound/dmaengine_pcm.h>
> +#include <sound/pcm_params.h>
> +#include <sound/soc.h>
> +
> +#define DRV_NAME "xlnx_logicpd_i2s"
> +
> +#define IP_VERSION 0x0
> +#define PATCH_LEVEL(reg) (((reg) & GENMASK(4, 0)) + 'a')
> +#define MINOR_REV(reg) (((reg) & GENMASK(10, 5)) >> 5)
> +#define MAJOR_REV(reg) (((reg) & GENMASK(16, 11)) >> 11)
> +#define LICENSE_TYPE(reg) (((reg) & GENMASK(18, 17)) >> 17)
> +#define CONTROL_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0x4 : 0x24)
> +#define ENGINE_EN BIT(0)
> +#define XFER_DONE BIT(1)
> +#define BUFF_BASE_ADDR_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0x8 : 0x28)
> +#define BUFF_LEN_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0xC : 0x2C)
> +#define FIFO_STAT_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0x10 : 0x30)
> +#define INTR_MASK_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0x14 : 0x34)
> +#define XFER_DONE_INTR BIT(31)
> +#define INTR_STAT_REG(s) ((s) == SNDRV_PCM_STREAM_PLAYBACK ? 0x18 : 0x38)
> +#define FIFO_COUNT(reg) ((reg) >> 20)
> +
> +#define BYTES_TO_WORDS(n) ((n) / 4)
> +
> +/* Arbitrarily chosen period size */
> +#define PCM_PERIOD_WORDS SZ_8K
> +#define PCM_PERIOD_BYTES (PCM_PERIOD_WORDS * 4)
> +/* This is the actual maximum size that can actually be moved in one chunk */
> +#define PCM_BUF_WORDS (SZ_64K - 1)
> +#define PCM_BUF_BYTES (PCM_BUF_WORDS * 4)
> +
> +struct xlnx_logicpd_i2s;
> +
> +/**
> + * struct xlnx_logicpd_stream - Internal stream representation
> + *
> + * @i2s: Chip data
> + * @substream: Core substream structure
> + * @period_idx: Index of the period within the circular buffer
> + */
> +struct xlnx_logicpd_stream {
> + struct xlnx_logicpd_i2s *i2s;
> + struct snd_pcm_substream *substream;
> + unsigned int period_idx;
> +};
> +
> +/**
> + * struct xlnx_logicpd_i2s - Chip structure
> + *
> + * @base: Registers base address
> + * @streams: Playback and capture streams in an array
> + */
> +struct xlnx_logicpd_i2s {
> + void __iomem *base;
> + struct xlnx_logicpd_stream streams[2];
> +};
> +
> +static struct xlnx_logicpd_i2s *substream_to_cpu_dai_chip(struct snd_pcm_substream *substream)
> +{
> + struct snd_soc_pcm_runtime *rtd = snd_pcm_substream_chip(substream);
> +
> + return snd_soc_dai_get_drvdata(rtd->cpu_dai);
> +}
> +
> +/* PCM methods */
> +
> +static const struct snd_pcm_hardware xlnx_logicpd_pcm_hardware = {
> + .info = SNDRV_PCM_INFO_MMAP |
> + SNDRV_PCM_INFO_MMAP_VALID |
> + SNDRV_PCM_INFO_INTERLEAVED |
> + SNDRV_PCM_INFO_HALF_DUPLEX,
> + .formats = SNDRV_PCM_FMTBIT_S16_LE,
> + .rates = SNDRV_PCM_RATE_8000_192000,
> + .rate_min = 8000,
> + .rate_max = 192000,
> + .channels_min = 2,
> + .channels_max = 2,
> + .period_bytes_min = 0,
> + .period_bytes_max = PCM_PERIOD_BYTES,
> + .periods_min = 0,
> + .periods_max = -1,
> + .buffer_bytes_max = PCM_BUF_BYTES,
> +};
> +
> +static int xlnx_logicpd_pcm_open(struct snd_pcm_substream *substream)
> +{
> + struct xlnx_logicpd_i2s *i2s = substream_to_cpu_dai_chip(substream);
> + unsigned int dir = substream->stream;
> +
> + snd_soc_set_runtime_hwparams(substream, &xlnx_logicpd_pcm_hardware);
> +
> + i2s->streams[dir].substream = substream;
> +
> + return 0;
> +}
> +
> +static int xlnx_logicpd_pcm_close(struct snd_pcm_substream *substream)
> +{
> + struct xlnx_logicpd_i2s *i2s = substream_to_cpu_dai_chip(substream);
> + unsigned int dir = substream->stream;
> +
> + i2s->streams[dir].substream = NULL;
> +
> + return 0;
> +}
> +
> +static int xlnx_logicpd_pcm_hw_params(struct snd_pcm_substream *substream,
> + struct snd_pcm_hw_params *params)
> +{
> + struct snd_pcm_runtime *runtime = substream->runtime;
> +
> + snd_pcm_set_runtime_buffer(substream, &substream->dma_buffer);
> + runtime->dma_bytes = params_buffer_bytes(params);
> +
> + return 0;
> +}
> +
> +static snd_pcm_uframes_t xlnx_logicpd_pcm_pointer(struct snd_pcm_substream *substream)
> +{
> + struct xlnx_logicpd_i2s *i2s = substream_to_cpu_dai_chip(substream);
> + struct snd_pcm_runtime *runtime = substream->runtime;
> + unsigned int period_sz = snd_pcm_lib_period_bytes(substream);
> + unsigned int dir = substream->stream;
> +
> + return bytes_to_frames(runtime,
> + i2s->streams[dir].period_idx * period_sz);
> +}
> +
> +static int xlnx_logicpd_pcm_mmap(struct snd_pcm_substream *substream,
> + struct vm_area_struct *vma)
> +{
> + return remap_pfn_range(vma, vma->vm_start,
> + substream->dma_buffer.addr >> PAGE_SHIFT,
> + vma->vm_end - vma->vm_start, vma->vm_page_prot);
> +}
> +
> +static const struct snd_pcm_ops xlnx_logicpd_pcm_ops = {
> + .open = xlnx_logicpd_pcm_open,
> + .close = xlnx_logicpd_pcm_close,
> + .ioctl = snd_pcm_lib_ioctl,
> + .hw_params = xlnx_logicpd_pcm_hw_params,
> + .pointer = xlnx_logicpd_pcm_pointer,
> + .mmap = xlnx_logicpd_pcm_mmap,
> +};
> +
> +static int xlnx_logicpd_pcm_new(struct snd_soc_pcm_runtime *rtd)
> +{
> + struct snd_pcm *pcm = rtd->pcm;
> + struct snd_pcm_substream *substream;
> + struct snd_dma_buffer *buf;
> + int dir;
> +
> + for (dir = SNDRV_PCM_STREAM_PLAYBACK;
> + dir <= SNDRV_PCM_STREAM_CAPTURE; dir++) {
> + substream = pcm->streams[dir].substream;
> + if (!substream)
> + continue;
> +
> + buf = &substream->dma_buffer;
> + buf->area = dma_alloc_coherent(pcm->card->dev, PCM_BUF_BYTES,
> + &buf->addr, GFP_KERNEL);
> + buf->bytes = PCM_BUF_BYTES;
> + if (!buf->area)
> + return -ENOMEM;
> + }
> +
> + return 0;
> +}
> +
> +static void xlnx_logicpd_pcm_free(struct snd_pcm *pcm)
> +{
> + struct snd_pcm_substream *substream;
> + struct snd_dma_buffer *buf;
> + int dir;
> +
> + for (dir = SNDRV_PCM_STREAM_PLAYBACK;
> + dir <= SNDRV_PCM_STREAM_CAPTURE; dir++) {
> + substream = pcm->streams[dir].substream;
> + if (!substream)
> + continue;
> +
> + buf = &substream->dma_buffer;
> + if (!buf->area)
> + continue;
> +
> + dma_free_coherent(pcm->card->dev, buf->bytes,
> + buf->area, buf->addr);
> + buf->area = NULL;
> + }
> +}
> +
> +static const struct snd_soc_component_driver xlnx_logicpd_pcm_component = {
> + .name = "xlnx-logicp-pcm",
> + .ops = &xlnx_logicpd_pcm_ops,
> + .pcm_new = xlnx_logicpd_pcm_new,
> + .pcm_free = xlnx_logicpd_pcm_free,
> +};
> +
> +/* DAI methods */
> +
> +static void xlnx_logicpd_dai_int_en(struct xlnx_logicpd_i2s *i2s, int dir)
> +{
> + u32 reg;
> +
> + reg = readl_relaxed(i2s->base + INTR_MASK_REG(dir));
> + reg &= ~XFER_DONE_INTR;
> + writel(reg, i2s->base + INTR_MASK_REG(dir));
> +}
> +
> +static void xlnx_logicpd_dai_int_dis(struct xlnx_logicpd_i2s *i2s, int dir)
> +{
> + u32 reg;
> +
> + reg = readl_relaxed(i2s->base + INTR_MASK_REG(dir));
> + reg |= XFER_DONE_INTR;
> + writel_relaxed(reg, i2s->base + INTR_MASK_REG(dir));
> +}
> +
> +static irqreturn_t xlnx_logicpd_dai_isr(int irq, void *dev_id)
> +{
> + struct xlnx_logicpd_stream *stream = dev_id;
> + struct xlnx_logicpd_i2s *i2s = stream->i2s;
> + struct snd_pcm_substream *substream = stream->substream;
> + unsigned int period_sz = snd_pcm_lib_period_bytes(substream);
> + unsigned int buf_sz = snd_pcm_lib_buffer_bytes(substream);
> + dma_addr_t buf_addr = substream->dma_buffer.addr;
> + unsigned int dir = substream->stream;
> + u32 reg;
> +
> + /* Reading INTR_STAT deasserts the host interrupt */
> + reg = readl_relaxed(i2s->base + INTR_STAT_REG(dir));
> +
> + /*
> + * When the XFER_DONE interrupt is triggered, it means the period has
> + * been entirely shifted into the FIFO. At this point, we can move the
> + * buffer pointer to the next period and ask to transfer another chunk
> + * of data. Whenever the FIFO will be at its "almost full" state (4096
> + * words minus the threshold of 100 words) the internal DMA engine will
> + * automatically restart shifting data to the FIFO until its full state.
> + * Hence, the host has up to 3996 words (in our case, 3996 frames) to
> + * serve the interrupt before an underrun that would happen, at eg.
> + * 44100Hz, after 90ms.
> + */
> + if (reg & XFER_DONE_INTR) {
> + unsigned int offset_in_buf = ++stream->period_idx * period_sz;
> +
> + if (offset_in_buf >= buf_sz) {
> + stream->period_idx = 0;
> + offset_in_buf = stream->period_idx * period_sz;
> + }
> +
> + /* Move on to the next period in the overall buffer */
> + writel_relaxed(buf_addr + offset_in_buf,
> + i2s->base + BUFF_BASE_ADDR_REG(dir));
> + /* The last period might be smaller, update length if needed */
> + period_sz = min(period_sz, buf_sz - offset_in_buf);
> + writel_relaxed(BYTES_TO_WORDS(period_sz),
> + i2s->base + BUFF_LEN_REG(dir));
> +
> + /* Inform the PCM middle-layer */
> + snd_pcm_period_elapsed(substream);
> + }
> +
> + return IRQ_HANDLED;
> +}
> +
> +static int xlnx_logicpd_dai_trigger(struct snd_pcm_substream *substream,
> + int cmd, struct snd_soc_dai *dai)
> +{
> + struct xlnx_logicpd_i2s *i2s = snd_soc_dai_get_drvdata(dai);
> + unsigned int period_sz = snd_pcm_lib_period_bytes(substream);
> + dma_addr_t buf_addr = substream->dma_buffer.addr;
> + unsigned int dir = substream->stream;
> +
> + switch (cmd) {
> + case SNDRV_PCM_TRIGGER_START:
> + i2s->streams[dir].period_idx = 0;
> + /* Disable the other engine if enabled */
> + if (readl(i2s->base + CONTROL_REG(!dir)) & ENGINE_EN)
> + writel(0, i2s->base + CONTROL_REG(!dir));
> + /* Enable the desired engine */
> + writel_relaxed(ENGINE_EN, i2s->base + CONTROL_REG(dir));
> + /* Set the buffer start address */
> + writel_relaxed(buf_addr, i2s->base + BUFF_BASE_ADDR_REG(dir));
> + /* Enable the XFER_DONE IRQ, signaling the end of the period */
> + xlnx_logicpd_dai_int_en(i2s, dir);
> + /* Actually start the internal DMA engine */
> + writel(BYTES_TO_WORDS(period_sz),
> + i2s->base + BUFF_LEN_REG(dir));
> + break;
> + case SNDRV_PCM_TRIGGER_STOP:
> + /* Disable the interrupts */
> + xlnx_logicpd_dai_int_dis(i2s, dir);
> + /* Ensure the host IRQ is deasserted */
> + readl_relaxed(i2s->base + INTR_STAT_REG(dir));
> + break;
> + case SNDRV_PCM_TRIGGER_RESUME:
> + case SNDRV_PCM_TRIGGER_PAUSE_RELEASE:
> + case SNDRV_PCM_TRIGGER_SUSPEND:
> + case SNDRV_PCM_TRIGGER_PAUSE_PUSH:
> + default:
> + return -EINVAL;
> + }
> +
> + return 0;
> +}
> +
> +static const struct snd_soc_dai_ops xlnx_logicpd_dai_ops = {
> + .trigger = xlnx_logicpd_dai_trigger,
> +};
> +
> +static int xlnx_logicpd_dai_probe(struct snd_soc_dai *dai)
> +{
> + struct xlnx_logicpd_i2s *i2s = snd_soc_dai_get_drvdata(dai);
> + unsigned int dir;
> +
> + for (dir = SNDRV_PCM_STREAM_PLAYBACK;
> + dir <= SNDRV_PCM_STREAM_CAPTURE; dir++) {
> + i2s->streams[dir].i2s = i2s;
> +
> + /* Reset the transmitter/receiver engine */
> + writel_relaxed(0, i2s->base + CONTROL_REG(dir));
> + /* Mask all interrupts */
> + writel_relaxed(GENMASK(31, 0), i2s->base + INTR_MASK_REG(dir));
> + }
> +
> + return 0;
> +}
> +
> +struct snd_soc_dai_driver xlnx_logicpd_dai = {
> + .name = "xylinx-logicpd-dai",
> + .probe = xlnx_logicpd_dai_probe,
> + .capture = {
> + .stream_name = "Capture",
> + .channels_min = 2,
> + .channels_max = 2,
> + .rates = SNDRV_PCM_RATE_8000_192000,
> + .rate_min = 8000,
> + .rate_max = 192000,
> + .formats = SNDRV_PCM_FMTBIT_S16_LE,
> + },
> + .playback = {
> + .stream_name = "Playback",
> + .channels_min = 2,
> + .channels_max = 2,
> + .rates = SNDRV_PCM_RATE_8000_192000,
> + .rate_min = 8000,
> + .rate_max = 192000,
> + .formats = SNDRV_PCM_FMTBIT_S16_LE,
> + },
> + .symmetric_rates = 1,
> + .ops = &xlnx_logicpd_dai_ops,
> +};
> +
> +static const struct snd_soc_component_driver xlnx_logicpd_i2s_component = {
> + .name = DRV_NAME,
> + .ops = &xlnx_logicpd_pcm_ops,
> +};
> +
> +static const struct of_device_id xlnx_logicpd_i2s_of_match[] = {
> + {
> + .compatible = "xlnx,logicpd-i2s-dai",
> + },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, xlnx_logicpd_i2s_of_match);
> +
> +static int xlnx_logicpd_i2s_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct xlnx_logicpd_i2s *i2s;
> + struct xlnx_logicpd_stream *stream;
> + int tx_irq, rx_irq, ret;
> + u32 reg;
> +
> + i2s = devm_kzalloc(dev, sizeof(*i2s), GFP_KERNEL);
> + if (!i2s)
> + return -ENOMEM;
> +
> + dev_set_drvdata(dev, i2s);
> +
> + i2s->base = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(i2s->base))
> + return PTR_ERR(i2s->base);
> +
> + stream = &i2s->streams[SNDRV_PCM_STREAM_PLAYBACK];
> + tx_irq = platform_get_irq_byname(pdev, "tx");
> + if (tx_irq > 0) {
> + ret = devm_request_irq(dev, tx_irq, xlnx_logicpd_dai_isr,
> + 0, "logicpd-i2s-tx", stream);
> + if (ret)
> + return ret;
> + } else {
> + dev_err(dev, "TX IRQ not available (%d), disabling playback\n",
> + tx_irq);
> + tx_irq = 0;
> + }
> +
> + stream = &i2s->streams[SNDRV_PCM_STREAM_CAPTURE];
> + rx_irq = platform_get_irq_byname(pdev, "rx");
> + if (rx_irq > 0) {
> + ret = devm_request_irq(dev, rx_irq, xlnx_logicpd_dai_isr,
> + 0, "logicpd-i2s-rx", stream);
> + if (ret)
> + return ret;
> + } else {
> + dev_err(dev, "RX IRQ not available (%d), disabling capture\n",
> + rx_irq);
> + rx_irq = 0;
> + }
> +
> + if (!tx_irq && !rx_irq)
> + return -EINVAL;
> +
> + ret = devm_snd_soc_register_component(dev, &xlnx_logicpd_pcm_component,
> + NULL, 0);
> + if (ret) {
> + dev_err(dev, "cannot register PCM component (%d)\n", ret);
> + return ret;
> + }
> +
> + ret = devm_snd_soc_register_component(dev, &xlnx_logicpd_i2s_component,
> + &xlnx_logicpd_dai, 1);
> + if (ret) {
> + dev_err(dev, "cannot register I2S component (%d)\n", ret);
> + return ret;
> + }
> +
> + reg = readl_relaxed(i2s->base + IP_VERSION);
> + dev_info(dev, "%s DAI version %u.%u.%c (license: %s) registered\n",
> + xlnx_logicpd_dai.name,
> + (unsigned int)MAJOR_REV(reg),
> + (unsigned int)MINOR_REV(reg),
> + (char)PATCH_LEVEL(reg),
> + LICENSE_TYPE(reg) == 0 ? "source" :
> + (LICENSE_TYPE(reg) == 1 ? "eval" : "release"));
> +
> + return ret;
> +}
> +
> +static struct platform_driver xlnx_logicpd_i2s_driver = {
> + .driver = {
> + .name = DRV_NAME,
> + .of_match_table = xlnx_logicpd_i2s_of_match,
> + },
> + .probe = xlnx_logicpd_i2s_probe,
> +};
> +
> +module_platform_driver(xlnx_logicpd_i2s_driver);
> +
> +MODULE_AUTHOR("Miquel Raynal <miquel.raynal@bootlin.com>");
> +MODULE_DESCRIPTION("Xilinx logicPD I2S module");
> +MODULE_LICENSE("GPL v2");
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH 1/2] drm/mediatek: Support CMDQ interface in ddp component
From: Nicolas Boichat @ 2019-09-02 7:44 UTC (permalink / raw)
To: Bibby Hsieh
Cc: Yongqiang Niu, David Airlie, Daniel Vetter, lkml, dri-devel,
Tomasz Figa, YT Shen, CK Hu, Thierry Reding,
moderated list:ARM/Mediatek SoC support, Philipp Zabel,
Matthias Brugger, linux-arm Mailing List
In-Reply-To: <20190830074103.16671-2-bibby.hsieh@mediatek.com>
On Fri, Aug 30, 2019 at 3:41 PM Bibby Hsieh <bibby.hsieh@mediatek.com> wrote:
>
> The CMDQ (Command Queue) in MT8183 is used to help
> update all relevant display controller registers
> with critical time limation.
> This patch add cmdq interface in ddp_comp interface,
> let all ddp_comp interface can support cpu/cmdq function
> at the same time.
>
> Signed-off-by: YT Shen <yt.shen@mediatek.com>
> Signed-off-by: CK Hu <ck.hu@mediatek.com>
> Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
> Signed-off-by: Bibby Hsieh <bibby.hsieh@mediatek.com>
> Signed-off-by: Yongqiang Niu <yongqiang.niu@mediatek.com>
> ---
> drivers/gpu/drm/mediatek/mtk_disp_color.c | 7 +-
> drivers/gpu/drm/mediatek/mtk_disp_ovl.c | 78 +++++++-------
> drivers/gpu/drm/mediatek/mtk_disp_rdma.c | 66 ++++++------
> drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 110 ++++++++++++++------
> drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h | 53 ++++++----
> 5 files changed, 187 insertions(+), 127 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_color.c b/drivers/gpu/drm/mediatek/mtk_disp_color.c
> index f33d98b356d6..c5d3e3cf8ad5 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_color.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_color.c
> @@ -9,6 +9,7 @@
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> +#include <linux/soc/mediatek/mtk-cmdq.h>
>
> #include "mtk_drm_crtc.h"
> #include "mtk_drm_ddp_comp.h"
> @@ -45,12 +46,12 @@ static inline struct mtk_disp_color *comp_to_color(struct mtk_ddp_comp *comp)
>
> static void mtk_color_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> struct mtk_disp_color *color = comp_to_color(comp);
>
> - writel(w, comp->regs + DISP_COLOR_WIDTH(color));
> - writel(h, comp->regs + DISP_COLOR_HEIGHT(color));
> + mtk_ddp_write(cmdq_pkt, w, comp, DISP_COLOR_WIDTH(color));
> + mtk_ddp_write(cmdq_pkt, h, comp, DISP_COLOR_HEIGHT(color));
> }
>
> static void mtk_color_start(struct mtk_ddp_comp *comp)
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> index 94c80c215c6e..f11c785199d3 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_ovl.c
> @@ -9,6 +9,7 @@
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> +#include <linux/soc/mediatek/mtk-cmdq.h>
>
> #include "mtk_drm_crtc.h"
> #include "mtk_drm_ddp_comp.h"
> @@ -120,14 +121,15 @@ static void mtk_ovl_stop(struct mtk_ddp_comp *comp)
>
> static void mtk_ovl_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> if (w != 0 && h != 0)
> - writel_relaxed(h << 16 | w, comp->regs + DISP_REG_OVL_ROI_SIZE);
> - writel_relaxed(0x0, comp->regs + DISP_REG_OVL_ROI_BGCLR);
> + mtk_ddp_write_relaxed(cmdq_pkt, h << 16 | w, comp,
> + DISP_REG_OVL_ROI_SIZE);
> + mtk_ddp_write_relaxed(cmdq_pkt, 0x0, comp, DISP_REG_OVL_ROI_BGCLR);
>
> - writel(0x1, comp->regs + DISP_REG_OVL_RST);
> - writel(0x0, comp->regs + DISP_REG_OVL_RST);
> + mtk_ddp_write(cmdq_pkt, 0x1, comp, DISP_REG_OVL_RST);
> + mtk_ddp_write(cmdq_pkt, 0x0, comp, DISP_REG_OVL_RST);
> }
>
> static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
> @@ -137,7 +139,8 @@ static unsigned int mtk_ovl_layer_nr(struct mtk_ddp_comp *comp)
> return ovl->data->layer_nr;
> }
>
> -static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
> +static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt)
> {
> unsigned int reg;
> unsigned int gmc_thrshd_l;
> @@ -145,8 +148,8 @@ static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
> unsigned int gmc_value;
> struct mtk_disp_ovl *ovl = comp_to_ovl(comp);
>
> - writel(0x1, comp->regs + DISP_REG_OVL_RDMA_CTRL(idx));
> -
> + mtk_ddp_write(cmdq_pkt, 0x1, comp,
> + DISP_REG_OVL_RDMA_CTRL(idx));
> gmc_thrshd_l = GMC_THRESHOLD_LOW >>
> (GMC_THRESHOLD_BITS - ovl->data->gmc_bits);
> gmc_thrshd_h = GMC_THRESHOLD_HIGH >>
> @@ -156,22 +159,19 @@ static void mtk_ovl_layer_on(struct mtk_ddp_comp *comp, unsigned int idx)
> else
> gmc_value = gmc_thrshd_l | gmc_thrshd_l << 8 |
> gmc_thrshd_h << 16 | gmc_thrshd_h << 24;
> - writel(gmc_value, comp->regs + DISP_REG_OVL_RDMA_GMC(idx));
> -
> - reg = readl(comp->regs + DISP_REG_OVL_SRC_CON);
> - reg = reg | BIT(idx);
> - writel(reg, comp->regs + DISP_REG_OVL_SRC_CON);
You get rid of all uses of the "reg" variable, so please drop the
declaration too.
> + mtk_ddp_write(cmdq_pkt, gmc_value,
> + comp, DISP_REG_OVL_RDMA_GMC(idx));
> + mtk_ddp_write_mask(cmdq_pkt, BIT(idx), comp,
> + DISP_REG_OVL_SRC_CON, BIT(idx));
> }
>
> -static void mtk_ovl_layer_off(struct mtk_ddp_comp *comp, unsigned int idx)
> +static void mtk_ovl_layer_off(struct mtk_ddp_comp *comp, unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt)
> {
> - unsigned int reg;
> -
> - reg = readl(comp->regs + DISP_REG_OVL_SRC_CON);
> - reg = reg & ~BIT(idx);
> - writel(reg, comp->regs + DISP_REG_OVL_SRC_CON);
> -
> - writel(0x0, comp->regs + DISP_REG_OVL_RDMA_CTRL(idx));
> + mtk_ddp_write_mask(cmdq_pkt, 0, comp,
> + DISP_REG_OVL_SRC_CON, BIT(idx));
> + mtk_ddp_write(cmdq_pkt, 0, comp,
> + DISP_REG_OVL_RDMA_CTRL(idx));
> }
>
> static unsigned int ovl_fmt_convert(struct mtk_disp_ovl *ovl, unsigned int fmt)
> @@ -211,7 +211,8 @@ static unsigned int ovl_fmt_convert(struct mtk_disp_ovl *ovl, unsigned int fmt)
> }
>
> static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
> - struct mtk_plane_state *state)
> + struct mtk_plane_state *state,
> + struct cmdq_pkt *cmdq_pkt)
> {
> struct mtk_disp_ovl *ovl = comp_to_ovl(comp);
> struct mtk_plane_pending_state *pending = &state->pending;
> @@ -223,38 +224,37 @@ static void mtk_ovl_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
> unsigned int con;
>
> if (!pending->enable)
> - mtk_ovl_layer_off(comp, idx);
> + mtk_ovl_layer_off(comp, idx, cmdq_pkt);
>
> con = ovl_fmt_convert(ovl, fmt);
> if (idx != 0)
> con |= OVL_CON_AEN | OVL_CON_ALPHA;
>
> - writel_relaxed(con, comp->regs + DISP_REG_OVL_CON(idx));
> - writel_relaxed(pitch, comp->regs + DISP_REG_OVL_PITCH(idx));
> - writel_relaxed(src_size, comp->regs + DISP_REG_OVL_SRC_SIZE(idx));
> - writel_relaxed(offset, comp->regs + DISP_REG_OVL_OFFSET(idx));
> - writel_relaxed(addr, comp->regs + DISP_REG_OVL_ADDR(ovl, idx));
> + mtk_ddp_write_relaxed(cmdq_pkt, con, comp,
> + DISP_REG_OVL_CON(idx));
> + mtk_ddp_write_relaxed(cmdq_pkt, pitch, comp,
> + DISP_REG_OVL_PITCH(idx));
> + mtk_ddp_write_relaxed(cmdq_pkt, src_size, comp,
> + DISP_REG_OVL_SRC_SIZE(idx));
> + mtk_ddp_write_relaxed(cmdq_pkt, offset, comp,
> + DISP_REG_OVL_OFFSET(idx));
> + mtk_ddp_write_relaxed(cmdq_pkt, addr, comp,
> + DISP_REG_OVL_ADDR(ovl, idx));
>
> if (pending->enable)
> - mtk_ovl_layer_on(comp, idx);
> + mtk_ovl_layer_on(comp, idx, cmdq_pkt);
> }
>
> static void mtk_ovl_bgclr_in_on(struct mtk_ddp_comp *comp)
> {
> - unsigned int reg;
> -
> - reg = readl(comp->regs + DISP_REG_OVL_DATAPATH_CON);
> - reg = reg | OVL_BGCLR_SEL_IN;
> - writel(reg, comp->regs + DISP_REG_OVL_DATAPATH_CON);
> + mtk_ddp_write_mask(NULL, OVL_BGCLR_SEL_IN, comp,
> + DISP_REG_OVL_DATAPATH_CON, OVL_BGCLR_SEL_IN);
> }
>
> static void mtk_ovl_bgclr_in_off(struct mtk_ddp_comp *comp)
> {
> - unsigned int reg;
> -
> - reg = readl(comp->regs + DISP_REG_OVL_DATAPATH_CON);
> - reg = reg & ~OVL_BGCLR_SEL_IN;
> - writel(reg, comp->regs + DISP_REG_OVL_DATAPATH_CON);
> + mtk_ddp_write_mask(NULL, 0, comp,
> + DISP_REG_OVL_DATAPATH_CON, OVL_BGCLR_SEL_IN);
> }
>
> static const struct mtk_ddp_comp_funcs mtk_disp_ovl_funcs = {
> diff --git a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> index 24945fec00b1..6df372dac3e3 100644
> --- a/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> +++ b/drivers/gpu/drm/mediatek/mtk_disp_rdma.c
> @@ -9,6 +9,7 @@
> #include <linux/of_device.h>
> #include <linux/of_irq.h>
> #include <linux/platform_device.h>
> +#include <linux/soc/mediatek/mtk-cmdq.h>
>
> #include "mtk_drm_crtc.h"
> #include "mtk_drm_ddp_comp.h"
> @@ -86,23 +87,14 @@ static irqreturn_t mtk_disp_rdma_irq_handler(int irq, void *dev_id)
> return IRQ_HANDLED;
> }
>
> -static void rdma_update_bits(struct mtk_ddp_comp *comp, unsigned int reg,
> - unsigned int mask, unsigned int val)
> -{
> - unsigned int tmp = readl(comp->regs + reg);
> -
> - tmp = (tmp & ~mask) | (val & mask);
> - writel(tmp, comp->regs + reg);
> -}
> -
> static void mtk_rdma_enable_vblank(struct mtk_ddp_comp *comp,
> struct drm_crtc *crtc)
> {
> struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
>
> rdma->crtc = crtc;
> - rdma_update_bits(comp, DISP_REG_RDMA_INT_ENABLE, RDMA_FRAME_END_INT,
> - RDMA_FRAME_END_INT);
> + mtk_ddp_write_mask(NULL, RDMA_FRAME_END_INT, comp,
> + DISP_REG_RDMA_INT_ENABLE, RDMA_FRAME_END_INT);
> }
>
> static void mtk_rdma_disable_vblank(struct mtk_ddp_comp *comp)
> @@ -110,31 +102,35 @@ static void mtk_rdma_disable_vblank(struct mtk_ddp_comp *comp)
> struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
>
> rdma->crtc = NULL;
> - rdma_update_bits(comp, DISP_REG_RDMA_INT_ENABLE, RDMA_FRAME_END_INT, 0);
> + mtk_ddp_write_mask(NULL, 0, comp,
> + DISP_REG_RDMA_INT_ENABLE, RDMA_FRAME_END_INT);
> }
>
> static void mtk_rdma_start(struct mtk_ddp_comp *comp)
> {
> - rdma_update_bits(comp, DISP_REG_RDMA_GLOBAL_CON, RDMA_ENGINE_EN,
> - RDMA_ENGINE_EN);
> + mtk_ddp_write_mask(NULL, RDMA_ENGINE_EN, comp,
> + DISP_REG_RDMA_GLOBAL_CON, RDMA_ENGINE_EN);
> }
>
> static void mtk_rdma_stop(struct mtk_ddp_comp *comp)
> {
> - rdma_update_bits(comp, DISP_REG_RDMA_GLOBAL_CON, RDMA_ENGINE_EN, 0);
> + mtk_ddp_write_mask(NULL, 0, comp,
> + DISP_REG_RDMA_GLOBAL_CON, RDMA_ENGINE_EN);
> }
>
> static void mtk_rdma_config(struct mtk_ddp_comp *comp, unsigned int width,
> unsigned int height, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> unsigned int threshold;
> unsigned int reg;
> struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
> u32 rdma_fifo_size;
>
> - rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0, 0xfff, width);
> - rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_1, 0xfffff, height);
> + mtk_ddp_write_mask(cmdq_pkt, width, comp,
> + DISP_REG_RDMA_SIZE_CON_0, 0xfff);
> + mtk_ddp_write_mask(cmdq_pkt, height, comp,
> + DISP_REG_RDMA_SIZE_CON_1, 0xfffff);
>
> if (rdma->fifo_size)
> rdma_fifo_size = rdma->fifo_size;
> @@ -151,7 +147,7 @@ static void mtk_rdma_config(struct mtk_ddp_comp *comp, unsigned int width,
> reg = RDMA_FIFO_UNDERFLOW_EN |
> RDMA_FIFO_PSEUDO_SIZE(rdma_fifo_size) |
> RDMA_OUTPUT_VALID_FIFO_THRESHOLD(threshold);
> - writel(reg, comp->regs + DISP_REG_RDMA_FIFO_CON);
> + mtk_ddp_write(cmdq_pkt, reg, comp, DISP_REG_RDMA_FIFO_CON);
> }
>
> static unsigned int rdma_fmt_convert(struct mtk_disp_rdma *rdma,
> @@ -197,7 +193,8 @@ static unsigned int mtk_rdma_layer_nr(struct mtk_ddp_comp *comp)
> }
>
> static void mtk_rdma_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
> - struct mtk_plane_state *state)
> + struct mtk_plane_state *state,
> + struct cmdq_pkt *cmdq_pkt)
> {
> struct mtk_disp_rdma *rdma = comp_to_rdma(comp);
> struct mtk_plane_pending_state *pending = &state->pending;
> @@ -207,24 +204,27 @@ static void mtk_rdma_layer_config(struct mtk_ddp_comp *comp, unsigned int idx,
> unsigned int con;
>
> con = rdma_fmt_convert(rdma, fmt);
> - writel_relaxed(con, comp->regs + DISP_RDMA_MEM_CON);
> + mtk_ddp_write_relaxed(cmdq_pkt, con, comp, DISP_RDMA_MEM_CON);
>
> if (fmt == DRM_FORMAT_UYVY || fmt == DRM_FORMAT_YUYV) {
> - rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
> - RDMA_MATRIX_ENABLE, RDMA_MATRIX_ENABLE);
> - rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
> - RDMA_MATRIX_INT_MTX_SEL,
> - RDMA_MATRIX_INT_MTX_BT601_to_RGB);
> + mtk_ddp_write_mask(cmdq_pkt, RDMA_MATRIX_ENABLE, comp,
> + DISP_REG_RDMA_SIZE_CON_0,
> + RDMA_MATRIX_ENABLE);
> + mtk_ddp_write_mask(cmdq_pkt, RDMA_MATRIX_INT_MTX_BT601_to_RGB,
> + comp, DISP_REG_RDMA_SIZE_CON_0,
> + RDMA_MATRIX_INT_MTX_SEL);
> } else {
> - rdma_update_bits(comp, DISP_REG_RDMA_SIZE_CON_0,
> - RDMA_MATRIX_ENABLE, 0);
> + mtk_ddp_write_mask(cmdq_pkt, 0, comp,
> + DISP_REG_RDMA_SIZE_CON_0,
> + RDMA_MATRIX_ENABLE);
> }
> + mtk_ddp_write_relaxed(cmdq_pkt, addr, comp, DISP_RDMA_MEM_START_ADDR);
> + mtk_ddp_write_relaxed(cmdq_pkt, pitch, comp, DISP_RDMA_MEM_SRC_PITCH);
> + mtk_ddp_write(cmdq_pkt, RDMA_MEM_GMC, comp,
> + DISP_RDMA_MEM_GMC_SETTING_0);
> + mtk_ddp_write_mask(cmdq_pkt, RDMA_MODE_MEMORY, comp,
> + DISP_REG_RDMA_GLOBAL_CON, RDMA_MODE_MEMORY);
>
> - writel_relaxed(addr, comp->regs + DISP_RDMA_MEM_START_ADDR);
> - writel_relaxed(pitch, comp->regs + DISP_RDMA_MEM_SRC_PITCH);
> - writel(RDMA_MEM_GMC, comp->regs + DISP_RDMA_MEM_GMC_SETTING_0);
> - rdma_update_bits(comp, DISP_REG_RDMA_GLOBAL_CON,
> - RDMA_MODE_MEMORY, RDMA_MODE_MEMORY);
> }
>
> static const struct mtk_ddp_comp_funcs mtk_disp_rdma_funcs = {
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> index 8fea98578bc8..76416c1cbb28 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c
> @@ -13,6 +13,7 @@
> #include <linux/of_platform.h>
> #include <linux/platform_device.h>
> #include <drm/drmP.h>
> +#include <linux/soc/mediatek/mtk-cmdq.h>
> #include "mtk_drm_drv.h"
> #include "mtk_drm_plane.h"
> #include "mtk_drm_ddp_comp.h"
> @@ -76,36 +77,76 @@
> #define DITHER_ADD_LSHIFT_G(x) (((x) & 0x7) << 4)
> #define DITHER_ADD_RSHIFT_G(x) (((x) & 0x7) << 0)
>
> +void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> + struct mtk_ddp_comp *comp, unsigned int offset)
> +{
> + if (IS_ENABLED(CONFIG_MTK_CMDQ) && cmdq_pkt)
> + cmdq_pkt_write(cmdq_pkt, comp->subsys,
> + comp->regs_pa + offset, value);
> + else
> + writel(value, comp->regs + offset);
> +}
> +
> +void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> + struct mtk_ddp_comp *comp,
> + unsigned int offset)
> +{
> + if (IS_ENABLED(CONFIG_MTK_CMDQ) && cmdq_pkt)
> + cmdq_pkt_write(cmdq_pkt, comp->subsys,
> + comp->regs_pa + offset, value);
> + else
> + writel_relaxed(value, comp->regs + offset);
> +}
> +
> +void mtk_ddp_write_mask(struct cmdq_pkt *cmdq_pkt,
> + unsigned int value,
> + struct mtk_ddp_comp *comp,
> + unsigned int offset,
> + unsigned int mask)
> +{
> + if (IS_ENABLED(CONFIG_MTK_CMDQ) && cmdq_pkt) {
> + cmdq_pkt_write_mask(cmdq_pkt, comp->subsys,
> + comp->regs_pa + offset, value, mask);
> + } else {
> + u32 tmp = readl(comp->regs + offset);
> +
> + tmp = (tmp & ~mask) | (value & mask);
> + writel(tmp, comp->regs + offset);
> + }
> +}
> +
> void mtk_dither_set(struct mtk_ddp_comp *comp, unsigned int bpc,
> - unsigned int CFG)
> + unsigned int CFG, struct cmdq_pkt *cmdq_pkt)
> {
> /* If bpc equal to 0, the dithering function didn't be enabled */
> if (bpc == 0)
> return;
>
> if (bpc >= MTK_MIN_BPC) {
> - writel(0, comp->regs + DISP_DITHER_5);
> - writel(0, comp->regs + DISP_DITHER_7);
> - writel(DITHER_LSB_ERR_SHIFT_R(MTK_MAX_BPC - bpc) |
> - DITHER_ADD_LSHIFT_R(MTK_MAX_BPC - bpc) |
> - DITHER_NEW_BIT_MODE,
> - comp->regs + DISP_DITHER_15);
> - writel(DITHER_LSB_ERR_SHIFT_B(MTK_MAX_BPC - bpc) |
> - DITHER_ADD_LSHIFT_B(MTK_MAX_BPC - bpc) |
> - DITHER_LSB_ERR_SHIFT_G(MTK_MAX_BPC - bpc) |
> - DITHER_ADD_LSHIFT_G(MTK_MAX_BPC - bpc),
> - comp->regs + DISP_DITHER_16);
> - writel(DISP_DITHERING, comp->regs + CFG);
> + mtk_ddp_write(cmdq_pkt, 0, comp, DISP_DITHER_5);
> + mtk_ddp_write(cmdq_pkt, 0, comp, DISP_DITHER_7);
> + mtk_ddp_write(cmdq_pkt,
> + DITHER_LSB_ERR_SHIFT_R(MTK_MAX_BPC - bpc) |
> + DITHER_ADD_LSHIFT_R(MTK_MAX_BPC - bpc) |
> + DITHER_NEW_BIT_MODE,
> + comp, DISP_DITHER_15);
> + mtk_ddp_write(cmdq_pkt,
> + DITHER_LSB_ERR_SHIFT_B(MTK_MAX_BPC - bpc) |
> + DITHER_ADD_LSHIFT_B(MTK_MAX_BPC - bpc) |
> + DITHER_LSB_ERR_SHIFT_G(MTK_MAX_BPC - bpc) |
> + DITHER_ADD_LSHIFT_G(MTK_MAX_BPC - bpc),
> + comp, DISP_DITHER_16);
> + mtk_ddp_write(cmdq_pkt, DISP_DITHERING, comp, CFG);
> }
> }
>
> static void mtk_od_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> - writel(w << 16 | h, comp->regs + DISP_OD_SIZE);
> - writel(OD_RELAYMODE, comp->regs + DISP_OD_CFG);
> - mtk_dither_set(comp, bpc, DISP_OD_CFG);
> + mtk_ddp_write(cmdq_pkt, w << 16 | h, comp, DISP_OD_SIZE);
> + mtk_ddp_write(cmdq_pkt, OD_RELAYMODE, comp, DISP_OD_CFG);
> + mtk_dither_set(comp, bpc, DISP_OD_CFG, cmdq_pkt);
> }
>
> static void mtk_od_start(struct mtk_ddp_comp *comp)
> @@ -120,9 +161,9 @@ static void mtk_ufoe_start(struct mtk_ddp_comp *comp)
>
> static void mtk_aal_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> - writel(h << 16 | w, comp->regs + DISP_AAL_SIZE);
> + mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_AAL_SIZE);
> }
>
> static void mtk_aal_start(struct mtk_ddp_comp *comp)
> @@ -137,10 +178,10 @@ static void mtk_aal_stop(struct mtk_ddp_comp *comp)
>
> static void mtk_ccorr_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> - writel(h << 16 | w, comp->regs + DISP_CCORR_SIZE);
> - writel(CCORR_RELAY_MODE, comp->regs + DISP_CCORR_CFG);
> + mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_CCORR_SIZE);
> + mtk_ddp_write(cmdq_pkt, CCORR_RELAY_MODE, comp, DISP_CCORR_CFG);
> }
>
> static void mtk_ccorr_start(struct mtk_ddp_comp *comp)
> @@ -155,10 +196,10 @@ static void mtk_ccorr_stop(struct mtk_ddp_comp *comp)
>
> static void mtk_dither_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> - writel(h << 16 | w, comp->regs + DISP_DITHER_SIZE);
> - writel(DITHER_RELAY_MODE, comp->regs + DISP_DITHER_CFG);
> + mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_DITHER_SIZE);
> + mtk_ddp_write(cmdq_pkt, DITHER_RELAY_MODE, comp, DISP_DITHER_CFG);
> }
>
> static void mtk_dither_start(struct mtk_ddp_comp *comp)
> @@ -173,10 +214,10 @@ static void mtk_dither_stop(struct mtk_ddp_comp *comp)
>
> static void mtk_gamma_config(struct mtk_ddp_comp *comp, unsigned int w,
> unsigned int h, unsigned int vrefresh,
> - unsigned int bpc)
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt)
> {
> - writel(h << 16 | w, comp->regs + DISP_GAMMA_SIZE);
> - mtk_dither_set(comp, bpc, DISP_GAMMA_CFG);
> + mtk_ddp_write(cmdq_pkt, h << 16 | w, comp, DISP_GAMMA_SIZE);
> + mtk_dither_set(comp, bpc, DISP_GAMMA_CFG, cmdq_pkt);
> }
>
> static void mtk_gamma_start(struct mtk_ddp_comp *comp)
> @@ -190,24 +231,25 @@ static void mtk_gamma_stop(struct mtk_ddp_comp *comp)
> }
>
> static void mtk_gamma_set(struct mtk_ddp_comp *comp,
> - struct drm_crtc_state *state)
> + struct drm_crtc_state *state,
> + struct cmdq_pkt *cmdq_pkt)
> {
> - unsigned int i, reg;
> + unsigned int i;
> struct drm_color_lut *lut;
> void __iomem *lut_base;
> u32 word;
>
> if (state->gamma_lut) {
> - reg = readl(comp->regs + DISP_GAMMA_CFG);
> - reg = reg | GAMMA_LUT_EN;
> - writel(reg, comp->regs + DISP_GAMMA_CFG);
> + mtk_ddp_write_mask(cmdq_pkt, GAMMA_LUT_EN, comp,
> + DISP_GAMMA_CFG, GAMMA_LUT_EN);
> lut_base = comp->regs + DISP_GAMMA_LUT;
> lut = (struct drm_color_lut *)state->gamma_lut->data;
> for (i = 0; i < MTK_LUT_SIZE; i++) {
> word = (((lut[i].red >> 6) & LUT_10BIT_MASK) << 20) +
> (((lut[i].green >> 6) & LUT_10BIT_MASK) << 10) +
> ((lut[i].blue >> 6) & LUT_10BIT_MASK);
> - writel(word, (lut_base + i * 4));
> + mtk_ddp_write(cmdq_pkt, word, comp,
> + (unsigned int)(lut_base + i * 4));
> }
> }
> }
> diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> index 268d416081da..6bbc35f92815 100644
> --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h
> @@ -69,21 +69,26 @@ enum mtk_ddp_comp_id {
> };
>
> struct mtk_ddp_comp;
> -
> +struct cmdq_pkt;
> struct mtk_ddp_comp_funcs {
> void (*config)(struct mtk_ddp_comp *comp, unsigned int w,
> - unsigned int h, unsigned int vrefresh, unsigned int bpc);
> + unsigned int h, unsigned int vrefresh,
> + unsigned int bpc, struct cmdq_pkt *cmdq_pkt);
> void (*start)(struct mtk_ddp_comp *comp);
> void (*stop)(struct mtk_ddp_comp *comp);
> void (*enable_vblank)(struct mtk_ddp_comp *comp, struct drm_crtc *crtc);
> void (*disable_vblank)(struct mtk_ddp_comp *comp);
> unsigned int (*layer_nr)(struct mtk_ddp_comp *comp);
> - void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx);
> - void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx);
> + void (*layer_on)(struct mtk_ddp_comp *comp, unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt);
> + void (*layer_off)(struct mtk_ddp_comp *comp, unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt);
> void (*layer_config)(struct mtk_ddp_comp *comp, unsigned int idx,
> - struct mtk_plane_state *state);
> + struct mtk_plane_state *state,
> + struct cmdq_pkt *cmdq_pkt);
> void (*gamma_set)(struct mtk_ddp_comp *comp,
> - struct drm_crtc_state *state);
> + struct drm_crtc_state *state,
> + struct cmdq_pkt *cmdq_pkt);
> void (*bgclr_in_on)(struct mtk_ddp_comp *comp);
> void (*bgclr_in_off)(struct mtk_ddp_comp *comp);
> };
> @@ -98,10 +103,11 @@ struct mtk_ddp_comp {
>
> static inline void mtk_ddp_comp_config(struct mtk_ddp_comp *comp,
> unsigned int w, unsigned int h,
> - unsigned int vrefresh, unsigned int bpc)
> + unsigned int vrefresh, unsigned int bpc,
> + struct cmdq_pkt *cmdq_pkt)
> {
> if (comp->funcs && comp->funcs->config)
> - comp->funcs->config(comp, w, h, vrefresh, bpc);
> + comp->funcs->config(comp, w, h, vrefresh, bpc, cmdq_pkt);
> }
>
> static inline void mtk_ddp_comp_start(struct mtk_ddp_comp *comp)
> @@ -138,32 +144,36 @@ static inline unsigned int mtk_ddp_comp_layer_nr(struct mtk_ddp_comp *comp)
> }
>
> static inline void mtk_ddp_comp_layer_on(struct mtk_ddp_comp *comp,
> - unsigned int idx)
> + unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt)
> {
> if (comp->funcs && comp->funcs->layer_on)
> - comp->funcs->layer_on(comp, idx);
> + comp->funcs->layer_on(comp, idx, cmdq_pkt);
> }
>
> static inline void mtk_ddp_comp_layer_off(struct mtk_ddp_comp *comp,
> - unsigned int idx)
> + unsigned int idx,
> + struct cmdq_pkt *cmdq_pkt)
> {
> if (comp->funcs && comp->funcs->layer_off)
> - comp->funcs->layer_off(comp, idx);
> + comp->funcs->layer_off(comp, idx, cmdq_pkt);
> }
>
> static inline void mtk_ddp_comp_layer_config(struct mtk_ddp_comp *comp,
> unsigned int idx,
> - struct mtk_plane_state *state)
> + struct mtk_plane_state *state,
> + struct cmdq_pkt *cmdq_pkt)
> {
> if (comp->funcs && comp->funcs->layer_config)
> - comp->funcs->layer_config(comp, idx, state);
> + comp->funcs->layer_config(comp, idx, state, cmdq_pkt);
> }
>
> static inline void mtk_ddp_gamma_set(struct mtk_ddp_comp *comp,
> - struct drm_crtc_state *state)
> + struct drm_crtc_state *state,
> + struct cmdq_pkt *cmdq_pkt)
> {
> if (comp->funcs && comp->funcs->gamma_set)
> - comp->funcs->gamma_set(comp, state);
> + comp->funcs->gamma_set(comp, state, cmdq_pkt);
> }
>
> static inline void mtk_ddp_comp_bgclr_in_on(struct mtk_ddp_comp *comp)
> @@ -186,6 +196,13 @@ int mtk_ddp_comp_init(struct device *dev, struct device_node *comp_node,
> int mtk_ddp_comp_register(struct drm_device *drm, struct mtk_ddp_comp *comp);
> void mtk_ddp_comp_unregister(struct drm_device *drm, struct mtk_ddp_comp *comp);
> void mtk_dither_set(struct mtk_ddp_comp *comp, unsigned int bpc,
> - unsigned int CFG);
> -
> + unsigned int CFG, struct cmdq_pkt *cmdq_pkt);
> +enum mtk_ddp_comp_type mtk_ddp_comp_get_type(enum mtk_ddp_comp_id comp_id);
> +void mtk_ddp_write(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> + struct mtk_ddp_comp *comp, unsigned int offset);
> +void mtk_ddp_write_relaxed(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> + struct mtk_ddp_comp *comp, unsigned int offset);
> +void mtk_ddp_write_mask(struct cmdq_pkt *cmdq_pkt, unsigned int value,
> + struct mtk_ddp_comp *comp, unsigned int offset,
> + unsigned int mask);
> #endif /* MTK_DRM_DDP_COMP_H */
> --
> 2.18.0
>
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* Re: [PATCH] phy: tegra: xusb: remove unused variable
From: Thierry Reding @ 2019-09-02 7:48 UTC (permalink / raw)
To: Chunfeng Yun
Cc: JC Kuo, linux-kernel, Jonathan Hunter, linux-tegra,
linux-mediatek, Matthias Brugger, Kishon Vijay Abraham I,
linux-arm-kernel
In-Reply-To: <1567394159-22572-1-git-send-email-chunfeng.yun@mediatek.com>
[-- Attachment #1.1: Type: text/plain, Size: 327 bytes --]
On Mon, Sep 02, 2019 at 11:15:59AM +0800, Chunfeng Yun wrote:
> The local variable @priv is set but not used, can be removed
>
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
> drivers/phy/tegra/xusb-tegra210.c | 3 ---
> 1 file changed, 3 deletions(-)
Acked-by: Thierry Reding <treding@nvidia.com>
[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
[-- Attachment #2: Type: text/plain, Size: 176 bytes --]
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [RFC,v5, 2/5] dts: arm64: mt8183: Add ISP Pass 1 nodes
From: Jungo Lin @ 2019-09-02 7:51 UTC (permalink / raw)
To: tfiga, hverkuil-cisco, laurent.pinchart, matthias.bgg, mchehab
Cc: shik, devicetree, Sean.Cheng, suleiman, Rynn.Wu, srv_heupstream,
robh, ryan.yu, Jerry-ch.Chen, frankie.chiu, jungo.lin, sj.huang,
yuzhao, linux-mediatek, zwisler, ddavenport, frederic.chen,
linux-arm-kernel, linux-media
In-Reply-To: <20190902075135.1332-1-jungo.lin@mediatek.com>
Add nodes for Pass 1 unit of Mediatek's camera ISP system.
Pass 1 unit embedded in Mediatek SoCs, works with the
co-processor to process image signal from the image sensor
and output RAW image data.
Signed-off-by: Jungo Lin <jungo.lin@mediatek.com>
---
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 30 ++++++++++++++++++++++++
1 file changed, 30 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/mt8183.dtsi b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
index 66aaa07f6cec..0d607342d4f1 100644
--- a/arch/arm64/boot/dts/mediatek/mt8183.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8183.dtsi
@@ -505,5 +505,35 @@
reg = <0 0x1a000000 0 0x1000>;
#clock-cells = <1>;
};
+ camisp: camisp@1a000000 {
+ compatible = "mediatek,mt8183-camisp";
+ reg = <0 0x1a000000 0 0x1000>,
+ <0 0x1a003000 0 0x1000>,
+ <0 0x1a004000 0 0x2000>,
+ <0 0x1a006000 0 0x2000>,
+ <0 0x1a008000 0 0x2000>;
+ reg-names = "cam_sys",
+ "cam_uni",
+ "cam_a",
+ "cam_b",
+ "cam_c";
+ interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 254 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 255 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 256 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "cam_uni",
+ "cam_a",
+ "cam_b",
+ "cam_c";
+ iommus = <&iommu M4U_PORT_CAM_IMGO>;
+ clocks = <&camsys CLK_CAM_CAM>,
+ <&camsys CLK_CAM_CAMTG>;
+ clock-names = "camsys_cam_cgpdn",
+ "camsys_camtg_cgpdn";
+ mediatek,larb = <&larb3>,
+ <&larb6>;
+ power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>;
+ mediatek,scp = <&scp>;
+ };
};
};
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [RFC,v5, 3/5] media: videodev2.h: Add new boottime timestamp type
From: Jungo Lin @ 2019-09-02 7:51 UTC (permalink / raw)
To: tfiga, hverkuil-cisco, laurent.pinchart, matthias.bgg, mchehab
Cc: shik, devicetree, Sean.Cheng, suleiman, Rynn.Wu, srv_heupstream,
robh, ryan.yu, Jerry-ch.Chen, frankie.chiu, jungo.lin, sj.huang,
yuzhao, linux-mediatek, zwisler, ddavenport, frederic.chen,
linux-arm-kernel, linux-media
In-Reply-To: <20190902075135.1332-1-jungo.lin@mediatek.com>
For Camera AR(Augmented Reality) application requires camera timestamps
to be reported with CLOCK_BOOTTIME to sync timestamp with other sensor
sources.
The boottime timestamp is identical to monotonic timestamp,
except it also includes any time that the system is suspended.
Signed-off-by: Jungo Lin <jungo.lin@mediatek.com>
---
Documentation/media/uapi/v4l/buffer.rst | 11 ++++++++++-
include/uapi/linux/videodev2.h | 2 ++
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/Documentation/media/uapi/v4l/buffer.rst b/Documentation/media/uapi/v4l/buffer.rst
index 1cbd9cde57f3..9e636f4118f5 100644
--- a/Documentation/media/uapi/v4l/buffer.rst
+++ b/Documentation/media/uapi/v4l/buffer.rst
@@ -649,13 +649,22 @@ Buffer Flags
- 0x00002000
- The buffer timestamp has been taken from the ``CLOCK_MONOTONIC``
clock. To access the same clock outside V4L2, use
- :c:func:`clock_gettime`.
+ :c:func:`clock_gettime` using clock IDs ``CLOCK_MONOTONIC``.
* .. _`V4L2-BUF-FLAG-TIMESTAMP-COPY`:
- ``V4L2_BUF_FLAG_TIMESTAMP_COPY``
- 0x00004000
- The CAPTURE buffer timestamp has been taken from the corresponding
OUTPUT buffer. This flag applies only to mem2mem devices.
+ * .. _`V4L2_BUF_FLAG_TIMESTAMP_BOOTIME`:
+
+ - ``V4L2_BUF_FLAG_TIMESTAMP_BOOTIME``
+ - 0x00008000
+ - The buffer timestamp has been taken from the ``CLOCK_BOOTTIME``
+ clock. To access the same clock outside V4L2, use
+ :c:func:`clock_gettime` using clock IDs ``CLOCK_BOOTTIME``.
+ Identical to CLOCK_MONOTONIC, except it also includes any time that
+ the system is suspended.
* .. _`V4L2-BUF-FLAG-TSTAMP-SRC-MASK`:
- ``V4L2_BUF_FLAG_TSTAMP_SRC_MASK``
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 9d9705ceda76..a4fd271348e7 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1043,6 +1043,8 @@ static inline __u64 v4l2_timeval_to_ns(const struct timeval *tv)
#define V4L2_BUF_FLAG_TIMESTAMP_UNKNOWN 0x00000000
#define V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC 0x00002000
#define V4L2_BUF_FLAG_TIMESTAMP_COPY 0x00004000
+#define V4L2_BUF_FLAG_TIMESTAMP_BOOTIME 0x00008000
+
/* Timestamp sources. */
#define V4L2_BUF_FLAG_TSTAMP_SRC_MASK 0x00070000
#define V4L2_BUF_FLAG_TSTAMP_SRC_EOF 0x00000000
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
* [RFC, v5, 0/5] media: platform: mtk-isp: Add Mediatek ISP Pass 1 driver
From: Jungo Lin @ 2019-09-02 7:51 UTC (permalink / raw)
To: tfiga, hverkuil-cisco, laurent.pinchart, matthias.bgg, mchehab
Cc: shik, devicetree, Sean.Cheng, suleiman, Rynn.Wu, srv_heupstream,
robh, ryan.yu, Jerry-ch.Chen, frankie.chiu, jungo.lin, sj.huang,
yuzhao, linux-mediatek, zwisler, ddavenport, frederic.chen,
linux-arm-kernel, linux-media
In-Reply-To: <Jungo Lin <jungo.lin@mediatek.com>
Hello,
This RFC patch series adding the driver for Pass 1 (P1) unit in
Mediatek's camera ISP system on mt8183 SoC, which will be used in
camera features of CrOS. It's the first time Mediatek develops
ISP kernel drivers based on V4L2 and media controller framework.
I posted the main part of the ISP Pass 1 driver as RFC to discuss
first and would like some review comments on the overall architecture
of the driver.
Pass 1 unit processes image signal from sensor devices and accepts the
tuning parameters to adjust the image quality. It performs optical
black correction, defect pixel correction, W/IR imbalance correction
and lens shading correction for RAW processing.
The driver is implemented with V4L2 and media controller framework so
we have the following entities to describe the ISP pass 1 path.
(The current metadata interface used in meta input and partial meta
nodes is only a temporary solution to kick off the driver development
and is not ready to be reviewed yet.)
1. meta input (output video device): connect to ISP P1 sub device.
It accepts the tuning buffer from user.
2. ISP P1 (sub device): connect to partial meta 0/1/2/3,
main stream and packed out video devices. When processing an image,
Pass 1 hardware supports multiple output images with different sizes
and formats so it needs two capture video devices ("main stream" and
"packed out") to return the image data to the user.
3. main stream (capture video device): return the processed image data
which is used in capture scenario.
4. packed out (capture video device): return the processed image data
which is used in preview scenario.
5. partial meta 0 (capture video device): return the AE/AWB statistics.
6. partial meta 1 (capture video device): return the AF statistics.
7. partial meta 2 (capture video device): return the local contrast
enhanced statistics.
8. partial meta 3 (capture video device): return the local motion
vector statistics.
The overall patches of the series is:
* Patch 1 & 2 are dt-bindings & dts information related to ISP P1 driver.
* Patch 3 extends the original V4L2 image & meta formats for ISP P1 driver.
* Patch 4 is the heart of ISP P1 driver. It handles the ISP
HW configuration. Moreover, implement standard V4L2 video driver that utilizes
V4L2 and media framework APIs. Communicate with co-process via SCP communication
to compose ISP registers in the firmware.
Here is ISP P1 media topology:
It is included the main/sub sensor & sen-inf sub-devices which are implemented
in below patch[1][2][3]:
For Mediatek ISP P1 driver, it also depends on MT8183 SCP[6] & IOMMU[7] patchsets
/usr/bin/media-ctl -p -d /dev/media1
Media controller API version 4.19.59
Media device information
------------------------
driver mtk-cam-p1
model mtk-cam-p1
serial
bus info platform:1a000000.camisp
hw revision 0x0
driver version 4.19.67
Device topology
- entity 1: mtk-cam-p1 (12 pads, 8 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev5
pad0: Sink
<- "mtk-cam-p1 meta input":0 []
pad1: Source
-> "mtk-cam-p1 main stream":0 [ENABLED,IMMUTABLE]
pad2: Source
-> "mtk-cam-p1 packed out":0 []
pad3: Source
-> "mtk-cam-p1 partial meta 0":0 []
pad4: Source
-> "mtk-cam-p1 partial meta 1":0 []
pad5: Source
-> "mtk-cam-p1 partial meta 2":0 []
pad6: Source
-> "mtk-cam-p1 partial meta 3":0 []
pad7: Source
pad8: Source
pad9: Source
pad10: Source
pad11: Sink
<- "1a040000.seninf.mipi-csi":4 [ENABLED,IMMUTABLE]
- entity 14: mtk-cam-p1 meta input (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video25
pad0: Source
-> "mtk-cam-p1":0 []
- entity 20: mtk-cam-p1 main stream (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video26
pad0: Sink
<- "mtk-cam-p1":1 [ENABLED,IMMUTABLE]
- entity 26: mtk-cam-p1 packed out (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video27
pad0: Sink
<- "mtk-cam-p1":2 []
- entity 32: mtk-cam-p1 partial meta 0 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video28
pad0: Sink
<- "mtk-cam-p1":3 []
- entity 38: mtk-cam-p1 partial meta 1 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video29
pad0: Sink
<- "mtk-cam-p1":4 []
- entity 44: mtk-cam-p1 partial meta 2 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video30
pad0: Sink
<- "mtk-cam-p1":5 []
- entity 50: mtk-cam-p1 partial meta 3 (1 pad, 1 link)
type Node subtype V4L flags 0
device node name /dev/video31
pad0: Sink
<- "mtk-cam-p1":6 []
- entity 56: 1a040000.seninf.mipi-csi (12 pads, 3 links)
type V4L2 subdev subtype Unknown flags 0
device node name /dev/v4l-subdev6
pad0: Sink
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
<- "ov5695 2-0036":0 []
pad1: Sink
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
<- "ov2685 4-003c":0 []
pad2: Sink
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad3: Sink
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad4: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
-> "mtk-cam-p1":11 [ENABLED,IMMUTABLE]
pad5: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad6: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad7: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad8: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad9: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad10: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
pad11: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
- entity 69: ov5695 2-0036 (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev7
pad0: Source
[fmt:SBGGR10_1X10/2592x1944 field:none colorspace:srgb]
-> "1a040000.seninf.mipi-csi":0 []
- entity 73: ov2685 4-003c (1 pad, 1 link)
type V4L2 subdev subtype Sensor flags 0
device node name /dev/v4l-subdev8
pad0: Source
[fmt:SBGGR10_1X10/1600x1200 field:none colorspace:srgb]
-> "1a040000.seninf.mipi-csi":1 []
===========
= history =
===========
version 5:
- Fixed Rob's comment on dt-binding format
- Fix Tomasz's comment in mtk_isp_pm_suspend function
- Support V4L2_BUF_FLAG_TIMESTAMP_BOOTTIME timestamp flag
and new timestamp type in driver
- Fix buffer en-queue timing issue in v4
- Remove default link_notify callback function in mtk_cam_media_ops
Todo:
- vb2_ops's buf_request_complete callback function implementation
- Add rst documents for Mediatek meta formats
- New meta buffer structure design & re-factoring
- Align and pack IPI comamnd structures for EC ROM size shrink
version 4:
- Fix Tomasz's comments which are addressed in MTK ISP P1 driver v3 patch[4]
- Fix some Tomasz comments which are addressed in DIP's v2 patch[5]
- Extend MTK proprietary image formats to support bayer order
- Support V4L2_BUF_FLAG_TSTAMP_SRC_SOE for capture devices
Todo:
- vb2_ops's buf_request_complete callback function implementation
- Add rst documents for Mediatek meta formats
- New meta buffer structure design & re-factoring
- Support V4L2_BUF_FLAG_TIMESTAMP_BOOTTIME timestamp flag
- Align and pack IPI comamnd structures for EC ROM size shrink
version 3:
- Remove ISP Pass 1 reserved memory device node and change to use SCP's
reserved memory region. (Rob Herring)
- Fix comments of ISP Pass 1 device node & dt-bindings document (Rob Herring)
- Revise ISP Pass1 Kconfig
- Add rst documents for Mediatek image formats (Hans Verkuil)
- Fix kernel warning messages when running v4l2_compliance test
- Move AFO buffer enqueue & de-queue from request API to non-request
- mtk_cam-ctrl.h/mtk_cam-ctrl.c
Revise Mediatek ISP Pass1 specific V4L2 control naming & file licence declaration (Hans Verkuil)
Split GET_BIN_INFO control into two controls to get width & height in-dependently (Hans Verkuil)
- mtk_cam-v4l2-util.h/mtk_cam-v4l2-util.c
Merging mtk_cam-dev.c and mtk_cam-v4l2-util.c. (Drew Davenport)
Remove the pix_mode argument in related functions and unreachable code. (Drew Davenport)
Fix Drew's comments which are addressed in v2 patch
Fix some Tomasz comments which are addressed in DIP's v1 patch[3]
- mtk_cam-regs.h / mtk_cam.h / mtk_cam.c
Fix Drew's comments which are addressed in v2 patch
Fix some Tomasz comments which are addressed in DIP's v1 patch[3]
Refactoring mtk_isp_config & mtk_isp_req_enqueue functions
- mtk_cam-scp.h / mtk_cam-scp.c
Move function declarations from mtk_cam.h to mtk_cam-scp.h (Drew Davenport)
Fix some Tomasz comments which are addressed in DIP's v1 patch[3]
Fix ISP de-initialize timing KE issue
- mtk_cam-smem.h / mtk_cam-smem-dev.c
Get the reserved shared memory via SCP driver (Tomasz Figa)
Todo:
- Add rst documents for Mediatek meta formats
- New meta buffer structure design & re-factoring
version 2:
- Add 3A enhancement feature which includes:
Separates 3A pipeline out of frame basis to improve
AE/AWB (exposure and white balance) performance.
Add 2 SCP sub-commands for 3A meta buffers.
- Add new child device to manage P1 shared memory between P1 HW unit
and co-processor.
- Remove mediatek,cam_smem.txt & cam_smem dts node in mt8183.dtsi.
- Revised document wording for dt-bindings documents & dts information.
- Remove mtk_cam-ctx.h & mtk_cam-dev-ctx-core.c and move these
source codes to mtk_cam-dev.h & mtk_cam-dev.c.
- mtk_cam-dev.h / mtk_cam-dev.c
Revised mtk_cam_video_device & mtk_cam_dev to remove unused structure fields
or add comments.
Revised buffer size for LMVO & LCSO.
Fix pixel format utility function.
Add vb2_dma_contig_set_max_seg_size to configure DMA max segment size.
- mtk_cam-v4l2-util.c
Refactoring V4L2 async mechanism with seninf driver only
Refactoring CIO (Connection IO) implementation with active sensor
Revised stream on function for 3A enhancement feature
Add new V4L2 en-queue/de-queue utility functions for 3A enhancement feature
- mtk_cam-regs.h / mtk_cam.h / mtk_cam.c
Add meta buffer index register definitions
Add meta DMA configuration function.
Separate with frame-base and non-frame-base en-queue/de-queue functions
Add isp_setup_scp_rproc function to get RPC handle
Add mtk_cam_reserved_memory_init for shared memory management
- mtk_cam-scp.h / mtk_cam-scp.c
Add new meta strictures for 3A enhancement feature
Add new IPI command utility function for 3A enhancement feature
Enhance isp_composer_dma_sg_init function flow
Shorten overall IPI command structure size
Remove scp_state state checking
Improve code readability
- mtk_cam-smem.h / mtk_cam-smem-dev.c
Add mtk_cam_alloc_smem_dev to allocate one new child device of ISP driver.
Handling P1 driver 's reserved memory & allocate DMA buffers based on this
memory region.
TODOs:
- 3A enhancement feature bug fixing
version 1:
- Revised driver sources based on Tomasz's comments including
part1/2/3/4 in RFC V0 patch.
- Remove DMA cache mechanism.
Support two new video devices (LCSO/LMVO) for advance camera
features.
- Fixed v4l2-compliance test failure items.
- Add private controls for Mediatek camera middle-ware.
- Replace VPU driver's APIs with new SCP driver interface for
co-processor communication.
- Refactoring mtk_cam_scp.c to use ring-buffers mechanism for IPI
commands RX handling.
- Fix internal bugs.
TODOs:
- Remove mtk_cam_smem_drv.c & mtk_cam_smem.h and implement DMA pool
for shared memory management.
- Revised file names.
- Support non frame-sync AFO/AAO DMA buffers
version 0:
- Initial submission
==================
Dependent patch
==================
Camera ISP P1 driver depends on seninf driver, SCP driver.
The patches are listed as following:
[1]. BACKPORT: FROMLIST: platform: mtk-isp: Add Mediatek sensor interface driver
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1482517
[2]. WIP: media: ov5695: support ov5695 sensor in mt8183
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1614887
[3]. WIP: media: ov2685: support ov2685 sensor in mt8183
https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1614885
[4]. media: platform: mtk-isp: Add Mediatek ISP Pass 1 driver
https://patchwork.linuxtv.org/cover/56778/
[5]. [RFC,V2,4/6] platform: mtk-isp: Add Mediatek DIP driver
https://patchwork.linuxtv.org/patch/57472/
[6]. Add support for mt8183 SCP
https://patchwork.kernel.org/cover/11076543/
[7]. MT8183 IOMMU SUPPORT
https://patchwork.kernel.org/cover/10984739/
==================
Compliance test
==================
The v4l2-compliance is built with the below lastest patch.
https://git.linuxtv.org/v4l-utils.git/commit/?id=28be49b4e9d72c5866188cf5ba408541c665c921
Note 1.
This testing depends on the above seninf & sensors patches[1][2][3].
Note 2.
The current failure items are related to Mediatek seninf driver which
is under developing in other patchset.[1]
/usr/bin/v4l2-compliance -m /dev/media1
v4l2-compliance SHA: not available, 32 bits
Compliance test for mtk-cam-p1 device /dev/media1:
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Required ioctls:
test MEDIA_IOC_DEVICE_INFO: OK
Allow for multiple opens:
test second /dev/media1 open: OK
test MEDIA_IOC_DEVICE_INFO: OK
test for unlimited opens: OK
Media Controller ioctls:
test MEDIA_IOC_G_TOPOLOGY: OK
Entities: 11 Interfaces: 11 Pads: 33 Links: 21
test MEDIA_IOC_ENUM_ENTITIES/LINKS: OK
test MEDIA_IOC_SETUP_LINK: OK
Total for mtk-cam-p1 device /dev/media1: 7, Succeeded: 7, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video25:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x8c200000
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x0c200000
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000010
Type : V4L Video
Entity Info:
ID : 0x0000000e (14)
Name : mtk-cam-p1 meta input
Function : V4L2 I/O
Pad 0x0100000f : 0: Source
Link 0x02000012: to remote pad 0x1000002 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video25 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video25: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video26:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000016
Type : V4L Video
Entity Info:
ID : 0x00000014 (20)
Name : mtk-cam-p1 main stream
Function : V4L2 I/O
Pad 0x01000015 : 0: Sink
Link 0x02000018: from remote pad 0x1000003 of entity 'mtk-cam-p1': Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video26 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video26: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video27:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04201000
Video Capture Multiplanar
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x0300001c
Type : V4L Video
Entity Info:
ID : 0x0000001a (26)
Name : mtk-cam-p1 packed out
Function : V4L2 I/O
Pad 0x0100001b : 0: Sink
Link 0x0200001e: from remote pad 0x1000004 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video27 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video27: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video28:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84a00000
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04a00000
Metadata Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000022
Type : V4L Video
Entity Info:
ID : 0x00000020 (32)
Name : mtk-cam-p1 partial meta 0
Function : V4L2 I/O
Pad 0x01000021 : 0: Sink
Link 0x02000024: from remote pad 0x1000005 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video28 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video28: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video29:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84a00000
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04a00000
Metadata Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000028
Type : V4L Video
Entity Info:
ID : 0x00000026 (38)
Name : mtk-cam-p1 partial meta 1
Function : V4L2 I/O
Pad 0x01000027 : 0: Sink
Link 0x0200002a: from remote pad 0x1000006 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video29 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video29: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video30:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84a00000
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04a00000
Metadata Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x0300002e
Type : V4L Video
Entity Info:
ID : 0x0000002c (44)
Name : mtk-cam-p1 partial meta 2
Function : V4L2 I/O
Pad 0x0100002d : 0: Sink
Link 0x02000030: from remote pad 0x1000007 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video30 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video30: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/video31:
Driver Info:
Driver name : mtk-cam-p1
Card type : mtk-cam-p1
Bus info : platform:1a000000.camisp
Driver version : 4.19.67
Capabilities : 0x84a00000
Metadata Capture
Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04a00000
Metadata Capture
Streaming
Extended Pix Format
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000034
Type : V4L Video
Entity Info:
ID : 0x00000032 (50)
Name : mtk-cam-p1 partial meta 3
Function : V4L2 I/O
Pad 0x01000033 : 0: Sink
Link 0x02000036: from remote pad 0x1000008 of entity 'mtk-cam-p1': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video31 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported)
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK
test VIDIOC_EXPBUF: OK
test Requests: OK
Total for mtk-cam-p1 device /dev/video31: 45, Succeeded: 45, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/v4l-subdev5:
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x0300004f
Type : V4L Sub-Device
Entity Info:
ID : 0x00000001 (1)
Name : mtk-cam-p1
Function : Video Pixel Formatter
Pad 0x01000002 : 0: Sink
Link 0x02000012: from remote pad 0x100000f of entity 'mtk-cam-p1 meta input': Data
Pad 0x01000003 : 1: Source
Link 0x02000018: to remote pad 0x1000015 of entity 'mtk-cam-p1 main stream': Data, Enabled, Immutable
Pad 0x01000004 : 2: Source
Link 0x0200001e: to remote pad 0x100001b of entity 'mtk-cam-p1 packed out': Data
Pad 0x01000005 : 3: Source
Link 0x02000024: to remote pad 0x1000021 of entity 'mtk-cam-p1 partial meta 0': Data
Pad 0x01000006 : 4: Source
Link 0x0200002a: to remote pad 0x1000027 of entity 'mtk-cam-p1 partial meta 1': Data
Pad 0x01000007 : 5: Source
Link 0x02000030: to remote pad 0x100002d of entity 'mtk-cam-p1 partial meta 2': Data
Pad 0x01000008 : 6: Source
Link 0x02000036: to remote pad 0x1000033 of entity 'mtk-cam-p1 partial meta 3': Data
Pad 0x01000009 : 7: Source
Pad 0x0100000a : 8: Source
Pad 0x0100000b : 9: Source
Pad 0x0100000c : 10: Source
Pad 0x0100000d : 11: Sink
Link 0x0200004d: from remote pad 0x100003d of entity '1a040000.seninf.mipi-csi': Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
Allow for multiple opens:
test second /dev/v4l-subdev5 open: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Sub-Device ioctls (Sink Pad 0):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 1):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 2):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 3):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 4):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 5):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 6):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 7):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 8):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 9):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 10):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Sink Pad 11):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_FMT: OK (Not Supported)
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK (Not Supported)
test VIDIOC_QUERYCTRL: OK (Not Supported)
test VIDIOC_G/S_CTRL: OK (Not Supported)
test VIDIOC_G/S/TRY_EXT_CTRLS: OK (Not Supported)
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK (Not Supported)
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 0 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK (Not Supported)
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)
Total for mtk-cam-p1 device /dev/v4l-subdev5: 125, Succeeded: 125, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/v4l-subdev6:
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000051
Type : V4L Sub-Device
Entity Info:
ID : 0x00000038 (56)
Name : 1a040000.seninf.mipi-csi
Function : Video Interface Bridge
Pad 0x01000039 : 0: Sink
Link 0x02000047: from remote pad 0x1000046 of entity 'ov5695 2-0036': Data
Pad 0x0100003a : 1: Sink
Link 0x0200004b: from remote pad 0x100004a of entity 'ov2685 4-003c': Data
Pad 0x0100003b : 2: Sink
Pad 0x0100003c : 3: Sink
Pad 0x0100003d : 4: Source
Link 0x0200004d: to remote pad 0x100000d of entity 'mtk-cam-p1': Data, Enabled, Immutable
Pad 0x0100003e : 5: Source
Pad 0x0100003f : 6: Source
Pad 0x01000040 : 7: Source
Pad 0x01000041 : 8: Source
Pad 0x01000042 : 9: Source
Pad 0x01000043 : 10: Source
Pad 0x01000044 : 11: Source
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
Allow for multiple opens:
test second /dev/v4l-subdev6 open: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Sub-Device ioctls (Sink Pad 0):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Sink Pad 1):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Sink Pad 2):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Sink Pad 3):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 4):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 5):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 6):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 7):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 8):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 9):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 10):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Sub-Device ioctls (Source Pad 11):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(381): s_fmt.format.code == ~0U
test Try VIDIOC_SUBDEV_G/S_FMT: FAIL
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK (Not Supported)
fail: v4l2-test-subdevs.cpp(313): fmt.code == 0 || fmt.code == ~0U
fail: v4l2-test-subdevs.cpp(356): checkMBusFrameFmt(node, fmt.format)
test Active VIDIOC_SUBDEV_G/S_FMT: FAIL
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 2 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK (Not Supported)
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)
Total for mtk-cam-p1 device /dev/v4l-subdev6: 125, Succeeded: 101, Failed: 24, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/v4l-subdev7:
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000053
Type : V4L Sub-Device
Entity Info:
ID : 0x00000045 (69)
Name : ov5695 2-0036
Function : Camera Sensor
Pad 0x01000046 : 0: Source
Link 0x02000047: to remote pad 0x1000039 of entity '1a040000.seninf.mipi-csi': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
Allow for multiple opens:
test second /dev/v4l-subdev7 open: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Sub-Device ioctls (Source Pad 0):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
test Try VIDIOC_SUBDEV_G/S_FMT: OK
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
test Active VIDIOC_SUBDEV_G/S_FMT: OK
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 11 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK (Not Supported)
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)
Total for mtk-cam-p1 device /dev/v4l-subdev7: 48, Succeeded: 48, Failed: 0, Warnings: 0
--------------------------------------------------------------------------------
Compliance test for mtk-cam-p1 device /dev/v4l-subdev8:
Media Driver Info:
Driver name : mtk-cam-p1
Model : mtk-cam-p1
Serial :
Bus info : platform:1a000000.camisp
Media version : 4.19.67
Hardware revision: 0x00000000 (0)
Driver version : 4.19.67
Interface Info:
ID : 0x03000055
Type : V4L Sub-Device
Entity Info:
ID : 0x00000049 (73)
Name : ov2685 4-003c
Function : Camera Sensor
Pad 0x0100004a : 0: Source
Link 0x0200004b: to remote pad 0x100003a of entity '1a040000.seninf.mipi-csi': Data
Required ioctls:
test MC information (see 'Media Driver Info' above): OK
Allow for multiple opens:
test second /dev/v4l-subdev8 open: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported)
test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported)
test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported)
test VIDIOC_G/S_FREQUENCY: OK (Not Supported)
test VIDIOC_ENUMAUDOUT: OK (Not Supported)
test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported)
test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported)
test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported)
test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported)
test VIDIOC_G/S_EDID: OK (Not Supported)
Sub-Device ioctls (Source Pad 0):
test Try VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
test Try VIDIOC_SUBDEV_G/S_FMT: OK
test Try VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test Active VIDIOC_SUBDEV_ENUM_MBUS_CODE/FRAME_SIZE/FRAME_INTERVAL: OK
test Active VIDIOC_SUBDEV_G/S_FMT: OK
test Active VIDIOC_SUBDEV_G/S_SELECTION/CROP: OK (Not Supported)
test VIDIOC_SUBDEV_G/S_FRAME_INTERVAL: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK
test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK
test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK
test VIDIOC_G/S_JPEGCOMP: OK (Not Supported)
Standard Controls: 10 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK (Not Supported)
test VIDIOC_G/S_PARM: OK (Not Supported)
test VIDIOC_G_FBUF: OK (Not Supported)
test VIDIOC_G_FMT: OK (Not Supported)
test VIDIOC_TRY_FMT: OK (Not Supported)
test VIDIOC_S_FMT: OK (Not Supported)
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported)
test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK (Not Supported)
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported)
test VIDIOC_G_ENC_INDEX: OK (Not Supported)
test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK (Not Supported)
test VIDIOC_EXPBUF: OK (Not Supported)
test Requests: OK (Not Supported)
Total for mtk-cam-p1 device /dev/v4l-subdev8: 48, Succeeded: 48, Failed: 0, Warnings: 0
Grand Total for mtk-cam-p1 device /dev/media1: 668, Succeeded: 644, Failed: 24, Warnings: 0
=========================================================================================
Jungo Lin (5):
media: dt-bindings: mt8183: Added camera ISP Pass 1
dts: arm64: mt8183: Add ISP Pass 1 nodes
media: videodev2.h: Add new boottime timestamp type
media: pixfmt: Add Mediatek ISP P1 image & meta formats
media: platform: Add Mediatek ISP P1 V4L2 device driver
.../bindings/media/mediatek,camisp.txt | 73 +
Documentation/media/uapi/v4l/buffer.rst | 11 +-
.../media/uapi/v4l/pixfmt-mtisp-sbggr10.rst | 65 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst | 90 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr12.rst | 61 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst | 110 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr14.rst | 73 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst | 110 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr8.rst | 51 +
.../media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst | 78 +
Documentation/media/uapi/v4l/pixfmt-rgb.rst | 8 +
arch/arm64/boot/dts/mediatek/mt8183.dtsi | 30 +
drivers/media/platform/Kconfig | 1 +
drivers/media/platform/Makefile | 2 +
drivers/media/platform/mtk-isp/Kconfig | 17 +
.../media/platform/mtk-isp/isp_50/Makefile | 3 +
.../platform/mtk-isp/isp_50/cam/Makefile | 6 +
.../platform/mtk-isp/isp_50/cam/mtk_cam-hw.c | 634 +++++
.../platform/mtk-isp/isp_50/cam/mtk_cam-hw.h | 64 +
.../platform/mtk-isp/isp_50/cam/mtk_cam-ipi.h | 222 ++
.../mtk-isp/isp_50/cam/mtk_cam-regs.h | 95 +
.../platform/mtk-isp/isp_50/cam/mtk_cam.c | 2081 +++++++++++++++++
.../platform/mtk-isp/isp_50/cam/mtk_cam.h | 244 ++
drivers/media/v4l2-core/v4l2-ioctl.c | 37 +
include/uapi/linux/videodev2.h | 41 +
25 files changed, 4206 insertions(+), 1 deletion(-)
create mode 100644 Documentation/devicetree/bindings/media/mediatek,camisp.txt
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr10f.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr12f.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr14f.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8.rst
create mode 100644 Documentation/media/uapi/v4l/pixfmt-mtisp-sbggr8f.rst
create mode 100644 drivers/media/platform/mtk-isp/Kconfig
create mode 100644 drivers/media/platform/mtk-isp/isp_50/Makefile
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/Makefile
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam-hw.c
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam-hw.h
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam-ipi.h
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam-regs.h
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam.c
create mode 100644 drivers/media/platform/mtk-isp/isp_50/cam/mtk_cam.h
--
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply
* [RFC,v5, 1/5] media: dt-bindings: mt8183: Added camera ISP Pass 1
From: Jungo Lin @ 2019-09-02 7:51 UTC (permalink / raw)
To: tfiga, hverkuil-cisco, laurent.pinchart, matthias.bgg, mchehab
Cc: shik, devicetree, Sean.Cheng, suleiman, Rynn.Wu, srv_heupstream,
robh, ryan.yu, Jerry-ch.Chen, frankie.chiu, jungo.lin, sj.huang,
yuzhao, linux-mediatek, zwisler, ddavenport, frederic.chen,
linux-arm-kernel, linux-media
In-Reply-To: <20190902075135.1332-1-jungo.lin@mediatek.com>
This patch adds DT binding document for the Pass 1 (P1) unit
in Mediatek's camera ISP system. The Pass 1 unit grabs the sensor
data out from the sensor interface, applies ISP image effects
from tuning data and outputs the image data or statistics data to DRAM.
Signed-off-by: Jungo Lin <jungo.lin@mediatek.com>
---
.../bindings/media/mediatek,camisp.txt | 73 +++++++++++++++++++
1 file changed, 73 insertions(+)
create mode 100644 Documentation/devicetree/bindings/media/mediatek,camisp.txt
diff --git a/Documentation/devicetree/bindings/media/mediatek,camisp.txt b/Documentation/devicetree/bindings/media/mediatek,camisp.txt
new file mode 100644
index 000000000000..e156f01747d0
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/mediatek,camisp.txt
@@ -0,0 +1,73 @@
+* Mediatek Image Signal Processor Pass 1 (ISP P1)
+
+The Pass 1 unit of Mediatek's camera ISP system grabs the sensor data out
+from the sensor interface, applies ISP effects from tuning data and outputs
+the image data and statistics data to DRAM. Furthermore, Pass 1 unit has
+the ability to output two different resolutions frames at the same time to
+increase the performance of the camera application.
+
+Required properties:
+- compatible: Must be "mediatek,mt8183-camisp" for MT8183.
+- reg: Physical base address of the camera function block register and
+ length of memory mapped region. Must contain an entry for each entry
+ in reg-names.
+- reg-names: Must include the following entries:
+ "cam_sys": Camera base function block
+ "cam_uni": Camera UNI function block
+ "cam_a": Camera ISP P1 hardware unit A
+ "cam_b": Camera ISP P1 hardware unit B
+ "cam_c": Camera ISP P1 hardware unit C
+- interrupts: Must contain an entry for each entry in interrupt-names.
+- interrupt-names : Must include the following entries:
+ "cam_uni": Camera UNI interrupt
+ "cam_a": Camera unit A interrupt
+ "cam_b": Camera unit B interrupt
+ "cam_c": Camera unit C interrupt
+- iommus: Shall point to the respective IOMMU block with master port
+ as argument, see Documentation/devicetree/bindings/iommu/mediatek,iommu.txt
+ for details.
+- clocks: A list of phandle and clock specifier pairs as listed
+ in clock-names property, see
+ Documentation/devicetree/bindings/clock/clock-bindings.txt for details.
+- clock-names: Must be "camsys_cam_cgpdn" and "camsys_camtg_cgpdn".
+- mediatek,larb: Must contain the local arbiters in the current SoCs, see
+ Documentation/devicetree/bindings/memory-controllers/mediatek,smi-larb.txt
+ for details.
+- power-domains: a phandle to the power domain, see
+ Documentation/devicetree/bindings/power/power_domain.txt for details.
+- mediatek,scp : The node of system control processor (SCP), see
+ Documentation/devicetree/bindings/remoteproc/mtk,scp.txt for details.
+
+Example:
+SoC specific DT entry:
+
+ camisp: camisp@1a000000 {
+ compatible = "mediatek,mt8183-camisp";
+ reg = <0 0x1a000000 0 0x1000>,
+ <0 0x1a003000 0 0x1000>,
+ <0 0x1a004000 0 0x2000>,
+ <0 0x1a006000 0 0x2000>,
+ <0 0x1a008000 0 0x2000>;
+ reg-names = "cam_sys",
+ "cam_uni",
+ "cam_a",
+ "cam_b",
+ "cam_c";
+ interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 254 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 255 IRQ_TYPE_LEVEL_LOW>,
+ <GIC_SPI 256 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-names = "cam_uni",
+ "cam_a",
+ "cam_b",
+ "cam_c";
+ iommus = <&iommu M4U_PORT_CAM_IMGO>;
+ clocks = <&camsys CLK_CAM_CAM>,
+ <&camsys CLK_CAM_CAMTG>;
+ clock-names = "camsys_cam_cgpdn",
+ "camsys_camtg_cgpdn";
+ mediatek,larb = <&larb3>,
+ <&larb6>;
+ power-domains = <&scpsys MT8183_POWER_DOMAIN_CAM>;
+ mediatek,scp = <&scp>;
+ };
--
2.18.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related
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