From: Daniel Vetter <daniel@ffwll.ch>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [RFC] drm/atomic: Abuse legacy cursor update flag for legacy gamma update too
Date: Mon, 19 Feb 2018 15:34:42 +0100 [thread overview]
Message-ID: <20180219143442.GD22199@phenom.ffwll.local> (raw)
In-Reply-To: <20180213091201.12776-1-maarten.lankhorst@linux.intel.com>
On Tue, Feb 13, 2018 at 10:12:01AM +0100, Maarten Lankhorst wrote:
> Programs like redshift set the legacy gamma for X.org every 5 seconds.
> Because atomic commits wait for vblank completion, we get a frame drop
> every 5 seconds because of the legacy gamma update.
>
> Work around this by setting the legacy_cursor_update flag, to force
> legacy gamma updates not to be synced against vblank.
>
> Reported-by: Tholin #intel-gfx
> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> ---
> drivers/gpu/drm/drm_atomic_helper.c | 3 +++
> 1 file changed, 3 insertions(+)
>
> diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c
> index ae3cbfe9e01c..f37ab26ef4d2 100644
> --- a/drivers/gpu/drm/drm_atomic_helper.c
> +++ b/drivers/gpu/drm/drm_atomic_helper.c
> @@ -3806,6 +3806,9 @@ int drm_atomic_helper_legacy_gamma_set(struct drm_crtc *crtc,
> if (!state)
> return -ENOMEM;
>
> + /* Don't wait for vblank after updating gamma. */
> + state->legacy_cursor_update = true;
The legacy_cursor_update hack is a fairly serious hack, and I'd kinda want
to avoid inflicting it on everyone. The cursor hack is a lot less minimal
(because few drivers have cursors, and we'd have the async plane update
stuff from Gustavo at least). Do we really need this?
Making sure that no one can trample over async gamma table updates,
especially when we eventually go to a vblank worker for them, sounds like
serious amounts of pain. I'd prefer we teach -modesetting to just push the
gamma update with the next frame as an atomic commit, or in the
blockhandler (to avoid delaying it).
-Daniel
> +
> blob = drm_property_create_blob(dev,
> sizeof(struct drm_color_lut) * size,
> NULL);
> --
> 2.16.1
>
> _______________________________________________
> 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
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2018-02-19 14:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 9:12 [RFC] drm/atomic: Abuse legacy cursor update flag for legacy gamma update too Maarten Lankhorst
2018-02-13 9:16 ` Chris Wilson
2018-02-13 9:33 ` Maarten Lankhorst
2018-02-13 13:29 ` Ville Syrjälä
2018-02-19 14:34 ` Daniel Vetter [this message]
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=20180219143442.GD22199@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=maarten.lankhorst@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 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.