From: Daniel Vetter <daniel@ffwll.ch>
To: David Herrmann <dh.herrmann@gmail.com>
Cc: Lennart Poettering <lennart@poettering.net>,
David Airlie <airlied@linux.ie>,
Intel Graphics Development <intel-gfx@lists.freedesktop.org>
Subject: Re: drm i915 weirdness with /sys/class/drm/card0*/status
Date: Wed, 17 Jun 2015 13:11:14 +0200 [thread overview]
Message-ID: <20150617111114.GE23637@phenom.ffwll.local> (raw)
In-Reply-To: <CANq1E4ThiQ5uLEJBJ7WTg3U1PruwBQa3xBWoZ7w4USqpmY_KvQ@mail.gmail.com>
On Wed, Jun 17, 2015 at 10:29:48AM +0200, David Herrmann wrote:
> Hi
>
> On Tue, Jun 16, 2015 at 11:25 PM, Lennart Poettering
> <lennart@poettering.net> wrote:
> > On Tue, 16.06.15 13:47, Daniel Vetter (daniel@ffwll.ch) wrote:
> >
> >> > But what does that actually mean? should logind ever echo "detect"
> >> > itself into the file? Should it follow uevents for the files? How
> >> > should treat this file?
> >>
> >> Ok here's how this is supposed to work:
> >> - If anything changes the kernel will send out an uevent and compositors/X
> >> or anyone else interested can listen for them. We've had a few bugs in
> >> the past where such events where lost in a combination of bad luck and
> >> bad hw, but that should all be fixed now.
> >>
> >> - Userspace should never poll these things on its own since probing is
> >> ridiculously expensive. Unfortunately years of closing bugs as wontfix
> >> hasn't lead to userspace stop polling (despite that the kernel does that
> >> too if it's needed) which resulted in the above patch to take away the
> >> those from at least system deamons.
> >
> > I find the kernel patch you applied a bit drastic, it broke userspace,
> > returning rubbish unless somebody echoes the "detect" into the file --
> > which apparently nothing does, at least not after we came back from a
> > suspend...
>
> I don't think it was supposed to work this way. If I read Daniel's
> reply correctly, then the kernel is supposed to re-read connector
> state after resume (without explicit trigger from user-space). It
> might return 'unknown' for some time, but once it was refreshed, it
> should send out a uevent and the correct state should now be read. And
> logind works fine with this behavior.
>
> Anyway, I'm not sure why your machine doesn't work that way. I cannot
> see the problems here on my machine.
Yes there seems to be something amiss with the reprobing. Does the below
kernel patch help?
-Daniel
diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
index 04203c0d2ecb..aa0fae2f24d1 100644
--- a/drivers/gpu/drm/drm_probe_helper.c
+++ b/drivers/gpu/drm/drm_probe_helper.c
@@ -497,10 +497,6 @@ bool drm_helper_hpd_irq_event(struct drm_device *dev)
mutex_lock(&dev->mode_config.mutex);
list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
- /* Only handle HPD capable connectors. */
- if (!(connector->polled & DRM_CONNECTOR_POLL_HPD))
- continue;
-
old_status = connector->status;
connector->status = connector->funcs->detect(connector, false);
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2015-06-17 11:08 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-15 23:45 drm i915 weirdness with /sys/class/drm/card0*/status Lennart Poettering
2015-06-16 7:47 ` Daniel Vetter
2015-06-16 8:12 ` Jani Nikula
2015-06-16 9:14 ` Chris Wilson
2015-06-16 10:25 ` Daniel Vetter
2015-06-16 11:22 ` Lennart Poettering
2015-06-16 11:47 ` Daniel Vetter
2015-06-16 21:25 ` Lennart Poettering
2015-06-17 8:29 ` David Herrmann
2015-06-17 11:11 ` Daniel Vetter [this message]
2015-06-17 16:41 ` Lennart Poettering
2015-06-16 21:08 ` Lennart Poettering
2015-06-16 22:39 ` Dave Airlie
2015-06-16 11:17 ` Lennart Poettering
2015-06-16 11:37 ` Chris Wilson
2015-06-16 21:28 ` Lennart Poettering
2015-06-17 7:45 ` Chris Wilson
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=20150617111114.GE23637@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=dh.herrmann@gmail.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=lennart@poettering.net \
/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