1. 06 3月, 2014 5 次提交
  2. 07 2月, 2014 1 次提交
    • J
      drm/i915: Restore rps/rc6 on reset · dd0a1aa1
      Jeff McGee 提交于
      A check of rps/rc6 state after i915_reset determined that the ring
      MAX_IDLE registers were returned to their hardware defaults and that
      the GEN6_PMIMR register was set to mask all interrupts. This change
      restores those values to their pre-reset states by re-initializing
      rps/rc6 in i915_reset. A full re-initialization was opted for versus
      a targeted set of restore operations for simplicity and maintain-
      ability. Note that the re-initialization is not done for Ironlake,
      due to a past comment that it causes problems.
      
      Also updated the rps initialization sequence to preserve existing
      min/max values in the case of a re-init. We assume the values were
      validated upon being set and do not do further range checking. The
      debugfs interface for changing min/max was updated with range
      checking to ensure this condition (already present in sysfs
      interface).
      
      v2: fix rps logging to output hw_max and hw_min, not rps.max_delay
          and rps.min_delay which don't strictly represent hardware limits.
          Add igt testcase to signed-off-by section.
      
      Testcase: igt/pm_rps/reset
      Signed-off-by: NJeff McGee <jeff.mcgee@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dd0a1aa1
  3. 05 2月, 2014 1 次提交
    • A
      drm/i915: Reorganize display pipe register accesses · a57c774a
      Antti Koskipaa 提交于
      RFCv2: Reorganize array indexing so that full offsets can be used as
      is. It makes grepping for registers in i915_reg.h much easier. Also
      move offset arrays to intel_device_info.
      
      v1: Fixed offsets for VLV, proper eDP handling
      
      v2: Fixed BCLRPAT, PIPESRC, PIPECONF and DSP* macros.
      
      v3: Added EDP pipe comment, removed redundant offset arrays for
          MSA_MISC and DDI_FUNC_CTL.
      
      v4: Rename patch and report object size increase.
      
      v5: Change location of commas, add PIPE_EDP into enum pipe
      
      v6: Insert PIPE_EDP_OFFSET into pipe offset array
      
      v7: Set I915_MAX_PIPES back to 3, change more registers accessors
          to use the new macros, get rid of _PIPE_INC and add dev_priv
          as a parameter where required by the new macros.
      
      Upcoming hardware will not have the various display pipe register
      ranges evenly spaced in memory. Change register address calculations
      into array lookups.
      
      Tested on SNB, VLV, IVB, Gen2 and HSW w/eDP.
      
      I left the UMS cruft untouched.
      
      Size differences:
         text    data     bss     dec     hex filename
       596431    4634      56  601121   92c21 i915.ko (new)
       593199    4634      56  597889   91f81 i915.ko (old)
      Signed-off-by: NAntti Koskipaa <antti.koskipaa@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Tested-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a57c774a
  4. 28 1月, 2014 1 次提交
    • J
      drm/i915: move module parameters into a struct, in a new file · d330a953
      Jani Nikula 提交于
      With 20+ module parameters, I think referring to them via a struct
      improves clarity over just having a bunch of globals. While at it, move
      the parameter initialization and definitions into a new file
      i915_params.c to reduce clutter in i915_drv.c.
      
      Apart from the ill-named i915_enable_rc6, i915_enable_fbc and
      i915_enable_ppgtt parameters, for which we lose the "i915_" prefix
      internally, the module parameters now look the same both on the kernel
      command line and in code. For example, "i915.modeset".
      
      The downsides of the change are losing static on a couple of variables
      and not having the initialization and module_param_named() right next to
      each other. On the other hand, all module parameters are now defined in
      one place at i915_params.c. Plus you can do this to find all module
      parameter references:
      
      $ git grep "i915\." -- drivers/gpu/drm/i915
      
      v2:
      - move the definitions into a new file
      - s/i915_params/i915/
      - make i915_try_reset i915.reset, for consistency
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      d330a953
  5. 25 1月, 2014 2 次提交
  6. 22 1月, 2014 3 次提交
  7. 18 12月, 2013 2 次提交
    • B
      drm/i915: Use multiple VMs -- the point of no return · 7e0d96bc
      Ben Widawsky 提交于
      As with processes which run on the CPU, the goal of multiple VMs is to
      provide process isolation. Specific to GEN, there is also the ability to
      map more objects per process (2GB each instead of 2Gb-2k total).
      
      For the most part, all the pipes have been laid, and all we need to do
      is remove asserts and actually start changing address spaces with the
      context switch. Since prior to this we've converted the setting of the
      page tables to a streamed version, this is quite easy.
      
      One important thing to point out (since it'd been hotly contested) is
      that with this patch, every context created will have it's own address
      space (provided the HW can do it).
      
      v2: Disable BDW on rebase
      
      NOTE: I tried to make this commit as small as possible. I needed one
      place where I could "turn everything on" and that is here. It could be
      split into finer commits, but I didn't really see much point.
      
      Cc: Eric Anholt <eric@anholt.net>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7e0d96bc
    • D
      drm: kill DRIVER_REQUIRE_AGP · 24986ee0
      Daniel Vetter 提交于
      Only the two intel drivers need this and they can easily check for
      working agp support in their driver ->load callbacks.
      
      This is the only reason why agp initialization could fail, so allows
      us to rip out a bit of error handling code in the next patch.
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NDave Airlie <airlied@redhat.com>
      24986ee0
  8. 17 12月, 2013 1 次提交
  9. 14 12月, 2013 2 次提交
  10. 12 12月, 2013 1 次提交
  11. 11 12月, 2013 2 次提交
    • P
      drm/i915: do adapter power state notification at runtime PM · cd2e9e90
      Paulo Zanoni 提交于
      Now that we are actually setting the device to the D3 state, we should
      issue the notification.
      
      The opregion spec says we should send the message before the adapter
      is about to be placed in a lower power state, and after the adapter is
      placed in a higher power state.
      
      Jani originally wrote a similar patch for PC8, but then we discovered
      that we were not really changing the PCI D states when
      enabling/disabling PC8, so we had to postpone his patch.
      
      v2: - Improve commit message, explaining the expected state.
      
      v3: - Rebase.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Credits-to: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: Rodrigo Vivi <rodrigo.vivi@gmail.com> (v2)
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cd2e9e90
    • P
      drm/i915: add initial Runtime PM functions · 8a187455
      Paulo Zanoni 提交于
      This patch adds the initial infrastructure to allow a Runtime PM
      implementation that sets the device to its D3 state. The patch just
      adds the necessary callbacks and the initial infrastructure.
      
      We still don't have any platform that actually uses this
      infrastructure, we still don't call get/put in all the places we need
      to, and we don't have any function to save/restore the state of the
      registers. This is not a problem since no platform uses the code added
      by this patch. We have a few people simultaneously working on runtime
      PM, so this initial code could help everybody make their plans.
      
      V2: - Move some functions to intel_pm.c
          - Remove useless pm_runtime_allow() call at init
          - Remove useless pm_runtime_mark_last_busy() call at get
          - Use pm_runtime_get_sync() instead of 2 calls
          - Add a WARN to check if we're really awake
      
      V3: - Rebase.
      
      V4: - Don't need to call pci_{save,restore}_state and
            pci_set_power_sate, since they're already called by the PCI
            layer
          - Remove wrong pm_runtime_enable() call at init_runtime_pm
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8a187455
  12. 04 12月, 2013 1 次提交
    • C
      drm/i915: Do not clobber config status after a forced restore of hw state · edd5b133
      Chris Wilson 提交于
      We call intel_modeset_setup_hw_state() along two paths, driver
      load/resume and after a lid event notification. During initialisation of
      the driver, it is imperative that we reset the config state. This
      correctly sets up the initial connector statuses and prepares the
      hardware for a thorough probing. However, during a lid event, we only
      want to undo the damage caused by the bios by resetting our last known
      mode. In this cirumstance, we do not want to clobber our desired state.
      
      In order to try and keep sanity between the config state and our own
      tracking, do the drm_mode_config_reset() first along the load/resume
      paths before reading out the hw state and apply any definite known
      corrections.
      
      v2: "As discussed on irc I don't think we should force the connector
      state to anything here: Imo connector->status should reflect what we
      believe to be the true output connection state, whereas connector->encoder
      reflects whether this connector is wired up to a pipe. And since we no
      longer reject modeset on disconnected connectors and never nuked the pipe
      if the connector gets disconnected there's no reason for that - such policy
      is userspace's job.
      
      This regression has been introduced in
      
      commit 2e938892
      Author: Daniel Vetter <daniel.vetter@ffwll.ch>
      Date:   Thu Oct 11 20:08:24 2012 +0200
      
          drm/i915/crt: explicitly set up HOTPLUG_BITS on resume"
      so sayeth Daniel.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Cc: stable@vger.kernel.org (v3.8 and later)
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      edd5b133
  13. 27 11月, 2013 1 次提交
  14. 26 11月, 2013 1 次提交
  15. 25 11月, 2013 1 次提交
  16. 21 11月, 2013 1 次提交
  17. 14 11月, 2013 3 次提交
    • D
      drm/i915: Deprecated UMS support · b30324ad
      Daniel Vetter 提交于
      It's been 5 years since kms support was merged and roughly 4 years
      since UMS support was ripped out from userspace drivers.
      
      Thus far it's not been a big burden to keep the ums paths alive, and
      we've made some good progress in better separating it from the kms
      code by sprinkling DRIVER_MODESET checks all over the place.
      
      But now that the drm demidlayering is within reach this changes. I
      want to make the driver loading code more robust using devres.c and
      other cool tricks. But that doesn't work with ums due to the
      shadow-attach trick. Which means we either
      a) need to split out a complete ums codebase like radeon has
      b) kill it for good.
      
      The 2nd option is obviously much less work than the first, so I think
      it's time to test the waters and see how many people out there still
      use ums.
      
      I've decided that silently failing to initialize the driver (and not
      e.g. failing to load the module) is the right thing. That way we
      should only get reports from users that actually care about some ums
      features (like accelerated gl or support for secondary outputs).
      Everyone else will just fall back to the vesa X driver.
      
      For developers there's a small info level dmesg output.
      
      The plan is to drop this Kconfig option after 3.16 (so gives us 2 full
      releases) and then start killing code for real 2-3 releases
      afterwards. That should be more than enough time for users to pipe up.
      
      Of course if anyone does we need to revisit this plan and maybe go
      with option a) above.
      
      Also enable the KMS support by default in Kconfig and polish the help
      texts a bit.
      
      v2: Add the missing hunk of actual code changes. Oops. (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Acked-by: NDave Airlie <airlied@gmail.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      b30324ad
    • D
      drm/i915: Kill legeacy AGP for gen3 kms · 3bb6ce66
      Daniel Vetter 提交于
      Thus far we've tried to carefully work around the fact that old
      userspace relied on the AGP-backed legacy buffer mapping ioctls for a
      bit too long. But it's really horribly, and now some new users for it
      started to show up again:
      
      http://www.mail-archive.com/mesa-dev@lists.freedesktop.org/msg45547.html
      
      This uses drmAgpSize to figure out the GTT size, which is both the
      wrong thing to inquire and also might force us to keep this crap
      around for another few years.
      
      So I want to stop this particular zombie from raising ever again. Now
      it's only been 4 years since XvMC was fixed for gen3, so a bit early
      by the usual rules. But since Linus explicitly said that an ABI
      breakage only counts if someone actually observes it I want to tempt
      fate an accelarate the demise of AGP.
      
      We probably need to wait 2-3 kernel releases with this shipping until
      we go on a killing spree code-wise.
      
      v2: Remove intel_agp_enabled since it's unused (Ville).
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dave Airlie <airlied@gmail.com>
      Acked-by: NDave Airlie <airlied@gmail.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3bb6ce66
    • D
      drm/i915: Make AGP=n work even on gen3 · ea8eea73
      Daniel Vetter 提交于
      Most platforms din't hit this condition, but if we want to allow
      building without agp we should also make this allowed on gen3.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ea8eea73
  18. 12 11月, 2013 1 次提交
  19. 09 11月, 2013 6 次提交
  20. 07 11月, 2013 1 次提交
  21. 30 10月, 2013 1 次提交
    • I
      drm/i915: rename i915_init_power_well to init_power_domains_init · ddb642fb
      Imre Deak 提交于
      Similarly rename the other related functions in the power domain
      interface.
      
      Higher level driver code calling these functions knows only about power
      domains, not the underlying power wells which may be different on
      different platforms. Also these functions really init/cleanup/resume
      power domains and only through that all related power wells, so rename
      them accordingly.
      
      Note that I left i915_{request,release}_power_well as is, since that
      really changes the state only of a single power well (and is HSW
      specific). It should also get a better name once we make it more
      generic by controlling things through a new audio power domain.
      
      v4:
      - use intel prefix instead of i915 everywhere (Paulo)
      - use a $prefix_$block_$action format (Daniel)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ddb642fb
  22. 28 10月, 2013 1 次提交
    • I
      drm/i915: use power get/put instead of set for power on after init · baa70707
      Imre Deak 提交于
      Currently we make sure that all power domains are enabled during driver
      init and turn off unneded ones only after the first modeset. Similarly
      during suspend we enable all power domains, which will remain on through
      the following resume until the first modeset.
      
      This logic is supported by intel_set_power_well() in the power domain
      framework. It would be nice to simplify the API, so that we only have
      get/put functions and make it more explicit on the higher level how this
      "power well on during init" logic works. This will make it also easier
      if in the future we want to shorten the time the power wells are on.
      
      For this add a new device private flag tracking whether we have the
      power wells on because of init/suspend and use only
      intel_display_power_get()/put(). As nothing else uses
      intel_set_power_well() we can remove it.
      
      This also fixes
      
      commit 6efdf354
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Wed Oct 16 17:25:52 2013 +0300
      
          drm/i915: enable only the needed power domains during modeset
      
      where removing intel_set_power_well() resulted in not releasing the
      reference on the power well that was taken during init and thus leaving
      the power well on all the time. Regression reported by Paulo.
      
      v2:
      - move the init_power_on flag to the power_domains struct (Daniel)
      
      v3:
      - add note about this being a regression fix too (Paulo)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      baa70707
  23. 18 10月, 2013 1 次提交
    • B
      drm/i915: Disable GGTT PTEs on GEN6+ suspend · 828c7908
      Ben Widawsky 提交于
      Once the machine gets to a certain point in the suspend process, we
      expect the GPU to be idle. If it is not, we might corrupt memory.
      Empirically (with an early version of this patch) we have seen this is
      not the case. We cannot currently explain why the latent GPU writes
      occur.
      
      In the technical sense, this patch is a workaround in that we have an
      issue we can't explain, and the patch indirectly solves the issue.
      However, it's really better than a workaround because we understand why
      it works, and it really should be a safe thing to do in all cases.
      
      The noticeable effect other than the debug messages would be an increase
      in the suspend time. I have not measure how expensive it actually is.
      
      I think it would be good to spend further time to root cause why we're
      seeing these latent writes, but it shouldn't preclude preventing the
      fallout.
      
      NOTE: It should be safe (and makes some sense IMO) to also keep the
      VALID bit unset on resume when we clear_range(). I've opted not to do
      this as properly clearing those bits at some later point would be extra
      work.
      
      v2: Fix bugzilla link
      
      Bugzilla: http://bugs.freedesktop.org/show_bug.cgi?id=65496
      Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59321Tested-by: NTakashi Iwai <tiwai@suse.de>
      Tested-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Tested-By: NTodd Previte <tprevite@gmail.com>
      Cc: stable@vger.kernel.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      828c7908