[PATCH 21/36] net/dccp: convert to ->poll_mask

2018-03-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/dccp/dccp.h | 3 +-- net/dccp/ipv4.c | 2 +- net/dccp/ipv6.c | 2 +- net/dccp/proto.c | 13 ++--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/net/dccp/dccp.h b/net/dccp/dccp.h index f91e3816806b..0ea2ee56ac1b 100644 ---

[PATCH 17/36] net: remove sock_no_poll

2018-03-05 Thread Christoph Hellwig
Now that sock_poll handles a NULL ->poll or ->poll_mask there is no need for a stub. Signed-off-by: Christoph Hellwig --- crypto/af_alg.c | 1 - crypto/algif_hash.c | 2 -- crypto/algif_rng.c | 1 - drivers/isdn/mISDN/socket.c | 1 - drivers/net/ppp/pptp.c | 1

Re: [PATCH RFC v9 2/7] x86/entry: Add STACKLEAK erasing the kernel stack at the end of syscalls

2018-03-05 Thread Kees Cook
On Mon, Mar 5, 2018 at 1:21 PM, Alexander Popov wrote: > On 05.03.2018 23:25, Peter Zijlstra wrote: >> On Mon, Mar 05, 2018 at 11:43:19AM -0800, Laura Abbott wrote: >>> On 03/05/2018 08:41 AM, Dave Hansen wrote: On 03/03/2018 12:00 PM, Alexander Popov wrote: >

Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers

2018-03-05 Thread Joerg Roedel
On Mon, Mar 05, 2018 at 12:50:33PM -0800, Linus Torvalds wrote: > On Mon, Mar 5, 2018 at 12:38 PM, Brian Gerst wrote: > > > > There already is a test: single_step_syscall.c > > Ahh, good. So presumably Joerg actually did check it, just didn't even notice > ;) Yeah, sort of. I ran the test, but

[PATCH 18/36] net/tcp: convert to ->poll_mask

2018-03-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- include/net/tcp.h | 4 ++-- net/ipv4/af_inet.c | 3 ++- net/ipv4/tcp.c | 31 ++- net/ipv6/af_inet6.c | 3 ++- 4 files changed, 20 insertions(+), 21 deletions(-) diff --git a/include/net/tcp.h b/include/net/tcp.h index

[PATCH 16/36] net: add support for ->poll_mask in proto_ops

2018-03-05 Thread Christoph Hellwig
The socket file operations still implement ->poll until all protocols are switched over. Signed-off-by: Christoph Hellwig --- include/linux/net.h | 3 +++ net/socket.c| 51 ++- 2 files changed, 49 insertions(+), 5 deletions(-) diff --git

[PATCH 19/36] net/unix: convert to ->poll_mask

2018-03-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- net/unix/af_unix.c | 30 +++--- 1 file changed, 11 insertions(+), 19 deletions(-) diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index 2d465bdeccbc..619c6921dd46 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -638,9

[PATCH 14/36] aio: implement IOCB_CMD_POLL

2018-03-05 Thread Christoph Hellwig
Simple one-shot poll through the io_submit() interface. To poll for a file descriptor the application should submit an iocb of type IOCB_CMD_POLL. It will poll the fd for the events specified in the the first 32 bits of the aio_buf field of the iocb. Unlike poll or epoll without EPOLLONESHOT

[PATCH 13/36] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-03-05 Thread Christoph Hellwig
->get_poll_head returns the waitqueue that the poll operation is going to sleep on. Note that this means we can only use a single waitqueue for the poll, unlike some current drivers that use two waitqueues for different events. But now that we have keyed wakeups and heavily use those for poll

[PATCH 20/36] net: convert datagram_poll users tp ->poll_mask

2018-03-05 Thread Christoph Hellwig
Signed-off-by: Christoph Hellwig --- drivers/isdn/mISDN/socket.c| 2 +- drivers/net/ppp/pppoe.c| 2 +- drivers/staging/ipx/af_ipx.c | 2 +- drivers/staging/irda/net/af_irda.c | 6 +++--- include/linux/skbuff.h | 3 +-- include/net/udp.h

[PATCH 15/36] net: refactor socket_poll

2018-03-05 Thread Christoph Hellwig
Factor out two busy poll related helpers for late reuse, and remove a command that isn't very helpful, especially with the __poll_t annotations in place. Signed-off-by: Christoph Hellwig --- include/net/busy_poll.h | 15 +++ net/socket.c| 21 - 2

Re: [PATCH v2 1/2] of: unittest: clean up changeset test

2018-03-05 Thread Rob Herring
On Mon, Feb 26, 2018 at 02:01:22PM -0800, frowand.l...@gmail.com wrote: > From: Frank Rowand > > In preparation for fixing __of_node_dup(), clean up the unittest > function that calls it. > > Devicetree nodes created from a flattened device tree have a name > property. Follow this convention

[PATCH 12/36] fs: add new vfs_poll and file_can_poll helpers

2018-03-05 Thread Christoph Hellwig
These abstract out calls to the poll method in preparation for changes in how we poll. Signed-off-by: Christoph Hellwig --- drivers/staging/comedi/drivers/serial2002.c | 4 ++-- drivers/vfio/virqfd.c | 2 +- drivers/vhost/vhost.c | 2 +-

[PATCH 09/36] fs: unexport poll_schedule_timeout

2018-03-05 Thread Christoph Hellwig
No users outside of select.c. Signed-off-by: Christoph Hellwig --- fs/select.c | 3 +-- include/linux/poll.h | 2 -- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/fs/select.c b/fs/select.c index b6c36254028a..686de7b3a1db 100644 --- a/fs/select.c +++ b/fs/select.c @@

[PATCH 05/36] aio: simplify cancellation

2018-03-05 Thread Christoph Hellwig
With the current aio code there is no need for the magic KIOCB_CANCELLED value, as a cancelation just kicks the driver to queue the completion ASAP, with all actual completion handling done in another thread. Given that both the completion path and cancelation take the context lock there is no

[PATCH 03/36] aio: refactor read/write iocb setup

2018-03-05 Thread Christoph Hellwig
Don't reference the kiocb structure from the common aio code, and move any use of it into helper specific to the read/write path. This is in preparation for aio_poll support that wants to use the space for different fields. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c |

Re: [PATCH] pci-iov: Add support for unmanaged SR-IOV

2018-03-05 Thread Alexander Duyck
On Mon, Mar 5, 2018 at 12:57 PM, Don Dutile wrote: > On 03/01/2018 03:22 PM, Alex Williamson wrote: >> >> On Wed, 28 Feb 2018 16:36:38 -0800 >> Alexander Duyck wrote: >> >>> On Wed, Feb 28, 2018 at 2:59 PM, Alex Williamson >>> wrote: On Wed, 28 Feb 2018 09:49:21 -0800 Alexander

[PATCH 10/36] fs: cleanup do_pollfd

2018-03-05 Thread Christoph Hellwig
Use straigline code with failure handling gotos instead of a lot of nested conditionals. Signed-off-by: Christoph Hellwig --- fs/select.c | 48 +++- 1 file changed, 23 insertions(+), 25 deletions(-) diff --git a/fs/select.c b/fs/select.c index

[PATCH 04/36] aio: sanitize ki_list handling

2018-03-05 Thread Christoph Hellwig
Instead of handcoded non-null checks always initialize ki_list to an empty list and use list_empty / list_empty_careful on it. While we're at it also error out on a double call to kiocb_set_cancel_fn instead of ignoring it. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c |

[PATCH 01/36] aio: don't print the page size at boot time

2018-03-05 Thread Christoph Hellwig
The page size is in no way related to the aio code, and printing it in the (debug) dmesg at every boot serves no purpose. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/aio.c b/fs/aio.c index

[PATCH 07/36] aio: add delayed cancel support

2018-03-05 Thread Christoph Hellwig
The upcoming aio poll support would like to be able to complete the iocb inline from the cancellation context, but that would cause a lock order reversal. Add support for optionally moving the cancelation outside the context lock to avoid this reversal. Signed-off-by: Christoph Hellwig

[PATCH 08/36] aio: implement io_pgetevents

2018-03-05 Thread Christoph Hellwig
This is the io_getevents equivalent of ppoll/pselect and allows to properly mix signals and aio completions (especially with IOCB_CMD_POLL) and atomically executes the following sequence: sigset_t origmask; pthread_sigmask(SIG_SETMASK, , ); ret = io_getevents(ctx, min_nr,

Re: [PATCH v12 10/11] sparc64: Add support for ADI (Application Data Integrity)

2018-03-05 Thread Khalid Aziz
On 03/05/2018 02:26 PM, Dave Hansen wrote: On 02/21/2018 09:15 AM, Khalid Aziz wrote: +tag_storage_desc_t *alloc_tag_store(struct mm_struct *mm, + struct vm_area_struct *vma, + unsigned long addr) ... + tags =

[PATCH 06/36] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-03-05 Thread Christoph Hellwig
One we cancel an iocb there is no reason to keep it on the active_reqs list, given that the list is only used to look for cancelation candidates. Signed-off-by: Christoph Hellwig Acked-by: Jeff Moyer --- fs/aio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/aio.c

aio poll, io_pgetevents and a new in-kernel poll API V5

2018-03-05 Thread Christoph Hellwig
Hi all, this series adds support for the IOCB_CMD_POLL operation to poll for the readyness of file descriptors using the aio subsystem. The API is based on patches that existed in RHAS2.1 and RHEL3, which means it already is supported by libaio. To implement the poll support efficiently new

Re: [1/2] pps: client: use new parport device model

2018-03-05 Thread Sudip Mukherjee
On Sun, Jan 28, 2018 at 11:22:08PM +, Sudip Mukherjee wrote: > Modify pps client driver to use the new parallel port device model. > In that process, added an index to mention the device number when we > have more than one parallel port. > > Signed-off-by: Sudip Mukherjee > Acked-by: Rodolfo

Re: [PATCH v2 2/2] dt-bindings: Document the Synopsys DW AXI DMA bindings

2018-03-05 Thread Alexey Brodkin
Hi Rob, On Mon, 2018-03-05 at 15:07 -0600, Rob Herring wrote: > On Mon, Mar 05, 2018 at 11:02:56AM +0530, Vinod Koul wrote: > > On Fri, Mar 02, 2018 at 08:32:20AM +, Alexey Brodkin wrote: > > > Hi Vinod, > > > > > > On Fri, 2018-03-02 at 13:44 +0530, Vinod Koul wrote: > > > > On Mon, Feb 26,

[PATCH] xfrm_policy: use true and false for boolean values

2018-03-05 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/xfrm/xfrm_policy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/xfrm/xfrm_policy.c

Re: [PATCH v12 10/11] sparc64: Add support for ADI (Application Data Integrity)

2018-03-05 Thread Dave Hansen
On 03/05/2018 01:37 PM, Khalid Aziz wrote: >> How big can this storage get, btw?  Superficially it seems like it might >> be able to be gigantic for a large, sparse VMA. >> > Tags are stored only for the pages being swapped out, not for the pages > in entire vma. Each tag storage page can hold

Re: [PATCH 08/36] aio: implement io_pgetevents

2018-03-05 Thread Jeff Moyer
Christoph Hellwig writes: > This is the io_getevents equivalent of ppoll/pselect and allows to > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > and atomically executes the following sequence: > > sigset_t origmask; > > pthread_sigmask(SIG_SETMASK, , ); >

Re: [RFC V2 1/3] perf, tools: Support wildcards on pmu name in dynamic pmu events

2018-03-05 Thread Jiri Olsa
On Mon, Mar 05, 2018 at 03:10:43PM -0500, Agustin Vega-Frias wrote: > On 2018-03-05 14:09, Jiri Olsa wrote: > > On Mon, Mar 05, 2018 at 10:08:18AM -0500, Agustin Vega-Frias wrote: > > > On 2018-03-04 13:10, Jiri Olsa wrote: > > > > On Sun, Mar 04, 2018 at 09:12:45AM -0800, Andi Kleen wrote: > > >

Re: [PATCH 14/36] aio: implement IOCB_CMD_POLL

2018-03-05 Thread Jeff Moyer
Christoph Hellwig writes: > Simple one-shot poll through the io_submit() interface. To poll for > a file descriptor the application should submit an iocb of type > IOCB_CMD_POLL. It will poll the fd for the events specified in the > the first 32 bits of the aio_buf field of the iocb. > >

[PATCH] ipvs: use true and false for boolean values

2018-03-05 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/netfilter/ipvs/ip_vs_lblc.c | 4 ++-- net/netfilter/ipvs/ip_vs_lblcr.c | 4 ++-- 2 files changed, 4 insertions(+), 4

Re: [PATCH] PCI: Move declaration of of_irq_parse_and_map_pci under OF_IRQ

2018-03-05 Thread Rob Herring
On Mon, Feb 26, 2018 at 03:19:05PM -0800, Guenter Roeck wrote: > Since commit 4670d610d5923 ("PCI: Move OF-related PCI functions into > PCI core"), sparc:allmodconfig fails to build with the following error. > > pcie-cadence-host.c:(.text+0x4c4): > undefined reference to

Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers

2018-03-05 Thread Linus Torvalds
On Mon, Mar 5, 2018 at 1:35 PM, Joerg Roedel wrote: > On Mon, Mar 05, 2018 at 12:50:33PM -0800, Linus Torvalds wrote: >> >> Ahh, good. So presumably Joerg actually did check it, just didn't even >> notice ;) > > Yeah, sort of. I ran the test, but it didn't catch the failure case in > previous

Re: [PATCH v2] scsi: ufs-qcom: add number of lanes for Tx and Rx links

2018-03-05 Thread Rob Herring
On Tue, Feb 27, 2018 at 01:46:17PM +0800, Can Guo wrote: > From: Gilad Broner > > Different platforms may have different number of lanes for the UFS Tx/Rx > links. Add parameter to device tree specifying how many lanes should be > configured for the UFS Tx/Rx links. And don't print err message

Re: [PATCH v2] perf/core: Add support for PMUs that can be read from more than 1 CPU

2018-03-05 Thread Saravana Kannan
On 03/05/2018 04:21 AM, Mark Rutland wrote: On Mon, Mar 05, 2018 at 12:17:02PM +, Mark Rutland wrote: On Fri, Mar 02, 2018 at 05:14:53PM -0800, Saravana Kannan wrote: @@ -629,6 +629,7 @@ struct perf_event { int oncpu; int

[PATCH v2 4/4] input: misc: Add Gateworks System Controller support

2018-03-05 Thread Tim Harvey
Add support for dispatching Linux Input events for the various interrupts the Gateworks System Controller provides. Cc: Dmitry Torokhov Signed-off-by: Tim Harvey --- v2: - reword Kconfig - revise license comment block - remove unnecessary read of status register - remove unnecessary setting of

[PATCH v2 3/4] hwmon: add Gateworks System Controller support

2018-03-05 Thread Tim Harvey
The Gateworks System Controller has a hwmon sub-component that exposes up to 16 ADC's, some of which are temperature sensors, others which are voltage inputs. The ADC configuration (register mapping and name) is configured via device-tree and varies board to board. Cc: Guenter Roeck

[PATCH v2 2/4] mfd: add Gateworks System Controller core driver

2018-03-05 Thread Tim Harvey
The Gateworks System Controller (GSC) is an I2C slave controller implemented with an MSP430 micro-controller whose firmware embeds the following features: - I/O expander (16 GPIO's) using PCA955x protocol - Real Time Clock using DS1672 protocol - User EEPROM using AT24 protocol - HWMON using

[PATCH v2 1/4] dt-bindings: mfd: Add Gateworks System Controller bindings

2018-03-05 Thread Tim Harvey
This patch adds documentation of device-tree bindings for the Gateworks System Controller (GSC). Signed-off-by: Tim Harvey --- Documentation/devicetree/bindings/mfd/gsc.txt | 159 ++ 1 file changed, 159 insertions(+) create mode 100644

[PATCH v2 0/4] Add support for the Gateworks System Controller

2018-03-05 Thread Tim Harvey
This series adds support for the Gateworks System Controller used on Gateworks Laguna, Ventana, and Newport product families. The GSC is an MSP430 I2C slave controller whose firmware embeds the following features: - I/O expander (16 GPIO's emulating a PCA955x) - EEPROM (enumating AT24) - RTC

[PATCH] caif_dev: use true and false for boolean values

2018-03-05 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/caif/caif_dev.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/net/caif/caif_dev.c

Re: [PATCH 07/34] x86/entry/32: Restore segments before int registers

2018-03-05 Thread H. Peter Anvin
On 03/05/18 13:58, Linus Torvalds wrote: > On Mon, Mar 5, 2018 at 1:35 PM, Joerg Roedel wrote: >> On Mon, Mar 05, 2018 at 12:50:33PM -0800, Linus Torvalds wrote: >>> >>> Ahh, good. So presumably Joerg actually did check it, just didn't even >>> notice ;) >> >> Yeah, sort of. I ran the test, but

Re: [PATCH v2] perf/core: Add support for PMUs that can be read from more than 1 CPU

2018-03-05 Thread Saravana Kannan
On 03/05/2018 04:17 AM, Mark Rutland wrote: On Fri, Mar 02, 2018 at 05:14:53PM -0800, Saravana Kannan wrote: Some PMUs events can be read from more than the one CPU. So allow the PMU driver to mark events as such. For these events, we don't need to reject reads or make smp calls to the event's

Re: [PATCH 4/7] x86/microcode: Do not upload microcode if CPUs are offline

2018-03-05 Thread Tom Lendacky
On 2/28/2018 4:28 AM, Borislav Petkov wrote: > From: Ashok Raj > > Avoid loading microcode if any of the CPUs are offline, and issue a > warning. Having different microcode revisions on the system at any time > is outright dangerous. > > Signed-off-by: Ashok Raj > Cc: x86-ml > Link: >

[PATCH net-next] dt-bindings: net: dsa: marvell: describe compatibility string

2018-03-05 Thread Brandon Streiff
There are two compatibility strings for mv88e6xxx, but it isn't clear from the documentation why only those two exist when the mv88e6xxx driver supports more than the 6085 and 6190. Briefly describe how the compatible property is used, and provide guidance on which to use. The model list comes

Re: [PATCH 1/6] tpm: sort objects in the Makefile

2018-03-05 Thread Jason Gunthorpe
On Mon, Mar 05, 2018 at 09:21:37PM +, Winkler, Tomas wrote: > > On Mon, Mar 05, 2018 at 10:20:12PM +0200, Tomas Winkler wrote: > > > Make the tpm Makefile a bit more in order by putting objects in one > > > column and group together tpm2 modules > > > > > > Prefer tpm-objs += instead of tpm-y

Re: [PATCH 6/7] x86/microcode: Request microcode on the BSP

2018-03-05 Thread Tom Lendacky
On 2/28/2018 4:28 AM, Borislav Petkov wrote: > From: Borislav Petkov > > ... so that any newer version can land in the cache and can later be > fished out by the application functions. Do that before grabbing the > hotplug lock. > > Signed-off-by: Borislav Petkov > --- >

Re: [PATCH 7/7] x86/microcode: Synchronize late microcode loading

2018-03-05 Thread Tom Lendacky
On 2/28/2018 4:28 AM, Borislav Petkov wrote: > From: Ashok Raj > > Original idea by Ashok, completely rewritten by Borislav. > > Before you read any further: the early loading method is still the > preferred one and you should always do that. The following patch is > improving the late loading

Re: [PATCH v11 8/8] perf: ARM DynamIQ Shared Unit PMU support

2018-03-05 Thread Saravana Kannan
On 03/05/2018 02:59 AM, Mark Rutland wrote: On Fri, Mar 02, 2018 at 11:19:56AM -0800, Saravana Kannan wrote: On 03/02/2018 02:42 AM, Mark Rutland wrote: It's important to note that the DSU PMU's event_init() ensures events are affine to a single CPU, and the perf core code serializes

Re: [PATCH] netfilter: ipt_ah: return boolean instead of integer

2018-03-05 Thread Pablo Neira Ayuso
On Tue, Feb 13, 2018 at 08:25:57AM -0600, Gustavo A. R. Silva wrote: > Return statements in functions returning bool should use > true/false instead of 1/0. > > This issue was detected with the help of Coccinelle. This one didn't get in time for the previous merge window. Now applied, thanks.

[PATCH] ipv6: ndisc: use true and false for boolean values

2018-03-05 Thread Gustavo A. R. Silva
Assign true or false to boolean variables instead of an integer value. This issue was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva --- net/ipv6/ndisc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index

Re: [PATCH 0/7] x86/microcode: Improve late loading

2018-03-05 Thread Tom Lendacky
On 2/28/2018 4:28 AM, Borislav Petkov wrote: > From: Borislav Petkov > > Hi, > > here are a bunch of patches which improve microcode late loading. > > Before you read any further: the early loading method is still the > preferred one and you should always do that. This patchset is improving >

[PATCH v4 00/38] DRM Rockchip rk3399 (Kevin)

2018-03-05 Thread Enric Balletbo i Serra
Hi, This patchset includes cleanups, improvements, and bug fixes for Rockchip DRM driver and PSR support. This new version is the same as before but rebased on top of drm-misc-next plus the Marek patches that fixes Chromebook2 Peach-Pit [1] and the latest series of Rockchip rk3399 eDP support

Re: [PATCH v5 1/6] dt-bindings: add bindings for USB physical connector

2018-03-05 Thread Rob Herring
On Tue, Feb 27, 2018 at 08:11:29AM +0100, Andrzej Hajda wrote: > These bindings allow to describe most known standard USB connectors > and it should be possible to extend it if necessary. > USB connectors, beside USB can be used to route other protocols, > for example UART, Audio, MHL. In such

Re: [PATCH v8 15/15] dt-bindings: cpufreq: Document operating-points-v2-krait-cpu

2018-03-05 Thread Rob Herring
On Tue, Feb 27, 2018 at 07:37:02PM +0530, Sricharan R wrote: > In Certain QCOM SoCs like ipq8064, apq8064, msm8960, msm8974 > that has KRAIT processors the voltage/current value of each OPP > varies based on the silicon variant in use. > operating-points-v2-krait-cpu specifies the phandle to nvmem

Re: [PATCH] netfilter: ipt_ah: return boolean instead of integer

2018-03-05 Thread Gustavo A. R. Silva
On 03/05/2018 04:10 PM, Pablo Neira Ayuso wrote: On Tue, Feb 13, 2018 at 08:25:57AM -0600, Gustavo A. R. Silva wrote: Return statements in functions returning bool should use true/false instead of 1/0. This issue was detected with the help of Coccinelle. This one didn't get in time for the

[PATCH v4 00/38] DRM Rockchip rk3399 (Kevin)

2018-03-05 Thread Enric Balletbo i Serra
Hi, This patchset includes cleanups, improvements, and bug fixes for Rockchip DRM driver and PSR support. This new version is the same as before but rebased on top of drm-misc-next plus the Marek patches that fixes Chromebook2 Peach-Pit [1] and the latest series of Rockchip rk3399 eDP support

[PATCH v4 14/38] drm/bridge: analogix_dp: Set PD_INC_BG first when powering up edp phy

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang Following the correct power up sequence: dp_pd=ff => dp_pd=7f => wait 10us => dp_pd=00 Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra ---

[PATCH v4 16/38] drm/bridge: analogix_dp: Extend hpd check time to 100ms

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang There was a 1ms delay to detect the hpd signal, which is too short to detect a short pulse. This patch extends this delay to 100ms. Cc: Stéphane Marchesin Cc: 征增 王 Signed-off-by: Lin Huang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda

[PATCH v4 19/38] drm/bridge: analogix_dp: Fix AUX_PD bit for Rockchip

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang There are some different bits between Rockchip and Exynos in register "AUX_PD". This patch fixes the incorrect operations about it. Cc: Douglas Anderson Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda

[PATCH v4 11/38] drm/bridge: analogix_dp: Don't use fast link training when panel just powered up

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang Panel would reset its setting when it powers down. It would forget the last succeeded link training setting. So we can't use the last successful link training setting to do fast link training. Let's reset fast_train_enable in analogix_dp_bridge_disable(); Cc: Stéphane Marchesin

[PATCH v4 21/38] drm/rockchip: Restore psr->state when enable/disable psr failed

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang If we failed disable psr, it would hang the display until next psr cycle coming. So we should restore psr->state when it failed. Cc: Tomasz Figa Signed-off-by: zain wang Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by:

[PATCH v4 23/38] drm/bridge: analogix_dp: Fix timeout of video streamclk config

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang The STRM_VALID bit in register ANALOGIX_DP_SYS_CTL_3 may be unstable, so we may hit the error log "Timeout of video streamclk ok" since checked this unstable bit. In fact, we can go continue and the streamclk is ok if we wait enough time, it does no effect on display. Let's

[PATCH v4 28/38] drm/bridge: analogix_dp: Properly disable aux chan retries on rockchip

2018-03-05 Thread Enric Balletbo i Serra
From: Douglas Anderson The comments in analogix_dp_init_aux() claim that we're disabling aux channel retries, but then right below it for Rockchip it sets them to 3. If we actually need 3 retries for Rockchip then we could adjust the comment, but it seems more likely that we want the same retry

[PATCH v4 29/38] drm/rockchip: pre dither down when output bpc is 8bit

2018-03-05 Thread Enric Balletbo i Serra
From: Mark Yao Some encoder have a crc verification check, crc check fail if input and output data is not equal. That means encoder input and output need use same color depth, vop can output 10bit data to encoder, but some panel only support 8bit depth, that would make crc check die. So pre

[PATCH v4 18/38] drm/bridge: analogix_dp: Check dpcd write/read status

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang We need to check the dpcd write/read return value to see whether the write/read was successful Cc: Kristian H. Kristensen Signed-off-by: Lin Huang Signed-off-by: zain wang Signed-off-by: Douglas Anderson Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by:

[PATCH v4 25/38] drm/bridge: analogix_dp: Move fast link training detect to set_bridge

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang It's too early to detect fast link training, if other step after it failed, we will set fast_link flag to 1, and retry set_bridge again. In this case we will power down and power up panel power supply, and we will do fast link training since we have set fast_link flag to 1. In

[PATCH v4 32/38] drm/rockchip: Disable PSR on input events

2018-03-05 Thread Enric Balletbo i Serra
From: "Kristian H. Kristensen" To improve PSR exit latency, we speculatively start exiting when we receive input events. Occasionally, this may lead to false positives, but most of the time we get a head start on coming out of PSR. Depending on how userspace takes to produce a new frame in

[PATCH v4 31/38] drm/rockchip: analogix_dp: Do not call Analogix code before bind

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa Driver callbacks, such as system suspend or resume can be called any time, specifically they can be called before the component bind callback. Let's use dp->adp pointer as a safeguard and skip calling Analogix entry points if it is an ERR_PTR(). Signed-off-by: Tomasz Figa

[PATCH v4 30/38] drm/bridge: analogix_dp: Split the platform-specific poweron in two parts

2018-03-05 Thread Enric Balletbo i Serra
From: Douglas Anderson Some of the platform-specific stuff in rockchip_dp_poweron() needs to happen before the generic code. Some needs to happen after. Let's split the callback in two. Specifically we can't start doing PSR work until _after_ the whole controller is up, so don't set the

Re: [PATCH 7/7] perf tools: Refine perf_mmap__read_init

2018-03-05 Thread Jiri Olsa
On Mon, Mar 05, 2018 at 02:10:59PM -0500, kan.li...@linux.intel.com wrote: SNIP > diff --git a/tools/perf/util/mmap.c b/tools/perf/util/mmap.c > index e3921ed..403c5e6 100644 > --- a/tools/perf/util/mmap.c > +++ b/tools/perf/util/mmap.c > @@ -235,16 +235,13 @@ static int

[PATCH v4 27/38] drm/bridge: analogix_dp: Properly log AUX CH errors

2018-03-05 Thread Enric Balletbo i Serra
From: Douglas Anderson The code in analogix_dp_transfer() that was supposed to print out: AUX CH error happened Was actually dead code. That's because the previous check (whether the interrupt status indicated any errors) would have hit for all errors anyway. Let's combine the two error

[PATCH v4 26/38] drm/bridge: analogix_dp: Reorder plat_data->power_off to happen sooner

2018-03-05 Thread Enric Balletbo i Serra
From: Douglas Anderson The current user of the analogix power_off is "analogix_dp-rockchip". That driver does this: - deactivate PSR - turn off a clock Both of these things (especially deactive PSR) should be done before we turn the PHY power off and turn off analog power. Let's move the

[PATCH v4 22/38] drm/bridge: analogix_dp: Don't use ANALOGIX_DP_PLL_CTL to control pll

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang There is no register named ANALOGIX_DP_PLL_CTL in Rockchip edp phy reg list. We should use BIT_4 in ANALOGIX_DP_PD to control the pll power instead of ANALOGIX_DP_PLL_CTL. Cc: Douglas Anderson Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande

[PATCH v4 24/38] drm/bridge: analogix_dp: Fix incorrect operations with register ANALOGIX_DP_FUNC_EN_1

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang Register ANALOGIX_DP_FUNC_EN_1(offset 0x18), Rockchip is different to Exynos: on Exynos edp phy, BIT 7 MASTER_VID_FUNC_EN_N BIT 6 reserved BIT 5 SLAVE_VID_FUNC_EN_N on Rockchip edp phy, BIT 7 reserved BIT 6 RK_VID_CAP_FUNC_EN_N

[PATCH v4 17/38] drm/bridge: analogix_dp: Fix incorrect usage of enhanced mode

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang Enhanced mode is required by the eDP 1.2 specification, and not doing it early could result in a period of time where we have a link transmitting idle packets without it. Since there is no reason to disable it, we just enable it at the beginning of link training and then keep it

[PATCH v4 33/38] drm/rockchip: Cancel PSR enable work before changing the state

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa If we change the state first and reschedule later, we might have the work executed according to previous scheduled time and end up with PSR re-enabled instantly. Let's cancel the work before changing the state. While at it, consolidate psr_disable_handler() to just call

[PATCH v4 20/38] drm/bridge: analogix_dp: Reset aux channel if an error occurred

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang AUX errors are caused by many different reasons. We may not know what happened in aux channel on failure, so let's reset aux channel if some errors occurred. Cc: 征增 王 Cc: Douglas Anderson Signed-off-by: Lin Huang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande

[PATCH v4 15/38] drm/bridge: analogix_dp: Ensure edp is disabled when shutting down the panel

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang When panel is shut down, we should make sure edp can be disabled to avoid undefined behavior. Cc: Stéphane Marchesin Signed-off-by: Lin Huang Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda Signed-off-by: Enric

[PATCH v4 37/38] drm/rockchip: Disallow PSR for the whole atomic commit

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa Currently PSR flush is triggered from CRTC's .atomic_begin() callback, which is executed after modeset disables and enables and before plane updates are committed. Since PSR flush and re-enable can be triggered asynchronously by external sources (input event, delayed work), it

[PATCH v4 36/38] drm/rockchip: Disable PSR from reboot notifier

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa It looks like the driver subsystem detaches devices from power domains at shutdown without consent of the drivers. This means that we might have our power domain turned off behind our back and the only way to avoid problems is to stop doing any hardware programming at some

Re: [PATCH v2 04/10] PCI/P2PDMA: Clear ACS P2P flags for all devices behind switches

2018-03-05 Thread Bjorn Helgaas
On Thu, Mar 01, 2018 at 12:13:10PM -0700, Logan Gunthorpe wrote: > > > On 01/03/18 11:02 AM, Bjorn Helgaas wrote: > > > void pci_enable_acs(struct pci_dev *dev) > > > { > > > + if (pci_p2pdma_disable_acs(dev)) > > > + return; > > > > This doesn't read naturally to me. I do see that

[PATCH v4 34/38] drm/rockchip: psr: Avoid redundant calls to .set() callback

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa The first time after we call rockchip_drm_do_flush() after rockchip_drm_psr_register(), we go from PSR_DISABLE to PSR_FLUSH. The difference between PSR_DISABLE and PSR_FLUSH is whether or not we have a delayed work pending - PSR is off in either state. However psr_set_state()

[PATCH v4 38/38] drm/rockchip: psr: Remove flush by CRTC

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa It is not used anymore after last changes and it was not even correct to begin with as it assumed a 1:1 relation between a CRTC and encoder, while in fact a CRTC can be attached to multiple encoders. Signed-off-by: Tomasz Figa Signed-off-by: Thierry Escande Signed-off-by:

[PATCH v4 35/38] drm/rockchip: psr: Sanitize semantics of allow/disallow API

2018-03-05 Thread Enric Balletbo i Serra
From: Tomasz Figa Currently both rockchip_drm_psr_activate() and _deactivate() only set the boolean "active" flag without actually making sure that hardware state complies with it. Since we are going to extend the usage of this API to properly lock PSR for the duration of atomic commits, we

Re: [PATCH 1/2] ASoC: add tda7419 audio processor binding

2018-03-05 Thread Rob Herring
On Tue, Feb 27, 2018 at 05:51:27PM -0500, Matt Porter wrote: > DeviceTree binding for the tda7419 audio processor. > > Signed-off-by: Matt Porter > --- > Documentation/devicetree/bindings/sound/tda7419.txt | 15 +++ > 1 file changed, 15 insertions(+) > create mode 100644

[PATCH v4 12/38] drm/bridge: analogix_dp: Retry bridge enable when it failed

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang When we enable bridge failed, we have to retry it, otherwise we would get the abnormal display. Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda Signed-off-by: Enric Balletbo i Serra ---

[PATCH v4 13/38] drm/bridge: analogix_dp: Wait for HPD signal before configuring link

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang According to DP spec v1.3 chap 3.5.1.2 Link Training, Link Policy Maker must first detect that the HPD signal is asserted high by the Downstream Device before establishing a link with it. Cc: Stéphane Marchesin Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by:

[PATCH v4 10/38] drm/bridge: analogix_dp: Check AUX_EN status when doing AUX transfer

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang We should check AUX_EN bit to confirm the AUX CH operation is completed. Cc: Stéphane Marchesin Signed-off-by: Lin Huang Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra ---

[PATCH v4 08/38] drm/rockchip: Only wait for panel ACK on PSR entry

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang We currently wait for the panel to mirror our intended PSR state before continuing on both PSR enter and PSR exit. This is really only important to do when we're entering PSR, since we want to be sure the last frame we pushed is being served from the panel's internal fb before

[PATCH v4 06/38] drm/rockchip: add mutex vop lock

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang Add a lock to vop to avoid disabling the crtc while waiting for a line flag while enabling psr. If we disable in the middle of waiting for the line flag, we'll end up timing out or worse. Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande

[PATCH v4 09/38] drm/bridge: analogix_dp: Move enable video into config_video()

2018-03-05 Thread Enric Balletbo i Serra
From: Lin Huang We need to enable video before analogix_dp_is_video_stream_on(), so we can get the right video stream status. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Lin Huang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Reviewed-by: Andrzej Hajda Signed-off-by: Enric

[PATCH v4 04/38] drm/rockchip: Remove analogix psr worker

2018-03-05 Thread Enric Balletbo i Serra
From: Sean Paul Now that the spinlocks and timers are gone, we can remove the psr worker located in rockchip's analogix driver and do the enable/disable directly. This should simplify the code and remove races on disable. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Sean Paul

[PATCH v4 07/38] drm/bridge: analogix_dp: add fast link train for eDP

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang We would meet a short black screen when exit PSR with the full link training, In this case, we should use fast link train instead of full link training. Signed-off-by: zain wang Signed-off-by: Sean Paul Signed-off-by: Thierry Escande Signed-off-by: Enric Balletbo i Serra ---

[PATCH v4 03/38] drm/bridge: analogix_dp: detect Sink PSR state after configuring the PSR

2018-03-05 Thread Enric Balletbo i Serra
From: Yakir Yang Make sure the request PSR state takes effect in analogix_dp_send_psr_spd() function, or print the sink PSR error state if we failed to apply the requested PSR setting. Cc: 征增 王 Cc: Stéphane Marchesin Signed-off-by: Yakir Yang [seanpaul changed timeout loop to a readx poll]

[PATCH v4 05/38] drm/bridge: analogix_dp: Don't change psr while bridge is disabled

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang There is a race between AUX CH bring-up and enabling bridge which will cause link training to fail. To avoid hitting it, don't change psr state while enabling the bridge. Cc: Tomeu Vizoso Cc: Sean Paul Signed-off-by: zain wang Signed-off-by: Caesar Wang [seanpaul fixed up

[PATCH v4 01/38] drm/bridge: analogix_dp: set psr activate/deactivate when enable/disable bridge

2018-03-05 Thread Enric Balletbo i Serra
From: zain wang There's a race between when bridge_disable and when vop_crtc_disable are called. If the flush timer triggers a new psr work between these, we will operate eDP without power shutdowned by bridge_disable. In this case, moving activate/deactivate to enable/disable bridge to avoid

[PATCH v4 02/38] drm/rockchip: Don't use atomic constructs for psr

2018-03-05 Thread Enric Balletbo i Serra
From: Sean Paul Instead of using timer and spinlocks, use delayed_work and mutexes for rockchip psr. This allows us to make blocking calls when enabling/disabling psr (which is sort of important given we're talking over dpcd to the display). Cc: Caesar Wang Cc: 征增 王 Cc: Stéphane Marchesin

<    8   9   10   11   12   13   14   15   16   17   >