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

Commit 731d7545 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'drm-sti-next-2014-12-11' of...

Merge branch 'drm-sti-next-2014-12-11' of http://git.linaro.org/people/benjamin.gaignard/kernel into drm-next

This series of patches fix various issues in STI drm driver.
Now HDMI i2c adapter could be selected in device tree
and plug detection doesn't use gpio anymore.
I also had fix some signal timing problems after testing the driver
on more hardware.
The remaining patches attemps to simplify the code and prepare
the next evolutions like DVO and auxiliary CRTC support

* 'drm-sti-next-2014-12-11' of http://git.linaro.org/people/benjamin.gaignard/kernel:
  drm: sti: correctly cleanup CRTC and planes
  drm: sti: add HQVDP plane
  drm: sti: add cursor plane
  drm: sti: enable auxiliary CRTC
  drm: sti: fix delay in VTG programming
  drm: sti: prepare sti_tvout to support auxiliary crtc
  drm: sti: use drm_crtc_vblank_{on/off} instead of drm_vblank_{on/off}
  drm: sti: fix hdmi avi infoframe
  drm: sti: remove event lock while disabling vblank
  drm: sti: simplify gdp code
  drm: sti: clear all mixer control
  drm: sti: remove gpio for HDMI hot plug detection
  drm: sti: allow to change hdmi ddc i2c adapter
parents b59f7822 f78e772a
Loading
Loading
Loading
Loading
+27 −2
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ STMicroelectronics stih4xx platforms
    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.
  - ddc: phandle of an I2C controller used for DDC EDID probing

sti-hda:
  Required properties:
@@ -83,6 +83,22 @@ sti-hda:
  - clock-names: names of the clocks listed in clocks property in the same
    order.

sti-hqvdp:
  must be a child of sti-display-subsystem
  Required properties:
  - compatible: "st,stih<chip>-hqvdp"
  - 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 on vtg main device node.

Example:

/ {
@@ -173,7 +189,6 @@ Example:
				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 {
@@ -184,6 +199,16 @@ Example:
				clocks          = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>;
			};
		};

		sti-hqvdp@9c000000 {
				compatible	= "st,stih407-hqvdp";
				reg		= <0x9C00000 0x100000>;
				clock-names	= "hqvdp", "pix_main";
				clocks		= <&clk_s_c0_flexgen CLK_MAIN_DISP>, <&clk_s_d2_flexgen CLK_PIX_MAIN_DISP>;
				reset-names     = "hqvdp";
				resets          = <&softreset STIH407_HDQVDP_SOFTRESET>;
				st,vtg		= <&vtg_main>;
			};
	};
	...
};
+1 −0
Original line number Diff line number Diff line
@@ -5,6 +5,7 @@ config DRM_STI
	select DRM_KMS_HELPER
	select DRM_GEM_CMA_HELPER
	select DRM_KMS_CMA_HELPER
	select FW_LOADER_USER_HELPER_FALLBACK
	help
	  Choose this option to enable DRM on STM stiH41x chipset

+3 −1
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@ sticompositor-y := \
	sti_mixer.o \
	sti_gdp.o \
	sti_vid.o \
	sti_cursor.o \
	sti_compositor.o \
	sti_drm_crtc.o \
	sti_drm_plane.o
@@ -18,4 +19,5 @@ obj-$(CONFIG_DRM_STI) = \
	sti_hda.o \
	sti_tvout.o \
	sticompositor.o \
	sti_hqvdp.o \
	sti_drm_drv.o
+12 −8
Original line number Diff line number Diff line
@@ -24,14 +24,16 @@
 * stiH407 compositor properties
 */
struct sti_compositor_data stih407_compositor_data = {
	.nb_subdev = 6,
	.nb_subdev = 8,
	.subdev_desc = {
			{STI_CURSOR_SUBDEV, (int)STI_CURSOR, 0x000},
			{STI_GPD_SUBDEV, (int)STI_GDP_0, 0x100},
			{STI_GPD_SUBDEV, (int)STI_GDP_1, 0x200},
			{STI_GPD_SUBDEV, (int)STI_GDP_2, 0x300},
			{STI_GPD_SUBDEV, (int)STI_GDP_3, 0x400},
			{STI_VID_SUBDEV, (int)STI_VID_0, 0x700},
			{STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00}
			{STI_MIXER_MAIN_SUBDEV, STI_MIXER_MAIN, 0xC00},
			{STI_MIXER_AUX_SUBDEV, STI_MIXER_AUX, 0xD00},
	},
};

@@ -67,11 +69,11 @@ static int sti_compositor_init_subdev(struct sti_compositor *compo,
			break;
		case STI_GPD_SUBDEV:
		case STI_VID_SUBDEV:
		case STI_CURSOR_SUBDEV:
			compo->layer[layer_id++] =
			    sti_layer_create(compo->dev, desc[i].id,
					     compo->regs + desc[i].offset);
			break;
			/* case STI_CURSOR_SUBDEV : TODO */
		default:
			DRM_ERROR("Unknow subdev compoment type\n");
			return 1;
@@ -102,33 +104,35 @@ static int sti_compositor_bind(struct device *dev, struct device *master,
			enum sti_layer_type type = desc & STI_LAYER_TYPE_MASK;
			enum drm_plane_type plane_type = DRM_PLANE_TYPE_OVERLAY;

			if (compo->mixer[crtc])
			if (crtc < compo->nb_mixers)
				plane_type = DRM_PLANE_TYPE_PRIMARY;

			switch (type) {
			case STI_CUR:
				cursor = sti_drm_plane_init(drm_dev,
						compo->layer[i],
						(1 << crtc) - 1,
						DRM_PLANE_TYPE_CURSOR);
						1, DRM_PLANE_TYPE_CURSOR);
				break;
			case STI_GDP:
			case STI_VID:
				primary = sti_drm_plane_init(drm_dev,
						compo->layer[i],
						(1 << crtc) - 1, plane_type);
						(1 << compo->nb_mixers) - 1,
						plane_type);
				plane++;
				break;
			case STI_BCK:
			case STI_VDP:
				break;
			}

			/* The first planes are reserved for primary planes*/
			if (compo->mixer[crtc]) {
			if (crtc < compo->nb_mixers && primary) {
				sti_drm_crtc_init(drm_dev, compo->mixer[crtc],
						primary, cursor);
				crtc++;
				cursor = NULL;
				primary = NULL;
			}
		}
	}
+0 −2
Original line number Diff line number Diff line
@@ -64,7 +64,6 @@ struct sti_compositor_data {
 * @layer: array of layers
 * @nb_mixers: number of mixers for this compositor
 * @nb_layers: number of layers (GDP,VID,...) for this compositor
 * @enable: true if compositor is enable else false
 * @vtg_vblank_nb: callback for VTG VSYNC notification
 */
struct sti_compositor {
@@ -83,7 +82,6 @@ struct sti_compositor {
	struct sti_layer *layer[STI_MAX_LAYER];
	int nb_mixers;
	int nb_layers;
	bool enable;
	struct notifier_block vtg_vblank_nb;
};

Loading