1. 20 7月, 2016 2 次提交
  2. 15 7月, 2016 2 次提交
  3. 05 7月, 2016 1 次提交
  4. 04 7月, 2016 1 次提交
  5. 03 7月, 2016 1 次提交
  6. 21 6月, 2016 2 次提交
  7. 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
  8. 09 6月, 2016 1 次提交
  9. 30 5月, 2016 1 次提交
  10. 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
  11. 28 4月, 2016 3 次提交
  12. 25 4月, 2016 1 次提交
  13. 01 4月, 2016 1 次提交
  14. 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
  15. 30 3月, 2016 1 次提交
  16. 22 3月, 2016 1 次提交
  17. 18 3月, 2016 1 次提交
  18. 01 3月, 2016 1 次提交
  19. 18 2月, 2016 1 次提交
  20. 22 12月, 2015 1 次提交
  21. 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
  22. 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
  23. 11 11月, 2015 1 次提交
  24. 09 11月, 2015 2 次提交
  25. 02 11月, 2015 1 次提交
  26. 09 10月, 2015 1 次提交
    • P
      drm/i915: don't allocate fbcon from stolen memory if it's too big · 3badb49f
      Paulo Zanoni 提交于
      Technology has evolved and now we have eDP panels with 3200x1800
      resolution. In the meantime, the BIOS guys didn't change the default
      32mb for stolen memory. On top of that, we can't assume our users will
      be able to increase the default stolen memory size to more than 32mb -
      I'm not even sure all BIOSes allow that.
      
      So just the fbcon buffer alone eats 22mb of my stolen memroy, and due
      to the BDW/SKL restriction of not using the last 8mb of stolen memory,
      all that's left for FBC is 2mb! Since fbcon is not the coolest feature
      ever, I think it's better to save our precious stolen resource to FBC
      and the other guys.
      
      On the other hand, we really want to use as much stolen memory as
      possible, since on some older systems the stolen memory may be a
      considerable percentage of the total available memory.
      
      This patch tries to achieve a little balance using a simple heuristic:
      if the fbcon wants more than half of the available stolen memory,
      don't use stolen memory in order to leave some for FBC and the other
      features.
      
      The long term plan should be to implement a way to set priorities for
      stolen memory allocation and then evict low priority users when the
      high priority ones need the memory. While we still don't have that,
      let's try to make FBC usable with the simple solution.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3badb49f
  27. 17 9月, 2015 1 次提交
  28. 14 9月, 2015 2 次提交
  29. 15 8月, 2015 1 次提交
    • M
      drm/i915/gtt: Allow >= 4GB offsets in X86_32 · 088e0df4
      Michel Thierry 提交于
      Similar to commit c44ef60e ("drm/i915/gtt:
      Allow >= 4GB sizes for vm"), i915_gem_obj_offset and i915_gem_obj_ggtt_offset
      return an unsigned long, which in only 4-bytes long in 32-bit kernels.
      
      Change return type (and other related offset variables) to u64.
      
      Since Global GTT is always limited to 4GB, this change would not be required
      in i915_gem_obj_ggtt_offset, but this is done for consistency.
      
      v2: Remove unnecessary offset variable in do_pin, as we already have
          vma->node.start (Chris).
          Update GGTT offset too (Tvrtko).
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Signed-off-by: NMichel Thierry <michel.thierry@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      088e0df4
  30. 06 8月, 2015 2 次提交
    • A
      drm/i915: Use new drm_fb_helper functions · 21cff148
      Archit Taneja 提交于
      Use the newly created wrapper drm_fb_helper functions instead of calling
      core fbdev functions directly. They also simplify the fb_info creation.
      
      v3:
      - Don't touch remove_conflicting_framebuffers
      
      v2:
      - No changes
      
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Signed-off-by: NArchit Taneja <architt@codeaurora.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      21cff148
    • D
      drm/fbdev: Return -EBUSY when oopsing · c50bfd08
      Daniel Vetter 提交于
      Trying to do anything with kms drivers when oopsing has become a
      failing proposition. But since we can end up in the fbdev code simply
      due to the console unblanking that's done unconditionally just
      removing our panic handler isn't enough. We need to block all fbdev
      callbacks when oopsing.
      
      There was already one in the blank handler, but it failed silently.
      That makes it impossible for drivers (like i915) who subclass these
      functions to figure this out.
      
      Instead consistently return -EBUSY so that everyone knows that we
      really don't want to be bothered right now. This also allows us to
      remove a pile of FIXMEs from the i915 fbdev code (since due to the
      failure code they now won't attempt to grab dangerous locks any more).
      
      Cc: Dave Airlie <airlied@gmail.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@gmail.com>
      Reviewed-by: NRob Clark <robdclark@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@intel.com>
      c50bfd08
  31. 14 7月, 2015 1 次提交
    • M
      drm/i915: Readout initial hw mode. · 5c1e3426
      Maarten Lankhorst 提交于
      drm/i915: Readout initial hw mode, v2.
      
      Atomic requires a mode blob when crtc_state->enable is true, or
      you get a huge warn_on.
      
      With a few tweaks the mode we read out from hardware could be used
      as the real mode without a modeset, but this requires too much
      testing, so for now force a modeset the first time the mode blob's
      updated.
      
      This preserves the old behavior, because previously we never set
      the initial mode, which always meant that a modeset happened
      when the mode was first set.
      
      Changes since v1:
      - Add a description in intel_modeset_readout_hw_state of how the
        recalculation is done.
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NDaniel Stone <daniels@collabora.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5c1e3426