All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	David Airlie <airlied@linux.ie>,
	Thierry Reding <thierry.reding@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	dri-devel@lists.freedesktop.org, linux-sunxi@googlegroups.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Chen-Yu Tsai <wens@csie.org>, Hans de Goede <hdegoede@redhat.com>,
	Alexander Kaplan <alex@nextthing.co>,
	Wynter Woods <wynter@nextthing.co>,
	Boris Brezillon <boris.brezillon@free-electrons.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Rob Clark <robdclark@gmail.com>, Daniel Vetter <daniel@ffwll.ch>
Subject: Re: [PATCH 00/19] drm: Add Allwinner A10 display engine support
Date: Fri, 30 Oct 2015 15:52:17 +0100	[thread overview]
Message-ID: <20151030145217.GA16848@phenom.ffwll.local> (raw)
In-Reply-To: <1446214865-3972-1-git-send-email-maxime.ripard@free-electrons.com>

On Fri, Oct 30, 2015 at 03:20:46PM +0100, Maxime Ripard wrote:
> Hi everyone,
> 
> The Allwinner SoCs (except for the very latest ones) all share the
> same set of controllers, loosely coupled together to form the display
> pipeline.
> 
> Depending on the SoC, the number of instances of the controller will
> change (2 instances of each in the A10, only one in the A13, for
> example), and the output availables will change too (HDMI, composite,
> VGA on the A20, none of them on the A13).
> 
> On most featured SoCs, it looks like that:
> 
>  +--------------------------------------------+
>  |                    RAM                     |
>  +--------------------------------------------+
>        |            |      |            |
>        v            |      |            v
>  +----------------+ |      | +----------------+
>  |    Frontend    | |      | |    Frontend    |
>  +----------------+ |      | +----------------+
>          |          |      |         |
>          v          |      |         v
>  +----------------+ |      | +----------------+
>  |    Backend     |<+      +>|    Backend     |
>  +----------------+          +----------------+
>          |                           |
>          v                           v
>  +----------------+          +----------------+---> LVDS
>  |      TCON      |          |      TCON      |---> RGB
>  +----------------+          +----------------+
>        |       +---+       +---+          |
>        |           |       |              |
>        v           v       v              v
>  +------------+  +------------+  +------------+---> VGA
>  | TV Encoder |  |    HDMI    |  | TV Encoder |---> Composite
>  +------------+  +------------+  +------------+
> 
> The current code only assumes that there is a single instance of all
> the controllers. It also supports only the RGB and Composite
> interfaces.
> 
> A few more things are missing though, and will be supported
> eventually:
>   - Overscan support
>   - Asynchronous page flip
>   - Multiple plane support
>   - Composite / VGA Hotplug detection
>   - More outputs
>   - Support for several videos pipelines
> 
> And there's one big gotcha: thhe code to parse the mode from the
> kernel commandline doesn't seem to support named modes. Since we
> expose the various TV standards through named modes, it means that
> there's no way to use a particular standard to display something
> during the kernel boot. The default will always be used, in other
> words, PAL.

Simply not done yet.

> A few more questions that are probably going to be raised during the
> review:
>   - How do you associate private data to a mode, for example to deal
>     with the non-generic, driver-specific settings required to deal
>     with the various TV standards? drm_display_mode seems to have a
>     private field, but it isn't always preserved.

Analog TV in general is a giant mess, and there's not really all that much
of a standardized solution. I also don't have much clue at all about what
needs to be tuned with analog TV. Probably the best would be to look at
existing drivers with TV-out support and what kind of properties they
support. Then standardize them (with relevant helper code in drm core) and
use that. Additional flags on the mode, especially using the private stuff
is kinda the deprecated non-atomic approach. If you need private data
beyond the mode and any additional properties on the crtc (for derived
state) then just subclass drm_crtc_state and put it there.

>   - How do you setup properties in the kernel command line? In order
>     to have a decent display during boot on relevant interfaces, you
>     probably want to setup the overscan beforehand. Overscan seems to
>     be handled through properties, and afaik, there's no way to set
>     that from the cmdline. Should we use a kernel parameter to set the
>     default value instead?

One idea tossed around is to expose them to DT somehow and then just load
a DT-blob to set them all. That would e.g. also allow to specify firmware
blob paths to e.g. load the boot splash image (if uboot or similar haven't
done that yet). I'm personally not sure how much use there is in exposing
a generic drm property cmdline option ...

What's needed for sure is some generic way to do one initial (atomic)
modeset to hammer all these settings into the driver. That would be really
useful to have, since currently that's tied to the fbdev emulation, which
means if you don't have that it will be simply lost.

Cheers, Daniel

> 
> Thanks!
> Maxime
> 
> Maxime Ripard (19):
>   clk: sunxi: Add display clock
>   clk: sunxi: Add PLL3 clock
>   clk: sunxi: Add TCON channel0 clock
>   clk: sunxi: Add TCON channel1 clock
>   clk: sunxi: add DRAM gates
>   clk: sunxi: Add Allwinner R8 AHB gates support
>   drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS
>   drm: Add Allwinner A10 Display Engine support
>   drm: sun4i: Add DT bindings documentation
>   drm: sun4i: Add RGB output
>   drm: sun4i: Add composite output
>   drm: sun4i: tv: Add PAL output standard
>   drm: sun4i: tv: Add NTSC output standard
>   ARM: sun5i: dt: Add pll3 and pll7 clocks
>   ARM: sun5i: dt: Add display and TCON clocks
>   ARM: sun5i: dt: Add DRAM gates
>   ARM: sun5i: dt: Add display blocks to the DTSI
>   ARM: sun5i: r8: Add AHB gates to the DTSI
>   ARM: sun5i: chip: Enable the TV Encoder
> 
>  .../devicetree/bindings/drm/sunxi/sun4i-drm.txt    | 122 ++++
>  arch/arm/boot/dts/sun5i-a10s.dtsi                  |   9 +-
>  arch/arm/boot/dts/sun5i-a13.dtsi                   |   3 +-
>  arch/arm/boot/dts/sun5i-r8.dtsi                    |  46 +-
>  arch/arm/boot/dts/sun5i.dtsi                       | 137 +++++
>  drivers/clk/sunxi/Makefile                         |   4 +
>  drivers/clk/sunxi/clk-simple-gates.c               |   4 +
>  drivers/clk/sunxi/clk-sun4i-display.c              | 199 +++++++
>  drivers/clk/sunxi/clk-sun4i-pll3.c                 |  84 +++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch0.c             | 173 ++++++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch1.c             | 167 ++++++
>  drivers/gpu/drm/Kconfig                            |   2 +
>  drivers/gpu/drm/Makefile                           |   3 +-
>  drivers/gpu/drm/panel/panel-simple.c               |  26 +
>  drivers/gpu/drm/sun4i/Kconfig                      |  14 +
>  drivers/gpu/drm/sun4i/Makefile                     |  11 +
>  drivers/gpu/drm/sun4i/sun4i_backend.c              | 271 +++++++++
>  drivers/gpu/drm/sun4i/sun4i_backend.h              | 159 ++++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.c                 | 117 ++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.h                 |  31 ++
>  drivers/gpu/drm/sun4i/sun4i_drv.c                  | 296 ++++++++++
>  drivers/gpu/drm/sun4i/sun4i_drv.h                  |  30 +
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.c          |  54 ++
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.h          |  19 +
>  drivers/gpu/drm/sun4i/sun4i_layer.c                | 111 ++++
>  drivers/gpu/drm/sun4i/sun4i_layer.h                |  30 +
>  drivers/gpu/drm/sun4i/sun4i_rgb.c                  | 243 ++++++++
>  drivers/gpu/drm/sun4i/sun4i_rgb.h                  |  18 +
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                 | 478 ++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tcon.h                 | 182 ++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.c                   | 619 +++++++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.h                   |  18 +
>  32 files changed, 3673 insertions(+), 7 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/drm/sunxi/sun4i-drm.txt
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-display.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-pll3.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch0.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
>  create mode 100644 drivers/gpu/drm/sun4i/Kconfig
>  create mode 100644 drivers/gpu/drm/sun4i/Makefile
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.h
> 
> -- 
> 2.6.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

WARNING: multiple messages have this Message-ID (diff)
From: Daniel Vetter <daniel@ffwll.ch>
To: Maxime Ripard <maxime.ripard@free-electrons.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	devicetree@vger.kernel.org, Wynter Woods <wynter@nextthing.co>,
	Mike Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@codeaurora.org>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	Hans de Goede <hdegoede@redhat.com>,
	linux-sunxi@googlegroups.com,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Alexander Kaplan <alex@nextthing.co>,
	Chen-Yu Tsai <wens@csie.org>,
	linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 00/19] drm: Add Allwinner A10 display engine support
Date: Fri, 30 Oct 2015 15:52:17 +0100	[thread overview]
Message-ID: <20151030145217.GA16848@phenom.ffwll.local> (raw)
In-Reply-To: <1446214865-3972-1-git-send-email-maxime.ripard@free-electrons.com>

On Fri, Oct 30, 2015 at 03:20:46PM +0100, Maxime Ripard wrote:
> Hi everyone,
> 
> The Allwinner SoCs (except for the very latest ones) all share the
> same set of controllers, loosely coupled together to form the display
> pipeline.
> 
> Depending on the SoC, the number of instances of the controller will
> change (2 instances of each in the A10, only one in the A13, for
> example), and the output availables will change too (HDMI, composite,
> VGA on the A20, none of them on the A13).
> 
> On most featured SoCs, it looks like that:
> 
>  +--------------------------------------------+
>  |                    RAM                     |
>  +--------------------------------------------+
>        |            |      |            |
>        v            |      |            v
>  +----------------+ |      | +----------------+
>  |    Frontend    | |      | |    Frontend    |
>  +----------------+ |      | +----------------+
>          |          |      |         |
>          v          |      |         v
>  +----------------+ |      | +----------------+
>  |    Backend     |<+      +>|    Backend     |
>  +----------------+          +----------------+
>          |                           |
>          v                           v
>  +----------------+          +----------------+---> LVDS
>  |      TCON      |          |      TCON      |---> RGB
>  +----------------+          +----------------+
>        |       +---+       +---+          |
>        |           |       |              |
>        v           v       v              v
>  +------------+  +------------+  +------------+---> VGA
>  | TV Encoder |  |    HDMI    |  | TV Encoder |---> Composite
>  +------------+  +------------+  +------------+
> 
> The current code only assumes that there is a single instance of all
> the controllers. It also supports only the RGB and Composite
> interfaces.
> 
> A few more things are missing though, and will be supported
> eventually:
>   - Overscan support
>   - Asynchronous page flip
>   - Multiple plane support
>   - Composite / VGA Hotplug detection
>   - More outputs
>   - Support for several videos pipelines
> 
> And there's one big gotcha: thhe code to parse the mode from the
> kernel commandline doesn't seem to support named modes. Since we
> expose the various TV standards through named modes, it means that
> there's no way to use a particular standard to display something
> during the kernel boot. The default will always be used, in other
> words, PAL.

Simply not done yet.

> A few more questions that are probably going to be raised during the
> review:
>   - How do you associate private data to a mode, for example to deal
>     with the non-generic, driver-specific settings required to deal
>     with the various TV standards? drm_display_mode seems to have a
>     private field, but it isn't always preserved.

Analog TV in general is a giant mess, and there's not really all that much
of a standardized solution. I also don't have much clue at all about what
needs to be tuned with analog TV. Probably the best would be to look at
existing drivers with TV-out support and what kind of properties they
support. Then standardize them (with relevant helper code in drm core) and
use that. Additional flags on the mode, especially using the private stuff
is kinda the deprecated non-atomic approach. If you need private data
beyond the mode and any additional properties on the crtc (for derived
state) then just subclass drm_crtc_state and put it there.

>   - How do you setup properties in the kernel command line? In order
>     to have a decent display during boot on relevant interfaces, you
>     probably want to setup the overscan beforehand. Overscan seems to
>     be handled through properties, and afaik, there's no way to set
>     that from the cmdline. Should we use a kernel parameter to set the
>     default value instead?

One idea tossed around is to expose them to DT somehow and then just load
a DT-blob to set them all. That would e.g. also allow to specify firmware
blob paths to e.g. load the boot splash image (if uboot or similar haven't
done that yet). I'm personally not sure how much use there is in exposing
a generic drm property cmdline option ...

What's needed for sure is some generic way to do one initial (atomic)
modeset to hammer all these settings into the driver. That would be really
useful to have, since currently that's tied to the fbdev emulation, which
means if you don't have that it will be simply lost.

Cheers, Daniel

> 
> Thanks!
> Maxime
> 
> Maxime Ripard (19):
>   clk: sunxi: Add display clock
>   clk: sunxi: Add PLL3 clock
>   clk: sunxi: Add TCON channel0 clock
>   clk: sunxi: Add TCON channel1 clock
>   clk: sunxi: add DRAM gates
>   clk: sunxi: Add Allwinner R8 AHB gates support
>   drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS
>   drm: Add Allwinner A10 Display Engine support
>   drm: sun4i: Add DT bindings documentation
>   drm: sun4i: Add RGB output
>   drm: sun4i: Add composite output
>   drm: sun4i: tv: Add PAL output standard
>   drm: sun4i: tv: Add NTSC output standard
>   ARM: sun5i: dt: Add pll3 and pll7 clocks
>   ARM: sun5i: dt: Add display and TCON clocks
>   ARM: sun5i: dt: Add DRAM gates
>   ARM: sun5i: dt: Add display blocks to the DTSI
>   ARM: sun5i: r8: Add AHB gates to the DTSI
>   ARM: sun5i: chip: Enable the TV Encoder
> 
>  .../devicetree/bindings/drm/sunxi/sun4i-drm.txt    | 122 ++++
>  arch/arm/boot/dts/sun5i-a10s.dtsi                  |   9 +-
>  arch/arm/boot/dts/sun5i-a13.dtsi                   |   3 +-
>  arch/arm/boot/dts/sun5i-r8.dtsi                    |  46 +-
>  arch/arm/boot/dts/sun5i.dtsi                       | 137 +++++
>  drivers/clk/sunxi/Makefile                         |   4 +
>  drivers/clk/sunxi/clk-simple-gates.c               |   4 +
>  drivers/clk/sunxi/clk-sun4i-display.c              | 199 +++++++
>  drivers/clk/sunxi/clk-sun4i-pll3.c                 |  84 +++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch0.c             | 173 ++++++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch1.c             | 167 ++++++
>  drivers/gpu/drm/Kconfig                            |   2 +
>  drivers/gpu/drm/Makefile                           |   3 +-
>  drivers/gpu/drm/panel/panel-simple.c               |  26 +
>  drivers/gpu/drm/sun4i/Kconfig                      |  14 +
>  drivers/gpu/drm/sun4i/Makefile                     |  11 +
>  drivers/gpu/drm/sun4i/sun4i_backend.c              | 271 +++++++++
>  drivers/gpu/drm/sun4i/sun4i_backend.h              | 159 ++++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.c                 | 117 ++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.h                 |  31 ++
>  drivers/gpu/drm/sun4i/sun4i_drv.c                  | 296 ++++++++++
>  drivers/gpu/drm/sun4i/sun4i_drv.h                  |  30 +
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.c          |  54 ++
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.h          |  19 +
>  drivers/gpu/drm/sun4i/sun4i_layer.c                | 111 ++++
>  drivers/gpu/drm/sun4i/sun4i_layer.h                |  30 +
>  drivers/gpu/drm/sun4i/sun4i_rgb.c                  | 243 ++++++++
>  drivers/gpu/drm/sun4i/sun4i_rgb.h                  |  18 +
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                 | 478 ++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tcon.h                 | 182 ++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.c                   | 619 +++++++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.h                   |  18 +
>  32 files changed, 3673 insertions(+), 7 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/drm/sunxi/sun4i-drm.txt
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-display.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-pll3.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch0.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
>  create mode 100644 drivers/gpu/drm/sun4i/Kconfig
>  create mode 100644 drivers/gpu/drm/sun4i/Makefile
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.h
> 
> -- 
> 2.6.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

WARNING: multiple messages have this Message-ID (diff)
From: daniel@ffwll.ch (Daniel Vetter)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 00/19] drm: Add Allwinner A10 display engine support
Date: Fri, 30 Oct 2015 15:52:17 +0100	[thread overview]
Message-ID: <20151030145217.GA16848@phenom.ffwll.local> (raw)
In-Reply-To: <1446214865-3972-1-git-send-email-maxime.ripard@free-electrons.com>

On Fri, Oct 30, 2015 at 03:20:46PM +0100, Maxime Ripard wrote:
> Hi everyone,
> 
> The Allwinner SoCs (except for the very latest ones) all share the
> same set of controllers, loosely coupled together to form the display
> pipeline.
> 
> Depending on the SoC, the number of instances of the controller will
> change (2 instances of each in the A10, only one in the A13, for
> example), and the output availables will change too (HDMI, composite,
> VGA on the A20, none of them on the A13).
> 
> On most featured SoCs, it looks like that:
> 
>  +--------------------------------------------+
>  |                    RAM                     |
>  +--------------------------------------------+
>        |            |      |            |
>        v            |      |            v
>  +----------------+ |      | +----------------+
>  |    Frontend    | |      | |    Frontend    |
>  +----------------+ |      | +----------------+
>          |          |      |         |
>          v          |      |         v
>  +----------------+ |      | +----------------+
>  |    Backend     |<+      +>|    Backend     |
>  +----------------+          +----------------+
>          |                           |
>          v                           v
>  +----------------+          +----------------+---> LVDS
>  |      TCON      |          |      TCON      |---> RGB
>  +----------------+          +----------------+
>        |       +---+       +---+          |
>        |           |       |              |
>        v           v       v              v
>  +------------+  +------------+  +------------+---> VGA
>  | TV Encoder |  |    HDMI    |  | TV Encoder |---> Composite
>  +------------+  +------------+  +------------+
> 
> The current code only assumes that there is a single instance of all
> the controllers. It also supports only the RGB and Composite
> interfaces.
> 
> A few more things are missing though, and will be supported
> eventually:
>   - Overscan support
>   - Asynchronous page flip
>   - Multiple plane support
>   - Composite / VGA Hotplug detection
>   - More outputs
>   - Support for several videos pipelines
> 
> And there's one big gotcha: thhe code to parse the mode from the
> kernel commandline doesn't seem to support named modes. Since we
> expose the various TV standards through named modes, it means that
> there's no way to use a particular standard to display something
> during the kernel boot. The default will always be used, in other
> words, PAL.

Simply not done yet.

> A few more questions that are probably going to be raised during the
> review:
>   - How do you associate private data to a mode, for example to deal
>     with the non-generic, driver-specific settings required to deal
>     with the various TV standards? drm_display_mode seems to have a
>     private field, but it isn't always preserved.

Analog TV in general is a giant mess, and there's not really all that much
of a standardized solution. I also don't have much clue at all about what
needs to be tuned with analog TV. Probably the best would be to look at
existing drivers with TV-out support and what kind of properties they
support. Then standardize them (with relevant helper code in drm core) and
use that. Additional flags on the mode, especially using the private stuff
is kinda the deprecated non-atomic approach. If you need private data
beyond the mode and any additional properties on the crtc (for derived
state) then just subclass drm_crtc_state and put it there.

>   - How do you setup properties in the kernel command line? In order
>     to have a decent display during boot on relevant interfaces, you
>     probably want to setup the overscan beforehand. Overscan seems to
>     be handled through properties, and afaik, there's no way to set
>     that from the cmdline. Should we use a kernel parameter to set the
>     default value instead?

One idea tossed around is to expose them to DT somehow and then just load
a DT-blob to set them all. That would e.g. also allow to specify firmware
blob paths to e.g. load the boot splash image (if uboot or similar haven't
done that yet). I'm personally not sure how much use there is in exposing
a generic drm property cmdline option ...

What's needed for sure is some generic way to do one initial (atomic)
modeset to hammer all these settings into the driver. That would be really
useful to have, since currently that's tied to the fbdev emulation, which
means if you don't have that it will be simply lost.

Cheers, Daniel

> 
> Thanks!
> Maxime
> 
> Maxime Ripard (19):
>   clk: sunxi: Add display clock
>   clk: sunxi: Add PLL3 clock
>   clk: sunxi: Add TCON channel0 clock
>   clk: sunxi: Add TCON channel1 clock
>   clk: sunxi: add DRAM gates
>   clk: sunxi: Add Allwinner R8 AHB gates support
>   drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS
>   drm: Add Allwinner A10 Display Engine support
>   drm: sun4i: Add DT bindings documentation
>   drm: sun4i: Add RGB output
>   drm: sun4i: Add composite output
>   drm: sun4i: tv: Add PAL output standard
>   drm: sun4i: tv: Add NTSC output standard
>   ARM: sun5i: dt: Add pll3 and pll7 clocks
>   ARM: sun5i: dt: Add display and TCON clocks
>   ARM: sun5i: dt: Add DRAM gates
>   ARM: sun5i: dt: Add display blocks to the DTSI
>   ARM: sun5i: r8: Add AHB gates to the DTSI
>   ARM: sun5i: chip: Enable the TV Encoder
> 
>  .../devicetree/bindings/drm/sunxi/sun4i-drm.txt    | 122 ++++
>  arch/arm/boot/dts/sun5i-a10s.dtsi                  |   9 +-
>  arch/arm/boot/dts/sun5i-a13.dtsi                   |   3 +-
>  arch/arm/boot/dts/sun5i-r8.dtsi                    |  46 +-
>  arch/arm/boot/dts/sun5i.dtsi                       | 137 +++++
>  drivers/clk/sunxi/Makefile                         |   4 +
>  drivers/clk/sunxi/clk-simple-gates.c               |   4 +
>  drivers/clk/sunxi/clk-sun4i-display.c              | 199 +++++++
>  drivers/clk/sunxi/clk-sun4i-pll3.c                 |  84 +++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch0.c             | 173 ++++++
>  drivers/clk/sunxi/clk-sun4i-tcon-ch1.c             | 167 ++++++
>  drivers/gpu/drm/Kconfig                            |   2 +
>  drivers/gpu/drm/Makefile                           |   3 +-
>  drivers/gpu/drm/panel/panel-simple.c               |  26 +
>  drivers/gpu/drm/sun4i/Kconfig                      |  14 +
>  drivers/gpu/drm/sun4i/Makefile                     |  11 +
>  drivers/gpu/drm/sun4i/sun4i_backend.c              | 271 +++++++++
>  drivers/gpu/drm/sun4i/sun4i_backend.h              | 159 ++++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.c                 | 117 ++++
>  drivers/gpu/drm/sun4i/sun4i_crtc.h                 |  31 ++
>  drivers/gpu/drm/sun4i/sun4i_drv.c                  | 296 ++++++++++
>  drivers/gpu/drm/sun4i/sun4i_drv.h                  |  30 +
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.c          |  54 ++
>  drivers/gpu/drm/sun4i/sun4i_framebuffer.h          |  19 +
>  drivers/gpu/drm/sun4i/sun4i_layer.c                | 111 ++++
>  drivers/gpu/drm/sun4i/sun4i_layer.h                |  30 +
>  drivers/gpu/drm/sun4i/sun4i_rgb.c                  | 243 ++++++++
>  drivers/gpu/drm/sun4i/sun4i_rgb.h                  |  18 +
>  drivers/gpu/drm/sun4i/sun4i_tcon.c                 | 478 ++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tcon.h                 | 182 ++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.c                   | 619 +++++++++++++++++++++
>  drivers/gpu/drm/sun4i/sun4i_tv.h                   |  18 +
>  32 files changed, 3673 insertions(+), 7 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/drm/sunxi/sun4i-drm.txt
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-display.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-pll3.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch0.c
>  create mode 100644 drivers/clk/sunxi/clk-sun4i-tcon-ch1.c
>  create mode 100644 drivers/gpu/drm/sun4i/Kconfig
>  create mode 100644 drivers/gpu/drm/sun4i/Makefile
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_backend.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_crtc.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_drv.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_framebuffer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_layer.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_rgb.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tcon.h
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.c
>  create mode 100644 drivers/gpu/drm/sun4i/sun4i_tv.h
> 
> -- 
> 2.6.2
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

  parent reply	other threads:[~2015-10-30 15:00 UTC|newest]

Thread overview: 167+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-30 14:20 [PATCH 00/19] drm: Add Allwinner A10 display engine support Maxime Ripard
2015-10-30 14:20 ` Maxime Ripard
2015-10-30 14:20 ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 01/19] clk: sunxi: Add display clock Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 21:29   ` Stephen Boyd
2015-10-30 21:29     ` Stephen Boyd
2015-11-06 23:39     ` Maxime Ripard
2015-11-06 23:39       ` Maxime Ripard
2015-11-06 23:39       ` Maxime Ripard
2015-11-12 20:31       ` Stephen Boyd
2015-11-12 20:31         ` Stephen Boyd
2015-11-19 15:42         ` Maxime Ripard
2015-11-19 15:42           ` Maxime Ripard
2015-11-19 15:42           ` Maxime Ripard
2015-10-31 10:28   ` Chen-Yu Tsai
2015-10-31 10:28     ` Chen-Yu Tsai
2015-10-31 10:28     ` Chen-Yu Tsai
2015-11-06 19:42     ` Maxime Ripard
2015-11-06 19:42       ` Maxime Ripard
2015-11-06 19:42       ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 02/19] clk: sunxi: Add PLL3 clock Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 21:32   ` Stephen Boyd
2015-10-30 21:32     ` Stephen Boyd
2015-10-30 21:32     ` Stephen Boyd
2015-10-30 14:20 ` [PATCH 03/19] clk: sunxi: Add TCON channel0 clock Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-31 10:19   ` Chen-Yu Tsai
2015-10-31 10:19     ` Chen-Yu Tsai
2015-11-06 22:11     ` Maxime Ripard
2015-11-06 22:11       ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 04/19] clk: sunxi: Add TCON channel1 clock Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 21:37   ` Stephen Boyd
2015-10-30 21:37     ` Stephen Boyd
2015-11-07  0:11     ` Maxime Ripard
2015-11-07  0:11       ` Maxime Ripard
2015-11-07  0:11       ` Maxime Ripard
2015-10-31  9:53   ` Chen-Yu Tsai
2015-10-31  9:53     ` Chen-Yu Tsai
2015-10-31  9:53     ` Chen-Yu Tsai
2015-11-07  0:01     ` Maxime Ripard
2015-11-07  0:01       ` Maxime Ripard
2015-11-07  0:01       ` Maxime Ripard
2015-11-09  3:36       ` Chen-Yu Tsai
2015-11-09  3:36         ` Chen-Yu Tsai
2015-11-09  3:36         ` Chen-Yu Tsai
2015-11-19 15:35         ` Maxime Ripard
2015-11-19 15:35           ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 05/19] clk: sunxi: add DRAM gates Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-11-09  4:18   ` Chen-Yu Tsai
2015-11-09  4:18     ` Chen-Yu Tsai
2015-11-09  4:18     ` Chen-Yu Tsai
2015-11-13  8:08     ` Chen-Yu Tsai
2015-11-13  8:08       ` Chen-Yu Tsai
2015-11-13  8:08       ` Chen-Yu Tsai
2015-11-19 15:43       ` Maxime Ripard
2015-11-19 15:43         ` Maxime Ripard
2015-11-19 15:43         ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 06/19] clk: sunxi: Add Allwinner R8 AHB gates support Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 16:01   ` Chen-Yu Tsai
2015-10-30 16:01     ` Chen-Yu Tsai
2015-10-30 16:01     ` Chen-Yu Tsai
2015-10-30 16:33     ` Hans de Goede
2015-10-30 16:33       ` Hans de Goede
2015-10-30 16:33       ` Hans de Goede
2015-10-30 14:20 ` [PATCH 07/19] drm/panel: simple: Add timings for the Olimex LCD-OLinuXino-4.3TS Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 17:32   ` Thierry Reding
2015-10-30 17:32     ` Thierry Reding
2015-10-30 17:32     ` Thierry Reding
2015-11-07  0:44     ` Maxime Ripard
2015-11-07  0:44       ` Maxime Ripard
2015-11-07  0:44       ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 08/19] drm: Add Allwinner A10 Display Engine support Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:44   ` Daniel Vetter
2015-10-30 14:44     ` Daniel Vetter
2015-11-11 22:14     ` Maxime Ripard
2015-11-11 22:14       ` Maxime Ripard
2015-11-11 22:14       ` Maxime Ripard
2015-11-16 15:04       ` Daniel Vetter
2015-11-16 15:04         ` Daniel Vetter
2015-11-16 15:04         ` Daniel Vetter
2015-10-30 14:20 ` [PATCH 09/19] drm: sun4i: Add DT bindings documentation Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 16:40   ` Rob Herring
2015-10-30 16:40     ` Rob Herring
2015-10-30 16:40     ` Rob Herring
2015-10-30 17:37     ` Thierry Reding
2015-10-30 17:37       ` Thierry Reding
2015-10-30 17:37       ` Thierry Reding
2015-10-30 17:37       ` Thierry Reding
2015-11-01 14:28       ` Rob Herring
2015-11-01 14:28         ` Rob Herring
2015-11-01 14:28         ` Rob Herring
2015-11-01 14:28         ` Rob Herring
2015-11-06 22:32     ` Maxime Ripard
2015-11-06 22:32       ` Maxime Ripard
2015-11-06 22:32       ` Maxime Ripard
2015-11-06 22:32       ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 10/19] drm: sun4i: Add RGB output Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 11/19] drm: sun4i: Add composite output Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-11-02  2:53   ` [linux-sunxi] " Jonathan Liu
2015-11-02  2:53     ` Jonathan Liu
2015-11-02  2:53     ` Jonathan Liu
2015-11-07  0:35     ` [linux-sunxi] " Maxime Ripard
2015-11-07  0:35       ` Maxime Ripard
2015-11-07  0:35       ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 12/19] drm: sun4i: tv: Add PAL output standard Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20 ` [PATCH 13/19] drm: sun4i: tv: Add NTSC " Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:20   ` Maxime Ripard
2015-10-30 14:21 ` [PATCH 14/19] ARM: sun5i: dt: Add pll3 and pll7 clocks Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-11-09  4:24   ` Chen-Yu Tsai
2015-11-09  4:24     ` Chen-Yu Tsai
2015-11-09  4:24     ` Chen-Yu Tsai
2015-10-30 14:21 ` [PATCH 15/19] ARM: sun5i: dt: Add display and TCON clocks Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21 ` [PATCH 16/19] ARM: sun5i: dt: Add DRAM gates Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21 ` [PATCH 17/19] ARM: sun5i: dt: Add display blocks to the DTSI Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21 ` [PATCH 18/19] ARM: sun5i: r8: Add AHB gates " Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21 ` [PATCH 19/19] ARM: sun5i: chip: Enable the TV Encoder Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 14:21   ` Maxime Ripard
2015-10-30 15:20   ` Chen-Yu Tsai
2015-10-30 15:20     ` Chen-Yu Tsai
2015-11-06 19:37     ` Maxime Ripard
2015-11-06 19:37       ` Maxime Ripard
2015-11-06 19:37       ` Maxime Ripard
2015-10-30 14:52 ` Daniel Vetter [this message]
2015-10-30 14:52   ` [PATCH 00/19] drm: Add Allwinner A10 display engine support Daniel Vetter
2015-10-30 14:52   ` Daniel Vetter
2015-11-12  5:12   ` Maxime Ripard
2015-11-12  5:12     ` Maxime Ripard
2015-11-12  5:12     ` Maxime Ripard
2015-10-30 15:02 ` Stefan Monnier
2015-11-09  3:43 ` Chen-Yu Tsai
2015-11-09  3:43   ` Chen-Yu Tsai
2015-11-09  3:43   ` Chen-Yu Tsai

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20151030145217.GA16848@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@linux.ie \
    --cc=alex@nextthing.co \
    --cc=boris.brezillon@free-electrons.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=hdegoede@redhat.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sunxi@googlegroups.com \
    --cc=maxime.ripard@free-electrons.com \
    --cc=mturquette@baylibre.com \
    --cc=robdclark@gmail.com \
    --cc=sboyd@codeaurora.org \
    --cc=thierry.reding@gmail.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=wens@csie.org \
    --cc=wynter@nextthing.co \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.