All of lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH v2] drm/atomic: Fix bookkeeping with TEST_ONLY, v2.
Date: Thu, 27 Aug 2015 16:00:05 +0200	[thread overview]
Message-ID: <55DF17E5.4030809@linux.intel.com> (raw)
In-Reply-To: <20150827135013.GD5176@intel.com>

Op 27-08-15 om 15:50 schreef Ville Syrjälä:
> On Thu, Aug 27, 2015 at 03:05:38PM +0200, Maarten Lankhorst wrote:
>> Op 27-08-15 om 14:52 schreef Ville Syrjälä:
>>> On Thu, Aug 27, 2015 at 02:50:34PM +0200, Maarten Lankhorst wrote:
>>>> Op 27-08-15 om 14:48 schreef Ville Syrjälä:
>>>>> On Thu, Aug 27, 2015 at 02:43:35PM +0200, Maarten Lankhorst wrote:
>>>>>> Op 27-08-15 om 14:19 schreef Daniel Stone:
>>>>>>> Hi,
>>>>>>>
>>>>>>> On 4 August 2015 at 12:34, Maarten Lankhorst
>>>>>>> <maarten.lankhorst@linux.intel.com> wrote:
>>>>>>>> Commit ec9f932ed41622d120de52a5b525e4d77b9ef17e
>>>>>>>> "drm/atomic: Cleanup on error properly in the atomic ioctl."
>>>>>>>> cleaned up some error paths, but didn't fix the TEST_ONLY path.
>>>>>>>> In the check only case plane->fb shouldn't be updated, and
>>>>>>>> the vblank events should be cleared as on failure.
>>>>>>> Bikeshedding a bit ...
>>>>>>>
>>>>>>> An early test precludes TEST_ONLY | PAGE_FLIP_EVENT, so you don't need
>>>>>>> to mention this in the commit message; in this case, the main change
>>>>>>> is about plane->{,old_}fb.
>>>>>> Even testing with PAGE_FLIP_EVENT would be useful because
>>>>>> event && !crtc_state->active should not be allowed. In that case test
>>>>>> could succeed but commit could fail.
>>>>> Why would commit fail when the we're in DPMS off? I would suggest it
>>>>> should be allowed. The operation would just a be a nop from a HW point
>>>>> of view, all the calculation/checks would still be performed.
>>>>>
>>>> You can commit, just not with PAGE_FLIP_EVENT set when crtc is inactive.
>>> What's so special about the event here? Just send it out as soon as the
>>> state has been swapped.
>> Previously this has been disallowed for legacy page flips.
> I don't think so. Speaking for i915, I think we've just rejected legacy page
> flips entirely with the pipe is off on account of drm_vblank_get() failing.
No atomic driver handles this case correctly. You can't get vblank events with the crtc off.
>> I don't see why this should be relaxed. It just complicates things and you have nothing to stick in for the vblank counter.
> We could stick the last vbl count/timestamp in there.
>
> Not allowing means userspace is forced to consider the dpms state
> whenever it wants to call the atomic ioctl.
Userspace was the one turning off the crtc in the first place; it shouldn't continue flipping but preserve power. :-)

~Maarten
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2015-08-27 14:00 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-04 11:34 [PATCH] drm/atomic: Fix bookkeeping with TEST_ONLY Maarten Lankhorst
2015-08-11 10:03 ` shuang.he
2015-08-27 12:19 ` Daniel Stone
2015-08-27 12:43   ` [PATCH v2] drm/atomic: Fix bookkeeping with TEST_ONLY, v2 Maarten Lankhorst
2015-08-27 12:48     ` Ville Syrjälä
2015-08-27 12:50       ` Maarten Lankhorst
2015-08-27 12:52         ` Ville Syrjälä
2015-08-27 13:05           ` Maarten Lankhorst
2015-08-27 13:50             ` Ville Syrjälä
2015-08-27 14:00               ` Maarten Lankhorst [this message]
2015-08-27 14:09                 ` Ville Syrjälä
2015-08-27 14:28                   ` Daniel Stone
2015-08-27 14:34                     ` Ville Syrjälä
2015-08-27 14:42                       ` Daniel Stone
2015-08-27 13:34     ` Daniel Stone
2015-08-31 13:56     ` shuang.he

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=55DF17E5.4030809@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --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 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.