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

Commit 363d4a45 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/sde: add shared display support"

parents 8e9ed04d 7079e398
Loading
Loading
Loading
Loading
+77 −0
Original line number Diff line number Diff line
QTI Snapdragon Display Engine (SDE) shared display

Required properties:
- compatible:		"qcom,shared-display"
- qcom,shared-display-base: node handle of qcom,shared-display-base, see below.
- qcom,blend-stage-range: blend stage range that are not shared in one display
- qcom,shared-display-src-mode: source resolution of the shared display, contains
			two properties:
			qcom,mode-h-active: horizontal resolution
			qcom,mode-v-active: vertical resolution
- qcom,shared-display-dst-mode: destination rectangle in the shared display,
			contains 4 properties:
			qcom,mode-x-offset: x offset inside the shared display
			qcom,mode-y-offset: y offset inside the shared display
			qcom,mode-width: width inside the shared display
			qcom,mode-height: height inside the shared display


qcom,shared-display-base properties:
- qcom,shared-display-base-intf: intf index of the base display
- qcom,shared-display-base-mst: if display is DP MST type, optional
- qcom,shared-display-base-mode: timing of the base display, contains the
			following properties:
			qcom,mode-h-active: H active size
			qcom,mode-h-front-porch: H front portch
			qcom,mode-h-pulse-width: H pulse width
			qcom,mode-h-back-porch: H back porch
			qcom,mode-h-active-high: if H active polarity is high
			qcom,mode-v-active: V active size
			qcom,mode-v-front-porch: V front portch
			qcom,mode-v-pulse-width: V pulse width
			qcom,mode-v-back-porch: V back porch
			qcom,mode-v-active-high: if V active polarity is high
			qcom,mode-refresh-rate: vertial refresh rate
			qcom,mode-clock-in-khz: clock in kHz

Example:

/ {
	...

	sde_sh_base0: qcom,shared-display-base@0 {
		qcom,shared-display-base-intf = <0>;
		qcom,shared-display-base-mst;
		qcom,shared-display-base-mode {
			qcom,mode-h-active = <3840>;
			qcom,mode-h-front-porch = <176>;
			qcom,mode-h-pulse-width = <88>;
			qcom,mode-h-back-porch = <296>;
			qcom,mode-h-active-high;
			qcom,mode-v-active = <2160>;
			qcom,mode-v-front-porch = <8>;
			qcom,mode-v-pulse-width = <10>;
			qcom,mode-v-back-porch = <72>;
			qcom,mode-v-active-high;
			qcom,mode-refresh-rate = <30>;
			qcom,mode-clock-in-khz = <297000>;
		};
	};

	sde_sh0: qcom,shared-display@0 {
		compatible = "qcom,shared-display";
		qcom,shared-display-base = <&sde_sh_base0>;
		qcom,blend-stage-range = <0 5>;
		qcom,shared-display-src-mode {
			qcom,mode-h-active = <1920>;
			qcom,mode-v-active = <1080>;
		};
		qcom,shared-display-dst-mode {
			qcom,mode-x-offset = <0>;
			qcom,mode-y-offset = <0>;
			qcom,mode-width = <1920>;
			qcom,mode-height = <1080>;
		};
	};

};
+10 −0
Original line number Diff line number Diff line
@@ -93,6 +93,16 @@ config DRM_SDE_WB
	help
	  Choose this option for writeback connector support.

config DRM_SDE_SHD
	bool "Enable Shared display support in SDE DRM"
	depends on DRM_MSM
	help
	  Choose this option for shared display support.
	  This option enables multiple logical displays
	  to share one base physical encoder/connector.
	  Each logical display will appear as different
	  connectors and report back to user.

config DRM_SDE_HDMI
	bool "Enable HDMI driver support in DRM SDE driver"
	depends on DRM_MSM
+3 −0
Original line number Diff line number Diff line
@@ -136,6 +136,9 @@ msm_drm-$(CONFIG_DRM_MSM) += \
msm_drm-$(CONFIG_DRM_SDE_WB) += sde/sde_wb.o \
	sde/sde_encoder_phys_wb.o

msm_drm-$(CONFIG_DRM_SDE_SHD) += sde/sde_shd.o \
	sde/sde_encoder_phys_shd.o

msm_drm-$(CONFIG_DRM_MSM) += \
	msm_atomic.o \
	msm_drv.o \
+2 −0
Original line number Diff line number Diff line
@@ -196,12 +196,14 @@ enum msm_display_compression {
 * @MSM_DISPLAY_CAP_CMD_MODE:           Command mode supported
 * @MSM_DISPLAY_CAP_HOT_PLUG:           Hot plug detection supported
 * @MSM_DISPLAY_CAP_EDID:               EDID supported
 * @MSM_DISPLAY_CAP_SHARED:             Display is shared
 */
enum msm_display_caps {
	MSM_DISPLAY_CAP_VID_MODE	= BIT(0),
	MSM_DISPLAY_CAP_CMD_MODE	= BIT(1),
	MSM_DISPLAY_CAP_HOT_PLUG	= BIT(2),
	MSM_DISPLAY_CAP_EDID		= BIT(3),
	MSM_DISPLAY_CAP_SHARED		= BIT(4),
};

/**
+4 −0
Original line number Diff line number Diff line
@@ -202,6 +202,8 @@ struct sde_connector_ops {
 * @property_data: Array of private data for generic property handling
 * @blob_caps: Pointer to blob structure for 'capabilities' property
 * @blob_hdr: Pointer to blob structure for 'hdr_properties' property
 * @is_shared: connector is shared
 * @shared_roi: roi of the shared display
 */
struct sde_connector {
	struct drm_connector base;
@@ -228,6 +230,8 @@ struct sde_connector {
	struct msm_property_data property_data[CONNECTOR_PROP_COUNT];
	struct drm_property_blob *blob_caps;
	struct drm_property_blob *blob_hdr;
	bool is_shared;
	struct sde_rect shared_roi;
};

/**
Loading