dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
From: Alex Deucher <alexdeucher@gmail.com>
To: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: DRI Development <dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 00/39] clean out drm cruft and hide it better for kms drivers
Date: Thu, 11 Jul 2013 10:09:35 -0400	[thread overview]
Message-ID: <CADnq5_PE5WaNsD+tD2=N1TGqtkwBmtdR1srQ-TBq+dvTH1jB9Q@mail.gmail.com> (raw)
In-Reply-To: <1373458333-5988-1-git-send-email-daniel.vetter@ffwll.ch>

On Wed, Jul 10, 2013 at 8:11 AM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Hi all,
>
> I've figured that it's again time for a bit of (late) drm spring cleanup. This
> series here consists of a pile of "rip old stuff out" patches interleaved with
> "disable old cruft for kms drivers and hide it better".
>
> Comments, flames and review highly welcome. I'd be especially happy if the arm
> guys could check whether I haven't badly broken their drivers - compile-testing
> arm is a pita, so I haven't yet done that.
>
> There's a few driver-wide patches included, but the more invasive ones (i.e.
> changing more than the drm driver vtable) are split out per-driver for easier
> merging. If no one screams my plan is to rebase this pile on top of -rc1, give
> it some more testing (check arm, ugh) and then send a pull request to Dave.
> That should reduce interference with ongoing driver work as much as possible I
> hope.
>
> My drm cruft todo list still has a pile of ideas, but I've figured I need to
> stop now for 3.12. For those interested further cleanups could include:
>
> - setversion/set_busid: All drm core version 1.1 is legacy cruft, kms drivers
>   should never run in this mode. We could clean up the setversion ioclt (and
>   move the drm core version handling into a legacy function) and set up the bus
>   id unconditionally at driver load time.
>
> - There's a few more legacy ioctls/subsystems that could be blocked out for kms
>   drivers (but the required git history digging tends to be tedious). Also I
>   think we could more aggressively move legacy cruft setup/teardown code
>   out-of-line from the main code by extracting it into drm_legacy_ functions
>   (like this series here already does for the context and dma stuff).
>
> - I think creating a drm_internal.h header for functions not exported to drivers
>   would be useful. That way we could move all the legacy functions out of drmP.h
>   (which are a lot of them), which should make it much clearer what the real drm
>   driver interface actually is.
>
> - drm_os_linux.h should just die in fire.
>
> - There's a pile of needless indirection around our agp handling, we duplicate
>   the agp core's CONFIG_AGP=n no-oping function handling in large parts, among
>   other stuff.
>
> - The drm coherent dma alloc helpers could get ripped out, at least for kms
>   drivers. For ums drivers there's some funny cases where this mapping is
>   exchanged with userspace for e.g. register access. In a least one case
>   (i810.ko) userspace even sets up that mapping, which allows it to crash the
>   kernel at will (since those maps aren't refcounted). Maybe we need to shovel
>   those interfaces into a drm_legacy.ko module to keep them around but make sure
>   that no new driver even thinks about using them.
>
> - There's also the matter of the vblank support code, imo that should be split
>   int a ums and a kms part. That'd would allow us to use struct drm_crtc * in
>   interfaces and proper locking (by grabbing crtc->mutex to exclude races with
>   dpms/modesets).
>
> If anyone wants to dig around in those areas please poke me.
>

For the series:

Reviewed-by: Alex Deucher <alexander.deucher@amd.com>

> Cheers, Daniel
>
> Daniel Vetter (39):
>   drm: remove drm_modctx ioctl and use drm_noop instead
>   drm: kill dev->context_wait
>   drm: remove dev->last_switch
>   drm: kill dev->interrupt_flag and dev->dma_flag
>   drm: kill dev->ctx_start and dev->lck_start
>   drm/radoen: kill radeon_dma_ioctl_kms
>   drm: kill dev->buf_readers and dev->buf_writers
>   drm: remove redundant clears from drm_setup
>   drm/omap: kill firstopen callback
>   drm/radeon: kill firstopen callback for kms driver
>   drm/imx: kill firstopen callback
>   drm/vmwgfx: remove ->firstopen callback
>   drm: don't call ->firstopen for KMS drivers
>   drm: kill dev->driver->set_version
>   drm/radeon: remove DRIVER_HAS_DMA/SG/PCI_DMA from the kms driver
>   drm: fold in drm_sg_alloc into the ioctl
>   drm: hide legacy sg cleanup better from common code
>   drm: disallow legacy sg ioctls for modesetting drivers
>   drm: mark dma setup/teardown as legacy systems
>   drm/nouveau: drop DRIVER_PCI_DMA and DRIVER_SG
>   drm: disallow legacy dma ioctls for modesetting drivers
>   drm: move drm_getsarea into drm_bufs.c
>   drm/bufs: s/drm_order/order_base_2/
>   drm/r128: s/drm_order/order_base_2/
>   drm/radeon: s/drm_order/order_base_2/
>   drm: remove drm_order
>   drm: mark context support as a legacy subsystem
>   drm/vmwgfx: remove redundant clearing of driver->dma_quiescent
>   drm: remove FASYNC support
>   drm: rip out DRIVER_FB_DMA and related code
>   drm: rip out a few unused DRIVER flags
>   drm: remove a bunch of unused #defines from drmP.h
>   drm: rip out drm_core_has_MTRR checks
>   drm: remove the dma_ioctl special-case
>   drm/memory: don't export agp helpers
>   drm: hollow-out GET_CLIENT ioctl
>   drm: no-op out GET_STATS ioctl
>   drm: fix locking in gem debugfs/procfs file
>   drm: remove procfs code, take 2
>
>  drivers/gpu/drm/Makefile                 |   2 +-
>  drivers/gpu/drm/ast/ast_drv.c            |   1 -
>  drivers/gpu/drm/cirrus/cirrus_drv.c      |   1 -
>  drivers/gpu/drm/drm_bufs.c               | 238 +++++++------------------------
>  drivers/gpu/drm/drm_context.c            |  81 ++++++++---
>  drivers/gpu/drm/drm_dma.c                |  17 ++-
>  drivers/gpu/drm/drm_drv.c                |  44 +-----
>  drivers/gpu/drm/drm_fops.c               |  66 +--------
>  drivers/gpu/drm/drm_info.c               |   4 +
>  drivers/gpu/drm/drm_ioctl.c              |  43 +-----
>  drivers/gpu/drm/drm_memory.c             |   2 -
>  drivers/gpu/drm/drm_pci.c                |  11 +-
>  drivers/gpu/drm/drm_proc.c               | 209 ---------------------------
>  drivers/gpu/drm/drm_scatter.c            |  29 ++--
>  drivers/gpu/drm/drm_stub.c               |  44 ++----
>  drivers/gpu/drm/drm_vm.c                 |   3 +-
>  drivers/gpu/drm/gma500/psb_drv.c         |   3 +-
>  drivers/gpu/drm/i810/i810_dma.c          |   1 -
>  drivers/gpu/drm/i810/i810_drv.c          |   1 -
>  drivers/gpu/drm/i915/i915_drv.c          |   1 -
>  drivers/gpu/drm/mga/mga_drv.c            |   1 -
>  drivers/gpu/drm/mgag200/mgag200_drv.c    |   1 -
>  drivers/gpu/drm/nouveau/nouveau_drm.c    |   3 +-
>  drivers/gpu/drm/omapdrm/omap_drv.c       |   8 --
>  drivers/gpu/drm/qxl/qxl_drv.c            |   1 -
>  drivers/gpu/drm/r128/r128_cce.c          |   2 +-
>  drivers/gpu/drm/r128/r128_drv.c          |   1 -
>  drivers/gpu/drm/radeon/cik.c             |  14 +-
>  drivers/gpu/drm/radeon/evergreen.c       |   4 +-
>  drivers/gpu/drm/radeon/ni.c              |   6 +-
>  drivers/gpu/drm/radeon/r100.c            |   2 +-
>  drivers/gpu/drm/radeon/r600.c            |  14 +-
>  drivers/gpu/drm/radeon/r600_cp.c         |   6 +-
>  drivers/gpu/drm/radeon/radeon_cp.c       |   6 +-
>  drivers/gpu/drm/radeon/radeon_drv.c      |  11 +-
>  drivers/gpu/drm/radeon/radeon_kms.c      |  23 ---
>  drivers/gpu/drm/radeon/si.c              |  14 +-
>  drivers/gpu/drm/savage/savage_drv.c      |   1 -
>  drivers/gpu/drm/shmobile/shmob_drm_drv.c |   1 -
>  drivers/gpu/drm/sis/sis_drv.c            |   1 -
>  drivers/gpu/drm/tdfx/tdfx_drv.c          |   1 -
>  drivers/gpu/drm/tilcdc/tilcdc_drv.c      |   1 -
>  drivers/gpu/drm/udl/udl_drv.c            |   1 -
>  drivers/gpu/drm/via/via_drv.c            |   1 -
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.c      |  20 ---
>  drivers/gpu/drm/vmwgfx/vmwgfx_drv.h      |   1 -
>  drivers/gpu/host1x/drm/drm.c             |   1 -
>  drivers/staging/imx-drm/imx-drm-core.c   |  20 +--
>  include/drm/drmP.h                       |  65 ++-------
>  49 files changed, 239 insertions(+), 793 deletions(-)
>  delete mode 100644 drivers/gpu/drm/drm_proc.c
>
> --
> 1.8.3.2
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/dri-devel

      parent reply	other threads:[~2013-07-11 14:09 UTC|newest]

Thread overview: 70+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-10 12:11 [PATCH 00/39] clean out drm cruft and hide it better for kms drivers Daniel Vetter
2013-07-10 12:11 ` [PATCH 01/39] drm: remove drm_modctx ioctl and use drm_noop instead Daniel Vetter
2013-07-10 12:11 ` [PATCH 02/39] drm: kill dev->context_wait Daniel Vetter
2013-07-10 12:11 ` [PATCH 03/39] drm: remove dev->last_switch Daniel Vetter
2013-07-10 12:11 ` [PATCH 04/39] drm: kill dev->interrupt_flag and dev->dma_flag Daniel Vetter
2013-07-10 12:11 ` [PATCH 05/39] drm: kill dev->ctx_start and dev->lck_start Daniel Vetter
2013-07-10 12:11 ` [PATCH 06/39] drm/radoen: kill radeon_dma_ioctl_kms Daniel Vetter
2013-07-10 12:11 ` [PATCH 07/39] drm: kill dev->buf_readers and dev->buf_writers Daniel Vetter
2013-07-10 12:11 ` [PATCH 08/39] drm: remove redundant clears from drm_setup Daniel Vetter
2013-07-10 13:28   ` David Herrmann
2013-07-10 15:19     ` Daniel Vetter
2013-07-10 12:11 ` [PATCH 09/39] drm/omap: kill firstopen callback Daniel Vetter
2013-07-10 12:11 ` [PATCH 10/39] drm/radeon: kill firstopen callback for kms driver Daniel Vetter
2013-07-10 12:11 ` [PATCH 11/39] drm/imx: kill firstopen callback Daniel Vetter
2013-07-10 12:11 ` [PATCH 12/39] drm/vmwgfx: remove ->firstopen callback Daniel Vetter
2013-07-10 12:11 ` [PATCH 13/39] drm: don't call ->firstopen for KMS drivers Daniel Vetter
2013-07-10 18:17   ` [PATCH] " Daniel Vetter
2013-07-11  7:54     ` Laurent Pinchart
2013-07-11 10:19       ` Daniel Vetter
2013-07-13 14:45         ` Daniel Vetter
2013-07-22  9:02           ` Laurent Pinchart
2013-07-10 12:11 ` [PATCH 14/39] drm: kill dev->driver->set_version Daniel Vetter
2013-07-10 12:11 ` [PATCH 15/39] drm/radeon: remove DRIVER_HAS_DMA/SG/PCI_DMA from the kms driver Daniel Vetter
2013-07-10 12:11 ` [PATCH 16/39] drm: fold in drm_sg_alloc into the ioctl Daniel Vetter
2013-07-10 12:11 ` [PATCH 17/39] drm: hide legacy sg cleanup better from common code Daniel Vetter
2013-07-10 12:11 ` [PATCH 18/39] drm: disallow legacy sg ioctls for modesetting drivers Daniel Vetter
2013-07-10 12:11 ` [PATCH 19/39] drm: mark dma setup/teardown as legacy systems Daniel Vetter
2013-07-10 12:11 ` [PATCH 20/39] drm/nouveau: drop DRIVER_PCI_DMA and DRIVER_SG Daniel Vetter
2013-07-10 12:11 ` [PATCH 21/39] drm: disallow legacy dma ioctls for modesetting drivers Daniel Vetter
2013-07-10 12:11 ` [PATCH 22/39] drm: move drm_getsarea into drm_bufs.c Daniel Vetter
2013-07-10 12:11 ` [PATCH 23/39] drm/bufs: s/drm_order/order_base_2/ Daniel Vetter
2013-07-10 12:11 ` [PATCH 24/39] drm/r128: s/drm_order/order_base_2/ Daniel Vetter
2013-07-10 12:11 ` [PATCH 25/39] drm/radeon: s/drm_order/order_base_2/ Daniel Vetter
2013-07-10 12:12 ` [PATCH 26/39] drm: remove drm_order Daniel Vetter
2013-07-10 12:12 ` [PATCH 27/39] drm: mark context support as a legacy subsystem Daniel Vetter
2013-07-10 12:12 ` [PATCH 28/39] drm/vmwgfx: remove redundant clearing of driver->dma_quiescent Daniel Vetter
2013-07-10 12:12 ` [PATCH 29/39] drm: remove FASYNC support Daniel Vetter
2013-07-10 14:57   ` [PATCH] " Daniel Vetter
2013-07-10 15:24     ` Daniel Vetter
2013-07-10 15:25     ` Daniel Vetter
2013-07-11  0:26       ` Laurent Pinchart
2013-07-10 12:12 ` [PATCH 30/39] drm: rip out DRIVER_FB_DMA and related code Daniel Vetter
2013-07-10 12:12 ` [PATCH 31/39] drm: rip out a few unused DRIVER flags Daniel Vetter
2013-07-10 12:12 ` [PATCH 32/39] drm: remove a bunch of unused #defines from drmP.h Daniel Vetter
2013-07-10 12:12 ` [PATCH 33/39] drm: rip out drm_core_has_MTRR checks Daniel Vetter
2013-07-10 13:51   ` David Herrmann
2013-07-10 15:22     ` Daniel Vetter
2013-07-10 15:41       ` David Herrmann
2013-07-10 15:59         ` Daniel Vetter
2013-07-10 16:13           ` [PATCH 1/2] " Daniel Vetter
2013-07-10 16:13             ` [PATCH 2/2] drm/docs: rip out removed driver flags documentation Daniel Vetter
2013-07-10 16:27           ` [PATCH 33/39] drm: rip out drm_core_has_MTRR checks Andy Lutomirski
2013-07-10 16:41             ` Daniel Vetter
2013-07-10 12:12 ` [PATCH 34/39] drm: remove the dma_ioctl special-case Daniel Vetter
2013-07-10 14:34   ` David Herrmann
2013-07-10 14:59     ` [PATCH] " Daniel Vetter
2013-07-10 12:12 ` [PATCH 35/39] drm/memory: don't export agp helpers Daniel Vetter
2013-07-10 12:12 ` [PATCH 36/39] drm: hollow-out GET_CLIENT ioctl Daniel Vetter
2013-07-16 12:33   ` Daniel Vetter
2013-07-16 13:14     ` [PATCH] " Daniel Vetter
2013-07-16 13:30       ` Chris Wilson
2013-07-17 13:52       ` David Herrmann
2013-07-10 12:12 ` [PATCH 37/39] drm: no-op out GET_STATS ioctl Daniel Vetter
2013-07-10 12:12 ` [PATCH 38/39] drm: fix locking in gem debugfs/procfs file Daniel Vetter
2013-07-10 12:12 ` [PATCH 39/39] drm: remove procfs code, take 2 Daniel Vetter
2013-07-10 20:44   ` [PATCH] " Daniel Vetter
2013-07-10 15:32 ` [PATCH 00/39] clean out drm cruft and hide it better for kms drivers David Herrmann
2013-07-10 15:51 ` [PATCH 1/2] drm: rip out dev->last_checked Daniel Vetter
2013-07-10 15:51   ` [PATCH 2/2] drm: move dev data clearing from drm_setup to lastclose Daniel Vetter
2013-07-11 14:09 ` Alex Deucher [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='CADnq5_PE5WaNsD+tD2=N1TGqtkwBmtdR1srQ-TBq+dvTH1jB9Q@mail.gmail.com' \
    --to=alexdeucher@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;
as well as URLs for NNTP newsgroup(s).