1. 18 3月, 2015 5 次提交
    • S
      drm/i915/skl: Add support for edp 1.4 intermediate frequencies · a8f3ef61
      Sonika Jindal 提交于
      eDp 1.4 supports custom frequencies.
      Skylake supports following intermediate frequencies : 3.24 GHz, 2.16 GHz and
      4.32 GHz along with usual LBR, HBR and HBR2 frequencies.
      Read sink supported frequencies and get common frequencies from sink and
      source and use these for link training.
      
      v2: Rebased, removed calculation of min_clock since for edp it is taken as
      max_clock (as per comment).
      v3: Keeping single array for link rates (Satheesh)
      v4: Setting LINK_BW_SET to 0 when setting LINK_RATE_SET (Satheesh)
      v5: Some minor nits (Ville)
      v6: Keeping separate arrays for source and sink rates (Ville)
      v7: Remove redundant setting of DP_LINK_BW_SET to 0 (Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a8f3ef61
    • S
      drm/i915/skl: Read sink supported rates from edp panel · fc0f8e25
      Sonika Jindal 提交于
      v2: Using DP_SUPPORTED_LINK_RATES macro for supported_rates array (Satheesh).
      v3: Reading dpcd's supported link rates tables based upon edp version in the
      same patch.
      v4: Move version check under is_edp (Satheesh)
      v5: Using le16 for rates, some naming, and removing nested if block (Ville)
      v6: Correctly using DP_MAX_SUPPORTED_RATES and removing DP_SUPPORTED_LINK_RATES
      (Ville)
      v7: Incorrectly removed DP_SUPPORTED_LINK_RATES in v6, re-adding it
      v8: Checking return value of intel_dp_dpcd_read_wake() (Ville)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NSonika Jindal <sonika.jindal@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fc0f8e25
    • P
      drm/i915: add frontbuffer tracking to FBC · dbef0f15
      Paulo Zanoni 提交于
      Kill the blt/render tracking we currently have and use the frontbuffer
      tracking infrastructure.
      
      Don't enable things by default yet.
      
      v2: (Rodrigo) Fix small conflict on rebase and typo at subject.
      v3: (Paulo) Rebase on RENDER_CS change.
      v4: (Paulo) Rebase.
      v5: (Paulo) Simplify: flushes don't have origin (Daniel).
                  Also rebase due to patch order changes.
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      dbef0f15
    • P
      drm/i915: pass which operation triggered the frontbuffer tracking · a4001f1b
      Paulo Zanoni 提交于
      We want to port FBC to the frontbuffer tracking infrastructure, but
      for that we need to know what caused the object invalidation so
      we can react accordingly: CPU mmaps need manual, GTT mmaps and
      flips don't need handling and ring rendering needs nukes.
      
      v2: - s/ORIGIN_RENDER/ORIGIN_CS/ (Daniel, Rodrigo)
          - Fix copy/pasted wrong documentation
          - Rebase
      v3: - Rebase
      v4: - Don't pass the operation to flushes (Daniel).
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a4001f1b
    • M
      drm/i915: Kill intel_crtc->cursor_{width, height} (v2) · 3dd512fb
      Matt Roper 提交于
      The cursor size fields in intel_crtc just duplicate the data from
      cursor->state.crtc_{w,h} so we don't need them any more.  Worse, their
      use in the watermark code actually introduces a subtle bug since they
      don't get updated to mirror the state values until the plane commit
      stage, which is *after* we've already used them to calculate new
      watermark values.  This happens because we had to move watermark updates
      slightly earlier (outside vblank evasion) in commit
      
              commit 32b7eeec
              Author: Matt Roper <matthew.d.roper@intel.com>
              Date:   Wed Dec 24 07:59:06 2014 -0800
      
                  drm/i915: Refactor work that can sleep out of commit (v7)
      
      Dropping the intel_crtc fields and just using the state values (which
      are properly updated by the time watermark updates happen) should solve
      the problem.
      
      Aside from the actual removal of the struct fields (which are formatted
      in a way that I couldn't figure out how to match in Coccinelle), the
      rest of this patch was generated via the following semantic patch:
      
              // Drop assignment
              @@
              struct intel_crtc *C;
              struct drm_plane_state S;
              @@
              (
              - C->cursor_width = S.crtc_w;
              |
              - C->cursor_height = S.crtc_h;
              )
      
              // Replace usage
              @@
              struct intel_crtc *C;
              expression E;
              @@
              (
              - C->cursor_width
              + C->base.cursor->state->crtc_w
              |
              - C->cursor_height
              + C->base.cursor->state->crtc_h
              |
              - to_intel_crtc(E)->cursor_width
              + E->cursor->state->crtc_w
              |
              - to_intel_crtc(E)->cursor_height
              + E->cursor->state->crtc_h
              )
      
      v2: Rebase
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Joe Konno <joe.konno@linux.intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89346Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3dd512fb
  2. 05 3月, 2015 1 次提交
  3. 28 2月, 2015 2 次提交
  4. 24 2月, 2015 1 次提交
    • R
      drm/i915: Add support for DRRS in intel_dp_set_m_n · fe3cd48d
      Ramalingam C 提交于
      Till Gen 7 we have two sets of M_N registers, but Gen 8 onwards
      we have only one M_N register set. To support DRRS on both scenarios
      a input parameter to intel_dp_set_m_n is added.
      
      In case of DRRS, When platform provides two set of M_N registers for dp,
      we can program them with two different dividers and switch between them.
      But when only one such register set is provided, we have to program
      the required divider M_N value on that registers itself.
      
      Two enum members M1_N1 and M2_N2 are defined to represent the above
      scenarios.
      
      M1_N1        :	Program dp_m_n on M1_N1 registers
      			dp_m2_n2 on M2_N2 registers (If supported)
      
      M2_N2        :	Program dp_m2_n2 on M1_N1 registers
      			M2_N2 registers are not supported
      Signed-off-by: NRamalingam C <ramalingam.c@intel.com>
      Reviewed-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fe3cd48d
  5. 14 2月, 2015 7 次提交
  6. 27 1月, 2015 19 次提交
  7. 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