Message ID | 20170308141257.12119-22-daniel.vetter@ffwll.ch (mailing list archive) |
---|---|
State | Not Applicable, archived |
Delegated to: | Andy Gross |
Headers | show |
On Wed, Mar 08, 2017 at 03:12:54PM +0100, Daniel Vetter wrote: > The core takes care of handling the send_event vs. close() issues, we > can remove that driver code. > > Cc: Rob Clark <robdclark@gmail.com> > Cc: linux-arm-msm@vger.kernel.org > Cc: freedreno@lists.freedesktop.org > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> > --- > drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++--------- > drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++--------- > 2 files changed, 6 insertions(+), 18 deletions(-) > > diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c > index 1c29618f4ddb..f29194a74a19 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c > +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c > @@ -114,15 +114,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) file unused now? > spin_lock_irqsave(&dev->event_lock, flags); > event = mdp4_crtc->event; > if (event) { > - /* if regular vblank case (!file) or if cancel-flip from > - * preclose on file that requested flip, then send the > - * event: > - */ > - if (!file || (event->base.file_priv == file)) { > - mdp4_crtc->event = NULL; > - DBG("%s: send event: %p", mdp4_crtc->name, event); > - drm_crtc_send_vblank_event(crtc, event); > - } > + mdp4_crtc->event = NULL; > + DBG("%s: send event: %p", mdp4_crtc->name, event); > + drm_crtc_send_vblank_event(crtc, event); > } > spin_unlock_irqrestore(&dev->event_lock, flags); > } > diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c > index d0c8b38b96ce..87a19e0c0e67 100644 > --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c > +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c > @@ -138,15 +138,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) > spin_lock_irqsave(&dev->event_lock, flags); > event = mdp5_crtc->event; > if (event) { > - /* if regular vblank case (!file) or if cancel-flip from > - * preclose on file that requested flip, then send the > - * event: > - */ > - if (!file || (event->base.file_priv == file)) { > - mdp5_crtc->event = NULL; > - DBG("%s: send event: %p", crtc->name, event); > - drm_crtc_send_vblank_event(crtc, event); > - } > + mdp5_crtc->event = NULL; > + DBG("%s: send event: %p", crtc->name, event); > + drm_crtc_send_vblank_event(crtc, event); > } > spin_unlock_irqrestore(&dev->event_lock, flags); > > -- > 2.11.0 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/intel-gfx -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c index 1c29618f4ddb..f29194a74a19 100644 --- a/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c @@ -114,15 +114,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) spin_lock_irqsave(&dev->event_lock, flags); event = mdp4_crtc->event; if (event) { - /* if regular vblank case (!file) or if cancel-flip from - * preclose on file that requested flip, then send the - * event: - */ - if (!file || (event->base.file_priv == file)) { - mdp4_crtc->event = NULL; - DBG("%s: send event: %p", mdp4_crtc->name, event); - drm_crtc_send_vblank_event(crtc, event); - } + mdp4_crtc->event = NULL; + DBG("%s: send event: %p", mdp4_crtc->name, event); + drm_crtc_send_vblank_event(crtc, event); } spin_unlock_irqrestore(&dev->event_lock, flags); } diff --git a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c index d0c8b38b96ce..87a19e0c0e67 100644 --- a/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c +++ b/drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c @@ -138,15 +138,9 @@ static void complete_flip(struct drm_crtc *crtc, struct drm_file *file) spin_lock_irqsave(&dev->event_lock, flags); event = mdp5_crtc->event; if (event) { - /* if regular vblank case (!file) or if cancel-flip from - * preclose on file that requested flip, then send the - * event: - */ - if (!file || (event->base.file_priv == file)) { - mdp5_crtc->event = NULL; - DBG("%s: send event: %p", crtc->name, event); - drm_crtc_send_vblank_event(crtc, event); - } + mdp5_crtc->event = NULL; + DBG("%s: send event: %p", crtc->name, event); + drm_crtc_send_vblank_event(crtc, event); } spin_unlock_irqrestore(&dev->event_lock, flags);
The core takes care of handling the send_event vs. close() issues, we can remove that driver code. Cc: Rob Clark <robdclark@gmail.com> Cc: linux-arm-msm@vger.kernel.org Cc: freedreno@lists.freedesktop.org Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> --- drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c | 12 +++--------- drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-)