All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver
@ 2020-02-25 15:58 ` Thomas Zimmermann
  0 siblings, 0 replies; 22+ messages in thread
From: Thomas Zimmermann @ 2020-02-25 15:58 UTC (permalink / raw)
  To: maarten.lankhorst-VuQAYsv1563Yd54FQh9/CA,
	mripard-DgEjT+Ai2ygdnm+yROfE0A, airlied-cv59FeDIM0c,
	daniel-/w4YWyX8dFk, bskeggs-H+wXaHxf7aLQT0dZR+AlfA,
	emil.velikov-ZGY8ohtN/8qB+jHODAdFcQ,
	alexander.deucher-5C7GfCeVMHo, sam-uyr5N9Q2VtJg9hUCZPvPmw
  Cc: nouveau-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW,
	dri-devel-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

This patchset moves legacy, non-KMS driver state from struct drm_driver
into struct drm_legacy_state. Only non-KMS drivers provide an instance
of the latter structure. One special case is nouveau, which supports
legacy interfaces. It also provides an instance of the legacy state if
the legacy interfaces have been enabled (i.e., defines the config option
CONFIG_NOUVEAU_LEGACY_CTX_SUPPORT)

I reviewed all call sites of legacy state and functions to verify that
DRIVER_LEGACY or DRIVER_KMS_LEGACY_CONTEXT is set on the device; or that
DRIVER_MODESET is not set.

With the mutable KMS state removed, instances of struct drm_driver can
be declared as constant. The patchset modifies the DRM core accordingly.
Individual drivers can follow later on.

Thomas Zimmermann (3):
  drm: Add separate state structure for legacy, non-KMS drivers
  drm: Move non-kms driver state into struct drm_legacy_state
  drm: Constify struct drm_driver in DRM core

 drivers/gpu/drm/drm_bufs.c            | 10 +++++-----
 drivers/gpu/drm/drm_context.c         |  9 +++++----
 drivers/gpu/drm/drm_drv.c             | 12 ++++++++----
 drivers/gpu/drm/drm_file.c            |  4 ++--
 drivers/gpu/drm/drm_legacy_misc.c     |  6 +++---
 drivers/gpu/drm/drm_lock.c            |  7 ++++---
 drivers/gpu/drm/drm_pci.c             | 16 ++++++++++------
 drivers/gpu/drm/drm_vblank.c          | 11 ++++++-----
 drivers/gpu/drm/i810/i810_drv.c       | 10 +++++++---
 drivers/gpu/drm/mga/mga_drv.c         | 16 ++++++++++------
 drivers/gpu/drm/nouveau/nouveau_drm.c |  8 ++++++++
 drivers/gpu/drm/r128/r128_drv.c       | 16 ++++++++++------
 drivers/gpu/drm/savage/savage_drv.c   | 12 ++++++++----
 drivers/gpu/drm/sis/sis_drv.c         |  8 ++++++--
 drivers/gpu/drm/tdfx/tdfx_drv.c       |  6 +++++-
 drivers/gpu/drm/via/via_drv.c         | 16 ++++++++++------
 include/drm/drm_device.h              |  2 +-
 include/drm/drm_drv.h                 | 21 +++++----------------
 include/drm/drm_legacy.h              | 27 +++++++++++++++++++++++----
 include/drm/drm_pci.h                 |  4 ++--
 20 files changed, 138 insertions(+), 83 deletions(-)

--
2.25.0

^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2020-02-26 10:26 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-25 15:58 [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver Thomas Zimmermann
2020-02-25 15:58 ` Thomas Zimmermann
     [not found] ` <20200225155902.9751-1-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-02-25 15:59   ` [PATCH 1/3] drm: Add separate state structure for legacy, non-KMS drivers Thomas Zimmermann
2020-02-25 15:59     ` Thomas Zimmermann
     [not found]     ` <20200225155902.9751-2-tzimmermann-l3A5Bk7waGM@public.gmane.org>
2020-02-25 16:06       ` Ilia Mirkin
2020-02-25 16:06         ` [Nouveau] " Ilia Mirkin
     [not found]         ` <CAKb7UviDs+rqF+vtDnV4CbHmY8PW8_-ahpAExctORYPKKyL7Yw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-25 16:21           ` Thomas Zimmermann
2020-02-25 16:21             ` [Nouveau] " Thomas Zimmermann
2020-02-25 17:37       ` Emil Velikov
2020-02-25 17:37         ` [Nouveau] " Emil Velikov
     [not found]         ` <CACvgo52fCMEiohuOkXyZi_mVrFnhMmmB--W64AvhEgVe3i2T5A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-26  5:28           ` Thomas Zimmermann
2020-02-26  5:28             ` [Nouveau] " Thomas Zimmermann
2020-02-25 15:59   ` [PATCH 2/3] drm: Move non-kms driver state into struct drm_legacy_state Thomas Zimmermann
2020-02-25 15:59     ` Thomas Zimmermann
2020-02-25 15:59   ` [PATCH 3/3] drm: Constify struct drm_driver in DRM core Thomas Zimmermann
2020-02-25 15:59     ` Thomas Zimmermann
2020-02-25 17:44   ` [PATCH 0/3] Add separate non-KMS state; constify struct drm_driver Daniel Vetter
2020-02-25 17:44     ` Daniel Vetter
     [not found]     ` <20200225174400.GP2363188-dv86pmgwkMBes7Z6vYuT8azUEOm+Xw19@public.gmane.org>
2020-02-26  5:39       ` Thomas Zimmermann
2020-02-26  5:39         ` Thomas Zimmermann
     [not found]         ` <f042cfae-8f74-0bd5-bd5f-dfb962c0c3b4-l3A5Bk7waGM@public.gmane.org>
2020-02-26 10:26           ` Daniel Vetter
2020-02-26 10:26             ` Daniel Vetter

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.