1. Oct 23, 2012
    • Daniel Vetter's avatar
      drm/i915: VGA needs to be on pipe A on i830M · 7f6658ef
      Daniel Vetter authored
      The bit doesn't stick, and the output is always cloned from pipe A,
      even when it's supposed to scan out from pipe B.
      
      Shuts up annoying warnings from the modeset-rework, too.
      
      I've noticed that with this patch we know get and unknown connection
      state since the code can't find a suitable pipe for load detection.
      But that beats the previous state of affairs, where it tried to use
      pipe B, actually used pipe A and concluded that something is connected
      (although it's the LVDS on pipe A and nothing on the VGA connector on
      pipe B).
      
      I've tried to make load detect work by remapping the pipe->planes
      stuff, so that crtc 0 will use pipe B and hence we still have
      something left for load-detect on pipe A. But alas, that upset the hw
      a bit.
      
      So there's still some things to figure out, but this here will at
      least paper over some of the problems.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=51265
      
      
      Acked-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      [danvet: extend the commit message a bit with recent observations.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      7f6658ef
    • Daniel Vetter's avatar
      drm/i915: fix overlay on i830M · a9193983
      Daniel Vetter authored
      The overlay on the i830M has a peculiar failure mode: It works the
      first time around after boot-up, but consistenly hangs the second time
      it's used.
      
      Chris Wilson has dug out a nice errata:
      
      "1.5.12 Clock Gating Disable for Display Register
      Address Offset:	06200h–06203h
      
      "Bit 3
      Ovrunit Clock Gating Disable.
      0 = Clock gating controlled by unit enabling logic
      1 = Disable clock gating function
      DevALM Errata ALM049: Overlay Clock Gating Must be Disabled:  Overlay
      & L2 Cache clock gating must be disabled in order to prevent device
      hangs when turning off overlay.SW must turn off Ovrunit clock gating
      (6200h) and L2 Cache clock gating (C8h)."
      
      Now I've nowhere found that 0xc8 register and hence couldn't apply the
      l2 cache workaround. But I've remembered that part of the magic that
      the OVERLAY_ON/OFF commands are supposed to do is to rearrange cache
      allocations so that the overlay scaler has some scratch space.
      
      And while pondering how that could explain the hang the 2nd time we
      enable the overlay, I've remembered that the old ums overlay code did
      _not_ issue the OVERLAY_OFF cmd.
      
      And indeed, disabling the OFF cmd results in the overlay working
      flawlessly, so I guess we can workaround the lack of the above
      workaround by simply never disabling the overlay engine once it's
      enabled.
      
      Note that we have the first part of the above w/a already implemented
      in i830_init_clock_gating - leave that as-is to avoid surprises.
      
      v2: Add a comment in the code.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=47827
      
      
      Cc: stable@vger.kernel.org
      Tested-by: default avatarRhys <rhyspuk@gmail.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      a9193983
    • Thomas Hellstrom's avatar
      drm/ttm: Fix a theoretical race in ttm_bo_cleanup_refs() · b8e902f2
      Thomas Hellstrom authored
      
      
      In theory, that function could release the lru lock between
      checking for bo on ddestroy list and a successful reserve if the bo
      was already reserved, and the function was called with waiting reserves
      allowed.
      However, all current reservers of a bo on the ddestroy list would
      atomically take the bo off the list after a successful reserve so this
      race should not have been hit, so no need to backport for stable.
      
      This patch also fixes a case found by Maarten Lankhorst where
      ttm_mem_evict_first called with no_wait_gpu would incorrectly
      spin waiting for bo idle if trying to evict a busy buffer that
      also sits on the ddestroy list.
      
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      b8e902f2
    • Thomas Hellstrom's avatar
      drm/ttm: Fix a theoretical race · 7bc17a78
      Thomas Hellstrom authored
      
      
      The ttm_mem_evict_first function could theoretically drop the
      lru lock without retrying if a reservation from off the LRU list
      ended up waiting.
      However, since currently there are no users that could cause a wait
      in that situation so this is not suitable for stable
      
      Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      7bc17a78
    • Thierry Reding's avatar
      drm: platform: Don't initialize driver-private data · a16d4f86
      Thierry Reding authored
      
      
      Platform device drivers usually use the driver-private data for their
      own purposes. Having it overwritten by drm_platform_init() is confusing
      and error-prone.
      
      Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      a16d4f86
    • Marcin Slusarz's avatar
      drm/debugfs: remove redundant info from gem_names · 08bce0ac
      Marcin Slusarz authored
      
      
      It's a relic of "drm: Convert proc files to seq_file and introduce debugfs",
      which wrongly converted DRM_INFO + sprintf to 2 seq_printfs.
      
      Signed-off-by: default avatarMarcin Slusarz <marcin.slusarz@gmail.com>
      Cc: Ben Gamari <bgamari@gmail.com>
      Cc: Eric Anholt <eric@anholt.net>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      08bce0ac
    • Thierry Reding's avatar
      drm: fb: cma: Fail gracefully on allocation failure · 02813245
      Thierry Reding authored
      
      
      The drm_gem_cma_create() function never returns NULL but rather an error
      encoded in the return value using the ERR_PTR() macro. Callers therefore
      need to check for errors using the IS_ERR() macro. This change allows
      drivers to handle contiguous DMA allocation failures gracefully.
      
      Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
      Acked-by: default avatarSascha Hauer <s.hauer@pengutronix.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      02813245
    • Thierry Reding's avatar
      drm: fb: cma: Fix typo in debug message · e0d78d08
      Thierry Reding authored
      
      
      The debug message showing the resolution of a framebuffer to be
      allocated is missing a closing parenthesis.
      
      Signed-off-by: default avatarThierry Reding <thierry.reding@avionic-design.de>
      Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
      e0d78d08
  2. Oct 22, 2012
  3. Oct 21, 2012
  4. Oct 20, 2012