1. 18 3月, 2014 6 次提交
    • J
      drm/i915: finish off reverting eDP VDD changes · 24f3e092
      Jani Nikula 提交于
      This is a small follow-up fix to the series of eDP VDD back and forth
      we've had recently. This is effectively a combined revert of three
      commits:
      
      commit 2c2894f698fffd8ff53e1e1d3834f9e1035b1f39
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Fri Mar 7 20:05:20 2014 -0300
      
          drm/i915: properly disable the VDD when disabling the panel
      
      commit b3064154
      Author: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Date:   Tue Mar 4 00:42:44 2014 +0100
      
          drm/i915: Don't just say it, actually force edp vdd
      
      commit dff392db
      Author: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Date:   Fri Dec 6 17:32:41 2013 -0200
      
          drm/i915: don't touch the VDD when disabling the panel
      
      which shows that we're pretty close back to where we started
      already. The first two were basically reverting the last, but missing
      the WARN. Add that back. We also OCD the intel_ prefix back to
      intel_edp_panel_vdd_on() which was lost somewhere in between. The circle
      closes.
      
      For future reference, "drm/i915: don't touch the VDD when disabling the
      panel" failed to take into account
      
      commit 6cb49835
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun May 20 17:14:50 2012 +0200
      
          drm/i915: enable vdd when switching off the eDP panel
      
      and
      
      commit 35a38556
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Sun Aug 12 22:17:14 2012 +0200
      
          drm/i915: reorder edp disabling to fix ivb MacBook Air
      
      Cc: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      24f3e092
    • D
      drm/i915: catch forcewake reference underruns · 3123fcaf
      Daniel Vetter 提交于
      Without this the new drv_suspend/forcewake subtest I've created
      doesn't result in immediately visible failures.
      
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Ben Widawsky <ben@bwidawsk.net>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3123fcaf
    • B
      drm/i915: Actually capture PP_DIR_BASE on error · ae89f44d
      Ben Widawsky 提交于
      I have been seeing this for a long time, but ignored it because it's
      typically not terribly important. Recently, I really needed this info,
      and it was garbage. Proof that I should have fixed it sooner. Originally
      wrong from:
      
      commit 6c7a01ec
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Thu Jan 30 00:19:40 2014 -0800
      
          drm/i915: Capture PPGTT info on error capture
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ae89f44d
    • P
      drm/i915: properly disable the VDD when disabling the panel · 849e39f5
      Paulo Zanoni 提交于
      Commit b3064154 tried to revert commit
      dff392db, but wasn't complete, which
      resulted in regressions on Haswell. So this commit should fix
      b3064154 by undoing what it did and
      providing an actual complete revert of
      dff392db.
      
      Fixes regression introduced by:
      commit b3064154
      Author: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Date:   Tue Mar 4 00:42:44 2014 +0100
          drm/i915: Don't just say it, actually force edp vdd
      
      Testcase: igt/pm_pc8
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Tested-by: NPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      849e39f5
    • M
      drm/i915: Switch to fake context on older gens · a95f6a00
      Mika Kuoppala 提交于
      We used to have per file descriptor hang stats for the
      i915_get_reset_stats_ioctl() and for default context banning.
      
      commit 0eea67eb
      Author: Ben Widawsky <ben@bwidawsk.net>
      Date:   Fri Dec 6 14:11:19 2013 -0800
      
          drm/i915: Create a per file_priv default context
      
      made having separate hangstats in file_private redundant
      as i915_hw_context already contained hangstats. So
      
      commit c482972a
      Author: Ben Widawsky <benjamin.widawsky@intel.com>
      Date:   Fri Dec 6 14:11:20 2013 -0800
      
          drm/i915: Piggy back hangstats off of contexts
      
      consolidated the hangstats and enabled further improvements.
      
      commit 44e2c070
      Author: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Date:   Thu Jan 30 16:01:15 2014 +0200
      
          drm/i915: Use i915_hw_context to set reset stats
      
      tried to reap full benefits of consolidation but fell short
      as we never 'switch' to the fake private context on gens
      that don't have hw_contexts, so request->ctx remained NULL
      on those.
      
      Fix this by 'switching' to fake context so that when
      request is submitted to ring, proper context gets assigned
      to it.
      
      Testcase: igt/drv_hangman
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76055Signed-off-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a95f6a00
    • D
      drm/i915: Fix up the forcewake timer initialization · 05efeebd
      Daniel Vetter 提交于
      This is a regression introduced in
      
      commit 0294ae7b
      Author: Chris Wilson <chris@chris-wilson.co.uk>
      Date:   Thu Mar 13 12:00:29 2014 +0000
      
          drm/i915: Consolidate forcewake resetting to a single function
      
      The reordered setup sequence ended up calling del_timer_sync before
      the timer was set up correctly, resulting in endless hilarity when
      loading the driver.
      
      Compared to Ben's patch (which moved around the setup_timer call to
      sanitize_early) this moves the sanitize_early call around in the
      driver load call. This way we avoid calling setup_timer again in the
      resume code (where we also call sanitize_early).
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Ben Widawsky <benjamin.widawsky@intel.com>
      Tested-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76242Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      05efeebd
  2. 14 3月, 2014 2 次提交
  3. 13 3月, 2014 4 次提交
  4. 12 3月, 2014 7 次提交
  5. 11 3月, 2014 5 次提交
  6. 10 3月, 2014 3 次提交
  7. 08 3月, 2014 13 次提交
    • 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
    • J
      drm/i915: get_plane_config support for ILK+ v3 · 4c6baa59
      Jesse Barnes 提交于
      This should allow BIOS fb inheritance to work on ILK+ machines too.
      
      v2: handle tiled BIOS fbs (Kristian)
          split out common bits (Jesse)
      v3: alloc fb obj out in _init
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c6baa59
    • J
      drm/i915: get_plane_config for i9xx v13 · 1ad292b5
      Jesse Barnes 提交于
      Read out the current plane configuration at init time into a new
      plane_config structure.  This allows us to track any existing
      framebuffers attached to the plane and potentially re-use them in our
      fbdev code for a smooth handoff.
      
      v2: update for new pitch_for_width function (Jesse)
          comment how get_plane_config works with shared fbs (Jesse)
      v3: s/ARGB/XRGB (Ville)
          use pipesrc width/height (Ville)
          fix fourcc comment (Bob)
          use drm_format_plane_cpp (Ville)
      v4: use fb for tracking fb data object (Ville)
      v5: fix up gen2 pitch limits (Ville)
      v6: read out stride as well (Daniel)
      v7: split out init ordering changes (Daniel)
          don't fetch config if !CONFIG_FB
      v8: use proper height in get_plane_config (Chris)
      v9: fix CONFIG_FB check for modular configs (Jani)
      v10: add comment about stolen allocation stomping
      v11: drop hw state readout hunk (Daniel)
      v12: handle tiled BIOS fbs (Kristian)
           pull out common bits (Jesse)
      v13: move fb obj alloc out to _init
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      1ad292b5
    • J
      drm/i915: add plane_config fetching infrastructure v2 · 46f297fb
      Jesse Barnes 提交于
      Early at init time, we can try to read out the plane config structure
      and try to preserve it if possible.
      
      v2: alloc fb obj at init time after fetching plane config
      Signed-off-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      46f297fb
    • C
      drm/i915: Do not force non-caching copies for pwrite along shmem path · c2831a94
      Chris Wilson 提交于
      We don't always want to write into main memory with pwrite. The shmem
      fast path in particular is used for memory that is cacheable - under
      such circumstances forcing the cache eviction is undesirable. As we will
      always flush the cache when targeting incoherent buffers, we can rely on
      that second pass to apply the cache coherency rules and so benefit from
      in-cache copies otherwise.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBrad Volkin <bradley.d.volkin@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c2831a94
    • C
      drm/i915: Process page flags once rather than per pwrite/pread · 17793c9a
      Chris Wilson 提交于
      We used to lock individual pages inside the buffer object and so needed
      to update the page flags every time. However, we now pin the pages into
      the object for the duration of the pwrite/pread (and hopefully much
      longer) and so we can forgo the flag updates until we release all the
      pages.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NBrad Volkin <bradley.d.volkin@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      17793c9a
    • D
      drm/i915: Go OCD on the Makefile · 2fae6a86
      Daniel Vetter 提交于
      Chris suggested to split things up a bit into the different parts of
      the driver and also sort it all correctly, with the hope that we're
      trying to organize things a bit better eventually. It should also
      help newcomers to orient themselves a bit better.
      
      v2:
      - Move intel_pm.c to the core - to make things perfect we should split
        out the modeset related pm features (psr/fbc) into a separate file.
        Maybe something Rodrigo can do once the PSR patches have settled.
      
      - Split the modesetting sections into core and encoders/outputs.
        intel_ddi.c is a bit funky since it has core hsw+ support and ddi
        output support. Whatever.
      
      v3: Failed to git add ...
      
      v4: Really go ocd, i.e. spelling fix in a comment from Jani.
      
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2fae6a86
    • B
      drm/i915: Implement command buffer parsing logic · 351e3db2
      Brad Volkin 提交于
      The command parser scans batch buffers submitted via execbuffer ioctls before
      the driver submits them to hardware. At a high level, it looks for several
      things:
      
      1) Commands which are explicitly defined as privileged or which should only be
         used by the kernel driver. The parser generally rejects such commands, with
         the provision that it may allow some from the drm master process.
      2) Commands which access registers. To support correct/enhanced userspace
         functionality, particularly certain OpenGL extensions, the parser provides a
         whitelist of registers which userspace may safely access (for both normal and
         drm master processes).
      3) Commands which access privileged memory (i.e. GGTT, HWS page, etc). The
         parser always rejects such commands.
      
      See the overview comment in the source for more details.
      
      This patch only implements the logic. Subsequent patches will build the tables
      that drive the parser.
      
      v2: Don't set the secure bit if the parser succeeds
      Fail harder during init
      Makefile cleanup
      Kerneldoc cleanup
      Clarify module param description
      Convert ints to bools in a few places
      Move client/subclient defs to i915_reg.h
      Remove the bits_count field
      
      OTC-Tracker: AXIA-4631
      Change-Id: I50b98c71c6655893291c78a2d1b8954577b37a30
      Signed-off-by: NBrad Volkin <bradley.d.volkin@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      [danvet: Appease checkpatch.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      351e3db2
    • B
      drm/i915: Refactor shmem pread setup · 4c914c0c
      Brad Volkin 提交于
      The command parser is going to need the same synchronization and
      setup logic, so factor it out for reuse.
      
      v2: Add a check that the object is backed by shmem
      Signed-off-by: NBrad Volkin <bradley.d.volkin@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c914c0c
    • V
      drm/i915: Avoid div by zero when pixel clock is large · 922044c9
      Ville Syrjälä 提交于
      Make sure the line_time_us isn't zero in the gmch watermarks code as
      that would cause a div by zero. This can be triggered by specifying
      a very fast pixel clock for the mode.
      
      At some point we should probably just switch over to using the same
      math we use on PCH platforms which avoids such intermediate rounded
      results.
      
      Also we should verify the user provided mode much more rigorously.
      At the moment we accept pretty much anything.
      
      Note that "very fast mode" here means above 74.25 GHz.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      [danvet: Add Ville's clarification of what "very fast" means.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      922044c9
    • I
      drm/i915: power domains: add vlv power wells · 77961eb9
      Imre Deak 提交于
      Based on an early draft from Jesse.
      
      Add support for powering on/off the dynamic power wells on VLV by
      registering its display and dpio dynamic power wells with the power
      domain framework.
      
      For now power on all PHY TX lanes regardless of the actual lane
      configuration. Later this can be optimized when the PHY side setup
      enables only the required lanes. Atm, it enables all lanes in all
      cases.
      
      v2:
      - undef function local COND macro after its last use (Ville)
      - Take dev_priv->irq_lock around the whole sequence of
        intel_set_cpu_fifo_underrun_reporting_nolock() and
        valleyview_disable_display_irqs(). They are short and releasing
        the lock in between only makes proving correctness more difficult.
      - sanitize local var names in vlv_power_well_enabled()
      v3:
      - rebase on latest -nightly
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Resolve conflict due to my changes in the previous patch.
      Also throw in an assert_spin_locked for safety. And finally appease
      checkpatch.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      77961eb9
    • I
      drm/i915: factor out intel_set_cpu_fifo_underrun_reporting_nolock · f88d42f1
      Imre Deak 提交于
      Needed by the next patch, wanting to set the underrun reporting as part
      of a bigger dev_priv->irq_lock'ed sequence.
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      [danvet: Use more customary __ prefix instead of _nolock postfix.]
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f88d42f1