~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel:topic/atomic-core

Last commit made on 2015-01-27
Get this branch:
git clone -b topic/atomic-core https://git.launchpad.net/~ubuntu-kernel-test/ubuntu/+source/linux/+git/mirror-drm-intel
Members of Ubuntu Kernel Test can upload to this branch. Log in for directions.

Branch merges

Branch information

Recent commits

9469244... by Ander Conselvan de Oliveira <email address hidden>

drm/atomic: Fix potential use of state after free

The atomic helpers rely on drm_atomic_state_clear() to reset an atomic
state if a retry is needed due to the w/w mutexes. The subsequent calls
to drm_atomic_get_{crtc,plane,...}_state() would then return the stale
pointers in state->{crtc,plane,...}_states.

Signed-off-by: Ander Conselvan de Oliveira <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

95d6eb3... by Daniel Vetter

drm/atomic-helper: debug output for modesets

With the combination of ->enable and ->active it's a bit complicated
to follow what exactly is going on sometimes within a full modeset.
Add debug output to make this all traceable.

Reviewed-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

ee0a89c... by Daniel Vetter

drm/atomic-helpers: Saner encoder/crtc callbacks

For historical reasons going all the way back to how the Xrandr code
was implemented the semantics of the callbacks used to enable/disable
crtcs and encoders are ... interesting.

But with atomic helpers all that complexity has been binned, with only
a well-defined on/off action left. Unfortunately the names stuck.

Let's fix that by adding enable/disable hooks every, make them the
preferred variant for atomic and update documentations.

Later on we add debug warnings when drivers have deprecated hooks. But
while everything is in-flight with lots of drivers converting to
atomic that's a bit too much - better wait for things to settle a bit
first.

v2: Fix kerneldoc, reported by Wu Fengguang.

Reviewed-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

f02ad90... by Daniel Vetter

drm/atomic-helpers: Recover full cursor plane behaviour

Cursor plane updates have historically been fully async and mutliple
updates batched together for the next vsync. And userspace relies upon
that. Since implementing a full queue of async atomic updates is a bit
of work lets just recover the cursor specific behaviour with a hint
flag and some hacks to drop the vblank wait.

v2: Fix kerneldoc, reported by Wu Fengguang.

Reviewed-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

b486e0e... by Daniel Vetter

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 <email address hidden>
Reviewed-by: Thierry Reding <email address hidden>
Tested-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

eab3bbe... by Daniel Vetter

drm/atomic: Add drm_crtc_state->active

This is the infrastructure for DPMS ported to the atomic world.
Fundamental changes compare to legacy DPMS are:

- No more per-connector dpms state, instead there's just one per each
  display pipeline. So if you clone either you have to unclone first
  if you only want to switch off one screen, or you just switch of
  everything (like all desktops do). This massively reduces complexity
  for cloning since now there's no more half-enabled cloned configs to
  consider.

- Only on/off, dpms standby/suspend are as dead as real CRTs. Again
  reduces complexity a lot.

Now especially for backwards compat the really important part for dpms
support is that dpms on always succeeds (except for hw death and
unplugged cables ofc). Which means everything that could fail (like
configuration checking, resources assignments and buffer management)
must be done irrespective from ->active. ->active is really only a
toggle to change the hardware state. More precisely:

- Drivers MUST NOT look at ->active in their ->atomic_check callbacks.
  Changes to ->active MUST always suceed if nothing else changes.

- Drivers using the atomic helpers MUST NOT look at ->active anywhere,
  period. The helpers will take care of calling the respective
  enable/modeset/disable hooks as necessary. As before the helpers
  will carefully keep track of the state and not call any hooks
  unecessarily, so still no double-disables or enables like with crtc
  helpers.

- ->mode_set hooks are only called when the mode or output
  configuration changes, not for changes in ->active state.

- Drivers which reconstruct the state objects in their ->reset hooks
  or through some other hw state readout infrastructure must ensure
  that ->active reflects actual hw state.

This just implements the core bits and helper logic, a subsequent
patch will implement the helper code to implement legacy dpms with
this.

v2: Rebase on top of the drm ioctl work:
- Move crtc checks to the core check function.
- Also check for ->active_changed when deciding whether a modeset
  might happen (for the ALLOW_MODESET mode).
- Expose the ->active state with an atomic prop.

v3: Review from Rob
- Spelling fix in comment.
- Extract needs_modeset helper to consolidate the ->mode_changed ||
  ->active_changed checks.

v4: Fixup fumble between crtc->state and crtc_state.

Cc: Rob Clark <email address hidden>
Reviewed-by: Thierry Reding <email address hidden>
Tested-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

960cd9d... by Daniel Vetter

drm: Add standardized boolean props

Not a new type exposed to userspace, just a standard way to create
them since between range, bitmask and enum there's 3 different ways to
pull out a boolean prop.

Also add the kerneldoc for the recently added new prop types, which
Rob forgot all about.

v2: Fixup kerneldoc, spotted by Rob.

Cc: Rob Clark <email address hidden>
Reviewed-by: Rob Clark <email address hidden>
Reviewed-by: Thierry Reding <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

6a425c2... by Matt Roper <email address hidden>

drm/plane-helper: Fix transitional helper kerneldocs

drm_plane_helper_{update,disable} are not specific to primary planes;
fix some copy/paste summaries to avoid confusion.

Cc: <email address hidden>
Signed-off-by: Matt Roper <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

9289058... by Matt Roper <email address hidden>

drm/plane-helper: Skip prepare_fb/cleanup_fb when newfb==oldfb

When commiting a plane update where the framebuffer doesn't change, we
can skip the prepare_fb/cleanup_fb steps. This also allows us to avoid
an unnecessary vblank wait at the end of the operation when we're just
moving a plane and not changing its image (e.g., for a cursor).

At the moment, i915 is the only upstream driver using the transitional
plane helpers, and thus the only driver affected by this change.

Note that this replicates a corresponding change in the atomic helpers
implemented in

commit ab58e3384b9f9863bfd029b458ff337d381bf6d2
Author: Daniel Vetter <email address hidden>
Date: Mon Nov 24 20:42:42 2014 +0100

    drm/atomic-helper: Skip vblank waits for unchanged fbs

Reported-by: Jeremiah Mahler <email address hidden>
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=88540
Signed-off-by: Matt Roper <email address hidden>
Tested-by: Tested-by: Rodrigo Vivi <email address hidden>
Signed-off-by: Daniel Vetter <email address hidden>

281d1bb... by Dave Airlie <email address hidden>

Merge remote-tracking branch 'origin/master' into drm-next

Backmerge Linus tree after rc5 + drm-fixes went in.

There were a few amdkfd conflicts I wanted to avoid,
and Ben requested this for nouveau also.

Conflicts:
 drivers/gpu/drm/amd/amdkfd/Makefile
 drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
 drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager.c
 drivers/gpu/drm/amd/amdkfd/kfd_priv.h
 drivers/gpu/drm/amd/include/kgd_kfd_interface.h
 drivers/gpu/drm/i915/intel_runtime_pm.c
 drivers/gpu/drm/radeon/radeon_kfd.c