1. 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
  2. 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
  3. 14 7月, 2015 2 次提交
  4. 10 7月, 2015 2 次提交
    • R
      drm/i915: fbdev restore mode needs to invalidate frontbuffer · d04df732
      Rodrigo Vivi 提交于
      This fbdev restore mode was another corner case that was now
      calling frontbuffer flip and flush and making we miss
      screen updates with PSR enabled.
      
      So let's also add the invalidate hack here while we don't have
      a reliable dirty fbdev op.
      
      v2: As pointed by Paulo: removed seg fault risk, used fb_helper
          when possible and put brackets on if.
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Testcase: igt/kms_fbcon_fbt/psr
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d04df732
    • R
      drm/i915: fbdev_set_par reliably invalidating frontbuffer · aba6da3e
      Rodrigo Vivi 提交于
      fbdev_set_par is called when fbcon is taking over control.
      In the past frontbuffer was being invalidated on
      set_to_gtt_domain, but it moved to set_domain fixing that case,
      but left this behind and broken in
      
      commit 031b698a
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Fri Jun 26 19:35:16 2015 +0200
      
          drm/i915: Unconditionally do fb tracking invalidate in set_domain
      
      Note that even before this commit it wasn't perfect since the
      invalidate was omitted if the fbcon was already in the GTT domain,
      which it usually was.
      
      Since we are also invalidating in other fbdev cases this one
      was masked here. At least until now that I found this corner
      case: On boot with plymouth doing a splash screen
      when returning to the console frontbuffer wans't being invalidated
      causing missed screen updates with PSR enabled.
      
      So this patch fixes this issue.
      
      v2: Make invalidate directly and unconditionally and
          fix commit message indicating the set_domain fix
          as pointed out by Daniel.
      v3: Remove unecessary if(obj) added by mistake
      
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      [danvet: Try to clarify commit message a bit and make it clear the
      referenced commit made this worse.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      aba6da3e
  5. 23 6月, 2015 1 次提交
    • J
      drm/i915: Update i915_gem_object_sync() to take a request structure · 91af127f
      John Harrison 提交于
      The plan is to pass requests around as the basic submission tracking structure
      rather than rings and contexts. This patch updates the i915_gem_object_sync()
      code path.
      
      v2: Much more complex patch to share a single request between the sync and the
      page flip. The _sync() function now supports lazy allocation of the request
      structure. That is, if one is passed in then that will be used. If one is not,
      then a request will be allocated and passed back out. Note that the _sync() code
      does not necessarily require a request. Thus one will only be created until
      certain situations. The reason the lazy allocation must be done within the
      _sync() code itself is because the decision to need one or not is not really
      something that code above can second guess (except in the case where one is
      definitely not required because no ring is passed in).
      
      The call chains above _sync() now support passing a request through which most
      callers passing in NULL and assuming that no request will be required (because
      they also pass in NULL for the ring and therefore can't be generating any ring
      code).
      
      The exeception is intel_crtc_page_flip() which now supports having a request
      returned from _sync(). If one is, then that request is shared by the page flip
      (if the page flip is of a type to need a request). If _sync() does not generate
      a request but the page flip does need one, then the page flip path will create
      its own request.
      
      v3: Updated comment description to be clearer about 'to_req' parameter (Tomas
      Elf review request). Rebased onto newer tree that significantly changed the
      synchronisation code.
      
      v4: Updated comments from review feedback (Tomas Elf)
      
      For: VIZ-5115
      Signed-off-by: NJohn Harrison <John.C.Harrison@Intel.com>
      Reviewed-by: NTomas Elf <tomas.elf@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      91af127f
  6. 22 6月, 2015 1 次提交
  7. 29 5月, 2015 1 次提交
    • R
      drm/i915: Another fbdev hack to avoid PSR on fbcon. · d9a946b5
      Rodrigo Vivi 提交于
      With unified modeset and flip paths introduced recently when switching
      to fbcon PSR was being disabled on fb_set_par path but re-enabled on
      fb_pan_display one, causing missed screen updates and un unusable
      console.
      
      Regression introduced with:
      
      commit bb546623
      Author: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Date:   Tue Apr 21 17:13:13 2015 +0300
      
          drm/i915: Unify modeset and flip paths of intel_crtc_set_config()
      
      Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d9a946b5
  8. 23 3月, 2015 1 次提交
  9. 18 3月, 2015 1 次提交
    • R
      drm/i915: Make sure we invalidate frontbuffer on fbcon. · 03e515f7
      Rodrigo Vivi 提交于
      There are some cases like suspend/resume or dpms off/on sequences
      that can flush frontbuffer bits. In these cases features that relies
      on frontbuffer tracking can start working and user can stop getting
      screen updates on fbcon having impression the system is frozen.
      
      So, let's make sure we also invalidate frontbuffer on fbdev blank.
      
      v2: Daniel was right, backtrace didn't show other path than this blank
      one so let's make sure frontbuffer bits gets invalidate here instead of
      on random write operations that doesn't garantee we track all frontbuffer
      writes.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      [danvet: Exchange code comments for one that complains about the
      locking, like in set_par.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      03e515f7
  10. 14 2月, 2015 1 次提交
  11. 27 1月, 2015 5 次提交
    • D
      drm/i915: Rename plane_config to initial_plane_config · 5724dbd1
      Damien Lespiau 提交于
      This vfunc and related structure are only used for fast boot, so let's
      rename them to not take them as general purpose ones.
      
      v2: Fix conflicts caused by the introduction of struct intel_crtc_state
      
      Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
      Suggested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5724dbd1
    • D
      drm/i915: Use a common function for computing the fb height alignment · ec2c981e
      Damien Lespiau 提交于
      If we need to change the fb height constraints, it sounds like a good
      idea to have to do it in one place only.
      
      v2: v2: Rebase on top of Ander's "Make intel_crtc->config a pointer"
      
      Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ec2c981e
    • D
      drm/i915: Change plane_config to store a tiling_mode · 49af449b
      Damien Lespiau 提交于
      Rather than having "tiled" meaning "is it X-tiled?" convert the field to
      explicitely store the tiling mode. The code doesn't have to change much
      as 1 is conveniently I915_TILING_X.
      
      This is to accommodate future changes around tiling modes and scannout
      buffers.
      
      v2: Rebase on top of Ander's "Make intel_crtc->config a pointer"
      
      Reviewed-By: Tvrtko Ursulin <tvrtko.ursulin@intel.com> (v1)
      Signed-off-by: NDamien Lespiau <damien.lespiau@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      49af449b
    • A
      drm/i915: Make intel_crtc->config a pointer · 6e3c9717
      Ander Conselvan de Oliveira 提交于
      To match the semantics of drm_crtc->state, which this will eventually
      become. The allocation of the memory for config will be fixed in a
      followup patch. By adding the extra _config field to intel_crtc it was
      possible to generate this entire patch with the cocci script below.
      
      @@ @@
      struct intel_crtc {
      ...
      -struct intel_crtc_state config;
      +struct intel_crtc_state _config;
      +struct intel_crtc_state *config;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -memset(&crtc->config, 0, sizeof(crtc->config));
      +memset(crtc->config, 0, sizeof(*crtc->config));
      @@ @@
      __intel_set_mode(...) {
      <...
      -to_intel_crtc(crtc)->config = *pipe_config;
      +(*(to_intel_crtc(crtc)->config)) = *pipe_config;
      ...>
      }
      @@ @@
      intel_crtc_init(...) {
      ...
      WARN_ON(drm_crtc_index(&intel_crtc->base) != intel_crtc->pipe);
      +intel_crtc->config = &intel_crtc->_config;
      return;
      ...
      }
      @@ struct intel_crtc *crtc; @@
      -&crtc->config
      +crtc->config
      @@ struct intel_crtc *crtc; identifier member; @@
      -crtc->config.member
      +crtc->config->member
      @@ expression E; @@
      -&(to_intel_crtc(E)->config)
      +to_intel_crtc(E)->config
      @@ expression E; identifier member; @@
      -to_intel_crtc(E)->config.member
      +to_intel_crtc(E)->config->member
      
      v2: Clarify manual changes by splitting them into another patch. (Matt)
          Improve cocci script to generate even more of the changes. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6e3c9717
    • A
      drm/i915: Embedded struct drm_crtc_state in intel_crtc_state · 2d112de7
      Ander Conselvan de Oliveira 提交于
      And get rid of the duplicate mode structures. This patch was generated
      with the following semantic patch:
      
      @@ @@
      struct intel_crtc_state {
      +struct drm_crtc_state base;
      +
      ...
      -struct drm_display_mode requested_mode;
      -struct drm_display_mode adjusted_mode;
      ...
      }
      @@ struct intel_crtc_state *state; @@
      -state->adjusted_mode
      +state->base.adjusted_mode
      @@ struct intel_crtc_state *state; @@
      -state->requested_mode
      +state->base.mode
      @@ struct intel_crtc_state state; @@
      -state.adjusted_mode
      +state.base.adjusted_mode
      @@ struct intel_crtc_state state; @@
      -state.requested_mode
      +state.base.mode
      @@ struct drm_crtc *crtc; @@
      -to_intel_crtc(crtc)->config.adjusted_mode
      +to_intel_crtc(crtc)->config.base.adjusted_mode
      @@ identifier member; expression E; @@
      -PIPE_CONF_CHECK_FLAGS(adjusted_mode.member, E);
      +PIPE_CONF_CHECK_FLAGS(base.adjusted_mode.member, E);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_I(adjusted_mode.member);
      +PIPE_CONF_CHECK_I(base.adjusted_mode.member);
      @@ identifier member; @@
      -PIPE_CONF_CHECK_CLOCK_FUZZY(adjusted_mode.member);
      +PIPE_CONF_CHECK_CLOCK_FUZZY(base.adjusted_mode.member);
      
      v2: Completely generate the patch with cocci. (Ander)
      Signed-off-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2d112de7
  12. 09 12月, 2014 1 次提交
  13. 08 11月, 2014 1 次提交
  14. 03 9月, 2014 2 次提交
  15. 13 8月, 2014 1 次提交
    • C
      drm/i915: Localise the fbdev console lock frobbing · 82e3b8c1
      Chris Wilson 提交于
      Rather than take and release the console_lock() around a non-existent
      DRM_I915_FBDEV, move the lock acquisation into the callee where it will
      be compiled out by the config option entirely. This includes moving the
      deferred fb_set_suspend() dance and encapsulating it entirely within
      intel_fbdev.c.
      
      v2: Use an integral work item so that we can explicitly flush the work
      upon suspend/unload.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      [danvet: Add the flush_work in fbdev_fini per the mailing list
      discussion. And s/BUG_ON/WARN_ON/ because.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      82e3b8c1
  16. 24 7月, 2014 1 次提交
  17. 22 7月, 2014 1 次提交
    • D
      drm/i915: add DP 1.2 MST support (v0.7) · 0e32b39c
      Dave Airlie 提交于
      This adds DP 1.2 MST support on Haswell systems.
      
      Notes:
      a) this reworks irq handling for DP MST ports, so that we can
      avoid the mode config locking in the current hpd handlers, as
      we need to process up/down msgs at a better time.
      
      Changes since v0.1:
      use PORT_PCH_HOTPLUG to detect short vs long pulses
      add a workqueue to deal with digital events as they can get blocked on the
      main workqueue beyong mode_config mutex
      fix a bunch of modeset checker warnings
      acks irqs in the driver
      cleanup the MST encoders
      
      Changes since v0.2:
      check irq status again in work handler
      move around bring up and tear down to fix DPMS on/off
      use path properties.
      
      Changes since v0.3:
      updates for mst apis
      more state checker fixes
      irq handling improvements
      fbcon handling support
      improved reference counting of link - fixes redocking.
      
      Changes since v0.4:
      handle gpu reset hpd reinit without oopsing
      check link status on HPD irqs
      fix suspend/resume
      
      Changes since v0.5:
      use proper functions to get max link/lane counts
      fix another checker backtrace - due to connectors disappearing.
      set output type in more places fro, unknown->displayport
      don't talk to devices if no HPD asserted
      check mst on short irqs only
      check link status properly
      rebase onto prepping irq changes.
      drop unsued force_act
      
      Changes since v0.6:
      cleanup unused struct entry.
      
      [airlied: fix some sparse warnings].
      Reviewed-by: NTodd Previte <tprevite@gmail.com>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      0e32b39c
  18. 08 7月, 2014 2 次提交
  19. 02 7月, 2014 1 次提交
  20. 19 6月, 2014 1 次提交
  21. 13 6月, 2014 1 次提交
  22. 05 6月, 2014 1 次提交
  23. 04 6月, 2014 1 次提交
  24. 15 5月, 2014 1 次提交
  25. 14 5月, 2014 2 次提交
  26. 24 4月, 2014 1 次提交
  27. 02 4月, 2014 1 次提交
    • C
      drm/i915: Fix the computation of required fb size for pipe · bc104d1f
      Chris Wilson 提交于
      The computation of required framebuffer size in
      
      commit d978ef14
      Author: Jesse Barnes <jbarnes@virtuousgeek.org>
      Date:   Fri Mar 7 08:57:51 2014 -0800
      
          drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12
      
      is too optimistic, and would rely on the invariant fb being
      reconstructed to exactly fit each pipe (and probably ignore hardware
      limits). Instead, we want to compute the upper bound on what the display
      engine will access and ensure that is within the inherited framebuffer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Jesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      bc104d1f
  28. 08 3月, 2014 2 次提交
    • J
      drm/i915: remove early fb allocation dependency on CONFIG_FB v2 · 484b41dd
      Jesse Barnes 提交于
      By stuffing the fb allocation into the crtc, we get mode set lifetime
      refcounting for free, but have to handle the initial pin & fence
      slightly differently.  It also means we can move the shared fb handling
      into the core rather than leaving it out in the fbdev code.
      
      v2: null out crtc->fb on error (Daniel)
          take fbdev fb ref and remove unused error path (Daniel)
      Requested-by: NDaniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      484b41dd
    • J
      drm/i915: Wrap the preallocated BIOS framebuffer and preserve for KMS fbcon v12 · d978ef14
      Jesse Barnes 提交于
      Retrieve current framebuffer config info from the regs and create an fb
      object for the buffer the BIOS or boot loader left us.  This should
      allow for smooth transitions to userspace apps once we finish the
      initial configuration construction.
      
      v2: check for non-native modes and adjust (Jesse)
          fixup aperture and cmap frees (Imre)
          use unlocked unref if init_bios fails (Jesse)
          fix curly brace around DSPADDR check (Imre)
          comment failure path for pin_and_fence (Imre)
      v3: fixup fixup of aperture frees (Chris)
      v4: update to current bits (locking & pin_and_fence hack) (Jesse)
      v5: move fb config fetch to display code (Jesse)
          re-order hw state readout on initial load to suit fb inherit (Jesse)
          re-add pin_and_fence in fbdev code to make sure we refcount properly (Je
      v6: rename to plane_config (Daniel)
          check for valid object when initializing BIOS fb (Jesse)
          split from plane_config readout and other display changes (Jesse)
          drop use_bios_fb option (Chris)
          update comments (Jesse)
          rework fbdev_init_bios for clarity (Jesse)
          drop fb obj ref under lock (Chris)
      v7: use fb object from plane_config instead (Ville)
          take ref on fb object (Jesse)
      v8: put under i915_fastboot option (Jesse)
          fix fb ptr checking (Jesse)
          inform drm_fb_helper if we fail to enable a connector (Jesse)
          drop unnecessary enabled[] modifications in failure cases (Chris)
          split from BIOS connector config readout (Daniel)
          don't memset the fb buffer if preallocated (Chris)
          alloc ifbdev up front and pass to init_bios (Chris)
          check for bad ifbdev in restore_mode too (Chris)
      v9: fix up !fastboot bpp setting (Jesse)
          fix up !fastboot helper alloc (Jesse)
          make sure BIOS fb is sufficient for biggest active pipe (Jesse)
      v10:fix up size calculation for proposed fbs (Chris)
          go back to two pass pipe fb assignment (Chris)
          add warning for active pipes w/o fbs (Chris)
          clean up num_pipes checks in fbdev_init and fbdev_restore_mode (Chris)
          move i915.fastboot into fbdev_init (Chris)
      v11:make BIOS connector config usage unconditional (Daniel)
      v12:fix up fb vs pipe size checking (Chris)
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d978ef14
  29. 06 3月, 2014 1 次提交