1. 04 Sep, 2013 34 commits
  2. 03 Sep, 2013 6 commits
    • Daniel Vetter's avatar
      drm/i915: fix up the relocate_entry refactoring · d4d36014
      Daniel Vetter authored
      Somehow we've lost the error handling in the patch split-up between
      the internal and external patch. This regression has been introduced
      in
      
      commit 5032d871
      Author: Rafael Barbalho <rafael.barbalho@intel.com>
      Date:   Wed Aug 21 17:10:51 2013 +0100
      
          drm/i915: Cleaning up the relocate entry function
      
      This bug is exercised by igt/gem_reloc_vs_gpu/interruptible.
      
      Cc: Rafael Barbalho <rafael.barbalho@intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d4d36014
    • Ville Syrjälä's avatar
      drm/i915: Fix pipe config warnings when dealing with LVDS fixed mode · 4c6df4b4
      Ville Syrjälä authored
      intel_fixed_panel_mode() overwrote the adjusted_mode with the fixed mode
      only partially. Notably it forgot to copy over the sync flags. The LVDS code however programmed the hardware with the sync flags from fixed mode, and then later the pipe config comparison obviously failed as we
      filled out the adjusted_mode in get_config from the real registers.
      
      Just call drm_mode_copy() in intel_fixed_panel_mode() to copy over the
      whole thing, and then just use adjusted_mode in the LVDS code to figure
      out which sync settings the hardware needs.
      
      Also constify the fixed_mode argument to intel_fixed_panel_mode().
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      4c6df4b4
    • Damien Lespiau's avatar
      drm/i915: Don't call sg_free_table() if sg_alloc_table() fails · d2933a5b
      Damien Lespiau authored
      One needs to call __sg_free_table() if __sg_alloc_table() fails, but
      sg_alloc_table() does that for us already.
      Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
      Reviewd-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      d2933a5b
    • Alex Williamson's avatar
      i915: Update VGA arbiter support for newer devices · 81b5c7bc
      Alex Williamson authored
      This is intended to add VGA arbiter support for Intel HD graphics on
      Core processors.  The old GMCH registers no longer exist, so even
      though it appears that i915 participates in VGA arbitration, it doesn't
      work.  On Intel HD graphics we already attempt to disable VGA regions
      of the device.  This makes registering as a VGA client unnecessary since
      we don't intend to operate differently depending on how many VGA devices
      are present.  We can disable VGA memory regions by clearing the memory
      enable bit in the VGA MSR.  That only leaves VGA IO, which we update
      the VGA arbiter to know that we don't participate in VGA memory
      arbitration.  We also add a hook on unload to re-enable memory and
      reinstate VGA memory arbitration.
      
      v3: Use explicit LEGACY_IO | LEGACY_MEM when restoring rather than
          LEGACY_MASK, per Ville's comments.
      
      v2: I915_READ/WRITE accessors don't work in i915_disable_vga, use inb/outb
          directly.  Also, on the driver unbind VGA enable path, acquire legacy
          IO to re-enable VGA memory.  Correct comment.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Add patch changelog. Also squash in a fixup to have a dummy
      static inline for vga_set_legacy_decoding for CONFIG_VGA_ARB=n as
      reported by the 0-day kernel build bot.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      
      fixup 2
      81b5c7bc
    • Alex Williamson's avatar
      vgaarb: Fix VGA decodes changes · 5c0f6ee7
      Alex Williamson authored
      When VGA decodes change we need to do a bit more evaluation of exactly what
      has changed.  We don't necessarily give up all the old owns resources and
      we need to account for resources with locks.  The new algorithm is: If
      something is added, update decodes.  If legacy resources were added and
      none were there before, we have a new participant.  If something is
      removed, update decodes.  If we previously owned it, we no longer own it.
      If it was previously locked, invalidate all locks and release it.  If
      legacy resources were removed and none are left, remove the participant
      from VGA arbitration.
      
      Previously we updated decodes, released ownership of everything that was
      previously decoded, ignored all locks, and went off looking for another
      device to transfer VGA to.  In a test case where Intel IGD removes only
      legacy VGA memory decoding, this left the arbiter switching to discrete
      graphics without actually disabling legacy VGA IO from the IGD.  As a
      bonus, we bumped up the count of VGA arbitration participants for no
      good reason.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Kill now unused variables, reported by the 0-day kernel
      builtbot.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      5c0f6ee7
    • Alex Williamson's avatar
      vgaarb: Don't disable resources that are not owned · f22d776f
      Alex Williamson authored
      If a device does not own a resource then we don't need to disable it.
      This resolves the case where an Intel IGD device can be configured to
      disable decode of VGA memory but we still need the arbiter to handle
      VGA I/O port routing.  When the IGD device is in conflict, only
      PCI_COMMAND_IO should be disabled since VGA memory does not require
      arbitration on this device.
      Signed-off-by: default avatarAlex Williamson <alex.williamson@redhat.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Acked-by: default avatarDave Airlie <airlied@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      f22d776f