public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: ville.syrjala@linux.intel.com
To: intel-gfx@lists.freedesktop.org
Cc: pebolle@tiscali.nl, Daniel Vetter <daniel@ffwll.ch>,
	Dave Airlie <airlied@redhat.com>,
	linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org
Subject: [PATCH] drm/i915: Take modeset locks around intel_modeset_setup_hw_state()
Date: Mon,  2 Dec 2013 11:08:06 +0200	[thread overview]
Message-ID: <1385975286-25392-1-git-send-email-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <CAKMK7uE_L8cqyYk6mQ4paXeh2m7tmoMXRv_KxoAeBq9MEAnFqw@mail.gmail.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Some lower level things get angry if we don't have modeset locks
during intel_modeset_setup_hw_state(). Actually the resume and
lid_notify codepaths alreday hold the locks, but the init codepath
doesn't, so fix that.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
Totally untested, but looks correct to me.

 drivers/gpu/drm/i915/intel_display.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 080f6fd..114db51 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -11046,7 +11046,9 @@ void intel_modeset_gem_init(struct drm_device *dev)
 
 	intel_setup_overlay(dev);
 
+	drm_modeset_lock_all(dev);
 	intel_modeset_setup_hw_state(dev, false);
+	drm_modeset_unlock_all(dev);
 }
 
 void intel_modeset_cleanup(struct drm_device *dev)
-- 
1.8.3.2

  reply	other threads:[~2013-12-02  9:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 20:38 [i915] WARNING: [...] drivers/gpu/drm/i915/intel_display.c:9948 intel_get_pipe_from_connector Paul Bolle
2013-12-01  9:58 ` Daniel Vetter
2013-12-01 16:57   ` Paul Bolle
2013-12-02  7:33     ` Daniel Vetter
2013-12-02  9:08       ` ville.syrjala [this message]
2013-12-02 10:00         ` [PATCH] drm/i915: Take modeset locks around intel_modeset_setup_hw_state() Paul Bolle
2013-12-02 12:12           ` Ville Syrjälä
2013-12-02 18:01             ` Paul Bolle
2013-12-02  9:53       ` [i915] WARNING: [...] drivers/gpu/drm/i915/intel_display.c:9948 intel_get_pipe_from_connector Paul Bolle
2013-12-02 14:23         ` Daniel Vetter
2013-12-02 18:05           ` Paul Bolle
2013-12-03 15:19             ` Daniel Vetter
2013-12-03 22:03               ` Paul Bolle
2013-12-03 22:13                 ` Daniel Vetter

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=1385975286-25392-1-git-send-email-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=airlied@redhat.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pebolle@tiscali.nl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox