Revision tags: v4.6.2, v4.4.13 |
|
#
7ea77283 |
| 07-Jun-2016 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
drm/core: Change declaration for gamma_set.
Change return value to int to propagate errors from gamma_set, and remove start parameter. Updates always use the full size, and some drivers even ignore
drm/core: Change declaration for gamma_set.
Change return value to int to propagate errors from gamma_set, and remove start parameter. Updates always use the full size, and some drivers even ignore the start parameter altogether.
This is needed for atomic drivers, where an atomic commit can fail with -EINTR or -ENOMEM and should be restarted. This is already and issue for drm_atomic_helper_legacy_set_gamma, which this patch fixes up.
Changes since v1: - Fix compiler warning. (Emil) - Fix commit message (Daniel)
Cc: Alex Deucher <alexander.deucher@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Cc: Christian König <christian.koenig@amd.com> Cc: David Airlie <airlied@linux.ie> Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Cc: Ben Skeggs <bskeggs@redhat.com> Cc: Eric Anholt <eric@anholt.net> Cc: VMware Graphics <linux-graphics-maintainer@vmware.com> Cc: Mathieu Larouche <mathieu.larouche@matrox.com> Cc: Thierry Reding <treding@nvidia.com> Acked-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [danvet: Improve commit message a bit more, mention that this fixes the helper.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/742944bc-9f41-1acb-df4f-0fd4c8a10168@linux.intel.com
show more ...
|
Revision tags: openbmc-20160606-1 |
|
#
2f196b7c |
| 02-Jun-2016 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic: Add drm_atomic_crtc_state_for_each_plane_state
... and use it in msm&vc4. Again just want to encapsulate drm_atomic_state internals a bit.
The const threading is a bit awkward in vc4 si
drm/atomic: Add drm_atomic_crtc_state_for_each_plane_state
... and use it in msm&vc4. Again just want to encapsulate drm_atomic_state internals a bit.
The const threading is a bit awkward in vc4 since C sucks, but I still think it's worth to enforce this. Eventually I want to make all the obj->state pointers const too, but that's a lot more work ...
v2: Provide safe macro to wrap up the unsafe helper better, suggested by Maarten.
v3: Fixup subject (Maarten) and spelling fixes (Eric Engestrom).
Cc: Eric Anholt <eric@anholt.net> Cc: Rob Clark <robdclark@gmail.com> Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1464877304-4213-1-git-send-email-daniel.vetter@ffwll.ch
show more ...
|
Revision tags: v4.6.1, v4.4.12, openbmc-20160521-1, v4.4.11, openbmc-20160518-1, v4.6, v4.4.10, openbmc-20160511-1 |
|
#
fabd9106 |
| 09-May-2016 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts w
drm: Drop connector argument from __drm_atomic_helper_connector_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else. Note that this conflicts with a patch from Dave that adds refcounting to drm_connectors. It's not yet clear whether the check Dave adds for connector != NULL is really needed or the right check.
v2: Fix commmit message (Laurent).
Cc: Dave Airlie <airlied@gmail.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-3-git-send-email-daniel.vetter@ffwll.ch
show more ...
|
#
2f701695 |
| 09-May-2016 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else.
v2: Fix commit message (Laurent).
drm: Drop plane argument from __drm_atomic_helper_plane_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else.
v2: Fix commit message (Laurent).
v3: Rebase onto mtk driver merge.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Cc: Inki Dae <inki.dae@samsung.com> Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-2-git-send-email-daniel.vetter@ffwll.ch
show more ...
|
#
ec2dc6a0 |
| 09-May-2016 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else.
v2: Rebase on top of rockchip chang
drm: Drop crtc argument from __drm_atomic_helper_crtc_destroy_state
It's unused, and really this helper should only look at the state structure and nothing else.
v2: Rebase on top of rockchip changes
v3: Drop unrelated hunk, spotted by Laurent.
v4: Rebase onto mtk driver merge.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <thierry.reding@gmail.com> Cc: Eric Anholt <eric@anholt.net> Cc: Mark Yao <mark.yao@rock-chips.com> Acked-by: Thierry Reding <thierry.reding@gmail.com> Acked-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462804451-15318-1-git-send-email-daniel.vetter@ffwll.ch
show more ...
|
#
9ecb5498 |
| 11-May-2016 |
Noralf Trønnes <noralf@tronnes.org> |
drm/atomic: Add drm_atomic_helper_best_encoder()
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper for connectors that support exactly 1 encoder, statically determined at drive
drm/atomic: Add drm_atomic_helper_best_encoder()
Add (struct drm_connector_helper_funcs *)->best_encoder callback helper for connectors that support exactly 1 encoder, statically determined at driver init time.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1462982962-10530-6-git-send-email-noralf@tronnes.org
show more ...
|
Revision tags: openbmc-20160505-1, v4.4.9 |
|
#
286dbb8d |
| 26-Apr-2016 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
drm/atomic: Rename async parameter to nonblocking.
This is the first step of renaming async commit to nonblocking commit. The flag passed by userspace is NONBLOCKING, and async has a different meani
drm/atomic: Rename async parameter to nonblocking.
This is the first step of renaming async commit to nonblocking commit. The flag passed by userspace is NONBLOCKING, and async has a different meaning for page flips, where it means as soon as possible.
Fixing up comments in drm core is done manually, to make sure I didn't miss anything.
For drivers, the following cocci script is used to rename bool async to bool nonblock: @@ identifier I =~ "^async"; identifier func; @@ func(..., bool - I + nonblock , ...) { <... - I + nonblock ...> } @@ identifier func; type T; identifier I =~ "^async"; @@ T func(..., bool - I + nonblock , ...);
Thanks to Tvrtko Ursulin for the cocci script.
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com> Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1461679905-30177-2-git-send-email-maarten.lankhorst@linux.intel.com
show more ...
|
Revision tags: v4.4.8, v4.4.7, openbmc-20160329-2, openbmc-20160329-1, openbmc-20160321-1 |
|
#
4c5b7f3a |
| 18-Mar-2016 |
Rob Clark <robdclark@gmail.com> |
drm/atomic: export drm_atomic_helper_wait_for_fences()
Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Daniel Vetter <dan
drm/atomic: export drm_atomic_helper_wait_for_fences()
Signed-off-by: Rob Clark <robdclark@gmail.com> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1458342904-23326-3-git-send-email-robdclark@gmail.com
show more ...
|
Revision tags: v4.4.6, v4.5, v4.4.5, v4.4.4 |
|
#
5488dc16 |
| 26-Feb-2016 |
Lionel Landwerlin <lionel.g.landwerlin@intel.com> |
drm: introduce pipe color correction properties
Patch based on a previous series by Shashank Sharma.
This introduces optional properties to enable color correction at the pipe level. It relies on 3
drm: introduce pipe color correction properties
Patch based on a previous series by Shashank Sharma.
This introduces optional properties to enable color correction at the pipe level. It relies on 3 transformations applied to every pixels displayed. First a lookup into a degamma table, then a multiplication of the rgb components by a 3x3 matrix and finally another lookup into a gamma table.
The following properties can be added to a pipe : - DEGAMMA_LUT : blob containing degamma LUT - DEGAMMA_LUT_SIZE : number of elements in DEGAMMA_LUT - CTM : transformation matrix applied after the degamma LUT - GAMMA_LUT : blob containing gamma LUT - GAMMA_LUT_SIZE : number of elements in GAMMA_LUT
DEGAMMA_LUT_SIZE and GAMMA_LUT_SIZE are read only properties, set by the driver to tell userspace applications what sizes should be the lookup tables in DEGAMMA_LUT and GAMMA_LUT.
A helper is also provided so legacy gamma correction is redirected through these new properties.
v2: Register LUT size properties as range
v3: Fix round in drm_color_lut_get_value() helper More docs on how degamma/gamma properties are used
v4: Update contributors
v5: Rename CTM_MATRIX property to CTM (Doh!) Add legacy gamma_set atomic helper Describe CTM/LUT acronyms in the kernel doc
v6: Fix missing blob unref in drm_atomic_helper_crtc_reset
Signed-off-by: Shashank Sharma <shashank.sharma@intel.com> Signed-off-by: Kumar, Kiran S <kiran.s.kumar@intel.com> Signed-off-by: Kausal Malladi <kausalmalladi@gmail.com> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Matt Roper <matthew.d.roper@intel.com> Acked-by: Rob Bradford <robert.bradford@intel.com> [danvet: CrOS maintainers are also happy with the userspacde side: https://codereview.chromium.org/1182063002/ ] Reviewed-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1456506302-640-4-git-send-email-lionel.g.landwerlin@intel.com
show more ...
|
Revision tags: v4.4.3, openbmc-20160222-1, v4.4.2, openbmc-20160212-1, openbmc-20160210-1, openbmc-20160202-2, openbmc-20160202-1, v4.4.1, openbmc-20160127-1, openbmc-20160120-1 |
|
#
c240906d |
| 19-Jan-2016 |
John Keeping <john@metanate.com> |
drm/atomic-helper: Export framebuffer_changed()
The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks() because it has hardware counters for neither vblanks nor scanlines.
In order to s
drm/atomic-helper: Export framebuffer_changed()
The Rockchip driver cannot use drm_atomic_helper_wait_for_vblanks() because it has hardware counters for neither vblanks nor scanlines.
In order to simplify re-implementing the functionality for this driver, export the framebuffer_changed() helper so it can be reused.
Signed-off-by: John Keeping <john@metanate.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: v4.4 |
|
#
4cd39917 |
| 04-Jan-2016 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
drm/atomic: Add __drm_atomic_helper_connector_reset, v2.
This is useful for drivers that subclass connector_state, like tegra.
Changes since v1: - Docbook updates.
Signed-off-by: Maarten Lankhorst
drm/atomic: Add __drm_atomic_helper_connector_reset, v2.
This is useful for drivers that subclass connector_state, like tegra.
Changes since v1: - Docbook updates.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Link: http://patchwork.freedesktop.org/patch/msgid/1451908400-25147-2-git-send-email-maarten.lankhorst@linux.intel.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: openbmc-20151217-1, openbmc-20151210-1 |
|
#
14942760 |
| 02-Dec-2015 |
Thierry Reding <treding@nvidia.com> |
drm/atomic-helper: Implement subsystem-level suspend/resume
Provide subsystem-level suspend and resume helpers that can be used to implement suspend/resume on atomic mode-setting enabled drivers.
v
drm/atomic-helper: Implement subsystem-level suspend/resume
Provide subsystem-level suspend and resume helpers that can be used to implement suspend/resume on atomic mode-setting enabled drivers.
v2: simplify locking, enhance kerneldoc comments v3: pass lock acquisition context by parameter, improve kerneldoc v4: - remove redundant code (already provided by atomic helpers) (Maarten Lankhorst) - move backoff dance from drm_modeset_lock_all_ctx() into suspend helper (Daniel Vetter) v5: handle potential EDEADLK from drm_atomic_helper_duplicate_state() and drm_atomic_helper_disable_all() (Daniel Vetter)
Signed-off-by: Thierry Reding <treding@nvidia.com> Link: http://patchwork.freedesktop.org/patch/msgid/1449075005-13937-2-git-send-email-thierry.reding@gmail.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: openbmc-20151202-1 |
|
#
6753ba97 |
| 27-Nov-2015 |
Jyri Sarha <jsarha@ti.com> |
drm/atomic_helper: Add drm_atomic_helper_disable_planes_on_crtc()
Add drm_atomic_helper_disable_planes_on_crtc() for disabling all planes associated with the given CRTC. This can be used for instanc
drm/atomic_helper: Add drm_atomic_helper_disable_planes_on_crtc()
Add drm_atomic_helper_disable_planes_on_crtc() for disabling all planes associated with the given CRTC. This can be used for instance in the CRTC helper disable callback to disable all planes before shutting down the display pipeline.
v2: - Address Daniels review comments [1] - Do atomic_begin() and atomic_flush() always if they are defined and atomic knob is set - update kerneldoc - Put drm_atomic_helper_disable_planes_on_crtc() after drm_atomic_helper_commit_planes_on_crtc() in drm_atomic_helper.c to have functions in the same order as in drm_atomic_helper.h
Signed-off-by: Jyri Sarha <jsarha@ti.com> Link: http://patchwork.freedesktop.org/patch/msgid/1448633641-6486-1-git-send-email-jsarha@ti.com Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: openbmc-20151123-1, openbmc-20151118-1, openbmc-20151104-1, v4.3, openbmc-20151102-1, openbmc-20151028-1, v4.3-rc1, v4.2 |
|
#
bbb1e524 |
| 25-Aug-2015 |
Rob Clark <robdclark@gmail.com> |
drm/fb-helper: atomic restore_fbdev_mode()..
Add support for using atomic code-paths for restore_fbdev_mode().
Signed-off-by: Rob Clark <robdclark@gmail.com> [danvet: Bikeshed comments slightly.] S
drm/fb-helper: atomic restore_fbdev_mode()..
Add support for using atomic code-paths for restore_fbdev_mode().
Signed-off-by: Rob Clark <robdclark@gmail.com> [danvet: Bikeshed comments slightly.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
#
397fd77c |
| 08-Sep-2015 |
Thierry Reding <treding@nvidia.com> |
drm/atomic-helper: Implement drm_atomic_helper_duplicate_state()
This function can be used to duplicate an atomic state object. This is useful for example to implement suspend/resume, where the stat
drm/atomic-helper: Implement drm_atomic_helper_duplicate_state()
This function can be used to duplicate an atomic state object. This is useful for example to implement suspend/resume, where the state before suspend can be saved and restored upon resume.
v2: move locking to caller, be more explicit about prerequisites v3: explicitly pass lock acquisition context, improve kerneldoc
Signed-off-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
#
aef9dbb8 |
| 08-Sep-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic-helper: Add option to update planes only on active crtc
With drivers supporting runtime pm it's generally not a good idea to touch the hardware when it's off. Add an option to the commit_
drm/atomic-helper: Add option to update planes only on active crtc
With drivers supporting runtime pm it's generally not a good idea to touch the hardware when it's off. Add an option to the commit_planes helper to support this case.
Note that the helpers already add all planes on a crtc when a modeset happens, hence plane updates will not be lost if drivers set this to true.
v2: Check for NULL state->crtc before chasing the pointer. Also check both old and new crtc if there's a switch. Finally just outright disallow switching crtcs for a plane if the plane is in active use, on most hardware that doesn't make sense.
v3: Since commit_planes(active_only = true) is for enabling things only after all the crtc are on we should only look at the new crtc to decide whether to call the plane hooks - if the current CRTC isn't on then skip. If the old crtc (when moving a plane) went down then the plane should have been disabled as part of the pipe shutdown work already. For which there's currently no helper really unfortunately. Also move the check for wether a plane gets a new CRTC assigned while still in active use out of this patch.
v4: Rebase over exynos changes.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Cc: Thierry Reding <treding@nvidia.com> Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
Revision tags: v4.2-rc8, v4.2-rc7, v4.2-rc6, v4.2-rc5, v4.2-rc4 |
|
#
9a69a9ac |
| 21-Jul-2015 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
drm: Make the connector dpms callback return a value, v2.
This is required to properly handle failing dpms calls. When making a wait in i915 interruptible, I've noticed that the dpms sequence could
drm: Make the connector dpms callback return a value, v2.
This is required to properly handle failing dpms calls. When making a wait in i915 interruptible, I've noticed that the dpms sequence could fail with -ERESTARTSYS because it was waiting interruptibly for flips. So from now on allow drivers to fail in their connector dpms callback.
Encoder and crtc dpms callbacks are unaffected.
Changes since v1: - Update kerneldoc for the drm helper functions.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [danvet: Resolve conflicts due to different merge order.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: v4.2-rc3, v4.2-rc2, v4.2-rc1, v4.1, v4.1-rc8, v4.1-rc7, v4.1-rc6, v4.1-rc5 |
|
#
de28d021 |
| 19-May-2015 |
Maarten Lankhorst <maarten.lankhorst@linux.intel.com> |
drm/atomic: add commit_planes_on_crtc helper
drm_atomic_helper_commit_planes calls all atomic_begin's first, then updates all planes, finally calling atomic_flush.
Some drivers may want to things l
drm/atomic: add commit_planes_on_crtc helper
drm_atomic_helper_commit_planes calls all atomic_begin's first, then updates all planes, finally calling atomic_flush.
Some drivers may want to things like disabling irq's from their atomic_begin, in which case a second call to atomic_begin will splat. By using commit_planes_on_crtc on each crtc in the atomic state they'll evade that issue.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> [danvet: Extend kerneldoc a bit as discussed with Maarten on irc.] [danvet: Squash in fixup to check for crtc_funcs in all places. Reported by Dan Carpenter.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|
Revision tags: v4.1-rc4 |
|
#
4c18d301 |
| 12-May-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic-helpers: Export drm_atomic_helper_update_legacy_modeset_state
This is useful for drivers which have their own modeset infrastructure but want to reuse most of the legacy state frobbery fr
drm/atomic-helpers: Export drm_atomic_helper_update_legacy_modeset_state
This is useful for drivers which have their own modeset infrastructure but want to reuse most of the legacy state frobbery from the helpers. i915 wants this.
v2: Add header declaration.
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
Revision tags: v4.1-rc3, v4.1-rc2, v4.1-rc1, v4.0, v4.0-rc7, v4.0-rc6, v4.0-rc5, v4.0-rc4, v4.0-rc3, v4.0-rc2, v4.0-rc1, v3.19, v3.19-rc7 |
|
#
f5e7840b |
| 28-Jan-2015 |
Thierry Reding <treding@nvidia.com> |
drm/atomic: Add helpers for state-subclassing drivers
Drivers that subclass CRTC, plane or connector state need to carefully duplicate the code that the atomic helpers have. This is bound to cause b
drm/atomic: Add helpers for state-subclassing drivers
Drivers that subclass CRTC, plane or connector state need to carefully duplicate the code that the atomic helpers have. This is bound to cause breakage eventually because it requires auditing all drivers and update them when code is added to the helpers.
In order to avoid that, implement new helpers that perform the required steps when copying and destroying state. These new helpers are exported so that state-subclassing drivers can use them. The default helpers are implemented using them as well, providing a single location that needs to be changed when adding to base atomic states.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Eric Anholt <eric@anholt.net> Signed-off-by: Thierry Reding <treding@nvidia.com>
show more ...
|
#
1af434a9 |
| 22-Feb-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic-helper: Rename commmit_post/pre_planes
These names only make sense because of backwards compatability with the order used by the crtc helper library. There's not really any real requireme
drm/atomic-helper: Rename commmit_post/pre_planes
These names only make sense because of backwards compatability with the order used by the crtc helper library. There's not really any real requirement in the ordering here.
So rename them to something more descriptive and update the kerneldoc a bit. Motivated in a discussion with Laurent about how to restore plane state for dpms for drivers with runtime pm.
v2: Squash in fixup from Stephen Rothwell to fix a conflict with tegra.
Cc: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Acked-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
Revision tags: v3.19-rc6, v3.19-rc5, v3.19-rc4, v3.19-rc3, v3.19-rc2, v3.19-rc1, v3.18, v3.18-rc7, v3.18-rc6 |
|
#
407b8bd9 |
| 20-Nov-2014 |
Thierry Reding <treding@nvidia.com> |
drm/plane: Add optional ->atomic_disable() callback
In order to prevent drivers from having to perform the same checks over and over again, add an optional ->atomic_disable callback which the core c
drm/plane: Add optional ->atomic_disable() callback
In order to prevent drivers from having to perform the same checks over and over again, add an optional ->atomic_disable callback which the core calls under the right circumstances.
v2: pass old state and detect edges to avoid calling ->atomic_disable on already disabled planes, remove redundant comment (Daniel Vetter)
v3: rename helper to drm_atomic_plane_disabling() to clarify that it is checking for transitions, move helper to drm_atomic_helper.h, clarify check for !old_state and its relation to transitional helpers
Here's an extract from some discussion rationalizing the behaviour (for a full version, see the reference below):
> > Hm, thinking about this some more this will result in a slight difference > > in behaviour, at least when drivers just use the helper ->reset functions > > but don't disable everything: > > - With transitional helpers we assume we know nothing and call > > ->atomic_disable. > > - With atomic old_state->crtc == NULL in the same situation right after > > boot-up, but we asssume the plane is really off and _dont_ call > > ->atomic_disable. > > > > Should we instead check for (old_state && old_state->crtc) and state that > > drivers need to make sure they don't have stuff hanging around? > > I don't think we can check for old_state because otherwise this will > always return false, whereas we really want it to force-disable planes > that could be on (lacking any more accurate information). For > transitional helpers anyway. > > For the atomic helpers, old_state will never be NULL, but I'd assume > that the driver would reconstruct the current state in ->reset().
By the way, the reason for why old_state can be NULL with transitional helpers is the ordering of the steps in the atomic transition. Currently the Tegra patches do this (based on your blog post and the Exynos proto- type):
1) atomic conversion, phase 1: - implement ->atomic_{check,update,disable}() - use drm_plane_helper_{update,disable}()
2) atomic conversion, phase 2: - call drm_mode_config_reset() from ->load() - implement ->reset()
That's only a partial list of what's done in these steps, but that's the only relevant pieces for why old_state is NULL.
What happens is that without ->reset() implemented there won't be any initial state, hence plane->state (the old_state here) will be NULL the first time atomic state is applied.
We could of course reorder the sequence such that drivers are required to hook up ->reset() before they can (or at the same as they) hook up the transitional helpers. We could add an appropriate WARN_ON to this helper to make that more obvious.
However, that will not solve the problem because it only gets rid of the special case. We still don't know whether old_state->crtc == NULL is the current state or just the initial default.
So no matter which way we do this, I don't see a way to get away without requiring specific semantics from drivers. They would be that:
- drivers recreate the correct state in ->reset() so that old_state->crtc != NULL if the plane is really enabled
or
- drivers have to ensure that the real state in fact mirrors the initial default as encoded in the state (plane disabled)
References: http://lists.freedesktop.org/archives/dri-devel/2015-January/075578.html Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Signed-off-by: Thierry Reding <treding@nvidia.com>
show more ...
|
#
b486e0e6 |
| 22-Jan-2015 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic-helper: add connector->dpms() implementation
This builds on top of the crtc->active infrastructure to implement legacy DPMS. My choice of semantics is somewhat arbitrary, but the entire p
drm/atomic-helper: add connector->dpms() implementation
This builds on top of the crtc->active infrastructure to implement legacy DPMS. My choice of semantics is somewhat arbitrary, but the entire pipe is enabled as along as one output is still enabled.
Of course it also clamps everything that's not ON to OFF.
v2: Fix spelling in one comment.
v3: Don't do an async commit (Thierry)
v4: Dan Carpenter noticed missing error case handling.
Cc: Thierry Reding <thierry.reding@gmail.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Tested-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
#
d9b13620 |
| 26-Nov-2014 |
Daniel Vetter <daniel.vetter@ffwll.ch> |
drm/atomic-helper: Export both plane and modeset check helpers
The default call sequence for these two parts won't fit for all drivers. So export the two pieces and explain with a bit of kerneldoc w
drm/atomic-helper: Export both plane and modeset check helpers
The default call sequence for these two parts won't fit for all drivers. So export the two pieces and explain with a bit of kerneldoc when each should be called.
v2: Squash in fixup from Rob to actually add the newly exported functions to headers
Cc: Rob Clark <robdclark@gmail.com> Reviewed-by: Rob Clark <robdclark@gmail.com> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
show more ...
|
#
dd275956 |
| 25-Nov-2014 |
Rob Clark <robdclark@gmail.com> |
drm/atomic: add plane iterator macros
Add helper macros to iterate the current, or incoming set of planes attached to a crtc. These helpers are only available for drivers converted to use atomic-he
drm/atomic: add plane iterator macros
Add helper macros to iterate the current, or incoming set of planes attached to a crtc. These helpers are only available for drivers converted to use atomic-helpers.
Signed-off-by: Rob Clark <robdclark@gmail.com> [danvet: Squash in fixup from Rob to move the planemask iterator to drm_crtc.h and document it. That one is needed by the atomic ioctl so can't be in a helper library.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
show more ...
|