1. 10 Nov, 2017 6 commits
    • Chris Wilson's avatar
      drm/i915/selftests: Initialise mock_i915->mm.obj_lock · 9511ce1c
      Chris Wilson authored
      lockdep spotted that the mock tests were using the i915->mm.obj_lock
      without first initialiasing it:
      
      >[ 1303.217043] [IGT] drv_selftest: starting subtest mock_objects
      <4>[ 1303.240898] Setting dangerous option mock_selftests - tainting kernel
      <6>[ 1303.253665] i915: Performing mock selftests with st_random_seed=0xd87ea6c6 st_timeout=1000
      <4>[ 1303.254812] INFO: trying to register non-static key.
      <4>[ 1303.254816] the code is fine but needs lockdep annotation.
      <4>[ 1303.254818] turning off the locking correctness validator.
      <4>[ 1303.254820] CPU: 4 PID: 13112 Comm: drv_selftest Tainted: G     U  W       4.14.0-rc8-CI-Patchwork_7058+ #1
      <4>[ 1303.254823] Hardware name: MSI MS-7924/Z97M-G43(MS-7924), BIOS V1.12 02/15/2016
      <4>[ 1303.254825] Call Trace:
      <4>[ 1303.254829]  dump_stack+0x68/0x9f
      <4>[ 1303.254832]  register_lock_class+0x3fd/0x580
      <4>[ 1303.254835]  ? ___slab_alloc.constprop.29+0x157/0x3d0
      <4>[ 1303.254837]  ? ___slab_alloc.constprop.29+0x157/0x3d0
      <4>[ 1303.254840]  ? sg_kmalloc+0x1e/0x50
      <4>[ 1303.254842]  ? debug_smp_processor_id+0x17/0x20
      <4>[ 1303.254845]  __lock_acquire+0xa4/0x1b00
      <4>[ 1303.254884]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
      <4>[ 1303.254887]  ? __this_cpu_preempt_check+0x13/0x20
      <4>[ 1303.254889]  ? sg_kmalloc+0x1e/0x50
      <4>[ 1303.254891]  lock_acquire+0xb0/0x200
      <4>[ 1303.254893]  ? lock_acquire+0xb0/0x200
      <4>[ 1303.254917]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
      <4>[ 1303.254920]  _raw_spin_lock+0x32/0x50
      <4>[ 1303.254944]  ? __i915_gem_object_set_pages+0x116/0x1f0 [i915]
      <4>[ 1303.254967]  __i915_gem_object_set_pages+0x116/0x1f0 [i915]
      <4>[ 1303.254991]  i915_gem_object_get_pages_phys+0x286/0x2b0 [i915]
      <4>[ 1303.255015]  ____i915_gem_object_get_pages+0x20/0x60 [i915]
      <4>[ 1303.255039]  i915_gem_object_attach_phys+0x137/0x1a0 [i915]
      <4>[ 1303.255063]  igt_phys_object+0x45/0x120 [i915]
      <4>[ 1303.255094]  __i915_subtests+0x40/0xd0 [i915]
      <4>[ 1303.255099]  ? work_on_cpu_safe+0x60/0x60
      <4>[ 1303.255131]  i915_gem_object_mock_selftests+0x34/0x50 [i915]
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171110151919.18451-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      9511ce1c
    • Chris Wilson's avatar
      drm/i915: Restore the wait for idle engine after flushing interrupts · 30b29406
      Chris Wilson authored
      So it appears that commit 5427f207 ("drm/i915: Bump wait-times for
      the final CS interrupt before parking") was a little over optimistic in
      its belief that it had successfully waited for all residual activity on
      the engines before parking. Numerous sightings in CI since then of
      
      <7>[   52.542886] [IGT] core_auth: executing
      <3>[   52.561013] [drm:intel_engines_park [i915]] *ERROR* vcs0 is not idle before parking
      <7>[   52.561215] intel_engines_park vcs0
      <7>[   52.561229] intel_engines_park 	current seqno 98, last 98, hangcheck 0 [-247449 ms], inflight 0
      <7>[   52.561238] intel_engines_park 	Reset count: 0
      <7>[   52.561266] intel_engines_park 	Requests:
      <7>[   52.561363] intel_engines_park 	RING_START: 0x00000000 [0x00000000]
      <7>[   52.561377] intel_engines_park 	RING_HEAD:  0x00000000 [0x00000000]
      <7>[   52.561390] intel_engines_park 	RING_TAIL:  0x00000000 [0x00000000]
      <7>[   52.561406] intel_engines_park 	RING_CTL:   0x00000000
      <7>[   52.561422] intel_engines_park 	RING_MODE:  0x00000200 [idle]
      <7>[   52.561442] intel_engines_park 	ACTHD:  0x00000000_00000000
      <7>[   52.561459] intel_engines_park 	BBADDR: 0x00000000_00000000
      <7>[   52.561474] intel_engines_park 	Execlist status: 0x00000301 00000000
      <7>[   52.561489] intel_engines_park 	Execlist CSB read 5 [5 cached], write 5 [5 from hws], interrupt posted? no
      <7>[   52.561500] intel_engines_park 		ELSP[0] idle
      <7>[   52.561510] intel_engines_park 		ELSP[1] idle
      <7>[   52.561519] intel_engines_park 		HW active? 0x0
      <7>[   52.561608] intel_engines_park Idle? yes
      <7>[   52.561617] intel_engines_park
      
      on Braswell, which indicates that the engine just needs that little bit
      longer after flushing the tasklet to settle. So give it a few more
      milliseconds before declaring an err and applying the emergency brake.
      
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103479Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171110112550.28909-1-chris@chris-wilson.co.ukReviewed-by: default avatarMika Kuoppala <mika.kuoppala@linux.intel.com>
      30b29406
    • Hans de Goede's avatar
      drm/i915: Acquire PUNIT->PMIC bus for intel_uncore_forcewake_reset() · a5266db4
      Hans de Goede authored
      intel_uncore_forcewake_reset() does forcewake puts and gets as such
      we need to make sure that no-one tries to access the PUNIT->PMIC bus
      (on systems where this bus is shared) while it runs, otherwise bad
      things happen.
      
      Normally this is taken care of by the i915_pmic_bus_access_notifier()
      which does an intel_uncore_forcewake_get(FORCEWAKE_ALL) when some other
      driver tries to access the PMIC bus, so that later forcewake gets are
      no-ops (for the duration of the bus access).
      
      But intel_uncore_forcewake_reset gets called in 3 cases:
      1) Before registering the pmic_bus_access_notifier
      2) After unregistering the pmic_bus_access_notifier
      3) To reset forcewake state on a GPU reset
      
      In all 3 cases the i915_pmic_bus_access_notifier() protection is
      insufficient.
      
      This commit fixes this race by calling iosf_mbi_punit_acquire() before
      calling intel_uncore_forcewake_reset(). In the case where it is called
      directly after unregistering the pmic_bus_access_notifier, we need to
      hold the punit-lock over both calls to avoid a race where
      intel_uncore_fw_release_timer() may execute between the 2 calls.
      Reviewed-by: default avatarImre Deak <imre.deak@intel.com>
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171019111620.26761-3-hdegoede@redhat.com
      a5266db4
    • Hans de Goede's avatar
      x86/platform/intel/iosf_mbi: Add unlocked PMIC bus access notifier unregister · af0ab55f
      Hans de Goede authored
      For race free unregistration drivers may need to acquire PMIC bus access
      through iosf_mbi_punit_acquire() and then (un)register the notifier without
      dropping the lock.
      
      This commit adds an unlocked variant of
      iosf_mbi_unregister_pmic_bus_access_notifier for this use case.
      Acked-by: default avatarIngo Molnar <mingo@kernel.org>
      Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171019111620.26761-2-hdegoede@redhat.com
      af0ab55f
    • Chris Wilson's avatar
      drm/i915: Move irqs enabled assertion deeper for mock breadcrumbs · c16c4ba7
      Chris Wilson authored
      In order to allow the mock breadcrumbs tests to run without device irqs
      being enabled, move the intel_irqs_enabled() assert deeper to just
      before we commit to enabling the HW irq.
      
      v2: Add a FIXME explaining that placing the assertion so deep is not
      ideal, but a compromise for mock breadcrumbs.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107102003.1802-1-chris@chris-wilson.co.ukReviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      c16c4ba7
    • Chris Wilson's avatar
      drm/i915/selftests: Reduce the volume of the timeout message · b1a1e5d2
      Chris Wilson authored
      Originally it was anticipated that timeouts would be a rare event, and
      so merit a warning that the test was incomplete. However, for igt we
      keep the timeout low, and hitting the timeout is intentional. It no
      longer necessitates a warning, but to be expected.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.auld@intel.com>
      Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171110101110.12042-1-chris@chris-wilson.co.ukReviwed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      Reviewed-by: default avatarJoonas Lahtinen <joonas.lahtinen@linux.intel.com>
      b1a1e5d2
  2. 09 Nov, 2017 16 commits
  3. 08 Nov, 2017 10 commits
  4. 07 Nov, 2017 8 commits
    • Chris Wilson's avatar
      drm/i915/selftests: Take rpm wakeref around partial tiling tests · 693b1cca
      Chris Wilson authored
      Since the partial tiling tests are poking into the GGTT to watch the
      fence registers in operation, it itself needs the device rpm wakeref in
      order for the GGTT to remain accessible.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107115653.10716-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      693b1cca
    • Chris Wilson's avatar
      drm/i915/selftests: Take rpm wakeref around GGTT lowlevel tests · c29ccb9f
      Chris Wilson authored
      The vma routines are responsible for acquiring the device rpm wakeref
      before they poke the HW. However, some of the selftests bypass the
      higher level vma routines in order to poke directly at the lowlevel GGTT
      functions; these are then responsible for managing rpm themselves.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107114051.10583-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.auld@intel.com>
      c29ccb9f
    • Chris Wilson's avatar
      drm/i915/selftests: Skip mixed page exhaustion if only small pages available · f6d03042
      Chris Wilson authored
      If we only have 4k pages, we can't mix together different combinations
      of hugepages to see if the world burns. However, as the loops did
      nothing, we never set err to 0 and reported ENODEV aborting the test.
      Teach the test to skip instead.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107110559.6098-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
      f6d03042
    • Chris Wilson's avatar
      drm/i915: Prevent unbounded wm results in g4x_compute_wm() · 1a1f1287
      Chris Wilson authored
      Smatch warns of
      
      drivers/gpu/drm/i915/intel_pm.c:1161 g4x_compute_wm() warn: signedness bug returning '(-33554430)'
      
      which is a result of it believing that wm may be INT_MAX following
      g4x_tlb_miss_wa(). Just declaring g4x_tlb_miss_wa() as returning an
      unsigned integer is not sufficient, we need to tell smatch that wm itself
      is unsigned for it to not worry. So mark up the locals we expect to be
      non-negative, and so silence smatch.
      
      v2: Mark up vlv_compute_wm_level() as unsigned similarly.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dan Carpenter <dan.carpenter@oracle.com>
      Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> #v1
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107140338.13748-1-chris@chris-wilson.co.uk
      1a1f1287
    • Chris Wilson's avatar
      drm/i915: Simplify onion for bxt_ddi_phy_init() · 0e870bf8
      Chris Wilson authored
      Older compilers (gcc-4.9) are not as able to track uninitialised
      variables as well as more recent compilers. In particular,
      
      drivers/gpu/drm/i915/intel_dpio_phy.c: In function ‘bxt_ddi_phy_init’:
      drivers/gpu/drm/i915/intel_dpio_phy.c:482:25: warning: ‘was_enabled’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      
      In this case, we can rearrange code slightly to make the control flow
      clearer to the reader, as well as the compiler. That is we only call
      uninit using the same predicate as calling init
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107135324.28300-1-chris@chris-wilson.co.ukReviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
      0e870bf8
    • Chris Wilson's avatar
      drm/i915: Silence compiler for csr_load_work_fn() · 2f59f1b3
      Chris Wilson authored
      gcc-4.7 is not very smart and can not tell that "si" is guarded by size
      being 0. So it complains,
      
      drivers/gpu/drm/i915/intel_csr.c: In function ‘csr_load_work_fn’:
      drivers/gpu/drm/i915/intel_csr.c:204:3: warning: ‘si’ may be used uninitialized in this function [-Wmaybe-uninitialized]
      drivers/gpu/drm/i915/intel_csr.c:190:30: note: ‘si’ was declared in
      
      Give in and mark si as NULL.
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Anusha Srivatsa <anusha.srivatsa@intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107145334.27154-1-chris@chris-wilson.co.ukReviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
      Reviewed-by: default avatarMichal Wajdeczko <michal.wajdeczko@intel.com>
      2f59f1b3
    • Chris Wilson's avatar
      drm/i915: Silence smatch for cmdparser · 0ffba1fc
      Chris Wilson authored
      drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:808:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:811:23: error: not an lvalue
      drivers/gpu/drm/i915/i915_cmd_parser.c:814:23: error: not an lvalue
      
      If we move the shift into each case not only do we kill the warning from
      smatch, but we shrink the code slightly:
      
         text	   data	    bss	    dec	    hex	filename
      1267906	  20587	   3168	1291661	 13b58d	before
      1267890	  20587	   3168	1291645	 13b57d	after
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
      Cc: Matthew Auld <matthew.william.auld@gmail.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171107154055.19460-1-chris@chris-wilson.co.ukReviewed-by: default avatarMatthew Auld <matthew.william.auld@gmail.com>
      Reviewed-by: default avatarGabriel Krisman Bertazi <krisman@collabora.co.uk>
      0ffba1fc
    • Chris Wilson's avatar
      drm/i915: Deconstruct struct sgt_dma initialiser · 5684514b
      Chris Wilson authored
      gcc-4.4 complains about:
      
      	struct sgt_dma iter = {
      		.sg = vma->pages->sgl,
      		.dma = sg_dma_address(iter.sg),
      		.max = iter.dma + iter.sg->length,
      	};
      
      drivers/gpu/drm/i915/i915_gem_gtt.c: In function ‘gen8_ppgtt_insert_4lvl’:
      drivers/gpu/drm/i915/i915_gem_gtt.c:938: error: ‘iter.sg’ is used uninitialized in this function
      drivers/gpu/drm/i915/i915_gem_gtt.c:939: error: ‘iter.dma’ is used uninitialized in this function
      
      and worse generates invalid code that triggers a GPF:
      
      BUG: unable to handle kernel NULL pointer dereference at 0000000000000010
      IP: gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915]
      PGD 0
      Oops: 0000 [#1] SMP
      Modules linked in: snd_aloop nf_conntrack_ipv6 nf_defrag_ipv6 nf_log_ipv6 ip6table_filter ip6_tables ctr ccm xt_state nf_log_ipv4
      nf_log_common xt_LOG xt_limit xt_recent xt_owner xt_addrtype iptable_filter ipt_MASQUERADE nf_nat_masquerade_ipv4 iptable_nat
      nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat nf_conntrack libcrc32c ip_tables dm_mod vhost_net macvtap macvlan vhost tun kvm_intel kvm
      irqbypass uas usb_storage hid_multitouch btusb btrtl uvcvideo videobuf2_v4l2 videobuf2_core videodev media videobuf2_vmalloc videobuf2_memops
      sg ppdev dell_wmi sparse_keymap mei_wdt sd_mod iTCO_wdt iTCO_vendor_support rtsx_pci_ms memstick rtsx_pci_sdmmc mmc_core dell_smm_hwmon hwmon
      dell_laptop dell_smbios dcdbas joydev input_leds hci_uart btintel btqca btbcm bluetooth parport_pc parport i2c_hid
        intel_lpss_acpi intel_lpss pcspkr wmi int3400_thermal acpi_thermal_rel dell_rbtn mei_me mei snd_hda_codec_hdmi snd_hda_codec_realtek
      snd_hda_codec_generic ahci libahci acpi_pad xhci_pci xhci_hcd snd_hda_intel snd_hda_codec snd_hda_core snd_hwdep snd_seq snd_seq_device
      snd_pcm snd_timer snd soundcore int3403_thermal arc4 e1000e ptp pps_core i2c_i801 iwlmvm mac80211 rtsx_pci iwlwifi cfg80211 rfkill
      intel_pch_thermal processor_thermal_device int340x_thermal_zone intel_soc_dts_iosf i915 video fjes
      CPU: 2 PID: 2408 Comm: X Not tainted 4.10.0-rc5+ #1
      Hardware name: Dell Inc. Latitude E7470/0T6HHJ, BIOS 1.11.3 11/09/2016
      task: ffff880219fe4740 task.stack: ffffc90005f98000
      RIP: 0010:gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915]
      RSP: 0018:ffffc90005f9b8c8 EFLAGS: 00010246
      RAX: 0000000000000000 RBX: ffff8802167d8000 RCX: 0000000000000001
      RDX: 00000000ffff7000 RSI: ffff880219f94140 RDI: ffff880228444000
      RBP: ffffc90005f9b948 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000000080
      R13: 0000000000000001 R14: ffffc90005f9bcd7 R15: ffff88020c9a83c0
      FS:  00007fb53e1ee920(0000) GS:ffff88024dd00000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 0000000000000010 CR3: 000000022ef95000 CR4: 00000000003406e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
      Call Trace:
        ppgtt_bind_vma+0x40/0x50 [i915]
        i915_vma_bind+0xcb/0x1c0 [i915]
        __i915_vma_do_pin+0x6e/0xd0 [i915]
        i915_gem_execbuffer_reserve_vma+0x162/0x1d0 [i915]
        i915_gem_execbuffer_reserve+0x4fc/0x510 [i915]
        ? __kmalloc+0x134/0x250
        ? i915_gem_wait_for_error+0x25/0x100 [i915]
        ? i915_gem_wait_for_error+0x25/0x100 [i915]
        i915_gem_do_execbuffer+0x2df/0xa00 [i915]
        ? drm_malloc_gfp.clone.0+0x42/0x80 [i915]
        ? path_put+0x22/0x30
        ? __check_object_size+0x62/0x1f0
        ? terminate_walk+0x44/0x90
        i915_gem_execbuffer2+0x95/0x1e0 [i915]
        drm_ioctl+0x243/0x490
        ? handle_pte_fault+0x1d7/0x220
        ? i915_gem_do_execbuffer+0xa00/0xa00 [i915]
        ? handle_mm_fault+0x10d/0x2a0
        vfs_ioctl+0x18/0x30
        do_vfs_ioctl+0x14b/0x3f0
        SyS_ioctl+0x92/0xa0
        entry_SYSCALL_64_fastpath+0x1a/0xa9
      RIP: 0033:0x7fb53b4fcb77
      RSP: 002b:00007ffe0c572898 EFLAGS: 00003246 ORIG_RAX: 0000000000000010
      RAX: ffffffffffffffda RBX: 00007fb53e17c038 RCX: 00007fb53b4fcb77
      RDX: 00007ffe0c572900 RSI: 0000000040406469 RDI: 000000000000000b
      RBP: 00007fb5376d67e0 R08: 0000000000000000 R09: 0000000000000000
      R10: 0000000000000028 R11: 0000000000003246 R12: 0000000000000000
      R13: 0000000000000000 R14: 000055eecb314d00 R15: 000055eecb315460
      Code: 0f 84 5d ff ff ff eb a2 0f 1f 84 00 00 00 00 00 55 48 89 e5 41 57 41 56 41 55 41 54 53 48 83 ec 58 0f 1f 44 00 00 31 c0 89 4d b0 <4c>
      8b 60 10 44 8b 70 0c 48 89 d0 4c 8b 2e 48 c1 e8 27 25 ff 01
      RIP: gen8_ppgtt_insert_4lvl+0x1b/0x1e0 [i915] RSP: ffffc90005f9b8c8
      CR2: 0000000000000010
      
      Recent gccs, such as 4.9, 6.3 or 7.2, do not generate the warning nor do
      they explode on use. If we manually create the struct using locals from
      the stack, this should eliminate this issue, and does not alter code
      generation with gcc-7.2.
      
      Fixes: 894ccebe ("drm/i915: Micro-optimise gen8_ppgtt_insert_entries()")
      Reported-by: default avatarKelly French <kfrench@federalhill.net>
      Signed-off-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Cc: Kelly French <kfrench@federalhill.net>
      Cc: Mika Kuoppala <mika.kuoppala@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20171106211128.12538-1-chris@chris-wilson.co.ukTested-by: default avatarKelly French <kfrench@federalhill.net>
      Reviewed-by: default avatarTvrtko Ursulin <tvrtko.ursulin@intel.com>
      5684514b