All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Dave Hansen <dave.hansen@intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>,
	Jani Nikula <jani.nikula@linux.intel.com>,
	David Airlie <airlied@linux.ie>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [Intel-gfx] 4.10-rc2 oops in DRM connector code
Date: Wed, 11 Jan 2017 15:40:38 +0000	[thread overview]
Message-ID: <20170111154038.GK18077@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <c14a88a1-ecc1-5727-5e74-6e9bf4fdc3ca@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On Wed, Jan 11, 2017 at 07:24:45AM -0800, Dave Hansen wrote:
> On 01/10/2017 11:43 PM, Daniel Vetter wrote:
> > On Tue, Jan 10, 2017 at 08:52:47AM -0800, Dave Hansen wrote:
> >> On 01/10/2017 02:31 AM, Daniel Vetter wrote:
> >>> commit e73ab00e9a0f1731f34d0620a9c55f5c30c4ad4e
> >>> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> >>> Date:   Sun Dec 18 14:35:45 2016 +0100
> >>>
> >>>     drm: prevent double-(un)registration for connectors
> >>>
> >>> Lack of that would perfectly explain that oops ... Otherwise still no idea
> >>> what's going wrong.
> >> No...  That's not in mainline as far as I can see.  Should I test with
> >> it applied?
> > Hm, I guess failed to cc: stable that one properly, iirc we decided the
> > race fix is too academic and can't be hit in reality ;-)
> > 
> > Testing would be great. Probably conflicts because we extracted
> > drm_connector.c only recently, but running s/drm_connector\.c/drm_crtc.c/
> > over the diff and then applying with some fudge should take care of that.
> 
> It doesn't apply to mainline, with or without the substitution you suggest.

I was hoping that the locking was the real cause here and would be an
easy fix to apply. I did have a look at trying to reorder the DP-MST
worker with driver registration. Hacky to say the least.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

[-- Attachment #2: 0001-dp-mst-register.patch --]
[-- Type: text/x-diff, Size: 1995 bytes --]

>From 30ac9092e934295f12775f03d73170fc480b7fc8 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue, 10 Jan 2017 10:46:25 +0000
Subject: [PATCH] dp-mst-register

---
 drivers/gpu/drm/i915/intel_dp.c     | 12 +++++++++++-
 drivers/gpu/drm/i915/intel_dp_mst.c |  9 ++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f0f44cdbe4b4..fc10eb2c8563 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4762,7 +4762,17 @@ intel_dp_connector_register(struct drm_connector *connector)
 		      intel_dp->aux.name, connector->kdev->kobj.name);
 
 	intel_dp->aux.dev = connector->kdev;
-	return drm_dp_aux_register(&intel_dp->aux);
+	ret = drm_dp_aux_register(&intel_dp->aux);
+	if (ret)
+		return ret;
+
+	if (intel_dp->mst_mgr.cbs) {
+		intel_dp->can_mst = true;
+		if (intel_dp->attached_connector)
+			intel_dp->attached_connector->base.status = intel_dp_long_pulse(intel_dp->attached_connector);
+	}
+
+	return 0;
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index c93c1999a494..f0a664041dbc 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -582,16 +582,19 @@ intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_ba
 	struct drm_device *dev = intel_dig_port->base.base.dev;
 	int ret;
 
-	intel_dp->can_mst = true;
+	intel_dp->can_mst = false;
 	intel_dp->mst_mgr.cbs = &mst_cbs;
 
 	/* create encoders */
 	intel_dp_create_fake_mst_encoders(intel_dig_port);
-	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev, &intel_dp->aux, 16, 3, conn_base_id);
+	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev,
+					    &intel_dp->aux, 16, 3,
+					    conn_base_id);
 	if (ret) {
-		intel_dp->can_mst = false;
+		intel_dp->mst_mgr.cbs = NULL;
 		return ret;
 	}
+
 	return 0;
 }
 
-- 
2.11.0


WARNING: multiple messages have this Message-ID (diff)
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Dave Hansen <dave.hansen@intel.com>
Cc: David Airlie <airlied@linux.ie>,
	intel-gfx <intel-gfx@lists.freedesktop.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	dri-devel <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: 4.10-rc2 oops in DRM connector code
Date: Wed, 11 Jan 2017 15:40:38 +0000	[thread overview]
Message-ID: <20170111154038.GK18077@nuc-i3427.alporthouse.com> (raw)
In-Reply-To: <c14a88a1-ecc1-5727-5e74-6e9bf4fdc3ca@intel.com>

[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]

On Wed, Jan 11, 2017 at 07:24:45AM -0800, Dave Hansen wrote:
> On 01/10/2017 11:43 PM, Daniel Vetter wrote:
> > On Tue, Jan 10, 2017 at 08:52:47AM -0800, Dave Hansen wrote:
> >> On 01/10/2017 02:31 AM, Daniel Vetter wrote:
> >>> commit e73ab00e9a0f1731f34d0620a9c55f5c30c4ad4e
> >>> Author: Daniel Vetter <daniel.vetter@ffwll.ch>
> >>> Date:   Sun Dec 18 14:35:45 2016 +0100
> >>>
> >>>     drm: prevent double-(un)registration for connectors
> >>>
> >>> Lack of that would perfectly explain that oops ... Otherwise still no idea
> >>> what's going wrong.
> >> No...  That's not in mainline as far as I can see.  Should I test with
> >> it applied?
> > Hm, I guess failed to cc: stable that one properly, iirc we decided the
> > race fix is too academic and can't be hit in reality ;-)
> > 
> > Testing would be great. Probably conflicts because we extracted
> > drm_connector.c only recently, but running s/drm_connector\.c/drm_crtc.c/
> > over the diff and then applying with some fudge should take care of that.
> 
> It doesn't apply to mainline, with or without the substitution you suggest.

I was hoping that the locking was the real cause here and would be an
easy fix to apply. I did have a look at trying to reorder the DP-MST
worker with driver registration. Hacky to say the least.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre

[-- Attachment #2: 0001-dp-mst-register.patch --]
[-- Type: text/x-diff, Size: 1995 bytes --]

>From 30ac9092e934295f12775f03d73170fc480b7fc8 Mon Sep 17 00:00:00 2001
From: Chris Wilson <chris@chris-wilson.co.uk>
Date: Tue, 10 Jan 2017 10:46:25 +0000
Subject: [PATCH] dp-mst-register

---
 drivers/gpu/drm/i915/intel_dp.c     | 12 +++++++++++-
 drivers/gpu/drm/i915/intel_dp_mst.c |  9 ++++++---
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index f0f44cdbe4b4..fc10eb2c8563 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4762,7 +4762,17 @@ intel_dp_connector_register(struct drm_connector *connector)
 		      intel_dp->aux.name, connector->kdev->kobj.name);
 
 	intel_dp->aux.dev = connector->kdev;
-	return drm_dp_aux_register(&intel_dp->aux);
+	ret = drm_dp_aux_register(&intel_dp->aux);
+	if (ret)
+		return ret;
+
+	if (intel_dp->mst_mgr.cbs) {
+		intel_dp->can_mst = true;
+		if (intel_dp->attached_connector)
+			intel_dp->attached_connector->base.status = intel_dp_long_pulse(intel_dp->attached_connector);
+	}
+
+	return 0;
 }
 
 static void
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index c93c1999a494..f0a664041dbc 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -582,16 +582,19 @@ intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_ba
 	struct drm_device *dev = intel_dig_port->base.base.dev;
 	int ret;
 
-	intel_dp->can_mst = true;
+	intel_dp->can_mst = false;
 	intel_dp->mst_mgr.cbs = &mst_cbs;
 
 	/* create encoders */
 	intel_dp_create_fake_mst_encoders(intel_dig_port);
-	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev, &intel_dp->aux, 16, 3, conn_base_id);
+	ret = drm_dp_mst_topology_mgr_init(&intel_dp->mst_mgr, dev->dev,
+					    &intel_dp->aux, 16, 3,
+					    conn_base_id);
 	if (ret) {
-		intel_dp->can_mst = false;
+		intel_dp->mst_mgr.cbs = NULL;
 		return ret;
 	}
+
 	return 0;
 }
 
-- 
2.11.0


[-- Attachment #3: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2017-01-11 15:43 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-05 19:03 4.10-rc2 oops in DRM connector code Dave Hansen
2017-01-05 19:03 ` Dave Hansen
2017-01-05 19:53 ` ✓ Fi.CI.BAT: success for " Patchwork
2017-01-09 10:15 ` [Intel-gfx] " Daniel Vetter
2017-01-09 10:15   ` Daniel Vetter
2017-01-09 12:59   ` [Intel-gfx] " Dave Hansen
2017-01-09 12:59     ` Dave Hansen
2017-01-09 13:40   ` [Intel-gfx] " Dave Hansen
2017-01-09 13:40     ` Dave Hansen
2017-01-09 13:46     ` [Intel-gfx] " Dave Hansen
2017-01-09 13:46       ` Dave Hansen
2017-01-09 16:41     ` [Intel-gfx] " Daniel Vetter
2017-01-09 16:41       ` Daniel Vetter
2017-01-09 16:50       ` [Intel-gfx] " Dave Hansen
2017-01-09 16:50         ` Dave Hansen
2017-01-09 16:59         ` [Intel-gfx] " Daniel Vetter
2017-01-09 16:59           ` Daniel Vetter
2017-01-09 17:22           ` Dave Hansen
2017-01-09 17:22             ` Dave Hansen
2017-01-09 19:34             ` [Intel-gfx] " Alex Deucher
2017-01-09 17:42           ` Dave Hansen
2017-01-09 17:42             ` Dave Hansen
2017-01-10 10:31             ` [Intel-gfx] " Daniel Vetter
2017-01-10 16:52               ` Dave Hansen
2017-01-10 16:52                 ` Dave Hansen
2017-01-11  7:43                 ` [Intel-gfx] " Daniel Vetter
2017-01-11  7:43                   ` Daniel Vetter
2017-01-11 15:24                   ` Dave Hansen
2017-01-11 15:24                     ` Dave Hansen
2017-01-11 15:39                     ` [Intel-gfx] " Daniel Vetter
2017-01-11 15:39                       ` Daniel Vetter
2017-01-11 16:16                       ` [Intel-gfx] " Dave Hansen
2017-01-11 16:16                         ` Dave Hansen
2017-01-11 22:25                         ` [Intel-gfx] " Daniel Vetter
2017-01-11 22:25                           ` Daniel Vetter
2017-01-11 15:40                     ` Chris Wilson [this message]
2017-01-11 15:40                       ` Chris Wilson
2017-01-11 20:23 ` ✗ Fi.CI.BAT: warning for 4.10-rc2 oops in DRM connector code (rev2) Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170111154038.GK18077@nuc-i3427.alporthouse.com \
    --to=chris@chris-wilson.co.uk \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@intel.com \
    --cc=dave.hansen@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.