All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Zimmermann <tzimmermann@suse.de>
To: christian.koenig@amd.com, ray.huang@amd.com, Jerry.Zhang@amd.com,
	alexander.deucher@amd.com, David1.Zhou@amd.com, airlied@linux.ie,
	kraxel@redhat.com, bskeggs@redhat.com, syeh@vmware.com,
	z.liuxinliang@hisilicon.com, zourongrong@gmail.com,
	kong.kongxinwei@hisilicon.com, puck.chen@hisilicon.com
Cc: Thomas Zimmermann <tzimmermann@suse.de>,
	amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: [RFC][PATCH 00/18] Provide a nice interface for TTM global state
Date: Fri, 19 Oct 2018 10:54:05 +0200	[thread overview]
Message-ID: <20181019085423.28159-1-tzimmermann@suse.de> (raw)

This is the full patch set for cleaning up the TTM global-state handling
and offering a nice interface for drivers. The first 3 patches have been
discussed on dri-devel already.

Patch [01] adds struct ttm_global, a data structure that gives drivers
a handle ot the global TTM state.

Patches [02] to [13] convert all TTM drivers to struct ttm_global.

Patches [14] and [15] remove unused code.

Patches [16] to [18] merge the functionality of struct drm_global_reference
into the implementation of struct ttm_global and remove the former.

I'd really like to see patches [01] to [15] being merging in one way or the
other. Using struct ttm_global allows for sharing code that touches TTM
internals, and it gets drivers out of the way for the cleanup of the final
3 patches.

One question was if the current infrastructure around drm_global_reference
isn't over-engineered and could be simplified. For now, I took the existing
ref-counting as it is in drm_global.c. This can certainly be simplified if
prefered.

Thomas Zimmermann (18):
  drm/ttm: Provide struct ttm_global for referencing TTM global state
  drm/amdgpu: Replace TTM initialization/release with ttm_global
  drm/radeon: Replace TTM initialization/release with ttm_global
  drm/ast: Replace TTM initialization/release with ttm_global
  drm/bochs: Replace TTM initialization/release with ttm_global
  drm/cirrus: Replace TTM initialization/release with ttm_global
  drm/hisilicon: Replace TTM initialization/release with ttm_global
  drm/mgag200: Replace TTM initialization/release with ttm_global
  drm/nouveau: Replace TTM initialization/release with ttm_global
  drm/qlx: Replace TTM initialization/release with ttm_global
  drm/virtio: Replace TTM initialization/release with ttm_global
  drm/vmwgfx: Replace TTM initialization/release with ttm_global
  staging/vboxvideo: Replace TTM initialization/release with ttm_global
  drm/ttm: Remove struct ttm_bo_global_ref and helpers
  drm: Remove DRM_GLOBAL_TTM_OBJECT
  drm/ttm: Implement struct ttm_global_item and helpers
  drm/ttm: Implement struct ttm_global with struct ttm_global_ref
  drm: Remove drm_global.{c,h}

 drivers/gpu/drm/Makefile                      |   2 +-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c       |  63 +-----
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h       |   4 +-
 drivers/gpu/drm/ast/ast_drv.h                 |   5 +-
 drivers/gpu/drm/ast/ast_ttm.c                 |  49 +----
 drivers/gpu/drm/bochs/bochs.h                 |   5 +-
 drivers/gpu/drm/bochs/bochs_mm.c              |  47 +----
 drivers/gpu/drm/cirrus/cirrus_drv.h           |   5 +-
 drivers/gpu/drm/cirrus/cirrus_ttm.c           |  49 +----
 drivers/gpu/drm/drm_drv.c                     |   2 -
 drivers/gpu/drm/drm_global.c                  | 137 ------------
 drivers/gpu/drm/gma500/psb_drv.h              |   4 +-
 .../gpu/drm/hisilicon/hibmc/hibmc_drm_drv.h   |   4 +-
 drivers/gpu/drm/hisilicon/hibmc/hibmc_ttm.c   |  36 +---
 drivers/gpu/drm/mgag200/mgag200_drv.h         |   7 +-
 drivers/gpu/drm/mgag200/mgag200_ttm.c         |  49 +----
 drivers/gpu/drm/nouveau/nouveau_drv.h         |   5 +-
 drivers/gpu/drm/nouveau/nouveau_ttm.c         |  48 +----
 drivers/gpu/drm/qxl/qxl_drv.h                 |   4 +-
 drivers/gpu/drm/qxl/qxl_ttm.c                 |  40 +---
 drivers/gpu/drm/radeon/radeon.h               |   4 +-
 drivers/gpu/drm/radeon/radeon_ttm.c           |  40 +---
 drivers/gpu/drm/ttm/Makefile                  |   2 +-
 drivers/gpu/drm/ttm/ttm_global.c              | 198 ++++++++++++++++++
 drivers/gpu/drm/virtio/virtgpu_drv.h          |   4 +-
 drivers/gpu/drm/virtio/virtgpu_ttm.c          |  40 +---
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c           |   6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h           |   6 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ttm_glue.c      |  44 +---
 drivers/staging/vboxvideo/vbox_drv.h          |   4 +-
 drivers/staging/vboxvideo/vbox_ttm.c          |  42 +---
 include/drm/drmP.h                            |   1 -
 include/drm/drm_global.h                      |  53 -----
 include/drm/ttm/ttm_bo_driver.h               |  40 ----
 include/drm/ttm/ttm_global.h                  | 100 +++++++++
 35 files changed, 401 insertions(+), 748 deletions(-)
 delete mode 100644 drivers/gpu/drm/drm_global.c
 create mode 100644 drivers/gpu/drm/ttm/ttm_global.c
 delete mode 100644 include/drm/drm_global.h
 create mode 100644 include/drm/ttm/ttm_global.h

--
2.19.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

             reply	other threads:[~2018-10-19  8:54 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-19  8:54 Thomas Zimmermann [this message]
2018-10-19  8:54 ` [PATCH 01/18] drm/ttm: Provide struct ttm_global for referencing TTM global state Thomas Zimmermann
     [not found]   ` <20181019085423.28159-2-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2018-10-19  9:30     ` Christian König
2018-10-19  9:41       ` Thomas Zimmermann
     [not found]         ` <616760d1-6598-9769-f058-54777e55b392-l3A5Bk7waGM@public.gmane.org>
2018-10-19  9:45           ` Koenig, Christian
2018-10-19  8:54 ` [PATCH 03/18] drm/radeon: Replace TTM initialization/release with ttm_global Thomas Zimmermann
2018-10-19  8:54 ` [PATCH 04/18] drm/ast: " Thomas Zimmermann
2018-10-19  8:54 ` [PATCH 07/18] drm/hisilicon: " Thomas Zimmermann
     [not found] ` <20181019085423.28159-1-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2018-10-19  8:54   ` [PATCH 02/18] drm/amdgpu: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 05/18] drm/bochs: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 06/18] drm/cirrus: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 08/18] drm/mgag200: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 09/18] drm/nouveau: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 10/18] drm/qlx: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 11/18] drm/virtio: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 12/18] drm/vmwgfx: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 13/18] staging/vboxvideo: " Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 15/18] drm: Remove DRM_GLOBAL_TTM_OBJECT Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 16/18] drm/ttm: Implement struct ttm_global_item and helpers Thomas Zimmermann
2018-10-19  8:54   ` [PATCH 18/18] drm: Remove drm_global.{c,h} Thomas Zimmermann
2018-10-19  8:54 ` [PATCH 14/18] drm/ttm: Remove struct ttm_bo_global_ref and helpers Thomas Zimmermann
2018-10-19  8:54 ` [PATCH 17/18] drm/ttm: Implement struct ttm_global with struct ttm_global_ref Thomas Zimmermann

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=20181019085423.28159-1-tzimmermann@suse.de \
    --to=tzimmermann@suse.de \
    --cc=David1.Zhou@amd.com \
    --cc=Jerry.Zhang@amd.com \
    --cc=airlied@linux.ie \
    --cc=alexander.deucher@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=bskeggs@redhat.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=kong.kongxinwei@hisilicon.com \
    --cc=kraxel@redhat.com \
    --cc=puck.chen@hisilicon.com \
    --cc=ray.huang@amd.com \
    --cc=syeh@vmware.com \
    --cc=z.liuxinliang@hisilicon.com \
    --cc=zourongrong@gmail.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.