1. 20 5月, 2015 3 次提交
  2. 08 5月, 2015 3 次提交
  3. 16 4月, 2015 1 次提交
  4. 14 4月, 2015 4 次提交
  5. 13 4月, 2015 1 次提交
  6. 10 4月, 2015 7 次提交
  7. 09 4月, 2015 1 次提交
  8. 31 3月, 2015 1 次提交
  9. 26 3月, 2015 1 次提交
  10. 23 3月, 2015 1 次提交
  11. 20 3月, 2015 3 次提交
    • C
      drm/i915: Use down ei for manual Baytrail RPS calculations · 6f4b12f8
      Chris Wilson 提交于
      Use both up/down manual ei calcuations for symmetry and greater
      flexibility for reclocking, instead of faking the down interrupt based
      on a fixed integer number of up interrupts.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      6f4b12f8
    • C
      drm/i915: Improved w/a for rps on Baytrail · 43cf3bf0
      Chris Wilson 提交于
      Rewrite commit 31685c25
      Author: Deepak S <deepak.s@linux.intel.com>
      Date:   Thu Jul 3 17:33:01 2014 -0400
      
          drm/i915/vlv: WA for Turbo and RC6 to work together.
      
      Other than code clarity, the major improvement is to disable the extra
      interrupts generated when idle.  However, the reclocking remains rather
      slow under the new manual regime, in particular it fails to downclock as
      quickly as desired. The second major improvement is that for certain
      workloads, like games, we need to combine render+media activity counters
      as the work of displaying the frame is split across the engines and both
      need to be taken into account when deciding the global GPU frequency as
      memory cycles are shared.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Deepak S <deepak.s@linux.intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      43cf3bf0
    • C
      drm/i915: Relax RPS contraints to allows setting minfreq on idle · aed242ff
      Chris Wilson 提交于
      When we idle, we set the GPU frequency to the hardware minimum (not user
      minimum). We introduce a new variable to distinguish between the
      different roles, and to allow easy tuning of the idle frequency without
      impacting over aspects of RPS. Setting the minimum frequency should be a
      safety blanket as the pcu on the GPU should be power gating itself
      anyway. However, in order for us to do set the absolute minimum
      frequency, we need to relax a few of our assertions that we do not
      exceed the user limits.
      
      v2: Add idle_freq
      v3: Init idle_freq for vlv and add a bunch of WARNs
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Deepak S <deepak.s@linux.intel.com>
      Reviewed-by: Deepak S<deepak.s@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      aed242ff
  12. 18 3月, 2015 14 次提交
    • A
      drm/i915/skl: Enable the RPS interrupts programming · 4c2a8897
      Akash Goel 提交于
      Enable the RPS interrupts programming(enable/disable/reset) for GEN9,
      as missing changes to enable the RPS support on GEN9 have been added.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      4c2a8897
    • A
      drm/i915/skl: Updated the gen9_enable_rps function · 0beb059a
      Akash Goel 提交于
      On SKL, GT frequency is programmed in units of 16.66 MHZ units compared
      to 50 MHZ for older platforms. Also the time value specified for Up/Down EI &
      Up/Down thresholds are expressed in units of 1.33 us, compared to 1.28
      us for older platforms. So updated the gen9_enable_rps function as per that.
      
      v2: Updated to use new macro GT_INTERVAL_FROM_US
      
      v3: Removed the initial setup of certain registers, from gen9_enable_rps,
          which gets overridden later from gen6_set_rps (Damien)
      
      v4: Removed the enabling of rps interrupts, from gen9_enable_rps.
          To be done from intel_gen6_powersave_work only, as done for other
          platforms also.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0beb059a
    • A
      drm/i915/skl: Updated the gen6_rps_limits function · 74ef1173
      Akash Goel 提交于
      RP Interrupt Up/Down Frequency Limits register (A014) definition
      has changed for SKL. Updated the gen6_rps_limits function as per that
      
      v2: Renamed the function to intel_rps_limits (Chris)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      74ef1173
    • A
      drm/i915/skl: Restructured the gen6_set_rps_thresholds function · 8a586437
      Akash Goel 提交于
      Prior to SKL, the time period programmed in Up/Down EI & Up/Down
      threshold registers was in units of 1.28 micro seconds. But for
      SKL, the units have changed (1.333 micro seconds).
      Have generalized the implementation of gen6_set_rps_thresholds function,
      by removing the hard coding done in it as per 1.28 micro seconds.
      
      v2: Renamed the local variables & removed superfluous comments (Chris)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      8a586437
    • A
      drm/i915/skl: Updated the gen6_set_rps function · 5704195c
      Akash Goel 提交于
      On SKL, the frequency is programmed differently in RPNSWREQ (A008)
      register (from bits 23 to 31, compared to bits 24 to 31). So updated
      the gen6_set_rps function, as per this change.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      5704195c
    • A
      drm/i915/skl: Updated the gen6_init_rps_frequencies function · cee991cb
      Akash Goel 提交于
      On SKL the frequency is specified in units of 16.66 MHZ, barring the
      RP_STATE_CAP(0x5998) register, which still reports frequency in units
      of 50 MHZ. So an extra conversion is required in gen6_init_rps_frequencies
      function for SKL, to store the frequency values as per the actual hardware unit.
      
      v2: Corrected the conversion from 50 to 16.66 MHZ (Ville)
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cee991cb
    • A
      drm/i915/skl: Updated intel_gpu_freq() and intel_freq_opcode() · 80b6dda4
      Akash Goel 提交于
      On SKL, frequency is specified in units of 16.66 MHZ.
      Updated the intel_gpu_freq() and intel_freq_opecode() functions
      to do the conversion appropriately.
      Signed-off-by: NAkash Goel <akash.goel@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      80b6dda4
    • V
      drm/i915: Use FW_WM() macro for older gmch platforms too · f4998963
      Ville Syrjälä 提交于
      Use the FW_WM() macro from the VLV wm code to polish up the wm
      code for older gmch platforms.
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f4998963
    • V
      drm/i915: Add polish to VLV WM shift+mask operations · 15665979
      Ville Syrjälä 提交于
      Wrap the FW register value shift+mask operations into a macro to hide
      the ugliness a bit. Also might avoid bugs due to typos.
      
      Also rename all the primary/sprite plane low order bit masks to have the
      _VLV suffix, so that we can use the FW_WM_VLV() macro instead of the
      FW_WM() macro for them in a consistent manner. Cursor and all the high
      order bits are left to use the FW_WM() macro as there's no real
      confusion with them.
      
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      15665979
    • M
      drm/i915: Don't assume primary & cursor are always on for wm calculation (v4) · c9f038a1
      Matt Roper 提交于
      Current ILK-style watermark code assumes the primary plane and cursor
      plane are always enabled.  This assumption, along with the combination
      of two independent commits that got merged at the same time, results in
      a NULL dereference.  The offending commits are:
      
              commit fd2d61341bf39d1054256c07d6eddd624ebc4241
              Author: Matt Roper <matthew.d.roper@intel.com>
              Date:   Fri Feb 27 10:12:01 2015 -0800
      
                  drm/i915: Use plane->state->fb in watermark code (v2)
      
      and
      
              commit 0fda6568
              Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
              Date:   Fri Feb 27 15:12:35 2015 +0000
      
                  drm/i915/skl: Update watermarks for Y tiling
      
      The first commit causes us to use the FB from plane->state->fb rather
      than the legacy plane->fb, which is updated a bit later in the process.
      
      The second commit includes a change that now triggers watermark
      reprogramming on primary plane enable/disable where we didn't have one
      before (which wasn't really correct, but we had been getting lucky
      because we always calculated as if the primary plane was on).
      
      Together, these two commits cause the watermark calculation to
      (properly) see plane->state->fb = NULL when we're in the process of
      disabling the primary plane.  However the existing watermark code
      assumes there's always a primary fb and tries to dereference it to find
      out pixel format / bpp information.
      
      The fix is to make ILK-style watermark calculation actually check the
      true status of primary & cursor planes and adjust our watermark logic
      accordingly.
      
      v2: Update unchecked uses of state->fb for other platforms (pnv, skl,
          etc.).  Note that this is just a temporary fix.  Ultimately the
          useful information is going to be computed at check time and stored
          right in the state structures so that we don't have to figure this
          all out while we're supposed to be programming the watermarks.
          (caught by Tvrtko)
      
      v3: Fix a couple copy/paste mistakes in SKL code. (Tvrtko)
      
      v4: Only add FB checks for ILK/SKL codepaths.  Older platforms still use
          intel_crtc_active() and will shortcircuit out of watermark
          calculations before ever trying to dereference the primary plane's
          framebuffer.
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Reported-by: NMichael Leuchtenburg <michael@slashhome.org>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=89388Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      c9f038a1
    • V
      drm/i915: Disable DDR DVFS on CHV · fc1ac8de
      Ville Syrjälä 提交于
      DDR DVFS introduces massive memory latencies which can't be handled by
      the PND deadline stuff. Instead the watermarks will need to be
      programmed to compensate for the latency and the deadlines will need to
      be programmed to tight fixed values. That means DDR DVFS can only be
      enabled if the display FIFOs are large enough, and that pretty much
      means we have to manually repartition them to suit the needs of the
      moment.
      
      That's a lot of change, so in the meantime let's just disable DDR DVFS
      to get the display(s) to be stable.
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      fc1ac8de
    • V
      drm/i915: Enable the maxfifo PM5 mode when appropriate on CHV · cfb41411
      Ville Syrjälä 提交于
      CHV has a new knob in Punit to select between some memory power savings
      modes PM2 and PM5. We can allow the deeper PM5 when maxfifo mode is
      enabled, so let's do so in the hopes for moar power savings.
      
      v2: Put the thing into a separate function to avoid churn later
      v3: Don't break VLV
      Reviewed-by: NVijay Purushothaman <vijay.a.purushothaman@linux.intel.com>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NArun R Murthy <arun.r.murthy@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      cfb41411
    • V
      drm/i915: Rewrite VLV/CHV watermark code · ae80152d
      Ville Syrjälä 提交于
      Assuming the PND deadline mechanism works reasonably we should do
      memory requests as early as possible so that PND has schedule the
      requests more intelligently. Currently we're still calculating
      the watermarks as if VLV/CHV are identical to g4x, which isn't
      the case.
      
      The current code also seems to calculate insufficient watermarks
      and hence we're seeing some underruns, especially on high resolution
      displays.
      
      To fix it just rip out the current code and replace is with something
      that tries to utilize PND as efficiently as possible.
      
      We now calculate the WM watermark to trigger when the FIFO still has
      256us worth of data. 256us is the maximum deadline value supoorted by
      PND, so issuing memory requests earlier would mean we probably couldn't
      utilize the full FIFO as PND would attempt to return the data at
      least in at least 256us. We also clamp the watermark to at least 8
      cachelines as that's the magic watermark that enabling trickle feed
      would also impose. I'm assuming it matches some burst size.
      
      In theory we could just enable trickle feed and ignore the WM values,
      except trickle feed doesn't work with max fifo mode anyway, so we'd
      still need to calculate the SR watermarks. It seems cleaner to just
      disable trickle feed and calculate all watermarks the same way. Also
      trickle feed wouldn't account for the 256us max deadline value, thoguh
      that may be a moot point in non-max fifo mode sicne the FIFOs are fairly
      small.
      
      On VLV max fifo mode can be used with either primary or sprite planes.
      So the code now also checks all the planes (apart from the cursor)
      when calculating the SR plane watermark.
      
      We don't have to worry about the WM1 watermarks since we're using the
      PND deadline scheme which means the hardware ignores WM1 values.
      
      v2: Use plane->state->fb instead of plane->fb
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Reviewed-by: NJesse Barnes <jbarnes@virtuousgeek.org>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      ae80152d
    • M
      drm/i915: Use crtc->state->active in ilk/skl watermark calculations (v3) · 3ef00284
      Matt Roper 提交于
      Existing watermark code calls intel_crtc_active() to determine whether a CRTC
      is active for the purpose of watermark calculations (and bails out early if it
      determines the CRTC is not active).  However intel_crtc_active() only returns
      true if crtc->primary->fb is non-NULL, which isn't appropriate in the modern
      age of universal planes and atomic modeset since userspace can now disable the
      primary plane, but leave the CRTC (and other planes) running.
      
      Note that commit
      
              commit 0fda6568
              Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
              Date:   Fri Feb 27 15:12:35 2015 +0000
      
                  drm/i915/skl: Update watermarks for Y tiling
      
      adds a test for primary plane enable/disable to trigger a watermark update
      (previously we ignored updates to primary planes, which wasn't really correct,
      but we got lucky since we always pretended the primary plane was on).  Tvrtko's
      patch tries to update watermarks when we re-enable the primary plane, but that
      watermark computation gets aborted early because intel_crtc_active() returns
      false due to the disabled primary plane.
      
      Switch the ILK and SKL watermark code over to use crtc->state->active rather
      than calling intel_crtc_active() so that we'll properly compute watermarks when
      re-enabling the primary plane.
      
      Note that this commit doesn't touch callsites in the watermark code for
      older platforms since there were concerns that doing so would lead to
      other types of breakage.
      
      Also note that all of the watermark calculation at the moment takes place after
      new crtc/plane states are swapped into the DRM objects.  This will change in
      the future, so we'll be working with in-flight state objects, but for the time
      being, crtc->state is what we want to operate on.
      
      v2: Don't drop primary->fb check from intel_crtc_active(), but rather replace
          ILK/SKL callsites with direct tests of crtc->state->active.  There is
          concern that messing with intel_crtc_active() will lead to other breakage for
          old hardware platforms.  (Ville)
      
      v3: Use intel_crtc->active for now rather than crtc->state->active since
          we don't have CRTC states properly hooked up and initialized yet.
          We'll defer the switch to crtc->state->active until the atomic CRTC
          state work is farther along. (Ville)
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      3ef00284