Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1f43710a authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux into drm-next



This pull request introduces the vc4 driver, for kernel modesetting on
the Raspberry Pi (bcm2835/bcm2836 architectures).  It currently
supports a display plane and cursor on the HDMI output.  The driver
doesn't do 3D, power management, or overlay planes yet.

[airlied: fixup the enable/disable vblank APIs]

Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>

* tag 'drm-vc4-next-2015-10-21' of http://github.com/anholt/linux:
  drm/vc4: Allow vblank to be disabled
  drm/vc4: Use the fbdev_cma helpers
  drm/vc4: Add KMS support for Raspberry Pi.
  drm/vc4: Add devicetree bindings for VC4.
parents affa0e03 98a44504
Loading
Loading
Loading
Loading
+65 −0
Original line number Diff line number Diff line
Broadcom VC4 (VideoCore4) GPU

The VC4 device present on the Raspberry Pi includes a display system
with HDMI output and the HVS (Hardware Video Scaler) for compositing
display planes.

Required properties for VC4:
- compatible:	Should be "brcm,bcm2835-vc4"

Required properties for Pixel Valve:
- compatible:	Should be one of "brcm,bcm2835-pixelvalve0",
		  "brcm,bcm2835-pixelvalve1", or "brcm,bcm2835-pixelvalve2"
- reg:		Physical base address and length of the PV's registers
- interrupts:	The interrupt number
		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt

Required properties for HVS:
- compatible:	Should be "brcm,bcm2835-hvs"
- reg:		Physical base address and length of the HVS's registers
- interrupts:	The interrupt number
		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt

Required properties for HDMI
- compatible:	Should be "brcm,bcm2835-hdmi"
- reg:		Physical base address and length of the two register ranges
		  ("HDMI" and "HD", in that order)
- interrupts:	The interrupt numbers
		  See bindings/interrupt-controller/brcm,bcm2835-armctrl-ic.txt
- ddc:		phandle of the I2C controller used for DDC EDID probing
- clocks:	a) hdmi: The HDMI state machine clock
		b) pixel: The pixel clock.

Optional properties for HDMI:
- hpd-gpios:	The GPIO pin for HDMI hotplug detect (if it doesn't appear
		  as an interrupt/status bit in the HDMI controller
		  itself).  See bindings/pinctrl/brcm,bcm2835-gpio.txt

Example:
pixelvalve@7e807000 {
	compatible = "brcm,bcm2835-pixelvalve2";
	reg = <0x7e807000 0x100>;
	interrupts = <2 10>; /* pixelvalve */
};

hvs@7e400000 {
	compatible = "brcm,bcm2835-hvs";
	reg = <0x7e400000 0x6000>;
	interrupts = <2 1>;
};

hdmi: hdmi@7e902000 {
	compatible = "brcm,bcm2835-hdmi";
	reg = <0x7e902000 0x600>,
	      <0x7e808000 0x100>;
	interrupts = <2 8>, <2 9>;
	ddc = <&i2c2>;
	hpd-gpios = <&gpio 46 GPIO_ACTIVE_HIGH>;
	clocks = <&clocks BCM2835_PLLH_PIX>,
		 <&clocks BCM2835_CLOCK_HSM>;
	clock-names = "pixel", "hdmi";
};

vc4: gpu {
	compatible = "brcm,bcm2835-vc4";
};
+2 −0
Original line number Diff line number Diff line
@@ -264,3 +264,5 @@ source "drivers/gpu/drm/sti/Kconfig"
source "drivers/gpu/drm/amd/amdkfd/Kconfig"

source "drivers/gpu/drm/imx/Kconfig"

source "drivers/gpu/drm/vc4/Kconfig"
+1 −0
Original line number Diff line number Diff line
@@ -45,6 +45,7 @@ obj-$(CONFIG_DRM_MGA) += mga/
obj-$(CONFIG_DRM_I810)	+= i810/
obj-$(CONFIG_DRM_I915)  += i915/
obj-$(CONFIG_DRM_MGAG200) += mgag200/
obj-$(CONFIG_DRM_VC4)  += vc4/
obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus/
obj-$(CONFIG_DRM_SIS)   += sis/
obj-$(CONFIG_DRM_SAVAGE)+= savage/
+13 −0
Original line number Diff line number Diff line
config DRM_VC4
	tristate "Broadcom VC4 Graphics"
	depends on ARCH_BCM2835 || COMPILE_TEST
	depends on DRM
	select DRM_KMS_HELPER
	select DRM_KMS_CMA_HELPER
	help
	  Choose this option if you have a system that has a Broadcom
	  VC4 GPU, such as the Raspberry Pi or other BCM2708/BCM2835.

	  This driver requires that "avoid_warnings=2" be present in
	  the config.txt for the firmware, to keep it from smashing
	  our display setup.
+17 −0
Original line number Diff line number Diff line
ccflags-y := -Iinclude/drm

# Please keep these build lists sorted!

# core driver code
vc4-y := \
	vc4_bo.o \
	vc4_crtc.o \
	vc4_drv.o \
	vc4_kms.o \
	vc4_hdmi.o \
	vc4_hvs.o \
	vc4_plane.o

vc4-$(CONFIG_DEBUG_FS) += vc4_debugfs.o

obj-$(CONFIG_DRM_VC4)  += vc4.o
Loading