Chris Wilson
c4d4c1c66b
drm/i915: Flush the freed object queue on device release
...
As dmabufs may live beyond the PCI device removal, we need to flush the
freed object worker on device release, and include a warning in case
there is a leak.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-3-chris@chris-wilson.co.uk
2017-02-10 19:10:05 +00:00
Chris Wilson
94d4a2a9ae
drm/i915: Unbind any residual objects/vma from the Global GTT on shutdown
...
We may unload the PCI device before all users (such as dma-buf) are
completely shutdown. This may leave VMA in the global GTT which we want
to revoke, whilst keeping the objects themselves around to service the
dma-buf.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-2-chris@chris-wilson.co.uk
2017-02-10 19:10:05 +00:00
Chris Wilson
cad3688ff0
drm/i915: Split device release from unload
...
We may need to keep our memory management alive after we have unloaded
the physical pci device. For example, if we have exported an object via
dmabuf, that will keep the device around but the pci device may be
removed before the dmabuf itself is released, use of the pci hardware
will be revoked, but the memory and object management needs to persist
for the dmabuf.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170210163523.17533-1-chris@chris-wilson.co.uk
2017-02-10 19:10:05 +00:00
Lyude
317eaa9508
drm/i915/debugfs: Add i915_hpd_storm_ctl
...
This adds a file in i915's debugfs directory that allows userspace to
manually control HPD storm detection. This is mainly for hotplugging
tests, where we might want to test HPD storm functionality or disable
storm detection to speed up hotplugging tests without breaking anything.
Changes since v1:
- Make HPD storm interval configurable
- Misc code cleanup
Signed-off-by: Lyude <lyude@redhat.com >
Acked-by: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Tomeu Vizoso <tomeu@tomeuvizoso.net >
2017-02-10 14:04:00 -05:00
Samuel Pitoiset
a73effaf58
drm/amdgpu: use amdgpu_gem_va_check() in amdgpu_gem_va_update_vm()
...
This removes code duplication.
Reviewed-by: Chunming Zhou <david1.zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-10 12:07:33 -05:00
Alex Deucher
4ce3bd45b3
drm/amdgpu: add more cases to DCE11 possible crtc mask setup
...
Add cases for asics with 3 and 5 crtcs. Fixes an artificial
limitation on asics with 3 or 5 crtcs.
Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=99744
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2017-02-10 12:07:33 -05:00
Ville Syrjälä
6401c37dbd
drm/i915: Simplify platform checks in intel_fb_pitch_limit()
...
Replace the VLV/CHV check with a HAS_GMCH_DISPLAY check in
intel_fb_pitch_limit(), because it's shorter.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170208175328.11064-1-ville.syrjala@linux.intel.com
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.com >
2017-02-10 18:44:53 +02:00
Ville Syrjälä
d158694f45
drm/i915: Avoid spurious WARNs about the wrong pipe in the PPS code
...
Until recently vlv_steal_power_sequencer() wasn't being called for
normal DP ports, and hence it could assert that it should only be
called for pipe A and B (since pipe C doesn't support eDP). However
that changed when we started to consider normal DP ports as well when
choosing a PPS. So we will now get spurious warnings when
vlv_steal_power_sequencer() does get called for pipe C. Avoid this by
moving the WARN down into vlv_detach_power_sequencer() where this
assertion should still hold.
Cc: Imre Deak <imre.deak@intel.com >
Cc: stable@vger.kernel.org
Fixes: 9f2bdb006a
("drm/i915: Prevent PPS stealing from a normal DP port on VLV/CHV")
References: https://bugs.freedesktop.org/show_bug.cgi?id=95287
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170208175254.10958-1-ville.syrjala@linux.intel.com
Reviewed-by: Imre Deak <imre.deak@intel.com >
2017-02-10 18:44:18 +02:00
Daniel Vetter
51a831a772
Merge remote-tracking branch 'airlied/drm-next' into drm-intel-next-queued
...
Chris Wilson needs the new drm_driver->release callback to make sure
the shiny new dma-buf testcases don't oops the driver on unload.
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
2017-02-10 16:27:24 +01:00
Chris Wilson
4f4631af8f
drm/i915/byt: Take powerwell for reading PIPESTAT in debugfs
...
[12493.693827] WARNING: CPU: 1 PID: 14860 at drivers/gpu/drm/i915/intel_uncore.c:795 __unclaimed_reg_debug+0x5d/0x80 [i915]
[12493.693868] Unclaimed read from register 0x1f0024
[12493.693905] Modules linked in: vgem i915 drm_kms_helper drm intel_gtt i2c_algo_bit syscopyarea sysfillrect sysimgblt fb_sys_fops prime_numbers intel_powerclamp crct10dif_pclmul crc32_pclmul crc32c_intel ghash_clmulni_intel cryptd lpc_ich i2c_i801 mfd_core video i2c_designware_platform i2c_designware_core i2c_core button autofs4 sd_mod ahci libahci libata scsi_mod [last unloaded: i915]
[12493.694039] CPU: 1 PID: 14860 Comm: intel-gpu-overl Tainted: G U 4.10.0-rc7+ #11
[12493.694079] Hardware name: GIGABYTE GB-BXBT-1900/MZBAYAB-00, BIOS F8 03/02/2016
[12493.694121] Call Trace:
[12493.694169] dump_stack+0x67/0x9d
[12493.694235] __warn+0x117/0x140
[12493.694288] warn_slowpath_fmt+0x4f/0x60
[12493.694344] ? do_raw_spin_lock+0x116/0x180
[12493.694533] ? check_for_unclaimed_mmio+0x98/0xe0 [i915]
[12493.694727] __unclaimed_reg_debug+0x5d/0x80 [i915]
[12493.694923] fwtable_read32+0x2c5/0x330 [i915]
[12493.695108] i915_interrupt_info+0xd52/0xf80 [i915]
[12493.695302] ? gen6_write16+0x310/0x310 [i915]
[12493.695357] seq_read+0x187/0x710
[12493.695412] full_proxy_read+0x75/0xc0
[12493.695472] __vfs_read+0x5a/0x220
[12493.695524] ? kmem_cache_free+0x6c/0x260
[12493.695577] ? putname+0x97/0xa0
[12493.695629] ? putname+0x97/0xa0
[12493.695682] ? rcu_read_lock_sched_held+0xb8/0xd0
[12493.695735] ? rw_verify_area+0x65/0x140
[12493.695787] vfs_read+0xd1/0x1f0
[12493.695840] SyS_read+0x62/0xc0
[12493.695893] entry_SYSCALL_64_fastpath+0x1c/0xb1
[12493.695943] RIP: 0033:0x7f82dca99ba0
[12493.695985] RSP: 002b:00007ffc0bdfd4f8 EFLAGS: 00000246 ORIG_RAX: 0000000000000000
[12493.696031] RAX: ffffffffffffffda RBX: 00007ffc0be005a0 RCX: 00007f82dca99ba0
[12493.696073] RDX: 0000000000001fff RSI: 00007ffc0bdfd500 RDI: 000000000000001a
[12493.696115] RBP: ffffffff810fb639 R08: 302f6972642f6775 R09: 00007f82dca0999a
[12493.696157] R10: 00007f82dcd62760 R11: 0000000000000246 R12: ffff880069a17f98
[12493.696199] R13: 00007ffc0bdfd428 R14: 0000000000000003 R15: 00007ffc0bdfd428
[12493.696250] ? trace_hardirqs_off_caller+0xd9/0x130
[12493.696300] ---[ end trace 52ccf4d39793cc59 ]---
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=99761
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/20170210133632.16946-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-02-10 14:00:13 +00:00
Chris Wilson
72b72ae473
drm/i915: Always pin contexts into the high GGTT
...
Now that we have fast top-down insertion into the drm_mm, we can use it
for frequent runtime operations like insertion of the context object,
whereas before we limited it to the one-off insertion of the pinned
kernel context. Keeping the active context objects out of the mappable
region of the global GTT (except under memory pressure) improves our
ability to allocate mappable aperture region without triggering a GPU
stall.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170210101422.1598-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-02-10 13:58:40 +00:00
Ander Conselvan de Oliveira
370a81fb89
drm/i915: Remove unused function intel_ddi_get_link_dpll()
...
The function intel_ddi_get_link_dpll() was added in f169660ed4
("drm/i915/dp: Add a standalone function to obtain shared dpll for
HSW/BDW/SKL/BXT") to "allow for the implementation of a platform
neutral upfront link training function", but such implementation
never landed.
So remove that function and clean up the exported shared DPLL interface.
Fixes: f169660ed4
("drm/i915/dp: Add a standalone function to obtain shared dpll for HSW/BDW/SKL/BXT")
Cc: Durgadoss R <durgadoss.r@intel.com >
Cc: Manasi Navare <manasi.d.navare@intel.com >
Cc: Jim Bride <jim.bride@linux.intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: intel-gfx@lists.freedesktop.org
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Acked-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1484310032-1863-1-git-send-email-ander.conselvan.de.oliveira@intel.com
2017-02-10 11:40:27 +02:00
Ander Conselvan de Oliveira
d8fc70b736
drm/i915: Make power domain masks 64 bit long
...
There are currently 30 power domains, which puts us pretty close to the
limit with 32 bit masks. Prepare for the future and increase the limit
to 64 bit.
v2: Rebase
v3: s/unsigned long long/u64/ (Joonas)
Allow the 64th bit of the mask to be used. (Joonas)
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170209093121.24410-1-ander.conselvan.de.oliveira@intel.com
2017-02-10 11:22:17 +02:00
Changbin Du
7e5f3d3086
drm/i915/gvt: fix crash at function release_shadow_wa_ctx
...
In function dispatch_workload(), if it fail before calling
intel_gvt_scan_and_shadow_wa_ctx(), the indirect ctx will
not be shadowed so no cleaup need. wa_ctx->indirect_ctx.obj
indicate whether indirect_ctx is shadowed. The obj is null
if it is unshadowed.
BUG: unable to handle kernel NULL pointer dereference at
00000000000001a0
IP: complete_execlist_workload+0x2c9/0x3e0 [i915]
Oops: 0002 [#1 ] SMP
task: ffff939546d2d880 task.stack: ffffbd9b82ac4000
RIP: 0010:complete_execlist_workload+0x2c9/0x3e0 [i915]
RSP: 0018:ffffbd9b82ac7dd8 EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff9393c725b540 RCX: 0000000000000006
RDX: 0000000000000007 RSI: 0000000000000202 RDI: ffff939559c8dd00
RBP: ffffbd9b82ac7e18 R08: 0000000000000001 R09: 000000000120dd8f
R10: 0000000000000000 R11: 000000000120dd8f R12: ffff9393c725b540
R13: ffff9393c725b618 R14: ffffbd9b81f0d000 R15: ffff939520e0e000
FS: 0000000000000000(0000) GS:ffff939559c80000(0000)
knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00000000000001a0 CR3: 000000043d664000 CR4: 00000000003426e0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
workload_thread+0x312/0xd70 [i915]
? __wake_up_sync+0x20/0x20
? wake_atomic_t_function+0x60/0x60
kthread+0x101/0x140
Signed-off-by: Changbin Du <changbin.du@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
2017-02-10 16:50:18 +08:00
Vincent Abriou
c462c2f5f5
drm/sti: debug fps reset
...
Reset the fps debug information when 'fps_show' is updated.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
97d7c57630
drm/sti: hdmi: automatically check DVI/HDMI mode
...
Remove the hdmi_mode_property and use drm_detect_hdmi_monitor function
to check whether the connected monitor is HDMI capable or DVI only.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
b7e05db3d1
drm/sti: unbind all components while driver cleanup
...
Unbind all the components when the STI driver is unregistered.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
e9f494d36f
drm/sti: do not post GDP command if no update
...
Do not process update requests with unmodified parameters.
This typically happens when the driver is called with legacy
(non-atomic) IOCTL : in that case atomic_update() is called multiple
times with the same parameters.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
c5649ee497
drm/sti: do not set gdp pixel clock rate if mode is not set
...
Fix a division by 0 case : in some cases, when the GDP plane is being
disabled atomic_check() is called with "mode->clock = 0".
In that case, do not set parent and pixel clock rate.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
1b7f145123
drm/sti: enable gdp pixel clock in atomic_update
...
Set gdp pix clock rate and parent in atomic_check function and enable
it in the atomic_update only the first time.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
0c7ff84f7f
drm/sti: remove deprecated legacy vtg slave
...
stih416 chip family is no more supported in Linux v4.9.
It is then useless to keep vtg slave field since it not used at all for
the stih407/10 chip family supported by sti driver.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Vincent Abriou
e6d50dc647
drm/sti: remove deprecated sink_term config
...
stih416 chip family is no more supported in Linux v4.9.
Then sink_term config becomes useless. The field of the
register it was referring to is tag as reserved for stih410
chip family.
Signed-off-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Fabien DESSENNE
6801723b01
drm/sti: do not check hw scaling if mode is not set
...
Fix a division by 0 case : in some cases, when the HQVDP plane is being
disabled atomic_check() is called with "mode->clock = 0".
In that case, do not check for scaling capabilities.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com >
Acked-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Fabien DESSENNE
c62052d146
drm/sti: Fix up crtc_state->event handling
...
Use drm-core to handle event.
This is required to be able to use the nonblocking helpers.
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com >
Acked-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Fabien DESSENNE
5e60f595d6
drm/sti: use atomic_helper for commit
...
Since nonblocking atomic commits are now supported, the driver can
now use drm_atomic_helper_commit().
Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com >
Acked-by: Vincent Abriou <vincent.abriou@st.com >
2017-02-10 09:34:39 +01:00
Dave Airlie
697d3a2161
Merge tag 'drm-intel-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-intel into drm-fixes
...
Hopefully final fixes for v4.10, about half of them stable material.
* tag 'drm-intel-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-intel:
drm/i915: Always convert incoming exec offsets to non-canonical
drm/i915: Remove overzealous fence warn on runtime suspend
drm/i915/bxt: Add MST support when do DPLL calculation
drm/i915: don't warn about Skylake CPU - KabyPoint PCH combo
drm/i915: fix i915 running as dom0 under Xen
drm/i915: Flush untouched framebuffers before display on !llc
drm/i915: fix use-after-free in page_flip_completed()
2017-02-10 10:14:24 +10:00
Dave Airlie
811b40c83d
Merge tag 'drm-misc-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc into drm-fixes
...
Last-minute vc4 fix for 4.10.
* tag 'drm-misc-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc:
drm: vc4: adapt to new behaviour of drm_crtc.c
2017-02-10 10:14:01 +10:00
Dave Airlie
13f62f54d1
Merge branch 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux into drm-next
...
Some additional fixes for 4.11. Delayed a bit due to Chinese New Year. Highlights:
- Powerplay fixes
- VCE and UVD powergating fixes
- Clean up amdgpu SI gfx code to match CI and VI
- Misc bug fixes
* 'drm-next-4.11' of git://people.freedesktop.org/~agd5f/linux: (30 commits)
drm/amdgpu: report the number of bytes moved at buffer creation
drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()
drm/amdgpu: add support for new smc firmware on polaris
drm/amd/powerplay: refine code to avoid potential bug that the memory not cleared.
drm/amdgpu: shut up #warning for compile testing
drm/amdgpu/virt: fix double kfree on bo_va
drm/radeon: remove some dead code
drm/radeon: avoid kernel segfault in vce when gpu fails to resume
drm/amd/powerplay: set fan speed to max in profile peak mode only.
drm/amd/gfx6: update gb_addr_config
drm/amdgpu: update HAINAN_GB_ADDR_CONFIG_GOLDEN
drm/amdgpu: update VERDE_GB_ADDR_CONFIG_GOLDEN
drm/amdgpu: refine si_read_register
drm/amdgpu/gfx6: clean up spi configuration
drm/amdgpu/gfx6: clean up cu configuration
drm/amdgpu/gfx6: clean up rb configuration
drm/amdgpu: refine vce3.0 code and related powerplay pg code.
drm/amdgpu: move subfunctions to the front of vce_v2_0.c.
drm/amdgpu: enable vce pg feature on Kv.
drm/amdgpu: refine code for VCE2.0 and related dpm code.
...
2017-02-10 10:13:30 +10:00
Dave Airlie
f320d35723
Merge tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-drm-fsl-dcu into drm-next
...
two minor fixes.
* tag 'drm-fsl-dcu-for-v4.11' of http://git.agner.ch/git/linux-drm-fsl-dcu :
drm/fsl-dcu: check for clk_prepare_enable() error
drm/fsl-dcu: remove unneeded 'ret' assignment
2017-02-10 10:12:56 +10:00
Dave Airlie
79b33494af
Merge tag 'drm-misc-next-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc into drm-next
...
Just 3 bugfixes for 4.11 merge window:
- fbdev module unload oops fix from Chris
- patch from Dan that look really dangers, better safe than sorry
* tag 'drm-misc-next-fixes-2017-02-09' of git://anongit.freedesktop.org/git/drm-misc:
drm/atomic: fix an error code in mode_fixup()
drm: Cancel drm_fb_helper_resume_work on unload
drm: Cancel drm_fb_helper_dirty_work on unload
2017-02-10 10:12:00 +10:00
Chris Wilson
949e8ab3a9
drm/i915: Use the size/type of address space to make decisions
...
Once the address space has been created (using 3 or 4 levels of page
tables), we should use that to program the appropriate type into the
contexts. This gives us the flexibility to handle different types of
address spaces at runtime.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Matthew Auld <matthew.auld@intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170209144036.23664-1-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2017-02-09 17:09:27 +00:00
Samuel Pitoiset
fad061270a
drm/amdgpu: report the number of bytes moved at buffer creation
...
Like ttm_bo_validate(), ttm_bo_init() might need to move BO and
the number of bytes moved by TTM should be reported. This can help
the throttle buffer migration mechanism to make a better decision.
v2: fix computation
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-09 11:29:44 -05:00
Samuel Pitoiset
38fc4856ad
drm/amdgpu: fix a potential deadlock in amdgpu_bo_create_restricted()
...
When ttm_bo_init() fails, the reservation mutex should be unlocked.
In debug build, the kernel reported "possible recursive locking
detected" in this codepath. For debugging purposes, I also added
a "WARN_ON(ww_mutex_is_locked())" when ttm_bo_init() fails and the
mutex was locked as expected.
This should fix (random) GPU hangs. The easy way to reproduce the
issue is to change the "Super Sampling" option from 1.0 to 2.0 in
Hitman. It will create a huge buffer, evict a bunch of buffers
(around ~5k) and deadlock.
This regression has been introduced pretty recently.
v2: only release the mutex if resv is NULL
Fixes: 12a852219583 ("drm/amdgpu: improve AMDGPU_GEM_CREATE_VRAM_CLEARED handling (v2)")
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-09 11:28:24 -05:00
Alex Deucher
a52d120f62
drm/amdgpu: add support for new smc firmware on polaris
...
Some polaris variants require new smc firmware.
Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-09 10:54:45 -05:00
Rex Zhu
4d8d44c6ce
drm/amd/powerplay: refine code to avoid potential bug that the memory not cleared.
...
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2017-02-09 10:54:08 -05:00
Maarten Lankhorst
8d2b47dde8
drm/i915: Enable atomic support by default on supported platforms.
...
i915 is pretty much feature complete. Support for atomic i915-specific
connector properties is still missing; those properties can (for now)
only be set through the legacy ioctl.
ILK style watermarks and gen9+ watermarks are handled atomically,
and nonblocking modesets work. FBC has also been made to work with
atomic.
gen4x- and vlv/chv watermarks still need to be fixed, so disable atomic
by default there for now.
Flip the switch!!
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Lyude <cpaul@redhat.com >
Cc: Matt Roper <matthew.d.roper@intel.com >
Cc: Paulo Zanoni <paulo.r.zanoni@intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486021302-24910-1-git-send-email-maarten.lankhorst@linux.intel.com
[mlankhorst: Fix checkpatch warning about extra space in match_info]
Acked-by: Daniel Stone <daniel@fooishbar.org >
Reviewed-by: Lyude <lyude@redhat.com >
2017-02-09 15:56:45 +01:00
Joonas Lahtinen
6d1f9fb312
drm/i915: Add __destroy_hw_context
...
__create_hw_context can use a good counterpart.
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1486640065-13695-1-git-send-email-joonas.lahtinen@linux.intel.com
2017-02-09 15:33:36 +02:00
Chris Wilson
e1cc3db020
drm/i915: Assert that we never create a vma for the aliasing_ppgtt
...
The aliasing_ppgtt is just a container for the HW context that mirrors
the global gtt. It should never be used directly, so assert if we make
the mistake of trying to allocate a VMA for it.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170209111933.12420-1-chris@chris-wilson.co.uk
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
2017-02-09 12:22:15 +00:00
Chris Wilson
969bb72cbf
drm/i915: Check for timeout completion when waiting for the rq to submitted
...
We first wait for a request to be submitted to hw and assigned a seqno,
before we can wait for the hw to signal completion (otherwise we don't
know the hw id we need to wait upon). Whilst waiting for the request to
be submitted, we may exceed the user's timeout and need to propagate the
error back.
v2: Make ETIME into an error from wait_for_execute for consistent exit
handling.
Reported-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Fixes: 4680816be3
("drm/i915: Wait first for submission, before waiting for request completion")
Testcase: igt/gem_wait/basic-await
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Cc: stable@vger.kernel.org
Link: http://patchwork.freedesktop.org/patch/msgid/20170208181238.7232-1-chris@chris-wilson.co.uk
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
2017-02-09 09:26:32 +00:00
Zhi Wang
e81ecb5e31
drm/i915: A hotfix for making aliasing PPGTT work for GVT-g
...
This patch makes PPGTT page table non-shrinkable when using aliasing PPGTT
mode. It's just a temporary solution for making GVT-g work.
Fixes: 2ce5179fe8
("drm/i915/gtt: Free unused lower-level page tables")
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Michal Winiarski <michal.winiarski@intel.com >
Cc: Michel Thierry <michel.thierry@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Zhenyu Wang <zhenyuw@linux.intel.com >
Cc: Zhiyuan Lv <zhiyuan.lv@intel.com >
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486559013-25251-2-git-send-email-zhi.a.wang@intel.com
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: <drm-intel-fixes@lists.freedesktop.org > # v4.10-rc1+
Cc: stable@vger.kernel.org
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
2017-02-09 09:26:23 +00:00
Ander Conselvan de Oliveira
b71953a16d
drm/i915/dp: Move initialization of hpd_pin to a new function
...
This shaves a few lines from intel_dp_init_connector() and will serve as
a good place to add other port specific information in a follow up
patch.
While at it, convert BUG() to MISSING_CASE() in the default case.
v2: s/BUG/MISSING_CASE. (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170203140316.20792-2-ander.conselvan.de.oliveira@intel.com
2017-02-09 10:20:11 +02:00
Ander Conselvan de Oliveira
ca4c38909f
drm/i915: Remove WA for swapped HPD pins in broxton A stepping
...
Remove workaround for swapped HPD pins in broxton A stepping, which is
pre-production hardware.
Cc: Jani Nikula <jani.nikula@linux.intel.com >
Signed-off-by: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20170203140316.20792-1-ander.conselvan.de.oliveira@intel.com
2017-02-09 10:20:00 +02:00
Shawn Guo
e5b8afbe34
drm: zte: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
The functions are moved around to save forward declaration.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-24-git-send-email-shawnguo@kernel.org
2017-02-09 16:13:20 +08:00
Shawn Guo
0d5f46fa4c
drm: vc4: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-23-git-send-email-shawnguo@kernel.org
2017-02-09 16:12:47 +08:00
Shawn Guo
55cbc4dfcd
drm: tilcdc: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
While at it, the 'return' of .disable_vblank is dropped to fix the
following checkpatch warning.
WARNING: void function return statements are not generally useful
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Jyri Sarha <jsarha@ti.com >
Acked-by: Jyri Sarha <jsarha@ti.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-22-git-send-email-shawnguo@kernel.org
2017-02-09 16:12:01 +08:00
Shawn Guo
10437d9b47
drm: tegra: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
As the result, the wrapper functions tegra_drm_xxx get killed
completely, and tegra_dc_xxx are filled into struct drm_crtc_funcs as
vblank hooks directly.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Thierry Reding <thierry.reding@gmail.com >
Acked-by: Thierry Reding <treding@nvidia.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-21-git-send-email-shawnguo@kernel.org
2017-02-09 16:11:31 +08:00
Shawn Guo
50480a78e2
drm: sun4i: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Maxime Ripard <maxime.ripard@free-electrons.com >
Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-20-git-send-email-shawnguo@kernel.org
2017-02-09 16:10:52 +08:00
Shawn Guo
ee25586370
drm: shmobile: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
As the result, shmob_drm_crtc_enable_vblank() becomes a static function,
although it gets moved around a bit to save forward declaration.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-19-git-send-email-shawnguo@kernel.org
2017-02-09 16:10:16 +08:00
Shawn Guo
c3605dfc1e
drm: rockchip: remove struct rockchip_crtc_funcs
...
With the vblank hooks in struct drm_crtc_funcs, we do not need to
maintain struct rockchip_crtc_funcs and the related registration
functions. Remove them.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Mark Yao <mark.yao@rock-chips.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-18-git-send-email-shawnguo@kernel.org
2017-02-09 16:09:34 +08:00
Shawn Guo
20c8a288a0
drm: rcar-du: use vblank hooks in struct drm_crtc_funcs
...
The vblank hooks in struct drm_driver are deprecated and only meant for
legacy drivers. For modern drivers with DRIVER_MODESET flag, the hooks
in struct drm_crtc_funcs should be used instead.
Signed-off-by: Shawn Guo <shawn.guo@linaro.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1486458995-31018-17-git-send-email-shawnguo@kernel.org
2017-02-09 16:08:44 +08:00