1. 23 Feb, 2015 3 commits
    • Daniel Vetter's avatar
      drm/i915: Flatten DRIVER_MODESET checks in i915_irq.c · f3a5c3f6
      Daniel Vetter authored
      UMS is no more!
      
      Cc: Imre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      f3a5c3f6
    • Daniel Vetter's avatar
      drm/i915: Drop pipe_enable checks in vblank funcs · 1efa2e35
      Daniel Vetter authored
      With Ville's rework to use drm_crtc_vblank_on/off the core will take
      care of rejecting drm_vblank_get calls when the pipe is off. Also the
      core won't call the get_vblank_counter hooks in that case either. And
      since we've dropped ums support recently we can now remove these
      hacks, yay!
      
      Noticed while trying to answer questions Laurent had about how the new
      atomic helpers work.
      
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      1efa2e35
    • Daniel Vetter's avatar
      drm/irq: Add drm_crtc_vblank_reset · 9625604c
      Daniel Vetter authored
      At driver load we need to tell the vblank code about the state of the
      pipes, so that the logic around reject vblank_get when the pipe is off
      works correctly.
      
      Thus far i915 used drm_vblank_off, but one of the side-effects of it
      is that it also saves the vblank counter. And for that it calls down
      into the ->get_vblank_counter hook. Which isn't really a good idea
      when the pipe is off for a few reasons:
      - With runtime pm the register might not respond.
      - If the pipe is off some datastructures might not be around or
        unitialized.
      
      The later is what blew up on gen3: We look at intel_crtc->config to
      compute the vblank counter, and for a disabled pipe at boot-up that's
      just not there. Thus far this was papered over by a check for
      intel_crtc->active, but I want to get rid of that (since it's fairly
      race, vblank hooks are called from all kinds of places).
      
      So prep for that by adding a _reset functions which only does what we
      really need to be done at driver load: Mark the vblank pipe as off,
      but don't do any vblank counter saving or event flushing - neither of
      that is required.
      
      v2: Clarify the code flow slightly as suggested by Ville.
      
      v3: Fix kerneldoc spelling, spotted by Laurent.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Reviewed-by: Imre Deak <imre.deak@intel.com> (v2)
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@intel.com>
      9625604c
  2. 13 Feb, 2015 37 commits