1. 03 2月, 2015 1 次提交
  2. 29 1月, 2015 1 次提交
  3. 22 1月, 2015 2 次提交
    • D
      drm/probe-helper: clamp unknown connector status in the poll work · b7703726
      Daniel Vetter 提交于
      On some chipset we try to avoid possibly invasive output detection
      methods (like load detect which can cause flickering elsewhere) in the
      output poll work. Drivers could hence return unknown when a previous
      full ->detect call returned a different state.
      
      This change will generate a hotplug event, forcing userspace to do a
      full scan. This in turn updates the connector->status field so that we
      will _again_ get a state change when the hotplug work re-runs in 10
      seconds.
      
      To avoid this ping-pong loop detect this situation and clamp the
      connector state to the old value.
      
      Patch is inspired by a patch from Knut Peterson. Knut's patch
      completely ignored connector state changes if either the old or new
      status was unknown, which seemed to be a bit too agressive to me.
      
      v2: Rebased onto the drm_probe_helper.c extraction.
      
      References: http://lists.freedesktop.org/archives/dri-devel/2012-August/025975.html
      Cc: Knut Petersen <Knut_Petersen@t-online.de>
      Cc: Alex Deucher <alexander.deucher@amd.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Acked-by: NAlex Deucher <alexander.deucher@amd.com>
      Cc: Rob Clark <robdclark@gmail.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b7703726
    • 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
  4. 21 1月, 2015 4 次提交
  5. 13 1月, 2015 1 次提交
  6. 10 1月, 2015 18 次提交
  7. 08 1月, 2015 13 次提交