1. 09 11月, 2015 1 次提交
  2. 05 11月, 2015 1 次提交
  3. 02 11月, 2015 3 次提交
  4. 29 10月, 2015 1 次提交
    • R
      drm/i915/kbl: Introduce Kabylake platform defition. · ef11bdb3
      Rodrigo Vivi 提交于
      Kabylake is a Intel® Processor containing Intel® HD Graphics
      following Skylake.
      
      It is Gen9p5, so it inherits everything from Skylake.
      
      Let's start by adding the platform separated from Skylake
      but reusing most of all features, functions etc. Later we
      rebase the PCI-ID patch without is_skylake=1
      so we don't replace what original Author did there.
      
      Few IS_SKYLAKEs if statements are not being covered by this patch
      on purpose:
         - Workarounds: Kabylake is derivated from Skylake H0 so no
           		  W/As apply here.
         - GuC: A following patch removes Kabylake support with an
           	  explanation: No firmware available yet.
         - DMC/CSR: Done in a separated patch since we need to be carefull
           	      and load the version for revision 7 since
      	      Kabylake is Skylake H0.
      
      v2: relative cleaner commit message and added the missed
          IS_KABYLAKE to intel_i2c.c as pointed out by Jani.
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      ef11bdb3
  5. 26 10月, 2015 1 次提交
  6. 22 10月, 2015 5 次提交
  7. 21 10月, 2015 4 次提交
  8. 19 10月, 2015 6 次提交
  9. 15 10月, 2015 1 次提交
  10. 13 10月, 2015 4 次提交
  11. 09 10月, 2015 3 次提交
  12. 02 10月, 2015 1 次提交
    • S
      drm/i915/bxt: DSI encoder support in CRTC modeset · 7d4aefd0
      Shashank Sharma 提交于
      SKL and BXT qualifies the HAS_DDI() check, and hence haswell
      modeset functions are re-used for modeset sequence. But DDI
      interface doesn't include support for DSI.
      This patch adds:
      1. cases for DSI encoder, in those modeset functions and allows
         a CRTC modeset
      2. Adds call to pre_pll enabled from CRTC modeset function. Nothing
         needs to be done as such in CRTC for DSI encoder, as PLL, clock
         and and transcoder programming will be taken care in encoder's
         pre_enable and pre_pll_enable function.
      
      v2: Fixed Jani's review comments. Added INVALID_PORT for non DDI
          encoder like DSI for platforms having HAS_DDI as true.
      
      v3: Rebased on latest drm-nightly branch. Added a WARN_ON for invalid
          encoder.
      
      v4: WARN_ON for invalid encoder is refactored as per Jani's suggestion.
          Fixed the sequence for pre_pll_enable.
      
      v5: Protected DDI code paths in case of DSI encoder calls.
      Signed-off-by: NShashank Sharma <shashank.sharma@intel.com>
      Signed-off-by: NUma Shankar <uma.shankar@intel.com>
      Reviewed-by: NJani Nikula <jani.nikula@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7d4aefd0
  13. 30 9月, 2015 9 次提交
    • M
      drm/i915: Calculate watermark configuration during atomic check (v2) · 76305b1a
      Matt Roper 提交于
      v2: Don't forget to actually check the cstate->active value when
          tallying up the number of active CRTC's.  (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      76305b1a
    • M
      drm/i915: Don't set plane visible during HW readout if CRTC is off · a4611e44
      Matt Roper 提交于
      We already ensure that pstate->visible = false when crtc->active = false
      during runtime programming; make sure we follow the same logic when
      reading out initial hardware state.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a4611e44
    • M
      drm/i915: Calculate ILK-style watermarks during atomic check (v3) · a28170f3
      Matt Roper 提交于
      Calculate pipe watermarks during atomic calculation phase, based on the
      contents of the atomic transaction's state structure.  We still program
      the watermarks at the same time we did before, but the computation now
      happens much earlier.
      
      While this patch isn't too exciting by itself, it paves the way for
      future patches.  The eventual goal (which will be realized in future
      patches in this series) is to calculate multiple sets up watermark
      values up front, and then program them at different times (pre- vs
      post-vblank) on the platforms that need a two-step watermark update.
      
      While we're at it, s/intel_compute_pipe_wm/ilk_compute_pipe_wm/ since
      this function only applies to ILK-style watermarks and we have a
      completely different function for SKL-style watermarks.
      
      Note that the original code had a memcmp() in ilk_update_wm() to avoid
      calling ilk_program_watermarks() if the watermarks hadn't changed.  This
      memcmp vanishes here, which means we may do some unnecessary result
      generation and merging in cases where watermarks didn't change, but the
      lower-level function ilk_write_wm_values already makes sure that we
      don't actually try to program the watermark registers again.
      
      v2: Squash a few commits from the original series together; no longer
          leave pre-calculated wm's in a separate temporary structure since
          it's easier to follow the logic if we just cut over to using the
          pre-calculated values directly.
      
      v3:
       - Pass intel_crtc instead of drm_crtc to .compute_pipe_wm() entrypoint
         and use intel_atomic_get_crtc_state() to avoid need for extra
         casting.  (Ander)
       - Drop unused intel_check_crtc() function prototype.  (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      a28170f3
    • M
      drm/i915: Drop intel_update_sprite_watermarks · 47c99438
      Matt Roper 提交于
      The only platform that still has an update_sprite_wm entrypoint is SKL;
      on SKL, intel_update_sprite_watermarks just updates intel_plane->wm and
      then performs a regular watermark update.  However intel_plane->wm is
      only used to update a couple fields in intel_wm_config, and those fields
      are never used by the SKL code, so on SKL an update_sprite_wm is
      effectively identical to an update_wm call.  Since we're already
      ensuring that the regular intel_update_wm is called any time we'd try to
      call intel_update_sprite_watermarks, the whole call is redundant and can
      be dropped.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      47c99438
    • M
      drm/i915/ivb: Move WaCxSRDisabledForSpriteScaling w/a to atomic check · 7809e5ae
      Matt Roper 提交于
      Determine whether we need to apply this workaround at atomic check time
      and just set a flag that will be used by the main watermark update
      routine.
      
      Moving this workaround into the atomic framework reduces
      ilk_update_sprite_wm() to just a standard watermark update, so drop it
      completely and just ensure that ilk_update_wm() is called whenever a
      sprite plane is updated in a way that would affect watermarks.
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      7809e5ae
    • M
      drm/i915/skl: Simplify wm structures slightly (v2) · 4969d33e
      Matt Roper 提交于
      A bunch of SKL watermark-related structures have the cursor plane as a
      separate entry from the rest of the planes.  Since a previous patch
      updated I915_MAX_PLANES such that those plane arrays now have a slot for
      the cursor, update the code to use the new slot in the existing plane
      arrays and kill off the cursor-specific structures.
      
      There shouldn't be any functional change here; this is just shuffling
      around how the data is stored in some of the data structures.  The whole
      patch is generated with Coccinelle via the following semantic patch:
      
              @@ struct skl_pipe_wm_parameters WMP; @@
              - WMP.cursor
              + WMP.plane[PLANE_CURSOR]
      
              @@ struct skl_pipe_wm_parameters *WMP; @@
              - WMP->cursor
              + WMP->plane[PLANE_CURSOR]
      
              @@ @@
              struct skl_pipe_wm_parameters {
              ...
              - struct intel_plane_wm_parameters cursor;
              ...
              };
      
              @@
              struct skl_ddb_allocation DDB;
              expression E;
              @@
              - DDB.cursor[E]
              + DDB.plane[E][PLANE_CURSOR]
      
              @@
              struct skl_ddb_allocation *DDB;
              expression E;
              @@
              - DDB->cursor[E]
              + DDB->plane[E][PLANE_CURSOR]
      
              @@ @@
              struct skl_ddb_allocation {
              ...
              - struct skl_ddb_entry cursor[I915_MAX_PIPES];
              ...
              };
      
              @@
              struct skl_wm_values WMV;
              expression E1, E2;
              @@
              (
              - WMV.cursor[E1][E2]
              + WMV.plane[E1][PLANE_CURSOR][E2]
              |
              - WMV.cursor_trans[E1]
              + WMV.plane_trans[E1][PLANE_CURSOR]
              )
      
              @@
              struct skl_wm_values *WMV;
              expression E1, E2;
              @@
              (
              - WMV->cursor[E1][E2]
              + WMV->plane[E1][PLANE_CURSOR][E2]
              |
              - WMV->cursor_trans[E1]
              + WMV->plane_trans[E1][PLANE_CURSOR]
              )
      
              @@ @@
              struct skl_wm_values {
              ...
              - uint32_t cursor[I915_MAX_PIPES][8];
              ...
              - uint32_t cursor_trans[I915_MAX_PIPES];
              ...
              };
      
              @@ struct skl_wm_level WML; @@
              (
              - WML.cursor_en
              + WML.plane_en[PLANE_CURSOR]
              |
              - WML.cursor_res_b
              + WML.plane_res_b[PLANE_CURSOR]
              |
              - WML.cursor_res_l
              + WML.plane_res_l[PLANE_CURSOR]
              )
      
              @@ struct skl_wm_level *WML; @@
              (
              - WML->cursor_en
              + WML->plane_en[PLANE_CURSOR]
              |
              - WML->cursor_res_b
              + WML->plane_res_b[PLANE_CURSOR]
              |
              - WML->cursor_res_l
              + WML->plane_res_l[PLANE_CURSOR]
              )
      
              @@ @@
              struct skl_wm_level {
              ...
              - bool cursor_en;
              ...
              - uint16_t cursor_res_b;
              - uint8_t cursor_res_l;
              ...
              };
      
      v2: Use a PLANE_CURSOR enum entry rather than making the code reference
          I915_MAX_PLANES or I915_MAX_PLANES+1, which was confusing.  (Ander)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4969d33e
    • M
      drm/i915: Drop redundant watermark programming · 37d9078b
      Matt Roper 提交于
      In commit
      
              commit e4ca0612
              Author: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
              Date:   Wed Jul 8 15:31:52 2015 +0200
      
                  drm/i915: Don't forget to mark crtc as inactive after disable
      
      we added extra watermark updates to all of the .crtc_disable()
      entrypoints to avoid problems problems with system resume on SKL.  Those
      disable entrypoints are currently called in just two places in the
      driver: intel_atomic_commit (i.e., during a modeset) and
      intel_crtc_disable_noatomic (which is called during hardware readout).
      It seems that this extra watermark recalculation should only be
      important in the latter case (which happens during a resume operation);
      the former case should always have appropriate watermark programming
      happening at other points in the modeset sequence.
      
      Let's move the watermark update out of the .crtc_disable() entrypoints
      and place it directly in intel_crtc_disable_noatomic() so that it only
      happens on S3 resume and not during a regular modeset (since the
      existing watermark handling should properly update watermarks during
      normal atomic commits).
      
      Cc: Patrik Jakobsson <patrik.jakobsson@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      37d9078b
    • V
    • J
      drm/i915: make backlight hooks connector specific · 5507faeb
      Jani Nikula 提交于
      Previously we've relied on having basically one backlight and one
      backlight type per platform. This is already a bit quirky with PMIC PWM
      support on VLV/CHV platforms with MIPI DSI. In the foreseeable future
      we'll have at least DPCD based backlight control on eDP and DCS command
      based backlight control on MIPI DSI. Backlight is becoming more and more
      connector specific, so reflect this fact by making the backlight control
      hooks connector specific.
      
      This enables further work to reuse generic backlight code in
      intel_panel.c while adding more specific backlight code accessed via the
      hooks.
      
      Cc: Deepak M <m.deepak@intel.com>
      Cc: Yetunde Adebisi <yetundex.adebisi@intel.com>
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      Reviewed-by: NDeepak M <m.deepak@intel.com>
      Reviewed-by: NYetunde Adebisi <yetundex.adebisi@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5507faeb