From: Daniel Vetter <daniel@ffwll.ch>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [RFC][PATCH 07/11] drm/probe-helper: Avoid iterating the list twice on ww backoff
Date: Tue, 6 Mar 2018 10:49:43 +0100 [thread overview]
Message-ID: <20180306094943.GV22212@phenom.ffwll.local> (raw)
In-Reply-To: <20180227125700.6527-8-ville.syrjala@linux.intel.com>
On Tue, Feb 27, 2018 at 02:56:56PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
>
> If we have to backoff there's no point in going over the mode list again
> to mark all the modes as stale. We can defer that until we're ready to
> refresh the mode list. Avoids multiple list walks if we have to do the
> locking backoff.
>
> Cc: Keith Packard <keithp@keithp.com>
> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Some drivers add modes from their ->detect callbacks I think, won't this
break them? At least I'm never sure about what different drivers are
supposed to do in each case.
Otoh the kerneldoc is fairly clear, and this patch is easy to revert, and
it might help in forcing drivers to be more consistent.
If you add a note about my concerns (as a hint in case we bisect a
regression to this patch), then this is:
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
> drivers/gpu/drm/drm_probe_helper.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/drm_probe_helper.c b/drivers/gpu/drm/drm_probe_helper.c
> index 527743394150..7dc7e635d7e4 100644
> --- a/drivers/gpu/drm/drm_probe_helper.c
> +++ b/drivers/gpu/drm/drm_probe_helper.c
> @@ -415,10 +415,6 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
> } else
> WARN_ON(ret < 0);
>
> - /* set all old modes to the stale state */
> - list_for_each_entry(mode, &connector->modes, head)
> - mode->status = MODE_STALE;
> -
> old_status = connector->status;
>
> if (connector->force) {
> @@ -472,6 +468,10 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
>
> dev->mode_config.poll_running = drm_kms_helper_poll;
>
> + /* set all old modes to the stale state */
> + list_for_each_entry(mode, &connector->modes, head)
> + mode->status = MODE_STALE;
> +
> if (connector->status == connector_status_disconnected) {
> DRM_DEBUG_KMS("[CONNECTOR:%d:%s] disconnected\n",
> connector->base.id, connector->name);
> --
> 2.13.6
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2018-03-06 9:49 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-27 12:56 [RFC][PATCH 00/11] drm: Try to make display info less nuts Ville Syrjala
2018-02-27 12:56 ` [RFC][PATCH 01/11] drm/gma500: Fill display_info.{width, height}_mm from .get_modes() Ville Syrjala
2018-02-27 12:56 ` [RFC][PATCH 02/11] drm/i915: " Ville Syrjala
2018-02-27 12:56 ` [RFC][PATCH 03/11] drm/shmobile: Don't fill display_info.{width, height}_mm at init time Ville Syrjala
2018-02-27 12:56 ` [RFC][PATCH 04/11] drm: Split the display info into static and dynamic parts Ville Syrjala
2018-02-27 13:08 ` Maxime Ripard
2018-02-27 13:23 ` Philipp Zabel
2018-02-28 4:58 ` Archit Taneja
2018-02-28 8:46 ` Sharma, Shashank
2018-02-28 9:17 ` Stefan Agner
2018-02-28 21:11 ` Alex Deucher
2018-03-02 7:59 ` Linus Walleij
2018-03-06 9:41 ` Daniel Vetter
2018-02-27 12:56 ` [RFC][PATCH 05/11] drm/edid: Clear display info fully Ville Syrjala
2018-02-28 8:58 ` Sharma, Shashank
2018-03-06 9:33 ` Daniel Vetter
2018-03-06 9:42 ` Daniel Vetter
2018-03-06 9:52 ` Daniel Vetter
2018-02-27 12:56 ` [RFC][PATCH 06/11] drm/edid: Don't call drm_add_display_info() with an invalid EDID Ville Syrjala
2018-03-06 9:45 ` Daniel Vetter
2018-02-27 12:56 ` [RFC][PATCH 07/11] drm/probe-helper: Avoid iterating the list twice on ww backoff Ville Syrjala
2018-03-06 9:49 ` Daniel Vetter [this message]
2018-03-06 11:48 ` Ville Syrjälä
2018-02-27 12:56 ` [RFC][PATCH 08/11] drm: Add drm_connector_fill_modes() Ville Syrjala
2018-03-06 10:00 ` Daniel Vetter
2018-03-06 10:30 ` Ville Syrjälä
2018-02-27 12:56 ` [RFC][PATCH 09/11] drm: Fix getconnector locking Ville Syrjala
2018-03-06 9:55 ` Daniel Vetter
2018-02-27 12:56 ` [RFC][PATCH 10/11] drm: Fix debugfs edid_override locking Ville Syrjala
2018-03-06 9:56 ` Daniel Vetter
2018-02-27 12:57 ` [RFC][PATCH 11/11] drm: Sprinkle lockdep asserts for edid/display_info Ville Syrjala
2018-03-06 9:31 ` Daniel Vetter
2018-03-06 12:18 ` Ville Syrjälä
2018-03-06 16:23 ` Harry Wentland
2018-03-06 17:13 ` Daniel Vetter
2018-03-06 18:32 ` Harry Wentland
2018-03-07 16:26 ` 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=20180306094943.GV22212@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=ville.syrjala@linux.intel.com \
/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