1. 03 9月, 2016 1 次提交
  2. 02 9月, 2016 10 次提交
  3. 01 9月, 2016 1 次提交
  4. 31 8月, 2016 1 次提交
  5. 29 8月, 2016 4 次提交
  6. 27 8月, 2016 4 次提交
    • C
      drm/i915: Make for_each_engine_masked() more compact and quicker · bafb0fce
      Chris Wilson 提交于
      Rather than walk the full array of engines checking whether each is in
      the mask in turn, we can use the mask to jump to the right engines. This
      should quicker for a sparse array of engines or mask, whilst generating
      smaller code:
      
         text	   data	    bss	    dec	    hex	filename
      1251010	   4579	    800	1256389	 132bc5	drivers/gpu/drm/i915/i915.ko
      1250530	   4579	    800	1255909	 1329e5	drivers/gpu/drm/i915/i915.ko
      
      The downside is that we have to pass in a temporary, alas no C99
      iterators yet.
      
      [P.S. Joonas doesn't like having to pass extra temporaries into the
      macro, and even less that I called them tmp. As yet, we haven't found a
      macro that avoids passing in a temporary that is smaller. We probably
      will get C99 iterators first!]
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160827075401.16470-2-chris@chris-wilson.co.uk
      bafb0fce
    • C
      drm/i915: Tidy reporting busy status during i915_gem_retire_requests() · f6407193
      Chris Wilson 提交于
      As we know by inspection whether any engine is still busy as we retire
      all the requests, we can pass that information back via return value
      rather than check again afterwards.
      
      v2: A little more polish missed in patch splitting
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160827075401.16470-1-chris@chris-wilson.co.uk
      f6407193
    • C
      drm/i915: Allow the user to pass a context to any ring · f7978a0c
      Chris Wilson 提交于
      With full-ppgtt, we want the user to have full control over their memory
      layout, with a separate instance per context. Forcing them to use a
      shared memory layout for !RCS not only duplicates the amount of work we
      have to do, but also defeats the memory segregation on offer.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160822080350.4964-4-chris@chris-wilson.co.ukReviewed-by: NJohn Harrison <john.c.harrison@intel.com>
      Reviewed-by: NThomas Daniel <thomas.daniel@intel.com>
      Acked-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      f7978a0c
    • C
      drm/i915: Add GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE to SNB · 7850d1c3
      Chris Wilson 提交于
      According to the CI test machines, SNB also uses the
      GEN7_PCODE_MIN_FREQ_TABLE_GT_RATIO_OUT_OF_RANGE value to report a bad
      GEN6_PCODE_MIN_FREQ_TABLE request.
      
      [  157.744641] WARNING: CPU: 5 PID: 9238 at
      drivers/gpu/drm/i915/intel_pm.c:7760 sandybridge_pcode_write+0x141/0x200 [i915]
      [  157.744642] Missing switch case (16) in gen6_check_mailbox_status
      [  157.744642] Modules linked in: snd_hda_intel i915 ax88179_178a usbnet mii x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic snd_hda_codec snd_hwdep snd_hda_core mei_me lpc_ich snd_pcm mei broadcom bcm_phy_lib tg3 ptp pps_core [last unloaded: vgem]
      [  157.744658] CPU: 5 PID: 9238 Comm: drv_hangman Tainted: G     U  W 4.8.0-rc3-CI-CI_DRM_1589+ #1
      [  157.744658] Hardware name: Dell Inc. XPS 8300  /0Y2MRG, BIOS A06 10/17/2011
      [  157.744659]  0000000000000000 ffff88011f093a98 ffffffff81426415 ffff88011f093ae8
      [  157.744662]  0000000000000000 ffff88011f093ad8 ffffffff8107d2a6 00001e50810d3c9f
      [  157.744663]  ffff880128680000 0000000000000008 0000000000000000 ffff88012868a650
      [  157.744665] Call Trace:
      [  157.744669]  [<ffffffff81426415>] dump_stack+0x67/0x92
      [  157.744672]  [<ffffffff8107d2a6>] __warn+0xc6/0xe0
      [  157.744673]  [<ffffffff8107d30a>] warn_slowpath_fmt+0x4a/0x50
      [  157.744685]  [<ffffffffa0029831>] sandybridge_pcode_write+0x141/0x200 [i915]
      [  157.744697]  [<ffffffffa002a88a>] intel_enable_gt_powersave+0x64a/0x1330 [i915]
      [  157.744712]  [<ffffffffa006b4cb>] ? i9xx_emit_request+0x1b/0x80 [i915]
      [  157.744725]  [<ffffffffa0055ed3>] __i915_add_request+0x1e3/0x370 [i915]
      [  157.744738]  [<ffffffffa00428bd>] i915_gem_do_execbuffer.isra.16+0xced/0x1b80 [i915]
      [  157.744740]  [<ffffffff811a232e>] ? __might_fault+0x3e/0x90
      [  157.744752]  [<ffffffffa0043b72>] i915_gem_execbuffer2+0xc2/0x2a0 [i915]
      [  157.744753]  [<ffffffff815485b7>] drm_ioctl+0x207/0x4c0
      [  157.744765]  [<ffffffffa0043ab0>] ? i915_gem_execbuffer+0x360/0x360 [i915]
      [  157.744767]  [<ffffffff810ea4ad>] ?  debug_lockdep_rcu_enabled+0x1d/0x20
      [  157.744769]  [<ffffffff811fe09e>] do_vfs_ioctl+0x8e/0x680
      [  157.744770]  [<ffffffff811a2377>] ? __might_fault+0x87/0x90
      [  157.744771]  [<ffffffff811a232e>] ? __might_fault+0x3e/0x90
      [  157.744773]  [<ffffffff810d3df2>] ?  trace_hardirqs_on_caller+0x122/0x1b0
      [  157.744774]  [<ffffffff811fe6cc>] SyS_ioctl+0x3c/0x70
      [  157.744776]  [<ffffffff8180fe69>] entry_SYSCALL_64_fastpath+0x1c/0xac
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97491
      Fixes: 87660502 ("drm/i915/gen6+: Interpret mailbox error flags")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Lyude <cpaul@redhat.com>
      Cc: Matt Roper <matthew.d.roper@intel.com>
      Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: stable@vger.kernel.org
      Link: http://patchwork.freedesktop.org/patch/msgid/20160826105926.3413-1-chris@chris-wilson.co.ukAcked-by: NMika Kuoppala <mika.kuoppala@intel.com>
      7850d1c3
  7. 26 8月, 2016 2 次提交
  8. 25 8月, 2016 6 次提交
  9. 24 8月, 2016 8 次提交
  10. 23 8月, 2016 3 次提交
    • C
      io-mapping.h: s/PAGE_KERNEL_IO/PAGE_KERNEL/ · ac96b556
      Chris Wilson 提交于
      PAGE_KERNEL_IO is an x86-ism. Though it is used to define the pgprot_t
      used for the iomapped region, it itself is just PAGE_KERNEL. On all
      other arches, PAGE_KERNEL_IO is undefined so in a general header we must
      refrain from using it.
      
      v2: include pgtable for pgprot_combine()
      Reported-by: NStephen Rothwell <sfr@canb.auug.org.au>
      Fixes: cafaf14a ("io-mapping: Always create a struct to hold metadata about the io-mapping")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: linux-mm@kvack.org
      Signed-off-by: NDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160823155024.22379-1-chris@chris-wilson.co.uk
      ac96b556
    • L
      drm/i915/skl: Update plane watermarks atomically during plane updates · 62e0fb88
      Lyude 提交于
      Thanks to Ville for suggesting this as a potential solution to pipe
      underruns on Skylake.
      
      On Skylake all of the registers for configuring planes, including the
      registers for configuring their watermarks, are double buffered. New
      values written to them won't take effect until said registers are
      "armed", which is done by writing to the PLANE_SURF (or in the case of
      cursor planes, the CURBASE register) register.
      
      With this in mind, up until now we've been updating watermarks on skl
      like this:
      
        non-modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - intel_pre_plane_update:
              - intel_update_watermarks()
           - {vblank happens; new watermarks + old plane values => underrun }
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - end vblank evasion
        }
      
        or
      
        modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - crtc_enable:
              - intel_update_watermarks()
           - {vblank happens; new watermarks + old plane values => underrun }
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - end vblank evasion
        }
      
      Now we update watermarks atomically like this:
      
        non-modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - intel_pre_plane_update:
              - intel_update_watermarks() (wm values aren't written yet)
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
              - write new wm values
              - end vblank evasion
        }
      
        modeset {
         - calculate (during atomic check phase)
         - finish_atomic_commit:
           - crtc_enable:
              - intel_update_watermarks() (actual wm values aren't written
                yet)
           - drm_atomic_helper_commit_planes_on_crtc:
              - start vblank evasion
              - write new plane registers
      	- write new wm values
              - end vblank evasion
        }
      
      So this patch moves all of the watermark writes into the right place;
      inside of the vblank evasion where we update all of the registers for
      each plane. While this patch doesn't fix everything, it does allow us to
      update the watermark values in the way the hardware expects us to.
      
      Changes since original patch series:
       - Remove mutex_lock/mutex_unlock since they don't do anything and we're
         not touching global state
       - Move skl_write_cursor_wm/skl_write_plane_wm functions into
         intel_pm.c, make externally visible
       - Add skl_write_plane_wm calls to skl_update_plane
       - Fix conditional for for loop in skl_write_plane_wm (level < max_level
         should be level <= max_level)
       - Make diagram in commit more accurate to what's actually happening
       - Add Fixes:
      
      Changes since v1:
       - Use IS_GEN9() instead of IS_SKYLAKE() since these fixes apply to more
         then just Skylake
       - Update description to make it clear this patch doesn't fix everything
       - Check if pipes were actually changed before writing watermarks
      
      Changes since v2:
       - Write PIPE_WM_LINETIME during vblank evasion
      
      Changes since v3:
       - Rebase against new SAGV patch changes
      
      Changes since v4:
       - Add a parameter to choose what skl_wm_values struct to use when
         writing new plane watermarks
      
      Changes since v5:
       - Remove cursor ddb entry write in skl_write_cursor_wm(), defer until
         patch 6
       - Write WM_LINETIME in intel_begin_crtc_commit()
      
      Changes since v6:
       - Remove redundant dirty_pipes check in skl_write_plane_wm (we check
         this in all places where we call this function, and it was supposed
         to have been removed earlier anyway)
       - In i9xx_update_cursor(), use dev_priv->info.gen >= 9 instead of
         IS_GEN9(dev_priv). We do this everywhere else and I'd imagine this
         needs to be done for gen10 as well
      
      Changes since v7:
       - Fix rebase fail (unused variable obj)
       - Make struct skl_wm_values *wm const
       - Fix indenting
       - Use INTEL_GEN() instead of dev_priv->info.gen
      
      Changes since v8:
       - Don't forget calls to skl_write_plane_wm() when disabling planes
       - Use INTEL_GEN(), not INTEL_INFO()->gen in intel_begin_crtc_commit()
      
      Fixes: 2d41c0b5 ("drm/i915/skl: SKL Watermark Computation")
      Signed-off-by: NLyude <cpaul@redhat.com>
      Reviewed-by: NMatt Roper <matthew.d.roper@intel.com>
      Cc: stable@vger.kernel.org
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Daniel Vetter <daniel.vetter@intel.com>
      Cc: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
      Cc: Hans de Goede <hdegoede@redhat.com>
      Signed-off-by: NMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com
      Link: http://patchwork.freedesktop.org/patch/msgid/1471884608-10671-1-git-send-email-cpaul@redhat.com
      62e0fb88
    • M