dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
To: Daniel Stone <daniel@fooishbar.org>
Cc: Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: drm/atomic: Reject events for inactive crtc's.
Date: Thu, 6 Aug 2015 13:19:35 +0200	[thread overview]
Message-ID: <55C342C7.4060501@linux.intel.com> (raw)
In-Reply-To: <CAPj87rOYwaAe9yQMUYvh5am52Pkeczhc389XuaUP5Jc8kN4ovA@mail.gmail.com>

Hey,

Op 06-08-15 om 11:47 schreef Daniel Stone:
> Hi,
>
> On 30 July 2015 at 08:03, Maarten Lankhorst
> <maarten.lankhorst@linux.intel.com> wrote:
>> This will cause drm_atomic_helper_page_flip and drm_mode_atomic_ioctl to
>> fail with -EINVAL if a event is requested on a inactive crtc.
>>
>> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
>> ---
>> diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c
>> index d719ce0b10a0..679577e8e02d 100644
>> --- a/drivers/gpu/drm/drm_atomic.c
>> +++ b/drivers/gpu/drm/drm_atomic.c
>> @@ -476,6 +476,12 @@ static int drm_atomic_crtc_check(struct drm_crtc *crtc,
>>                 return -EINVAL;
>>         }
>>
>> +       if (!state->active && state->event) {
>> +               DRM_DEBUG_ATOMIC("[CRTC:%d] requesting event and not active\n",
>> +                                crtc->base.id);
>> +               return -EINVAL;
>> +       }
> Hmm, even if disabling? Maybe (!crtc->state->active && !state->active)
> && state->event.
How do you want to send a vblank event after disabling?

I think the only thing that makes sense would be not creating events when crtc_state->enable = false,
so when a crtc is removed and an event is requested you won't return -EINVAL.

~Maarten
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2015-08-06 11:19 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-30  7:03 drm/atomic: Reject events for inactive crtc's Maarten Lankhorst
2015-08-06  9:47 ` Daniel Stone
2015-08-06 11:19   ` Maarten Lankhorst [this message]
2015-08-06 12:49     ` Daniel Vetter
2015-08-27 14:36       ` Daniel Stone
2015-08-27 15:22         ` [Intel-gfx] " Daniel Vetter
2015-08-31  7:48           ` 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=55C342C7.4060501@linux.intel.com \
    --to=maarten.lankhorst@linux.intel.com \
    --cc=daniel@fooishbar.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.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