1. 02 12月, 2016 1 次提交
  2. 14 11月, 2016 1 次提交
  3. 11 11月, 2016 1 次提交
  4. 22 8月, 2016 1 次提交
  5. 15 8月, 2016 2 次提交
  6. 12 8月, 2016 1 次提交
  7. 09 8月, 2016 1 次提交
  8. 05 8月, 2016 1 次提交
  9. 04 8月, 2016 1 次提交
  10. 20 7月, 2016 2 次提交
  11. 15 7月, 2016 2 次提交
  12. 05 7月, 2016 1 次提交
  13. 04 7月, 2016 1 次提交
  14. 03 7月, 2016 1 次提交
  15. 21 6月, 2016 2 次提交
  16. 13 6月, 2016 1 次提交
    • L
      drm/i915: Don't unregister fbdev's fb twice · 2ce0004c
      Lukas Wunner 提交于
      Calling drm_framebuffer_unregister_private() in intel_fbdev_destroy() is
      superfluous because the framebuffer will subsequently be unregistered by
      drm_framebuffer_free() when unreferenced in drm_framebuffer_remove().
      The call is a leftover, when it was introduced by commit 36206361
      ("drm: revamp framebuffer cleanup interfaces"), struct intel_framebuffer
      was still embedded in struct intel_fbdev rather than being a pointer as
      it is today, and drm_framebuffer_remove() wasn't used yet.
      
      As a bonus, the ID of the framebuffer is no longer 0 in the debug log:
      
      Before:
          [   39.680874] [drm:drm_mode_object_unreference] OBJ ID: 0 (3)
          [   39.680878] [drm:drm_mode_object_unreference] OBJ ID: 0 (2)
          [   39.680884] [drm:drm_mode_object_unreference] OBJ ID: 0 (1)
      
      After:
          [  102.504649] [drm:drm_mode_object_unreference] OBJ ID: 45 (3)
          [  102.504651] [drm:drm_mode_object_unreference] OBJ ID: 45 (2)
          [  102.504654] [drm:drm_mode_object_unreference] OBJ ID: 45 (1)
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/5031860caad67faa0f1be5965331ef048a311a01.1465383212.git.lukas@wunner.de
      2ce0004c
  17. 09 6月, 2016 1 次提交
  18. 30 5月, 2016 1 次提交
  19. 17 5月, 2016 1 次提交
    • L
      drm/i915/fbdev: Fix num_connector references in intel_fb_initial_config() · 14a3842a
      Lyude 提交于
      During boot time, MST devices usually send a ton of hotplug events
      irregardless of whether or not any physical hotplugs actually occurred.
      Hotplugs mean connectors being created/destroyed, and the number of DRM
      connectors changing under us. This isn't a problem if we use
      fb_helper->connector_count since we only set it once in the code,
      however if we use num_connector from struct drm_mode_config we risk it's
      value changing under us. On top of that, there's even a chance that
      dev->mode_config.num_connector != fb_helper->connector_count. If the
      number of connectors happens to increase under us, we'll end up using
      the wrong array size for memcpy and start writing beyond the actual
      length of the array, occasionally resulting in kernel panics.
      
      Note: This is just polish for 4.7, Dave Airlie's drm_connector
      refcounting fixed these bugs for real. But it's good enough duct-tape
      for stable kernel backporting, since backporting the refcounting
      changes is way too invasive.
      
      Cc: stable@vger.kernel.org
      Signed-off-by: NLyude <cpaul@redhat.com>
      [danvet: Clarify why we need this.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463065021-18280-2-git-send-email-cpaul@redhat.com
      14a3842a
  20. 28 4月, 2016 3 次提交
  21. 25 4月, 2016 1 次提交
  22. 01 4月, 2016 1 次提交
  23. 31 3月, 2016 1 次提交
    • J
      drm/i915: Refer to GGTT {,VM} consistently · 72e96d64
      Joonas Lahtinen 提交于
      Refer to the GGTT VM consistently as "ggtt->base" instead of just "ggtt",
      "vm" or indirectly through other variables like "dev_priv->ggtt.base"
      to avoid confusion with the i915_ggtt object itself and PPGTT VMs.
      
      Refer to the GGTT as "ggtt" instead of indirectly through chaining.
      
      As a bonus gets rid of the long-standing i915_obj_to_ggtt vs.
      i915_gem_obj_to_ggtt conflict, due to removal of i915_obj_to_ggtt!
      
      v2:
      - Added some more after grepping sources with Chris
      
      v3:
      - Refer to GGTT VM through ggtt->base consistently instead of ggtt_vm
        (Chris)
      
      v4:
      - Convert all dev_priv->ggtt->foo accesses to ggtt->foo.
      
      v5:
      - Make patch checker happy
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      72e96d64
  24. 30 3月, 2016 1 次提交
  25. 22 3月, 2016 1 次提交
  26. 18 3月, 2016 1 次提交
  27. 01 3月, 2016 1 次提交
  28. 18 2月, 2016 1 次提交
  29. 22 12月, 2015 1 次提交
  30. 17 12月, 2015 1 次提交
    • C
      drm/i915: Pin the ifbdev for the info->system_base GGTT mmapping · 0c82312f
      Chris Wilson 提交于
      A long time ago (before 3.14) we relied on a permanent pinning of the
      ifbdev to lock the fb in place inside the GGTT. However, the
      introduction of stealing the BIOS framebuffer and reusing its address in
      the GGTT for the fbdev has muddied waters and we use an inherited fb.
      However, the inherited fb is only pinned whilst it is active and we no
      longer have an explicit pin for the info->system_base mmapping used by
      the fbdev. The result is that after some aperture pressure the fbdev may
      be evicted, but we continue to write the fbcon into the same GGTT
      address - overwriting anything else that may be put into that offset.
      The effect is most pronounced across suspend/resume as
      intel_fbdev_set_suspend() does a full clear over the whole scanout.
      
      v2: Only unpin the intel_fb is we allocate it. If we inherit the fb from
      the BIOS, we do not own the pinned vma (except for the reference we add
      in this patch for our access via info->screen_base).
      
      v3: Finish balancing the vma pinning for the normal !preallocated case.
      
      v4: Try to simplify the pinning even further.
      v5: Leak the VMA (cleaned up by object-free) to avoid complicated error paths.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: "Goel, Akash" <akash.goel@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Cc: Lukas Wunner <lukas@wunner.de>
      Cc: drm-intel-fixes@lists.freedesktop.org
      Link: http://patchwork.freedesktop.org/patch/msgid/1449245126-26158-1-git-send-email-chris@chris-wilson.co.ukTested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0c82312f
  31. 20 11月, 2015 2 次提交
    • L
      drm/i915: Tear down fbdev if initialization fails · 366e39b4
      Lukas Wunner 提交于
      Currently if intelfb_create() errors out, it unrefs the bo even though
      the fb now owns that reference. (Spotted by Ville Syrjälä.) We should
      unref the fb instead of the bo.
      
      However the fb was not necessarily allocated by intelfb_create(),
      it could be inherited from BIOS (the fb struct was then allocated by
      dev_priv->display.get_initial_plane_config()) and be in active use by
      a crtc. In this case we should call drm_framebuffer_remove() instead
      of _unreference() to also disable the crtc.
      
      Daniel Vetter suggested that "fbdev teardown code will take care of it.
      The correct approach is probably to not unref anything at all".
      
      But if fbdev initialization fails, the fbdev isn't torn down and
      occupies memory even though it's unusable. Therefore clobber it in
      intel_fbdev_initial_config(). (Currently we ignore a negative return
      value there.) The idea is that if fbdev initialization fails, the driver
      behaves as if CONFIG_DRM_FBDEV_EMULATION wasn't set. Should X11 manage
      to start up without errors, it will at least be able to use the memory
      that would otherwise be hogged by the unusable fbdev.
      
      Also, log errors in intelfb_create().
      
      Don't call async_synchronize_full() in intel_fbdev_fini() when called
      from intel_fbdev_initial_config() to avoid deadlock.
      
      v2: Instead of calling drm_framebuffer_unreference() (if fb was not
          inherited from BIOS), call intel_fbdev_fini().
      
      v3: Rebase on e00bf696 (drm/i915: Move the fbdev async_schedule()
          into intel_fbdev.c), call async_synchronize_full() conditionally
          instead of moving it into i915_driver_unload().
      
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/49ce5f0daead24b7598ec78591731046c333c18d.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      366e39b4
    • L
      drm/i915: Fix oops caused by fbdev initialization failure · 54632abe
      Lukas Wunner 提交于
      intelfb_create() is called once on driver initialization. If it fails,
      ifbdev->helper.fbdev, ifbdev->fb or ifbdev->fb->obj may be NULL.
      
      Further up in the call stack, intel_fbdev_initial_config() calls
      intel_fbdev_fini() to tear down the ifbdev on failure. This calls
      intel_fbdev_destroy() which dereferences ifbdev->fb. Fix the ensuing
      oops.
      
      Also check in these functions if ifbdev is not NULL to avoid oops:
      
      i915_gem_framebuffer_info() is called on access to debugfs file
      "i915_gem_framebuffer" and dereferences ifbdev, ifbdev->helper.fb
      and ifbdev->helper.fb->obj.
      
      intel_connector_add_to_fbdev() / intel_connector_remove_from_fbdev()
      are called when registering / unregistering an mst connector and
      dereference ifbdev.
      
      v3: Drop additional null pointer checks in intel_fbdev_set_suspend(),
          intel_fbdev_output_poll_changed() and intel_fbdev_restore_mode()
          since they already check if ifbdev is not NULL, which is sufficient
          now that intel_fbdev_fini() is called on initialization failure.
          (Requested by Daniel Vetter <daniel.vetter@ffwll.ch>)
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Link: http://patchwork.freedesktop.org/patch/msgid/d05f0edf121264a9d0adb8ca713fd8cc4ae068bf.1447938059.git.lukas@wunner.deSigned-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      54632abe
  32. 11 11月, 2015 1 次提交
  33. 09 11月, 2015 1 次提交
    • T
      drm/i915: Fix failure paths around initial fbdev allocation · 51f1385b
      Tvrtko Ursulin 提交于
      We had two failure modes here:
      
      1.
      Deadlock in intelfb_alloc failure path where it calls
      drm_framebuffer_remove, which grabs the struct mutex and intelfb_create
      (caller of intelfb_alloc) was already holding it.
      
      2.
      Deadlock in intelfb_create failure path where it calls
      drm_framebuffer_unreference, which grabs the struct mutex and
      intelfb_create was already holding it.
      
      [Daniel Vetter on why struct_mutex needs to be locked in the second half
      of intelfb_create: "The vma [for the fbdev] is pinned, the problem is
      that we re-lookup it a few times, which is racy. We should instead track
      the vma directly, but oh well we don't."]
      
      v2:
         * Reformat commit msg to 72 chars. (Lukas Wunner)
         * Add third failure mode. (Lukas Wunner)
      
      v5:
         * Rebase on drm-intel-nightly 2015y-09m-01d-09h-06m-08s UTC,
           rephrase commit message. (Jani Nicula)
      
      v6:
         * In intelfb_alloc, if __intel_framebuffer_create failed,
           fb will be an ERR_PTR, thus not null. So in the failure
           path we need to check for IS_ERR_OR_NULL to avoid calling
           drm_framebuffer_remove on the ERR_PTR. (Lukas Wunner)
         * Since this is init code a drm_framebuffer_unreference should
           be all we need. drm_framebuffer_remove is for framebuffers
           that userspace has created - and is getting somewhat
           defeatured. (Daniel Vetter)
      
      v7:
         * Clarify why struct_mutex needs to be locked in the second half
           of intelfb_create. (Daniel Vetter)
      
      Fixes: 60a5ca01 ("drm/i915: Add locking around
          framebuffer_references--")
      Reported-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      [Lukas: Create v3 + v4 + v5 + v6 + v7 based on Tvrtko's v2]
      Signed-off-by: NLukas Wunner <lukas@wunner.de>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/47d4e88c91b3bf0f7a280cabec54c8c8cf0cf6f2.1446892879.git.lukas@wunner.deSigned-off-by: NJani Nikula <jani.nikula@intel.com>
      51f1385b