dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [PATCH 00/16] Atomic/nuclear modeset/pageflip
Date: Tue, 18 Mar 2014 17:22:37 -0400	[thread overview]
Message-ID: <1395177773-800-1-git-send-email-robdclark@gmail.com> (raw)

Previous revision of series:
http://lists.freedesktop.org/archives/dri-devel/2013-November/049594.html

And if you prefer, in git form:
http://cgit.freedesktop.org/~robclark/linux/log/?h=cold-fusion
git://people.freedesktop.org/~robclark/linux cold-fusion

Compared to previous revision:
 * rebased on primary-plane RFC series.  As a result, nearly none of the
   drivers actually compile at the moment :-P

   But it is in the end a good thing... it reduces some code paths (now
   only having to care about fbs on planes, and it avoids exposing an 
   intermediate ABI state to userspace so avoids the need for some
   compat glue later).

 * state objects now carry their own ref to fbs.  This cleaned up most of
   the refcnt'ing issues, so I'm pretty happy how that turned out.  With
   that plus all the other major hacks cleaned up, I'm happy enough to
   drop the "RFC" tag.

There are, I think, two remaining issues to solve:
 * we either need to add an event ptr param to plane->update_plane() or
   come up with another way to handle events on planes.

 * I kinda would still like to add to the atomic ioctl some way to indicate
   ok/error on a bit finer granularity than per-ioctl.  Ie. perhaps an
   array where userspace can ask for results per KMS object (crtc/plane)?
   Something along these lines would give the kernel a bit more flexibility
   to deal with some of the edge cases which come up when you gang crtcs
   for ultra high resolution displays.  In short, it would let the driver
   "steal" some of the planes if needed from userspace.

   This would also, conveniently, be pretty similar to how (AFAIU) hw
   compositor and ADF work on android.  Which seems like it would be useful
   to eventually enable android devices to use an upstream display driver.

   For this we could pretty easily just throw in a placeholder that we
   could replace later with an optional ptr to __user array.  I think
   that would be fine for an initial version, but I just wanted to throw
   this idea out there, because I think it will become important.

Note that this series is really only the beginning of atomic.  Once this
is merged, there are some various vague thoughts about next steps:
 * finish converting remaining callers of drm_mode_set_config_internal()
   to use atomic

 * replace driver usage of plane->fb with plane->state->fb.. drop plane->fb,
   somewhere along the way deprecate/drop ->page_flip() and possibly
   current incarnation of ->update_plane()..

 * perhaps some more fine grained event notification or other such
   extensions.

 * I know there are a few things I plan on ripping out / simplifying in
   drm/msm as a result of atomic, but just waiting until this is merge
   to avoid carrying such

.......

So, that all said, I am a bit curious about how we might eventually land
this series some day.  Especially once we include changes to update all
points in various drivers that access crtc->fb to crtc->primary->fb it
will be one big hairy merge-conflict-prone branch.  Not the sort of thing
that I'd really like to have to rebase for the next five kernel cycles if
at all avoidable.

We certainly could merge everything but the new ioctl, or hide the ioctl
behind an experimental module param for now.  I'm less concerned about
that (either option would be pretty easy), and more about merging the
infrastructure changes.

Rob Clark (13):
  drm: fix typo
  drm: add atomic fxns
  drm: convert crtc to ww_mutex
  drm: add object property type
  drm: add signed-range property type
  drm: helpers to find mode objects
  drm: split propvals out and blob property support
  drm: allow FB's in drm_mode_object_find
  drm: convert plane to properties/state
  drm: convert crtc to properties/state
  drm: push locking down into restore_fbdev_mode
  drm/msm: add atomic support
  drm: spiff out FB refcnting traces

Ville Syrjälä (3):
  drm: Allow drm_mode_object_find() to look up an object of any type
  drm: Refactor object property check code
  drm: Atomic modeset ioctl

 drivers/gpu/drm/Makefile                    |    3 +-
 drivers/gpu/drm/armada/armada_crtc.c        |   15 +-
 drivers/gpu/drm/armada/armada_fbdev.c       |    4 +-
 drivers/gpu/drm/armada/armada_output.c      |    3 +-
 drivers/gpu/drm/armada/armada_overlay.c     |   15 +-
 drivers/gpu/drm/ast/ast_drv.c               |    6 +
 drivers/gpu/drm/ast/ast_drv.h               |    1 +
 drivers/gpu/drm/ast/ast_mode.c              |    1 +
 drivers/gpu/drm/cirrus/cirrus_drv.c         |    6 +
 drivers/gpu/drm/cirrus/cirrus_drv.h         |    1 +
 drivers/gpu/drm/cirrus/cirrus_mode.c        |    1 +
 drivers/gpu/drm/drm_atomic.c                |  702 +++++++++++
 drivers/gpu/drm/drm_crtc.c                  | 1667 +++++++++++++++++++--------
 drivers/gpu/drm/drm_crtc_helper.c           |    2 +-
 drivers/gpu/drm/drm_drv.c                   |    1 +
 drivers/gpu/drm/drm_fb_cma_helper.c         |    9 +-
 drivers/gpu/drm/drm_fb_helper.c             |   28 +-
 drivers/gpu/drm/exynos/exynos_drm_crtc.c    |   11 +-
 drivers/gpu/drm/exynos/exynos_drm_drv.c     |    7 +
 drivers/gpu/drm/exynos/exynos_drm_fbdev.c   |    4 +-
 drivers/gpu/drm/exynos/exynos_drm_plane.c   |   11 +-
 drivers/gpu/drm/gma500/cdv_intel_crt.c      |    4 +-
 drivers/gpu/drm/gma500/cdv_intel_display.c  |    1 +
 drivers/gpu/drm/gma500/cdv_intel_dp.c       |    7 +-
 drivers/gpu/drm/gma500/cdv_intel_hdmi.c     |    7 +-
 drivers/gpu/drm/gma500/cdv_intel_lvds.c     |   10 +-
 drivers/gpu/drm/gma500/mdfld_dsi_output.c   |   12 +-
 drivers/gpu/drm/gma500/psb_drv.c            |   11 +-
 drivers/gpu/drm/gma500/psb_drv.h            |    1 +
 drivers/gpu/drm/gma500/psb_intel_display.c  |    1 +
 drivers/gpu/drm/gma500/psb_intel_drv.h      |    4 +-
 drivers/gpu/drm/gma500/psb_intel_lvds.c     |   10 +-
 drivers/gpu/drm/gma500/psb_intel_sdvo.c     |   23 +-
 drivers/gpu/drm/i2c/ch7006_drv.c            |    4 +-
 drivers/gpu/drm/i915/i915_drv.c             |    8 +
 drivers/gpu/drm/i915/intel_crt.c            |    4 +-
 drivers/gpu/drm/i915/intel_display.c        |   16 +-
 drivers/gpu/drm/i915/intel_dp.c             |    7 +-
 drivers/gpu/drm/i915/intel_drv.h            |    1 +
 drivers/gpu/drm/i915/intel_fbdev.c          |    6 +-
 drivers/gpu/drm/i915/intel_hdmi.c           |    7 +-
 drivers/gpu/drm/i915/intel_lvds.c           |    4 +-
 drivers/gpu/drm/i915/intel_sdvo.c           |   23 +-
 drivers/gpu/drm/i915/intel_sprite.c         |    1 +
 drivers/gpu/drm/i915/intel_tv.c             |   11 +-
 drivers/gpu/drm/mgag200/mgag200_drv.c       |    7 +
 drivers/gpu/drm/mgag200/mgag200_drv.h       |    1 +
 drivers/gpu/drm/mgag200/mgag200_mode.c      |    1 +
 drivers/gpu/drm/msm/Makefile                |    1 +
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_crtc.c    |   69 +-
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.c     |    6 +
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_kms.h     |    1 +
 drivers/gpu/drm/msm/mdp/mdp4/mdp4_plane.c   |   15 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_crtc.c    |   66 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.c     |    6 +
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_kms.h     |    2 +-
 drivers/gpu/drm/msm/mdp/mdp5/mdp5_plane.c   |   15 +-
 drivers/gpu/drm/msm/msm_atomic.c            |  141 +++
 drivers/gpu/drm/msm/msm_drv.c               |   33 +-
 drivers/gpu/drm/msm/msm_drv.h               |    8 +
 drivers/gpu/drm/msm/msm_gem.c               |   24 +-
 drivers/gpu/drm/msm/msm_gem.h               |   13 +
 drivers/gpu/drm/msm/msm_kms.h               |    1 +
 drivers/gpu/drm/nouveau/dispnv04/crtc.c     |    1 +
 drivers/gpu/drm/nouveau/dispnv04/overlay.c  |   14 +-
 drivers/gpu/drm/nouveau/dispnv04/tvnv17.c   |    3 +-
 drivers/gpu/drm/nouveau/nouveau_connector.c |    7 +-
 drivers/gpu/drm/nouveau/nouveau_drm.c       |    7 +
 drivers/gpu/drm/nouveau/nouveau_drm.h       |    1 +
 drivers/gpu/drm/nouveau/nv50_display.c      |    1 +
 drivers/gpu/drm/omapdrm/omap_crtc.c         |   27 +-
 drivers/gpu/drm/omapdrm/omap_drv.c          |   16 +-
 drivers/gpu/drm/omapdrm/omap_drv.h          |    5 +-
 drivers/gpu/drm/omapdrm/omap_plane.c        |   11 +-
 drivers/gpu/drm/qxl/qxl_display.c           |    6 +-
 drivers/gpu/drm/qxl/qxl_drv.c               |    9 +
 drivers/gpu/drm/radeon/radeon_connectors.c  |    9 +-
 drivers/gpu/drm/radeon/radeon_display.c     |    2 +
 drivers/gpu/drm/radeon/radeon_drv.c         |    9 +
 drivers/gpu/drm/rcar-du/rcar_du_crtc.c      |    2 +
 drivers/gpu/drm/rcar-du/rcar_du_drv.c       |    7 +
 drivers/gpu/drm/rcar-du/rcar_du_lvdscon.c   |    3 +-
 drivers/gpu/drm/rcar-du/rcar_du_plane.c     |   12 +-
 drivers/gpu/drm/rcar-du/rcar_du_vgacon.c    |    3 +-
 drivers/gpu/drm/shmobile/shmob_drm_crtc.c   |    6 +-
 drivers/gpu/drm/shmobile/shmob_drm_drv.c    |    7 +
 drivers/gpu/drm/shmobile/shmob_drm_plane.c  |    2 +
 drivers/gpu/drm/tilcdc/tilcdc_crtc.c        |    1 +
 drivers/gpu/drm/tilcdc/tilcdc_drv.c         |    6 +
 drivers/gpu/drm/tilcdc/tilcdc_drv.h         |    1 +
 drivers/gpu/drm/tilcdc/tilcdc_slave.c       |    3 +-
 drivers/gpu/drm/udl/udl_connector.c         |    6 +-
 drivers/gpu/drm/udl/udl_drv.c               |    8 +
 drivers/gpu/drm/udl/udl_modeset.c           |    2 +
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c         |    7 +
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.h         |    1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.c         |   12 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_kms.h         |    4 +-
 drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c         |    1 +
 drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c        |    1 +
 include/drm/drmP.h                          |   88 +-
 include/drm/drm_atomic.h                    |  172 +++
 include/drm/drm_crtc.h                      |  379 +++++-
 include/drm/drm_fb_helper.h                 |    3 +-
 include/uapi/drm/drm.h                      |   12 +
 include/uapi/drm/drm_mode.h                 |   38 +
 106 files changed, 3214 insertions(+), 792 deletions(-)
 create mode 100644 drivers/gpu/drm/drm_atomic.c
 create mode 100644 drivers/gpu/drm/msm/msm_atomic.c
 create mode 100644 include/drm/drm_atomic.h

-- 
1.8.5.3

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

             reply	other threads:[~2014-03-18 21:23 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 21:22 Rob Clark [this message]
2014-03-18 21:22 ` [PATCH 01/16] drm: fix typo Rob Clark
2014-03-18 21:22 ` [PATCH 02/16] drm: add atomic fxns Rob Clark
2014-03-18 21:22 ` [PATCH 03/16] drm: convert crtc to ww_mutex Rob Clark
2014-03-18 21:22 ` [PATCH 04/16] drm: add object property type Rob Clark
2014-03-18 21:22 ` [PATCH 05/16] drm: add signed-range " Rob Clark
2014-03-18 21:22 ` [PATCH 06/16] drm: helpers to find mode objects Rob Clark
2014-03-18 21:22 ` [PATCH 07/16] drm: split propvals out and blob property support Rob Clark
2014-03-18 21:22 ` [PATCH 08/16] drm: Allow drm_mode_object_find() to look up an object of any type Rob Clark
2014-03-18 21:22 ` [PATCH 09/16] drm: Refactor object property check code Rob Clark
2014-03-18 21:22 ` [PATCH 10/16] drm: allow FB's in drm_mode_object_find Rob Clark
2014-03-18 21:22 ` [PATCH 11/16] drm: convert plane to properties/state Rob Clark
2014-03-18 21:22 ` [PATCH 12/16] drm: convert crtc " Rob Clark
2014-03-18 21:22 ` [PATCH 13/16] drm: push locking down into restore_fbdev_mode Rob Clark
2014-03-18 21:22 ` [PATCH 14/16] drm: Atomic modeset ioctl Rob Clark
2014-03-18 21:22 ` [PATCH 15/16] drm/msm: add atomic support Rob Clark
2014-03-18 21:22 ` [PATCH 16/16] drm: spiff out FB refcnting traces Rob Clark
2014-03-19 11:07 ` [PATCH 00/16] Atomic/nuclear modeset/pageflip Daniel Vetter
2014-03-19 12:23   ` Rob Clark
2014-03-19 13:39     ` Daniel Vetter
2014-03-20 22:34     ` Greg Hackmann
2014-03-21  0:28       ` Rob Clark
2014-03-26 21:21         ` Greg Hackmann
2014-03-26 10:08       ` Daniel Vetter
2014-03-26 21:33         ` Greg Hackmann
2014-03-26 22:33           ` 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=1395177773-800-1-git-send-email-robdclark@gmail.com \
    --to=robdclark@gmail.com \
    --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