[linux-sunxi] Re: [PATCH 0/7] drm/sun4i: More cleanups

2017-10-16 Thread Chen-Yu Tsai
On Tue, Oct 17, 2017 at 12:23 PM, Chen-Yu Tsai wrote: > Hi, > > Here's another bunch of cleanups for sun4i-drm. Most of these were > found while working on A10/A20 DRM and HDMI support. To be clear, > nothing was broken before these patches. > > Changes since v1: > > - Expanded commit message fo

[linux-sunxi] [PATCH v2 4/7] drm/sun4i: backend: Add comment explaining why registers are cleared

2017-10-16 Thread Chen-Yu Tsai
Many of the backend's layer configuration registers have undefined default values. This poses a risk as we use regmap_update_bits in some places, and don't overwrite the whole register. At probe/bind time we explicitly clear all the control registers by writing 0 to them. This patch adds a more de

[linux-sunxi] [PATCH v2 7/7] drm/sun4i: hdmi: Move PAD_CTRL1 setting to mode_set function

2017-10-16 Thread Chen-Yu Tsai
Initially we configured the PAD_CTRL1 register at probe/bind time. However it seems the HDMI controller will modify some of the bits in this register by itself. On the A10 it is particularly annoying as it toggles the output invert bits, which inverts the colors on the display output. The U-boot d

[linux-sunxi] [PATCH v2 2/7] drm/sun4i: backend: Create regmap after access is possible

2017-10-16 Thread Chen-Yu Tsai
The backend has various clocks and reset controls that need to be enabled and deasserted before register access is possible. Move the creation of the regmap to after the clocks and reset controls have been configured where it makes more sense. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun

[linux-sunxi] [PATCH v2 3/7] drm/sun4i: backend: Use drm_fb_cma_get_gem_addr() to get display memory

2017-10-16 Thread Chen-Yu Tsai
Commit 4636ce93d5b2 ("drm/fb-cma-helper: Add drm_fb_cma_get_gem_addr()") adds a new helper, which covers fetching a drm_framebuffer's GEM object and calculating the buffer address for a given plane. This patch uses this helper to replace our own open coded version of the same function. Signed-off

[linux-sunxi] [PATCH v2 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread Chen-Yu Tsai
The display backend, as well as other peripherals that have a DRAM clock gate and access DRAM directly, bypassing the system bus, address the DRAM starting from 0x0, while physical addresses the system uses starts from 0x4000 (or 0x2000 in A80's case). This issue was witnessed on the Cubie

[linux-sunxi] [PATCH v2 1/7] drm/sun4i: don't add components that are already in the queue

2017-10-16 Thread Chen-Yu Tsai
Even though the components framework can handle duplicate entries, the extra entries cause a lot more debug messages to be generated, which would be confusing to developers not familiar with our driver and the framework in general. Instead, we can scan the relatively small queue and check if the c

[linux-sunxi] [PATCH 0/7] drm/sun4i: More cleanups

2017-10-16 Thread Chen-Yu Tsai
Hi, Here's another bunch of cleanups for sun4i-drm. Most of these were found while working on A10/A20 DRM and HDMI support. To be clear, nothing was broken before these patches. Changes since v1: - Expanded commit message for patch 5 explaining the details of memory address difference, wra

[linux-sunxi] [PATCH v2 6/7] drm/sun4i: hdmi: Document PAD_CTRL1 output invert bits

2017-10-16 Thread Chen-Yu Tsai
While debugging inverted color from the HDMI output on the A10, I found that the lowest 3 bits were set. These were cleared on A20 boards that had normal display output. By manually toggling these bits the mapping of the color components to these bits was found. While these are not used anywhere,

[linux-sunxi] Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-16 Thread 'Bin Liu' via linux-sunxi
On Mon, Oct 16, 2017 at 11:54:27PM +1100, Jonathan Liu wrote: > On 16 October 2017 at 23:49, Bin Liu wrote: > > On Mon, Oct 16, 2017 at 04:13:51PM +1100, Jonathan Liu wrote: > >> On 10 October 2017 at 14:22, Bin Liu wrote: > >> > On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: > >>

Re: [linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread Chen-Yu Tsai
On Tue, Oct 17, 2017 at 4:15 AM, Maxime Ripard wrote: > On Mon, Oct 16, 2017 at 04:20:32PM +0800, Chen-Yu Tsai wrote: >> > On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: >> >> The display backend, as well as other peripherals that have a DRAM >> >> clock gate and access DRAM directl

[linux-sunxi] [PATCH v5 07/11] dmaengine: sun6i: Retrieve channel count/max request from devicetree

2017-10-16 Thread Stefan Brüns
To avoid introduction of a new compatible for each small SoC/DMA controller variation, move the definition of the channel count to the devicetree. The number of vchans is no longer explicit, but limited by the highest port/DMA request number. The result is a slight overallocation for SoCs with a s

Re: [linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread Maxime Ripard
On Mon, Oct 16, 2017 at 04:20:32PM +0800, Chen-Yu Tsai wrote: > > On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: > >> The display backend, as well as other peripherals that have a DRAM > >> clock gate and access DRAM directly, bypassing the system bus, > >> address the DRAM starting

[linux-sunxi] Re: [PATCH v4 07/11] dmaengine: sun6i: Retrieve channel count/max request from devicetree

2017-10-16 Thread Vinod Koul
On Mon, Oct 16, 2017 at 02:21:02PM +, Brüns, Stefan wrote: > On Montag, 16. Oktober 2017 09:02:17 CEST Vinod Koul wrote: > > On Thu, Sep 28, 2017 at 03:49:24AM +0200, Stefan Brüns wrote: > > > To avoid introduction of a new compatible for each small SoC/DMA > > > controller > > > variation, mov

[linux-sunxi] Re: [PATCH v2 1/3] media: V3s: Add support for Allwinner CSI.

2017-10-16 Thread Milos Ladni
Hello Yong, Did you test CPU load during capture frames from CSI and now many fps did you get? Recently i noticed problem with CPU load which is related to fps not to resolution on old 3.4.75 kernel on A20 platform. I opened new topic few weeks ago but i did not get any answer yet.. Maybe you c

[linux-sunxi] Re: [PATCH v4 07/11] dmaengine: sun6i: Retrieve channel count/max request from devicetree

2017-10-16 Thread Brüns , Stefan
On Montag, 16. Oktober 2017 09:02:17 CEST Vinod Koul wrote: > On Thu, Sep 28, 2017 at 03:49:24AM +0200, Stefan Brüns wrote: > > To avoid introduction of a new compatible for each small SoC/DMA > > controller > > variation, move the definition of the channel count to the devicetree. > > > > The num

[linux-sunxi] Re: tool to generate NAND image for LiveSuit usage

2017-10-16 Thread Milos Ladni
Hi, First, i have never used LiveSuit, i use PhoenixSuit.. Packing/Unpacking image for phoenixsuit have to be done with with imgRePacker tool. Link: https://forum.xda-developers.com/showthread.php?t=1753473 My advice is to find already ready image which work with phoenixsuite for cubieboard2 a

[linux-sunxi] Re: [PATCH v3 1/2] dt-bindings: add device tree binding for Allwinner XR819 SDIO Wi-Fi

2017-10-16 Thread Kalle Valo
icen...@aosc.io writes: > > > Like I asked already last time, AFAICS there is no upstream xr819 > > > wireless driver in drivers/net/wireless directory. Do we still accept > > > bindings like this for out-of-tree drivers? > > > > See esp8089. > > > > There's also n

[linux-sunxi] Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-16 Thread Jonathan Liu
On 16 October 2017 at 23:49, Bin Liu wrote: > On Mon, Oct 16, 2017 at 04:13:51PM +1100, Jonathan Liu wrote: >> On 10 October 2017 at 14:22, Bin Liu wrote: >> > On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: >> >> This fixes a kernel oops when unloading the driver due to usb_put_phy

[linux-sunxi] Re: [PATCH v2] usb: musb: sunxi: Explicitly release USB PHY on exit

2017-10-16 Thread 'Bin Liu' via linux-sunxi
On Mon, Oct 16, 2017 at 04:13:51PM +1100, Jonathan Liu wrote: > On 10 October 2017 at 14:22, Bin Liu wrote: > > On Tue, Oct 10, 2017 at 01:45:25PM +1100, Jonathan Liu wrote: > >> This fixes a kernel oops when unloading the driver due to usb_put_phy > >> being called after usb_phy_generic_unregiste

[linux-sunxi] Re: [PATCH 1/2] dt-bindings: add binding for A64 DE2 CCU with SRAM section

2017-10-16 Thread Maxime Ripard
On Mon, Oct 16, 2017 at 05:41:10PM +0800, icen...@aosc.io wrote: > 在 2017-10-16 17:11,Maxime Ripard 写道: > > On Sat, Oct 14, 2017 at 08:29:24PM +0800, Icenowy Zheng wrote: > > > A64's Display Engine 2.0 needs a section of SRAM (SRAM C) to be > > > claimed. > > > > Why? > > Allwinner didn't documen

[linux-sunxi] Re: [PATCH 2/6] ARM: sun8i: r40: add USB host port nodes for R40

2017-10-16 Thread Maxime Ripard
On Mon, Oct 16, 2017 at 05:39:58PM +0800, icen...@aosc.io wrote: > 在 2017-10-16 17:32,Maxime Ripard 写道: > > On Tue, Oct 10, 2017 at 07:24:28AM +0800, Icenowy Zheng wrote: > > > >> + interrupts = ; > > > >> + clocks = <&ccu CLK_BUS_OHCI1>, > > > >> +

Re: [linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread icenowy
在 2017-10-16 16:00,Maxime Ripard 写道: Hi, I've applied all the other patches. On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: The display backend, as well as other peripherals that have a DRAM clock gate and access DRAM directly, bypassing the system bus, address the DRAM starting

[linux-sunxi] Re: [PATCH 1/2] dt-bindings: add binding for A64 DE2 CCU with SRAM section

2017-10-16 Thread icenowy
在 2017-10-16 17:11,Maxime Ripard 写道: On Sat, Oct 14, 2017 at 08:29:24PM +0800, Icenowy Zheng wrote: A64's Display Engine 2.0 needs a section of SRAM (SRAM C) to be claimed. Why? Allwinner didn't document this, but if the SRAM is not claimed, the DE2 MMIO zone is totally not accessible. It s

[linux-sunxi] Re: [PATCH 2/6] ARM: sun8i: r40: add USB host port nodes for R40

2017-10-16 Thread icenowy
在 2017-10-16 17:32,Maxime Ripard 写道: On Tue, Oct 10, 2017 at 07:24:28AM +0800, Icenowy Zheng wrote: >> + interrupts = ; >> + clocks = <&ccu CLK_BUS_OHCI1>, >> + <&ccu CLK_BUS_EHCI1>, >> + <&ccu

[linux-sunxi] Re: [PATCH 2/6] ARM: sun8i: r40: add USB host port nodes for R40

2017-10-16 Thread Maxime Ripard
On Tue, Oct 10, 2017 at 07:24:28AM +0800, Icenowy Zheng wrote: > >> + interrupts = ; > >> + clocks = <&ccu CLK_BUS_OHCI1>, > >> + <&ccu CLK_BUS_EHCI1>, > >> + <&ccu CLK_USB_OHCI1>; > >> + resets =

[linux-sunxi] Re: [PATCH 1/2] dt-bindings: add binding for A64 DE2 CCU with SRAM section

2017-10-16 Thread Maxime Ripard
On Sat, Oct 14, 2017 at 08:29:24PM +0800, Icenowy Zheng wrote: > A64's Display Engine 2.0 needs a section of SRAM (SRAM C) to be claimed. Why? -- Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -- You received this message because you are subscribe

[linux-sunxi] Re: [PATCH] ARM: sun8i: r40: add watchdog device node

2017-10-16 Thread Maxime Ripard
On Fri, Oct 13, 2017 at 07:26:21PM +0800, Icenowy Zheng wrote: > The R40 SoC has a watchdog like the one on A20, in the timer memory zone > (which is also the same on A20). > > Add the device tree node for it. > > Signed-off-by: Icenowy Zheng Applied, thanks! Maxime -- Maxime Ripard, Free Ele

Re: [linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread Chen-Yu Tsai
Hi, On Mon, Oct 16, 2017 at 4:00 PM, Maxime Ripard wrote: > Hi, > > I've applied all the other patches. > > On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: >> The display backend, as well as other peripherals that have a DRAM >> clock gate and access DRAM directly, bypassing the sys

[linux-sunxi] Re: [PATCH 5/7] drm/sun4i: backend: Offset layer buffer address by DRAM starting address

2017-10-16 Thread Maxime Ripard
Hi, I've applied all the other patches. On Sat, Oct 14, 2017 at 12:02:50PM +0800, Chen-Yu Tsai wrote: > The display backend, as well as other peripherals that have a DRAM > clock gate and access DRAM directly, bypassing the system bus, > address the DRAM starting from 0x0, while physical addresse