1. 18 10月, 2017 1 次提交
  2. 16 8月, 2017 1 次提交
  3. 15 8月, 2017 1 次提交
  4. 11 8月, 2017 3 次提交
  5. 10 8月, 2017 1 次提交
  6. 04 8月, 2017 2 次提交
  7. 27 7月, 2017 8 次提交
  8. 08 7月, 2017 2 次提交
  9. 03 7月, 2017 1 次提交
  10. 30 6月, 2017 1 次提交
  11. 26 6月, 2017 1 次提交
  12. 20 6月, 2017 1 次提交
  13. 15 6月, 2017 1 次提交
    • R
      drm/i915/perf: Add OA unit support for Gen 8+ · 19f81df2
      Robert Bragg 提交于
      Enables access to OA unit metrics for BDW, CHV, SKL and BXT which all
      share (more-or-less) the same OA unit design.
      
      Of particular note in comparison to Haswell: some OA unit HW config
      state has become per-context state and as a consequence it is somewhat
      more complicated to manage synchronous state changes from the cpu while
      there's no guarantee of what context (if any) is currently actively
      running on the gpu.
      
      The periodic sampling frequency which can be particularly useful for
      system-wide analysis (as opposed to command stream synchronised
      MI_REPORT_PERF_COUNT commands) is perhaps the most surprising state to
      have become per-context save and restored (while the OABUFFER
      destination is still a shared, system-wide resource).
      
      This support for gen8+ takes care to consider a number of timing
      challenges involved in synchronously updating per-context state
      primarily by programming all config state from the cpu and updating all
      current and saved contexts synchronously while the OA unit is still
      disabled.
      
      The driver intentionally avoids depending on command streamer
      programming to update OA state considering the lack of synchronization
      between the automatic loading of OACTXCONTROL state (that includes the
      periodic sampling state and enable state) on context restore and the
      parsing of any general purpose BB the driver can control. I.e. this
      implementation is careful to avoid the possibility of a context restore
      temporarily enabling any out-of-date periodic sampling state. In
      addition to the risk of transiently-out-of-date state being loaded
      automatically; there are also internal HW latencies involved in the
      loading of MUX configurations which would be difficult to account for
      from the command streamer (and we only want to enable the unit when once
      the MUX configuration is complete).
      
      Since the Gen8+ OA unit design no longer supports clock gating the unit
      off for a single given context (which effectively stopped any progress
      of counters while any other context was running) and instead supports
      tagging OA reports with a context ID for filtering on the CPU, it means
      we can no longer hide the system-wide progress of counters from a
      non-privileged application only interested in metrics for its own
      context. Although we could theoretically try and subtract the progress
      of other contexts before forwarding reports via read() we aren't in a
      position to filter reports captured via MI_REPORT_PERF_COUNT commands.
      As a result, for Gen8+, we always require the
      dev.i915.perf_stream_paranoid to be unset for any access to OA metrics
      if not root.
      
      v5: Drain submitted requests when enabling metric set to ensure no
          lite-restore erases the context image we just updated (Lionel)
      
      v6: In addition to drain, switch to kernel context & update all
          context in place (Chris)
      
      v7: Add missing mutex_unlock() if switching to kernel context fails
          (Matthew)
      
      v8: Simplify OA period/flex-eu-counters programming by using the
          batchbuffer instead of modifying ctx-image (Lionel)
      
      v9: Back to updating the context image (due to erroneous testing,
          batchbuffer programming the OA unit doesn't actually work)
          (Lionel)
          Pin context before updating context image (Chris)
          Drop MMIO programming now that we switch to a kernel context with
          right values in initial context image (Chris)
      
      v10: Just pin_map the contexts we want to modify or let the
           configuration happen on first use (Chris)
      
      v11: Update kernel context OA config through the batchbuffer rather
           than on the fly ctx-image update (Lionel)
      
      v12: Rework OA context registers update again by swithing away from
           user contexts and reconfiguring the kernel context through the
           batchbuffer and updating all the other contexts' context image.
           Also take care to lock slice/subslice configuration when OA is
           on. (Lionel)
      
      v13: Request rpcs updates on all engine when updating the OA config
           (Lionel)
      
      v14: Drop any kind of rpcs management now that we monitor sseu
           configuration changes in a later patch (Lionel)
           Remove usleep after programming the NOA configs on Gen8+, this
           doesn't seem to be needed (Lionel)
      
      v15: Respect coding style for block comments (Chris)
      
      v16: Add missing i915_add_request() in case we fail to emit OA
           configuration (Matthew)
      Signed-off-by: NRobert Bragg <robert@sixbynine.org>
      Signed-off-by: NLionel Landwerlin <lionel.g.landwerlin@intel.com>
      Reviewed-by: Matthew Auld <matthew.auld@intel.com> \o/
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      19f81df2
  14. 13 6月, 2017 7 次提交
  15. 07 6月, 2017 3 次提交
  16. 03 6月, 2017 2 次提交
    • R
      drm/i915/cnp: add CNP gmbus support · 3d02352c
      Rodrigo Vivi 提交于
      On CNP PCH based platforms the gmbus is on the south display that
      is on PCH. The existing implementation for previous platforms
      already covers the need for CNP expect for the pin pair configuration
      that follows similar definitions that we had on BXT.
      
      v2: Don't drop "_BXT" as the indicator of the first platform
          supporting this pin numbers. Suggested by Daniel.
      v3: Add missing else and fix register table since CNP GPIO_CTL
          starts on 0xC5014.
      v4: Fix pin number and map according to the current available VBT.
          Re-add pin 4 for port D. Lost during some rebase.
      v5: Use table as spec. If VBT is wrong it should be ignored.
      
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NAnusha Srivatsa <anusha.srivatsa@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-5-git-send-email-rodrigo.vivi@intel.com
      3d02352c
    • R
      drm/i915/cnp: Get/set proper Raw clock frequency on CNP. · 9d81a997
      Rodrigo Vivi 提交于
      RAWCLK_FREQ register has changed for platforms with CNP+.
      
      [29:26] This field provides the denominator for the fractional
      	part of the microsecond counter divider.  The numerator
      	is fixed at 1. Program this field to the denominator of
      	the fractional portion of reference frequency minus one.
      	If the fraction is 0, program to 0.
      	0100b = Fraction .2 MHz = Fraction 1/5.
      	0000b = Fraction .0 MHz.
      
      [25:16] This field provides the integer part of the microsecond
      	counter divider. Program this field to the integer portion
      	of the reference frequenct minus one.
      
      Also this register tells us that proper raw clock should be read
      from SFUSE_STRAP and programmed to this register. Up to this point
      on other platforms we are reading instead of programming it so
      probably relying on whatever BIOS had configured here.
      
      Now on let's follow the spec and also program this register
      fetching the right value from SFUSE_STRAP as Spec tells us to do.
      
      v2: Read from SFUSE_STRAP and Program RAWCLK_FREQ instead of
          reading the value relying someone else will program that
          for us.
      v3: Add missing else. (Jani)
      v4: Addressing all Ville's catches:
          Use macro for shift bits instead of defining shift.
          Remove shift from the cleaning bits with mask that already
          has it.
          Add missing I915_WRITE to actually write the reg.
          Stop using useless DIV_ROUND_* on divider that is exact
          dividion and use DIV_ROUND_CLOSEST for the fraction part.
      v5: Remove useless Read-Modify-Write on raclk_freq reg. (Ville).
      v6: Change is per PCH instead of per platform.
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Jani Nikula <jani.nikula@intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1496434004-29812-3-git-send-email-rodrigo.vivi@intel.com
      9d81a997
  17. 30 5月, 2017 1 次提交
  18. 18 5月, 2017 2 次提交
  19. 15 5月, 2017 1 次提交
    • V
      drm/i915: Fix rawclk readout for g4x · 82f2b4ac
      Ville Syrjälä 提交于
      Turns out our skills in decoding the CLKCFG register weren't good
      enough. On this particular elk the answer we got was 400 MHz when
      in reality the clock was running at 266 MHz, which then caused us
      to program a bogus AUX clock divider that caused all AUX communication
      to fail.
      
      Sadly the docs are now in bit heaven, so the fix will have to be based
      on empirical evidence. Using another elk machine I was able to frob
      the FSB frequency from the BIOS and see how it affects the CLKCFG
      register. The machine seesm to use a frequency of 266 MHz by default,
      and fortunately it still boot even with the 50% CPU overclock that
      we get when we bump the FSB up to 400 MHz.
      
      It turns out the actual FSB frequency and the register have no real
      link whatsoever. The register value is based on some straps or something,
      but fortunately those too can be configured from the BIOS on this board,
      although it doesn't seem to respect the settings 100%. In the end I was
      able to derive the following relationship:
      
      BIOS FSB / strap | CLKCFG
      -------------------------
      200              | 0x2
      266              | 0x0
      333              | 0x4
      400              | 0x4
      
      So only the 200 and 400 MHz cases actually match how we're currently
      decoding that register. But as the comment next to some of the defines
      says, we have been just guessing anyway.
      
      So let's fix things up so that at least the 266 MHz case will work
      correctly as that is actually the setting used by both the buggy
      machine and my test machine.
      
      The fact that 333 and 400 MHz BIOS settings result in the same register
      value is a little disappointing, as that means we can't tell them apart.
      However, according to the gmch datasheet for both elk and ctg 400 Mhz is
      not even a supported FSB frequency, so I'm going to make the assumption
      that we should decode it as 333 MHz instead.
      
      Cc: stable@vger.kernel.org
      Cc: Tomi Sarvela <tomi.p.sarvela@intel.com>
      Reported-by: NTomi Sarvela <tomi.p.sarvela@intel.com>
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100926Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20170504181530.6908-1-ville.syrjala@linux.intel.comAcked-by: NJani Nikula <jani.nikula@intel.com>
      Tested-by: NTomi Sarvela <tomi.p.sarvela@intel.com>
      (cherry picked from commit 6f38123e)
      Signed-off-by: NJani Nikula <jani.nikula@intel.com>
      82f2b4ac