Add DRM for stih4xx platforms
Subsystems (4)
v5 cover Add DRM for stih4xx platforms
This series of patches add the support of DRM/KMS drivers for STMicroelectronics chipsets stih416 and stih407.
version 5:
- Rework sti_drm_drv probes functions to support deferred probe. This allow hdmi to delayed framebuffer creation until I2C is available.
- Add ops functsions in sti_layer structure to simpify GDP and VID code.
- Add NOTES file to describe how the DRM concepts are mapped on hardware.
patches could be found here: git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v5
version 4:
- Remove depency between TVout it subdevices HDMI and HDA
- Rework and simplify VTG and VTAC code
- Fix numbers of typo and indentation
- Remove debug (will be push in separate patches)
- Fix remarks done in previous patcheset
patches could be found here: git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v4
version 3:
- Correctly split code between probe and bind funtions
- Squash some commits
- remove HQ-VDP device code to have a smaller patcheset, we will introduce it later.
patches could be found here: git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v3
version 2:
- Use componentized device instead of register sub-devices in master driver probe function
- Fix Makefile and Kconfig to only allow built-in compilation
patches could be found here: git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v2
version 1:
- First path submission
Hardware is split in two main blocks: Compositor and TVout. Each of them includes specific hardware IPs and the display timing are controlled by a specific Video Timing Generator hardware IP (VTG).
Compositor is made of the follow hardware IPs:
- GDP (Generic Display Pipeline) which is an entry point for graphic (RGB) buffers
- VDP (Video Diplay Pipeline) which is an entry point for video (YUV) buffers
- HQVDP (High Quality Video Display Processor) that supports scaling, deinterlacing and some miscellaneous image quality improvements. It fetches the Video decoded buffers from memory, processes them and pushes them to the Compositor through a HW dedicated bus.
- Mixer is responsible of mixing all the entries depending of their respective z-order and layout
TVout is divided in 3 parts:
- HDMI to generate HDMI signals, depending of chipset version HDMI phy can change.
- HDA to generate signals for HD analog TV
- VIP to control/switch data path coming from Compositor
On stih416 compositor and Tvout are on different dies so a Video Trafic Advance inter-die Communication mechanism (VTAC) is needed.
+---------------------------------------------+ +----------------------------------------+ | +-------------------------------+ +----+ | | +----+ +--------------------------+ | | | | | | | | | | | +---------+ +----+ | | | | +----+ +------+ | | | | | | | | | VIP |---->|HDMI| | | | | |GPD +------------->| | | | | | | | | | | | +----+ | | | | +----+ |Mixer |--|-->| | | | | |---|->| switcher| | | | | | | | | | | | | | | | | +----+ | | | | | | | | | | | | | | | |---->|HDA | | | | | +------+ | |VTAC|========>|VTAC| | +---------+ +----+ | | | | | | | | | | | | | | | | Compositor | | | | | | | | TVout | | | +-------------------------------+ | | | | | | +--------------------------+ | | ^ | | | | | | ^ | | | | | | | | | | | | +--------------+ | | | | | | +-------------+ | | | VTG (master) |----->| | | | | |----->| VTG (slave) | | | +--------------+ +----+ | | +----+ +-------------+ | |Digital die | | Analog Die| +---------------------------------------------+ +----------------------------------------+
On stih407 Compositor and Tvout are on the same die
+-----------------------------------------------------------------+ | +-------------------------------+ +--------------------------+ | | | | | +---------+ +----+ | | | | +----+ +------+ | | | VIP |---->|HDMI| | | | | |GPD +------------->| | | | | | +----+ | | | | +----+ |Mixer |--|--|->| switcher| | | | | +----+ +-----+ | | | | | | +----+ | | | | |VDP +-->+HQVDP+--->| | | | | |---->|HDA | | | | | +----+ +-----+ +------+ | | +---------+ +----+ | | | | | | | | | | Compositor | | TVout | | | +-------------------------------+ +--------------------------+ | | ^ ^ | | | | | | +--------------+ | | | VTG | | | +--------------+ | |Digital die | +-----------------------------------------------------------------+
In addition of the drivers for the IPs listed before a thin I2C driver (hdmiddc) is used by HDMI driver to retrieve EDID for monitor.
To unify interfaces of GDP and VDP we create a "layer" interface called by compositor to control both GPD and VDP.
Hardware have memory contraints (alignment, contiguous) so we use CMA drm helpers functions to allocate frame buffer.
File naming convention is:
- sti_* for IPs drivers
- sti_drm_* for drm functions implementation.
Benjamin Gaignard (11):
drm: sti: add bindings for DRM driver
drm: sti: add VTG driver
drm: sti: add VTAC drivers
drm: sti: add HDMI driver
drm: sti: add HDA driver
drm: sti: add TVOut driver
drm: sti: add GDP layer
drm: sti: add VID layer
drm: sti: add Mixer
drm: sti: add Compositor
drm: sti: Add DRM driver itself
.../devicetree/bindings/gpu/st,stih4xx.txt | 189 +++++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sti/Kconfig | 14 + drivers/gpu/drm/sti/Makefile | 17 + drivers/gpu/drm/sti/NOTES | 58 ++ drivers/gpu/drm/sti/sti_compositor.c | 264 +++++++ drivers/gpu/drm/sti/sti_compositor.h | 90 +++ drivers/gpu/drm/sti/sti_drm_crtc.c | 419 +++++++++++ drivers/gpu/drm/sti/sti_drm_crtc.h | 21 + drivers/gpu/drm/sti/sti_drm_drv.c | 244 +++++++ drivers/gpu/drm/sti/sti_drm_drv.h | 29 + drivers/gpu/drm/sti/sti_drm_plane.c | 192 +++++ drivers/gpu/drm/sti/sti_drm_plane.h | 17 + drivers/gpu/drm/sti/sti_gdp.c | 549 ++++++++++++++ drivers/gpu/drm/sti/sti_gdp.h | 16 + drivers/gpu/drm/sti/sti_hda.c | 790 ++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi.c | 808 +++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi.h | 88 +++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 +++++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h | 14 + drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 211 ++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h | 14 + drivers/gpu/drm/sti/sti_layer.c | 206 ++++++ drivers/gpu/drm/sti/sti_layer.h | 125 ++++ drivers/gpu/drm/sti/sti_mixer.c | 249 +++++++ drivers/gpu/drm/sti/sti_mixer.h | 54 ++ drivers/gpu/drm/sti/sti_tvout.c | 657 +++++++++++++++++ drivers/gpu/drm/sti/sti_vid.c | 138 ++++ drivers/gpu/drm/sti/sti_vid.h | 12 + drivers/gpu/drm/sti/sti_vtac.c | 211 ++++++ drivers/gpu/drm/sti/sti_vtg.c | 356 +++++++++ drivers/gpu/drm/sti/sti_vtg.h | 28 + 33 files changed, 6419 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/st,stih4xx.txt create mode 100644 drivers/gpu/drm/sti/Kconfig create mode 100644 drivers/gpu/drm/sti/Makefile create mode 100644 drivers/gpu/drm/sti/NOTES create mode 100644 drivers/gpu/drm/sti/sti_compositor.c create mode 100644 drivers/gpu/drm/sti/sti_compositor.h create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.c create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.h create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.c create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.h create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.c create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.h create mode 100644 drivers/gpu/drm/sti/sti_gdp.c create mode 100644 drivers/gpu/drm/sti/sti_gdp.h create mode 100644 drivers/gpu/drm/sti/sti_hda.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h create mode 100644 drivers/gpu/drm/sti/sti_layer.c create mode 100644 drivers/gpu/drm/sti/sti_layer.h create mode 100644 drivers/gpu/drm/sti/sti_mixer.c create mode 100644 drivers/gpu/drm/sti/sti_mixer.h create mode 100644 drivers/gpu/drm/sti/sti_tvout.c create mode 100644 drivers/gpu/drm/sti/sti_vid.c create mode 100644 drivers/gpu/drm/sti/sti_vid.h create mode 100644 drivers/gpu/drm/sti/sti_vtac.c create mode 100644 drivers/gpu/drm/sti/sti_vtg.c create mode 100644 drivers/gpu/drm/sti/sti_vtg.h
Signature · 1 line
1.9.1
PATCH v5 1/11 drm: sti: add bindings for DRM driver
Add DRM/KMS driver bindings documentation.
Describe the required properties for each of the hardware IPs drivers.
--- .../devicetree/bindings/gpu/st,stih4xx.txt | 189 +++++++++++++++++++++ drivers/gpu/drm/sti/NOTES | 58 +++++++ 2 files changed, 247 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/st,stih4xx.txt create mode 100644 drivers/gpu/drm/sti/NOTES
Documentation/devicetree/bindings/gpu/st,stih4xx.txt new file +189 -0
@@ -0,0 +1,189 @@ +STMicroelectronics stih4xx platforms + +- sti-vtg: video timing generator + Required properties: + - compatible: "st,vtg" + - reg: Physical base address of the IP registers and length of memory mapped region. + Optional properties: + - interrupts : VTG interrupt number to the CPU. + - st,slave: phandle on a slave vtg + +- sti-vtac: video timing advanced inter dye communication Rx and TX + Required properties: + - compatible: "st,vtac-main" or "st,vtac-aux" + - reg: Physical base address of the IP registers and length of memory mapped region. + - clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend of the SoC type. + See ../clocks/clock-bindings.txt for details. + - clock-names: names of the clocks listed in clocks property in the same + order. + +- sti-display-subsystem: Master device for DRM sub-components + This device must be the parent of all the sub-components and is responsible + of bind them. + Required properties: + - compatible: "st,sti-display-subsystem" + - ranges: to allow probing of subdevices + +- sti-compositor: frame compositor engine + must be a child of sti-display-subsystem + Required properties: + - compatible: "st,stih<chip>-compositor" + - reg: Physical base address of the IP registers and length of memory mapped region. + - clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend of the SoC type. + See ../clocks/clock-bindings.txt for details. + - clock-names: names of the clocks listed in clocks property in the same + order. + - resets: resets to be used by the device + See ../reset/reset.txt for details. + - reset-names: names of the resets listed in resets property in the same + order. + - st,vtg: phandle(s) on vtg device (main and aux) nodes. + +- sti-tvout: video out hardware block + must be a child of sti-display-subsystem + Required properties: + - compatible: "st,stih<chip>-tvout" + - reg: Physical base address of the IP registers and length of memory mapped region. + - reg-names: names of the mapped memory regions listed in regs property in + the same order. + - resets: resets to be used by the device + See ../reset/reset.txt for details. + - reset-names: names of the resets listed in resets property in the same + order. + - ranges: to allow probing of subdevices + +- sti-hdmi: hdmi output block + must be a child of sti-tvout + Required properties: + - compatible: "st,stih<chip>-hdmi"; + - reg: Physical base address of the IP registers and length of memory mapped region. + - reg-names: names of the mapped memory regions listed in regs property in + the same order. + - interrupts : HDMI interrupt number to the CPU. + - interrupt-names: name of the interrupts listed in interrupts property in + the same order + - clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend of the SoC type. + - clock-names: names of the clocks listed in clocks property in the same + order. + - hdmi,hpd-gpio: gpio id to detect if an hdmi cable is plugged or not. + +sti-hda: + Required properties: + must be a child of sti-tvout + - compatible: "st,stih<chip>-hda" + - reg: Physical base address of the IP registers and length of memory mapped region. + - reg-names: names of the mapped memory regions listed in regs property in + the same order. + - clocks: from common clock binding: handle hardware IP needed clocks, the + number of clocks may depend of the SoC type. + See ../clocks/clock-bindings.txt for details. + - clock-names: names of the clocks listed in clocks property in the same + order. + +Example: + +/ { + ... + + vtg_main_slave: sti-vtg-main-slave@fe85A800 { + compatible = "st,vtg"; + reg = <0xfe85A800 0x300>; + interrupts = <GIC_SPI 175 IRQ_TYPE_NONE>; + }; + + vtg_main: sti-vtg-main-master@fd348000 { + compatible = "st,vtg"; + reg = <0xfd348000 0x400>; + st,slave = <&vtg_main_slave>; + }; + + vtg_aux_slave: sti-vtg-aux-slave@fd348400 { + compatible = "st,vtg"; + reg = <0xfe858200 0x300>; + interrupts = <GIC_SPI 176 IRQ_TYPE_NONE>; + }; + + vtg_aux: sti-vtg-aux-master@fd348400 { + compatible = "st,vtg"; + reg = <0xfd348400 0x400>; + st,slave = <&vtg_aux_slave>; + }; + + + sti-vtac-rx-main@fee82800 { + compatible = "st,vtac-main"; + reg = <0xfee82800 0x200>; + clock-names = "vtac"; + clocks = <&CLK_M_A2_DIV0 CLK_M_VTAC_MAIN_PHY>; + }; + + sti-vtac-rx-aux@fee82a00 { + compatible = "st,vtac-aux"; + reg = <0xfee82a00 0x200>; + clock-names = "vtac"; + clocks = <&CLK_M_A2_DIV0 CLK_M_VTAC_AUX_PHY>; + }; + + sti-vtac-tx-main@fd349000 { + compatible = "st,vtac-main"; + reg = <0xfd349000 0x200>, <0xfd320000 0x10000>; + clock-names = "vtac"; + clocks = <&CLK_S_A1_HS CLK_S_VTAC_TX_PHY>; + }; + + sti-vtac-tx-aux@fd349200 { + compatible = "st,vtac-aux"; + reg = <0xfd349200 0x200>, <0xfd320000 0x10000>; + clock-names = "vtac"; + clocks = <&CLK_S_A1_HS CLK_S_VTAC_TX_PHY>; + }; + + sti-display-subsystem { + compatible = "st,sti-display-subsystem"; + ranges; + + sti-compositor@fd340000 { + compatible = "st,stih416-compositor"; + reg = <0xfd340000 0x1000>; + clock-names = "compo_main", "compo_aux", + "pix_main", "pix_aux"; + clocks = <&CLK_M_A2_DIV1 CLK_M_COMPO_MAIN>, <&CLK_M_A2_DIV1 CLK_M_COMPO_AUX>, + <&CLOCKGEN_C_VCC CLK_S_PIX_MAIN>, <&CLOCKGEN_C_VCC CLK_S_PIX_AUX>; + reset-names = "compo-main", "compo-aux"; + resets = <&softreset STIH416_COMPO_M_SOFTRESET>, <&softreset STIH416_COMPO_A_SOFTRESET>; + st,vtg = <&vtg_main>, <&vtg_aux>; + }; + + sti-tvout@fe000000 { + compatible = "st,stih416-tvout"; + reg = <0xfe000000 0x1000>, <0xfe85a000 0x400>, <0xfe830000 0x10000>; + reg-names = "tvout-reg", "hda-reg", "syscfg"; + reset-names = "tvout"; + resets = <&softreset STIH416_HDTVOUT_SOFTRESET>; + ranges; + + sti-hdmi@fe85c000 { + compatible = "st,stih416-hdmi"; + reg = <0xfe85c000 0x1000>, <0xfe830000 0x10000>; + reg-names = "hdmi-reg", "syscfg"; + interrupts = <GIC_SPI 173 IRQ_TYPE_NONE>; + interrupt-names = "irq"; + clock-names = "pix", "tmds", "phy", "audio"; + clocks = <&CLOCKGEN_C_VCC CLK_S_PIX_HDMI>, <&CLOCKGEN_C_VCC CLK_S_TMDS_HDMI>, <&CLOCKGEN_C_VCC CLK_S_HDMI_REJECT_PLL>, <&CLOCKGEN_B1 CLK_S_PCM_0>; + hdmi,hpd-gpio = <&PIO2 5>; + }; + + sti-hda@fe85a000 { + compatible = "st,stih416-hda"; + reg = <0xfe85a000 0x400>, <0xfe83085c 0x4>; + reg-names = "hda-reg", "video-dacs-ctrl"; + clock-names = "pix", "hddac"; + clocks = <&CLOCKGEN_C_VCC CLK_S_PIX_HD>, <&CLOCKGEN_C_VCC CLK_S_HDDAC>; + }; + }; + }; + ... +};
drivers/gpu/drm/sti/NOTES new file +58 -0
58 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 2/11 drm: sti: add VTG driver
In reply to Benjamin GaignardVideo Time Generator drivers are used to synchronize the compositor and tvout hardware IPs by providing line count, sample count, synchronization signals (HSYNC, VSYNC) and top and bottom fields indication.
VTG are used by pair for each data path (main or auxiliary) one for master and one for slave.
--- drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sti/Kconfig | 5 + drivers/gpu/drm/sti/Makefile | 2 + drivers/gpu/drm/sti/sti_vtg.c | 356 ++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_vtg.h | 28 ++++ 6 files changed, 394 insertions(+) create mode 100644 drivers/gpu/drm/sti/Kconfig create mode 100644 drivers/gpu/drm/sti/Makefile create mode 100644 drivers/gpu/drm/sti/sti_vtg.c create mode 100644 drivers/gpu/drm/sti/sti_vtg.h
drivers/gpu/drm/Kconfig +2 -0
@@ -201,3 +201,5 @@ source "drivers/gpu/drm/tegra/Kconfig" source "drivers/gpu/drm/panel/Kconfig" source "drivers/gpu/drm/bridge/Kconfig" + +source "drivers/gpu/drm/sti/Kconfig"
drivers/gpu/drm/Makefile +1 -0
@@ -61,6 +61,7 @@ obj-$(CONFIG_DRM_QXL) += qxl/ obj-$(CONFIG_DRM_BOCHS) += bochs/ obj-$(CONFIG_DRM_MSM) += msm/ obj-$(CONFIG_DRM_TEGRA) += tegra/ +obj-$(CONFIG_DRM_STI) += sti/ obj-y += i2c/ obj-y += panel/ obj-y += bridge/
drivers/gpu/drm/sti/Kconfig new file +5 -0
@@ -0,0 +1,5 @@ +config DRM_STI + bool "DRM Support for STMicroelectronics SoC stiH41x Series" + depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + help + Choose this option to enable DRM on STM stiH41x chipset
drivers/gpu/drm/sti/Makefile new file +2 -0
@@ -0,0 +1,2 @@ +obj-$(CONFIG_DRM_STI) += \ + sti_vtg.o
drivers/gpu/drm/sti/sti_vtg.c new file +356 -0
356 lines not on this page · raw message
drivers/gpu/drm/sti/sti_vtg.h new file +28 -0
@@ -0,0 +1,28 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_VTG_H_ +#define _STI_VTG_H_ + +#define VTG_TOP_FIELD_EVENT 1 +#define VTG_BOTTOM_FIELD_EVENT 2 + +struct sti_vtg ; +struct drm_display_mode ; +struct notifier_block ; + +struct sti_vtg *of_vtg_find (struct device_node *np); +void sti_vtg_set_config (struct sti_vtg *vtg, +const struct drm_display_mode *mode); +int sti_vtg_register_client (struct sti_vtg *vtg, +struct notifier_block *nb,int crtc_id); +int sti_vtg_unregister_client (struct sti_vtg *vtg, +struct notifier_block *nb); + +u32 sti_vtg_get_line_number (struct drm_display_mode mode,int y); +u32 sti_vtg_get_pixel_number (struct drm_display_mode mode,int x); + +#endif
Signature · 1 line
1.9.1
PATCH v5 3/11 drm: sti: add VTAC drivers
In reply to Benjamin GaignardVideo Traffic Advance Communication Rx and Tx drivers are designed for inter-die communication.
--- drivers/gpu/drm/sti/Makefile | 3 +- drivers/gpu/drm/sti/sti_vtac.c | 211 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 213 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_vtac.c
drivers/gpu/drm/sti/Makefile +2 -1
@@ -1,2 +1,3 @@ obj-$(CONFIG_DRM_STI) += \ - sti_vtg.o + sti_vtg.o \ + sti_vtac.o
drivers/gpu/drm/sti/sti_vtac.c new file +211 -0
211 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 4/11 drm: sti: add HDMI driver
In reply to Benjamin GaignardAdd driver for HDMI output.
HDMI PHY registers are mixed into HDMI device registers and their is only one IRQ for all this hardware block. That is why PHYs aren't using phy framework but only a thin hdmi_phy_ops structure with start and stop functions.
HDMI driver is mapped on drm_bridge and drm_connector structures.
--- drivers/gpu/drm/sti/Makefile | 5 +- drivers/gpu/drm/sti/sti_hdmi.c | 808 +++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi.h | 88 ++++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 ++++++++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h | 14 + drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 211 ++++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h | 14 + 7 files changed, 1475 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_hdmi.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h
drivers/gpu/drm/sti/Makefile +4 -1
@@ -1,3 +1,6 @@ obj-$(CONFIG_DRM_STI) += \ sti_vtg.o \ - sti_vtac.o + sti_vtac.o \ + sti_hdmi.o \ + sti_hdmi_tx3g0c55phy.o \ + sti_hdmi_tx3g4c28phy.o
drivers/gpu/drm/sti/sti_hdmi.c new file +808 -0
808 lines not on this page · raw message
drivers/gpu/drm/sti/sti_hdmi.h new file +88 -0
88 lines not on this page · raw message
drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c new file +336 -0
336 lines not on this page · raw message
drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_HDMI_TX3G0C55PHY_H_ +#define _STI_HDMI_TX3G0C55PHY_H_ + +#include "sti_hdmi.h" + +extern struct hdmi_phy_ops tx3g0c55phy_ops; + +#endif
drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c new file +211 -0
211 lines not on this page · raw message
drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h new file +14 -0
@@ -0,0 +1,14 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_HDMI_TX3G4C28PHY_H_ +#define _STI_HDMI_TX3G4C28PHY_H_ + +#include "sti_hdmi.h" + +extern struct hdmi_phy_ops tx3g4c28phy_ops; + +#endif
Signature · 1 line
1.9.1
PATCH v5 5/11 drm: sti: add HDA driver
In reply to Benjamin GaignardAdd driver to support analog TV ouput.
HDA driver is mapped on drm_bridge and drm_connector structures.
--- drivers/gpu/drm/sti/Makefile | 3 +- drivers/gpu/drm/sti/sti_hda.c | 790 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 792 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_hda.c
drivers/gpu/drm/sti/Makefile +2 -1
@@ -3,4 +3,5 @@ obj-$(CONFIG_DRM_STI) += \ sti_vtac.o \ sti_hdmi.o \ sti_hdmi_tx3g0c55phy.o \ - sti_hdmi_tx3g4c28phy.o + sti_hdmi_tx3g4c28phy.o \ + sti_hda.o
drivers/gpu/drm/sti/sti_hda.c new file +790 -0
790 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 6/11 drm: sti: add TVOut driver
In reply to Benjamin GaignardTVout hardware block is responsible to dispatch the data flow coming from compositor block to any of the output (HDMI or Analog TV). It control when output are start/stop and configure according the require flow path.
TVout is the parent of HDMI and HDA drivers and bind them at runtime.
Tvout is mapped on drm_encoder structure.
One encoder is created for each of the sub-devices and link to their connector/bridge
--- drivers/gpu/drm/sti/Makefile | 3 +- drivers/gpu/drm/sti/sti_tvout.c | 657 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 659 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_tvout.c
drivers/gpu/drm/sti/Makefile +2 -1
@@ -4,4 +4,5 @@ obj-$(CONFIG_DRM_STI) += \ sti_hdmi.o \ sti_hdmi_tx3g0c55phy.o \ sti_hdmi_tx3g4c28phy.o \ - sti_hda.o + sti_hda.o \ + sti_tvout.o
drivers/gpu/drm/sti/sti_tvout.c new file +657 -0
657 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 7/11 drm: sti: add GDP layer
In reply to Benjamin GaignardGeneric Display Pipeline are one of the compositor input sub-devices. GDP are dedicated to graphic input like RGB plans.
GDP is part of Compositor hardware block which will be introduce later.
A sti_layer structure is used to abstract GDP calls from Compositor.
--- drivers/gpu/drm/sti/Makefile | 3 +- drivers/gpu/drm/sti/sti_gdp.c | 516 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_gdp.h | 16 ++ drivers/gpu/drm/sti/sti_layer.h | 125 ++++++++++ 4 files changed, 659 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_gdp.c create mode 100644 drivers/gpu/drm/sti/sti_gdp.h create mode 100644 drivers/gpu/drm/sti/sti_layer.h
drivers/gpu/drm/sti/Makefile +2 -1
@@ -5,4 +5,5 @@ obj-$(CONFIG_DRM_STI) += \ sti_hdmi_tx3g0c55phy.o \ sti_hdmi_tx3g4c28phy.o \ sti_hda.o \ - sti_tvout.o + sti_tvout.o \ + sti_gdp.o
drivers/gpu/drm/sti/sti_gdp.c new file +516 -0
516 lines not on this page · raw message
drivers/gpu/drm/sti/sti_gdp.h new file +16 -0
@@ -0,0 +1,16 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Authors: Benjamin Gaignard <[email protected]> +* Fabien Dessenne <[email protected]> +* for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_GDP_H_ +#define _STI_GDP_H_ + +#include <linux/types.h> + +struct sti_layer *sti_gdp_create (struct device *dev,int id); + +#endif
drivers/gpu/drm/sti/sti_layer.h new file +125 -0
125 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 8/11 drm: sti: add VID layer
In reply to Benjamin GaignardVIDeo plug are one of the compositor input sub-devices. VID are dedicated to video inputs like YUV plans.
Like GDP, VID are part of Compositor hardware block and use sti_layer structure to provide an abstraction for Compositor calls.
--- drivers/gpu/drm/sti/Makefile | 3 +- drivers/gpu/drm/sti/sti_vid.c | 138 ++++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_vid.h | 12 ++++ 3 files changed, 152 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/sti/sti_vid.c create mode 100644 drivers/gpu/drm/sti/sti_vid.h
drivers/gpu/drm/sti/Makefile +2 -1
@@ -6,4 +6,5 @@ obj-$(CONFIG_DRM_STI) += \ sti_hdmi_tx3g4c28phy.o \ sti_hda.o \ sti_tvout.o \ - sti_gdp.o + sti_gdp.o \ + sti_vid.o
drivers/gpu/drm/sti/sti_vid.c new file +138 -0
138 lines not on this page · raw message
drivers/gpu/drm/sti/sti_vid.h new file +12 -0
@@ -0,0 +1,12 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Fabien Dessenne <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_VID_H_ +#define _STI_VID_H_ + +struct sti_layer *sti_vid_create (struct device *dev); + +#endif
Signature · 1 line
1.9.1
PATCH v5 9/11 drm: sti: add Mixer
In reply to Benjamin GaignardMixer hardware IP is responsible of mixing the different inputs layers. Z-order is managed by the mixer.
We could 2 mixers: one for main path and one for auxillary path
Mixers are part of Compositor hardware block
--- drivers/gpu/drm/sti/Makefile | 1 + drivers/gpu/drm/sti/sti_mixer.c | 243 ++++++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_mixer.h | 54 +++++++++ 3 files changed, 298 insertions(+) create mode 100644 drivers/gpu/drm/sti/sti_mixer.c create mode 100644 drivers/gpu/drm/sti/sti_mixer.h
drivers/gpu/drm/sti/Makefile +1 -0
@@ -6,5 +6,6 @@ obj-$(CONFIG_DRM_STI) += \ sti_hdmi_tx3g4c28phy.o \ sti_hda.o \ sti_tvout.o \ + sti_mixer.o \ sti_gdp.o \ sti_vid.o
drivers/gpu/drm/sti/sti_mixer.c new file +243 -0
243 lines not on this page · raw message
drivers/gpu/drm/sti/sti_mixer.h new file +54 -0
54 lines not on this page · raw message
Signature · 1 line
1.9.1
PATCH v5 10/11 drm: sti: add Compositor
In reply to Benjamin GaignardCompositor control all the input sub-device (VID, GDP) and the mixer(s).
It is the main entry point for composition. Layer interface is used to control the abstracted layers.
Add debug in mixer and GDP
--- drivers/gpu/drm/sti/Kconfig | 1 + drivers/gpu/drm/sti/Makefile | 2 + drivers/gpu/drm/sti/sti_compositor.c | 252 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_compositor.h | 90 +++++++++++++ drivers/gpu/drm/sti/sti_gdp.c | 33 +++++ drivers/gpu/drm/sti/sti_layer.c | 206 ++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_mixer.c | 6 + 7 files changed, 590 insertions(+) create mode 100644 drivers/gpu/drm/sti/sti_compositor.c create mode 100644 drivers/gpu/drm/sti/sti_compositor.h create mode 100644 drivers/gpu/drm/sti/sti_layer.c
drivers/gpu/drm/sti/Kconfig +1 -0
@@ -1,5 +1,6 @@ config DRM_STI bool "DRM Support for STMicroelectronics SoC stiH41x Series" depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + select DRM_KMS_CMA_HELPER help Choose this option to enable DRM on STM stiH41x chipset
drivers/gpu/drm/sti/Makefile +2 -0
@@ -1,11 +1,13 @@ obj-$(CONFIG_DRM_STI) += \ sti_vtg.o \ sti_vtac.o \ + sti_compositor.o \ sti_hdmi.o \ sti_hdmi_tx3g0c55phy.o \ sti_hdmi_tx3g4c28phy.o \ sti_hda.o \ sti_tvout.o \ + sti_layer.o \ sti_mixer.o \ sti_gdp.o \ sti_vid.o
drivers/gpu/drm/sti/sti_compositor.c new file +252 -0
252 lines not on this page · raw message
drivers/gpu/drm/sti/sti_compositor.h new file +90 -0
90 lines not on this page · raw message
drivers/gpu/drm/sti/sti_gdp.c +33 -0
@@ -9,6 +9,7 @@#include <linux/clk.h> #include <linux/dma-mapping.h> +#include "sti_compositor.h" #include "sti_gdp.h" #include "sti_layer.h" #include "sti_vtg.h"
@@ -182,6 +183,10 @@ static struct sti_gdp_node_list *sti_gdp_get_free_nodes(struct sti_layer *layer) (virt_nvn != gdp->node_list[i].top_field)) return &gdp->node_list[i]; +/* in hazardious cases restart with the first node */ +DRM_ERROR ("inconsistent NVN for %s: 0x%08X\n" , +sti_layer_to_str (layer), hw_nvn); + end:return &gdp->node_list[0 ]; }
@@ -215,6 +220,9 @@ struct sti_gdp_node_list *sti_gdp_get_current_nodes(struct sti_layer *layer)return &gdp->node_list[i]; end: +DRM_DEBUG_DRIVER ("Warning, NVN 0x%08X for %s does not match any node\n" , + hw_nvn,sti_layer_to_str (layer)); +return NULL ; }
@@ -235,6 +243,7 @@ static int sti_gdp_prepare_layer(struct sti_layer *layer, bool first_prepare)struct drm_display_mode *mode = layer->mode;struct device *dev = layer->dev;struct sti_gdp *gdp =to_sti_gdp (layer); +struct sti_compositor *compo =dev_get_drvdata (dev);int format;unsigned int depth, bpp;int rate = mode->clock *1000 ;
@@ -245,6 +254,9 @@ static int sti_gdp_prepare_layer(struct sti_layer *layer, bool first_prepare) top_field = list->top_field; btm_field = list->btm_field; +dev_dbg (dev,"%s %s top_node:0x%p btm_node:0x%p\n" , __func__, +sti_layer_to_str (layer), top_field, btm_field); +/* Build the top field from layer params */ top_field->gam_gdp_agc =GAM_GDP_AGC_FULL_RANGE ; top_field->gam_gdp_ctl =WAIT_NEXT_VSYNC ;
@@ -289,6 +301,14 @@ static int sti_gdp_prepare_layer(struct sti_layer *layer, bool first_prepare) layer->pitches[0 ];if (first_prepare) { +/* Register gdp callback */ +if (sti_vtg_register_client (layer->mixer_id ==STI_MIXER_MAIN ? + compo->vtg_main : compo->vtg_aux, + &gdp->vtg_field_nb, layer->mixer_id)) { +DRM_ERROR ("Cannot register VTG notifier\n" ); +return 1 ; + } +/* Set and enable gdp clock */ if (gdp->clk_pix) { res =clk_set_rate (gdp->clk_pix, rate);
@@ -333,6 +353,9 @@ static int sti_gdp_commit_layer(struct sti_layer *layer)u32 dma_updated_btm =virt_to_dma (layer->dev, updated_btm_node);struct sti_gdp_node_list *curr_list =sti_gdp_get_current_nodes (layer); +dev_dbg (layer->dev,"%s %s top/btm_node:0x%p/0x%p\n" , __func__, +sti_layer_to_str (layer), + updated_top_node, updated_btm_node);dev_dbg (layer->dev,"Current NVN:0x%X\n" ,readl (layer->regs +GAM_GDP_NVN_OFFSET )); dev_dbg(layer->dev, "Posted buff: %lx current buff: %x\n",
@@ -342,6 +365,9 @@ static int sti_gdp_commit_layer(struct sti_layer *layer)if (curr_list ==NULL ) {/* First update or invalid node should directly write in the * hw register */ +DRM_DEBUG_DRIVER ("%s first update (or invalid node)" , +sti_layer_to_str (layer)); +writel (gdp->is_curr_top == true ? dma_updated_btm : dma_updated_top, layer->regs +GAM_GDP_NVN_OFFSET );
@@ -380,6 +406,9 @@ static int sti_gdp_disable_layer(struct sti_layer *layer) {unsigned int i;struct sti_gdp *gdp =to_sti_gdp (layer); +struct sti_compositor *compo =dev_get_drvdata (layer->dev); + +DRM_DEBUG_DRIVER ("%s\n" ,sti_layer_to_str (layer));/* Set the nodes as 'to be ignored on mixer' */ for (i =0 ; i <GDP_NODE_NB_BANK ; i++) {
@@ -387,6 +416,10 @@ static int sti_gdp_disable_layer(struct sti_layer *layer) gdp->node_list[i].btm_field->gam_gdp_ppt |=GAM_GDP_PPT_IGNORE ; } +if (sti_vtg_unregister_client (layer->mixer_id ==STI_MIXER_MAIN ? + compo->vtg_main : compo->vtg_aux, &gdp->vtg_field_nb)) +DRM_DEBUG_DRIVER ("Warning: cannot unregister VTG notifier\n" ); +if (gdp->clk_pix)clk_disable_unprepare (gdp->clk_pix);
drivers/gpu/drm/sti/sti_layer.c new file +206 -0
206 lines not on this page · raw message
drivers/gpu/drm/sti/sti_mixer.c +6 -0
@@ -6,6 +6,7 @@* License terms: GNU General Public License (GPL), version 2 */ +#include "sti_compositor.h" #include "sti_mixer.h" #include "sti_vtg.h"
@@ -133,6 +134,8 @@ int sti_mixer_set_layer_depth(struct sti_mixer *mixer, struct sti_layer *layer) mask =GAM_DEPTH_MASK_ID << (3 * depth); layer_id = layer_id << (3 * depth); +DRM_DEBUG_DRIVER ("%s %s depth=%d\n" ,sti_mixer_to_str (mixer), +sti_layer_to_str (layer), depth);dev_dbg (mixer->dev,"GAM_MIXER_CRB val 0x%x mask 0x%x\n" , layer_id, mask);
@@ -195,6 +198,9 @@ int sti_mixer_set_layer_status(struct sti_mixer *mixer, {u32 mask, val; +DRM_DEBUG_DRIVER ("%s %s %s\n" , status ?"enable" :"disable" , +sti_mixer_to_str (mixer),sti_layer_to_str (layer)); + mask =sti_mixer_get_layer_mask (layer);if (!mask) {DRM_ERROR ("Can not find layer mask\n" );
Signature · 1 line
1.9.1
PATCH v5 11/11 drm: sti: Add DRM driver itself
In reply to Benjamin GaignardMake the link between all the hardware drivers and DRM/KMS interface. Create the driver itself and make it register all the sub-components. Use GEM CMA helpers for buffer allocation.
--- drivers/gpu/drm/sti/Kconfig | 8 + drivers/gpu/drm/sti/Makefile | 6 +- drivers/gpu/drm/sti/sti_compositor.c | 16 +- drivers/gpu/drm/sti/sti_drm_crtc.c | 419 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_drm_crtc.h | 21 ++ drivers/gpu/drm/sti/sti_drm_drv.c | 244 ++++++++++++++++++++ drivers/gpu/drm/sti/sti_drm_drv.h | 29 +++ drivers/gpu/drm/sti/sti_drm_plane.c | 192 ++++++++++++++++ drivers/gpu/drm/sti/sti_drm_plane.h | 17 ++ 9 files changed, 949 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.c create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.h create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.c create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.h create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.c create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.h
drivers/gpu/drm/sti/Kconfig +8 -0
@@ -1,6 +1,14 @@ config DRM_STI bool "DRM Support for STMicroelectronics SoC stiH41x Series" depends on DRM && (SOC_STIH415 || SOC_STIH416 || ARCH_MULTIPLATFORM) + select DRM_KMS_HELPER + select DRM_GEM_CMA_HELPER select DRM_KMS_CMA_HELPER help Choose this option to enable DRM on STM stiH41x chipset + +config DRM_STI_FBDEV + bool "DRM frame buffer device for STMicroelectronics SoC stiH41x Serie" + depends on DRM_STI + help + Choose this option to enable FBDEV on top of DRM for STM stiH41x chipset
drivers/gpu/drm/sti/Makefile +5 -1
@@ -7,7 +7,11 @@ obj-$(CONFIG_DRM_STI) += \ sti_hdmi_tx3g4c28phy.o \ sti_hda.o \ sti_tvout.o \ + sti_drm_crtc.o \ + sti_drm_plane.o \ + sti_hda.o \ sti_layer.o \ sti_mixer.o \ sti_gdp.o \ - sti_vid.o + sti_vid.o \ + sti_drm_drv.o
drivers/gpu/drm/sti/sti_compositor.c +14 -2
@@ -14,6 +14,9 @@#include <drm/drmP.h> #include "sti_compositor.h" +#include "sti_drm_crtc.h" +#include "sti_drm_drv.h" +#include "sti_drm_plane.h" #include "sti_gdp.h" #include "sti_vtg.h"
@@ -87,10 +90,15 @@ static int sti_compositor_bind(struct device *dev, struct device *master,struct sti_compositor *compo =dev_get_drvdata (dev);struct drm_device *drm_dev = data;unsigned int i, crtc =0 , plane =0 ; +struct sti_drm_private *dev_priv = drm_dev->dev_private; + + dev_priv->compo = compo;for (i =0 ; i < compo->nb_mixers; i++) { -if (compo->mixer[i]) +if (compo->mixer[i]) { +sti_drm_crtc_init (drm_dev, compo->mixer[i]); crtc++; + } }if (crtc ==0 ) {DRM_ERROR ("No CRTC available\n" );
@@ -108,8 +116,11 @@ static int sti_compositor_bind(struct device *dev, struct device *master,enum sti_layer_desc desc = compo->layer[i]->desc;enum sti_layer_type type = desc &STI_LAYER_TYPE_MASK ; -if ((type ==STI_GDP ) && (desc !=STI_GDP_0 )) +if ((type ==STI_GDP ) && (desc !=STI_GDP_0 )) { +sti_drm_plane_init (drm_dev, compo->layer[i], + (1 << crtc) -1 ); plane++; + } } }
@@ -159,6 +170,7 @@ static int sti_compositor_probe(struct platform_device *pdev)return -ENOMEM ; } compo->dev = dev; + compo->vtg_vblank_nb.notifier_call = sti_drm_crtc_vblank_cb;/* populate data structure depending on compatibility */ BUG_ON (!of_match_node (compositor_of_match, np)->data);
drivers/gpu/drm/sti/sti_drm_crtc.c new file +419 -0
419 lines not on this page · raw message
drivers/gpu/drm/sti/sti_drm_crtc.h new file +21 -0
@@ -0,0 +1,21 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_DRM_CRTC_H_ +#define _STI_DRM_CRTC_H_ + +#include <drm/drmP.h> + +struct sti_mixer ; + +int sti_drm_crtc_init (struct drm_device *drm_dev,struct sti_mixer *mixer); +int sti_drm_crtc_enable_vblank (struct drm_device *dev,int crtc); +void sti_drm_crtc_disable_vblank (struct drm_device *dev,int crtc); +int sti_drm_crtc_vblank_cb (struct notifier_block *nb, +unsigned long event,void *data); +bool sti_drm_crtc_is_main (struct drm_crtc *drm_crtc); + +#endif
drivers/gpu/drm/sti/sti_drm_drv.c new file +244 -0
244 lines not on this page · raw message
drivers/gpu/drm/sti/sti_drm_drv.h new file +29 -0
@@ -0,0 +1,29 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_DRM_DRV_H_ +#define _STI_DRM_DRV_H_ + +#include <drm/drmP.h> + +struct sti_compositor ; +struct sti_tvout ; + +/** +* STI drm private structure +* This structure is stored as private in the drm_device +* +* @compo: compositor +* @plane_zorder_property: z-order property for CRTC planes +* @drm_dev: drm device +*/ +struct sti_drm_private { +struct sti_compositor *compo; +struct drm_property *plane_zorder_property; +struct drm_device *drm_dev; +}; + +#endif
drivers/gpu/drm/sti/sti_drm_plane.c new file +192 -0
192 lines not on this page · raw message
drivers/gpu/drm/sti/sti_drm_plane.h new file +17 -0
@@ -0,0 +1,17 @@ +/* +* Copyright (C) STMicroelectronics SA 2014 +* Author: Benjamin Gaignard <[email protected]> for STMicroelectronics. +* License terms: GNU General Public License (GPL), version 2 +*/ + +#ifndef _STI_DRM_PLANE_H_ +#define _STI_DRM_PLANE_H_ + +#include <drm/drmP.h> + +struct sti_layer ; + +struct drm_plane *sti_drm_plane_init (struct drm_device *dev, +struct sti_layer *layer,unsigned int possible_crtcs); + +#endif
Signature · 1 line
1.9.1
Re: [PATCH v5 11/11] drm: sti: Add DRM driver itself
Quoted 27 lines · Benjamin Gaignard
Make the link between all the hardware drivers and DRM/KMS interface. Create the driver itself and make it register all the sub-components. Use GEM CMA helpers for buffer allocation.
Signed-off-by Benjamin Gaignard <[email protected]>--- drivers/gpu/drm/sti/Kconfig | 8 + drivers/gpu/drm/sti/Makefile | 6 +- drivers/gpu/drm/sti/sti_compositor.c | 16 +- drivers/gpu/drm/sti/sti_drm_crtc.c | 419 +++++++++++++++++++++++++++++++++++ drivers/gpu/drm/sti/sti_drm_crtc.h | 21 ++ drivers/gpu/drm/sti/sti_drm_drv.c | 244 ++++++++++++++++++++ drivers/gpu/drm/sti/sti_drm_drv.h | 29 +++ drivers/gpu/drm/sti/sti_drm_plane.c | 192 ++++++++++++++++ drivers/gpu/drm/sti/sti_drm_plane.h | 17 ++ 9 files changed, 949 insertions(+), 3 deletions(-) create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.c create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.h create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.c create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.h create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.c create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.hdrivers/gpu/drm/sti/Kconfig +0
-0
[snip]
drivers/gpu/drm/sti/Kconfig
Quoted 6 lines
drivers/gpu/drm/sti/Kconfig +6
-0+int sti_drm_crtc_init(struct drm_device *drm_dev, struct sti_mixer *mixer) +{ + struct drm_crtc *crtc = &mixer->drm_crtc; + int res; + + res = drm_crtc_init(drm_dev, crtc, &sti_crtc_funcs);
We now have universal planes where the primary plane is no longer part of the crtc, but cut out as a separate plane. In 3.17 this is enabled so userspace can use it, so I think new drivers should be converted to this from the go.
It looks like your platform already has universal planes on the hw side, so removing that fake disdinction for primary planes should help quite a bit.
-Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
BR,
-R
Quoted 207 lines · Benjamin Gaignard
This series of patches add the support of DRM/KMS drivers for STMicroelectronics chipsets stih416 and stih407.
version 5:
- Reworksti_drm_drvprobes functions to support deferred probe. This allow hdmi to delayed framebuffer creation until I2C is available.
- Add ops functsions insti_layerstructure to simpify GDP and VID code.
- Add NOTES file to describe how the DRM concepts are mapped on hardware.patches could be found here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v5version 4:
- Remove depency between TVout it subdevices HDMI and HDA
- Rework and simplify VTG and VTAC code
- Fix numbers of typo and indentation
- Remove debug (will be push in separate patches)
- Fix remarks done in previous patchesetpatches could be found here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v4version 3:
- Correctly split code between probe and bind funtions
- Squash some commits
- remove HQ-VDP device code to have a smaller patcheset, we will introduce it later.patches could be found here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v3version 2:
- Use componentized device instead of register sub-devices in master driver probe function
- FixMakefileandKconfigto only allow built-in compilationpatches could be found here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on branch: drm_kms_for_next-v2version 1:
- First path submissionHardware is split in two main blocks: Compositor and TVout. Each of them includes specific hardware IPs and the display timing are controlled by a specific Video Timing Generator hardware IP (VTG).
Compositor is made of the follow hardware IPs:
- GDP (Generic Display Pipeline) which is an entry point for graphic (RGB) buffers
- VDP (Video Diplay Pipeline) which is an entry point for video (YUV) buffers
- HQVDP (High Quality Video Display Processor) that supports scaling, deinterlacing and some miscellaneous image quality improvements. It fetches the Video decoded buffers from memory, processes them and pushes them to the Compositor through a HW dedicated bus.
- Mixer is responsible of mixing all the entries depending of their respective z-order and layoutTVout is divided in 3 parts:
- HDMI to generate HDMI signals, depending of chipset version HDMI phy can change.
- HDA to generate signals for HD analog TV
- VIP to control/switch data path coming from CompositorOn stih416 compositor and Tvout are on different dies so a Video Trafic Advance inter-die Communication mechanism (VTAC) is needed.
+---------------------------------------------+ +----------------------------------------+ | +-------------------------------+ +----+ | | +----+ +--------------------------+ | | | | | | | | | | | +---------+ +----+ | | | | +----+ +------+ | | | | | | | | | VIP |---->|HDMI| | | | | |GPD +------------->| | | | | | | | | | | | +----+ | | | | +----+ |Mixer |--|-->| | | | | |---|->| switcher| | | | | | | | | | | | | | | | | +----+ | | | | | | | | | | | | | | | |---->|HDA | | | | | +------+ | |VTAC|========>|VTAC| | +---------+ +----+ | | | | | | | | | | | | | | | | Compositor | | | | | | | | TVout | | | +-------------------------------+ | | | | | | +--------------------------+ | | ^ | | | | | | ^ | | | | | | | | | | | | +--------------+ | | | | | | +-------------+ | | | VTG (master) |----->| | | | | |----->| VTG (slave) | | | +--------------+ +----+ | | +----+ +-------------+ | |Digital die | | Analog Die| +---------------------------------------------+ +----------------------------------------+On stih407 Compositor and Tvout are on the same die
+-----------------------------------------------------------------+ | +-------------------------------+ +--------------------------+ | | | | | +---------+ +----+ | | | | +----+ +------+ | | | VIP |---->|HDMI| | | | | |GPD +------------->| | | | | | +----+ | | | | +----+ |Mixer |--|--|->| switcher| | | | | +----+ +-----+ | | | | | | +----+ | | | | |VDP +-->+HQVDP+--->| | | | | |---->|HDA | | | | | +----+ +-----+ +------+ | | +---------+ +----+ | | | | | | | | | | Compositor | | TVout | | | +-------------------------------+ +--------------------------+ | | ^ ^ | | | | | | +--------------+ | | | VTG | | | +--------------+ | |Digital die | +-----------------------------------------------------------------+In addition of the drivers for the IPs listed before a thin I2C driver (hdmiddc) is used by HDMI driver to retrieve EDID for monitor.
To unify interfaces of GDP and VDP we create a "layer" interface called by compositor to control both GPD and VDP.
Hardware have memory contraints (alignment, contiguous) so we use CMA drm helpers functions to allocate frame buffer.
File naming convention is:
- sti_* for IPs drivers
- sti_drm_* for drm functions implementation.Benjamin Gaignard (11):
drm: sti: add bindings for DRM driver
drm: sti: add VTG driver
drm: sti: add VTAC drivers
drm: sti: add HDMI driver
drm: sti: add HDA driver
drm: sti: add TVOut driver
drm: sti: add GDP layer
drm: sti: add VID layer
drm: sti: add Mixer
drm: sti: add Compositor
drm: sti: Add DRM driver itself.../devicetree/bindings/gpu/st,stih4xx.txt | 189 +++++ drivers/gpu/drm/Kconfig | 2 + drivers/gpu/drm/Makefile | 1 + drivers/gpu/drm/sti/Kconfig | 14 + drivers/gpu/drm/sti/Makefile | 17 + drivers/gpu/drm/sti/NOTES | 58 ++ drivers/gpu/drm/sti/sti_compositor.c | 264 +++++++ drivers/gpu/drm/sti/sti_compositor.h | 90 +++ drivers/gpu/drm/sti/sti_drm_crtc.c | 419 +++++++++++ drivers/gpu/drm/sti/sti_drm_crtc.h | 21 + drivers/gpu/drm/sti/sti_drm_drv.c | 244 +++++++ drivers/gpu/drm/sti/sti_drm_drv.h | 29 + drivers/gpu/drm/sti/sti_drm_plane.c | 192 +++++ drivers/gpu/drm/sti/sti_drm_plane.h | 17 + drivers/gpu/drm/sti/sti_gdp.c | 549 ++++++++++++++ drivers/gpu/drm/sti/sti_gdp.h | 16 + drivers/gpu/drm/sti/sti_hda.c | 790 ++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi.c | 808 +++++++++++++++++++++ drivers/gpu/drm/sti/sti_hdmi.h | 88 +++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c | 336 +++++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h | 14 + drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c | 211 ++++++ drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h | 14 + drivers/gpu/drm/sti/sti_layer.c | 206 ++++++ drivers/gpu/drm/sti/sti_layer.h | 125 ++++ drivers/gpu/drm/sti/sti_mixer.c | 249 +++++++ drivers/gpu/drm/sti/sti_mixer.h | 54 ++ drivers/gpu/drm/sti/sti_tvout.c | 657 +++++++++++++++++ drivers/gpu/drm/sti/sti_vid.c | 138 ++++ drivers/gpu/drm/sti/sti_vid.h | 12 + drivers/gpu/drm/sti/sti_vtac.c | 211 ++++++ drivers/gpu/drm/sti/sti_vtg.c | 356 +++++++++ drivers/gpu/drm/sti/sti_vtg.h | 28 + 33 files changed, 6419 insertions(+) create mode 100644 Documentation/devicetree/bindings/gpu/st,stih4xx.txt create mode 100644 drivers/gpu/drm/sti/Kconfig create mode 100644 drivers/gpu/drm/sti/Makefile create mode 100644 drivers/gpu/drm/sti/NOTES create mode 100644 drivers/gpu/drm/sti/sti_compositor.c create mode 100644 drivers/gpu/drm/sti/sti_compositor.h create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.c create mode 100644 drivers/gpu/drm/sti/sti_drm_crtc.h create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.c create mode 100644 drivers/gpu/drm/sti/sti_drm_drv.h create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.c create mode 100644 drivers/gpu/drm/sti/sti_drm_plane.h create mode 100644 drivers/gpu/drm/sti/sti_gdp.c create mode 100644 drivers/gpu/drm/sti/sti_gdp.h create mode 100644 drivers/gpu/drm/sti/sti_hda.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g0c55phy.h create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.c create mode 100644 drivers/gpu/drm/sti/sti_hdmi_tx3g4c28phy.h create mode 100644 drivers/gpu/drm/sti/sti_layer.c create mode 100644 drivers/gpu/drm/sti/sti_layer.h create mode 100644 drivers/gpu/drm/sti/sti_mixer.c create mode 100644 drivers/gpu/drm/sti/sti_mixer.h create mode 100644 drivers/gpu/drm/sti/sti_tvout.c create mode 100644 drivers/gpu/drm/sti/sti_vid.c create mode 100644 drivers/gpu/drm/sti/sti_vid.h create mode 100644 drivers/gpu/drm/sti/sti_vtac.c create mode 100644 drivers/gpu/drm/sti/sti_vtg.c create mode 100644 drivers/gpu/drm/sti/sti_vtg.h--
1.9.1_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling component_master_add(), passing it into that function.
It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the of_graph stuff, which is a bit of a shame because I've sent a RFC patch adding drivers/gpu/drm/drm_of.c to provide a helper which encoders can use to get the CRTC mask from an of_graph representation.
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Quoted 11 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
More on this... just found it in the series.
It looks fine, and I expect that the update would be trivial:
- the body of sti_drm_add_components() moves into sti_drm_master_probe() and sti_drm_add_components() is removed.
- component_master_add_child() is updated to call component_match_add()
- component_master_add() is updated to call component_master_add_with_match() instead.
So I don't think there's any problem here.
Signature · 2 lines
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Quoted 29 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling
component_master_add(), passing it into that function.It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
Quoted 5 lines
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the
of_graphstuff, which is a bit of a shame because I've sent a RFC patch addingdrivers/gpu/drm/drm_of.cto provide a helper which encoders can use to get the CRTC mask from anof_graphrepresentation.
which reminds me, I need to have a look at the drm_of stuff..
Quoted 4 lines
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
If it simplifies merge-order stuff, I'd be ok with a follow-up patch that converts over (assuming it shouldn't have an impact on the DT bindings, which I'm only assuming it should not..)
Probably it would be a good idea if Benjamin at least had a patch ready to go to convert over which could be merged right after your stuff hits drm-next.
BR,
-R
Quoted 3 lines
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Rob, Russel,
What I can do is to rebase my driver on driver-core-next branch from Greg tree (git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git).
Does that could help ?
Regards,
Benjamin
2014-07-03 23:59 GMT+02:00 Rob Clark <[email protected]>:
Quoted 58 lines
Quoted 29 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling
component_master_add(), passing it into that function.It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
Quoted 5 lines
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the
of_graphstuff, which is a bit of a shame because I've sent a RFC patch addingdrivers/gpu/drm/drm_of.cto provide a helper which encoders can use to get the CRTC mask from anof_graphrepresentation.which reminds me, I need to have a look at the
drm_ofstuff..Quoted 4 lines
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
If it simplifies merge-order stuff, I'd be ok with a follow-up patch that converts over (assuming it shouldn't have an impact on the DT bindings, which I'm only assuming it should not..)
Probably it would be a good idea if Benjamin at least had a patch ready to go to convert over which could be merged right after your stuff hits drm-next.
BR,
-RQuoted 3 lines
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi,
I have following Russel advice to rebase my patches on top of the new component helpers API.
A new branch "drm_kms_for_next-v6" is available heregit://git.linaro.org/people/benjamin.gaignard/kernel.git
Regards,
Benjamin
2014-07-04 10:39 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 81 lines
Rob, Russel,
What I can do is to rebase my driver on driver-core-next branch from Greg tree (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git).Does that could help ?
Regards,
Benjamin2014-07-03 23:59 GMT+02:00 Rob Clark <[email protected]>:
Quoted 48 lines
Quoted 29 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling
component_master_add(), passing it into that function.It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
Quoted 5 lines
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the
of_graphstuff, which is a bit of a shame because I've sent a RFC patch addingdrivers/gpu/drm/drm_of.cto provide a helper which encoders can use to get the CRTC mask from anof_graphrepresentation.which reminds me, I need to have a look at the
drm_ofstuff..Quoted 4 lines
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
If it simplifies merge-order stuff, I'd be ok with a follow-up patch that converts over (assuming it shouldn't have an impact on the DT bindings, which I'm only assuming it should not..)
Quoted 10 lines
Probably it would be a good idea if Benjamin at least had a patch ready to go to convert over which could be merged right after your stuff hits drm-next.
BR,
-RQuoted 3 lines
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Hi all,
Does version 6 fit to all your expectations ? If yes will you consider to merge it into drm-next ? If no, please tell me what need to be fixed.
Regards,
Benjamin
2014-07-04 15:54 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 105 lines
Hi,
I have following Russel advice to rebase my patches on top of the new component helpers API.
A new branch "drm_kms_for_next-v6" is available here
git://git.linaro.org/people/benjamin.gaignard/kernel.gitRegards,
Benjamin2014-07-04 10:39 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 73 lines
Rob, Russel,
What I can do is to rebase my driver on driver-core-next branch from Greg tree (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git).Does that could help ?
Regards,
Benjamin2014-07-03 23:59 GMT+02:00 Rob Clark <[email protected]>:
Quoted 48 lines
Quoted 29 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling
component_master_add(), passing it into that function.It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
Quoted 5 lines
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the
of_graphstuff, which is a bit of a shame because I've sent a RFC patch addingdrivers/gpu/drm/drm_of.cto provide a helper which encoders can use to get the CRTC mask from anof_graphrepresentation.which reminds me, I need to have a look at the
drm_ofstuff..Quoted 4 lines
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
If it simplifies merge-order stuff, I'd be ok with a follow-up patch that converts over (assuming it shouldn't have an impact on the DT bindings, which I'm only assuming it should not..)
Quoted 10 lines
Probably it would be a good idea if Benjamin at least had a patch ready to go to convert over which could be merged right after your stuff hits drm-next.
BR,
-RQuoted 3 lines
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.Quoted 8 lines
--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Rob Clark
Reviewed-byQuoted 5 lines · Benjamin Gaignard
Hi all,
Does version 6 fit to all your expectations ? If yes will you consider to merge it into drm-next ? If no, please tell me what need to be fixed.
I had another pass over the driver, and didn't find anything to complain about, so for the series:
Quoted 113 lines
Regards,
Benjamin2014-07-04 15:54 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 97 lines
Hi,
I have following Russel advice to rebase my patches on top of the new component helpers API.
A new branch "drm_kms_for_next-v6" is available here
git://git.linaro.org/people/benjamin.gaignard/kernel.gitRegards,
Benjamin2014-07-04 10:39 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 73 lines
Rob, Russel,
What I can do is to rebase my driver on driver-core-next branch from Greg tree (
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git).Does that could help ?
Regards,
Benjamin2014-07-03 23:59 GMT+02:00 Rob Clark <[email protected]>:
Quoted 48 lines
Quoted 29 lines · Russell King - ARM Linux
Quoted 6 lines · Rob Clark
Quoted 1 line
From a brief look, it looks like my comments have been addressed, so I
think this is starting to shape up..
Laurent/Thierry/Russell, I don't suppose any of you are likely to have time before 3.17 merge window to give sti one last once-over to see what I missed ;-)
As this appears to be using the component helpers, it would be good for the author to be pre-warned about the change to the API. I'm going to be doing this as a two step thing.
The first stage of it has just been taken by Greg this evening. This retires old behaviour that was needed for the initial versions of imx-drm, and fixes a bug. More importantly, it introduces a new interface where you build the list of expected components before calling
component_master_add(), passing it into that function.It is slightly less flexible from the driver writer's view point, but allows us to do more in the component helper, and support some features that others would like to see (such as being able to add additional optional components after the initial bind (that's not much interest to DRM though.)
This should make the v3.17 merge window. I'm hoping that by forewarning about the change, that people can be aware of it and have patches prepared for v3.18 (or maybe even v3.17) to convert over to it, so we can get rid of the older interface before we get too many users of it.
Quoted 5 lines
I've just peeked at the binding document in the first patch. I notice that it isn't making use of the
of_graphstuff, which is a bit of a shame because I've sent a RFC patch addingdrivers/gpu/drm/drm_of.cto provide a helper which encoders can use to get the CRTC mask from anof_graphrepresentation.which reminds me, I need to have a look at the
drm_ofstuff..Quoted 4 lines
I'm using this not only for imx-drm, but also for tda998x - and that's where the problems are likely to start if we end up with different DRM implementations doing different solutions to the connectivity problem.
If it simplifies merge-order stuff, I'd be ok with a follow-up patch that converts over (assuming it shouldn't have an impact on the DT bindings, which I'm only assuming it should not..)
Quoted 10 lines
Probably it would be a good idea if Benjamin at least had a patch ready to go to convert over which could be merged right after your stuff hits drm-next.
BR,
-RQuoted 3 lines
--
FTTC broadband for 0.8mile line: now at 9.7Mbps down 460kbps up... slowly improving, and getting towards what was expected from it.Quoted 8 lines
--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Quoted 8 lines
--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Quoted 8 lines
--
Benjamin GaignardGraphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
Dave Airlie
maintainerQuoted 9 lines · Rob Clark
Quoted 5 lines · Benjamin Gaignard
Hi all,
Does version 6 fit to all your expectations ? If yes will you consider to merge it into drm-next ? If no, please tell me what need to be fixed.
Quoted 4 lines
I had another pass over the driver, and didn't find anything to complain about, so for the series:
Reviewed-by Rob Clark <[email protected]>
Can I see a git tree of this with Rob's R-B on it?
based off drm-next if possible,
I'd like to do a quick pre-merge review of it, but I usually don't find anything too major.
Dave.
Hello Dave,
You can found the patcheset with Rob's reviewed-by tag here:git://git.linaro.org/people/benjamin.gaignard/kernel.git
on drm_kms_for_next-v7 branch
It is the same code (drm_kms_for_next-v6) than what Rob has reviewed, rebased (and tested) on top of drm-next.
The only changes are clocks typo (upper to lower case) in binding documentation.
Regards,
Benjamin
2014-07-28 1:23 GMT+02:00 Dave Airlie <[email protected]>:
Quoted 23 lines · Rob Clark
Quoted 9 lines
Quoted 5 lines · Benjamin Gaignard
Hi all,
Does version 6 fit to all your expectations ? If yes will you consider to merge it into drm-next ? If no, please tell me what need to be fixed.
Quoted 4 lines
I had another pass over the driver, and didn't find anything to complain about, so for the series:
Reviewed-by Rob Clark <[email protected]>Can I see a git tree of this with Rob's R-B on it?
based off drm-next if possible,
I'd like to do a quick pre-merge review of it, but I usually don't find anything too major.
Dave.
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Dave Airlie
maintainerQuoted 9 lines · Benjamin Gaignard
Hello Dave,
You can found the patcheset with Rob's reviewed-by tag here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on drm_kms_for_next-v7 branchIt is the same code (drm_kms_for_next-v6) than what Rob has reviewed, rebased (and tested) on top of drm-next.
The only changes are clocks typo (upper to lower case) in binding documentation.
Any reason this can't be built as a module?
Since distros really don't want to have to build in graphics drivers, and it makes
my test builds more annoying.
Dave.
Quoted 13 lines · Dave Airlie
Quoted 9 lines · On 28 July 2014 18:37, Benjamin Gaignard <[email protected]…
Hello Dave,
You can found the patcheset with Rob's reviewed-by tag here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on drm_kms_for_next-v7 branchIt is the same code (drm_kms_for_next-v6) than what Rob has reviewed, rebased (and tested) on top of drm-next.
The only changes are clocks typo (upper to lower case) in bindingdocumentation.
Quoted 8 lines
Any reason this can't be built as a module?
Since distros really don't want to have to build in graphics drivers, and it makes
my test builds more annoying.Dave.
No specific reason but I haven't test it as a module.
Signature · 9 lines
Benjamin Gaignard Graphic Working Group Linaro.org <http://www.linaro.org/> *│ *Open source software for ARM SoCs Follow *Linaro: *Facebook <http://www.facebook.com/pages/Linaro> | Twitter <http://twitter.com/#!/linaroorg> | Blog <http://www.linaro.org/linaro-blog/>
_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel
I have push two additional patches on drm_kms_for_next-v7 branch to make the driver build as a module:
- "gpu: drm: export drm_sysfs_connector_{add,remove} function"
- "drm: sti: Allow driver to be built as module"
I have tested the both configuration (built-in and module), it is ok on my hardware.
Regards,
Benjamin
2014-07-30 8:46 GMT+02:00 Benjamin Gaignard <[email protected]>:
Quoted 40 lines · Dave Airlie
Quoted 14 lines
Quoted 10 lines · Benjamin Gaignard
Hello Dave,
You can found the patcheset with Rob's reviewed-by tag here:
git://git.linaro.org/people/benjamin.gaignard/kernel.git
on drm_kms_for_next-v7 branchIt is the same code (drm_kms_for_next-v6) than what Rob has reviewed, rebased (and tested) on top of drm-next.
The only changes are clocks typo (upper to lower case) in binding documentation.Quoted 7 lines
Any reason this can't be built as a module?
Since distros really don't want to have to build in graphics drivers, and it makes
my test builds more annoying.Dave.
No specific reason but I haven't test it as a module.
--
Benjamin Gaignard
Graphic Working Group
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
Signature · 11 lines
Benjamin Gaignard Graphic Working Group Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Quoted 3 lines · Benjamin Gaignard
I have push two additional patches on drm_kms_for_next-v7 branch to make the driver build as a module:
- "gpu: drm: export drm_sysfs_connector_{add,remove} function"
Nope, you're using the wrong functions. Instead you should use drm_connector_register/unregister. Please don't just export randome functions without digging into the history a bit. -Daniel
Signature · 3 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch