1. 13 5月, 2016 4 次提交
    • M
      drm/i915/gen9: Compute DDB allocation at atomic check time (v4) · 98d39494
      Matt Roper 提交于
      Calculate the DDB blocks needed to satisfy the current atomic
      transaction at atomic check time.  This is a prerequisite to calculating
      SKL watermarks during the 'check' phase and rejecting any configurations
      that we can't find valid watermarks for.
      
      Due to the nature of DDB allocation, it's possible for the addition of a
      new CRTC to make the watermark configuration already in use on another,
      unchanged CRTC become invalid.  A change in which CRTC's are active
      triggers a recompute of the entire DDB, which unfortunately means we
      need to disallow any other atomic commits from racing with such an
      update.  If the active CRTC's change, we need to grab the lock on all
      CRTC's and run all CRTC's through their 'check' handler to recompute and
      re-check their per-CRTC DDB allocations.
      
      Note that with this patch we only compute the DDB allocation but we
      don't actually use the computed values during watermark programming yet.
      For ease of review/testing/bisecting, we still recompute the DDB at
      watermark programming time and just WARN() if it doesn't match the
      precomputed values.  A future patch will switch over to using the
      precomputed values once we're sure they're being properly computed.
      
      Another clarifying note:  DDB allocation itself shouldn't ever fail with
      the algorithm we use today (i.e., we have enough DDB blocks on BXT to
      support the minimum needs of the worst-case scenario of every pipe/plane
      enabled at full size).  However the watermarks calculations based on the
      DDB may fail and we'll be moving those to the atomic check as well in
      future patches.
      
      v2:
       - Skip DDB calculations in the rare case where our transaction doesn't
         actually touch any CRTC's at all.  Assuming at least one CRTC state
         is present in our transaction, then it means we can't race with any
         transactions that would update dev_priv->active_crtcs (which requires
         _all_ CRTC locks).
      
      v3:
       - Also calculate DDB during initial hw readout, to prevent using
         incorrect bios values. (Maarten)
      
      v4:
       - Use new distrust_bios_wm flag instead of skip_initial_wm (which was
         never actually set).
       - Set intel_state->active_pipe_changes instead of just realloc_pipes
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Lyude Paul <cpaul@redhat.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-10-git-send-email-matthew.d.roper@intel.com
      98d39494
    • M
      drm/i915: Add distrust_bios_wm flag to dev_priv (v2) · 279e99d7
      Matt Roper 提交于
      SKL-style platforms can't fully trust the watermark/DDB settings
      programmed by the BIOS and need to do extra sanitization on their first
      atomic update.  Add a flag to dev_priv that is set during hardware
      readout and cleared at the end of the first commit.
      
      Note that for the somewhat common case where everything is turned off
      when the driver starts up, we don't need to bother with a recompute...we
      know exactly what the DDB should be (all zero's) so just setup the DDB
      directly in that case.
      
      v2:
       - Move clearing of distrust_bios_wm up below the swap_state call since
         it's a more natural / self-explanatory location.  (Maarten)
       - Use dev_priv->active_crtcs to test whether any CRTC's are turned on
         during HW WM readout rather than trying to count the active CRTC's
         again ourselves.  (Maarten)
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-9-git-send-email-matthew.d.roper@intel.com
      279e99d7
    • M
      drm/i915/gen9: Allow skl_allocate_pipe_ddb() to operate on in-flight state (v3) · c107acfe
      Matt Roper 提交于
      We eventually want to calculate watermark values at atomic 'check' time
      instead of atomic 'commit' time so that any requested configurations
      that result in impossible watermark requirements are properly rejected.
      The first step along this path is to allocate the DDB at atomic 'check'
      time.  As we perform this transition, allow the main allocation function
      to operate successfully on either an in-flight state or an
      already-commited state.  Once we complete the transition in a future
      patch, we'll come back and remove the unnecessary logic for the
      already-committed case.
      
      v2: Rebase/refactor; we should no longer need to grab extra plane states
          while allocating the DDB since we can pull cached data rates and
          minimum block counts from the CRTC state for any planes that aren't
          being modified by this transaction.
      
      v3:
       - Simplify memsets to clear DDB plane entries.  (Maarten)
       - Drop a redundant memset of plane[pipe][PLANE_CURSOR] that was added
         by an earlier Coccinelle patch.  (Maarten)
       - Assign *num_active at the top of skl_ddb_get_pipe_allocation_limits()
         so that no code paths return without setting it.  (kbuild robot)
      
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Signed-off-by: NMatt Roper <matthew.d.roper@intel.com>
      Reviewed-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463061971-19638-8-git-send-email-matthew.d.roper@intel.com
      c107acfe
    • C
      drm/i915: Move get-reset-stats ioctl from intel_uncore.c to i915_gem_context.c · d538704b
      Chris Wilson 提交于
      The get-reset-stats ioctl reports upon the statistics (number of hangs,
      be it as a victim or the guilty party) of a particular context. It is
      semantically better as being part of i915_gem_context.c user interface,
      as opposed to the hardware level access of intel_uncore.c
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1463137042-9669-1-git-send-email-chris@chris-wilson.co.uk
      d538704b
  2. 11 5月, 2016 6 次提交
  3. 09 5月, 2016 4 次提交
    • C
      drm/i915: Store a i915 backpointer from engine, and use it · c033666a
      Chris Wilson 提交于
         text	   data	    bss	    dec	    hex	filename
      6309351	3578714	 696320	10584385	 a18141	vmlinux
      6308391	3578714	 696320	10583425	 a17d81	vmlinux
      
      Almost 1KiB of code reduction.
      
      v2: More s/INTEL_INFO()->gen/INTEL_GEN()/ and IS_GENx() conversions
      
         text	   data	    bss	    dec	    hex	filename
      6304579	3578778	 696320	10579677	 a16edd	vmlinux
      6303427	3578778	 696320	10578525	 a16a5d	vmlinux
      
      Now over 1KiB!
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Reviewed-by: NTvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1462545621-30125-3-git-send-email-chris@chris-wilson.co.uk
      c033666a
    • T
      drm/i915: Small display interrupt handlers tidy · 91d14251
      Tvrtko Ursulin 提交于
      I have noticed some of our interrupt handlers use both dev and
      dev_priv while they could get away with only dev_priv in the
      huge majority of cases.
      
      Tidying that up had a cascading effect on changing functions
      prototypes, so relatively big churn factor, but I think it is
      for the better.
      
      For example even where changes cascade out of i915_irq.c, for
      functions prefixed with intel_, genX_ or <plat>_, it makes more
      sense to take dev_priv directly anyway.
      
      This allows us to eliminate local variables and intermixed usage
      of dev and dev_priv where only one is good enough.
      
      End result is shrinkage of both source and the resulting binary.
      
      i915.ko:
      
       - .text         000b0899
       + .text         000b0619
      
      Or if we look at the Gen8 display irq chain:
      
       -00000000000006ad t gen8_irq_handler
       +0000000000000663 t gen8_irq_handler
         -0000000000000028 T intel_opregion_asle_intr
         +0000000000000024 T intel_opregion_asle_intr
         -000000000000008c t ilk_hpd_irq_handler
         +000000000000007f t ilk_hpd_irq_handler
         -0000000000000116 T intel_check_page_flip
         +0000000000000112 T intel_check_page_flip
         -000000000000011a T intel_prepare_page_flip
         +0000000000000119 T intel_prepare_page_flip
         -0000000000000014 T intel_finish_page_flip_plane
         +0000000000000013 T intel_finish_page_flip_plane
         -0000000000000053 t hsw_pipe_crc_irq_handler
         +000000000000004c t hsw_pipe_crc_irq_handler
         -000000000000022e t cpt_irq_handler
         +0000000000000213 t cpt_irq_handler
      
      So small shrinkage but it is all fast paths so doesn't harm.
      
      Situation is similar in other interrupt handlers as well.
      
      v2: Tidy intel_queue_rps_boost_for_request as well. (Chris Wilson)
      Signed-off-by: NTvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      91d14251
    • V
      drm/i915: Determine DP++ type 1 DVI adaptor presence based on VBT · d6199256
      Ville Syrjälä 提交于
      DP dual mode type 1 DVI adaptors aren't required to implement any
      registers, so it's a bit hard to detect them. The best way would
      be to check the state of the CONFIG1 pin, but we have no way to
      do that. So as a last resort, check the VBT to see if the HDMI
      port is in fact a dual mode capable DP port.
      
      v2: Deal with VBT code reorganization
          Deal with DRM_DP_DUAL_MODE_UNKNOWN
          Reduce DEVICE_TYPE_DP_DUAL_MODE_BITS a bit
          Accept both DP and HDMI dvo_port in VBT as my BSW
          at least declare its DP port as HDMI :(
      v3: Ignore DEVICE_TYPE_NOT_HDMI_OUTPUT (Shashank)
      
      Cc: stable@vger.kernel.org
      Cc: Tore Anderson <tore@fud.no>
      Reported-by: NTore Anderson <tore@fud.no>
      Fixes: 7a0baa62 ("Revert "drm/i915: Disable 12bpc hdmi for now"")
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Shashank Sharma <shashank.sharma@intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1462362322-31278-1-git-send-email-ville.syrjala@linux.intel.comReviewed-by: NShashank Sharma <shashank.sharma@intel.com>
      d6199256
    • D
      drm/i915: Update DRIVER_DATE to 20160508 · 2a55135c
      Daniel Vetter 提交于
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      2a55135c
  4. 05 5月, 2016 1 次提交
  5. 04 5月, 2016 1 次提交
  6. 02 5月, 2016 1 次提交
  7. 29 4月, 2016 10 次提交
  8. 28 4月, 2016 9 次提交
  9. 25 4月, 2016 3 次提交
  10. 20 4月, 2016 1 次提交