[PATCH 04/11] drm/sun4i: Move layers from sun4i_drv to sun4i_crtc

2017-02-23 Thread Chen-Yu Tsai
. Moving the layers into the crtc facilitates binding them to the crtc explicitly, by setting the corresponding bit in their .possible_crtcs fields right after the crtc is initialized. This is done in a later patch. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_

[PATCH 05/11] drm/sun4i: Initialize crtc from tcon bind function

2017-02-23 Thread Chen-Yu Tsai
from the sun4i-drm module to the sun4i-tcon module to avoid circular dependencies between the two modules. This is because sun4i-drm also calls into sun4i-tcon. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/Makefile | 4 ++-- drivers/gpu/drm/sun4i/sun4i_drv.c

[PATCH 01/11] drm/sun4i: Make sunxi_rgb2yuv_coef constant

2017-02-23 Thread Chen-Yu Tsai
sunxi_rgb2yuv_coef is a table of RGB-to-YUV conversion coefficients. They are programmed into the hardware, and can be declared constant. Reported-by: Priit Laes <pl...@plaes.org> Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_backend.c | 2 +- 1 fil

[PATCH 03/11] drm/sun4i: Add end of list element for sun4i_layers_init's returned list

2017-02-23 Thread Chen-Yu Tsai
The number of defined planes in sun4i_layer is unknown to other parts of the sun4i drm driver. Since the return value of sun4i_layers_init is a list of layers, make it return 1 more empty layer as an end of list guard value. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm

[PATCH 09/11] drm/sun4i: rgb: Pass tcon pointer when initializing RGB encoder

2017-02-23 Thread Chen-Yu Tsai
. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_rgb.c | 27 +-- drivers/gpu/drm/sun4i/sun4i_rgb.h | 2 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 +- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i

[PATCH 07/11] drm/sun4i: Drop hardcoded .possible_crtcs values from layers

2017-02-23 Thread Chen-Yu Tsai
to set it for overlay planes. We also fix the value set for the RGB encoder, by referencing the crtc set in sun4i_drv. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_crtc.c | 9 + drivers/gpu/drm/sun4i/sun4i_layer.c | 3 ++- drivers/gpu/drm/sun4i/sun4i

[PATCH 00/11] drm/sun4i: Various fixes and cleanups part 2

2017-02-23 Thread Chen-Yu Tsai
d tcon to sun4i_crtc. Please have a look. Notably, I do not have hardware to test patch 8, though I do not expect any problems. Still to come is the actual work of supporting many display pipelines. Regards ChenYu Chen-Yu Tsai (11): drm/sun4i: Make sunxi_rgb2yuv_coef constant drm/sun4

[PATCH 11/11] drm/sun4i: Add backend and tcon pointers to sun4i_crtc

2017-02-23 Thread Chen-Yu Tsai
be to pass the pointers in through sun4i_crtc_init as parameters. This would make it easier to support multiple display pipelines layer on. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_crtc.c | 12 +--- drivers/gpu/drm/sun4i/sun4i_crtc.h | 3 ++- 2 files c

[PATCH 10/11] drm/sun4i: Add backend pointer to sun4i_layer

2017-02-23 Thread Chen-Yu Tsai
the pointer in through sun4i_layers_init as a parameter. This would make it easier to support multiple display pipelines layer on. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_layer.c | 8 +++- drivers/gpu/drm/sun4i/sun4i_layer.h | 1 + 2 files changed, 4 inse

[PATCH 06/11] drm/sun4i: Drop primary layer pointer from sun4i_drv

2017-02-23 Thread Chen-Yu Tsai
through the returned layers to find the primary and cursor layers. And drop the pointer from the sun4i_drv structure. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_crtc.c | 25 + drivers/gpu/drm/sun4i/sun4i_drv.h | 1 - drivers/gpu/drm

[PATCH 02/11] drm/sun4i: Set drm_crtc.port to the underlying TCON's output port node

2017-02-23 Thread Chen-Yu Tsai
The way drm_of_find_possible_crtcs is it tries to match the remote-endpoint of the given node's various endpoints to all the crtc's .port field. Thus we need to set drm_crtc.port to the output port node of the underlying TCON. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm

[PATCH 08/11] drm/sun4i: tv: Switch to drm_of_find_possible_crtcs

2017-02-23 Thread Chen-Yu Tsai
tcons/crtcs. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_tv.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c index c6f47222e8fc..32ed5fdf0c4d 100644 --- a/drivers/g

Re: [linux-sunxi] Re: [PATCH RFC] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check

2017-02-25 Thread Chen-Yu Tsai
>> > >> > On Wednesday 07 Dec 2016 10:26:25 Chen-Yu Tsai wrote: >> > > On Wed, Dec 7, 2016 at 1:29 AM, Maxime Ripard wrote: >> > > > On Thu, Nov 24, 2016 at 07:22:31PM +0800, Chen-Yu Tsai wrote: >> > > >> The panels shipped with Al

Re: [linux-sunxi] [PATCH 1/8] ARM: sunxi_defconfig: Enable simple panel

2017-02-13 Thread Chen-Yu Tsai
On Sun, Feb 12, 2017 at 1:43 AM, Priit Laes wrote: > From: Jonathan Liu > This needs a commit message about why these need to be enabled, like "Most Allwinner tablets use the same design of a dumb LCD panel coupled with a PWM controlled backlight." Also the

Re: [PATCH 2/8] ARM: sun4i: Add display blocks for the sun4i dtsi.

2017-02-13 Thread Chen-Yu Tsai
On Mon, Feb 13, 2017 at 5:16 PM, Maxime Ripard wrote: > Hi, > > On Sat, Feb 11, 2017 at 07:43:59PM +0200, Priit Laes wrote: >> Added basic display pipeline consisting of tcon, display backend and >> frontend blocks. >> >> Signed-off-by: Priit Laes

[PATCH 2/7] drm/sun4i: Fix up error path cleanup for master bind function

2017-02-17 Thread Chen-Yu Tsai
. This requires the patch "drm/sun4i: Move drm_mode_config_cleanup call to main driver", which splits out drm_mode_config_cleanup from sun4i_framebuffer_free so we can call it separately. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_drv.c | 16 +++

[PATCH 0/7] drm/sun4i: Various fixes and cleanups part 1

2017-02-17 Thread Chen-Yu Tsai
and 2 fix up possible memory and object leakage, but unless the user keeps unloading and loading the modules, it won't leak past a few times. Regards ChenYu Chen-Yu Tsai (7): drm/sun4i: Move drm_mode_config_cleanup call to main driver drm/sun4i: Fix up error path cleanup for master bind

[PATCH 4/7] drm/sun4i: Fix kcalloc element size in sun4i_layers_init

2017-02-17 Thread Chen-Yu Tsai
ray. Change it to sizeof(*layers) to avoid wasting a lot of memory. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_layer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_laye

[PATCH 3/7] drm/sun4i: Check return value of drm_vblank_init

2017-02-17 Thread Chen-Yu Tsai
drm_vblank_init can fail due to insufficient memory. Ignoring the error and proceeding may cause the kernel to dereference an invalid pointer when vblank is enabled. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_drv.c | 6 +- 1 file changed, 5 insertions

[PATCH 5/7] drm/sun4i: Drop useless assignment in sun4i_layers_init

2017-02-17 Thread Chen-Yu Tsai
The assignment found in the main loop in sun4i_layers_init: struct sun4i_layer *layer = layers[i]; is useless as it gets overwritten by the next line: layer = sun4i_layer_init_one(drm, plane); Drop the assignment. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drive

[PATCH 6/7] drm/sun4i: Save newly created layer in layers array in sun4i_layers_init

2017-02-17 Thread Chen-Yu Tsai
-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_layer.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/sun4i/sun4i_layer.c b/drivers/gpu/drm/sun4i/sun4i_layer.c index 92ecc967dcb1..41bc0f860f5c 100644 --- a/drivers/gpu/drm/sun4i/sun4i_layer.c +++ b/drivers/g

[PATCH 7/7] drm/sun4i: Make sun4i_crtc_init return ERR_PTR style error codes

2017-02-17 Thread Chen-Yu Tsai
sun4i_crtc_init can fail for a number of reasons. Instead of returning a NULL pointer when it fails, pass back the encountered error using ERR_PTR. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_crtc.c | 4 ++-- drivers/gpu/drm/sun4i/sun4i_drv.c | 4 ++-- 2

[PATCH 1/7] drm/sun4i: Move drm_mode_config_cleanup call to main driver

2017-02-17 Thread Chen-Yu Tsai
drm_mode_config_cleanup is the complement of drm_mode_config_init, which is called in the bind function of sun4i_drv. drm_mode_config_cleanup should be put in the unbind function to match. Signed-off-by: Chen-Yu Tsai <w...@csie.org> --- drivers/gpu/drm/sun4i/sun4i_drv.c | 1 + d

[PATCH] drm/sun4i: Add a few formats

2016-10-21 Thread Chen-Yu Tsai
On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard wrote: > The planes can do more than what was previously exposed. Add support for > them. > > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/sun4i/sun4i_backend.c | 20 > drivers/gpu/drm/sun4i/sun4i_layer.c | 6 ++

[linux-sunxi] [PATCH v5 0/7] ARM: ASoC: drm: sun8i: Add DE2 HDMI audio and video

2016-10-23 Thread Chen-Yu Tsai
> - add back the HDMI driver > - many bug fixes > v4: > - drivers/clk/sunxi/Makefile was missing (Emil Velikov) > v3: > - add the hardware cursor > - simplify and fix the DE2 init sequences > - generation for all SUNXI SoCs (An

[linux-sunxi] [PATCH v5 4/7] ASoC: sunxi: Add sun8i I2S driver

2016-10-23 Thread Chen-Yu Tsai
Hi, On Fri, Oct 21, 2016 at 4:36 PM, Jean-Francois Moine wrote: > This patch adds I2S support to sun8i SoCs as the A83T and H3. > > Signed-off-by: Jean-Francois Moine > --- > Note: This driver is closed to the sun4i-i2s except that: > - it handles the H3 If it's close to sun4i-i2s, you should

[PATCH] drm/sun4i: Add a few formats

2016-10-25 Thread Chen-Yu Tsai
On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard wrote: > Hi, > > On Fri, Oct 21, 2016 at 11:15:32AM +0800, Chen-Yu Tsai wrote: >> On Tue, Oct 18, 2016 at 4:46 PM, Maxime Ripard >> wrote: >> > The planes can do more than what was previously exposed. Add support for &

[PATCH] drm/panel: simple: Check against num_timings when setting preferred for timing

2016-10-24 Thread Chen-Yu Tsai
In the loop on .timings, we should check .num_timings to see if it's the only mode specified, not .num_modes, which should be used with .modes. Fixes: cda553725c92 ("drm/panel: simple: Set appropriate mode type") Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/panel/panel-simple.c

[PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO

2016-10-25 Thread Chen-Yu Tsai
On Tue, Oct 25, 2016 at 4:09 PM, Archit Taneja wrote: > Hi, > > On 10/20/2016 09:13 AM, Chen-Yu Tsai wrote: >> >> Some rgb-to-vga bridges have an enable GPIO, either directly tied to >> an enable pin on the bridge IC, or indirectly controlling a power &

[PATCH v2 8/8] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-10-25 Thread Chen-Yu Tsai
On Tue, Oct 25, 2016 at 4:13 PM, Archit Taneja wrote: > > > On 10/20/2016 09:13 AM, Chen-Yu Tsai wrote: >> >> The Hummingbird A31 board has a RGB-to-VGA bridge which converts RGB >> output from the LCD interface to VGA signals. >> >> Enable this part of

[PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO

2016-10-27 Thread Chen-Yu Tsai
On Thu, Oct 27, 2016 at 2:40 PM, Archit Taneja wrote: > > > On 10/25/2016 02:29 PM, Chen-Yu Tsai wrote: >> >> On Tue, Oct 25, 2016 at 4:09 PM, Archit Taneja >> wrote: >>> >>> Hi, >>> >>> On 10/20/2016 09:13 AM, Chen-Yu Tsai wr

[linux-sunxi] [PATCH v5 2/7] ASoC: sunxi: Add a simple HDMI CODEC

2016-10-28 Thread Chen-Yu Tsai
On Fri, Oct 21, 2016 at 3:44 PM, Jean-Francois Moine wrote: > Allwinner's SoCs include support for both audio and video on HDMI. > This patch defines a simple audio CODEC which may be used in sunxi > HDMI video drivers. > > Signed-off-by: Jean-Francois Moine There's already a driver for

[PATCH v3 0/2] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-10-29 Thread Chen-Yu Tsai
connector from "vga" to "vga-connector". - Renamed the node of the VGA DAC from "bridge" to "vga-dac". Regards ChenYu Chen-Yu Tsai (2): drm/bridge: dumb-vga-dac: Support a VDD regulator supply ARM: dts: sun6i: hummingbird-a31: Enable display outp

[PATCH v3 1/2] drm/bridge: dumb-vga-dac: Support a VDD regulator supply

2016-10-29 Thread Chen-Yu Tsai
Some dumb VGA DACs are active components which require external power. Add support for specifying a regulator as its power supply. Signed-off-by: Chen-Yu Tsai --- .../bindings/display/bridge/dumb-vga-dac.txt | 2 ++ drivers/gpu/drm/bridge/dumb-vga-dac.c | 35

[PATCH] drm/sun4i: Add a few formats

2016-10-29 Thread Chen-Yu Tsai
On Thu, Oct 27, 2016 at 10:35 PM, Maxime Ripard wrote: > Hi, > > On Tue, Oct 25, 2016 at 08:42:26AM +0800, Chen-Yu Tsai wrote: >> On Mon, Oct 24, 2016 at 10:40 PM, Maxime Ripard >> wrote: >> > Hi, >> > >> > On Fri, Oct 21, 2016 at 11:15:32AM +0800

[PATCH v3 2/2] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-10-29 Thread Chen-Yu Tsai
The Hummingbird A31 board has a VGA DAC which converts RGB output from the LCD interface to VGA analog signals. Add nodes for the VGA DAC, its power supply, and enable this part of the display pipeline. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 76

[PATCH v2] drm/sun4i: Clear encoder->bridge if a bridge is not found

2016-09-01 Thread Chen-Yu Tsai
other drm_bridge functions also follow this pattern of checking for a non-NULL pointer, we can drop the ifs around the calls and just pass the pointer directly. Fixes: 894f5a9f4b4a ("drm/sun4i: Add bridge support") Signed-off-by: Chen-Yu Tsai --- Changes since v2: - Add comments stating enc

[linux-sunxi] [PATCH 6/7] ARM: sun8i: a33: Add RGB666 pins

2016-09-02 Thread Chen-Yu Tsai
> + tcon0_rgb666_pins_a: tcon0_rgb666 at 0 { This is the only possible combination. You can drop the _a and @0. Also this can be shared with A23, as they are pin compatible, and I also matched the datasheets. Otherwise Acked-by: Chen-Yu Tsai > + al

[PATCH 1/7] drm/sun4i: support TCONs without channel 1

2016-09-02 Thread Chen-Yu Tsai
On Thu, Sep 1, 2016 at 11:31 PM, Maxime Ripard wrote: > Some Allwinner SoCs, such as the A33, have a variation of the TCON that > doesn't have a second channel (or it is not wired to anything). > > Make sure we can handle that case. > > Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai

[PATCH 4/7] drm/panel: Add Sinlinx SinA33 7" panel

2016-09-02 Thread Chen-Yu Tsai
On Thu, Sep 1, 2016 at 11:32 PM, Maxime Ripard wrote: > The SinA33 has an unidentified panel. Add the timings for it under a new > compatible. > > Signed-off-by: Maxime Ripard > --- > drivers/gpu/drm/panel/panel-simple.c | 26 ++ > 1 file changed, 26 insertions(+) > >

[PATCH 2/7] drm/sun4i: support A33 tcon

2016-09-02 Thread Chen-Yu Tsai
Hi, On Thu, Sep 1, 2016 at 11:31 PM, Maxime Ripard wrote: > The A33 has a significantly different pipeline, with components that differ > too. > > Make sure we had compatible for them. > > Signed-off-by: Maxime Ripard > --- > Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 7

[PATCH 5/7] ARM: sun8i: a33: Add display pipeline

2016-09-02 Thread Chen-Yu Tsai
Hi, On Thu, Sep 1, 2016 at 11:32 PM, Maxime Ripard wrote: > Add all the needed blocks to the A33 DTSI. > > Signed-off-by: Maxime Ripard > --- > arch/arm/boot/dts/sun8i-a33.dtsi | 184 > +++ > 1 file changed, 184 insertions(+) > > diff --git

[PATCH 3/7] drm/sun4i: Add SAT and DRC drivers

2016-09-02 Thread Chen-Yu Tsai
Hi, On Thu, Sep 1, 2016 at 11:32 PM, Maxime Ripard wrote: > The A33 pipeline also has some new components called SAT and DRC. Even > though their exact features and programming model is not known (or > documented), they need to be clocked for the pipeline to carry the video > signal all the way.

[PATCH 0/7] drm/sun4i: Introduce A33 display driver

2016-09-03 Thread Chen-Yu Tsai
On Sat, Sep 3, 2016 at 3:06 AM, Maxime Ripard wrote: > Hi Icenowy, > > On Fri, Sep 02, 2016 at 09:30:05AM +0800, Icenowy Zheng wrote: >> >> >> 01.09.2016, 23:40, "Maxime Ripard" : >> > Hi everyone, >> > >> > This serie introduces the support in the sun4i-drm driver for the A33. >> > >> > Beside

[PATCH 6/6] ARM: dts: gr8: Add support for the GR8 evaluation board

2016-09-05 Thread Chen-Yu Tsai
Hi, On Wed, Aug 31, 2016 at 4:18 PM, Maxime Ripard wrote: > From: Mylène Josserand > > The GR8-EVB is a small board with an NextThing GR8, an Hynix MLC NAND, > an AXP209 PMIC, USB host and OTG, an SPDIF output and a connectors for CSI, > I2S and LCD. > > Signed-off-by: Mylène Josserand >

[PATCH 2/6] pinctrl: sunxi: Add GR8 controller support

2016-09-05 Thread Chen-Yu Tsai
Q6 */ > + SUNXI_FUNCTION(0x3, "mmc2")), /* D6 */ > + SUNXI_PIN(SUNXI_PINCTRL_PIN(C, 15), > + SUNXI_FUNCTION(0x0, "gpio_in"), > + SUNXI_FUNCTION(0x1, "gpio_out"), > + SUNXI_FUNCTION(0x2, &quo

[PATCH 3/6] drm/panel: simple: Add A10 EVB 5 inch panel support

2016-09-05 Thread Chen-Yu Tsai
On Wed, Aug 31, 2016 at 4:18 PM, Maxime Ripard wrote: > The A10-EVB from Allwinner comes with an unidentified panel, with the only > mark on the PCB being A10-SUB-EVB-5LCD. > > Add timings to simple panel to handle it. > > Signed-off-by: Maxime Ripard > --- >

[PATCH 0/7] drm/sun4i: Introduce A33 display driver

2016-09-06 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 4:37 AM, Maxime Ripard wrote: > On Sat, Sep 03, 2016 at 09:43:59AM +0800, Chen-Yu Tsai wrote: >> On Sat, Sep 3, 2016 at 3:06 AM, Maxime Ripard >> wrote: >> > Hi Icenowy, >> > >> > On Fri, Sep 02, 2016 at 09:30:05AM +0800, Icenowy

[PATCH 4/7] drm/panel: Add Sinlinx SinA33 7" panel

2016-09-06 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 4:02 AM, Maxime Ripard wrote: > Hi, > > On Mon, Sep 05, 2016 at 01:03:03AM +0800, Icenowy Zheng wrote: >> Hi Everyone, >> >> 01.09.2016, 23:40, "Maxime Ripard" : >> > The SinA33 has an unidentified panel. Add the timings for it under a new >> > compatible. >> >> >> >>

[PATCH v2 4/9] drm/sun4i: Add a DRC driver

2016-09-07 Thread Chen-Yu Tsai
minimal driver for it that just claim the needed resources for the > pipeline to operate properly. > > Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai

[PATCH 5/7] ARM: sun8i: a33: Add display pipeline

2016-09-06 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 4:21 AM, Maxime Ripard wrote: > Hi, > > On Fri, Sep 02, 2016 at 02:28:54PM +0800, Chen-Yu Tsai wrote: >> > + be0: display-backend at 01e6 { >> > + compatible = "allwinner,sun8i-a33-display-backend&qu

[PATCH v2 2/9] drm/sun4i: support A33 tcon

2016-09-07 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 10:46 PM, Maxime Ripard wrote: > The A33 has a significantly different pipeline, with components that differ > too. > > Make sure we had compatible for them. > > Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai > --- > Documentation/devicetre

[PATCH v2 3/9] drm/sun4i: backend: Handle the SAT

2016-09-07 Thread Chen-Yu Tsai
im them when > the backend probes. > > Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai

[PATCH v2 2/9] drm/sun4i: support A33 tcon

2016-09-07 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 10:46 PM, Maxime Ripard wrote: > The A33 has a significantly different pipeline, with components that differ > too. > > Make sure we had compatible for them. > > Signed-off-by: Maxime Ripard > --- > Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 7 ++-

[PATCH v2 6/9] drm/panel: Add Netron DY E231732

2016-09-07 Thread Chen-Yu Tsai
Hi, On Tue, Sep 6, 2016 at 10:46 PM, Maxime Ripard wrote: > The E231732 is a 7" panel with a resolution of 800x480. >From what I could make out of an archived version of Netron's website (it's unreachable from my place), they are a manufacturer of printed ribbon cables, not LCD panels. This is

[PATCH v2 7/9] ARM: sun8i: a33: Add display pipeline

2016-09-07 Thread Chen-Yu Tsai
On Tue, Sep 6, 2016 at 10:46 PM, Maxime Ripard wrote: > Add all the needed blocks to the A33 DTSI. > > Signed-off-by: Maxime Ripard Acked-by: Chen-Yu Tsai

[PATCH 0/7] drm/sun4i: Introduce A33 display driver

2016-09-07 Thread Chen-Yu Tsai
On Wed, Sep 7, 2016 at 2:54 AM, Maxime Ripard wrote: > On Tue, Sep 06, 2016 at 10:50:09AM +0800, Chen-Yu Tsai wrote: >> >> The implementation might be along the lines of >> >> >> >> 1. having multiple output ports, each for a different interface type. &

[PATCH v3 2/4] ARM: sun5i: a13-olinuxino: Enable VGA bridge

2016-09-09 Thread Chen-Yu Tsai
On Thu, Sep 8, 2016 at 8:17 PM, Maxime Ripard wrote: > Now that we have support for the VGA bridges using our DRM driver, enable > the display engine for the Olimex A13-Olinuxino. > > Signed-off-by: Maxime Ripard Assuming the bridge bindings are good, Acked-by: Chen-Yu Tsai

[PATCH v3 1/4] drm/bridge: Add RGB to VGA bridge support

2016-09-12 Thread Chen-Yu Tsai
Hi, On Thu, Sep 8, 2016 at 8:17 PM, Maxime Ripard wrote: > Some boards have an entirely passive RGB to VGA bridge, based on either > DACs or resistor ladders. > > Those might or might not have an i2c bus routed to the VGA connector in > order to access the screen EDIDs. > > Add a bridge that

[PATCH 2/4] drm/sun4i: dotclock: Fix clock rate read back calcation

2016-09-16 Thread Chen-Yu Tsai
splay Engine support") Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm/sun4i/sun4i_dotclock.c index 4332da48b1b3..1b6c2253192e 100644 --- a/drive

[PATCH 1/4] drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI

2016-09-16 Thread Chen-Yu Tsai
The 18 or 24 bit parallel RGB LCD panel interface found on Allwinner SoCs matches the description of MIPI DPI. Declare the RGB encoder and connector as MIPI DPI. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_rgb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff

[PATCH 0/4] drm/sun4i: rgb and dotclock misc fixes and improvements

2016-09-16 Thread Chen-Yu Tsai
changes the dot clock's behavior to make it round to the closest clock rate. I think this would make it easier to match the LCD panel's timings. More on the LCD timings in a later patch set. Regards ChenYu Chen-Yu Tsai (4): drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI drm/sun4i

[PATCH 3/4] drm/sun4i: dotclock: Allow divider = 127

2016-09-16 Thread Chen-Yu Tsai
The dot clock divider is 7 bits wide, and the divider range is 1 ~ 127, or 6 ~ 127 if phase offsets are used. The 0 register value also represents a divider of 1 or bypass. Make the end condition of the for loop inclusive of 127 in the round_rate callback. Signed-off-by: Chen-Yu Tsai

[PATCH 4/4] drm/sun4i: dotclock: Round to closest clock rate

2016-09-16 Thread Chen-Yu Tsai
, the varying dividers also influence the difference between the requested rate and the rounded rate. Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_dotclock.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_dotclock.c b/drivers/gpu/drm

[PATCH 1/4] drm/sun4i: rgb: Declare RGB encoder and connector as MIPI DPI

2016-09-20 Thread Chen-Yu Tsai
On Mon, Sep 19, 2016 at 3:12 AM, Maxime Ripard wrote: > Hi, > > On Thu, Sep 15, 2016 at 11:13:59PM +0800, Chen-Yu Tsai wrote: >> The 18 or 24 bit parallel RGB LCD panel interface found on Allwinner >> SoCs matches the description of MIPI DPI. Declare the RGB encoder and >

[PATCH 4/4] drm/sun4i: dotclock: Round to closest clock rate

2016-09-20 Thread Chen-Yu Tsai
On Mon, Sep 19, 2016 at 3:16 AM, Maxime Ripard wrote: > Hi, > > On Thu, Sep 15, 2016 at 11:14:02PM +0800, Chen-Yu Tsai wrote: >> With display pixel clocks we want to have the closest possible clock >> rate, to minimize timing and refresh rate skews. Whether the actual &g

[PATCH 4/9] drm/sun4i: Add compatible string for A31/A31s TCON (timing controller)

2016-10-07 Thread Chen-Yu Tsai
with HDMI and MIPI DSI support. Signed-off-by: Chen-Yu Tsai --- .../devicetree/bindings/display/sunxi/sun4i-drm.txt | 4 +++- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 ++ drivers/gpu/drm/sun4i/sun4i_tcon.c | 17 + drivers/gpu/drm/sun4i

[PATCH 0/9] drm/sun4i: Support first display pipeline on sun6i

2016-10-07 Thread Chen-Yu Tsai
poned pending discussion. Regards ChenYu Chen-Yu Tsai (9): drm/sun4i: sun6i-drc: Support DRC on A31 and A31s drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure drm/sun4i: Put dotclock range into tcon quirks and check against them drm/sun4i: Add compatible string for A31

[PATCH 9/9] [DO NOT MERGE] ARM: dts: sun6i: Enable 7" LCD panel on Sinlinx SinA31s

2016-10-07 Thread Chen-Yu Tsai
same, and as a result the display produces glitch lines sometimes. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31s-sina31s.dts | 30 ++ 1 file changed, 30 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31s-sina31s.dts b/arch/arm/boot/dts/sun6i

[PATCH 5/9] drm/sun4i: Add compatible strings for A31/A31s display pipelines

2016-10-07 Thread Chen-Yu Tsai
display pipeline is almost the same, just without MIPI DSI. Only the TCON seems to be different, due to the missing mux for MIPI DSI. Add compatible strings for both of them. Signed-off-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 4 drivers/gpu/drm/sun4i

[PATCH 2/9] drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure

2016-10-07 Thread Chen-Yu Tsai
We already have some differences between the 2 supported SoCs. More will be added as we support other SoCs. To avoid bloating the probe function with even more conditionals, move the quirks to a separate data structure that's tied to the compatible string. Signed-off-by: Chen-Yu Tsai

[PATCH 3/9] drm/sun4i: Put dotclock range into tcon quirks and check against them

2016-10-07 Thread Chen-Yu Tsai
pper limit, which affects the highest resolutions we can support. Fixes: bb43d40d7c83 ("drm/sun4i: rgb: Validate the clock rate") Signed-off-by: Chen-Yu Tsai --- drivers/gpu/drm/sun4i/sun4i_rgb.c | 8 +--- drivers/gpu/drm/sun4i/sun4i_tcon.c | 2 ++ drivers/gpu/drm/sun4i/sun4i_t

[PATCH 6/9] ARM: dts: sun6i: Sort pinmux setting nodes

2016-10-07 Thread Chen-Yu Tsai
The pinmux setting nodes for the A31 were added out of alphabetical order. Sort them. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31.dtsi | 82 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi

[PATCH 7/9] ARM: dts: sun6i: Add device nodes for first display pipeline

2016-10-07 Thread Chen-Yu Tsai
The A31 has 2 parallel display pipelines, which can be intermixed. However the driver currently only supports one of them. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31.dtsi | 152 ++ arch/arm/boot/dts/sun6i-a31s.dtsi | 8 ++ 2 files changed

[PATCH 1/9] drm/sun4i: sun6i-drc: Support DRC on A31 and A31s

2016-10-07 Thread Chen-Yu Tsai
The A31 and A31s also have the DRC as part of the display pipeline. As we know virtually nothing about them, just add compatible strings for both SoCs to the stub driver. Signed-off-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 2 ++ drivers/gpu/drm/sun4i

[PATCH 8/9] ARM: dts: sun6i: Add A31 LCD0 RGB888 pins

2016-10-07 Thread Chen-Yu Tsai
The LCD0 controller on the A31 can do RGB output up to 8 bits per channel. Add the pins for RGB888 output. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts

[PATCH 2/9] drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure

2016-10-11 Thread Chen-Yu Tsai
On Fri, Oct 7, 2016 at 4:38 PM, Maxime Ripard wrote: > Hi, > > On Fri, Oct 07, 2016 at 12:06:22AM +0800, Chen-Yu Tsai wrote: >> +struct sun4i_tcon_quirks { >> + boolis_sun5i; /* sun5i has undocumented mux */ >> + boolhas_channel_1; /*

[PATCH v2 0/8] drm/sun4i: Support first display pipeline on sun6i

2016-10-20 Thread Chen-Yu Tsai
nA31s LCD patch - Added patch to support enable pin GPIO for dumb VGA DACs - Added patch to enable VGA output via dumb VGA DAC on Hummingbird A31 board Regards ChenYu Chen-Yu Tsai (8): drm/bridge: rgb-to-vga: Support an enable GPIO drm/sun4i: sun6i-drc: Support DRC on A31 and A31s

[PATCH v2 5/8] drm/sun4i: Add compatible strings for A31/A31s display pipelines

2016-10-20 Thread Chen-Yu Tsai
display pipeline is almost the same, just without MIPI DSI. Only the TCON seems to be different, due to the missing mux for MIPI DSI. Add compatible strings for both of them. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 4

[PATCH v2 8/8] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-10-20 Thread Chen-Yu Tsai
The Hummingbird A31 board has a RGB-to-VGA bridge which converts RGB output from the LCD interface to VGA signals. Enable this part of the display pipeline. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 56 + 1 file changed, 56

[PATCH v2 6/8] ARM: dts: sun6i: Add device nodes for first display pipeline

2016-10-20 Thread Chen-Yu Tsai
The A31 has 2 parallel display pipelines, which can be intermixed. However the driver currently only supports one of them. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31.dtsi | 152 ++ arch/arm/boot/dts/sun6i-a31s.dtsi | 8 ++ 2 files changed

[PATCH v2 1/8] drm/bridge: rgb-to-vga: Support an enable GPIO

2016-10-20 Thread Chen-Yu Tsai
Some rgb-to-vga bridges have an enable GPIO, either directly tied to an enable pin on the bridge IC, or indirectly controlling a power switch. Add support for it. Signed-off-by: Chen-Yu Tsai --- .../bindings/display/bridge/dumb-vga-dac.txt | 2 ++ drivers/gpu/drm/bridge/dumb-vga-dac.c

[PATCH v2 7/8] ARM: dts: sun6i: Add A31 LCD0 RGB888 pins

2016-10-20 Thread Chen-Yu Tsai
The LCD0 controller on the A31 can do RGB output up to 8 bits per channel. Add the pins for RGB888 output. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31.dtsi | 13 + 1 file changed, 13 insertions(+) diff --git a/arch/arm/boot/dts/sun6i-a31.dtsi b/arch/arm/boot/dts

[PATCH v2 4/8] drm/sun4i: Add compatible string for A31/A31s TCON (timing controller)

2016-10-20 Thread Chen-Yu Tsai
with HDMI and MIPI DSI support. Signed-off-by: Chen-Yu Tsai --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 4 +++- drivers/gpu/drm/sun4i/sun4i_drv.c | 2 ++ drivers/gpu/drm/sun4i/sun4i_tcon.c| 10 ++ 3 files

[PATCH v2 2/8] drm/sun4i: sun6i-drc: Support DRC on A31 and A31s

2016-10-20 Thread Chen-Yu Tsai
The A31 and A31s also have the DRC as part of the display pipeline. As we know virtually nothing about them, just add compatible strings for both SoCs to the stub driver. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring --- Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 2

[PATCH v2 3/8] drm/sun4i: tcon: Move SoC specific quirks to a DT matched data structure

2016-10-20 Thread Chen-Yu Tsai
We already have some differences between the 2 supported SoCs. More will be added as we support other SoCs. To avoid bloating the probe function with even more conditionals, move the quirks to a separate data structure that's tied to the compatible string. Signed-off-by: Chen-Yu Tsai

[linux-sunxi] Re: [PATCH v3 1/2] drm/bridge: dumb-vga-dac: Support a VDD regulator supply

2016-11-02 Thread Chen-Yu Tsai
On Mon, Oct 31, 2016 at 2:28 PM, Rob Herring wrote: > On Sat, Oct 29, 2016 at 07:06:10PM +0800, Chen-Yu Tsai wrote: >> Some dumb VGA DACs are active components which require external power. >> Add support for specifying a regulator as its power supply. >> >>

[PATCH v2 2/9] drm/sun4i: support A33 tcon

2016-11-06 Thread Chen-Yu Tsai
Hi, On Tue, Sep 6, 2016 at 10:46 PM, Maxime Ripard wrote: > The A33 has a significantly different pipeline, with components that differ > too. > > Make sure we had compatible for them. > > Signed-off-by: Maxime Ripard > --- > Documentation/devicetree/bindings/display/sunxi/sun4i-drm.txt | 7

[PATCH] drm: panel: simple-panel: get the enable gpio as-is

2016-11-07 Thread Chen-Yu Tsai
On Sun, Nov 6, 2016 at 7:09 PM, Icenowy Zheng wrote: > The enable gpio of simple-panel may be used by a simplefb or other > driver on the panel's display before the KMS driver get load. > > Get the GPIO as-is, so the panel won't be disabled, and the simplefb > can work. > > Signed-off-by: Icenowy

[linux-sunxi] Re: [PATCH v3 1/2] drm/bridge: dumb-vga-dac: Support a VDD regulator supply

2016-11-15 Thread Chen-Yu Tsai
Hi, On Wed, Nov 2, 2016 at 9:33 AM, Chen-Yu Tsai wrote: > On Mon, Oct 31, 2016 at 2:28 PM, Rob Herring wrote: >> On Sat, Oct 29, 2016 at 07:06:10PM +0800, Chen-Yu Tsai wrote: >>> Some dumb VGA DACs are active components which require external power. >>> Add support

[PATCH] drm/sun4i: Only count TCON endpoints as valid outputs

2016-11-16 Thread Chen-Yu Tsai
: Add Allwinner A10 Display Engine support") Signed-off-by: Chen-Yu Tsai --- Hi Maxime, This avoids DRM screwing up simplefb on my SinA31s, which does not have the display pipeline enabled in its dts file. But the display engine and backend are already enabled in the dtsi. I think this is

[PATCH v4 1/2] drm/bridge: dumb-vga-dac: Support a VDD regulator supply

2016-11-16 Thread Chen-Yu Tsai
Some dumb VGA DACs are active components which require external power. Add support for specifying a regulator as its power supply. Signed-off-by: Chen-Yu Tsai Acked-by: Rob Herring --- .../bindings/display/bridge/dumb-vga-dac.txt | 2 ++ drivers/gpu/drm/bridge/dumb-vga-dac.c

[PATCH v4 0/2] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-11-16 Thread Chen-Yu Tsai
. - Renamed the node of the VGA connector from "vga" to "vga-connector". - Renamed the node of the VGA DAC from "bridge" to "vga-dac". Regards ChenYu Chen-Yu Tsai (2): drm/bridge: dumb-vga-dac: Support a VDD regulator supply ARM: dts: sun6i

[PATCH v4 2/2] ARM: dts: sun6i: hummingbird-a31: Enable display output through VGA bridge

2016-11-16 Thread Chen-Yu Tsai
The Hummingbird A31 board has a VGA DAC which converts RGB output from the LCD interface to VGA analog signals. Add nodes for the VGA DAC, its power supply, and enable this part of the display pipeline. Signed-off-by: Chen-Yu Tsai --- arch/arm/boot/dts/sun6i-a31-hummingbird.dts | 67

[PATCH] drm/sun4i: tcon: Initialize regmap after enabling bus clocks

2016-11-16 Thread Chen-Yu Tsai
r A10 Display Engine support") Signed-off-by: Chen-Yu Tsai --- I was looking around the DRM driver and noticed this sequence was off. --- drivers/gpu/drm/sun4i/sun4i_tcon.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_tcon.c b/d

[PATCH v4 1/2] drm/bridge: dumb-vga-dac: Support a VDD regulator supply

2016-11-17 Thread Chen-Yu Tsai
On Thu, Nov 17, 2016 at 3:48 PM, Archit Taneja wrote: > Hi, > > Thanks for the patch. > > > On 11/16/2016 09:12 PM, Chen-Yu Tsai wrote: >> >> Some dumb VGA DACs are active components which require external power. >> Add support for specifying a regulator a

[PATCH] drm/sun4i: Only count TCON endpoints as valid outputs

2016-11-18 Thread Chen-Yu Tsai
On Fri, Nov 18, 2016 at 3:02 AM, Maxime Ripard wrote: > On Wed, Nov 16, 2016 at 05:37:31PM +0800, Chen-Yu Tsai wrote: >> The sun4i DRM driver counts the number of endpoints it found and >> registers the whole DRM pipeline if any endpoints are found. >> >> However

[PATCH] drm/sun4i: tcon: Initialize regmap after enabling bus clocks

2016-11-18 Thread Chen-Yu Tsai
On Fri, Nov 18, 2016 at 3:05 AM, Maxime Ripard wrote: > On Wed, Nov 16, 2016 at 05:37:32PM +0800, Chen-Yu Tsai wrote: >> If we attempt to read/write the TCON registers before the bus clock >> is enabled, those accesses get ignored. >> >> In practice this almost neve

[PATCH] drm/sun4i: Only count TCON endpoints as valid outputs

2016-11-23 Thread Chen-Yu Tsai
On Tue, Nov 22, 2016 at 11:37 PM, Maxime Ripard wrote: > Hi, > > On Fri, Nov 18, 2016 at 10:22:40AM +0800, Chen-Yu Tsai wrote: >> On Fri, Nov 18, 2016 at 3:02 AM, Maxime Ripard >> wrote: >> > On Wed, Nov 16, 2016 at 05:37:31PM +0800, Chen-Yu Tsai wrote: >

[PATCH RFC] drm/sun4i: rgb: Add 5% tolerance to dot clock frequency check

2016-11-24 Thread Chen-Yu Tsai
ned by clk_round_rate deviates slightly, causing the driver to reject the display mode. The LCD panels have some tolerance on the dot clock frequency, even if it's not specified in their datasheets. This patch adds a 5% tolerence to the dot clock check. Signed-off-by: Chen-Yu Tsai --- The few LC

  1   2   3   4   5   6   7   8   9   10   >