All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	Intel Graphics Development <intel-gfx@lists.freedesktop.org>,
	Tomi Valkeinen <tomi.valkeinen@ti.com>,
	DRI Development <dri-devel@lists.freedesktop.org>,
	Daniel Vetter <daniel.vetter@intel.com>
Subject: Re: [PATCH 15/21] drm/omap: Nuke close hooks
Date: Mon, 11 Jan 2016 08:10:47 +0100	[thread overview]
Message-ID: <20160111071047.GD8076@phenom.ffwll.local> (raw)
In-Reply-To: <1566831.sSa8MjPJOe@avalon>

On Mon, Jan 11, 2016 at 02:03:34AM +0200, Laurent Pinchart wrote:
> Hi Daniel,
> 
> Thank you for the patch.
> 
> On Friday 08 January 2016 21:36:47 Daniel Vetter wrote:
> > Again since the core takes care of this we can remove them. While at
> > it also remove the postclose hook, it's empty.
> >
> > Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> > Cc: Tomi Valkeinen <tomi.valkeinen@ti.com>
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > ---
> >  drivers/gpu/drm/omapdrm/omap_drv.c | 29 -----------------------------
> >  1 file changed, 29 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/omapdrm/omap_drv.c
> > b/drivers/gpu/drm/omapdrm/omap_drv.c index dfafdb602ad2..e8b5080f6e2d
> > 100644
> > --- a/drivers/gpu/drm/omapdrm/omap_drv.c
> > +++ b/drivers/gpu/drm/omapdrm/omap_drv.c
> > @@ -787,33 +787,6 @@ static void dev_lastclose(struct drm_device *dev)
> >  	}
> >  }
> > 
> > -static void dev_preclose(struct drm_device *dev, struct drm_file *file)
> > -{
> > -	struct omap_drm_private *priv = dev->dev_private;
> > -	struct drm_pending_event *event;
> > -	unsigned long flags;
> > -
> > -	DBG("preclose: dev=%p", dev);
> > -
> > -	/*
> > -	 * Unlink all pending CRTC events to make sure they won't be queued up
> > -	 * by a pending asynchronous commit.
> > -	 */
> > -	spin_lock_irqsave(&dev->event_lock, flags);
> > -	list_for_each_entry(event, &priv->commit.events, link) {
> > -		if (event->file_priv == file) {
> > -			file->event_space += event->event->length;
> > -			event->file_priv = NULL;
> > -		}
> > -	}
> > -	spin_unlock_irqrestore(&dev->event_lock, flags);
> > -}
> > -
> > -static void dev_postclose(struct drm_device *dev, struct drm_file *file)
> > -{
> > -	DBG("postclose: dev=%p, file=%p", dev, file);
> > -}
> > -
> 
> You can also nuke the following code from omap_atomic_commit():
> 
>         /* Keep track of all CRTC events to unlink them in preclose(). */
>         spin_lock_irqsave(&dev->event_lock, flags);
>         for (i = 0; i < dev->mode_config.num_crtc; ++i) {
>                 struct drm_crtc_state *cstate = state->crtc_states[i];
> 
>                 if (cstate && cstate->event)
>                         list_add_tail(&cstate->event->base.link,
>                                       &priv->commit.events);
>         }
>         spin_unlock_irqrestore(&dev->event_lock, flags);
> 
> and the priv->commit.events field in omap_drv.h (don't forget the structure 
> kerneldoc).

Oh this is really good, since hunting for related code I noticed that omap
doesn't send out the vblank event when the fpriv disappeared. So found
even more code to remove. I didn't find any kerneldoc though.
-Daniel

> 
> >  static const struct vm_operations_struct omap_gem_vm_ops = {
> >  	.fault = omap_gem_fault,
> >  	.open = drm_gem_vm_open,
> > @@ -838,8 +811,6 @@ static struct drm_driver omap_drm_driver = {
> >  	.unload = dev_unload,
> >  	.open = dev_open,
> >  	.lastclose = dev_lastclose,
> > -	.preclose = dev_preclose,
> > -	.postclose = dev_postclose,
> >  	.set_busid = drm_platform_set_busid,
> >  	.get_vblank_counter = drm_vblank_no_hw_counter,
> >  	.enable_vblank = omap_irq_enable_vblank,
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

  reply	other threads:[~2016-01-11  7:10 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-08 20:36 [PATCH 00/21] drm_event cleanup Daniel Vetter
2016-01-08 20:36 ` [PATCH 01/21] drm: kerneldoc for drm_fops.c Daniel Vetter
2016-01-08 20:36 ` [PATCH 02/21] drm: Add functions to setup/tear down drm_events Daniel Vetter
2016-01-08 21:10   ` Alex Deucher
2016-01-09 13:27   ` [PATCH] " Daniel Vetter
2016-01-08 20:36 ` [PATCH 03/21] drm/exynos: Use the new event init/free functions Daniel Vetter
2016-01-08 20:36 ` [PATCH 04/21] drm/vmwgfx: " Daniel Vetter
2016-01-08 20:36 ` [PATCH 05/21] drm: Create drm_send_event helpers Daniel Vetter
2016-01-09 13:28   ` [PATCH] " Daniel Vetter
2016-01-08 20:36 ` [PATCH 06/21] drm/fsl: Remove preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 07/21] drm/armada: Remove NULL open/pre/postclose hooks Daniel Vetter
2016-01-08 20:36 ` [PATCH 08/21] drm/gma500: Remove empty preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 09/21] drm: Clean up pending events in the core Daniel Vetter
2016-01-09 13:28   ` [PATCH] " Daniel Vetter
2016-01-10 23:48     ` Laurent Pinchart
2016-01-11 14:51       ` [Intel-gfx] " Daniel Stone
2016-01-14 18:49         ` Laurent Pinchart
2016-01-08 20:36 ` [PATCH 10/21] drm/i915: Nuke intel_modeset_preclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 11/21] drm/atmel: Nuke preclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 12/21] drm/exynos: Remove event cancelling from postclose Daniel Vetter
2016-01-08 20:36 ` [PATCH 13/21] drm/imx: Unconfuse preclose logic Daniel Vetter
2016-01-08 20:36 ` [PATCH 14/21] drm/msm: Nuke preclose hooks Daniel Vetter
2016-01-08 20:36 ` [PATCH 15/21] drm/omap: Nuke close hooks Daniel Vetter
2016-01-11  0:03   ` Laurent Pinchart
2016-01-11  7:10     ` Daniel Vetter [this message]
2016-01-08 20:36 ` [PATCH 16/21] drm/rcar: Nuke preclose hook Daniel Vetter
2016-01-11  0:01   ` Laurent Pinchart
2016-01-08 20:36 ` [PATCH 17/21] drm/shmob: " Daniel Vetter
2016-01-10 22:26   ` [PATCH 1/5] " Daniel Vetter
2016-01-10 22:26     ` [PATCH 2/5] drm/tegra: Stop cancelling page flip events Daniel Vetter
2016-01-10 22:26     ` [PATCH 3/5] drm/tilcdc: Nuke preclose hook Daniel Vetter
2016-01-10 22:26     ` [PATCH 4/5] drm/vc4: " Daniel Vetter
2016-01-10 22:26     ` [PATCH 5/5] drm/vmwgfx: " Daniel Vetter
2016-01-11 10:20       ` Thomas Hellstrom
2016-01-11  0:00     ` [PATCH 1/5] drm/shmob: " Laurent Pinchart
2016-01-08 20:36 ` [PATCH 18/21] drm/tegra: Stop cancelling page flip events Daniel Vetter
2016-01-08 20:36 ` [PATCH 19/21] drm/tilcdc: Nuke preclose hook Daniel Vetter
2016-01-08 20:36 ` [PATCH 20/21] drm/vc4: " Daniel Vetter
2016-01-08 20:36 ` [PATCH 21/21] drm/vmwgfx: " Daniel Vetter
2016-01-08 20:53   ` Thomas Hellstrom
2016-01-09 10:43     ` Daniel Vetter
2016-01-10 20:52       ` Thomas Hellstrom
2016-01-10 21:59         ` Daniel Vetter
2016-01-10 22:02   ` [PATCH] " Daniel Vetter
2016-01-10 22:17     ` Thomas Hellstrom
2016-01-10 22:22       ` Daniel Vetter
2016-01-08 21:47 ` [PATCH 00/21] drm_event cleanup Alex Deucher
2016-01-09 13:32 ` Daniel Vetter
2016-01-11 11:20 ` ✗ failure: Fi.CI.BAT Patchwork
2016-01-12 16:24   ` Daniel Vetter

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=20160111071047.GD8076@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=daniel.vetter@ffwll.ch \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=tomi.valkeinen@ti.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.