Re: [PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-09 Thread John Keeping
On Fri, 9 Oct 2020 02:46:09 +0300 Vladimir Oltean wrote: > On Thu, Oct 08, 2020 at 05:27:49PM +0100, John Keeping wrote: > > With threadirqs, stmmac_interrupt() is called on a thread with hardirqs > > enabled so we cannot call __napi_schedule_irqoff(). Under lockdep

[PATCH] net: stmmac: Don't call _irqoff() with hardirqs enabled

2020-10-08 Thread John Keeping
() instead which will save & restore the interrupt state. Fixes: 4ccb45857c2c ("net: stmmac: Fix NAPI poll in TX path when in multi-queue") Signed-off-by: John Keeping --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff -

Re: [PATCH V2] genirq/affinity: Handle affinity setting on inactive interrupts correctly

2020-07-24 Thread John Keeping
Hi, On Fri, 17 Jul 2020 18:00:02 +0200 Thomas Gleixner wrote: > Setting interrupt affinity on inactive interrupts is inconsistent when > hierarchical irq domains are enabled. The core code should just store the > affinity and not call into the irq chip driver for inactive interrupts > because th

[PATCH] i2c: rk3x: support master_xfer_atomic

2020-06-23 Thread John Keeping
Enable i2c transactions in irq disabled contexts like poweroff where the PMIC is connected via i2c. Signed-off-by: John Keeping --- drivers/i2c/busses/i2c-rk3x.c | 39 +++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c

[PATCH] Input: st1232 - read resolution from touch panel

2020-06-15 Thread John Keeping
: John Keeping --- drivers/input/touchscreen/st1232.c | 55 +- 1 file changed, 46 insertions(+), 9 deletions(-) diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index 63b29c7279e2..4e032d3a3737 100644 --- a/drivers/input/touchscreen

[tip:perf/core] perf unwind: Remove unnecessary test

2019-08-16 Thread tip-bot for John Keeping
Commit-ID: e2736219e6ca3117e10651e215b96d66775220da Gitweb: https://git.kernel.org/tip/e2736219e6ca3117e10651e215b96d66775220da Author: John Keeping AuthorDate: Thu, 15 Aug 2019 11:01:46 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Aug 2019 12:30:14 -0300 perf unwind

[tip:perf/core] perf unwind: Fix libunwind when tid != pid

2019-08-16 Thread tip-bot for John Keeping
Commit-ID: e8ba2906f6b9054102ad035ac9cafad9d4168589 Gitweb: https://git.kernel.org/tip/e8ba2906f6b9054102ad035ac9cafad9d4168589 Author: John Keeping AuthorDate: Thu, 15 Aug 2019 11:01:45 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Aug 2019 12:25:57 -0300 perf unwind

[tip:perf/core] perf map: Use zalloc for map_groups

2019-08-16 Thread tip-bot for John Keeping
Commit-ID: ab6cd0e5276e24403751e0b3b8ed807738a8571f Gitweb: https://git.kernel.org/tip/ab6cd0e5276e24403751e0b3b8ed807738a8571f Author: John Keeping AuthorDate: Thu, 15 Aug 2019 11:01:44 +0100 Committer: Arnaldo Carvalho de Melo CommitDate: Fri, 16 Aug 2019 12:25:23 -0300 perf map

[PATCH v2 2/3] perf unwind: fix libunwind when tid != pid

2019-08-15 Thread John Keeping
only for thread group leader") Cc: Konstantin Khlebnikov Signed-off-by: John Keeping --- v2: - Remove unrelated change that has moved to the next patch - Improve commit message to describe a scenario that shows the bug --- tools/perf/util/map.c| 3 ++- tools/pe

[PATCH v2 3/3] perf unwind: remove unnecessary test

2019-08-15 Thread John Keeping
If dwarf_callchain_users is false, then unwind__prepare_access() will not set unwind_libunwind_ops so the remaining test here is sufficient. Signed-off-by: John Keeping --- v2: new patch split out from patch 2 --- tools/perf/util/unwind-libunwind.c | 6 -- 1 file changed, 6 deletions

[PATCH v2 1/3] perf map: use zalloc for map_groups

2019-08-15 Thread John Keeping
In the next commit we will add new fields to map_groups and we need these to be null if no value is assigned. The simplest way to achieve this is to request zeroed memory from the allocator. Signed-off-by: John Keeping --- Unchanged in v2 --- tools/perf/util/map.c | 2 +- 1 file changed, 1

Re: [PATCH 2/2] perf unwind: fix libunwind when tid != pid

2019-08-04 Thread John Keeping
On Fri, 2 Aug 2019 15:30:39 +0200 Jiri Olsa wrote: > On Mon, Jul 29, 2019 at 06:24:30PM +0100, John Keeping wrote: > > Commit e5adfc3e7e77 ("perf map: Synthesize maps only for thread group > > leader") changed the recording side so that we no longer get mmap events >

[PATCH 1/2] perf map: use zalloc for map_groups

2019-07-29 Thread John Keeping
In the next commit we will add new fields to map_groups and we need these to be null if no value is assigned. The simplest way to achieve this is to request zeroed memory from the allocator. Signed-off-by: John Keeping --- tools/perf/util/map.c | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH 2/2] perf unwind: fix libunwind when tid != pid

2019-07-29 Thread John Keeping
nikov Signed-off-by: John Keeping --- tools/perf/util/map.c| 3 +- tools/perf/util/map_groups.h | 4 +++ tools/perf/util/thread.c | 7 ++--- tools/perf/util/thread.h | 4 --- tools/perf/util/unwind-libunwind-local.c | 18 +---

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-21 Thread John Keeping
Hi Minas, On Wed, 19 Dec 2018 14:09:01 + Minas Harutyunyan wrote: > On 12/18/2018 6:35 PM, John Keeping wrote: > > Hi Minas, > > > > On Fri, 14 Dec 2018 09:00:08 + > > Minas Harutyunyan wrote: > >> First of all, sorry for delayed answer. > >

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-18 Thread John Keeping
Hi Minas, On Fri, 14 Dec 2018 09:00:08 + Minas Harutyunyan wrote: > First of all, sorry for delayed answer. > Looks like similar issue seen by Andrzej Pietrasiewicz > : "dwc2 isochronous transfers issues". Same > feedback provided to Andrzej. > > I run tests on 4.20.0-rc4 in DDMA. By defau

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-11-09 Thread John Keeping
Hi Minas, On Fri, 9 Nov 2018 14:36:36 + Minas Harutyunyan wrote: > On 11/9/2018 12:43 PM, Minas Harutyunyan wrote: > > Hi John, > > > > On 11/8/2018 9:37 PM, John Keeping wrote: > >> Hi Minas, > >> > >> On Mon, 5 Nov 2018 08:28:07 + &g

[PATCH] dmaengine: pl330: fix irq race with terminate_all

2018-07-17 Thread John Keeping
check req_running != -1 req_running = -1 _start channel Signed-off-by: John Keeping --- drivers/dma/pl330.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 370df2e74ddd..88750a34e859 100644

[PATCH] Bluetooth: use wait_event API instead of open-coding it

2018-04-19 Thread John Keeping
ed by schedule_timeout() is the same as the original timeout (HCI_INIT_TIMEOUT on a system with HZ=1000). Use wait_event_interruptible_timeout() instead of open-coding similar behaviour which is subject to the spurious failure described above. Signed-off-by: John Keeping --- I saw problems with the -rt patchs

[PATCH v2] usb: gadget: f_uac2: fix bFirstInterface in composite gadget

2018-02-14 Thread John Keeping
If there are multiple functions associated with a configuration, then the UAC2 interfaces may not start at zero. Set the correct first interface number in the association descriptor so that the audio interfaces are enumerated correctly in this case. Signed-off-by: John Keeping Reviewed-by

[PATCH v2] usb: f_fs: Force Reserved1=1 in OS_DESC_EXT_COMPAT

2017-11-27 Thread John Keeping
pace programs continue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org Signed-off-b

Re: [PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-13 Thread John Keeping
tinue to work correctly and, as a bonus, old programs are now compliant with the specification without having to fix anything themselves. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org Signed-off-by: John Keep

Re: [PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-10 Thread John Keeping
On Fri, 10 Nov 2017 12:40:39 +0200, Felipe Balbi wrote: > John Keeping writes: > > This check has gone through several incompatible variations in commits > > 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of > > OS_DESC_EXT_COMPAT"), 354bc4

[PATCH] usb: f_fs: Drop check on Reserved1 field on OS_DESC_EXT_COMPAT

2017-11-09 Thread John Keeping
7;s just drop the condition to avoid breaking userspace. Fixes: 53642399aa71 ("usb: gadget: f_fs: Fix wrong check on reserved1 of OS_DESC_EXT_COMPAT") Cc: sta...@vger.kernel.org # v4.7+ Signed-off-by: John Keeping --- drivers/usb/gadget/function/f_fs.c | 3 +-- 1 file changed, 1 inser

Re: [PATCH 1/7] drm/rockchip/dsi: correct Feedback divider setting

2017-09-20 Thread John Keeping
On Wed, Sep 20, 2017 at 07:08:11PM +0800, hl wrote: > > > On Wednesday, September 20, 2017 06:08 PM, John Keeping wrote: > > On Tue, Sep 19, 2017 at 01:27:40PM -0700, Sean Paul wrote: > >> On Tue, Sep 19, 2017 at 11:19:01AM -0700, Brian Norris wrote: > >>>

Re: [PATCH 1/7] drm/rockchip/dsi: correct Feedback divider setting

2017-09-20 Thread John Keeping
On Tue, Sep 19, 2017 at 01:27:40PM -0700, Sean Paul wrote: > On Tue, Sep 19, 2017 at 11:19:01AM -0700, Brian Norris wrote: > > Hi Sean, > > > > On Tue, Sep 19, 2017 at 11:00:25AM -0700, Sean Paul wrote: > > > On Mon, Sep 18, 2017 at 05:05:33PM +0800, Nickey Yang wrote: > > > > This patch correct F

[PATCH] ASoC: rockchip: i2s: fix unbalanced clk_disable

2017-09-14 Thread John Keeping
mclk is enabled and disabled only in i2s_runtime_{resume,suspend}() and we ensure that the device is runtime suspended before reaching this clk_disable_unprepare() call, so it is wrong to call it again here. Signed-off-by: John Keeping --- sound/soc/rockchip/rockchip_i2s.c | 1 - 1 file changed

[PATCH v2] usb: gadget: ffs: handle I/O completion in-order

2017-09-12 Thread John Keeping
complete. Signed-off-by: John Keeping --- I originally sent a version of this patch back in July [1] without any response. Since then, I've improved the commit message and switched from create_singlethread_workqueue() to alloc_ordered_workqueue(), so I've marked this as v2.

[tip:irq/urgent] genirq/msi: Fix populating multiple interrupts

2017-09-06 Thread tip-bot for John Keeping
Commit-ID: 596a7a1d0989c621c3ae49be73a1d1f9de22eb5a Gitweb: http://git.kernel.org/tip/596a7a1d0989c621c3ae49be73a1d1f9de22eb5a Author: John Keeping AuthorDate: Wed, 6 Sep 2017 10:35:40 +0100 Committer: Thomas Gleixner CommitDate: Wed, 6 Sep 2017 11:41:20 +0200 genirq/msi: Fix

[PATCH v2] genirq/msi: Fix populating multiple interrupts

2017-09-06 Thread John Keeping
b60 ("genirq/msi: Add msi_domain_populate_irqs") Cc: sta...@vger.kernel.org #v4.5+ Signed-off-by: John Keeping Reviewed-by: Marc Zyngier --- On Wed, 6 Sep 2017 09:52:43 +0100, Marc Zyngier wrote: > On 05/09/17 18:12, John Keeping wrote: > > Use the correct variable to set up

[PATCH] genirq/msi: fix populating multiple interrupts

2017-09-05 Thread John Keeping
Use the correct variable to set up each interrupt in turn rather than configuring the first interrupt "nvec" times. Signed-off-by: John Keeping --- kernel/irq/msi.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/kernel/irq/msi.c b/kernel/irq/msi.c index 48

Re: [PATCH] ASoC: rt5677: Reintroduce I2C device IDs

2017-08-25 Thread John Keeping
On Fri, 25 Aug 2017 19:42:51 +0300, Andy Shevchenko wrote: > On Fri, 2017-08-25 at 17:05 +0100, John Keeping wrote: > > On Fri, 25 Aug 2017 10:24:26 -0400, Tom Rini wrote: > > > On Fri, Aug 25, 2017 at 04:56:47PM +0300, Andy Shevchenko wrote: > > > > > Appa

Re: [PATCH] ASoC: rt5677: Reintroduce I2C device IDs

2017-08-25 Thread John Keeping
On Fri, 25 Aug 2017 10:24:26 -0400, Tom Rini wrote: > On Fri, Aug 25, 2017 at 04:56:47PM +0300, Andy Shevchenko wrote: > > +John > > > > On Tue, 2017-08-22 at 21:51 -0400, Tom Rini wrote: > > > Not all devices with ACPI and this combination of sound devices will > > > have the required informat

[PATCH] usb: gadget: ffs: handle I/O completion in-order

2017-07-13 Thread John Keeping
completed requests are passed to userspace in the order in which they complete. Signed-off-by: John Keeping --- drivers/usb/gadget/function/f_fs.c | 10 +- drivers/usb/gadget/function/u_fs.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/drivers/usb/gadget/function

Re: [PATCH] dt-bindings: display: rk3288-mipi-dsi: add reset property

2017-04-04 Thread John Keeping
Hi Sean, On Sun, 12 Mar 2017 07:06:59 -0500, Rob Herring wrote: > On Fri, Mar 03, 2017 at 11:39:45AM +0000, John Keeping wrote: > > This reset is required in order to fully reset the internal state of the > > MIPI controller. > > > > Signed-off-by: John Keeping >

Re: [PATCH v4 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-23 Thread John Keeping
On Thu, 23 Mar 2017 11:10:20 -0500, Julia Cartwright wrote: > One quick question below. Apologies if this has been covered, but just > want to be sure. > > On Thu, Mar 23, 2017 at 10:59:28AM +, John Keeping wrote: > > regmap_update_bits does its own locking and everyt

[PATCH v4 4/4] pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip

2017-03-23 Thread John Keeping
With real-time preemption, regmap functions cannot be used in the implementation of irq_chip since they use spinlocks which may sleep. Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler where we are allowed to sleep. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner

[PATCH v4 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-23 Thread John Keeping
regmap_update_bits does its own locking and everything else accessed here is a local variable so there is no need to lock around it. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2.1: - Remove RK2928 locking in rockchip_set_pull() v2

[PATCH v4 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes

2017-03-23 Thread John Keeping
The aim of the series is to make the Rockchip pinctrl irq_chip implementation safe for use with RT_FULL which requires that raw spinlocks are used to avoid sleeping in hardirq context. v4 is v3 rebased onto pinctrl/devel as of b9c6dcab265e ("pinctrl: rockchip: rename RK1108 to RV1108&quo

[PATCH v4 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-23 Thread John Keeping
This lock is used from rockchip_irq_set_type() which is part of the irq_chip implementation and thus must use raw_spinlock_t as documented in Documentation/gpio/driver.txt. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2: unchanged

[PATCH v4 3/4] pinctrl: rockchip: split out verification of mux settings

2017-03-23 Thread John Keeping
s new rockchip_verify_mux() function from there. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2: unchanged --- drivers/pinctrl/pinctrl-rockchip.c | 46 +- 1 file changed, 30 insertions(+), 16 dele

[PATCH v3 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-17 Thread John Keeping
This lock is used from rockchip_irq_set_type() which is part of the irq_chip implementation and thus must use raw_spinlock_t as documented in Documentation/gpio/driver.txt. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2: unchanged

[PATCH v3 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-17 Thread John Keeping
regmap_update_bits does its own locking and everything else accessed here is a local variable so there is no need to lock around it. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2.1: - Remove RK2928 locking in rockchip_set_pull() v2

[PATCH v3 3/4] pinctrl: rockchip: split out verification of mux settings

2017-03-17 Thread John Keeping
s new rockchip_verify_mux() function from there. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v3: unchanged v2: unchanged --- drivers/pinctrl/pinctrl-rockchip.c | 46 +- 1 file changed, 30 insertions(+), 16 dele

[PATCH v3 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes

2017-03-17 Thread John Keeping
a new version so it's simpler to apply. [1] https://www.spinics.net/lists/arm-kernel/msg568974.html John Keeping (4): pinctrl: rockchip: remove unnecessary locking pinctrl: rockchip: convert to raw spinlock pinctrl: rockchip: split out verification of mux settings pinctrl: rockchip: avo

[PATCH v3 4/4] pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip

2017-03-17 Thread John Keeping
With real-time preemption, regmap functions cannot be used in the implementation of irq_chip since they use spinlocks which may sleep. Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler where we are allowed to sleep. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner

Re: [PATCH v2 1/4] drm/rockchip/dsi: check phy_cfg_clk only for RK3399

2017-03-16 Thread John Keeping
On Thu, 16 Mar 2017 11:31:44 +0800, Chris Zhong wrote: > For RK3399, the phy_cfg_clk is a required clock, if phy_cfg_clk is > disabled, MIPI phy can not work. Let's return a error if there is no > phy_cfg_clk in dts property, when the pdata match RK3399. > > Signed-off-by: Chris Zhong > --- > >

[PATCH v2.1 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-15 Thread John Keeping
regmap_update_bits does its own locking and everything else accessed here is a local variable so there is no need to lock around it. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v2.1: - Remove RK2928 locking in rockchip_set_pull() v2: - Also remove

Re: [PATCH v2 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-15 Thread John Keeping
On Wed, 15 Mar 2017 13:23:09 -0500, Julia Cartwright wrote: > On Wed, Mar 15, 2017 at 07:16:53PM +0100, Heiko Stuebner wrote: > > Am Mittwoch, 15. März 2017, 18:08:06 CET schrieb John Keeping: > > > On Wed, 15 Mar 2017 13:01:37 -0500, Julia Cartwright wrote: > > > &

[PATCH v2 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes

2017-03-15 Thread John Keeping
spinlocks are used to avoid sleeping in hardirq context. [1] https://www.spinics.net/lists/arm-kernel/msg568279.html John Keeping (4): pinctrl: rockchip: remove unnecessary locking pinctrl: rockchip: convert to raw spinlock pinctrl: rockchip: split out verification of mux settings pinctrl

[PATCH v2 4/4] pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip

2017-03-15 Thread John Keeping
With real-time preemption, regmap functions cannot be used in the implementation of irq_chip since they use spinlocks which may sleep. Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler where we are allowed to sleep. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner

[PATCH v2 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-15 Thread John Keeping
regmap_update_bits does its own locking and everything else accessed here is a local variable so there is no need to lock around it. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v2: - Also remove locking in rockchip_set_schmitt() --- drivers/pinctrl

[PATCH v2 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-15 Thread John Keeping
This lock is used from rockchip_irq_set_type() which is part of the irq_chip implementation and thus must use raw_spinlock_t as documented in Documentation/gpio/driver.txt. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v2: unchanged --- drivers/pinctrl

[PATCH v2 3/4] pinctrl: rockchip: split out verification of mux settings

2017-03-15 Thread John Keeping
s new rockchip_verify_mux() function from there. Signed-off-by: John Keeping Reviewed-by: Heiko Stuebner Tested-by: Heiko Stuebner --- v2: unchanged --- drivers/pinctrl/pinctrl-rockchip.c | 46 +- 1 file changed, 30 insertions(+), 16 deletions(-) diff --

Re: [PATCH v2 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-15 Thread John Keeping
On Wed, 15 Mar 2017 13:01:37 -0500, Julia Cartwright wrote: > On Wed, Mar 15, 2017 at 05:46:52PM +0000, John Keeping wrote: > > This lock is used from rockchip_irq_set_type() which is part of the > > irq_chip implementation and thus must use raw_spinlock_t as documented > >

Re: [RFC PATCH 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-15 Thread John Keeping
On Wed, 15 Mar 2017 17:41:21 +0100, Heiko Stuebner wrote: > Am Mittwoch, 15. März 2017, 17:28:56 CET schrieb Heiko Stuebner: > > Am Montag, 13. März 2017, 18:38:11 CET schrieb John Keeping: > > > This lock is used from rockchip_irq_set_type() which is part of the > > &

Re: [PATCH 2/3] drm/rockchip/dsi: enable the grf clk before writing grf registers

2017-03-15 Thread John Keeping
On Wed, 15 Mar 2017 09:47:29 -0700, Brian Norris wrote: > On Wed, Mar 15, 2017 at 04:42:31PM +0800, Chris Zhong wrote: > > For RK3399, the grf clk should be enabled before writing grf registers, > > otherwise the register value can not be changed. > > > > Signed-off-by: Chris Zhong > > --- > >

[PATCH] Bluetooth: hci_bcm: Fix clock (un)prepare

2017-03-15 Thread John Keeping
The hci_bcm driver currently does not prepare/unprepare the clock and goes directly to enable, but as the documentation for clk_enable says, clk_prepare must be called before clk_enable. Signed-off-by: John Keeping --- drivers/bluetooth/hci_bcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[PATCH] Bluetooth: hci_bcm: Fix clock (un)prepare

2017-03-15 Thread John Keeping
The hci_bcm driver currently does not prepare/unprepare the clock and goes directly to enable, but as the documentation for clk_enable says, clk_prepare must be called before clk_enable. Signed-off-by: John Keeping --- drivers/bluetooth/hci_bcm.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[RFC PATCH 0/4] pinctrl: rockchip: PREEMPT_RT_FULL fixes

2017-03-13 Thread John Keeping
verted to a raw spinlock since with full RT preemption the regmap's spinlock may sleep. John Keeping (4): pinctrl: rockchip: remove unnecessary locking pinctrl: rockchip: convert to raw spinlock pinctrl: rockchip: split out verification of mux settings pinctrl: rockchip: avoid hardirq

[RFC PATCH 2/4] pinctrl: rockchip: convert to raw spinlock

2017-03-13 Thread John Keeping
This lock is used from rockchip_irq_set_type() which is part of the irq_chip implementation and thus must use raw_spinlock_t as documented in Documentation/gpio/driver.txt. Signed-off-by: John Keeping --- drivers/pinctrl/pinctrl-rockchip.c | 30 +++--- 1 file changed, 15

[RFC PATCH 1/4] pinctrl: rockchip: remove unnecessary locking

2017-03-13 Thread John Keeping
don't think it can be "slock" given that the following patches will convert that to a raw spinlock and regmap uses a normal spinlock internally. Signed-off-by: John Keeping --- drivers/pinctrl/pinctrl-rockchip.c | 20 +--- 1 file changed, 1 insertion(+), 19 deleti

[RFC PATCH 3/4] pinctrl: rockchip: split out verification of mux settings

2017-03-13 Thread John Keeping
s new rockchip_verify_mux() function from there. Signed-off-by: John Keeping --- drivers/pinctrl/pinctrl-rockchip.c | 46 +- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockc

[RFC PATCH 4/4] pinctrl: rockchip: avoid hardirq-unsafe functions in irq_chip

2017-03-13 Thread John Keeping
With real-time preemption, regmap functions cannot be used in the implementation of irq_chip since they use spinlocks which may sleep. Move the setting of the mux for IRQs to an irq_bus_sync_unlock handler where we are allowed to sleep. Signed-off-by: John Keeping --- drivers/pinctrl/pinctrl

[PATCH] Documentation/sphinx: fix primary_domain configuration

2017-03-03 Thread John Keeping
With Sphinx 1.5.3 I get the warning: WARNING: primary_domain 'C' not found, ignored. It seems that domain names in Sphinx are case-sensitive and for the C domain the name must be lower case. Signed-off-by: John Keeping --- Documentation/conf.py | 2 +- 1 file changed, 1

[PATCH] dt-bindings: display: rk3288-mipi-dsi: add reset property

2017-03-03 Thread John Keeping
This reset is required in order to fully reset the internal state of the MIPI controller. Signed-off-by: John Keeping --- On Thu, 2 Mar 2017 13:56:46 -0800, Brian Norris wrote: > On Fri, Feb 24, 2017 at 12:55:06PM +0000, John Keeping wrote: > > + /* > > +* Note that th

[PATCH] usb: gadget: configs: plug memory leak

2017-02-28 Thread John Keeping
When binding a gadget to a device, "name" is stored in gi->udc_name, but this does not happen when unregistering and the string is leaked. Signed-off-by: John Keeping --- drivers/usb/gadget/configfs.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/gadget/configf

[PATCH v4 12/23] drm/rockchip: dw-mipi-dsi: allow commands in panel_disable

2017-02-24 Thread John Keeping
call which seems to be a workaround for a specific panel and thus belongs in the panel driver. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' Reviewed-by Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-

[PATCH v4 23/23] drm/rockchip: dw-mipi-dsi: add reset control

2017-02-24 Thread John Keeping
In order to fully reset the state of the MIPI controller we must assert this reset. This is slightly more complicated than it could be in order to maintain compatibility with device trees that do not specify the reset property. Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v4: - Fix

[PATCH v4 22/23] drm/rockchip: dw-mipi-dsi: support non-burst modes

2017-02-24 Thread John Keeping
Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' Reviewed-by Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 21 + 1 file changed, 13 insertions(+), 8 deletions(-) di

[PATCH v4 16/23] drm/rockchip: dw-mipi-dsi: properly configure PHY timing

2017-02-24 Thread John Keeping
in order to ensure that the PHY configuration is correct. Signed-off-by: John Keeping --- v4: - Simplify ns2bc and ns2ui calculations as suggested by Sean Paul v3: - Wrap some long lines Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 35 ++ 1 file

[PATCH v4 10/23] drm/rockchip: dw-mipi-dsi: don't assume buffer is aligned

2017-02-24 Thread John Keeping
By dereferencing the MIPI command buffer as a u32* we rely on it being correctly aligned on ARM, but this may not be the case. Copy it into a stack variable that will be correctly aligned. Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v3: - Add Chris' Reviewed-by Unchanged

[PATCH v4 04/23] drm/rockchip: dw-mipi-dsi: fix command header writes

2017-02-24 Thread John Keeping
at we have just read from the status register. Signed-off-by: John Keeping Tested-by: Chris Zhong Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by Unchanged in v3 Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 ++ 1 file changed, 6 i

[PATCH v4 01/23] drm/rockchip: dw-mipi-dsi: don't configure hardware in mode_set for MIPI

2017-02-24 Thread John Keeping
With atomic modesetting the hardware will be powered off when the mode_set function is called. We should configure the hardware in the enable function, which is the atomic version of "commit" so let's use the enable hook rather than commit while we're at it. Signed-off-by: Jo

[PATCH v4 14/23] drm/rockchip: dw-mipi-dsi: ensure PHY is reset

2017-02-24 Thread John Keeping
Also don't power up the DSI host at this point since this is not necessary in order to configure the PHY and we do so later when selecting video or command mode. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: -

[PATCH v4 21/23] drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded

2017-02-24 Thread John Keeping
This ensures that the output resolution is known before fbcon loads. mipi_dsi_host_register() is moved above dw_mipi_dsi_register() to simplify error cleanup since the order of these operations does not matter. Signed-off-by: John Keeping --- v4: - Use "return 0" to separate normal

[PATCH v4 06/23] drm/rockchip: dw-mipi-dsi: avoid out-of-bounds read on tx_buf

2017-02-24 Thread John Keeping
As a side-effect of this, encode the endianness explicitly rather than casting a u16. Signed-off-by: John Keeping --- v4: - Introduce "data" variable to avoid confusion around the masking in GEN_HDATA() v3: - Add Chris' Reviewed-by Unchanged in v2 --- drivers/gpu/drm/rockchi

[PATCH v4 05/23] drm/rockchip: dw-mipi-dsi: fix generic packet status check

2017-02-24 Thread John Keeping
We want to check that both the GEN_CMD_EMPTY and GEN_PLD_W_EMPTY bits are set so we can't just check "val & mask" because that will be true if either bit is set. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Rev

[PATCH v4 03/23] drm/rockchip: dw-mipi-dsi: remove mode_set hook

2017-02-24 Thread John Keeping
This is not needed since we can access the mode via the CRTC from the enable hook. Also remove the "mode" field that is no longer used. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' R

[PATCH v4 19/23] drm/rockchip: dw-mipi-dsi: use positive check for N{H,V}SYNC

2017-02-24 Thread John Keeping
This matches other drivers. Signed-off-by: John Keeping Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by Unchanged in v3 Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw

[PATCH v4 17/23] drm/rockchip: dw-mipi-dsi: improve PLL configuration

2017-02-24 Thread John Keeping
54, N = 4 as given by the databook. While doing this, change the loop limits to encode the actual limits on the divisor, which are: 40MHz >= (pllref / N) >= 5MHz Signed-off-by: John Keeping Reviewed-by: Sean Paul --- v4: - Add a comment explaining the limits so that it can be unde

[PATCH v4 08/23] drm/rockchip: dw-mipi-dsi: respect message flags

2017-02-24 Thread John Keeping
Instead of always sending commands in LP mode, respect the MIPI_DSI_MSG_USE_LPM flag to decide how to send each message. Also request acks if MIPI_DSI_MSG_REQ_ACK is set. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3:

[PATCH v4 18/23] drm/rockchip: dw-mipi-dsi: use specific poll helper

2017-02-24 Thread John Keeping
As the documentation for readx_poll_timeout says, we want to use the specialized macro for readl rather than using the generic version directly. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' Reviewed-by

[PATCH v4 02/23] drm/rockchip: dw-mipi-dsi: pass mode in where needed

2017-02-24 Thread John Keeping
This shows that we only use the mode from the enable function and prepares us to remove the "mode" field and the mode_set hook in the next commit. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' R

[PATCH v4 13/23] drm/rockchip: dw-mipi-dsi: fix escape clock rate

2017-02-24 Thread John Keeping
This clock rate is derived from the PHY PLL, so it should be calculated dynamically. This calculation is the same as that used by the vendor kernel and ensures that the escape clock runs at <20MHz as required by the MIPI specification. Signed-off-by: John Keeping Reviewed-by: Chris Zh

[PATCH v4 11/23] drm/rockchip: dw-mipi-dsi: prepare panel after phy init

2017-02-24 Thread John Keeping
Some panels need to be configured with commands sent over the MIPI link, which they will do in the prepare hook. Call this after the PHY has been initialized so that we are able to send commands to the panel. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4

[PATCH v4 07/23] drm/rockchip: dw-mipi-dsi: include bad value in error message

2017-02-24 Thread John Keeping
As an aid to debugging. Signed-off-by: John Keeping Reviewed-by: Chris Zhong Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Add Chris' Reviewed-by Unchanged in v2 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) di

[PATCH v4 15/23] drm/rockchip: dw-mipi-dsi: configure PHY before enabling

2017-02-24 Thread John Keeping
The bias, bandgap and PLL should all be configured before we enable them. Signed-off-by: John Keeping Reviewed-by: Sean Paul --- v4: - Add Sean's Reviewed-by v3: - Squash together two patches that both affect initialization order of the PHY Unchanged in v2 --- drivers/gpu/drm/rockch

[PATCH v4 00/23] drm/rockchip: MIPI fixes & improvements

2017-02-24 Thread John Keeping
on the list if anyone wants to pick it up in the future. Version 3 was posted here: http://www.spinics.net/lists/dri-devel/msg130977.html Thanks to Sean Paul and Chris Zhong for their review and testing of this series. John Keeping (23): drm/rockchip: dw-mipi-dsi: don't configure hard

[PATCH v4 09/23] drm/rockchip: dw-mipi-dsi: only request HS clock when required

2017-02-24 Thread John Keeping
Requesting the HS clock from the PHY before we initialize it causes an invalid signal to be sent out since the input clock is not yet configured. The PHY databook suggests only asserting this signal when performing HS transfers, so let's do that. Signed-off-by: John Keeping Reviewed-by:

[PATCH v4 20/23] drm/rockchip: vop: test for P{H,V}SYNC

2017-02-24 Thread John Keeping
When connected to the MIPI DSI output, we need to use N{H,V}SYNC for the internal connection but these flags are meaningless for DSI panels. Switch the test so that we do not set the P{H,V}SYNC bits unless the mode requires it. Signed-off-by: John Keeping Reviewed-by: Mark Yao Reviewed-by: Sean

Re: [RESEND PATCH v7 0/7] Rockchip dw-mipi-dsi driver

2017-02-22 Thread John Keeping
On Wed, 22 Feb 2017 10:57:05 -0500, Sean Paul wrote: > On Wed, Feb 22, 2017 at 8:43 AM, John Keeping wrote: > > On Tue, 21 Feb 2017 10:39:18 -0500, Sean Paul wrote: > > > >> On Mon, Feb 20, 2017 at 04:02:16PM +0800, Chris Zhong wrote: > >> > Hi all &

Re: [RESEND PATCH v7 0/7] Rockchip dw-mipi-dsi driver

2017-02-22 Thread John Keeping
On Tue, 21 Feb 2017 10:39:18 -0500, Sean Paul wrote: > On Mon, Feb 20, 2017 at 04:02:16PM +0800, Chris Zhong wrote: > > Hi all > > > > [Resend this v7 version series, since there are 5 mails have gone missing, > > last > > week] > > > > This version does not change the existing v6 patches, just

[PATCH] PM / QoS: Fix memory leak on resume_latency.notifiers

2017-02-16 Thread John Keeping
+0x14/0x18 [] bus_probe_device+0x30/0x88 [] device_add+0x430/0x554 [] usb_set_configuration+0x660/0x6fc Fixes: 2d984ad132a8 ("PM / QoS: Introcuce latency tolerance device PM QoS type") Signed-off-by: John Keeping --- drivers/base/power/qos.c | 2 +- 1 file changed, 1 inser

Re: [PATCH v3 22/24] drm/rockchip: dw-mipi-dsi: support non-burst modes

2017-02-16 Thread John Keeping
On Thu, 16 Feb 2017 11:01:46 +0800, Chris Zhong wrote: > On 02/01/2017 03:22 AM, Sean Paul wrote: > > On Sun, Jan 29, 2017 at 01:24:42PM +0000, John Keeping wrote: > > > > Reviewed-by: Sean Paul > > > >> Signed-off-by: John Keeping > >> Reviewed-

Re: [PATCH v3 23/24] drm/rockchip: dw-mipi-dsi: add reset control

2017-02-16 Thread John Keeping
On Thu, 16 Feb 2017 10:12:33 +0800, Chris Zhong wrote: > On 02/15/2017 08:39 PM, John Keeping wrote: > > On Wed, 15 Feb 2017 11:38:45 +0800, Chris Zhong wrote: > > > >> On 01/29/2017 09:24 PM, John Keeping wrote: > >>> In order to fully reset the state o

Re: [PATCH v3 23/24] drm/rockchip: dw-mipi-dsi: add reset control

2017-02-15 Thread John Keeping
On Wed, 15 Feb 2017 11:38:45 +0800, Chris Zhong wrote: > On 01/29/2017 09:24 PM, John Keeping wrote: > > In order to fully reset the state of the MIPI controller we must assert > > this reset. > > > > This is slightly more complicated than it could be in order to main

Re: [PATCH v3 21/24] drm/rockchip: dw-mipi-dsi: defer probe if panel is not loaded

2017-02-10 Thread John Keeping
On Tue, 31 Jan 2017 14:21:17 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:41PM +0000, John Keeping wrote: > > This ensures that the output resolution is known before fbcon loads. > > > > Signed-off-by: John Keeping > > --- > > Unchanged in v3 > >

Re: [PATCH v3 13/24] drm/rockchip: dw-mipi-dsi: fix escape clock rate

2017-02-01 Thread John Keeping
On Mon, 30 Jan 2017 15:25:10 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:33PM +0000, John Keeping wrote: > > This clock rate is derived from the PHY PLL, so it should be calculated > > dynamically. Use the same calculation as the vendor kernel to derive > > t

Re: [PATCH v3 24/24] drm/rockchip: dw-mipi-dsi: support read commands

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 15:16:09 -0500, Sean Paul wrote: > On Mon, Jan 30, 2017 at 06:14:27PM +0000, John Keeping wrote: > > On Mon, 30 Jan 2017 10:26:11 -0500, Sean Paul wrote: > > > > > On Sun, Jan 29, 2017 at 01:24:44PM +, John Keeping wrote: > > > > I

  1   2   3   >