From: Daniel Vetter <daniel@ffwll.ch>
To: Peter Ujfalusi <peter.ujfalusi@ti.com>
Cc: daniel.vetter@intel.com, jani.nikula@linux.intel.com,
seanpaul@chromium.org, airlied@linux.ie, gleb@fastmail.com,
linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedesktop-bugs@PaulSD.com
Subject: Re: [PATCH] drm: Schedule the output_poll_work with 1s delay if we have delayed event
Date: Thu, 5 Jan 2017 09:43:24 +0100 [thread overview]
Message-ID: <20170105084324.n33j6jrprnhbg736@phenom.ffwll.local> (raw)
In-Reply-To: <20170104120053.31882-1-peter.ujfalusi@ti.com>
On Wed, Jan 04, 2017 at 02:00:53PM +0200, Peter Ujfalusi wrote:
> Instead of scheduling the work to handle the initial delayed event, use 1s
> delay.
>
> When the delayed event is handled w/o delay - in a similar matter when the
> poll had been initialized before drm_helper_probe_single_connector_modes()
> is called - it triggers a race in Optimus setups.
>
> Fixes: 339fd36238dd ("drm: drm_probe_helper: Fix output_poll_work scheduling")
> Cc: stable@vger.kernel.org # v4.9
> Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> ---
> Hi,
>
> related bug report: https://bugs.freedesktop.org/show_bug.cgi?id=98690
>
> Regards,
> Peter
>
> drivers/gpu/drm/drm_probe_helper.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 98ed110e28ed..f30c14b0a72f 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -146,8 +146,9 @@ void drm_kms_helper_poll_enable_locked(struct drm_device *dev)
> drm_connector_list_iter_put(&conn_iter);
>
> if (dev->mode_config.delayed_event) {
> + /* Use short (1s) delay to handle the initial delayed event */
> poll = true;
> - delay = 0;
> + delay = HZ;
This smells a bit like duct-tape papering over some other race. Lack of
locking or something else. Most likely some drivers enable polling a bit
too early in their load sequence. And if we can't figure this out, then we
need some really big FIXME: here that this papers over driver races.
-Daniel
> }
>
> if (poll)
> --
> 2.11.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
next prev parent reply other threads:[~2017-01-05 8:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-04 12:00 Peter Ujfalusi
2017-01-05 8:43 ` Daniel Vetter [this message]
2017-01-05 10:40 ` Peter Ujfalusi
2017-01-06 10:09 ` 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=20170105084324.n33j6jrprnhbg736@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=airlied@linux.ie \
--cc=daniel.vetter@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedesktop-bugs@PaulSD.com \
--cc=gleb@fastmail.com \
--cc=jani.nikula@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=peter.ujfalusi@ti.com \
--cc=seanpaul@chromium.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®