1. 27 1月, 2015 17 次提交
  2. 13 1月, 2015 5 次提交
    • M
      drm/i915: Drop unused position fields (v2) · 53a366b9
      Matt Roper 提交于
      The userspace-requested plane coordinates are now always available via
      plane->state.base (and the i915-adjusted values are stored in
      plane->state), so we no longer use the coordinate fields in intel_plane
      and can drop them.
      
      Also, note that the error case for pageflip calls update_plane() to
      program the values from plane->state; it's simpler to just call
      intel_plane_restore() which does the same thing.
      
      v2: Replace manual update_plane() with intel_plane_restore() in pageflip
          error handler.
      
      Reviewed-by(v1): Bob Paauwe <bob.j.paauwe@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      53a366b9
    • M
      drm/i915: Move to atomic plane helpers (v9) · ea2c67bb
      Matt Roper 提交于
      Switch plane handling to use the atomic plane helpers.  This means that
      rather than provide our own implementations of .update_plane() and
      .disable_plane(), we expose the lower-level check/prepare/commit/cleanup
      entrypoints and let the DRM core implement update/disable for us using
      those entrypoints.
      
      The other main change that falls out of this patch is that our
      drm_plane's will now always have a valid plane->state that contains the
      relevant plane state (initial state is allocated at plane creation).
      The base drm_plane_state pointed to holds the requested source/dest
      coordinates, and the subclassed intel_plane_state holds the adjusted
      values that our driver actually uses.
      
      v2:
       - Renamed file from intel_atomic.c to intel_atomic_plane.c (Daniel)
       - Fix a copy/paste comment mistake (Bob)
      
      v3:
       - Use prepare/cleanup functions that we've already factored out
       - Use newly refactored pre_commit/commit/post_commit to avoid sleeping
         during vblank evasion
      
      v4:
       - Rebase to latest di-nightly requires adding an 'old_state' parameter
         to atomic_update;
      
      v5:
       - Must have botched a rebase somewhere and lost some work.  Restore
         state 'dirty' flag to let begin/end code know which planes to
         run the pre_commit/post_commit hooks for.  This would have actually
         shown up as broken in the next commit rather than this one.
      
      v6:
       - Squash kerneldoc patch into this one.
       - Previous patches have now already taken care of most of the
         infrastructure that used to be in this patch.  All we're adding here
         now is some thin wrappers.
      
      v7:
       - Check return of intel_plane_duplicate_state() for allocation
         failures.
      
      v8:
       - Drop unused drm_plane_state -> intel_plane_state cast.  (Ander)
       - Squash in actual transition to plane helpers.  Significant
         refactoring earlier in the patchset has made the combined
         prep+transition much easier to swallow than it was in earlier
         iterations. (Ander)
      
      v9:
       - s/track_fbs/disabled_planes/ in the atomic crtc flags.  The only fb's
         we need to update frontbuffer tracking for are those on a plane about
         to be disabled (since the atomic helpers never call prepare_fb() when
         disabling a plane), so the new name more accurately describes what
         we're actually tracking.
      
      Testcase: igt/kms_plane
      Testcase: igt/kms_universal_plane
      Testcase: igt/kms_cursor_crc
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ea2c67bb
    • M
      drm/i915: Clarify sprite plane function names (v4) · 4a3b8769
      Matt Roper 提交于
      A few of the sprite-related function names in i915 are very similar
      (e.g., intel_enable_planes() vs intel_crtc_enable_planes()) and don't
      make it clear whether they only operate on sprite planes, or whether
      they also apply to all universal plane types.  Rename a few functions to
      be more consistent with our function naming for primary/cursor planes or
      to clarify that they apply specifically to sprite planes:
      
       - s/intel_disable_planes/intel_disable_sprite_planes/
       - s/intel_enable_planes/intel_enable_sprite_planes/
      
      Also, drop the sprite-specific intel_destroy_plane() and just use
      the type-agnostic intel_plane_destroy() function.  The extra 'disable'
      call that intel_destroy_plane() did is unnecessary since the plane will
      already be disabled due to framebuffer destruction by the point it gets
      called.
      
      v2: Earlier consolidation patches have reduced the number of functions
          we need to rename here.
      
      v3: Also rename intel_plane_funcs vtable to intel_sprite_plane_funcs
          for consistency with primary/cursor.  (Ander)
      
      v4: Convert comment for intel_plane_destroy() to kerneldoc now that it
          is no longer a static function.  (Ander)
      
      Reviewed-by(v1): Bob Paauwe <bob.j.paauwe@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4a3b8769
    • M
      drm/i915: Move vblank evasion to commit (v4) · c34c9ee4
      Matt Roper 提交于
      Move the vblank evasion up from the low-level, hw-specific
      update_plane() handlers to the general plane commit operation.
      Everything inside commit should now be non-sleeping, so this brings us
      closer to how vblank evasion will behave once we move over to atomic.
      
      v2:
       - Restore lost intel_crtc->active check on vblank evasion
      
      v3:
       - Replace assert_pipe_enabled() in intel_disable_primary_hw_plane()
         with an intel_crtc->active test; it turns out assert_pipe_enabled()
         grabs some mutexes and can sleep, which we can't do with interrupts
         disabled.
      
      v4:
       - Equivalent to v2; v3 change is now squashed into an earlier patch
         of the series.  (Ander).
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c34c9ee4
    • M
      drm/i915: Refactor work that can sleep out of commit (v7) · 32b7eeec
      Matt Roper 提交于
      Once we integrate our work into the atomic pipeline, plane commit
      operations will need to happen with interrupts disabled, due to vblank
      evasion.  Our commit functions today include sleepable work, so those
      operations need to be split out and run either before or after the
      atomic register programming.
      
      The solution here calculates which of those operations will need to be
      performed during the 'check' phase and sets flags in an intel_crtc
      sub-struct.  New intel_begin_crtc_commit() and
      intel_finish_crtc_commit() functions are added before and after the
      actual register programming; these will eventually be called from the
      atomic plane helper's .atomic_begin() and .atomic_end() entrypoints.
      
      v2: Fix broken sprite code split
      
      v3: Make the pre/post commit work crtc-based to match how we eventually
          want this to be called from the atomic plane helpers.
      
      v4: Some platforms that haven't had their watermark code reworked were
          waiting for vblank, then calling update_sprite_watermarks in their
          platform-specific disable code.  These also need to be flagged out
          of the critical section.
      
      v5: Sprite plane test for primary show/hide should just set the flag to
          wait for pending flips, not actually perform the wait.  (Ander)
      
      v6:
       - Rebase onto latest di-nightly; picks up an important runtime PM fix.
       - Handle 'wait_for_flips' flag in intel_begin_crtc_commit(). (Ander)
       - Use wait_for_flips flag for primary plane update rather than
         performing the wait in the check routine.
       - Added kerneldoc to pre_disable/post_enable functions that are no
         longer static.  (Ander)
       - Replace assert_pipe_enabled() in intel_disable_primary_hw_plane()
         with an intel_crtc->active test; it turns out assert_pipe_enabled()
         grabs some mutexes and can sleep, which we can't do with interrupts
         disabled.
      
      v7:
       - Check for fb != NULL when deciding whether the sprite plane hides the
         primary plane during a sprite update.  (PRTS)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NAnder Conselvan de Oliveira <conselvan2@gmail.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      32b7eeec
  3. 12 1月, 2015 2 次提交
    • I
      drm/i915: fix HW lockup due to missing RPS IRQ workaround on GEN6 · 59d02a1f
      Imre Deak 提交于
      In
      
      commit dbea3cea
      Author: Imre Deak <imre.deak@intel.com>
      Date:   Mon Dec 15 18:59:28 2014 +0200
      
          drm/i915: sanitize RPS resetting during GPU reset
      
      we disable RPS interrupts during GPU resetting, but don't apply the
      necessary GEN6 HW workaround. This leads to a HW lockup during a
      subsequent "looping batchbuffer" workload. This is triggered by the
      testcase that submits exactly this kind of workload after a simulated
      GPU reset. I'm not sure how likely the bug would have triggered
      otherwise, since we would have applied the workaround anyway shortly
      after the GPU reset, when enabling GT powersaving from the deferred
      work.
      
      This may also fix unrelated issues, since during driver loading /
      suspending we also disable RPS interrupts and so we also had a short
      window during the rest of the loading / resuming where a similar
      workload could run without the workaround applied.
      
      v2:
      - separate the fix to route RPS interrupts to the CPU on GEN9 too
        to a separate patch (Daniel)
      Bisected-by: NAnder Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Testcase: igt/gem_reset_stats/ban-ctx-render
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=87429Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      59d02a1f
    • I
      drm/i915: add component support · 58fddc28
      Imre Deak 提交于
      Register a component to be used to interface with the snd_hda_intel
      driver. This is meant to replace the same interface that is currently
      based on module symbol lookup.
      
      v2:
      - change roles between the hda and i915 components (Daniel)
      - add the implementation to a new file (Jani)
      - use better namespacing (Jani)
      v3:
      - move the implementation to intel_audio.c (Daniel)
      - rename display_component to audio_component (Daniel)
      - add kerneldoc (Daniel)
      v4:
      - run forgotten git rm i915_component.c (Jani)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      58fddc28
  4. 11 12月, 2014 1 次提交
  5. 08 12月, 2014 1 次提交
  6. 06 12月, 2014 5 次提交
  7. 03 12月, 2014 6 次提交
  8. 19 11月, 2014 1 次提交
    • I
      drm/i915: sanitize rps irq enabling · 3cc134e3
      Imre Deak 提交于
      Atm we first enable the RPS interrupts then we clear any pending ones.
      By this we could lose an interrupt arriving after we unmasked it. This
      may not be a problem as the caller should handle such a race, but logic
      still calls for the opposite order. Also we can delay enabling the
      interrupts until after all the RPS initialization is ready with the
      following order:
      
      1. disable left-over RPS (earlier via intel_uncore_sanitize)
      2. clear any pending RPS interrupts
      3. initialize RPS
      4. enable RPS interrupts
      
      This also allows us to do the 2. and 4. step the same way for all
      platforms, so let's follow this order to simplifying things.
      
      Also make sure any queued interrupts are also cleared.
      
      v2:
      - rebase on the GEN9 patches where we don't support RPS yet, so we
        musn't enable RPS interrupts on it (Paulo)
      v3:
      - avoid enabling RPS interrupts on GEN>9 too (Paulo)
      - clarify the RPS init sequence in the log message (Chris)
      - add POSTING_READ to gen6_reset_rps_interrupts() (Paulo)
      - WARN if any PM_IIR bits are set in gen6_enable_rps_interrupts()
        (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>
      3cc134e3
  9. 18 11月, 2014 1 次提交
  10. 14 11月, 2014 1 次提交