[PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance

2021-10-20 Thread John Keeping
The properties below refer to items in panel-common.yaml, which means that needs to be referenced in the schema. Signed-off-by: John Keeping --- .../devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree

[PATCH 3/3] drm/panel: ilitek-ili9881c: Read panel orientation

2021-10-20 Thread John Keeping
The panel orientation needs to parsed from a device-tree and assigned to the panel's connector in order to make orientation property available to userspace. That's what this patch does for ILI9881C based panels. Signed-off-by: John Keeping --- drivers/gpu/drm/panel/panel-ilitek-ili98

[PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation

2021-10-20 Thread John Keeping
Support the "rotation" DT property for ILI9881C based panels. The first patch is a fix for the binding, then the usual binding update followed by the corresponding driver update. John Keeping (3): dt-bindings: ili9881c: add missing panel-common inheritance dt-bindings: ili9881c: ad

[PATCH 2/3] dt-bindings: ili9881c: add rotation property

2021-10-20 Thread John Keeping
Allow the standard rotation property from panel-common for ILI9881C based panels. Signed-off-by: John Keeping --- .../devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/display/panel/ilitek

[PATCH] drm/rockchip: use generic fbdev setup

2021-10-29 Thread John Keeping
The Rockchip fbdev code does not add anything compared to drm_fbdev_generic_setup(); the one custom function for .fb_mmap does the same thing as gem_prime_mmap which is called by the helper. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/Makefile | 1 - drivers/gpu/drm

Re: dri/drm/kms question with regards to minor faults

2021-10-29 Thread John Keeping
Hi Bert, On Tue, Oct 26, 2021 at 05:18:47PM -0700, Bert Schiettecatte wrote: > I have an application I'm working on where I'm using OpenGLES / EGL > and dri/drm/kms. The main loop of my application looks like the code > below. When running htop, I see that the number of minor faults > (memory) are

Re: [PATCH] drm/rockchip: use generic fbdev setup

2021-10-30 Thread John Keeping
Hi Thomas, On Fri, Oct 29, 2021 at 09:00:08PM +0200, Thomas Zimmermann wrote: > Am 29.10.21 um 13:50 schrieb John Keeping: > > The Rockchip fbdev code does not add anything compared to > > drm_fbdev_generic_setup(); the one custom function for .fb_mmap does the > > same th

Re: [PATCH] drm/rockchip: use generic fbdev setup

2021-11-01 Thread John Keeping
On Sun, 31 Oct 2021 19:09:39 +0100 Thomas Zimmermann wrote: > Am 30.10.21 um 14:05 schrieb John Keeping: > > On Fri, Oct 29, 2021 at 09:00:08PM +0200, Thomas Zimmermann wrote: > >> Am 29.10.21 um 13:50 schrieb John Keeping: > >>> The Rockchip fbdev code doe

[PATCH] drm/rockchip: pass 0 to drm_fbdev_generic_setup()

2021-11-01 Thread John Keeping
Allow drm_fbdev_generic_setup() to pick the default bpp value for the framebuffer. This has no functional impact because the default is 32, given that mode_config.preferred_depth is not set for Rockchip. Suggested-by: Thomas Zimmermann Signed-off-by: John Keeping --- This needs [1] to be

Re: [PATCH] drm/rockchip: use generic fbdev setup

2021-12-07 Thread John Keeping
Hi Thomas, On Mon, Nov 01, 2021 at 11:34:15AM +, John Keeping wrote: > On Sun, 31 Oct 2021 19:09:39 +0100 > Thomas Zimmermann wrote: > > Am 30.10.21 um 14:05 schrieb John Keeping: > > > On Fri, Oct 29, 2021 at 09:00:08PM +0200, Thomas Zimmermann wrote: > > >

[PATCH] drm/rockchip: vop: duplicate subclassed state variables

2021-12-15 Thread John Keeping
, and enable_afbc is always set in the preceding .atomic_check, so the only issue here is inspecting the state later when these field end up no longer reflecting what has been programmed in the hardware. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- 1 file

[PATCH] drm/rockchip: vop: implement atomic_print_state

2021-12-15 Thread John Keeping
Rockchip VOP subclasses drm_crtc_state so implementing the atomic_print_state hook allows printing the additional Rockchip-specific fields of the CRTC state. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 14 ++ 1 file changed, 14 insertions(+) diff

[PATCH] drm/rockchip: fix VOP_WIN_GET macro

2019-07-03 Thread John Keeping
9bff ("drm/rockchip: vop: group vop registers") Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 09a790

[PATCH] drm/bridge: panel: Set orientation on panel_bridge connector

2023-01-20 Thread John Keeping
Call the necessary function to set add the orientation property when the connector is created so that it is available before the device is registered. Fixes: 15b9ca1641f0 ("drm: Config orientation property if panel provides it") Signed-off-by: John Keeping --- drivers/gpu/drm/bridge/panel.c |

Re: [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector

2023-01-21 Thread John Keeping
Hi Sam & Doug, On Sat, Jan 21, 2023 at 09:57:18AM +0100, Sam Ravnborg wrote: > On Fri, Jan 20, 2023 at 01:44:38PM -0800, Doug Anderson wrote: > > On Fri, Jan 20, 2023 at 3:43 AM John Keeping wrote: > > > > > > Commit 15b9ca1641f0 ("drm: Config orientation

Re: [PATCH] drm/bridge: panel: Set orientation on panel_bridge connector

2023-01-23 Thread John Keeping
Hi Laurent, On Sun, Jan 22, 2023 at 05:01:27PM +0200, Laurent Pinchart wrote: > On Sat, Jan 21, 2023 at 05:58:11PM +0000, John Keeping wrote: > > On Sat, Jan 21, 2023 at 09:57:18AM +0100, Sam Ravnborg wrote: > > > On Fri, Jan 20, 2023 at 01:44:38PM -0800, Doug Anderson wrote: &

Re: [BUG] [PATCH] drm/rockchip: use generic fbdev setup

2022-10-17 Thread John Keeping
r7:0000 r6: > r5:c01491a8 > [7.977144] r4:c200e800 r3:0001 > [7.977155] ---[ end trace ]--- > > On 10/29/21 13:50, John Keeping wrote: > > The Rockchip fbdev code does not add anything compared to > > drm_fbdev_generic_s

Re: [BUG] [PATCH] drm/rockchip: use generic fbdev setup

2022-10-17 Thread John Keeping
On Mon, Oct 17, 2022 at 08:30:23PM +0200, Johan Jonker wrote: > > > On 10/17/22 13:29, Heiko Stuebner wrote: > > Am Montag, 17. Oktober 2022, 12:05:16 CEST schrieb John Keeping: > >> Hi Johan, > >> > >> On Mon, Oct 17, 2022 at 10:11:32AM +0200, Johan J

Re: [PATCH v1] drm: rockchip: remove rockchip_drm_framebuffer_init() function

2022-10-20 Thread John Keeping
sub function > rockchip_fb_alloc() and cleanup the rockchip_drm_fb.h header file. > > Signed-off-by: Johan Jonker Reviewed-by: John Keeping > --- > drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 43 -- > drivers/gpu/drm/rockchip/rockchip_drm_fb.h | 6 --- &g

[PATCH] drm/rockchip: fix fbdev on non-IOMMU devices

2022-10-20 Thread John Keeping
: 24af7c34b290 ("drm/rockchip: use generic fbdev setup") Reported-by: Johan Jonker Cc: Thomas Zimmermann Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_dr

Re: [PATCH] drm/rockchip: dw_hdmi: filter regulator -EPROBE_DEFER error messages

2022-10-26 Thread John Keeping
On Mon, Sep 26, 2022 at 10:37:52PM +0200, Aurelien Jarno wrote: > When the avdd-0v9 or avdd-1v8 supply are not yet available, EPROBE_DEFER > is returned by rockchip_hdmi_parse_dt(). This causes the following error > message to be printed multiple times: > > dwhdmi-rockchip fe0a.hdmi: [drm:

[PATCH] drm/rockchip: avoid duplicate mappings for IOMMU devices

2022-11-10 Thread John Keeping
If a buffer is allocated with alloc_kmap, then it is vmap'd on creation and there is no reason to map it again in rockchip_gem_prime_vmap() when the existing mapping can be used. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 13 ++--- 1 file change

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 >

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

2017-01-29 Thread John Keeping
The bias, bandgap and PLL should all be configured before we enable them. Signed-off-by: John Keeping --- v3: - Squash together two patches that both affect initialization order of the PHY Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 ++- 1 file changed, 6 insertions

[PATCH v3 03/24] drm/rockchip: dw-mipi-dsi: remove mode_set hook

2017-01-29 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 --- v3: - Add Chris' Reviewed-by New in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 13 +

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

2017-01-29 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 --- v3: - Add

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

2017-01-29 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:

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

2017-01-29 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 --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/r

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

2017-01-29 Thread John Keeping
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 the escape clock speed. Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v3: - Improve the commit message a bit - Add Chris' Review

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

2017-01-29 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 --- v3: - Add Chris' Reviewed-by Unchanged in v2 dri

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

2017-01-29 Thread John Keeping
in order to ensure that the PHY configuration is correct. Signed-off-by: John Keeping --- v3: - Wrap some long lines Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 39 ++ 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm

[PATCH v3 17/24] drm/rockchip: dw-mipi-dsi: improve PLL configuration

2017-01-29 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 --- Unchanged in v3 Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 2 +- 1

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

2017-01-29 Thread John Keeping
As an aid to debugging. Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gp

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

2017-01-29 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 v3 00/24] drm/rockchip: MIPI fixes & improvements

2017-01-29 Thread John Keeping
This re-roll mostly just gather up reviewed-by tags, although I have also wrapped some long lines and squashed together some commits as suggested by Chris Zhong. Version 2 was posted here: https://www.spinics.net/lists/arm-kernel/msg556683.html John Keeping (24): drm/rockchip: dw-mipi-dsi

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

2017-01-29 Thread John Keeping
I haven't found any method for getting the length of a response, so this just uses the requested rx_len Signed-off-by: John Keeping --- v3: - Fix checkpatch warnings Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 56 ++ 1 file changed, 56 inser

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

2017-01-29 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 --- v3: - Add Chris' Review

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

2017-01-29 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 v3 08/24] drm/rockchip: dw-mipi-dsi: respect message flags

2017-01-29 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 --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gp

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

2017-01-29 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 --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 12 ++-- 1 file changed, 2 insertions(+

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

2017-01-29 Thread John Keeping
This ensures that the output resolution is known before fbcon loads. Signed-off-by: John Keeping --- Unchanged in v3 Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b

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

2017-01-29 Thread John Keeping
As a side-effect of this, encode the endianness explicitly rather than casting a u16. Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 9 +++-- 1 file changed, 7 insertions(+), 2 dele

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

2017-01-29 Thread John Keeping
Signed-off-by: John Keeping Reviewed-by: Chris Zhong --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 16 +--- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/roc

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

2017-01-29 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 --- v3: - Add

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

2017-01-29 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 --- v3: - Add Chris' Reviewed-by New in v2 drivers/gpu/drm/rockchip/dw-

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

2017-01-29 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 --- Unchanged in v3 Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/r

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

2017-01-29 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 --- v3: - Add Chris' Reviewed-by Unchanged in v2 drivers/gpu/drm/rockchip/dw-mipi-dsi.c

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

2017-01-29 Thread John Keeping
This matches other drivers. Signed-off-by: John Keeping --- 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-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index

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

2017-01-30 Thread John Keeping
On Mon, 30 Jan 2017 10:26:11 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:44PM +0000, John Keeping wrote: > > I haven't found any method for getting the length of a response, so this > > just uses the requested rx_len > > > > Signed-off-by: John Ke

Re: [PATCH v3 06/24] drm/rockchip: dw-mipi-dsi: avoid out-of-bounds read on tx_buf

2017-01-30 Thread John Keeping
On Mon, 30 Jan 2017 13:01:46 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:26PM +0000, John Keeping wrote: > > As a side-effect of this, encode the endianness explicitly rather than > > casting a u16. > > > > Signed-off-by: John Keeping > > Reviewe

Re: [PATCH v3 06/24] drm/rockchip: dw-mipi-dsi: avoid out-of-bounds read on tx_buf

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 15:09:55 -0500, Sean Paul wrote: > On Mon, Jan 30, 2017 at 06:16:36PM +0000, John Keeping wrote: > > On Mon, 30 Jan 2017 13:01:46 -0500, Sean Paul wrote: > > > > > On Sun, Jan 29, 2017 at 01:24:26PM +, John Keeping wrote: > > > >

Re: [PATCH v3 10/24] drm/rockchip: dw-mipi-dsi: don't assume buffer is aligned

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 15:08:11 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:30PM +0000, John Keeping wrote: > > 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 > > sta

Re: [PATCH v3 12/24] drm/rockchip: dw-mipi-dsi: allow commands in panel_disable

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 15:19:53 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:32PM +0000, John Keeping wrote: > > Panel drivers may want to sent commands during the disable function, for > > example MIPI_DCS_SET_DISPLAY_OFF before the video signal ends. In order > >

Re: [PATCH v3 15/24] drm/rockchip: dw-mipi-dsi: configure PHY before enabling

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 15:28:08 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:35PM +0000, John Keeping wrote: > > The bias, bandgap and PLL should all be configured before we enable > > them. > > > > Do you know why the test codes are hard-coded magic? It

Re: [PATCH v3 16/24] drm/rockchip: dw-mipi-dsi: properly configure PHY timing

2017-01-31 Thread John Keeping
On Mon, 30 Jan 2017 16:57:36 -0500, Sean Paul wrote: > On Sun, Jan 29, 2017 at 01:24:36PM +0000, John Keeping wrote: > > These values are specified as constant time periods but the PHY > > configuration is in terms of the current lane byte clock so using > > constant value

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

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 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 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 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 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: [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

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 &

[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 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 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 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 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

[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 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 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 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 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 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 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 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 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 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 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 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 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 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 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 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] 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

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 > > --- > >

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 00/27] drm/rockchip: MIPI fixes & improvements

2016-09-19 Thread John Keeping
on, 19 Sep 2016 18:17:10 +0100, John Keeping wrote: > This is a bit of a mixed selection of patches to all areas of the > Rockchip dw-mipi-dsi driver, which I've been using for a while. > > The first few patches fix the driver's use of the atomic API by removing > hard

[PATCH 18/27] drm/rockchip: dw-mipi-dsi: configure bias and bandgap before enable

2016-09-19 Thread John Keeping
We should configure these functions before enabling them. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index

[PATCH 16/27] drm/rockchip: dw-mipi-dsi: fix escape clock rate

2016-09-19 Thread John Keeping
Use the same calculation as the vendor kernel to derive the escape clock speed. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw

[PATCH 17/26] drm/rockchip: dw-mipi-dsi: don't enable PHY PLL until it's configured

2016-09-19 Thread John Keeping
Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index f824c99b872e..463e469fd1b8 100644 --- a/drivers/gpu/drm/rockchip/dw

[PATCH 14/27] drm/rockchip: dw-mipi-dsi: use specific poll helper

2016-09-19 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 --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a

[PATCH 04/26] drm/rockchip: dw-mipi-dsi: rename commit hook to enable

2016-09-19 Thread John Keeping
Rockchip DRM is fully atomic and commit is deprecated for atomic drivers. No changed are needed beyond renaming the function. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip

[PATCH 25/26] drm/rockchip: dw-mipi-dsi: add reset control

2016-09-19 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 --- drivers/gpu/drm/rockchip/dw-mipi

[PATCH 08/26] drm/rockchip: dw-mipi-dsi: include bad value in error message

2016-09-19 Thread John Keeping
As an aid to debugging. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index 38186df8476e..a25db02e1c19 100644 --- a

[PATCH 16/26] drm/rockchip: dw-mipi-dsi: configure bias and bandgap before enable

2016-09-19 Thread John Keeping
We should configure these functions before enabling them. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c index

[PATCH 02/26] drm/rockchip: dw-mipi-dsi: pass new mode into MIPI mode set

2016-09-19 Thread John Keeping
In the atomic world the new connector state is not set when mode_set is called and we should use the adjusted_mode parameter. Signed-off-by: John Keeping --- drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/rockchip

  1   2   3   >