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

Commit 4d044fea authored by qctecmdr's avatar qctecmdr Committed by Gerrit - the friendly Code Review server
Browse files

Merge "Merge remote-tracking branch 'quic/dev/msm-4.14-display' into msm-4.14"

parents eda5c955 a0366900
Loading
Loading
Loading
Loading
+37 −0
Original line number Diff line number Diff line
@@ -448,6 +448,15 @@ Optional properties:
- qcom,sde-axi-bus-width:	A u32 property to indicate the axi bus width value in bytes
- qcom,sde-mixer-stage-base-layer: A boolean property to indicate if a layer can be staged on base
				stage instead of border fill
- qcom,sde-limits:		A node that lists the limits for different properties. This node
				can have multiple child nodes. Each child node represents a
				specific usecase limit. The usecase can be defined for properties like
				sspp linewidth, bw limit etc.
				e.g. qcom,sde-limits
				-- qcom,sde-limit-name: name of the usecase
				-- qcom,sde-limit-cases: different usecases to be considered
				-- qcom,sde-limit-ids: respective ids for the above usecases
				-- qcom,sde-limit-values: usecase and value for different combinations

Bus Scaling Subnodes:
- qcom,sde-reg-bus:		Property to provide Bus scaling for register access for
@@ -771,6 +780,34 @@ Example:
        qcom,sde-dspp-vlut = <0x0 0x00010000>;
    };

   qcom,sde-limits {
	qcom,sde-linewidth-limits{
		qcom,sde-limit-cases = "vig", "dma", "scaling", "inline_rot";
		qcom,sde-limit-ids= <0x1 0x2 0x4 0x8>;
		/* the qcom,sde-limit-values property consist of two values:
		one for the usecase and the other for the value. The usecase can be
		any combination of the values mentioned in qcom,sde-limit-ids.
		For eg: <0x5 2560> means usecase is 0x5 and value is 2560.
		0x5 = (0x1 | 0x4) = vig + scaling. Thus the linewidth for usecase
		vig + scaling  = 2560 */
		qcom,sde-limit-values = <0x1 4096>,
					<0x5 2560>,
					<0xd 1088>,
					<0x2 4096>;
	};
       qcom,sde-bw-limits{
		qcom,sde-limit-cases = "per_pipe", "total_bw", "vfe_on", "cwb_on";
		qcom,sde-limit-ids = <0x1 0x2 0x4 0x8>;
		qcom,sde-limit-values = <0x1 2600000>,
					<0x9 2600000>,
					<0x5 2600000>,
					<0xd 2600000>,
					<0x2 5800000>,
					<0xa 5500000>,
					<0x6 4400000>,
					<0xe 3900000>;
	};
    };
    qcom,sde-mixer-blocks {
        qcom,sde-mixer-gc = <0x3c0 0x00010000>;
    };
+32 −0
Original line number Diff line number Diff line
@@ -258,6 +258,38 @@
				<1 590 0 150000>,
				<1 590 0 300000>;
		};

		qcom,sde-limits {
			qcom,sde-linewidth-limits{
				qcom,sde-limit-name = "sspp_linewidth_usecases";
				qcom,sde-limit-cases = "vig", "dma", "scale";
				qcom,sde-limit-ids= <0x1 0x2 0x4>;
				qcom,sde-limit-values = <0x1 4096>,
							<0x5 2560>,
							<0x2 2160>;
			};
			qcom,sde-bw-limits{
				qcom,sde-limit-name = "sde_bwlimit_usecases";
				qcom,sde-limit-cases = "per_vig_pipe",
							"per_dma_pipe",
							"total_max_bw",
							"camera_concurrency",
							"cwb_concurrency";
				qcom,sde-limit-ids = <0x1 0x2 0x4 0x8 0x10>;
				qcom,sde-limit-values = <0x1 2600000>,
							<0x11 2600000>,
							<0x9 2600000>,
							<0x19 2600000>,
							<0x2 2600000>,
							<0x12 2600000>,
							<0xa 2600000>,
							<0x1a 2600000>,
							<0x4 5800000>,
							<0x14 5500000>,
							<0xc 4400000>,
							<0x1c 3900000>;
			};
		};
	};

	sde_rscc: qcom,sde_rscc@af20000 {
+16 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ struct dp_debug_private {
	u32 dpcd_size;

	u32 mst_con_id;
	bool hotplug;

	char exe_mode[SZ_32];
	char reg_dump[SZ_32];
@@ -351,9 +352,17 @@ static ssize_t dp_debug_write_hpd(struct file *file,
		goto end;

	hpd &= hpd_data_mask;
	debug->hotplug = !!(hpd & BIT(0));

	debug->dp_debug.psm_enabled = !!(hpd & BIT(1));

	/*
	 * print hotplug value as this code is executed
	 * only while running in debug mode which is manually
	 * triggered by a tester or a script.
	 */
	pr_info("%s\n", debug->hotplug ? "[CONNECT]" : "[DISCONNECT]");

	debug->hpd->simulate_connect(debug->hpd, !!(hpd & BIT(0)));
end:
	return len;
@@ -1479,6 +1488,13 @@ static void dp_debug_set_sim_mode(struct dp_debug_private *debug, bool sim)
		debug->aux->set_sim_mode(debug->aux, true,
			debug->edid, debug->dpcd);
	} else {

		if (debug->hotplug) {
			pr_warn("sim mode off before hotplug disconnect\n");
			debug->hpd->simulate_connect(debug->hpd, false);
			debug->hotplug = false;
		}

		debug->aux->abort(debug->aux, false);
		debug->ctrl->abort(debug->ctrl, false);

+28 −3
Original line number Diff line number Diff line
@@ -78,6 +78,7 @@ struct dp_display_private {
	atomic_t aborted;

	struct platform_device *pdev;
	struct usbpd *pd;
	struct device_node *aux_switch_node;
	struct dentry *root;
	struct completion notification_comp;
@@ -1046,10 +1047,8 @@ static int dp_display_usbpd_disconnect_cb(struct device *dev)
		goto end;
	}

	mutex_lock(&dp->session_lock);
	if (dp->debug->psm_enabled && dp->core_initialized)
		dp->link->psm_config(dp->link, &dp->panel->link_info, true);
	mutex_unlock(&dp->session_lock);

	dp_display_disconnect_sync(dp);

@@ -1390,7 +1389,7 @@ static int dp_init_sub_modules(struct dp_display_private *dp)
	cb->disconnect = dp_display_usbpd_disconnect_cb;
	cb->attention  = dp_display_usbpd_attention_cb;

	dp->hpd = dp_hpd_get(dev, dp->parser, &dp->catalog->hpd, cb);
	dp->hpd = dp_hpd_get(dev, dp->parser, &dp->catalog->hpd, dp->pd, cb);
	if (IS_ERR(dp->hpd)) {
		rc = PTR_ERR(dp->hpd);
		pr_err("failed to initialize hpd, rc = %d\n", rc);
@@ -2157,6 +2156,28 @@ static int dp_display_create_workqueue(struct dp_display_private *dp)
	return 0;
}

static int dp_display_usbpd_get(struct dp_display_private *dp)
{
	int rc = 0;
	char const *phandle = "qcom,dp-usbpd-detection";

	dp->pd = devm_usbpd_get_by_phandle(&dp->pdev->dev, phandle);
	if (IS_ERR(dp->pd)) {
		rc = PTR_ERR(dp->pd);

		/*
		 * If the pd handle is not present(if return is -ENXIO) then the
		 * platform might be using a direct hpd connection from sink.
		 * So, return success in this case.
		 */
		if (rc == -ENXIO)
			return 0;

		pr_err("usbpd phandle failed (%ld)\n", PTR_ERR(dp->pd));
	}
	return rc;
}

static int dp_display_fsa4480_callback(struct notifier_block *self,
		unsigned long event, void *data)
{
@@ -2612,6 +2633,10 @@ static int dp_display_probe(struct platform_device *pdev)
	memset(&dp->mst, 0, sizeof(dp->mst));
	atomic_set(&dp->aborted, 0);

	rc = dp_display_usbpd_get(dp);
	if (rc)
		goto error;

	rc = dp_display_init_aux_switch(dp);
	if (rc) {
		rc = -EPROBE_DEFER;
+4 −3
Original line number Diff line number Diff line
@@ -48,7 +48,8 @@ static void dp_hpd_isr(struct dp_hpd *dp_hpd)
}

struct dp_hpd *dp_hpd_get(struct device *dev, struct dp_parser *parser,
		struct dp_catalog_hpd *catalog, struct dp_hpd_cb *cb)
		struct dp_catalog_hpd *catalog, struct usbpd *pd,
		struct dp_hpd_cb *cb)
{
	struct dp_hpd *dp_hpd;

@@ -67,7 +68,7 @@ struct dp_hpd *dp_hpd_get(struct device *dev, struct dp_parser *parser,
		}
		dp_hpd->type = DP_HPD_GPIO;
	} else {
		dp_hpd = dp_usbpd_get(dev, cb);
		dp_hpd = dp_usbpd_init(dev, pd, cb);
		if (IS_ERR(dp_hpd)) {
			pr_err("failed to get usbpd\n");
			goto out;
@@ -93,7 +94,7 @@ void dp_hpd_put(struct dp_hpd *dp_hpd)

	switch (dp_hpd->type) {
	case DP_HPD_USBPD:
		dp_usbpd_put(dp_hpd);
		dp_usbpd_deinit(dp_hpd);
		break;
	case DP_HPD_GPIO:
		dp_gpio_hpd_put(dp_hpd);
Loading