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

Commit f8049dd8 authored by Dave Airlie's avatar Dave Airlie
Browse files

Merge branch 'msm-next' of git://people.freedesktop.org/~robclark/linux into drm-next

A bit smaller pull-req this time around.  Some continued DT binding
cleanup to get the corresponding dts bits merged upstream (through
other trees).  And explicit fence-fd support for submit ioctl.

* 'msm-next' of git://people.freedesktop.org/~robclark/linux:
  drm/msm: bump kernel api version for explicit fencing
  drm/msm: submit support for out-fences
  drm/msm: move fence allocation out of msm_gpu_submit()
  drm/msm: submit support for in-fences
  drm/msm: extend the submit ioctl to pass in flags
  drm/msm/mdp5: Set rotation property initial value to DRM_ROTATE_0 insted of 0
  drm/msm/hdmi: don't print error when adding i2c adapter fails
  drm/msm/mdp4: mark symbols static where possible
  drm/msm: Remove call to reservation_object_test_signaled_rcu before wait
  drm/msm/hdmi: Clean up HDMI gpio DT bindings
  drm/msm/mdp4: Fix issue with LCDC/LVDS port parsing
parents 3f346d5d 7a3bcc0a
Loading
Loading
Loading
Loading
+4 −5
Original line number Diff line number Diff line
@@ -14,17 +14,16 @@ Required properties:
- power-domains: Should be <&mmcc MDSS_GDSC>.
- clocks: device clocks
  See ../clocks/clock-bindings.txt for details.
- qcom,hdmi-tx-ddc-clk-gpio: ddc clk pin
- qcom,hdmi-tx-ddc-data-gpio: ddc data pin
- qcom,hdmi-tx-hpd-gpio: hpd pin
- core-vdda-supply: phandle to supply regulator
- hdmi-mux-supply: phandle to mux regulator
- phys: the phandle for the HDMI PHY device
- phy-names: the name of the corresponding PHY device

Optional properties:
- qcom,hdmi-tx-mux-en-gpio: hdmi mux enable pin
- qcom,hdmi-tx-mux-sel-gpio: hdmi mux select pin
- hpd-gpios: hpd pin
- qcom,hdmi-tx-mux-en-gpios: hdmi mux enable pin
- qcom,hdmi-tx-mux-sel-gpios: hdmi mux select pin
- qcom,hdmi-tx-mux-lpm-gpios: hdmi mux lpm pin
- power-domains: reference to the power domain(s), if available.
- pinctrl-names: the pin control state names; should contain "default"
- pinctrl-0: the default pinctrl state (active)
+1 −0
Original line number Diff line number Diff line
@@ -11,6 +11,7 @@ config DRM_MSM
	select TMPFS
	select QCOM_SCM
	select SND_SOC_HDMI_CODEC if SND_SOC
	select SYNC_FILE
	default y
	help
	  DRM/KMS driver for MSM/snapdragon.
+19 −2
Original line number Diff line number Diff line
@@ -422,11 +422,28 @@ static const struct {

static int msm_hdmi_get_gpio(struct device_node *of_node, const char *name)
{
	int gpio = of_get_named_gpio(of_node, name, 0);
	int gpio;

	/* try with the gpio names as in the table (downstream bindings) */
	gpio = of_get_named_gpio(of_node, name, 0);
	if (gpio < 0) {
		char name2[32];
		snprintf(name2, sizeof(name2), "%s-gpio", name);

		/* try with the gpio names as in the upstream bindings */
		snprintf(name2, sizeof(name2), "%s-gpios", name);
		gpio = of_get_named_gpio(of_node, name2, 0);
		if (gpio < 0) {
			char name3[32];

			/*
			 * try again after stripping out the "qcom,hdmi-tx"
			 * prefix. This is mainly to match "hpd-gpios" used
			 * in the upstream bindings
			 */
			if (sscanf(name2, "qcom,hdmi-tx-%s", name3))
				gpio = of_get_named_gpio(of_node, name3, 0);
		}

		if (gpio < 0) {
			DBG("failed to get gpio: %s (%d)", name, gpio);
			gpio = -1;
+1 −4
Original line number Diff line number Diff line
@@ -243,7 +243,6 @@ void msm_hdmi_i2c_destroy(struct i2c_adapter *i2c)

struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
{
	struct drm_device *dev = hdmi->dev;
	struct hdmi_i2c_adapter *hdmi_i2c;
	struct i2c_adapter *i2c = NULL;
	int ret;
@@ -267,10 +266,8 @@ struct i2c_adapter *msm_hdmi_i2c_init(struct hdmi *hdmi)
	i2c->algo = &msm_hdmi_i2c_algorithm;

	ret = i2c_add_adapter(i2c);
	if (ret) {
		dev_err(dev->dev, "failed to register hdmi i2c: %d\n", ret);
	if (ret)
		goto fail;
	}

	return i2c;

+12 −11
Original line number Diff line number Diff line
@@ -228,18 +228,21 @@ static struct device_node *mdp4_detect_lcdc_panel(struct drm_device *dev)
	struct device_node *endpoint, *panel_node;
	struct device_node *np = dev->dev->of_node;

	endpoint = of_graph_get_next_endpoint(np, NULL);
	/*
	 * LVDS/LCDC is the first port described in the list of ports in the
	 * MDP4 DT node.
	 */
	endpoint = of_graph_get_endpoint_by_regs(np, 0, -1);
	if (!endpoint) {
		DBG("no endpoint in MDP4 to fetch LVDS panel\n");
		DBG("no LVDS remote endpoint\n");
		return NULL;
	}

	/* don't proceed if we have an endpoint but no panel_node tied to it */
	panel_node = of_graph_get_remote_port_parent(endpoint);
	if (!panel_node) {
		dev_err(dev->dev, "no valid panel node\n");
		DBG("no valid panel node in LVDS endpoint\n");
		of_node_put(endpoint);
		return ERR_PTR(-ENODEV);
		return NULL;
	}

	of_node_put(endpoint);
@@ -262,14 +265,12 @@ static int mdp4_modeset_init_intf(struct mdp4_kms *mdp4_kms,
	switch (intf_type) {
	case DRM_MODE_ENCODER_LVDS:
		/*
		 * bail out early if:
		 * - there is no panel node (no need to initialize lcdc
		 *   encoder and lvds connector), or
		 * - panel node is a bad pointer
		 * bail out early if there is no panel node (no need to
		 * initialize LCDC encoder and LVDS connector)
		 */
		panel_node = mdp4_detect_lcdc_panel(dev);
		if (IS_ERR_OR_NULL(panel_node))
			return PTR_ERR(panel_node);
		if (!panel_node)
			return 0;

		encoder = mdp4_lcdc_encoder_init(dev, panel_node);
		if (IS_ERR(encoder)) {
Loading