Re: [Intel-gfx] drm/atomic: Reject events for inactive crtc's.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 06, 2015 at 01:19:35PM +0200, Maarten Lankhorst wrote:
> Hey,
> 
> Op 06-08-15 om 11:47 schreef Daniel Stone:
> > Hi,
> >
> > On 30 July 2015 at 08:03, Maarten Lankhorst
> > <maarten.lankhorst@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx>
> >> ---
> >> 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?

The event would be when we stop scanning out, but yeah that's a bit a
tricky one. I guess for now (until we have someone who needs this) we
could just merge Maarten's patch as the easier thing to do right now?
Maybe with a small code comment that this is intentional?

Atomic is a ridiculously complex interface, restricting it to just the
features we actually need is imo the right approach.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux