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

Commit 849b688c authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "drm/msm/dp: do not override plug orientation in simulation"

parents 349793e1 da2dbe50
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -275,10 +275,8 @@ static ssize_t dp_debug_write_hpd(struct file *file,
	struct dp_debug_private *debug = file->private_data;
	char buf[SZ_8];
	size_t len = 0;
	int const orientation_mask = 0x4;
	int const hpd_data_mask = 0x7;
	int hpd = 0;
	int orientation = 0;

	if (!debug)
		return -ENODEV;
@@ -297,13 +295,10 @@ static ssize_t dp_debug_write_hpd(struct file *file,
		goto end;

	hpd &= hpd_data_mask;
	orientation = hpd & orientation_mask ?
		ORIENTATION_CC2 : ORIENTATION_CC1;

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

	debug->hpd->simulate_connect(debug->hpd, !!(hpd & BIT(0)),
			orientation);
	debug->hpd->simulate_connect(debug->hpd, !!(hpd & BIT(0)));
end:
	return len;
}
+1 −2
Original line number Diff line number Diff line
@@ -151,8 +151,7 @@ static void dp_gpio_hpd_work(struct work_struct *work)
	}
}

static int dp_gpio_hpd_simulate_connect(struct dp_hpd *dp_hpd, bool hpd,
		int orientation)
static int dp_gpio_hpd_simulate_connect(struct dp_hpd *dp_hpd, bool hpd)
{
	int rc = 0;
	struct dp_gpio_hpd_private *gpio_hpd;
+1 −2
Original line number Diff line number Diff line
@@ -69,8 +69,7 @@ struct dp_hpd {
	bool multi_func;

	void (*isr)(struct dp_hpd *dp_hpd, int event);
	int (*simulate_connect)(struct dp_hpd *dp_hpd, bool hpd,
			int orientation);
	int (*simulate_connect)(struct dp_hpd *dp_hpd, bool hpd);
	int (*simulate_attention)(struct dp_hpd *dp_hpd, int vdo);
};

+1 −3
Original line number Diff line number Diff line
@@ -430,8 +430,7 @@ static void dp_usbpd_response_cb(struct usbpd_svid_handler *hdlr, u8 cmd,
	}
}

static int dp_usbpd_simulate_connect(struct dp_hpd *dp_hpd, bool hpd,
		int orientation)
static int dp_usbpd_simulate_connect(struct dp_hpd *dp_hpd, bool hpd)
{
	int rc = 0;
	struct dp_usbpd *dp_usbpd;
@@ -448,7 +447,6 @@ static int dp_usbpd_simulate_connect(struct dp_hpd *dp_hpd, bool hpd,

	dp_usbpd->base.hpd_high = hpd;
	pd->forced_disconnect = !hpd;
	pd->dp_usbpd.base.orientation = orientation;
	pd->dp_usbpd.base.alt_mode_cfg_done = hpd;

	pr_debug("hpd_high=%d, forced_disconnect=%d, orientation=%d\n",