From: Rob Clark <robdclark@gmail.com>
To: dri-devel@lists.freedesktop.org
Subject: [RFCv2 00/13] Atomic/nuclear modeset/pageflip
Date: Mon, 14 Oct 2013 13:26:35 -0400 [thread overview]
Message-ID: <1381771608-15237-1-git-send-email-robdclark@gmail.com> (raw)
This patchset is the merging of Ville's atomic modeset ioctl, and
the drm_{crtc,plane}_state stuff from my original nuclear pageflip
RFC.
It is currently working on msm with an updated version of Ville's
glplane test app (removing cursor properties and atomic event):
https://github.com/robclark/glplane
the libdrm bits can be found here:
https://github.com/robclark/libdrm/commits/atomic
The msm part is on top of msm-next, the complete branch can be found:
http://cgit.freedesktop.org/~robclark/linux/log/?h=global-thermonuclear-war-3
Compared to my earlier nuclear pageflip RFC, there is now a set of
drm_atomic helpers which do most of the non-hw-specific work for
the different drivers.
Unlike the crtc helpers, it is intended that the atomic helpers can
be used piecemeal by the drivers, either using all or overriding
parts as needed.
A naive driver, with no special constraints or hw support for atomic
updates may simply add the following to their driver struct:
.atomic_begin = drm_atomic_helper_begin,
.atomic_set_event = drm_atomic_helper_set_event,
.atomic_check = drm_atomic_helper_check,
.atomic_commit = drm_atomic_helper_commit,
.atomic_end = drm_atomic_helper_end,
.atomic_helpers = &drm_atomic_helper_funcs,
In addition, if you're plane/crtc doesn't already have it's own
custom properties, then add to your plane/crtc_funcs:
.set_property = drm_atomic_helper_{plane,crtc}_set_property,
A driver which can have (for example) conflicting modes across
multiple crtcs (for example, bandwidth limitations or clock/pll
configuration restrictions), can wrap drm_atomic_helper_check()
with their own driver specific .atomic_check() function.
A driver which can support true atomic updates can wrap
drm_atomic_helper_commit().
A driver with custom properties should override the appropriate
get_state(), check_state(), and commit_state() functions in
.atomic_helpers if it uses the drm-atomic-helpers. Otherwise it
is free to use &drm_atomic_helper_funcs as-is.
TODO:
* revisit fb refcnting.. it currently works but likely would have
problems if userspace set fb_id property on an object multiple
times in an atomic ioctl, which would be solved if the state
object also held a ref to the fb
* convert locking to ww_mutex? I was initially hoping to get
by without this, but I'm starting to suspect that it will
make the locking easier to get correct
* fix drivers with custom plane or crtc properties
Rob Clark (10):
HACK: disable drm for M68K.. no 8 byte get_user()
drm: add atomic fxns
drm: add object property type
drm: add DRM_MODE_PROP_DYNAMIC property flag
drm: add DRM_MODE_PROP_SIGNED property flag
drm: helpers to find mode objects
drm: split propvals out and blob property support
drm: convert plane to properties/state
drm: convert crtc to properties/state
drm/msm: add atomic support
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/Kconfig | 2 +
drivers/gpu/drm/Makefile | 3 +-
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_helper.c | 515 +++++++++++
drivers/gpu/drm/drm_crtc.c | 1243 ++++++++++++++++++---------
drivers/gpu/drm/drm_drv.c | 1 +
drivers/gpu/drm/drm_fb_helper.c | 20 +-
drivers/gpu/drm/exynos/exynos_drm_crtc.c | 13 +-
drivers/gpu/drm/exynos/exynos_drm_drv.c | 7 +
drivers/gpu/drm/exynos/exynos_drm_encoder.c | 6 +-
drivers/gpu/drm/exynos/exynos_drm_plane.c | 17 +-
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 | 7 +
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 | 4 +-
drivers/gpu/drm/i915/intel_dp.c | 7 +-
drivers/gpu/drm/i915/intel_drv.h | 1 +
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 | 19 +-
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/mdp4/mdp4_crtc.c | 52 +-
drivers/gpu/drm/msm/mdp4/mdp4_kms.c | 6 +
drivers/gpu/drm/msm/mdp4/mdp4_kms.h | 1 +
drivers/gpu/drm/msm/mdp4/mdp4_plane.c | 22 +-
drivers/gpu/drm/msm/msm_atomic.c | 146 ++++
drivers/gpu/drm/msm/msm_drv.c | 26 +
drivers/gpu/drm/msm/msm_drv.h | 9 +
drivers/gpu/drm/msm/msm_gem.c | 24 +-
drivers/gpu/drm/msm/msm_gem.h | 13 +
drivers/gpu/drm/nouveau/dispnv04/crtc.c | 1 +
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 | 18 +-
drivers/gpu/drm/omapdrm/omap_drv.c | 12 +-
drivers/gpu/drm/omapdrm/omap_drv.h | 5 +-
drivers/gpu/drm/omapdrm/omap_plane.c | 34 +-
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 | 9 +-
drivers/gpu/drm/rcar-du/rcar_du_vgacon.c | 3 +-
drivers/gpu/drm/shmobile/shmob_drm_crtc.c | 8 +-
drivers/gpu/drm/shmobile/shmob_drm_drv.c | 7 +
drivers/gpu/drm/shmobile/shmob_drm_plane.c | 6 +-
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 | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_kms.h | 4 +-
drivers/gpu/drm/vmwgfx/vmwgfx_ldu.c | 1 +
drivers/gpu/drm/vmwgfx/vmwgfx_scrn.c | 1 +
drivers/gpu/host1x/drm/dc.c | 17 +-
drivers/gpu/host1x/drm/drm.c | 7 +
drivers/gpu/host1x/drm/drm.h | 1 +
drivers/staging/imx-drm/imx-drm-core.c | 8 +
drivers/staging/imx-drm/ipuv3-crtc.c | 1 +
include/drm/drmP.h | 83 ++
include/drm/drm_atomic_helper.h | 172 ++++
include/drm/drm_crtc.h | 248 +++++-
include/uapi/drm/drm.h | 12 +
include/uapi/drm/drm_mode.h | 34 +
98 files changed, 2521 insertions(+), 607 deletions(-)
create mode 100644 drivers/gpu/drm/drm_atomic_helper.c
create mode 100644 drivers/gpu/drm/msm/msm_atomic.c
create mode 100644 include/drm/drm_atomic_helper.h
--
1.8.3.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel
next reply other threads:[~2013-10-14 17:26 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-14 17:26 Rob Clark [this message]
2013-10-14 17:26 ` [RFCv2 01/13] HACK: disable drm for M68K.. no 8 byte get_user() Rob Clark
2013-10-14 17:26 ` [RFCv2 02/13] drm: add atomic fxns Rob Clark
2013-10-14 17:26 ` [RFCv2 03/13] drm: add object property type Rob Clark
2013-10-14 17:26 ` [RFCv2 04/13] drm: add DRM_MODE_PROP_DYNAMIC property flag Rob Clark
2013-10-14 17:26 ` [RFCv2 05/13] drm: add DRM_MODE_PROP_SIGNED " Rob Clark
2013-10-14 17:26 ` [RFCv2 06/13] drm: helpers to find mode objects Rob Clark
2013-10-14 17:26 ` [RFCv2 07/13] drm: split propvals out and blob property support Rob Clark
2013-10-14 17:26 ` [RFCv2 08/13] drm: Allow drm_mode_object_find() to look up an object of any type Rob Clark
2013-10-14 17:26 ` [RFCv2 09/13] drm: Refactor object property check code Rob Clark
2013-10-14 17:26 ` [RFCv2 10/13] drm: convert plane to properties/state Rob Clark
2013-10-24 21:48 ` Matt Roper
2013-10-24 23:43 ` Rob Clark
2013-10-14 17:26 ` [RFCv2 11/13] drm: convert crtc " Rob Clark
2013-10-22 22:27 ` Matt Roper
2013-10-23 1:13 ` Rob Clark
2013-10-14 17:26 ` [RFCv2 12/13] drm: Atomic modeset ioctl Rob Clark
2013-10-14 17:26 ` [RFCv2 13/13] drm/msm: add atomic support Rob Clark
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=1381771608-15237-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;
as well as URLs for NNTP newsgroup(s).