dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Vetter <daniel@ffwll.ch>
To: DRI Development <dri-devel@lists.freedesktop.org>,
	Dave Airlie <airlied@gmail.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: Re: [PATCH 00/12] kill-with-fire, resurrected 2nd part
Date: Wed, 18 Jul 2012 17:58:28 +0200	[thread overview]
Message-ID: <20120718155828.GG5348@phenom.ffwll.local> (raw)
In-Reply-To: <1339669507-6277-1-git-send-email-daniel.vetter@ffwll.ch>

On Thu, Jun 14, 2012 at 12:24:55PM +0200, Daniel Vetter wrote:
> Hi all,
> 
> Blind me has finally found the bug that killed via - dropping locks again in the
> early exit path is highly advised ;-)
> 
> The big part of this series is cleaning up buffer handling in the
> teardown/lastclose path: All special-cases only used by 1-2 drivers are moved
> into the drivers respective preclose functions (newly created in most cases),
> the remaining stuff is streamlined. The only things left in the common code
> which is not used by all drivers is used by at least a few of them.
> 
> So after this patch series the drm_release/lastclose stuff is now fairly
> readable and understandable. Originally I wanted to fix up a few of the resource
> leaks that are possible at module unload time, but got stuck at understanding
> the release/lastclose stuff ;-)
> 
> 4 drivers needed special treatement, unfortunately I couldn't get a tested by
> for sis. I've tried to ebay one of these old cards and found one that works with
> the sisfb and sis ddx driver, but unfortunately the sis mesa driver only
> supports one specific generations. But since drm/sis is more or less a 1:1 copy
> of drm/via I'm fairly sure that this will work, too.
> 
> The last two patches just kill stuff that I've noticed while crawling around in
> the close/release paths.
> 
> As usual, comments, flames, reviews (and especially from a sis users) tested-bys
> highly welcome.
> 
> Yours, Daniel

Reprod for inclusion into 3.6. Has been tested on all affected drivers by
some random people (and me), and imo really nicely shoves some horrible
stuff into driver-private close callbacks. Heck, I like this so much that
I've ebayed myself through a few sis cards until I've found one that
actually worked.  And then fixed the sis driver for 64bit ;-)

Note that the procfs patch is bogus, after some prodding by you on irc
we've dug up a few scripts that rely on this. And some strange tools in
libdrm.git to read out the procfs debug files and cat them together. So
don't include that one - it's smells like a mild form of abi breakage.

Cheers, Daniel

> 
> Daniel Vetter (12):
>   drm/via: clean up reclaim_buffers
>   drm/sis: clean up reclaim_buffers
>   drm: kill reclaim_buffers_idlelocked functions
>   Revert "Revert "drm/i810: cleanup reclaim_buffers""
>   drm: kill reclaim_buffers_locked
>   drm/savage: clean up reclaim_buffers
>   drm: kill reclaim_buffers callback
>   drm: ditch strange DRIVER_DMA_QUEUE only error bail-out
>   drm: kill dma queue support
>   drm: unconditionally clean up dma buffers of closing clients
>   drm: kill i915/i830 ids from drm_pciids.h
>   drm: kill procfs support
> 
>  drivers/gpu/drm/Makefile              |    2 +-
>  drivers/gpu/drm/drm_bufs.c            |   16 +--
>  drivers/gpu/drm/drm_debugfs.c         |    1 -
>  drivers/gpu/drm/drm_dma.c             |    5 -
>  drivers/gpu/drm/drm_drv.c             |   19 ---
>  drivers/gpu/drm/drm_fops.c            |   63 +---------
>  drivers/gpu/drm/drm_info.c            |   36 ------
>  drivers/gpu/drm/drm_lock.c            |    4 -
>  drivers/gpu/drm/drm_proc.c            |  221 ---------------------------------
>  drivers/gpu/drm/drm_stub.c            |   25 ++--
>  drivers/gpu/drm/gma500/psb_drv.c      |    1 -
>  drivers/gpu/drm/i810/i810_dma.c       |   17 ++-
>  drivers/gpu/drm/i810/i810_drv.c       |    3 +-
>  drivers/gpu/drm/i810/i810_drv.h       |    6 +-
>  drivers/gpu/drm/i915/i915_drv.c       |    1 -
>  drivers/gpu/drm/mga/mga_drv.c         |    1 -
>  drivers/gpu/drm/nouveau/nouveau_drv.c |    1 -
>  drivers/gpu/drm/r128/r128_drv.c       |    1 -
>  drivers/gpu/drm/radeon/radeon_drv.c   |    2 -
>  drivers/gpu/drm/savage/savage_bci.c   |    9 +-
>  drivers/gpu/drm/savage/savage_drv.c   |    2 +-
>  drivers/gpu/drm/sis/sis_drv.c         |    3 +-
>  drivers/gpu/drm/sis/sis_mm.c          |   13 +-
>  drivers/gpu/drm/tdfx/tdfx_drv.c       |    1 -
>  drivers/gpu/drm/via/via_drv.c         |    4 +-
>  drivers/gpu/drm/via/via_mm.c          |   13 +-
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c   |    1 -
>  include/drm/drmP.h                    |   23 +---
>  include/drm/drm_pciids.h              |   42 -------
>  29 files changed, 60 insertions(+), 476 deletions(-)
>  delete mode 100644 drivers/gpu/drm/drm_proc.c
> 
> -- 
> 1.7.10
> 

-- 
Daniel Vetter
Mail: daniel@ffwll.ch
Mobile: +41 (0)79 365 57 48

      parent reply	other threads:[~2012-07-18 15:58 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-14 10:24 [PATCH 00/12] kill-with-fire, resurrected 2nd part Daniel Vetter
2012-06-14 10:24 ` [PATCH 01/12] drm/via: clean up reclaim_buffers Daniel Vetter
2012-06-14 10:24 ` [PATCH 02/12] drm/sis: " Daniel Vetter
2012-06-24 18:09   ` Daniel Vetter
2012-06-14 10:24 ` [PATCH 03/12] drm: kill reclaim_buffers_idlelocked functions Daniel Vetter
2012-06-14 10:24 ` [PATCH 04/12] Revert "Revert "drm/i810: cleanup reclaim_buffers"" Daniel Vetter
2012-06-14 10:25 ` [PATCH 05/12] drm: kill reclaim_buffers_locked Daniel Vetter
2012-06-14 10:25 ` [PATCH 06/12] drm/savage: clean up reclaim_buffers Daniel Vetter
2012-06-14 10:25 ` [PATCH 07/12] drm: kill reclaim_buffers callback Daniel Vetter
2012-06-14 10:25 ` [PATCH 08/12] drm: ditch strange DRIVER_DMA_QUEUE only error bail-out Daniel Vetter
2012-06-14 10:25 ` [PATCH 09/12] drm: kill dma queue support Daniel Vetter
2012-06-14 10:25 ` [PATCH 10/12] drm: unconditionally clean up dma buffers of closing clients Daniel Vetter
2012-06-14 10:25 ` [PATCH 11/12] drm: kill i915/i830 ids from drm_pciids.h Daniel Vetter
2012-06-14 10:25 ` [PATCH 12/12] drm: kill procfs support Daniel Vetter
2012-07-18 15:58 ` Daniel Vetter [this message]

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=20120718155828.GG5348@phenom.ffwll.local \
    --to=daniel@ffwll.ch \
    --cc=airlied@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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