1. 05 10月, 2016 1 次提交
  2. 04 10月, 2016 3 次提交
  3. 27 9月, 2016 1 次提交
  4. 23 9月, 2016 2 次提交
    • P
      drm/i915/fbc: disable FBC on FIFO underruns · 61a585d6
      Paulo Zanoni 提交于
      Ever since I started working on FBC I was already aware that FBC can
      really amplify the FIFO underrun symptoms. On systems where FIFO
      underruns were harmless error messages, enabling FBC would cause the
      underruns to give black screens.
      
      We recently tried to enable FBC on Haswell and got reports of a system
      that would hang after some hours of uptime, and the first bad commit
      was the one that enabled FBC. We also observed that this system had
      FIFO underrun error messages on its dmesg. Although we don't have any
      evidence that fixing the underruns would solve the bug and make FBC
      work properly on this machine, IMHO it's better if we minimize the
      amount of possible problems by just giving up FBC whenever we detect
      an underrun.
      
      v2: New version, different implementation and commit message.
      v3: Clarify the fact that we run from an IRQ handler (Chris).
      v4: Also add the underrun_detected check at can_choose() to avoid
          misleading dmesg messages (DK).
      v5: Fix Engrish, use READ_ONCE on the unlocked read (Chris).
      
      Cc: Stefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Lyude <cpaul@redhat.com>
      Cc: stevenhoneyman@gmail.com <stevenhoneyman@gmail.com>
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Signed-off-by: NPaulo Zanoni <paulo.r.zanoni@intel.com>
      Reviewed-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1473773937-19758-1-git-send-email-paulo.r.zanoni@intel.com
      61a585d6
    • P
      drm/i915/dp: DP audio API changes for MST · f9318941
      Pandiyan, Dhinakaran 提交于
      DP MST provides the capability to send multiple video and audio streams
      through a single port. This requires the API's between i915 and audio
      drivers to distinguish between multiple audio capable displays that can be
      connected to a port. Currently only the port identity is shared in the
      APIs. This patch adds support for MST with an additional parameter
      'int pipe'. The existing parameter 'port' does not change it's meaning.
      
      pipe =
      	MST	: display pipe that the stream originates from
      	Non-MST	: -1
      
      Affected APIs:
      struct i915_audio_component_ops
      -       int (*sync_audio_rate)(struct device *, int port, int rate);
      +	int (*sync_audio_rate)(struct device *, int port, int pipe,
      +	     int rate);
      
      -       int (*get_eld)(struct device *, int port, bool *enabled,
      -                       unsigned char *buf, int max_bytes);
      +       int (*get_eld)(struct device *, int port, int pipe,
      +		       bool *enabled, unsigned char *buf, int max_bytes);
      
      struct i915_audio_component_audio_ops
      -       void (*pin_eld_notify)(void *audio_ptr, int port);
      +       void (*pin_eld_notify)(void *audio_ptr, int port, int pipe);
      
      This patch makes dummy changes in the audio drivers (thanks Libin) for
      build to succeed. The audio side drivers will send the right 'pipe' values
      for MST in patches that will follow.
      
      v2:
      Renamed the new API parameter from 'dev_id' to 'pipe'. (Jim, Ville)
      Included Asoc driver API compatibility changes from Jeeja.
      Added WARN_ON() for invalid pipe in get_saved_encoder(). (Takashi)
      Added comment for av_enc_map[] definition. (Takashi)
      
      v3:
      Fixed logic error introduced while renaming 'dev_id' as 'pipe' (Ville)
      Renamed get_saved_encoder() to get_saved_enc() to reduce line length
      
      v4:
      Rebased.
      Parameter check for pipe < -1 values in get_saved_enc() (Ville)
      Switched to for_each_pipe() in get_saved_enc() (Ville)
      Renamed 'pipe' to 'dev_id' in audio side code (Takashi)
      
      v5:
      Included a comment for the dev_id arg. (Libin)
      Signed-off-by: NDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: NTakashi Iwai <tiwai@suse.de>
      Reviewed-by: NVille Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: NRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1474488168-2343-1-git-send-email-dhinakaran.pandiyan@intel.com
      f9318941
  5. 22 9月, 2016 2 次提交
  6. 21 9月, 2016 2 次提交
    • C
      drm/i915: Only shrink the unbound objects during freeze · 6a800eab
      Chris Wilson 提交于
      At the point of creating the hibernation image, the runtime power manage
      core is disabled - and using the rpm functions triggers a warn.
      i915_gem_shrink_all() tries to unbind objects, which requires device
      access and so tries to how an rpm reference triggering a warning:
      
      [   44.235420] ------------[ cut here ]------------
      [   44.235424] WARNING: CPU: 2 PID: 2199 at drivers/gpu/drm/i915/intel_runtime_pm.c:2688 intel_runtime_pm_get_if_in_use+0xe6/0xf0
      [   44.235426] WARN_ON_ONCE(ret < 0)
      [   44.235445] Modules linked in: ctr ccm arc4 rt2800usb rt2x00usb rt2800lib rt2x00lib crc_ccitt mac80211 cmac cfg80211 btusb rfcomm bnep btrtl btbcm btintel bluetooth dcdbas x86_pkg_temp_thermal intel_powerclamp coretemp snd_hda_codec_realtek crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec_generic aesni_intel snd_hda_codec_hdmi aes_x86_64 lrw gf128mul snd_hda_intel glue_helper ablk_helper cryptd snd_hda_codec hid_multitouch joydev snd_hda_core binfmt_misc i2c_hid serio_raw snd_pcm acpi_pad snd_timer snd i2c_designware_platform 8250_dw nls_iso8859_1 i2c_designware_core lpc_ich mfd_core soundcore usbhid hid psmouse ahci libahci
      [   44.235447] CPU: 2 PID: 2199 Comm: kworker/u8:8 Not tainted 4.8.0-rc5+ #130
      [   44.235447] Hardware name: Dell Inc. XPS 13 9343/0310JH, BIOS A07 11/11/2015
      [   44.235450] Workqueue: events_unbound async_run_entry_fn
      [   44.235453]  0000000000000000 ffff8801b2f7fb98 ffffffff81306c2f ffff8801b2f7fbe8
      [   44.235454]  0000000000000000 ffff8801b2f7fbd8 ffffffff81056c01 00000a801f50ecc0
      [   44.235456]  ffff88020ce50000 ffff88020ce59b60 ffffffff81a60b5c ffffffff81414840
      [   44.235456] Call Trace:
      [   44.235459]  [<ffffffff81306c2f>] dump_stack+0x4d/0x6e
      [   44.235461]  [<ffffffff81056c01>] __warn+0xd1/0xf0
      [   44.235464]  [<ffffffff81414840>] ? i915_pm_suspend_late+0x30/0x30
      [   44.235465]  [<ffffffff81056c6f>] warn_slowpath_fmt+0x4f/0x60
      [   44.235468]  [<ffffffff814e73ce>] ? pm_runtime_get_if_in_use+0x6e/0xa0
      [   44.235469]  [<ffffffff81433526>] intel_runtime_pm_get_if_in_use+0xe6/0xf0
      [   44.235471]  [<ffffffff81458a26>] i915_gem_shrink+0x306/0x360
      [   44.235473]  [<ffffffff81343fd4>] ? pci_platform_power_transition+0x24/0x90
      [   44.235475]  [<ffffffff81414840>] ? i915_pm_suspend_late+0x30/0x30
      [   44.235476]  [<ffffffff81458dfb>] i915_gem_shrink_all+0x1b/0x30
      [   44.235478]  [<ffffffff814560b3>] i915_gem_freeze_late+0x33/0x90
      [   44.235479]  [<ffffffff81414877>] i915_pm_freeze_late+0x37/0x40
      [   44.235481]  [<ffffffff814e9b8e>] dpm_run_callback+0x4e/0x130
      [   44.235483]  [<ffffffff814ea5db>] __device_suspend_late+0xdb/0x1f0
      [   44.235484]  [<ffffffff814ea70f>] async_suspend_late+0x1f/0xa0
      [   44.235486]  [<ffffffff81077557>] async_run_entry_fn+0x37/0x150
      [   44.235488]  [<ffffffff8106f518>] process_one_work+0x148/0x3f0
      [   44.235490]  [<ffffffff8106f8eb>] worker_thread+0x12b/0x490
      [   44.235491]  [<ffffffff8106f7c0>] ? process_one_work+0x3f0/0x3f0
      [   44.235492]  [<ffffffff81074d09>] kthread+0xc9/0xe0
      [   44.235495]  [<ffffffff816e257f>] ret_from_fork+0x1f/0x40
      [   44.235496]  [<ffffffff81074c40>] ? kthread_park+0x60/0x60
      [   44.235497] ---[ end trace e438706b97c7f132 ]---
      
      Alternatively, to actually shrink everything we have to do so slightly
      earlier in the hibernation process.
      
      To keep lockdep silent, we need to take struct_mutex for the shrinker
      even though we know that we are the only user during the freeze.
      
      Fixes: 7aab2d53 ("drm/i915: Shrink objects prior to hibernation")
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160921135108.29574-2-chris@chris-wilson.co.uk
      6a800eab
    • B
      drm/i915: Cleanup instdone collection · d636951e
      Ben Widawsky 提交于
      Consolidate the instdone logic so we can get a bit fancier. This patch also
      removes the duplicated print of INSTDONE[0].
      
      v2: (Imre)
      - Rebased on top of hangcheck INSTDONE changes.
      - Move all INSTDONE registers into a single struct, store it within the
        engine error struct during error capturing.
      Signed-off-by: NBen Widawsky <ben@bwidawsk.net>
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Reviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1474379673-28326-1-git-send-email-imre.deak@intel.com
      d636951e
  7. 19 9月, 2016 1 次提交
  8. 15 9月, 2016 2 次提交
  9. 09 9月, 2016 6 次提交
    • C
      drm/i915: Prepare object synchronisation for asynchronicity · a2bc4695
      Chris Wilson 提交于
      We are about to specialize object synchronisation to enable nonblocking
      execbuf submission. First we make a copy of the current object
      synchronisation for execbuffer. The general i915_gem_object_sync() will
      be removed following the removal of CS flips in the near future.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJohn Harrison <john.c.harrison@intel.com>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-16-chris@chris-wilson.co.uk
      a2bc4695
    • C
      drm/i915: Update reset path to fix incomplete requests · 821ed7df
      Chris Wilson 提交于
      Update reset path in preparation for engine reset which requires
      identification of incomplete requests and associated context and fixing
      their state so that engine can resume correctly after reset.
      
      The request that caused the hang will be skipped and head is reset to the
      start of breadcrumb. This allows us to resume from where we left-off.
      Since this request didn't complete normally we also need to cleanup elsp
      queue manually. This is vital if we employ nonblocking request
      submission where we may have a web of dependencies upon the hung request
      and so advancing the seqno manually is no longer trivial.
      
      ABI: gem_reset_stats / DRM_IOCTL_I915_GET_RESET_STATS
      
      We change the way we count pending batches. Only the active context
      involved in the reset is marked as either innocent or guilty, and not
      mark the entire world as pending. By inspection this only affects
      igt/gem_reset_stats (which assumes implementation details) and not
      piglit.
      
      ARB_robustness gives this guide on how we expect the user of this
      interface to behave:
      
       * Provide a mechanism for an OpenGL application to learn about
         graphics resets that affect the context.  When a graphics reset
         occurs, the OpenGL context becomes unusable and the application
         must create a new context to continue operation. Detecting a
         graphics reset happens through an inexpensive query.
      
      And with regards to the actual meaning of the reset values:
      
         Certain events can result in a reset of the GL context. Such a reset
         causes all context state to be lost. Recovery from such events
         requires recreation of all objects in the affected context. The
         current status of the graphics reset state is returned by
      
      	enum GetGraphicsResetStatusARB();
      
         The symbolic constant returned indicates if the GL context has been
         in a reset state at any point since the last call to
         GetGraphicsResetStatusARB. NO_ERROR indicates that the GL context
         has not been in a reset state since the last call.
         GUILTY_CONTEXT_RESET_ARB indicates that a reset has been detected
         that is attributable to the current GL context.
         INNOCENT_CONTEXT_RESET_ARB indicates a reset has been detected that
         is not attributable to the current GL context.
         UNKNOWN_CONTEXT_RESET_ARB indicates a detected graphics reset whose
         cause is unknown.
      
      The language here is explicit in that we must mark up the guilty batch,
      but is loose enough for us to relax the innocent (i.e. pending)
      accounting as only the active batches are involved with the reset.
      
      In the future, we are looking towards single engine resetting (with
      minimal locking), where it seems inappropriate to mark the entire world
      as innocent since the reset occurred on a different engine. Reducing the
      information available means we only have to encounter the pain once, and
      also reduces the information leaking from one context to another.
      
      v2: Legacy ringbuffer submission required a reset following hibernation,
      or else we restore stale values to the RING_HEAD and walked over
      stolen garbage.
      
      v3: GuC requires replaying the requests after a reset.
      
      v4: Restore engine IRQ after reset (so waiters will be woken!)
          Rearm hangcheck if resetting with a waiter.
      
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      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/20160909131201.16673-13-chris@chris-wilson.co.uk
      821ed7df
    • C
      drm/i915: Replace wait-on-mutex with wait-on-bit in reset worker · 780f262a
      Chris Wilson 提交于
      Since we have a cooperative mode now with a direct reset, we can avoid
      the contention on struct_mutex and instead try then sleep on the
      I915_RESET_IN_PROGRESS bit. If the mutex is held and that bit is
      cleared, all is fine. Otherwise, we sleep for a bit and try again. In
      the worst case we sleep for an extra second waiting for the mutex to be
      released (no one touching the GPU is allowed the struct_mutex whilst the
      I915_RESET_IN_PROGRESS bit is set). But when we have a direct reset,
      this allows us to clean up the reset worker faster.
      
      v2: Remember to call wake_up_bit() after changing (for the faster wakeup
      as promised)
      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/20160909131201.16673-12-chris@chris-wilson.co.uk
      780f262a
    • C
      drm/i915: Perform a direct reset of the GPU from the waiter · 221fe799
      Chris Wilson 提交于
      If a waiter is holding the struct_mutex, then the reset worker cannot
      reset the GPU until the waiter returns. We do not want to return -EAGAIN
      form i915_wait_request as that breaks delicate operations like
      i915_vma_unbind() which often cannot be restarted easily, and returning
      -EIO is just as useless (and has in the past proven dangerous). The
      remaining WARN_ON(i915_wait_request) serve as a valuable reminder that
      handling errors from an indefinite wait are tricky.
      
      We can keep the current semantic that knowing after a reset is complete,
      so is the request, by performing the reset ourselves if we hold the
      mutex.
      
      uevent emission is still handled by the reset worker, so it may appear
      slightly out of order with respect to the actual reset (and concurrent
      use of the device).
      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/20160909131201.16673-11-chris@chris-wilson.co.uk
      221fe799
    • C
      drm/i915: Expand bool interruptible to pass flags to i915_wait_request() · ea746f36
      Chris Wilson 提交于
      We need finer control over wakeup behaviour during i915_wait_request(),
      so expand the current bool interruptible to a bitmask.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: NJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-9-chris@chris-wilson.co.uk
      ea746f36
    • C
      drm/i915: Separate out reset flags from the reset counter · 8af29b0c
      Chris Wilson 提交于
      In preparation for introducing a per-engine reset, we can first separate
      the mixing of the reset state from the global reset counter.
      
      The loss of atomicity in updating the reset state poses a small problem
      for handling the waiters. For requests, this is solved by advancing the
      seqno so that a waiter waking up after the reset knows the request is
      complete. For pending flips, we still rely on the increment of the
      global reset epoch (as well as the reset-in-progress flag) to signify
      when the hardware was reset.
      
      The advantage, now that we do not inspect the reset state during reset
      itself i.e. we no longer emit requests during reset, is that we can use
      the atomic updates of the state flags to ensure that only one reset
      worker is active.
      
      v2: Mika spotted that I transformed the i915_gem_wait_for_error() wakeup
      into a waiter wakeup.
      Signed-off-by: NChris Wilson <chris@chris-wilson.co.uk>
      Cc: Arun Siluvery <arun.siluvery@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1470414607-32453-6-git-send-email-arun.siluvery@linux.intel.comReviewed-by: NMika Kuoppala <mika.kuoppala@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/20160909131201.16673-7-chris@chris-wilson.co.uk
      8af29b0c
  10. 08 9月, 2016 15 次提交
  11. 07 9月, 2016 1 次提交
  12. 02 9月, 2016 4 次提交
    • I
      drm/i915: sseu: Convert subslice count fields to subslice mask · 57ec171e
      Imre Deak 提交于
      In an upcoming patch we'll need the actual mask of subslices in addition
      to their count, so convert the subslice_per_slice field to a mask.
      Also we can easily calculate subslice_total from the other fields, so
      instead of storing a cached version of this, add a helper to calculate
      it.
      
      v2:
      - Use hweight8() on u8 typed vars instead of hweight32(). (Ben)
      
      Reviewed-by: Robert Bragg <robert@sixbynine.org> (v1)
      Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Tested-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      57ec171e
    • I
      drm/i915: sseu: Convert slice count field to mask · f08a0c92
      Imre Deak 提交于
      In an upcoming patch we'll need the actual mask of slices in addition to
      their count, so replace the count field with a mask.
      
      v2:
      - Use hweight8() on u8 typed vars instead of hweight32(). (Ben)
      
      Reviewed-by: Robert Bragg <robert@sixbynine.org> (v1)
      Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Tested-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-5-git-send-email-imre.deak@intel.com
      f08a0c92
    • I
      drm/i915: sseu: Use sseu_dev_info in device info · 43b67998
      Imre Deak 提交于
      Move all slice/subslice/eu related properties to the sseu_dev_info
      struct.
      
      No functional change.
      
      v2:
      - s/info/sseu/ based on the new struct name. (Ben)
      
      Reviewed-by: Robert Bragg <robert@sixbynine.org> (v1)
      Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Tested-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      43b67998
    • I
      drm/i915: sseu: Move sseu_dev_status to i915_drv.h · 915490d5
      Imre Deak 提交于
      The data in this struct is provided both by getting the
      slice/subslice/eu features available on a given platform and the actual
      runtime state of these same features which depends on the HW's current
      power saving state.
      
      Atm members of this struct are duplicated in sseu_dev_status and
      intel_device_info. For clarity and code reuse we can share one struct
      for both of the above purposes. This patch only moves the struct to the
      header file, the next patch will convert users of intel_device_info to
      use this struct too.
      
      Instead of unsigned int u8 is used now, which is big enough and is used
      anyway in intel_device_info.
      
      No functional change.
      
      v2:
      - s/stat/sseu/ based on the new struct name (Ben)
      
      Reviewed-by: Robert Bragg <robert@sixbynine.org> (v1)
      Reviewed-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Tested-by: Ben Widawsky <benjamin.widawsky@intel.com> (v1)
      Signed-off-by: NImre Deak <imre.deak@intel.com>
      Link: http://patchwork.freedesktop.org/patch/msgid/1472659987-10417-2-git-send-email-imre.deak@intel.com
      915490d5