From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2.
Date: Mon, 6 Nov 2017 16:01:20 +0200 [thread overview]
Message-ID: <20171106140120.GH10981@intel.com> (raw)
In-Reply-To: <a7e602a7-fdb0-e43d-8aaf-de011eb0a94b@linux.intel.com>
On Thu, Nov 02, 2017 at 09:55:40AM +0100, Maarten Lankhorst wrote:
> Op 01-11-17 om 18:00 schreef Ville Syrjälä:
> > On Wed, Nov 01, 2017 at 04:55:06PM +0100, Maarten Lankhorst wrote:
> >> Op 01-11-17 om 16:29 schreef Ville Syrjälä:
> >>> On Wed, Nov 01, 2017 at 04:04:33PM +0100, Maarten Lankhorst wrote:
> >>>> This introduces a slight behavioral change to rmfb. Instead of
> >>>> disabling a crtc when the primary plane is disabled, we try to
> >>>> preserve it.
> >>>>
> >>>> Apart from old versions of the vmwgfx xorg driver, there is
> >>>> nothing depending on rmfb disabling a crtc.
> >>>>
> >>>> Vmwgfx' and simple kms helper atomic implementation rejects CRTC
> >>>> enabled without plane, so we can do this safely.
> > The code for those seems a bit inconsistent. The crtc check requires
> > that the crtc state and plane state match. But the plane check allows
> > the plane to be enabled w/o the crtc being enabled. I guess it doesn't
> > matter really since you can't enable the plane without a crtc, and the
> > crtc check would then catch the case where the crtc would be disabled.
>
> Exactly. :-) Only when a plane is unbound and stays unbound, the crtc check won't
> be invoked. Hence it's the most accurate way of making sure that
> crtc enabled <=> primary plane bound.
>
> If the check was done in the primary plane, an atomic modeset could enable
> the crtc without enabling the primary plane, which shouldn't be allowed but
> a plane check won't catch it.
>
> This has been a bug in simple-kms-helper, fixed in the below commit:
>
> commit 765831dc27ab141b3a0be1ab55b922b012427902
> Author: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> Date: Wed Jul 12 10:13:29 2017 +0200
>
> drm/simple-kms-helper: Fix the check for the mismatch between plane and CRTC enabled.
Hmm. OK that part looks OK. What does seem a bit inconsistent is the
fact that we pass can_update_disabled=true, but later on we reject the
update when visible==false. The old code would have accepted that
because it didn't even call drm_plane_helper_check_state() when the
crtc (and thus also the plane) was disabled.
--
Ville Syrjälä
Intel OTC
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-11-06 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-01 15:04 [PATCH] drm/atomic: Try to preserve the crtc enabled state in drm_atomic_remove_fb, v2 Maarten Lankhorst
2017-11-01 15:29 ` [Intel-gfx] " Ville Syrjälä
2017-11-01 15:55 ` Maarten Lankhorst
2017-11-01 17:00 ` Ville Syrjälä
2017-11-01 17:23 ` [Intel-gfx] " Maarten Lankhorst
2017-11-02 8:55 ` Maarten Lankhorst
2017-11-06 14:01 ` Ville Syrjälä [this message]
2017-11-06 14:06 ` Ville Syrjälä
2017-11-06 15:43 ` Maarten Lankhorst
2017-11-06 16:20 ` Ville Syrjälä
2017-11-07 14:31 ` Daniel Vetter
2017-11-08 7:50 ` Maarten Lankhorst
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=20171106140120.GH10981@intel.com \
--to=ville.syrjala@linux.intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=intel-gfx@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).