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

Commit 4fdbc678 authored by Benjamin Gaignard's avatar Benjamin Gaignard
Browse files

drm: sti: add HQVDP plane



High Quality Video Data Plane is hardware IP dedicated
to video rendering. Compare to GPD (graphic planes) it
have better scaler capabilities.

HQVDP use VID layer to push data into hardware compositor
without going into DDR. From data flow point of view HQVDP
and VID are nested so HQVPD update/disable VID.

Signed-off-by: default avatarBenjamin Gaignard <benjamin.gaignard@linaro.org>
parent 96006a77
Loading
Loading
Loading
Loading
+26 −0
Original line number Original line Diff line number Diff line
@@ -83,6 +83,22 @@ sti-hda:
  - clock-names: names of the clocks listed in clocks property in the same
  - clock-names: names of the clocks listed in clocks property in the same
    order.
    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:
Example:


/ {
/ {
@@ -183,6 +199,16 @@ Example:
				clocks          = <&clockgen_c_vcc CLK_S_PIX_HD>, <&clockgen_c_vcc CLK_S_HDDAC>;
				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 Original line Diff line number Diff line
@@ -5,6 +5,7 @@ config DRM_STI
	select DRM_KMS_HELPER
	select DRM_KMS_HELPER
	select DRM_GEM_CMA_HELPER
	select DRM_GEM_CMA_HELPER
	select DRM_KMS_CMA_HELPER
	select DRM_KMS_CMA_HELPER
	select FW_LOADER_USER_HELPER_FALLBACK
	help
	help
	  Choose this option to enable DRM on STM stiH41x chipset
	  Choose this option to enable DRM on STM stiH41x chipset


+2 −1
Original line number Original line Diff line number Diff line
@@ -19,4 +19,5 @@ obj-$(CONFIG_DRM_STI) = \
	sti_hda.o \
	sti_hda.o \
	sti_tvout.o \
	sti_tvout.o \
	sticompositor.o \
	sticompositor.o \
	sti_hqvdp.o \
	sti_drm_drv.o
	sti_drm_drv.o
+1 −0
Original line number Original line Diff line number Diff line
@@ -122,6 +122,7 @@ static int sti_compositor_bind(struct device *dev, struct device *master,
				plane++;
				plane++;
				break;
				break;
			case STI_BCK:
			case STI_BCK:
			case STI_VDP:
				break;
				break;
			}
			}


+4 −2
Original line number Original line Diff line number Diff line
@@ -148,7 +148,8 @@ sti_drm_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *mode,
	w = crtc->primary->fb->width - x;
	w = crtc->primary->fb->width - x;
	h = crtc->primary->fb->height - y;
	h = crtc->primary->fb->height - y;


	return sti_layer_prepare(layer, crtc->primary->fb, &crtc->mode,
	return sti_layer_prepare(layer, crtc,
			crtc->primary->fb, &crtc->mode,
			mixer->id, 0, 0, w, h, x, y, w, h);
			mixer->id, 0, 0, w, h, x, y, w, h);
}
}


@@ -175,7 +176,8 @@ static int sti_drm_crtc_mode_set_base(struct drm_crtc *crtc, int x, int y,
	w = crtc->primary->fb->width - crtc->x;
	w = crtc->primary->fb->width - crtc->x;
	h = crtc->primary->fb->height - crtc->y;
	h = crtc->primary->fb->height - crtc->y;


	ret = sti_layer_prepare(layer, crtc->primary->fb, &crtc->mode,
	ret = sti_layer_prepare(layer, crtc,
				crtc->primary->fb, &crtc->mode,
				mixer->id, 0, 0, w, h,
				mixer->id, 0, 0, w, h,
				crtc->x, crtc->y, w, h);
				crtc->x, crtc->y, w, h);
	if (ret) {
	if (ret) {
Loading