1. 20 10月, 2015 1 次提交
    • M
      drm/i915/skl: Eliminate usage of pipe_wm_parameters from SKL-style WM (v4) · 024c9045
      Matt Roper 提交于
      Just pull the info out of the state structures rather than staging
      it in an additional set of structures.  To make this more
      straightforward, we change the signature of several internal WM
      functions to take the crtc state as a parameter.
      
      v2:
       - Don't forget to skip cursor planes on a loop in the DDB allocation
         function to match original behavior.  (Ander)
       - Change a use of intel_crtc->active to cstate->active.  They should
         be identical, but it's better to be consistent.  (Ander)
       - Rework more function signatures to pass states rather than crtc for
         consistency. (Ander)
      
      v3:
        - Add missing "+ 1" to skl_wm_plane_id()'s 'overlay' case. (Maarten)
        - Packed formats should pass '0' to drm_format_plane_cpp(), not 1.
          (Maarten)
        - Drop unwanted WARN_ON() for disabled planes when calculating data
          rate for SKL.  (Maarten)
      
      v4:
       - Don't include cursor plane in total relative data rate calculation;
         we've already handled the cursor allocation earlier.
       - Fix 'bytes_per_pixel' calculation braindamage.  Somehow I hardcoded
         the NV12 format as a parameter rather than the actual
         fb->pixel_format, and even then still managed to get the format plane
         wrong.  (Ville)
       - Use plane->state->fb rather than plane->fb in
         skl_allocate_pipe_ddb(); the plane->fb pointer isn't updated until
         after we've done our watermark recalculation, so it has stale
         values.  (Bob Paauwe)
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by(v3): Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Paauwe, Bob J <bob.j.paauwe@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      References: http://lists.freedesktop.org/archives/intel-gfx/2015-September/077060.html
      References: http://lists.freedesktop.org/archives/intel-gfx/2015-October/077721.html
      Smoke-tested-by(v4): Paulo Zanoni <paulo.r.zanoni@intel.com> (SKL)
      Link: http://patchwork.freedesktop.org/patch/61968/
      024c9045
  2. 19 10月, 2015 11 次提交
  3. 16 10月, 2015 1 次提交
  4. 15 10月, 2015 3 次提交
  5. 13 10月, 2015 18 次提交
  6. 10 10月, 2015 1 次提交
  7. 09 10月, 2015 5 次提交
    • M
      drm/i915: Partial revert of atomic watermark series · 261a27d1
      Matt Roper 提交于
      It's been reported that the atomic watermark series triggers some
      regressions on SKL, which we haven't been able to track down yet.  Let's
      temporarily revert these patches while we track down the root cause.
      
      This commit squashes the reverts of:
        76305b1a drm/i915: Calculate watermark configuration during atomic check (v2)
        a4611e44 drm/i915: Don't set plane visible during HW readout if CRTC is off
        a28170f3 drm/i915: Calculate ILK-style watermarks during atomic check (v3)
        de4a9f83 drm/i915: Calculate pipe watermarks into CRTC state (v3)
        de165e0b drm/i915: Refactor ilk_update_wm (v3)
      
      Reference: http://lists.freedesktop.org/archives/intel-gfx/2015-October/077190.html
      Cc: "Zanoni, Paulo R" <paulo.r.zanoni@intel.com>
      Cc: "Vetter, Daniel" <daniel.vetter@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      261a27d1
    • T
      drm/i915: Early exit from semaphore_waits_for for execlist mode. · 381e8ae3
      Tomas Elf 提交于
      When submitting semaphores in execlist mode the hang checker crashes in this
      function because it is only runnable in ring submission mode. The reason this
      is of particular interest to the TDR patch series is because we use semaphores
      as a mean to induce hangs during testing (which is the recommended way to
      induce hangs for gen8+). It's not clear how this is supposed to work in
      execlist mode since:
      
      1. This function requires a ring buffer.
      
      2. Retrieving a ring buffer in execlist mode requires us to retrieve the
      corresponding context, which we get from a request.
      
      3. Retieving a request from the hang checker is not straight-forward since that
      requires us to grab the struct_mutex in order to synchronize against the
      request retirement thread.
      
      4. Grabbing the struct_mutex from the hang checker is nothing that we will do
      since that puts us at risk of deadlock since a hung thread might be holding the
      struct_mutex already.
      
      Therefore it's not obvious how we're supposed to deal with this. For now, we're
      doing an early exit from this function, which avoids any kernel panic situation
      when running our own internal TDR ULT.
      
      * v2: (Chris Wilson)
      Turned the execlist mode check into a ringbuffer NULL check to make it more
      submission mode agnostic and less of a layering violation.
      Signed-off-by: NTomas Elf <tomas.elf@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      381e8ae3
    • T
      drm/i915: Remove wrong warning from i915_gem_context_clean · 61fb5881
      Tvrtko Ursulin 提交于
      commit e9f24d5f
      Author: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Date:   Mon Oct 5 13:26:36 2015 +0100
      
          drm/i915: Clean up associated VMAs on context destruction
      
      Introduced a wrong assumption that all contexts have a ppgtt
      instance. This is not true when full PPGTT is not active so
      remove the WARN_ON_ONCE from the context cleanup code.
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Michel Thierry <michel.thierry@intel.com>
      Reviewed-by: NMichel Thierry <michel.thierry@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      61fb5881
    • V
      drm/i915: Determine the stolen memory base address on gen2 · 0ad98c74
      Ville Syrjälä 提交于
      There isn't an explicit stolen memory base register on gen2.
      Some old comment in the i915 code suggests we should get it via
      max_low_pfn_mapped, but that's clearly a bad idea on my MGM.
      
      The e820 map in said machine looks like this:
      [    0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009f7ff] usable
      [    0.000000] BIOS-e820: [mem 0x000000000009f800-0x000000000009ffff] reserved
      [    0.000000] BIOS-e820: [mem 0x00000000000ce000-0x00000000000cffff] reserved
      [    0.000000] BIOS-e820: [mem 0x00000000000dc000-0x00000000000fffff] reserved
      [    0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000001f6effff] usable
      [    0.000000] BIOS-e820: [mem 0x000000001f6f0000-0x000000001f6f7fff] ACPI data
      [    0.000000] BIOS-e820: [mem 0x000000001f6f8000-0x000000001f6fffff] ACPI NVS
      [    0.000000] BIOS-e820: [mem 0x000000001f700000-0x000000001fffffff] reserved
      [    0.000000] BIOS-e820: [mem 0x00000000fec10000-0x00000000fec1ffff] reserved
      [    0.000000] BIOS-e820: [mem 0x00000000ffb00000-0x00000000ffbfffff] reserved
      [    0.000000] BIOS-e820: [mem 0x00000000fff00000-0x00000000ffffffff] reserved
      
      That makes max_low_pfn_mapped = 1f6f0000, so assuming our stolen memory
      would start there would place it on top of some ACPI memory regions.
      So not a good idea as already stated.
      
      The 9MB region after the ACPI regions at 0x1f700000 however looks
      promising given that the macine reports the stolen memory size to be
      8MB. Looking at the PGTBL_CTL register, the GTT entries are at offset
      0x1fee00000, and given that the GTT entries occupy 128KB, it looks like
      the stolen memory could start at 0x1f700000 and the GTT entries would
      occupy the last 128KB of the stolen memory.
      
      After some more digging through chipset documentation, I've determined
      the BIOS first allocates space for something called TSEG (something to
      do with SMM) from the top of memory, and then it allocates the graphics
      stolen memory below that. Accordind to the chipset documentation TSEG
      has a fixed size of 1MB on 855. So that explains the top 1MB in the
      e820 region. And it also confirms that the GTT entries are in fact at
      the end of the the stolen memory region.
      
      Derive the stolen memory base address on gen2 the same as the BIOS does
      (TOM-TSEG_SIZE-stolen_size). There are a few differences between the
      registers on various gen2 chipsets, so a few different codepaths are
      required.
      
      865G is again bit more special since it seems to support enough memory
      to hit 4GB address space issues. This means the PCI allocations will
      also affect the location of the stolen memory. Fortunately there
      appears to be the TOUD register which may give us the correct answer
      directly. But the chipset docs are a bit unclear, so I'm not 100%
      sure that the graphics stolen memory is always the last thing the
      BIOS steals. Someone would need to verify it on a real system.
      
      I tested this on the my 830 and 855 machines, and so far everything
      looks peachy.
      
      v2: Rewrite to use the TOM-TSEG_SIZE-stolen_size and TOUD methods
      v3: Fix TSEG size for 830
      v4: Add missing 'else' (Chris)
      Tested-by: NChris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      0ad98c74
    • P
      drm/i915: fix FBC buffer size checks · 856312ae
      Paulo Zanoni 提交于
      According to my experiments (and later confirmation from the hardware
      developers), the maximum sizes mentioned in the specification delimit
      how far in the buffer the hardware tracking can go. And the hardware
      calculates the size based on the plane address we provide - and the
      provided plane address might not be the real x:0,y:0 point due to the
      compute_page_offset() function.
      
      On platforms that do the x/y offset adjustment trick it will be really
      hard to reproduce a bug, but on the current SKL we can reproduce the
      bug with igt/kms_frontbuffer_tracking/fbc-farfromfence. With this
      patch, we'll go from "CRC assertion failure" to "FBC unexpectedly
      disabled", which is still a failure on the test suite but is not a
      perceived user bug - you will just not save as much power as you could
      if FBC is disabled.
      
      v2, rewrite patch after clarification from the Hadware guys:
        - Rename function so it's clear what the check is for.
        - Use the new intel_fbc_get_plane_source_sizes() function in order
          to get the proper sizes as seen by FBC.
      v3:
        - Rebase after the s/sizes/size/ on the previous patch.
        - Adjust comment wording (Ville).
        - s/used_/effective_/ (Ville).
      
      Testcase: igt/kms_frontbuffer_tracking/fbc-farfromfence (SKL)
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      856312ae