Clint Taylor [Tue, 10 Jul 2018 20:02:05 +0000 (13:02 -0700)]
drm/i915/glk: Add Quirk for GLK NUC HDMI port issues.
On GLK NUC platforms the HDMI retiming buffer needs additional disabled
time to correctly sync to a faster incoming signal.
When measured on a scope the highspeed lines of the HDMI clock turn off
for ~400uS during a normal resolution change. The HDMI retimer on the
GLK NUC appears to require at least a full frame of quiet time before a
new faster clock can be correctly sync'd. Wait 100ms due to msleep
inaccuracies while waiting for a completed frame. Add a quirk to the
driver for GLK boards that use ITE66317 HDMI retimers.
V2: Add more devices to the quirk list
V3: Delay increased to 100ms, check to confirm crtc type is HDMI.
V4: crtc type check extended to include _DDI and whitespace fixes
v5: Fix white spaces, remove the macro for delay. Revert the crtc type
check introduced in v4.
Cc: Imre Deak <imre.deak@intel.com>
Cc: <stable@vger.kernel.org> # v4.14+
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=105887
Signed-off-by: Clint Taylor <clinton.a.taylor@intel.com>
Tested-by: Daniel Scheller <d.scheller.oss@gmail.com>
Signed-off-by: Radhakrishna Sripada <radhakrishna.sripada@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Imre Deak <imre.deak@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710200205.1478-1-radhakrishna.sripada@intel.com
Noralf Trønnes [Thu, 12 Jul 2018 15:04:14 +0000 (17:04 +0200)]
drm/client: Fix double free in error path
This fixes a static checker warning:
drivers/gpu/drm/drm_client.c:289 drm_client_buffer_create()
error: double free of 'buffer'
Extend drm_client_buffer_delete() to handle the case when there's no
dumb buffer attached and drop the extra kfree.
Fixes:
c76f0f7cb546 ("drm: Begin an API for in-kernel clients")
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712150414.46908-1-noralf@tronnes.org
Thomas Zimmermann [Thu, 12 Jul 2018 15:26:39 +0000 (17:26 +0200)]
drm/sti: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712152639.30934-1-tzimmermann@suse.de
Thomas Zimmermann [Fri, 13 Jul 2018 08:06:25 +0000 (10:06 +0200)]
drm/stm: Replace drm_dev_unref with drm_dev_put
This patch unifies the naming of DRM functions for reference counting
of struct drm_device. The resulting code is more aligned with the rest
of the Linux kernel interfaces.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Acked-by: Philippe Cornu <philippe.cornu@st.com>
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180713080625.18256-1-tzimmermann@suse.de
Chris Wilson [Thu, 12 Jul 2018 20:20:27 +0000 (21:20 +0100)]
drm/i915/guc: Protect against NULL client dereference in error path
After aborting a module load, we may try and disable guc before we have
finished setting it. Long term plan is to ensure perfect onion unwind,
but in the short term we want to fix the oops to re-enable
drv_module_reload.
[ 317.401239] BUG: unable to handle kernel NULL pointer dereference at
0000000000000030
[ 317.401279] Oops: 0000 [#1] PREEMPT SMP PTI
[ 317.401294] CPU: 5 PID: 4275 Comm: drv_module_relo Tainted: G U 4.18.0-rc4-CI-CI_DRM_4476+ #1
[ 317.401317] Hardware name: System manufacturer System Product Name/Z170M-PLUS, BIOS 3610 03/29/2018
[ 317.401440] RIP: 0010:unreserve_doorbell+0x0/0x80 [i915]
[ 317.401454] Code: bb e0 48 8b 35 21 4d 18 00 49 c7 c0 a8 e5 62 a0 b9 cc 00 00 00 48 c7 c2 d8 41 5f a0 48 c7 c7 c9 f6 53 a0 e8 a2 3d c2 e0 0f 0b <0f> b7 47 30 66 3d 00 01 74 20 48 8b 57 18 48 0f a3 82 40 05 00 00
[ 317.401602] RSP: 0018:
ffffc900003d3da0 EFLAGS:
00010246
[ 317.401619] RAX:
ffffffff8223b300 RBX:
0000000000000000 RCX:
0000000000000000
[ 317.401636] RDX:
0000001fffffffc0 RSI:
ffff880219f115f0 RDI:
0000000000000000
[ 317.401654] RBP:
ffff880219f11838 R08:
0000000000000000 R09:
0000000000000000
[ 317.401671] R10:
0000000000000000 R11:
0000000000000000 R12:
ffff880219f11300
[ 317.401689] R13:
ffff880219f17770 R14:
ffff88022c1daef8 R15:
ffffffffa06ae950
[ 317.401707] FS:
00007febf77a9980(0000) GS:
ffff880236d40000(0000) knlGS:
0000000000000000
[ 317.401727] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[ 317.401743] CR2:
0000000000000030 CR3:
0000000222072003 CR4:
00000000003606e0
[ 317.401761] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 317.401779] DR3:
0000000000000000 DR6:
00000000fffe0ff0 DR7:
0000000000000400
[ 317.401796] Call Trace:
[ 317.401894] guc_client_free+0x9/0x130 [i915]
[ 317.401993] intel_guc_submission_fini+0x50/0x90 [i915]
[ 317.402092] intel_uc_fini+0x34/0xd0 [i915]
[ 317.402179] i915_gem_fini+0x5c/0x100 [i915]
[ 317.402249] i915_driver_unload+0xd2/0x110 [i915]
[ 317.402321] i915_pci_remove+0x10/0x20 [i915]
[ 317.402341] pci_device_remove+0x36/0xb0
[ 317.402357] device_release_driver_internal+0x185/0x250
[ 317.402374] driver_detach+0x35/0x70
[ 317.402390] bus_remove_driver+0x53/0xd0
[ 317.402404] pci_unregister_driver+0x25/0xa0
[ 317.402423] __se_sys_delete_module+0x162/0x210
[ 317.402439] ? do_syscall_64+0xd/0x190
[ 317.402454] do_syscall_64+0x55/0x190
[ 317.402470] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 317.402485] RIP: 0033:0x7febf6e5d1b7
[ 317.402496] Code: 73 01 c3 48 8b 0d d1 8c 2c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 b8 b0 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d a1 8c 2c 00 f7 d8 64 89 01 48
[ 317.402646] RSP: 002b:
00007fffb5e72798 EFLAGS:
00000206 ORIG_RAX:
00000000000000b0
[ 317.402667] RAX:
ffffffffffffffda RBX:
0000000000000000 RCX:
00007febf6e5d1b7
[ 317.402686] RDX:
0000000000000000 RSI:
0000000000000800 RDI:
0000562da1addd98
[ 317.402703] RBP:
0000562da1addd30 R08:
0000562da1addd9c R09:
00007fffb5e727d8
[ 317.402721] R10:
00007fffb5e71794 R11:
0000000000000206 R12:
0000562da0ff6470
Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712202027.19801-1-chris@chris-wilson.co.uk
Rodrigo Vivi [Fri, 13 Jul 2018 06:54:26 +0000 (23:54 -0700)]
drm/i915: Update DRIVER_DATE to
20180712
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Rodrigo Vivi [Thu, 12 Jul 2018 05:27:15 +0000 (22:27 -0700)]
drm/i915/psr: Remove few mod parameters option.
Reduce the module parameter to enable or disable.
The link stand by vs full link off was used only once.
And it was actually masking another bug fixed by commit
'
84bb2916a683 ("drm/i915/psr: Check for SET_POWER_CAPABLE
bit at PSR init time.")'
So, let's remove these options for now. End goal is to
fully remove the mod param, moving it to a debugfs
interface in upcoming patches.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Tarun Vyas <tarun.vyas@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712052715.8177-1-rodrigo.vivi@intel.com
Rodrigo Vivi [Wed, 11 Jul 2018 22:00:50 +0000 (15:00 -0700)]
drm/i915/psr: Remove useless function calls.
PSR is no longer supported on VLV/CHV so this is just dead code.
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711220050.21809-1-rodrigo.vivi@intel.com
Dhinakaran Pandiyan [Thu, 5 Jul 2018 00:31:21 +0000 (17:31 -0700)]
drm/i915/psr: Split sink status into a separate debugfs node
This allows to read i915_edp_psr_status from tests without triggering
any AUX communication. Take this opportunity to move this under the
eDP-1 connector directory as the status we print is of the sink.
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Suggested-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180705003121.2478-1-dhinakaran.pandiyan@intel.com
Tarun Vyas [Thu, 12 Jul 2018 05:33:23 +0000 (22:33 -0700)]
drm/i915: Use crtc_state->has_psr instead of CAN_PSR for pipe update
In commit "drm/i915: Wait for PSR exit before checking for vblank
evasion", the idea was to limit the PSR IDLE checks when PSR is
actually supported. While CAN_PSR does do that check, it doesn't
applies on a per-crtc basis. crtc_state->has_psr is a more granular
check that only applies to pipe(s) that have PSR enabled.
Without the has_psr check, we end up waiting on the eDP transcoder's
PSR_STATUS register irrespective of whether the pipe being updated is
driving it or not.
v2: Remove unnecessary parantheses, make checkpatch happy.
v3: Move the has_psr check to intel_psr_wait_for_idle and commit
message changes (DK).
v4: Derive dev_priv from intel_crtc_state (DK)
v5: Commit message changes to reflect the HW behavior (DK)
Fixes:
a608987970b9 ("drm/i915: Wait for PSR exit before checking for vblank evasion")
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Tarun Vyas <tarun.vyas@intel.com>
Signed-off-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712053323.26266-1-tarun.vyas@intel.com
Arnd Bergmann [Mon, 9 Jul 2018 15:20:29 +0000 (17:20 +0200)]
drm/tinydrm: add backlight dependency for ili9341
This tinydrm driver fails to link without the backlight support:
drivers/gpu/drm/tinydrm/ili9341.o: In function `ili9341_probe':
ili9341.c:(.text+0x578): undefined reference to `devm_of_find_backlight'
Fixes:
3fa0e8f6f960 ("drm/tinydrm: new driver for ILI9341 display panels")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Noralf Trønnes <noralf@tronnes.org>
Signed-off-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709152106.990066-1-arnd@arndb.de
Maxime Ripard [Thu, 12 Jul 2018 08:08:18 +0000 (10:08 +0200)]
drm/sun4i: tcon-top: Fix return type warning
When commit
af11942ee44e ("drm/sun4i: tcon-top: Cleanup clock handling")
was merged, the error handling path of the of_property_match_string was
changed to take into account the fact that the returned value of that
function wasn't an error pointer but an error code.
Unfortunately, this introduced a warning since the now returned value is an
integer, while the sun8i_tcon_top_register_gate function should return an
error pointer.
Fix that by calling ERR_PTR.
Cc: Jernej Skrabec <jernej.skrabec@siol.net>
Cc: Chen-Yu Tsai <wens@csie.org>
Fixes:
af11942ee44e ("drm/sun4i: tcon-top: Cleanup clock handling")
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712080818.3571-1-maxime.ripard@bootlin.com
Jernej Skrabec [Fri, 6 Jul 2018 16:47:32 +0000 (18:47 +0200)]
drm/sun4i: Implement zpos for DE2
Initial implementation of DE2 planes only supported fixed zpos.
Expand implementation with configurable zpos property.
Implementation background:
Channel in DE2 driver represents one DRM plane, whereas pipe is just
mapped channel to known Z position. Pipe 0 will always be at the bottom,
pipe 1 just above pipe 0 and so on. If, for example, channel 1 is mapped
at pipe 0 and channel 0 at pipe 1, whatever is on channel 0 will appear
on top.
Before this commit, channel id was used for addressing channel related
registers (prefixed with SUN8I_MIXER_CHAN_UI_ or SUN8I_MIXER_CHAN_VI_)
and pipe registers (prefixed with SUN8I_MIXER_BLEND_). Additionally,
register SUN8I_MIXER_BLEND_ROUTE, which takes care for mapping channels
to pipes had fixed value. It mapped channel 0 to pipe 0, 1 to 1 and so
on. Consequence of all that was fixed Z order of planes.
With this commit, pipe registers are using zpos property as index and
channel related registers still use channel id as index. Pipe mapping
register is now set dynamically too and pipe enable register is rebuild
every time to make sure only active pipes are enabled.
Testing was done to confirm that there is no issues if bottom plane
contains pixels with alpha value < 0xff and if it doesn't whole screen.
Tested-by: Paul Kocialkowski <paul.kocialkowski@bootlin.com>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180706164732.24166-1-jernej.skrabec@siol.net
Ramalingam C [Thu, 28 Jun 2018 13:34:49 +0000 (19:04 +0530)]
drm/i915/gmbus: Enable burst read
Support for Burst read in HW is added for HDCP2.2 compliance
requirement.
This patch enables the burst read for all the gmbus read of more than
511Bytes, on capable platforms.
v2:
Extra line is removed.
v3:
Macro is added for detecting the BURST_READ Support [Jani]
Runtime detection of the need for burst_read [Jani]
Calculation enhancement.
v4:
GMBUS0 reg val is passed from caller [ville]
Removed a extra var [ville]
Extra brackets are removed [ville]
Implemented the handling of 512Bytes Burst Read.
v5:
Burst read max length is fixed at 767Bytes [Ville]
v6:
Collecting the received reviewed-by.
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1530192889-5789-3-git-send-email-ramalingam.c@intel.com
Ramalingam C [Thu, 28 Jun 2018 13:34:48 +0000 (19:04 +0530)]
drm/i915/gmbus: Increase the Bytes per Rd/Wr Op
GMBUS HW supports 511Bytes as Max Bytes per single RD/WR op. Instead of
enabling the 511Bytes per RD/WR cycle on legacy platforms for no
absolute ROIs, this change allows the max bytes per op upto 511Bytes
from Gen9 onwards.
v2:
No Change.
v3:
Inline function for max_xfer_size and renaming of the macro.[Jani]
v4:
Extra brackets removed [ville]
Commit msg is modified.
v5:
Collecting the Reviewed-By received.
Cc: Jani Nikula <jani.nikula@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Ramalingam C <ramalingam.c@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1530192889-5789-2-git-send-email-ramalingam.c@intel.com
Rodrigo Siqueira [Thu, 12 Jul 2018 13:41:02 +0000 (10:41 -0300)]
drm/vkms: Add framebuffer and plane helpers
This patch appends the minimum helpers related to framebuffer and plane
to make vkms minimally usable.
Changes since V1:
- None
Changes since V2:
- Squash "Add plane helper struct" and "Add helper for framebuffer
create"
Changes since V3:
Daniel Vetter:
- Remove atomic_check from plane helper
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/d37807da7d3b39444b4c9abb149fe3c518d07c61.1531402095.git.rodrigosiqueiramelo@gmail.com
Michał Winiarski [Thu, 12 Jul 2018 11:20:13 +0000 (12:20 +0100)]
drm/i915/selftests: Fixup GuC FW negative test
Since:
0d4b78b3d2c0 ("drm/i915/guc: Assert we have the doorbell before setting it up")
We have asserts in GuC doorbell related functions, which is a good thing.
Unfortunately, we were using those to check whether GuC FW is refusing
to allocate invalid doorbell - which makes the test fail.
Well, it would make the test WARN, except we fumbled cleanup ordering
and eat the BUG_ON instead.
Let's keep the asserts and use the internal implementation in the test.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107186
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michel Thierry <michel.thierry@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712112013.3253-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Michał Winiarski [Thu, 12 Jul 2018 12:48:10 +0000 (14:48 +0200)]
drm/i915: Tidy error handling in i915_gem_init_hw
Let's reorder things so that we can do onion teardown rather than double
goto.
References:
b96f6ebfd024 ("drm/i915: Correctly handle error path in i915_gem_init_hw")
Signed-off-by: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Cc: Sagar Arun Kamble <sagar.a.kamble@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712124810.25241-1-michal.winiarski@intel.com
Chris Wilson [Thu, 12 Jul 2018 10:58:30 +0000 (11:58 +0100)]
drm/i915/guc: Skip cleaning up the doorbells on error-before-allocate
If we fail the module load, we may try and cleanup before we even
allocate the GuC clients. KISS in order to try and re-enable
drv_module_reload for BAT.
Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Cc: Michal Wajdeczko <michal.wajdeczko@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712105830.20390-1-chris@chris-wilson.co.uk
Chris Wilson [Thu, 12 Jul 2018 10:54:54 +0000 (11:54 +0100)]
drm/i915: Silence warning for no vlv powercontext
Along a module load error path, we may try to cleanup the powercontext
even before we have allocated it. Reorganising GT powermanagement is an
on going process, so for simplicity handle it.
[ 522.733832] WARN_ON(!dev_priv->vlv_pctx)
[ 522.733986] WARNING: CPU: 1 PID: 3856 at drivers/gpu/drm/i915/intel_pm.c:7350 intel_cleanup_gt_powersave+0x5f/0x70 [i915]
[ 522.733991] Modules linked in: i915(+) vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic btusb btrtl btbcm btintel intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul bluetooth snd_hda_codec ghash_clmulni_intel snd_hwdep snd_hda_core ecdh_generic lpc_ich r8169 snd_pcm mii i2c_hid prime_numbers [last unloaded: i915]
[ 522.734105] CPU: 1 PID: 3856 Comm: drv_module_relo Tainted: G U 4.18.0-rc4-CI-CI_DRM_4474+ #1
[ 522.734110] Hardware name: \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff \xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff/DN2820FYK, BIOS FYBYT10H.86A.0059.2017.0607.2130 06/07/2017
[ 522.734193] RIP: 0010:intel_cleanup_gt_powersave+0x5f/0x70 [i915]
[ 522.734197] Code: 00 74 0d 48 c7 83 68 a6 00 00 00 00 00 00 eb c8 e8 36 6f 37 e1 eb ec 48 c7 c6 c5 7a 3d a0 48 c7 c7 b5 78 3d a0 e8 71 04 e0 e0 <0f> 0b eb aa 0f 1f 00 66 2e 0f 1f 84 00 00 00 00 00 f3 c3 0f 1f 40
[ 522.734445] RSP: 0018:
ffffc900004f3af0 EFLAGS:
00010282
[ 522.734453] RAX:
0000000000000000 RBX:
ffff880106360000 RCX:
0000000000000001
[ 522.734458] RDX:
0000000080000001 RSI:
ffffffff820c65c4 RDI:
00000000ffffffff
[ 522.734463] RBP:
ffff880106360000 R08:
000000009f79baee R09:
0000000000000000
[ 522.734467] R10:
0000000000000000 R11:
0000000000000000 R12:
ffff88013b3133f8
[ 522.734472] R13:
00000000ffffffed R14:
ffff880106360d58 R15:
ffff88013b3133f8
[ 522.734477] FS:
00007f43f70af980(0000) GS:
ffff88013fd00000(0000) knlGS:
0000000000000000
[ 522.734481] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[ 522.734486] CR2:
000055a13a787580 CR3:
00000001325e6000 CR4:
00000000001006e0
[ 522.734490] Call Trace:
[ 522.734595] intel_modeset_cleanup+0xcf/0x140 [i915]
[ 522.734682] i915_driver_load+0xc85/0x10a0 [i915]
[ 522.734694] ? _raw_spin_unlock_irqrestore+0x4c/0x60
[ 522.734703] ? trace_hardirqs_on_caller+0xe0/0x1b0
[ 522.734790] i915_pci_probe+0x29/0x90 [i915]
[ 522.734801] pci_device_probe+0xa1/0x130
[ 522.734813] driver_probe_device+0x306/0x480
[ 522.734824] __driver_attach+0xdb/0x100
[ 522.734830] ? driver_probe_device+0x480/0x480
[ 522.734836] ? driver_probe_device+0x480/0x480
[ 522.734844] bus_for_each_dev+0x74/0xc0
[ 522.734855] bus_add_driver+0x15f/0x250
[ 522.734863] ? 0xffffffffa0793000
[ 522.734870] driver_register+0x56/0xe0
[ 522.734877] ? 0xffffffffa0793000
[ 522.734883] do_one_initcall+0x58/0x370
[ 522.734893] ? do_init_module+0x1d/0x1ea
[ 522.734900] ? rcu_read_lock_sched_held+0x6f/0x80
[ 522.734906] ? kmem_cache_alloc_trace+0x282/0x2e0
[ 522.734918] do_init_module+0x56/0x1ea
[ 522.734927] load_module+0x2435/0x2b20
[ 522.734965] ? __se_sys_finit_module+0xd3/0xf0
[ 522.734972] __se_sys_finit_module+0xd3/0xf0
[ 522.734995] do_syscall_64+0x55/0x190
[ 522.735003] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 522.735009] RIP: 0033:0x7f43f675d839
[ 522.735014] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
[ 522.735260] RSP: 002b:
00007ffe69384238 EFLAGS:
00000246 ORIG_RAX:
0000000000000139
[ 522.735269] RAX:
ffffffffffffffda RBX:
000056100e387090 RCX:
00007f43f675d839
[ 522.735273] RDX:
0000000000000000 RSI:
000056100e37bff0 RDI:
0000000000000003
[ 522.735278] RBP:
000056100e37bff0 R08:
0000000000000000 R09:
0000000000000000
[ 522.735282] R10:
0000000000000003 R11:
0000000000000246 R12:
0000000000000000
[ 522.735286] R13:
000056100e37c890 R14:
0000000000000020 R15:
0000000000000027
[ 522.735309] irq event stamp: 1389594
[ 522.735316] hardirqs last enabled at (1389593): [<
ffffffff810f896c>] console_unlock+0x3fc/0x600
[ 522.735323] hardirqs last disabled at (1389594): [<
ffffffff81a0111c>] error_entry+0x7c/0x100
[ 522.735329] softirqs last enabled at (1389356): [<
ffffffff81c0034f>] __do_softirq+0x34f/0x505
[ 522.735336] softirqs last disabled at (1389335): [<
ffffffff8108c7b9>] irq_exit+0xa9/0xc0
[ 522.735432] WARNING: CPU: 1 PID: 3856 at drivers/gpu/drm/i915/intel_pm.c:7350 intel_cleanup_gt_powersave+0x5f/0x70 [i915]
Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712105454.16091-1-chris@chris-wilson.co.uk
Dominique Martinet [Thu, 12 Jul 2018 07:41:03 +0000 (08:41 +0100)]
drm/i915/tv: fix strncpy truncation warning
Change it to use strlcpy instead
Signed-off-by: Dominique Martinet <asmadeus@codewreck.org>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180712074103.21571-1-chris@chris-wilson.co.uk
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Arnd Bergmann [Wed, 11 Jul 2018 14:43:10 +0000 (16:43 +0200)]
drm/sun4i: fix build failure with CONFIG_DRM_SUN8I_MIXER=m
Having DRM_SUN4I built-in but DRM_SUN8I_MIXER as a loadable module results in
a link error, as we try to access a symbol from the sun8i_tcon_top.ko module:
ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun8i-drm-hdmi.ko] undefined!
ERROR: "sun8i_tcon_top_of_table" [drivers/gpu/drm/sun4i/sun4i-drm.ko] undefined!
This solves the problem by adding a silent symbol for the tcon_top module,
building it as a separate module in exactly the cases that we need it,
but in a way that it is reachable by the other modules.
Fixes:
57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs")
Fixes:
ef0cf6441fbb ("drm/sun4i: Add support for traversing graph with TCON TOP")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711144403.1022829-1-arnd@arndb.de
Jernej Skrabec [Wed, 11 Jul 2018 11:27:06 +0000 (13:27 +0200)]
drm/sun4i: mixer: Read id from DT
Currently, TCON supports 2 ways to match TCON with engine (mixer in this
case). Old way is to just traverse of graph backwards and compare node
pointer. New way is to match TCON and engine by their respective ids.
All SoCs with DE2 enabled till now used the old way, which means mixer
id was never used and thus never implemented.
However, for R40, only the new way will be used. To prepare for that,
implement mixer id fetching from DT.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711112706.30222-1-jernej.skrabec@siol.net
Wei Yongjun [Wed, 11 Jul 2018 13:22:47 +0000 (13:22 +0000)]
drm/sun4i: DW HDMI: Make symbol sun8i_dw_hdmi_pltfm_driver static
Fixes the following sparse warning:
drivers/gpu/drm/sun4i/sun8i_dw_hdmi.c:228:24: warning:
symbol 'sun8i_dw_hdmi_pltfm_driver' was not declared. Should it be static?
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1531315367-190647-1-git-send-email-weiyongjun1@huawei.com
Rodrigo Vivi [Thu, 12 Jul 2018 07:23:44 +0000 (00:23 -0700)]
Merge tag 'gvt-next-2018-07-11' of https://github.com/intel/gvt-linux into drm-intel-next-queued
gvt-next-2018-07-11
- vGPU huge page support (Changbin)
- BXT display irq warning fix (Colin)
- Handle GVT dependency well (Henry)
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711023353.GU1267@zhen-hp.sh.intel.com
Rodrigo Siqueira [Thu, 12 Jul 2018 02:02:26 +0000 (23:02 -0300)]
drm/vkms: Add vblank events simulated by hrtimers
This commit adds regular vblank events simulated through hrtimers, which
is a feature required by VKMS to mimic real hardware. Additionally, all
the vblank event send after pageflip is kept in the atomic_flush
function.
Changes since V1:
- Compute the vblank timer interval per interruption
Ville Syrjälä and Daniel Vetter:
- Removes hardcoded vblank interval to get it from user space
Changes since V2:
Chris Wilson
- Removes unnecessary algorithm to compute the next period
Daniel Vetter:
- Uses drm_calc_timestamping_constants to get the vblank interval
instead of calculating it manually
- Adds disable_vblank helper that turns of crtc
- Simplifies implementation by using drm_crtc_arm_vblank_event
- Replaces the code in atomic_begin to atomic_flush
- Removes unnecessary field in vkms_output
Changes since V3:
Daniel Vetter:
- Squash "drm/vkms: Add atomic helpers functions" into the commit that
handling vblank events simulated by hrtimers
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/7709bba40782ec06332d57fff337797b272581fc.1531359228.git.rodrigosiqueiramelo@gmail.com
Rodrigo Siqueira [Thu, 12 Jul 2018 02:02:14 +0000 (23:02 -0300)]
drm/vkms: Add connectors helpers
This patch adds the struct drm_connector_helper_funcs with some
necessary hooks. Additionally, it also adds some missing hooks at
drm_connector_funcs.
Changes since V1:
- None
Change since V2:
Daniel Vetter:
- Remove vkms_conn_mode_valid
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/c8ee28b889234e866ef18bce4216385661c48041.1531359228.git.rodrigosiqueiramelo@gmail.com
Eames Trinh [Tue, 10 Jul 2018 13:00:21 +0000 (15:00 +0200)]
drm: gma500: Changed __attribute__((packed)) to __packed
Signed-off-by: Eames Trinh <eamestrinh@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710130021.4499-1-eamestrinh@gmail.com
Rodrigo Siqueira [Thu, 12 Jul 2018 02:01:47 +0000 (23:01 -0300)]
drm/vkms: Add dumb operations
VKMS currently does not handle dumb data, and as a consequence, it does
not provide mechanisms for handling gem. This commit adds the necessary
support for gem object/handler and the dumb functions.
Changes since V1:
Daniel Vetter:
- Add dumb buffer support to the same patchset
Changes since V2:
Haneen:
- Add missing gem_free_object_unlocked callback to fix the warning
"Memory manager not clean during takedown"
Signed-off-by: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/70b7becc91c6a323dbc15cb5fc912cbdfe4ef7d9.1531359228.git.rodrigosiqueiramelo@gmail.com
Noralf Trønnes [Wed, 11 Jul 2018 15:56:32 +0000 (17:56 +0200)]
drm/client: Fix: drm_client_new: Don't require DRM to be registered
Commit
894a677f4b3e ("drm/cma-helper: Use the generic fbdev emulation")
broke almost all drivers that use the CMA helper.
The reason is that drm_client_new() requires that the DRM device has
been registered, but the drivers register fbdev before registering DRM.
Remove the requirement that DRM should be registered when creating a
new client.
Fixes:
c76f0f7cb546 ("drm: Begin an API for in-kernel clients")
Cc: Maxime Ripard <maxime.ripard@bootlin.com>
Cc: Icenowy Zheng <icenowy@aosc.io>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Tested-by: Icenowy Zheng <icenowy@aosc.io>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711155632.37437-1-noralf@tronnes.org
Noralf Trønnes [Tue, 10 Jul 2018 15:05:18 +0000 (17:05 +0200)]
drm/tinydrm: Fix doc build warnings
include/drm/tinydrm/tinydrm.h:34: warning: Function parameter or member 'fb_dirty' not described in 'tinydrm_device'
drivers/gpu/drm/tinydrm/mipi-dbi.c:272: warning: Function parameter or member 'crtc_state' not described in 'mipi_dbi_enable_flush'
drivers/gpu/drm/tinydrm/mipi-dbi.c:272: warning: Function parameter or member 'plane_state' not described in 'mipi_dbi_enable_flush'
Move struct member docs inline so it's not missed next time.
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710150518.10528-1-noralf@tronnes.org
Vladimir Zapolskiy [Fri, 6 Jul 2018 18:51:01 +0000 (21:51 +0300)]
drm/panel: simple: Add Sharp LQ035Q7DB03 panel support
The change adds support for Sharp LQ035Q7DB03 3.5" QVGA TFT panel.
Note that this aged panel is already found in the kernel sources,
for instance in board mach files mach-mx21ads.c, mach-mx27ads.c,
mach-pcm043.c, lpd270.c and imx27-phytec-phycore-rdk.dts.
Signed-off-by: Vladimir Zapolskiy <vz@mleia.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180706185101.31186-1-vz@mleia.com
Chris Wilson [Fri, 29 Jun 2018 07:53:20 +0000 (08:53 +0100)]
drm/i915/execlists: Switch to rb_root_cached
The kernel recently gained an augmented rbtree with the purpose of
cacheing the leftmost element of the rbtree, a frequent optimisation to
avoid calls to rb_first() which is also employed by the
execlists->queue. Switch from our open-coded cache to the library.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180629075348.27358-9-chris@chris-wilson.co.uk
Chris Wilson [Wed, 11 Jul 2018 12:29:52 +0000 (13:29 +0100)]
drm/i915/selftests: Add a safety net to live_workarounds
Since live_workarounds poke around the w/a registers and checks to see
if they survive across a reset, we are prone to fouling the machine and
leaving it in a non-recoverable state. Wrap the probe inside a timeout
to abort the test if the reset fails.
v2: Include GEM_TRACE on declaring wedged.
v3: Add a few includes to make the header look standalone.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107188
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711122952.18448-1-chris@chris-wilson.co.uk
Chris Wilson [Wed, 11 Jul 2018 07:36:02 +0000 (08:36 +0100)]
drm/i915: Introduce i915_address_space.mutex
Add a mutex into struct i915_address_space to be used while operating on
the vma and their lists for a particular vm. As this may be called from
the shrinker, we taint the mutex with fs_reclaim so that from the start
lockdep warns us if we are caught holding the mutex across an
allocation. (With such small steps we will eventually rid ourselves of
struct_mutex recursion!)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180711073608.20286-2-chris@chris-wilson.co.uk
Jernej Skrabec [Tue, 10 Jul 2018 20:35:11 +0000 (22:35 +0200)]
dt-bindings: display: sun4i-drm: Fix order of DW HDMI PHY compatibles
They are currently sorted alphabetically. However, they should be sorted
by release date of the family and then alphabetically.
Fixes:
03c35dbf73e0 ("dt-bindings: display: sun4i-drm: Add description of A64 HDMI PHY")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-19-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:35:10 +0000 (22:35 +0200)]
drm/sun4i: tcon-top: Remove mux configuration at probe time
Now that R40 TCON migrated to runtime mux configuration, old code can be
removed.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-18-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:35:04 +0000 (22:35 +0200)]
drm/sun4i: tcon-top: Add helpers for mux switching
We want to be able to set TCON TOP muxes at runtime. Add helpers for
that.
Old, static configuration of muxes at probe time is preserved for now.
It will be removed when R40 TCON starts using them.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-12-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:35:02 +0000 (22:35 +0200)]
drm/sun4i: mixer: Order includes alphabetically
Includes are not alphabetically ordered.
Reorder them.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-10-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:35:00 +0000 (22:35 +0200)]
drm/sun4i: DW HDMI: Release nodes if error happens during CRTC search
If error happens in sun8i_dw_hdmi_find_possible_crtcs(), nodes are not
released with of_node_put() before returning.
Fix that by calling of_node_put() when necessary. While on it, clean up
the code by using of_graph_get_remote_node() which also lowers number of
cases where error handling has to be performed.
Fixes:
57e23de02f48 ("drm/sun4i: DW HDMI: Expand algorithm for possible crtcs")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-8-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:34:59 +0000 (22:34 +0200)]
dt-bindings: display: sun4i-drm: Add R40 TV TCON description
TCON description is expanded with R40 TV TCON compatible. It is a bit
special, because it is connected to TCON TOP instead directly to mixer
and it needs special handling.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-7-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:34:58 +0000 (22:34 +0200)]
drm/sun4i: tcon: Release node when traversing of graph
Function sun4i_tcon_find_engine_traverse() doesn't release node if it
needs to traverse of graph deeper than 1 level.
Fix this by calling of_node_put().
Fixes:
49836b11fe71 ("drm/sun4i: tcon: Generalize engine search algorithm")
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-6-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:34:57 +0000 (22:34 +0200)]
drm/sun4i: tcon-top: Cleanup clock handling
There is no need to acquire reference to clock just to get its name.
This commit just cleans up the code. There is no functional change.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
[Maxime: Fixed the of_property_match_string error check]
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-5-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:34:55 +0000 (22:34 +0200)]
drm/sun4i: Add R40 display engine compatible
R40 has versatile display pipeline. It supports two simultanious outputs
on various outputs (TVE, VGA, HDMI, MIPI DSI, LCD).
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-3-jernej.skrabec@siol.net
Jernej Skrabec [Tue, 10 Jul 2018 20:34:54 +0000 (22:34 +0200)]
dt-bindings: display: sun4i-drm: Add R40 display engine compatible
R40 has pretty unique display pipeline. It supports two outputs at the
same time.
Possible outputs:
- 1x HDMI,
- 2x TV output
- 1x VGA,
- 1x MIPI DSI and
- 2x LCD outputs
That is the biggest number of possible outputs from all Allwinner SoC.
Because of that, add new compatible for it.
Reviewed-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Maxime Ripard <maxime.ripard@bootlin.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710203511.18454-2-jernej.skrabec@siol.net
Paulo Zanoni [Fri, 4 May 2018 20:32:52 +0000 (13:32 -0700)]
drm/i915: use the ICL stolen memory
Now that our stolen memory is already reserved by the x86 subsystem
(since commit "x86/gpu: reserve ICL's graphics stolen memory"), make
use of it.
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: x86@kernel.org
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180504203252.28048-2-paulo.r.zanoni@intel.com
Paulo Zanoni [Fri, 4 May 2018 20:32:51 +0000 (13:32 -0700)]
x86/gpu: reserve ICL's graphics stolen memory
ICL changes the registers and addresses to 64 bits.
I also briefly looked at implementing an u64 version of the PCI config
read functions, but I concluded this wouldn't be trivial, so it's not
worth doing it for a single user that can't have any racing problems
while reading the register in two separate operations.
v2:
- Scrub the development (non-public) changelog (Joonas).
- Remove the i915.ko bits so this can be easily backported in order
to properly avoid stolen memory even on machines without i915.ko
(Joonas).
- CC stable for the reasons above.
Issue: VIZ-9250
CC: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: x86@kernel.org
Cc: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Fixes:
412310019a20 ("drm/i915/icl: Add initial Icelake definitions.")
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Acked-by: Ingo Molnar <mingo@kernel.org>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180504203252.28048-1-paulo.r.zanoni@intel.com
Thierry Reding [Tue, 10 Jul 2018 10:51:38 +0000 (12:51 +0200)]
drm/panel: p079zca: Use of_device_get_match_data()
Use this helper to get rid of some extra boilerplate code.
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710110127.12315-1-thierry.reding@gmail.com
Dan Carpenter [Wed, 4 Jul 2018 09:38:09 +0000 (12:38 +0300)]
drm/panel: type promotion bug in s6e8aa0_read_mtp_id()
The ARRAY_SIZE() macro is type size_t. If s6e8aa0_dcs_read() returns a
negative error code, then "ret < ARRAY_SIZE(id)" is false because the
negative error code is type promoted to a high positive value.
Fixes:
02051ca06371 ("drm/panel: add S6E8AA0 driver")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180704093807.s3lqsb2v6dg2k43d@kili.mountain
Nickey Yang [Mon, 2 Jul 2018 10:32:28 +0000 (12:32 +0200)]
dt-bindings: Add KINGDISPLAY KD097D04 panel bindings
The KINGDISPLAY KD097D04 is a 9.7" panel with a 1536x2048
resolution and connected to DSI using 8 lanes.
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702103229.3952-3-heiko@sntech.de
Nickey Yang [Mon, 2 Jul 2018 10:32:27 +0000 (12:32 +0200)]
dt-bindings: Add vendor prefix for kingdisplay
Kingdisplay Technology Co., Ltd, established in
China Shenzhen in 2006, is a national high-tech
enterprise specializing in the R&D, manufacturing
and marketing of TFT-LCM and touch panel.
Signed-off-by: Nickey Yang <nickey.yang@rock-chips.com>
Acked-by: Rob Herring <robh@kernel.org>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702103229.3952-2-heiko@sntech.de
Lin Huang [Mon, 2 Jul 2018 10:27:21 +0000 (12:27 +0200)]
drm/panel: p079zca: Support Innolux P097PFG panel
Support Innolux P097PFG 9.7" 1536x2048 TFT LCD panel, it reuse
the Innolux P079ZCA panel driver.
Changes in v2:
- None
Changes in v3:
- None
Changes in v4:
- None
Changes in v5:
- Document source of init-commands
- 4 lanes per DSI interface
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702102721.3546-5-heiko@sntech.de
Lin Huang [Mon, 2 Jul 2018 10:27:20 +0000 (12:27 +0200)]
dt-bindings: Add Innolux P097PFG panel bindings
The Innolux P097PFG panel is 9.7" panel with 1536X2048
resolution, it reuse P079ZCA panel driver, so improve
p079ZCA dt-binding to support P097PFG.
Changes in v2:
- None
Changes in v3:
- None
Changes in v4:
- None
Changes in v5:
- use separate file for binding
- keep power supplies as required
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702102721.3546-4-heiko@sntech.de
Lin Huang [Mon, 2 Jul 2018 10:27:19 +0000 (12:27 +0200)]
drm/panel: p079zca: Add variable unprepare_delay properties
When panel power down, p079zca need delay between reset and disable
power supply, but p097pfg does not need it. Similarly p097zca needs
a delay after entering panel sleep mode. So add two delay properties,
so we can meet these two panel power down sequence.
Signed-off-by: Lin Huang <hl@rock-chips.com>
[add sleep-mode delay]
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702102721.3546-3-heiko@sntech.de
Lin Huang [Mon, 2 Jul 2018 10:27:18 +0000 (12:27 +0200)]
drm/panel: p079zca: Refactor panel driver to support multiple panels
Refactor Innolux P079ZCA panel driver, let it support multi panels from
Innolux that share similar power sequences.
Panels may require different power supplies so use regulator bulk
interfaces and define per panel supply-names.
Changes in v2:
- Change regulator property name to meet the panel datasheet
Changes in v3:
- this patch only refactor P079ZCA panel to support multi panel,
support P097PFG panel in another patch
Changes in v4:
- Modify the patch which suggest by Thierry
Changes in v5:
- use regulator_bulk to handle different supply number
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180702102721.3546-2-heiko@sntech.de
Colin Ian King [Tue, 26 Jun 2018 16:03:54 +0000 (17:03 +0100)]
drm/panel: ili9881c: Fix missing assignment to error return ret
Currently, ret is being checked for an error condition however it
is not being assigned in the previous statement on the call of
function mipi_dsi_dcs_exit_sleep_mode. Add in the missing assignment
of ret.
Detected by CoverityScan, CID#1470174, 1470178 ("Unchecked return value")
Fixes:
26aec25593c2 ("drm/panel: Add Ilitek ILI9881c panel driver")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180626160354.1363-1-colin.king@canonical.com
Michal Vokáč [Mon, 25 Jun 2018 12:41:30 +0000 (14:41 +0200)]
drm/panel: simple: Add support for DataImage SCF0700C48GGU18
This adds support for the DataImage SCF0700C48GGU18 7.0" WVGA (800x480)
TFT LCD panel. The panel has 24-bit parallel interface and can be
supported by the simple panel driver.
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1529930490-11874-2-git-send-email-michal.vokac@ysoft.com
Michal Vokáč [Mon, 25 Jun 2018 12:41:29 +0000 (14:41 +0200)]
dt-bindings: Add DataImage, Inc. vendor prefix
DataImage is a Taiwan-based manufacturer of LCD panels.
Signed-off-by: Michal Vokáč <michal.vokac@ysoft.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1529930490-11874-1-git-send-email-michal.vokac@ysoft.com
Christoph Fritz [Mon, 4 Jun 2018 11:16:48 +0000 (13:16 +0200)]
drm/panel: simple: Add support for Innolux G070Y2-L01
This patch adds support for Innolux G070Y2-L01 7" WVGA (800x480) TFT LCD
panel.
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1528111008.2818.20.camel@googlemail.com
Tomi Valkeinen [Mon, 18 Jun 2018 13:22:40 +0000 (16:22 +0300)]
drm/panel: simple: Add newhaven, nhd-4.3-
480272ef-atxl LCD
Add support for newhaven,nhd-4.3-
480272ef-atxl to panel-simple.
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Cc: Thierry Reding <thierry.reding@gmail.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180618132242.8673-8-tomi.valkeinen@ti.com
Peter Ujfalusi [Mon, 18 Jun 2018 13:22:34 +0000 (16:22 +0300)]
drm: Add support for extracting sync signal drive edge from videomode
The sync in some panels needs to be driven by different edge of the pixel
clock compared to data. This is reflected by the
DISPLAY_FLAGS_SYNC_(POS|NEG)EDGE in videmode flags.
Add similar similar definitions for bus_flags and convert the sync drive
edge via drm_bus_flags_from_videomode().
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180618132242.8673-2-tomi.valkeinen@ti.com
Andrzej Hajda [Tue, 19 Jun 2018 08:19:26 +0000 (10:19 +0200)]
drm/panel: simple: Add support for BOE HV070WSA-100 panel to simple-panel
The patch adds support for BOE HV070WSA-100 WSVGA 7.01 inch panel to the
panel-simple driver. The panel is used in Exynos5250-arndale boards.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Maciej Purski <m.purski@samsung.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1529396370-18761-6-git-send-email-m.purski@samsung.com
Andrzej Hajda [Tue, 19 Jun 2018 08:19:25 +0000 (10:19 +0200)]
dt-bindings: display: Add DT bindings for BOE HV070WSA-100 panel
The patch adds bindings to BOE HV070-WSA WSVGA panel. Bindings are
compatible with simple panel bindings.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Signed-off-by: Maciej Purski <m.purski@samsung.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1529396370-18761-5-git-send-email-m.purski@samsung.com
Boris Brezillon [Wed, 9 May 2018 13:00:42 +0000 (15:00 +0200)]
drm/vc4: Support the case where the DSI device is disabled
Having a device with a status property != "okay" in the DT is a valid
use case, and we should not prevent the registration of the DRM device
when the DSI device connected to the DSI controller is disabled.
Consider the ENODEV return code as a valid result and do not expose the
DSI encoder/connector when it happens.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180509130042.9435-5-boris.brezillon@bootlin.com
Boris Brezillon [Wed, 9 May 2018 13:00:41 +0000 (15:00 +0200)]
drm/of: Make drm_of_find_panel_or_bridge() fail when the device is disabled
There's no point searching for a drm_bridge or drm_panel if the OF node
we're pointing has a status property that is not "okay" or "ok". Just
return -ENODEV in this case.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180509130042.9435-4-boris.brezillon@bootlin.com
Boris Brezillon [Wed, 9 May 2018 13:00:40 +0000 (15:00 +0200)]
drm/panel: Let of_drm_find_panel() return -ENODEV when the panel is disabled
DT nodes might be present in the DT but with a status property set to
"disabled" or "fail". In this case, we should not return -EPROBE_DEFER
when the caller asks for a drm_panel instance. Return -ENODEV instead.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Reviewed-by: Thierry Reding <treding@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180509130042.9435-3-boris.brezillon@bootlin.com
Boris Brezillon [Wed, 9 May 2018 13:00:39 +0000 (15:00 +0200)]
drm/panel: Make of_drm_find_panel() return an ERR_PTR() instead of NULL
Right now, the DRM panel logic returns NULL when a panel pointing to
the passed OF node is not present in the list of registered panels.
Most drivers interpret this NULL value as -EPROBE_DEFER, but we are
about to modify the semantic of of_drm_find_panel() and let the
framework return -ENODEV when the device node we're pointing to has
a status property that is not equal to "okay" or "ok".
Let's first patch the of_drm_find_panel() implementation to return
ERR_PTR(-EPROBE_DEFER) instead of NULL and patch all callers to replace
the '!panel' check by an 'IS_ERR(panel)' one.
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180509130042.9435-2-boris.brezillon@bootlin.com
Philipp Zabel [Wed, 23 May 2018 09:25:04 +0000 (11:25 +0200)]
drm/panel: simple: Add DLC DLC0700YZG-1 panel
This patch adds support for DLC DLC0700YZG-1 1024x600 LVDS panels
to the simple-panel driver.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
[m.felsch@pengutronix.de: fix typo in compatible dt-binding]
[m.felsch@pengutronix.de: add property bindings]
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Eric Anholt <eric@anholt.net>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180523092504.5142-3-m.felsch@pengutronix.de
Philipp Zabel [Wed, 23 May 2018 09:25:03 +0000 (11:25 +0200)]
dt-bindings: Add vendor prefix for DLC Display Co., Ltd.
DLC provides a wide range of display solutions.
Website: http://www.dlcdisplay.com/
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180523092504.5142-2-m.felsch@pengutronix.de
Jan Tuerk [Tue, 19 Jun 2018 09:55:45 +0000 (11:55 +0200)]
drm/panel: Add support for the EDT ETM0700G0EDH6
The Emerging Display Technology ETM0700G0EDH6 is the
uses the same panel as the ETM0700G0BDH6. It differs
in the hardware design for the backlight and the
touchscreen i2c interface. As the new display type has
different requirements for drive-strengths on the i2c-bus,
add an additional compatible to allow the handling of it or warn
about incompatible cpu and display combinations.
Signed-off-by: Jan Tuerk <jan.tuerk@emtrion.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180619095546.24445-3-jan.tuerk@emtrion.com
Jan Tuerk [Tue, 19 Jun 2018 09:55:44 +0000 (11:55 +0200)]
drm/panel: Add support for the EDT ETM0700G0BDH6
The Emerging Display Technology ETM0700G0BDH6 is exactly
the same display as the ETM0700G0DH6, exept the pixelclock
polarity. Therefore re-use the ETM0700G0DH6 modes. It is
used by default on emtrion Avari based development kits.
Signed-off-by: Jan Tuerk <jan.tuerk@emtrion.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180619095546.24445-2-jan.tuerk@emtrion.com
Jan Tuerk [Tue, 19 Jun 2018 09:55:43 +0000 (11:55 +0200)]
dt-bindings: display: Document the EDT et* displays in one file.
Document the Emerging Display Technology Corp. (EDT) using the
simple-panel binding in one single file.
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Jan Tuerk <jan.tuerk@emtrion.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180619095546.24445-1-jan.tuerk@emtrion.com
Jagan Teki [Thu, 7 Jun 2018 13:46:48 +0000 (19:16 +0530)]
drm/panel: simple: Add support for Rocktech RK070ER9427 LCD panel
This adds support for the Rocktech Display Ltd. RK070ER9427
800(RGB)x480 TFT LCD panel, which can be supported by the
simple panel driver.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180607134648.2902-1-jagan@amarulasolutions.com
Chris Wilson [Tue, 10 Jul 2018 14:38:21 +0000 (15:38 +0100)]
drm/i915: Unwind HW init after GVT setup failure
Following intel_gvt_init() failure, we missed unwinding our setup
leaving pointers dangling past the module unload. For our example, the
pm_qos:
[ 441.057615] top:
000000006b3baf1c, n:
0000000054d8ef33, p:
0000000097cdf1a2
prev:
0000000054d8ef33, n:
0000000097cdf1a2, p:
000000006b3baf1c
next:
0000000097cdf1a2, n:
000000006de8fc8b, p:
0000000081087253
[ 441.057627] WARNING: CPU: 4 PID: 9277 at lib/plist.c:42 plist_check_prev_next+0x2d/0x40
[ 441.057628] Modules linked in: i915(+) vgem snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic x86_pkg_temp_thermal intel_powerclamp coretemp crct10dif_pclmul crc32_pclmul ghash_clmulni_intel snd_hda_codec snd_hwdep snd_hda_core e1000e snd_pcm mei_me mei prime_numbers [last unloaded: i915]
[ 441.057652] CPU: 4 PID: 9277 Comm: drv_selftest Tainted: G U 4.18.0-rc4-CI-CI_DRM_4464+ #1
[ 441.057653] Hardware name: System manufacturer System Product Name/Z170 PRO GAMING, BIOS 3402 04/26/2017
[ 441.057656] RIP: 0010:plist_check_prev_next+0x2d/0x40
[ 441.057657] Code: 08 48 39 f0 74 2b 49 89 f0 48 8b 4f 08 50 ff 32 52 48 89 fe 41 ff 70 08 48 8b 17 48 c7 c7 d8 ae 14 82 4d 8b 08 e8 63 0e 76 ff <0f> 0b 48 83 c4 20 c3 48 39 10 75 d0 f3 c3 0f 1f 44 00 00 41 54 55
[ 441.057717] RSP: 0018:
ffffc900003a3a68 EFLAGS:
00010082
[ 441.057720] RAX:
0000000000000000 RBX:
ffff8802193978c0 RCX:
0000000000000002
[ 441.057721] RDX:
0000000080000002 RSI:
ffffffff820c65a4 RDI:
00000000ffffffff
[ 441.057722] RBP:
ffff8802193978c0 R08:
0000000000000000 R09:
0000000000000001
[ 441.057724] R10:
ffffc900003a3a70 R11:
0000000000000000 R12:
ffffffff82243de0
[ 441.057725] R13:
ffffffff82243de0 R14:
ffff88021a6c78c0 R15:
0000000077359400
[ 441.057726] FS:
00007fc23a4a9980(0000) GS:
ffff880236d00000(0000) knlGS:
0000000000000000
[ 441.057728] CS: 0010 DS: 0000 ES: 0000 CR0:
0000000080050033
[ 441.057729] CR2:
0000563e4503d038 CR3:
0000000138f86005 CR4:
00000000003606e0
[ 441.057730] DR0:
0000000000000000 DR1:
0000000000000000 DR2:
0000000000000000
[ 441.057731] DR3:
0000000000000000 DR6:
00000000fffe0ff0 DR7:
0000000000000400
[ 441.057732] Call Trace:
[ 441.057736] plist_check_list+0x2e/0x40
[ 441.057738] plist_add+0x23/0x130
[ 441.057743] pm_qos_update_target+0x1bd/0x2f0
[ 441.057771] i915_driver_load+0xec4/0x1060 [i915]
[ 441.057775] ? trace_hardirqs_on_caller+0xe0/0x1b0
[ 441.057800] i915_pci_probe+0x29/0x90 [i915]
[ 441.057804] pci_device_probe+0xa1/0x130
[ 441.057807] driver_probe_device+0x306/0x480
[ 441.057810] __driver_attach+0xdb/0x100
[ 441.057812] ? driver_probe_device+0x480/0x480
[ 441.057813] ? driver_probe_device+0x480/0x480
[ 441.057816] bus_for_each_dev+0x74/0xc0
[ 441.057819] bus_add_driver+0x15f/0x250
[ 441.057821] ? 0xffffffffa0696000
[ 441.057823] driver_register+0x56/0xe0
[ 441.057825] ? 0xffffffffa0696000
[ 441.057827] do_one_initcall+0x58/0x370
[ 441.057830] ? do_init_module+0x1d/0x1ea
[ 441.057832] ? rcu_read_lock_sched_held+0x6f/0x80
[ 441.057834] ? kmem_cache_alloc_trace+0x282/0x2e0
[ 441.057838] do_init_module+0x56/0x1ea
[ 441.057841] load_module+0x2435/0x2b20
[ 441.057852] ? __se_sys_finit_module+0xd3/0xf0
[ 441.057854] __se_sys_finit_module+0xd3/0xf0
[ 441.057861] do_syscall_64+0x55/0x190
[ 441.057863] entry_SYSCALL_64_after_hwframe+0x49/0xbe
[ 441.057865] RIP: 0033:0x7fc239d75839
[ 441.057866] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
[ 441.057927] RSP: 002b:
00007fffb7825d38 EFLAGS:
00000246 ORIG_RAX:
0000000000000139
[ 441.057930] RAX:
ffffffffffffffda RBX:
0000563e45035dd0 RCX:
00007fc239d75839
[ 441.057931] RDX:
0000000000000000 RSI:
0000563e4502f8a0 RDI:
0000000000000004
[ 441.057932] RBP:
0000563e4502f8a0 R08:
0000000000000004 R09:
0000000000000000
[ 441.057933] R10:
00007fffb7825ea0 R11:
0000000000000246 R12:
0000000000000000
[ 441.057934] R13:
0000563e4502f690 R14:
0000000000000000 R15:
000000000000003f
[ 441.057940] irq event stamp: 231338
[ 441.057943] hardirqs last enabled at (231337): [<
ffffffff8193e3fc>] _raw_spin_unlock_irqrestore+0x4c/0x60
[ 441.057944] hardirqs last disabled at (231338): [<
ffffffff8193e26d>] _raw_spin_lock_irqsave+0xd/0x50
[ 441.057947] softirqs last enabled at (231024): [<
ffffffff81c0034f>] __do_softirq+0x34f/0x505
[ 441.057949] softirqs last disabled at (231005): [<
ffffffff8108c7b9>] irq_exit+0xa9/0xc0
[ 441.057951] WARNING: CPU: 4 PID: 9277 at lib/plist.c:42 plist_check_prev_next+0x2d/0x40
v2: Add a load failure point to intel_gvt_init() so that we always
exercise this path in future.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=107129
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Cc: Michał Winiarski <michal.winiarski@intel.com>
Reviewed-by: Michał Winiarski <michal.winiarski@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710143821.1889-1-chris@chris-wilson.co.uk
Chris Wilson [Tue, 10 Jul 2018 09:44:21 +0000 (10:44 +0100)]
drm/i915: Cleanup modesetting on load-error path
After handling a critical failure initialising GEM we need to unwind the
modesetting setup.
Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710094421.16223-2-chris@chris-wilson.co.uk
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Chris Wilson [Tue, 10 Jul 2018 09:44:20 +0000 (10:44 +0100)]
drm/i915: Flush the residual parking on emergency shutdown
On unwinding following a critical failure inside GEM init, we also need
to be sure to flush the workers before unloading the module.
Testcase: igt/drv_module_reload/basic-reload-inject
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710094421.16223-1-chris@chris-wilson.co.uk
Noralf Trønnes [Tue, 3 Jul 2018 16:03:54 +0000 (18:03 +0200)]
drm/cma-helper: Remove drm_fb_cma_fbdev_init_with_funcs()
Remove drm_fb_cma_fbdev_init_with_funcs(), its only user tinydrm has
moved to drm_fbdev_generic_setup().
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-9-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:53 +0000 (18:03 +0200)]
drm/tinydrm: Use drm_fbdev_generic_setup()
Make full use of the generic fbdev client.
Cc: David Lechner <david@lechnology.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: David Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-8-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:52 +0000 (18:03 +0200)]
drm/fb-helper: Finish the generic fbdev emulation
This adds a drm_fbdev_generic_setup() function that sets up generic
fbdev emulation with client callbacks for restore, hotplug and
unregister.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-7-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:51 +0000 (18:03 +0200)]
drm/debugfs: Add internal client debugfs file
Print the names of the internal clients currently attached.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-6-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:50 +0000 (18:03 +0200)]
drm/cma-helper: Use the generic fbdev emulation
This switches the CMA helper drivers that use its fbdev emulation over
to the generic fbdev emulation. It's the first phase of using generic
fbdev. A later phase will use DRM client callbacks for the
lastclose/hotplug/remove callbacks.
There are currently 2 fbdev init/fini functions:
- drm_fb_cma_fbdev_init/drm_fb_cma_fbdev_fini
- drm_fbdev_cma_init/drm_fbdev_cma_fini
This is because the work on generic fbdev came up during a fbdev
refactoring and thus wasn't completed. No point in completing that
refactoring when drivers will soon move to drm_fb_helper_generic_probe().
tinydrm uses drm_fb_cma_fbdev_init_with_funcs().
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-5-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:49 +0000 (18:03 +0200)]
drm/pl111: Set .gem_prime_vmap and .gem_prime_mmap
These are needed for pl111 to use the generic fbdev emulation.
Cc: Eric Anholt <eric@anholt.net>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Eric Anholt <eric@anholt.net>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-4-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:48 +0000 (18:03 +0200)]
drm/fb-helper: Add generic fbdev emulation .fb_probe function
This is the first step in getting generic fbdev emulation.
A drm_fb_helper_funcs.fb_probe function is added which uses the
DRM client API to get a framebuffer backed by a dumb buffer.
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-3-noralf@tronnes.org
Noralf Trønnes [Tue, 3 Jul 2018 16:03:47 +0000 (18:03 +0200)]
drm: Begin an API for in-kernel clients
This the beginning of an API for in-kernel clients.
First out is a way to get a framebuffer backed by a dumb buffer.
Only GEM drivers are supported.
The original idea of using an exported dma-buf was dropped because it
also creates an anonomous file descriptor which doesn't work when the
buffer is created from a kernel thread. The easy way out is to use
drm_driver.gem_prime_vmap to get the virtual address, which requires a
GEM object. This excludes the vmwgfx driver which is the only non-GEM
driver apart from the legacy ones. A solution for vmwgfx will have to be
worked out later if it wants to support the client API which it probably
will when we have a bootsplash client.
Suggested-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Noralf Trønnes <noralf@tronnes.org>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180703160354.59955-2-noralf@tronnes.org
Chris Wilson [Mon, 9 Jul 2018 13:02:04 +0000 (14:02 +0100)]
drm/i915: Tidy i915_gem_suspend()
In the next patch, we will make a fairly minor change to flush
outstanding resets before suspend. In order to keep churn to a minimum
in that functional patch, we fix up the comments and coding style now.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709130208.11730-7-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 13:01:59 +0000 (14:01 +0100)]
drm/i915: Only reset hangcheck at the start of an activity cycle
Across a reset, the seqno (and thus hangcheck) should restart and the
hangcheck naturally progress, for when it does not, we want to declare an
emergency. Currently, we only detect if reset and reinit fails, but we
do not detect if the call to reinit succeeds but the HW is fried - as we
are resetting hangcheck on initialisation the engine. Remove that and
rely on the natural progress to reset the hangcheck timer.
References:
e21b141376f9 ("drm/i915: Mark the hangcheck as idle when unparking the engines")
References:
1fd00c0faeec ("drm/i915: Declare the driver wedged if hangcheck makes no progress")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709130208.11730-2-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 19:49:15 +0000 (20:49 +0100)]
drm/i915/selftests: Filter out both physical address swizzles
In our swizzling selftests, we cannot predict the physical address of
the target page (at least not simply!) and so skip bit17 swizzles.
However, there are two bit17 swizzle modes and we only skipped one, with
the second being observed on the lab gdg causing the test to fail,
as soon as we hit a page with bit17 set in its address.
Testcase: igt/drv_selftest/live_objects #gdg
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709194915.5789-1-chris@chris-wilson.co.uk
Chris Wilson [Tue, 10 Jul 2018 08:04:24 +0000 (09:04 +0100)]
drm/i915/selftests: Constrain mock_gtt tests to fit within RAM
Be pessimistic and presume that we actually allocate every page we
exercise via the mock_gtt (e.g. for gvt). In which case we have to keep
our working set under the available physical memory to prevent oom.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Matthew Auld <matthew.auld@intel.com>
Reviewed-by: Matthew Auld <matthew.auld@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180710080424.7821-1-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 13:48:58 +0000 (14:48 +0100)]
drm/i915: Remove function details from device error messages
Error messages are intended to be addressed to the user; be clear,
succinct, instructive and unambiguous. Adding the function name to
that message does not add any information the user requires and in
the process makes the message less clear.
E.g.
[ 245.539711] i915 0000:00:02.0: [drm:i915_gem_init [i915]] Failed to initialize GPU, declaring it wedged!
becomes
[ 245.539711] i915 0000:00:02.0: Failed to initialize GPU, declaring it wedged!
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709134858.12446-1-chris@chris-wilson.co.uk
Hang Yuan [Mon, 9 Jul 2018 10:24:10 +0000 (18:24 +0800)]
drm/i915/gvt: declare gvt as i915's soft dependency
This helps initramfs builder and other tools to know the full dependencies
of i915 and have gvt module loaded with i915.
v2: add condition and change to pre-dependency (Chris)
v3: move declaration to gvt.c. (Chris)
v4: remove xengt (Zhenyu)
Signed-off-by: Hang Yuan <hang.yuan@linux.intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com>
Dave Airlie [Tue, 10 Jul 2018 01:13:36 +0000 (11:13 +1000)]
Merge tag 'vmwgfx-next-4.19-3' of git://people.freedesktop.org/~thomash/linux into drm-next
This introduces a header update and support for multisample surfaces.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/d020efb8-776d-5e8f-9d9f-122591e074d6@vmware.com
Dave Airlie [Tue, 10 Jul 2018 01:05:46 +0000 (11:05 +1000)]
Merge tag 'vmwgfx-next-4.19-2' of git://people.freedesktop.org/~thomash/linux into drm-next
A series of cleanups / reorganizations and modesetting changes that
mostly target atomic state validation.
[airlied: conflicts with SPDX stuff in amdgpu tree]
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1a88485e-e509-b00e-8485-19194f074115@vmware.com
Dave Airlie [Tue, 10 Jul 2018 00:57:02 +0000 (10:57 +1000)]
Merge branch 'drm-next-4.19' of git://people.freedesktop.org/~agd5f/linux into drm-next
More features for 4.19:
- Use core pcie functionality rather than duplicating our own for pcie
gens and lanes
- Scheduler function naming cleanups
- More documentation
- Reworked DC/Powerplay interfaces to improve power savings
- Initial stutter mode support for RV (power feature)
- Vega12 powerplay updates
- GFXOFF fixes
- Misc fixes
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180705221447.2807-1-alexander.deucher@amd.com
Dave Airlie [Tue, 10 Jul 2018 00:46:42 +0000 (10:46 +1000)]
Merge tag 'tilcdc-4.19' of https://github.com/jsarha/linux into drm-next
tilcdc pull request for v4.19
Single fix to defer probing.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/a10f5b43-7711-6b80-1bc3-0dfce65c628f@ti.com
Rodrigo Vivi [Mon, 9 Jul 2018 22:39:27 +0000 (15:39 -0700)]
drm/i915: Update DRIVER_DATE to
20180709
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Arnd Bergmann [Mon, 9 Jul 2018 15:48:18 +0000 (17:48 +0200)]
drm: vkms: select DRM_KMS_HELPER
Without this, we get link errors during randconfig build:
drivers/gpu/drm/vkms/vkms_drv.o:(.rodata+0xa0): undefined reference to `drm_atomic_helper_check'
drivers/gpu/drm/vkms/vkms_drv.o:(.rodata+0xa8): undefined reference to `drm_atomic_helper_commit'
drivers/gpu/drm/vkms/vkms_plane.o:(.rodata+0x0): undefined reference to `drm_atomic_helper_update_plane'
drivers/gpu/drm/vkms/vkms_plane.o:(.rodata+0x8): undefined reference to `drm_atomic_helper_disable_plane'
drivers/gpu/drm/vkms/vkms_plane.o:(.rodata+0x18): undefined reference to `drm_atomic_helper_plane_reset'
drivers/gpu/drm/vkms/vkms_plane.o:(.rodata+0x28): undefined reference to `drm_atomic_helper_plane_duplicate_state'
drivers/gpu/drm/vkms/vkms_plane.o:(.rodata+0x30): undefined reference to `drm_atomic_helper_plane_destroy_state'
drivers/gpu/drm/vkms/vkms_output.o:(.rodata+0x1c0): undefined reference to `drm_helper_probe_single_connector_modes'
drivers/gpu/drm/vkms/vkms_crtc.o:(.rodata+0x40): undefined reference to `drm_atomic_helper_crtc_reset'
drivers/gpu/drm/vkms/vkms_crtc.o:(.rodata+0x70): undefined reference to `drm_atomic_helper_set_config'
drivers/gpu/drm/vkms/vkms_crtc.o:(.rodata+0x78): undefined reference to `drm_atomic_helper_page_flip'
drivers/gpu/drm/vkms/vkms_crtc.o:(.rodata+0x90): undefined reference to `drm_atomic_helper_crtc_duplicate_state'
drivers/gpu/drm/vkms/vkms_crtc.o:(.rodata+0x98): undefined reference to `drm_atomic_helper_crtc_destroy_state'
Fixes:
854502fa0a38 ("drm/vkms: Add basic CRTC initialization")
Fixes:
1c7c5fd916a0 ("drm/vkms: Introduce basic VKMS driver")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709154901.1989316-1-arnd@arndb.de
Chris Wilson [Mon, 9 Jul 2018 13:01:58 +0000 (14:01 +0100)]
drm/i915/selftests: Prevent background reaping of active objects
igt_mmap_offset_exhaustion() wants to test what happens when the mmap
space is filled with zombie objects, objects discarded by userspace but
still active on the GPU. As they are only protected by the active
reference, we have to be certain that active reference is kept while we
peek into our dangling pointer. That active reference should not be
freed until we retire, but we do that retirement from a background
thread. This leaves us with a subtle timing problem, exacerbated and
highlighted by KASAN:
<3>[ 132.380399] BUG: KASAN: use-after-free in drm_gem_create_mmap_offset+0x8c/0xd0
<3>[ 132.380430] Read of size 8 at addr
ffff8801e13245f8 by task drv_selftest/5822
<4>[ 132.380470] CPU: 0 PID: 5822 Comm: drv_selftest Tainted: G U 4.18.0-rc3-g7ae7763aa2be-kasan_48+ #1
<4>[ 132.380473] Hardware name: Dell Inc. XPS 8300 /0Y2MRG, BIOS A06 10/17/2011
<4>[ 132.380475] Call Trace:
<4>[ 132.380481] dump_stack+0x7c/0xbb
<4>[ 132.380487] print_address_description+0x65/0x270
<4>[ 132.380493] kasan_report+0x25b/0x380
<4>[ 132.380497] ? drm_gem_create_mmap_offset+0x8c/0xd0
<4>[ 132.380503] drm_gem_create_mmap_offset+0x8c/0xd0
<4>[ 132.380584] i915_gem_object_create_mmap_offset+0x6d/0x100 [i915]
<4>[ 132.380650] igt_mmap_offset_exhaustion+0x462/0x940 [i915]
<4>[ 132.380714] ? i915_gem_close_object+0x740/0x740 [i915]
<4>[ 132.380784] ? igt_gem_huge+0x269/0x3d0 [i915]
<4>[ 132.380865] __i915_subtests+0x5a/0x160 [i915]
<4>[ 132.380936] __run_selftests+0x1a2/0x2f0 [i915]
<4>[ 132.381008] i915_live_selftests+0x4e/0x80 [i915]
<4>[ 132.381071] i915_pci_probe+0xd8/0x1b0 [i915]
<4>[ 132.381077] pci_device_probe+0x1c5/0x3a0
<4>[ 132.381087] driver_probe_device+0x6b6/0xcb0
<4>[ 132.381094] __driver_attach+0x22d/0x2c0
<4>[ 132.381100] ? driver_probe_device+0xcb0/0xcb0
<4>[ 132.381103] bus_for_each_dev+0x113/0x1a0
<4>[ 132.381108] ? check_flags.part.24+0x450/0x450
<4>[ 132.381112] ? subsys_dev_iter_exit+0x10/0x10
<4>[ 132.381123] bus_add_driver+0x38b/0x6e0
<4>[ 132.381131] driver_register+0x189/0x400
<4>[ 132.381136] ? 0xffffffffc12d8000
<4>[ 132.381140] do_one_initcall+0xa0/0x4c0
<4>[ 132.381145] ? initcall_blacklisted+0x180/0x180
<4>[ 132.381152] ? do_init_module+0x4a/0x54c
<4>[ 132.381156] ? rcu_lockdep_current_cpu_online+0xdc/0x130
<4>[ 132.381161] ? kasan_unpoison_shadow+0x30/0x40
<4>[ 132.381169] do_init_module+0x1b5/0x54c
<4>[ 132.381177] load_module+0x619e/0x9b70
<4>[ 132.381202] ? module_frob_arch_sections+0x20/0x20
<4>[ 132.381211] ? vfs_read+0x257/0x2f0
<4>[ 132.381214] ? vfs_read+0x257/0x2f0
<4>[ 132.381221] ? kernel_read+0x8b/0x130
<4>[ 132.381231] ? copy_strings_kernel+0x120/0x120
<4>[ 132.381244] ? __se_sys_finit_module+0x17c/0x1a0
<4>[ 132.381248] __se_sys_finit_module+0x17c/0x1a0
<4>[ 132.381252] ? __ia32_sys_init_module+0xa0/0xa0
<4>[ 132.381261] ? __se_sys_newstat+0x77/0xd0
<4>[ 132.381265] ? cp_new_stat+0x590/0x590
<4>[ 132.381269] ? kmem_cache_free+0x2f0/0x340
<4>[ 132.381285] do_syscall_64+0x97/0x400
<4>[ 132.381292] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<4>[ 132.381295] RIP: 0033:0x7eff4af46839
<4>[ 132.381297] Code: 00 f3 c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 40 00 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d 1f f6 2c 00 f7 d8 64 89 01 48
<4>[ 132.381426] RSP: 002b:
00007ffcd84f4cf8 EFLAGS:
00000246 ORIG_RAX:
0000000000000139
<4>[ 132.381432] RAX:
ffffffffffffffda RBX:
000055dfdeb429a0 RCX:
00007eff4af46839
<4>[ 132.381435] RDX:
0000000000000000 RSI:
000055dfdeb43670 RDI:
0000000000000004
<4>[ 132.381437] RBP:
000055dfdeb43670 R08:
0000000000000004 R09:
0000000000000000
<4>[ 132.381440] R10:
00007ffcd84f4e60 R11:
0000000000000246 R12:
0000000000000000
<4>[ 132.381442] R13:
000055dfdeb3bec0 R14:
0000000000000000 R15:
000000000000003b
<3>[ 132.381466] Allocated by task 5822:
<4>[ 132.381485] kmem_cache_alloc+0xdf/0x2e0
<4>[ 132.381546] i915_gem_object_create_internal+0x24/0x1e0 [i915]
<4>[ 132.381609] igt_mmap_offset_exhaustion+0x257/0x940 [i915]
<4>[ 132.381677] __i915_subtests+0x5a/0x160 [i915]
<4>[ 132.381742] __run_selftests+0x1a2/0x2f0 [i915]
<4>[ 132.381806] i915_live_selftests+0x4e/0x80 [i915]
<4>[ 132.381865] i915_pci_probe+0xd8/0x1b0 [i915]
<4>[ 132.381868] pci_device_probe+0x1c5/0x3a0
<4>[ 132.381871] driver_probe_device+0x6b6/0xcb0
<4>[ 132.381874] __driver_attach+0x22d/0x2c0
<4>[ 132.381877] bus_for_each_dev+0x113/0x1a0
<4>[ 132.381880] bus_add_driver+0x38b/0x6e0
<4>[ 132.381884] driver_register+0x189/0x400
<4>[ 132.381886] do_one_initcall+0xa0/0x4c0
<4>[ 132.381889] do_init_module+0x1b5/0x54c
<4>[ 132.381892] load_module+0x619e/0x9b70
<4>[ 132.381895] __se_sys_finit_module+0x17c/0x1a0
<4>[ 132.381898] do_syscall_64+0x97/0x400
<4>[ 132.381901] entry_SYSCALL_64_after_hwframe+0x49/0xbe
<3>[ 132.381914] Freed by task 150:
<4>[ 132.381931] kmem_cache_free+0xb7/0x340
<4>[ 132.381995] __i915_gem_free_objects+0x875/0xf50 [i915]
<4>[ 132.382054] __i915_gem_free_work+0x69/0xb0 [i915]
<4>[ 132.382058] process_one_work+0x78b/0x1740
<4>[ 132.382061] worker_thread+0x82/0xb80
<4>[ 132.382064] kthread+0x30c/0x3d0
<4>[ 132.382067] ret_from_fork+0x3a/0x50
<3>[ 132.382081] The buggy address belongs to the object at
ffff8801e1324500
which belongs to the cache drm_i915_gem_object of size 1168
<3>[ 132.382133] The buggy address is located 248 bytes inside of
1168-byte region [
ffff8801e1324500,
ffff8801e1324990)
<3>[ 132.382179] The buggy address belongs to the page:
<0>[ 132.382202] page:
ffffea000784c800 count:1 mapcount:0 mapping:
ffff8801dedf6500 index:0xffff8801e1323ec0 compound_mapcount: 0
<0>[ 132.382251] flags: 0x8000000000008100(slab|head)
<1>[ 132.382274] raw:
8000000000008100 ffff8801d6317440 ffff8801d6317440 ffff8801dedf6500
<1>[ 132.382307] raw:
ffff8801e1323ec0 0000000000140013 00000001ffffffff 0000000000000000
<1>[ 132.382339] page dumped because: kasan: bad access detected
<3>[ 132.382373] Memory state around the buggy address:
<3>[ 132.382395]
ffff8801e1324480: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
<3>[ 132.382426]
ffff8801e1324500: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
<3>[ 132.382457] >
ffff8801e1324580: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
<3>[ 132.382488] ^
<3>[ 132.382517]
ffff8801e1324600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
<3>[ 132.382548]
ffff8801e1324680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
This patch tricks the system into running without the background retire
thread, until after we finish the test. The only reaping should then be
performed by the mmap offset routine to reclaim the space as required.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709130208.11730-1-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 12:20:44 +0000 (13:20 +0100)]
drm/i915/selftests: Replace wait-on-timeout with explicit timeout
In igt_flush_test() we install a background timer in order to ensure
that the wait completes within a certain time. We can now tell the wait
that it has to complete within a timeout, and so no longer need the
background timer.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709122044.7028-3-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 12:20:43 +0000 (13:20 +0100)]
drm/i915: Provide a timeout to i915_gem_wait_for_idle() on setup
With a broken GPU we expect it to fail during the initial
GPU setup where do a couple of context switches to record the defaults.
This is a task that takes a few milliseconds even on the slowest of
devices, but we may have to wait 60s for hangcheck to give in and
declare the machine inoperable. In this a case where any gpu hang is
unacceptable, both from a timeliness and practical standpoint.
We can therefore set a timeout on our wait-for-idle that is shorter than
the hangcheck (which may be up to 60s for a declaring a wedged driver)
and so detect the broken GPU much more quickly during driver load (and
so prevent stalling userspace for ages).
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709122044.7028-2-chris@chris-wilson.co.uk
Chris Wilson [Mon, 9 Jul 2018 12:20:42 +0000 (13:20 +0100)]
drm/i915: Provide a timeout to i915_gem_wait_for_idle()
Usually we have no idea about the upper bound we need to wait to catch
up with userspace when idling the device, but in a few situations we
know the system was idle beforehand and can provide a short timeout in
order to very quickly catch a failure, long before hangcheck kicks in.
In the following patches, we will use the timeout to curtain two overly
long waits, where we know we can expect the GPU to complete within a
reasonable time or declare it broken.
In particular, with a broken GPU we expect it to fail during the initial
GPU setup where do a couple of context switches to record the defaults.
This is a task that takes a few milliseconds even on the slowest of
devices, but we may have to wait 60s for hangcheck to give in and
declare the machine inoperable. In this a case where any gpu hang is
unacceptable, both from a timeliness and practical standpoint.
The other improvement is that in selftests, we do not need to arm an
independent timer to inject a wedge, as we can just limit the timeout on
the wait directly.
v2: Include the timeout parameter in the trace.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Cc: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Reviewed-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20180709122044.7028-1-chris@chris-wilson.co.uk