1. 22 1月, 2015 1 次提交
    • D
      drm/probe-helper: don't lose hotplug event · 162b6a57
      Daniel Vetter 提交于
      There's a race window (small for hpd, 10s large for polled outputs)
      where userspace could sneak in with an unrelated connnector probe
      ioctl call and eat the hotplug event (since neither the hpd nor the
      poll code see a state change).
      
      To avoid this, check whether the connector state changes in all other
      ->detect calls (in the current helper code that's only probe_single)
      and if that's the case, fire off a hotplug event. Note that we can't
      directly call the hotplug event handler, since that expects that no
      locks are held (due to reentrancy with the fb code to update the kms
      console).
      
      Also, this requires that drivers using the probe_single helper
      function set up the poll work. All current drivers do that already,
      and with the reworked hpd handling there'll be no downside to
      unconditionally setting up the poll work any more.
      
      v2: Review from Rob Clark
      - Don't bail out of the output poll work immediately if it's disabled
        to make sure we deliver the delayed hoptplug events. Instead just
        jump to the tail.
      - Don't scheduel the work when it's not set up. Would be a driver bug
        since using probe helpers for anything dynamic without them
        initialized makes them all noops.
      
      Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> (v1)
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Tested-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      162b6a57
  2. 21 1月, 2015 2 次提交
  3. 12 1月, 2015 2 次提交
  4. 08 1月, 2015 3 次提交
  5. 05 1月, 2015 4 次提交
    • D
      drm/atomic: Hide drm.ko internal interfaces · a97df1cc
      Daniel Vetter 提交于
      This is just a bit fallout from patch polishing and moving the
      get_prop logic fully into the core:
      - Drop EXPORT_SYMBOL and make the helpers static.
      - Drop kerneldoc since not used by drivers.
      - Move the cross-file function declarations only used by drm.ko
        internally to an internal header.
      
      v2: keep the gist of the comments, requested by Rob.
      
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      a97df1cc
    • R
      drm: Atomic modeset ioctl · d34f20d6
      Rob Clark 提交于
      The atomic modeset ioctl can be used to push any number of new values
      for object properties. The driver can then check the full device
      configuration as single unit, and try to apply the changes atomically.
      
      The ioctl simply takes a list of object IDs and property IDs and their
      values.
      
      Originally based on a patch from Ville Syrjälä, although it has mutated
      (mutilated?) enough since then that you probably shouldn't blame it on
      him ;-)
      
      The atomic support is hidden behind the DRM_CLIENT_CAP_ATOMIC cap (to
      protect legacy userspace) and drm.atomic module param (for now).
      
      v2: Check for file_priv->atomic to make sure we only allow userspace
      in-the-know to use atomic.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d34f20d6
    • R
      drm/atomic: atomic plane properties · 6b4959f4
      Rob Clark 提交于
      Expose the core plane state as properties, so they can be updated via
      atomic ioctl.
      
      v2: atomic property flag
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NSean Paul <seanpaul@chromium.org>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6b4959f4
    • R
      drm: add atomic properties · 88a48e29
      Rob Clark 提交于
      Once a driver is using atomic helpers for modeset, the next step is to
      switch over to atomic properties.  To do this, make sure that any
      modeset objects have their ->atomic_{get,set}_property() vfuncs suitably
      populated if they have custom properties (you did already remember to
      plug in atomic-helper func for the legacy ->set_property() vfuncs,
      right?), and then set DRIVER_ATOMIC bit in driver_features flag.
      
      A new cap is introduced, DRM_CLIENT_CAP_ATOMIC, for the purposes of
      shielding legacy userspace from atomic properties.  Mostly for the
      benefit of legacy DDX drivers that do silly things like getting/setting
      each property at startup (since some of the new atomic properties will
      be able to trigger modeset).
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet: Squash in fixup patch to check for DRM_MODE_PROP_ATOMIC
      instaed of the CAP define when filtering properties. Reported by
      Tvrtko Uruslin, acked by Rob.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      88a48e29
  6. 24 12月, 2014 1 次提交
  7. 19 12月, 2014 2 次提交
  8. 18 12月, 2014 10 次提交
  9. 17 12月, 2014 3 次提交
  10. 09 12月, 2014 6 次提交
  11. 06 12月, 2014 1 次提交
  12. 04 12月, 2014 1 次提交
  13. 27 11月, 2014 4 次提交
    • R
      drm: fix indentation · 417009fb
      Rob Clark 提交于
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      417009fb
    • R
      drm/atomic: add plane iterator macros · dd275956
      Rob Clark 提交于
      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: NRob 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: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dd275956
    • R
      drm/atomic: track bitmask of planes attached to crtc · 6ddd388a
      Rob Clark 提交于
      Chasing plane->state->crtc of planes that are *not* part of the same
      atomic update is racy, making it incredibly awkward (or impossible) to
      do something simple like iterate over all planes and figure out which
      ones are attached to a crtc.
      
      Solve this by adding a bitmask of currently attached planes in the
      crtc-state.
      
      Note that the transitional helpers do not maintain the plane_mask.  But
      they only support the legacy ioctls, which have sufficient brute-force
      locking around plane updates that they can continue to loop over all
      planes to see what is attached to a crtc the old way.
      Signed-off-by: NRob Clark <robdclark@gmail.com>
      [danvet:
      - Drop comments about locking in set_crtc_for_plane since they're a
        bit misleading - we already should hold lock for the current crtc.
      - Also WARN_ON if get_state on the old crtc fails since that should
        have been done already.
      - Squash in fixup to check get_plane_state return value, reported by
        Dan Carpenter and acked by Rob Clark.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6ddd388a
    • L
      drm: Decouple EDID parsing from I2C adapter · 18df89fe
      Lars-Peter Clausen 提交于
      The drm_get_edid() function performs direct I2C accesses to read EDID
      blocks, assuming that the monitor DDC interface is directly connected to
      the I2C bus. It can't thus be used with HDMI encoders that control the
      DDC bus and expose EDID blocks through a different interface.
      
      Refactor drm_do_get_edid() to take a block read callback function
      instead of an I2C adapter, and export it for direct use by drivers.
      
      As in the general case the DDC bus is accessible by the kernel at the
      I2C level, drivers must make all reasonable efforts to expose it as an
      I2C adapter and use drm_get_edid() instead of abusing this function.
      Signed-off-by: NLars-Peter Clausen <lars@metafoo.de>
      Signed-off-by: NLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      18df89fe