Alex Deucher
14fdf44482
drm/amdgpu: add atpx quirk handling (v2)
...
commit 052c299080 upstream.
Add quirks for handling PX/HG systems. In this case, add
a quirk for a weston dGPU that only seems to properly power
down using ATPX power control rather than HG (_PR3).
v2: append a new weston XT
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Junwei Zhang <Jerry.Zhang@amd.com > (v2)
Reviewed-and-Tested-by: Junwei Zhang <Jerry.Zhang@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:44 +01:00
Alex Deucher
30537deb08
drm/amdgpu: only check mmBIF_IOV_FUNC_IDENTIFIER on tonga/fiji
...
commit 57ad33a307 upstream.
We only support SR-IOV on tonga/fiji. Don't check this register
on other VI parts.
Fixes: 048765ad5a (amdgpu: fix asic initialization for virtualized environments (v2))
Reviewed-by: Xiangliang Yu <Xiangliang.Yu@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:44 +01:00
Alex Deucher
46c1e4023b
drm/amdgpu: Add dpm quirk for Jet PRO (v2)
...
commit f2e5262f75 upstream.
Fixes stability issues.
v2: clamp sclk to 600 Mhz
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103370
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:44 +01:00
Huang Rui
68de83c13b
drm/amdgpu: disable MMHUB power gating on raven
...
commit 400b6afbaa upstream.
MMHUB power gating still has issue, and doesn't work on raven at current. So
disable it for the moment.
Signed-off-by: Huang Rui <ray.huang@amd.com >
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com >
Acked-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:44 +01:00
Chris Wilson
8ac8aa5eba
drm: Handle unexpected holes in color-eviction
...
commit b8ff180281 upstream.
During eviction, the driver may free more than one hole in the drm_mm
due to the side-effects in evicting the scanned nodes. However,
drm_mm_scan_color_evict() expects that the scan result is the first
available hole (in the mru freed hole_stack list):
kernel BUG at drivers/gpu/drm/drm_mm.c:844!
invalid opcode: 0000 [#1 ] PREEMPT SMP KASAN PTI
Dumping ftrace buffer:
(ftrace buffer empty)
Modules linked in: i915 snd_hda_codec_analog snd_hda_codec_generic coretemp snd_hda_intel snd_hda_codec snd_hwdep snd_hda_core lpc_ich snd_pcm e1000e mei_me prime_numbers mei
CPU: 1 PID: 1490 Comm: gem_userptr_bli Tainted: G U 4.16.0-rc1-g740f57c54ecf-kasan_6+ #1
Hardware name: Dell Inc. OptiPlex 755 /0PU052, BIOS A08 02/19/2008
RIP: 0010:drm_mm_scan_color_evict+0x2b8/0x3d0
RSP: 0018:ffff880057a573f8 EFLAGS: 00010287
RAX: ffff8800611f5980 RBX: ffff880057a575d0 RCX: dffffc0000000000
RDX: 00000000029d5000 RSI: 1ffff1000af4aec1 RDI: ffff8800611f5a10
RBP: ffff88005ab884d0 R08: ffff880057a57600 R09: 000000000afff000
R10: 1ffff1000b5710b5 R11: 0000000000001000 R12: 1ffff1000af4ae82
R13: ffff8800611f59b0 R14: ffff8800611f5980 R15: ffff880057a57608
FS: 00007f2de0c2e8c0(0000) GS:ffff88006ac40000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f2ddde1e000 CR3: 00000000609b2000 CR4: 00000000000006e0
Call Trace:
? drm_mm_scan_remove_block+0x330/0x330
? drm_mm_scan_remove_block+0x151/0x330
i915_gem_evict_something+0x711/0xbd0 [i915]
? igt_evict_contexts+0x50/0x50 [i915]
? nop_clear_range+0x10/0x10 [i915]
? igt_evict_something+0x90/0x90 [i915]
? i915_gem_gtt_reserve+0x1a1/0x320 [i915]
i915_gem_gtt_insert+0x237/0x400 [i915]
__i915_vma_do_pin+0xc25/0x1a20 [i915]
eb_lookup_vmas+0x1c63/0x3790 [i915]
? i915_gem_check_execbuffer+0x250/0x250 [i915]
? trace_hardirqs_on_caller+0x33f/0x590
? _raw_spin_unlock_irqrestore+0x39/0x60
? __pm_runtime_resume+0x7d/0xf0
i915_gem_do_execbuffer+0x86a/0x2ff0 [i915]
? __kmalloc+0x132/0x340
? i915_gem_execbuffer2_ioctl+0x10f/0x760 [i915]
? drm_ioctl_kernel+0x12e/0x1c0
? drm_ioctl+0x662/0x980
? eb_relocate_slow+0xa90/0xa90 [i915]
? i915_gem_execbuffer2_ioctl+0x10f/0x760 [i915]
? __might_fault+0xea/0x1a0
i915_gem_execbuffer2_ioctl+0x3cc/0x760 [i915]
? i915_gem_execbuffer_ioctl+0xba0/0xba0 [i915]
? lock_acquire+0x3c0/0x3c0
? i915_gem_execbuffer_ioctl+0xba0/0xba0 [i915]
drm_ioctl_kernel+0x12e/0x1c0
drm_ioctl+0x662/0x980
? i915_gem_execbuffer_ioctl+0xba0/0xba0 [i915]
? drm_getstats+0x20/0x20
? debug_check_no_obj_freed+0x2a6/0x8c0
do_vfs_ioctl+0x170/0xe70
? ioctl_preallocate+0x170/0x170
? task_work_run+0xbe/0x160
? lock_acquire+0x3c0/0x3c0
? trace_hardirqs_on_caller+0x33f/0x590
? _raw_spin_unlock_irq+0x2f/0x50
SyS_ioctl+0x36/0x70
? do_vfs_ioctl+0xe70/0xe70
do_syscall_64+0x18c/0x5d0
entry_SYSCALL_64_after_hwframe+0x26/0x9b
RIP: 0033:0x7f2ddf13b587
RSP: 002b:00007fff15c4f9d8 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
RAX: ffffffffffffffda RBX: 0000000000000003 RCX: 00007f2ddf13b587
RDX: 00007fff15c4fa20 RSI: 0000000040406469 RDI: 0000000000000003
RBP: 00007fff15c4fa20 R08: 0000000000000000 R09: 00007f2ddf3fe120
R10: 0000000000000073 R11: 0000000000000246 R12: 0000000040406469
R13: 0000000000000003 R14: 00007fff15c4fa20 R15: 00000000000000c7
Code: 00 00 00 4a c7 44 22 08 00 00 00 00 42 c7 44 22 10 00 00 00 00 48 81 c4 b8 00 00 00 5b 5d 41 5c 41 5d 41 5e 41 5f c3 0f 0b 0f 0b <0f> 0b 31 c0 eb c0 4c 89 ef e8 9a 09 41 ff e9 1e fe ff ff 4c 89
RIP: drm_mm_scan_color_evict+0x2b8/0x3d0 RSP: ffff880057a573f8
We can trivially relax this assumption by searching the hole_stack for
the scan result and warn instead if the driver called us without any
result.
Fixes: 3fa489dabe ("drm: Apply tight eviction scanning to color_adjust")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: <stable@vger.kernel.org > # v4.11+
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180219113543.8010-1-chris@chris-wilson.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:43 +01:00
Daniel Vetter
5c9beaf3ac
drm/cirrus: Load lut in crtc_commit
...
commit 745fd50f3b upstream.
In the past the ast driver relied upon the fbdev emulation helpers to
call ->load_lut at boot-up. But since
commit b8e2b0199c
Author: Peter Rosin <peda@axentia.se >
Date: Tue Jul 4 12:36:57 2017 +0200
drm/fb-helper: factor out pseudo-palette
that's cleaned up and drivers are expected to boot into a consistent
lut state. This patch fixes that.
Fixes: b8e2b0199c ("drm/fb-helper: factor out pseudo-palette")
Cc: Peter Rosin <peda@axenita.se >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: <stable@vger.kernel.org > # v4.14+
References: https://bugzilla.kernel.org/show_bug.cgi?id=198123
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20180131110450.22153-1-daniel.vetter@ffwll.ch
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:43 +01:00
Kai-Heng Feng
3b5061ec6f
drm/edid: Add 6 bpc quirk for CPT panel in Asus UX303LA
...
commit 06998a756a upstream.
Similar to commit e10aec652f ("drm/edid: Add 6 bpc quirk for display
AEO model 0."), the EDID reports "DFP 1.x compliant TMDS" but it support
6bpc instead of 8 bpc.
Hence, use 6 bpc quirk for this panel.
Fixes: 196f954e25 ("drm/i915/dp: Revert "drm/i915/dp: fall back to 18 bpp when sink capability is unknown"")
BugLink: https://bugs.launchpad.net/bugs/1749420
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com >
Reviewed-by: Mario Kleiner <mario.kleiner.de@gmail.com >
Cc: <stable@vger.kernel.org > # v4.8+
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20180218085359.7817-1-kai.heng.feng@canonical.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-28 10:19:42 +01:00
Arnd Bergmann
fc4cb30f2c
drm/i915: fix intel_backlight_device_register declaration
...
commit ac29fc6685 upstream.
The alternative intel_backlight_device_register() definition apparently
never got used, but I have now run into a case of i915 being compiled
without CONFIG_BACKLIGHT_CLASS_DEVICE, resulting in a number of
identical warnings:
drivers/gpu/drm/i915/intel_drv.h:1739:12: error: 'intel_backlight_device_register' defined but not used [-Werror=unused-function]
This marks the function as 'inline', which was surely the original
intention here.
Fixes: 1ebaa0b9c2 ("drm/i915: Move backlight registration to connector registration")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20171127151239.1813673-1-arnd@arndb.de
(cherry picked from commit 2de2d0b063 )
Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-25 11:08:04 +01:00
Stefan Schake
4826773306
drm/vc4: Release fence after signalling
...
[ Upstream commit babc811005 ]
We were never releasing the initial fence reference that is obtained
through dma_fence_init.
Link: https://github.com/anholt/linux/issues/122
Fixes: cdec4d3613 ("drm/vc4: Expose dma-buf fences for V3D rendering.")
Signed-off-by: Stefan Schake <stschake@gmail.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/1512236444-301-1-git-send-email-stschake@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-25 11:08:02 +01:00
Russell King
06078bd640
drm/armada: fix leak of crtc structure
...
[ Upstream commit 33cd3c07a9 ]
Fix the leak of the CRTC structure in the failure paths of
armada_drm_crtc_create().
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-25 11:08:02 +01:00
Chris Wilson
8c666e6471
drm: Require __GFP_NOFAIL for the legacy drm_modeset_lock_all
...
commit d18d1a5ac8 upstream.
To acquire all modeset locks requires a ww_ctx to be allocated. As this
is the legacy path and the allocation small, to reduce the changes
required (and complex untested error handling) to the legacy drivers, we
simply assume that the allocation succeeds. At present, it relies on the
too-small-to-fail rule, but syzbot found that by injecting a failure
here we would hit the WARN. Document that this allocation must succeed
with __GFP_NOFAIL.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reported-by: syzbot <syzkaller@googlegroups.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171031115535.15166-1-chris@chris-wilson.co.uk
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-25 11:07:47 +01:00
Ray Strode
848dd9bf51
drm/qxl: reapply cursor after resetting primary
...
commit 9428088c90 upstream.
QXL associates mouse state with its primary plane.
Destroying a primary plane and putting a new one in place has the side
effect of destroying the cursor as well.
This commit changes the driver to reapply the cursor any time a new
primary is created. It achieves this by keeping a reference to the
cursor bo on the qxl_crtc struct.
This fix is very similar to
commit 4532b241a4 ("drm/qxl: reapply cursor after SetCrtc calls")
which got implicitly reverted as part of implementing the atomic
modeset feature.
Cc: Gerd Hoffmann <kraxel@redhat.com >
Cc: Dave Airlie <airlied@redhat.com >
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1512097
Fixes: 1277eed5fe ("drm: qxl: Atomic phase 1: convert cursor to universal plane")
Cc: stable@vger.kernel.org
Signed-off-by: Ray Strode <rstrode@redhat.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:29 +01:00
Gerd Hoffmann
dc0b764a7c
qxl: alloc & use shadow for dumb buffers
...
commit 62676d10b4 upstream.
This patch changes the way the primary surface is used for dumb
framebuffers. Instead of configuring the bo itself as primary surface
a shadow bo is created and used instead. Framebuffers can share the
shadow bo in case they have the same format and resolution.
On atomic plane updates we don't have to update the primary surface in
case we pageflip from one framebuffer to another framebuffer which
shares the same shadow. This in turn avoids the flicker caused by the
primary-destroy + primary-create cycle, which is very annonying when
running wayland on qxl.
The qxl driver never actually writes to the shadow bo. It sends qxl
blit commands which update it though, and the spice server might
actually execute them (and thereby write to the shadow) in case the
local rendering is kicked for some reason. This happens for example in
case qemu is asked to write out a dump of the guest display (screendump
monitor command).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com >
Reviewed-by: Dave Airlie <airlied@redhat.com >
Link: http://patchwork.freedesktop.org/patch/msgid/20171019062150.28090-3-kraxel@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:29 +01:00
Julia Lawall
a29adc04cb
drm/radeon: adjust tested variable
...
commit 3a61b527b4 upstream.
Check the variable that was most recently initialized.
The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/ )
// <smpl>
@@
expression x, y, f, g, e, m;
statement S1,S2,S3,S4;
@@
x = f(...);
if (\(<+...x...+>\&e\)) S1 else S2
(
x = g(...);
|
m = g(...,&x,...);
|
y = g(...);
*if (e)
S3 else S4
)
// </smpl>
Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Alex Deucher
8087004752
drm/radeon: Add dpm quirk for Jet PRO (v2)
...
commit 239b5f64e1 upstream.
Fixes stability issues.
v2: clamp sclk to 600 Mhz
Bug: https://bugs.freedesktop.org/show_bug.cgi?id=103370
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Daniel Vetter
e4a6d687e5
drm/ast: Load lut in crtc_commit
...
commit 24b8ef699e upstream.
In the past the ast driver relied upon the fbdev emulation helpers to
call ->load_lut at boot-up. But since
commit b8e2b0199c
Author: Peter Rosin <peda@axentia.se >
Date: Tue Jul 4 12:36:57 2017 +0200
drm/fb-helper: factor out pseudo-palette
that's cleaned up and drivers are expected to boot into a consistent
lut state. This patch fixes that.
Fixes: b8e2b0199c ("drm/fb-helper: factor out pseudo-palette")
Cc: Peter Rosin <peda@axenita.se >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: <stable@vger.kernel.org > # v4.14+
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=198123
Cc: Bill Fraser <bill.fraser@gmail.com >
Reported-and-Tested-by: Bill Fraser <bill.fraser@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Andrey Grodzovsky
dc2b0e41fc
drm/amd/powerplay: Fix smu_table_entry.handle type
...
commit adab595d16 upstream.
The handle describes kernel logical address, should be
unsigned long and not uint32_t.
Fixes KASAN error and GFP on driver unload.
Reviewed-by: Rex Zhu <Rex.Zhu@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Andrey Grodzovsky <andrey.grodzovsky@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Ray Strode
b51521c9a1
drm/qxl: unref cursor bo when finished with it
...
commit 16c6db3688 upstream.
qxl_cursor_atomic_update allocs a bo for the cursor that
it never frees up at the end of the function.
This commit fixes that.
Signed-off-by: Ray Strode <rstrode@redhat.com >
Cc: stable@vger.kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Tom St Denis
15cdc016f1
drm/ttm: Fix 'buf' pointer update in ttm_bo_vm_access_kmap() (v2)
...
commit 95244db2d3 upstream.
The buf pointer was not being incremented inside the loop
meaning the same block of data would be read or written
repeatedly.
(v2) Change 'buf' pointer to uint8_t* type
Cc: stable@vger.kernel.org
Fixes: 09ac4fcb3f ("drm/ttm: Implement vm_operations_struct.access v2")
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Felix Kuehling
f02c3f7f6d
drm/ttm: Don't add swapped BOs to swap-LRU list
...
commit fd5002d6a3 upstream.
A BO that's already swapped would be added back to the swap-LRU list
for example if its validation failed under high memory pressure. This
could later lead to swapping it out again and leaking previous swap
storage.
This commit adds a condition to prevent that from happening.
v2: Check page_flags instead of swap_storage
Signed-off-by: Felix Kuehling <Felix.Kuehling@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
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:25 +01:00
Lionel Landwerlin
cc2759b7bb
drm/i915: add GT number to intel_device_info
...
commit 0890540e21 upstream.
Up to Coffeelake we could deduce this GT number from the device ID.
This doesn't seem to be the case anymore. This change reorders pciids
per GT and adds a gt field to intel_device_info. We set this field on
the following platforms :
- SNB/IVB/HSW/BDW/SKL/KBL/CFL/CNL
Before & After :
$ modinfo drivers/gpu/drm/i915/i915.ko | grep ^alias | wc -l
209
v2: Add SNB & IVB (Chris)
v3: Fix compilation error in early-quirks (Lionel)
v4: Fix inconsistency between FEATURE/PLATFORM macros (Ville)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20170830161208.29221-2-lionel.g.landwerlin@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-22 15:42:18 +01:00
Imre Deak
a51421b4cb
drm/i915: Avoid PPS HW/SW state mismatch due to rounding
...
commit 5643205c63 upstream.
We store a SW state of the t11_t12 timing in 100usec units but have to
program it in 100msec as required by HW. The rounding used during
programming means there will be a mismatch between the SW and HW states
of this value triggering a "PPS state mismatch" error. Avoid this by
storing the already rounded-up value in the SW state.
Note that we still calculate panel_power_cycle_delay with the finer
100usec granularity to avoid any needless waits using that version of
the delay.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103903
Cc: joks <joks@linux.pl >
Signed-off-by: Imre Deak <imre.deak@intel.com >
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171129175137.2889-1-imre.deak@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-16 20:23:10 +01:00
Ville Syrjälä
050b86b5bf
drm/i915: Fix deadlock in i830_disable_pipe()
...
commit 4488496d58 upstream.
i830_disable_pipe() gets called from the power well code, and thus
we're already holding the power domain mutex. That means we can't
call plane->get_hw_state() as it will also try to grab the
same mutex and will thus deadlock.
Replace the assert_plane() calls (which calls ->get_hw_state()) with
just raw register reads in i830_disable_pipe(). As a bonus we can
now get a warning if plane C is enabled even though we don't even
expose it as a drm plane.
v2: Do a separate WARN_ON() for each plane (Chris)
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Fixes: d87ce76402 ("drm/i915: Add .get_hw_state() method for planes")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171129125411.29055-1-ville.syrjala@linux.intel.com
(cherry picked from commit 5816d9cbc0 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-16 20:22:45 +01:00
Ville Syrjälä
50018d0984
drm/i915: Redo plane sanitation during readout
...
commit 23ac127328 upstream.
Unify the plane disabling during state readout by pulling the code into
a new helper intel_plane_disable_noatomic(). We'll also read out the
state of all planes, so that we know which planes really need to be
diabled.
Additonally we change the plane<->pipe mapping sanitation to work by
simply disabling the offending planes instead of entire pipes. And
we do it before we otherwise sanitize the crtcs, which means we don't
have to worry about misassigned planes during crtc sanitation anymore.
v2: Reoder patches to not depend on enum old_plane_id
v3: s/for_each_pipe/for_each_intel_crtc/
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Alex Villacís Lasso <alexvillacislasso@hotmail.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103223
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Tested-by: Thierry Reding <thierry.reding@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-3-ville.syrjala@linux.intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit b1e01595a6 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-16 20:22:45 +01:00
Ville Syrjälä
19d8e5122f
drm/i915: Add .get_hw_state() method for planes
...
commit d87ce76402 upstream.
Add a .get_hw_state() method for planes, returning true or false
depending on whether the plane is enabled. Use it to rewrite the
plane enabled/disabled asserts in platform agnostic fashion.
We do lose the pre-gen4 plane<->pipe mapping checks, but since we're
supposed sanitize that anyway it doesn't really matter.
v2: Reoder patches to not depend on enum old_plane_id
Just call assert_plane_disabled() from assert_planes_disabled()
v3: Deal with disabled power wells in .get_hw_state()
v4: Rebase due skl primary plane code removal
Cc: Thierry Reding <thierry.reding@gmail.com >
Cc: Alex Villacís Lasso <alexvillacislasso@hotmail.com >
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch > #v2
Tested-by: Thierry Reding <thierry.reding@gmail.com > #v2
Link: https://patchwork.freedesktop.org/patch/msgid/20171117191917.11506-2-ville.syrjala@linux.intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 51f5a09639 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-16 20:22:45 +01:00
Stefan Schake
e9273b08d4
drm/vc4: Move IRQ enable to PM path
...
[ Upstream commit ce9caf2f79 ]
We were calling enable_irq on bind, where it was already enabled previously
by the IRQ helper. Additionally, dev->irq is not set correctly until after
postinstall and so was always zero here, triggering a warning in 4.15.
Fix both by moving the enable to the power management resume path, where we
know there was a previous disable invocation during suspend.
Fixes: 253696ccd6 ("drm/vc4: Account for interrupts in flight")
Signed-off-by: Stefan Schake <stschake@gmail.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/1514563543-32511-1-git-send-email-stschake@gmail.com
Tested-by: Stefan Wahren <stefan.wahren@i2se.com >
Reviewed-by: Eric Anholt <eric@anholt.net >
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:17 +01:00
Arnd Bergmann
4a96f3d056
drm/omap: displays: panel-dpi: add backlight dependency
...
[ Upstream commit 499ec0ed5e ]
The new backlight code causes a link failure when backlight
support itself is disabled:
drivers/gpu/drm/omapdrm/displays/panel-dpi.o: In function `panel_dpi_probe_of':
panel-dpi.c:(.text+0x35c): undefined reference to `of_find_backlight_by_node'
This adds a Kconfig dependency like we have for the other OMAP
display targets.
Fixes: 39135a305a ("drm/omap: displays: panel-dpi: Support for handling backlight devices")
Signed-off-by: Arnd Bergmann <arnd@arndb.de >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:14 +01:00
Christophe JAILLET
345dc6d499
drm/omap: Fix error handling path in 'omap_dmm_probe()'
...
[ Upstream commit 8677b1ac2d ]
If we don't find a matching device node, we must free the memory allocated
in 'omap_dmm' a few lines above.
Fixes: 7cb0d6c17b ("drm/omap: fix TILER on OMAP5")
Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr >
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:14 +01:00
Andrey Gusakov
464711a74c
drm/bridge: tc358767: fix 1-lane behavior
...
[ Upstream commit 4dbd6c03fb ]
Use drm_dp_channel_eq_ok helper
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-7-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:14 +01:00
Andrey Gusakov
340c9a4ba3
drm/bridge: tc358767: fix AUXDATAn registers access
...
[ Upstream commit 9217c1abbc ]
First four bytes should go to DP0_AUXWDATA0. Due to bug if
len > 4 first four bytes was writen to DP0_AUXWDATA1 and all
data get shifted by 4 bytes. Fix it.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-6-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:13 +01:00
Andrey Gusakov
b536eb986e
drm/bridge: tc358767: fix timing calculations
...
[ Upstream commit 66d1c3b94d ]
Fields in HTIM01 and HTIM02 regs should be even.
Recomended thresh_dly value is max_tu_symbol.
Remove set of VPCTRL0.VSDELAY as it is related to DSI input
interface. Currently driver supports only DPI.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-5-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:13 +01:00
Andrey Gusakov
0106381870
drm/bridge: tc358767: fix DP0_MISC register set
...
[ Upstream commit f3b8adbe19 ]
Remove shift from TU_SIZE_RECOMMENDED define as it used to
calculate max_tu_symbols.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-4-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:13 +01:00
Andrey Gusakov
859bacc13c
drm/bridge: tc358767: filter out too high modes
...
[ Upstream commit 99fc8e963a ]
Pixel clock limitation for DPI is 154 MHz. Do not accept modes
with higher pixel clock rate.
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-3-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:13 +01:00
Andrey Gusakov
6d734363f2
drm/bridge: tc358767: do no fail on hi-res displays
...
[ Upstream commit cffd2b16c0 ]
Do not fail data rates higher than 2.7 and more than 2 lanes.
Try to fall back to 2.7Gbps and 2 lanes.
Acked-by: Philipp Zabel <p.zabel@pengutronix.de >
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com >
Signed-off-by: Andrey Gusakov <andrey.gusakov@cogentembedded.com >
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510073785-16108-2-git-send-email-andrey.gusakov@cogentembedded.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:12 +01:00
Eric Anholt
345f165a31
drm/bridge: Fix lvds-encoder since the panel_bridge rework.
...
[ Upstream commit dbb58bfd9a ]
The panel_bridge bridge attaches to the panel's OF node, not the
lvds-encoder's node. Put in a little no-op bridge of our own so that
our consumers can still find a bridge where they expect.
This also fixes an unintended unregistration and leak of the
panel-bridge on module remove.
Signed-off-by: Eric Anholt <eric@anholt.net >
Fixes: 13dfc0540a ("drm/bridge: Refactor out the panel wrapper from the lvds-encoder bri
dge.")
Tested-by: Lothar Waßmann <LW@KARO-electronics.de >
Signed-off-by: Archit Taneja <architt@codeaurora.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20171114191647.22207-1-eric@anholt.net
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:12 +01:00
Christian König
575c548137
drm/amdgpu: don't try to move pinned BOs
...
[ Upstream commit 6edc6910ba ]
Never try to move pinned BOs during CS.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:11 +01:00
Mirza Krak
093a5cb46d
drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable
...
[ Upstream commit 517f56839f ]
In the case where the bind gets deferred we would end up with a
un-balanced runtime PM enable call.
Fix this by simply moving the pm_runtime_enable call to the end of
the bind function when all paths have succeeded.
Signed-off-by: Mirza Krak <mirza.krak@endian.se >
Signed-off-by: Sandy Huang <hjc@rock-chips.com >
Link: https://patchwork.freedesktop.org/patch/msgid/1510734286-37434-1-git-send-email-mirza.krak@endian.se
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:03 +01:00
Felix Kuehling
b15f53b46d
drm/amdkfd: Fix SDMA oversubsription handling
...
[ Upstream commit 8c946b8988 ]
SDMA only supports a fixed number of queues. HWS cannot handle
oversubscription.
Signed-off-by: shaoyun liu <shaoyun.liu@amd.com >
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:02 +01:00
shaoyunl
64aca9911a
drm/amdkfd: Fix SDMA ring buffer size calculation
...
[ Upstream commit d12fb13f23 ]
ffs function return the position of the first bit set on 1 based.
(bit zero returns 1).
Signed-off-by: shaoyun liu <shaoyun.liu@amd.com >
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:02 +01:00
Felix Kuehling
a595f190fc
drm/amdgpu: Fix SDMA load/unload sequence on HWS disabled mode
...
[ Upstream commit cf21654b40 ]
Fix the SDMA load and unload sequence as suggested by HW document.
Signed-off-by: shaoyun liu <shaoyun.liu@amd.com >
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Acked-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com >
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:39:01 +01:00
Stefan Schake
08bb42086b
drm/vc4: Account for interrupts in flight
...
[ Upstream commit 253696ccd6 ]
Synchronously disable the IRQ to make the following cancel_work_sync
invocation effective.
An interrupt in flight could enqueue further overflow mem work. As we
free the binner BO immediately following vc4_irq_uninstall this caused
a NULL pointer dereference in the work callback vc4_overflow_mem_work.
Link: https://github.com/anholt/linux/issues/114
Signed-off-by: Stefan Schake <stschake@gmail.com >
Fixes: d5b1a78a77 ("drm/vc4: Add support for drawing 3D frames.")
Signed-off-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/1510275907-993-2-git-send-email-stschake@gmail.com
Signed-off-by: Sasha Levin <alexander.levin@verizon.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-02-03 17:38:54 +01:00
Boris Brezillon
9ad970c8a1
drm/vc4: Fix NULL pointer dereference in vc4_save_hang_state()
...
commit 17b11b76b8 upstream.
When saving BOs in the hang state we skip one entry of the
kernel_state->bo[] array, thus leaving it to NULL. This leads to a NULL
pointer dereference when, later in this function, we iterate over all
BOs to check their ->madv state.
Fixes: ca26d28bba ("drm/vc4: improve throughput by pipelining binning and rendering jobs")
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com >
Signed-off-by: Eric Anholt <eric@anholt.net >
Reviewed-by: Eric Anholt <eric@anholt.net >
Link: https://patchwork.freedesktop.org/patch/msgid/20180118145821.22344-1-boris.brezillon@free-electrons.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-31 14:03:44 +01:00
Rob Clark
8f0b1d5cff
drm/vmwgfx: fix memory corruption with legacy/sou connectors
...
commit 8a510a5c75 upstream.
It looks like in all cases 'struct vmw_connector_state' is used. But
only in stdu connectors, was atomic_{duplicate,destroy}_state() properly
subclassed. Leading to writes beyond the end of the allocated connector
state block and all sorts of fun memory corruption related crashes.
Fixes: d7721ca711 "drm/vmwgfx: Connector atomic state"
Signed-off-by: Rob Clark <rclark@redhat.com >
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-23 19:58:18 +01:00
Rob Clark
aa9b501582
drm/nouveau/disp/gf119: add missing drive vfunc ptr
...
commit 1b5c7ef3d0 upstream.
Fixes broken dp on GF119:
Call Trace:
? nvkm_dp_train_drive+0x183/0x2c0 [nouveau]
nvkm_dp_acquire+0x4f3/0xcd0 [nouveau]
nv50_disp_super_2_2+0x5d/0x470 [nouveau]
? nvkm_devinit_pll_set+0xf/0x20 [nouveau]
gf119_disp_super+0x19c/0x2f0 [nouveau]
process_one_work+0x193/0x3c0
worker_thread+0x35/0x3b0
kthread+0x125/0x140
? process_one_work+0x3c0/0x3c0
? kthread_park+0x60/0x60
ret_from_fork+0x25/0x30
Code: Bad RIP value.
RIP: (null) RSP: ffffb1e243e4bc38
CR2: 0000000000000000
Fixes: af85389c61 drm/nouveau/disp: shuffle functions around
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103421
Signed-off-by: Rob Clark <robdclark@gmail.com >
Signed-off-by: Ben Skeggs <bskeggs@redhat.com >
Cc: Sven Joachim <svenjoac@gmx.de >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-23 19:58:09 +01:00
Ville Syrjälä
b00cb5a350
drm/i915: Fix init_clock_gating for resume
...
commit 3572f04c69 upstream.
Moving the init_clock_gating() call from intel_modeset_init_hw() to
intel_modeset_gem_init() had an unintended effect of not applying
some workarounds on resume. This, for example, cause some kind of
corruption to appear at the top of my IVB Thinkpad X1 Carbon LVDS
screen after hibernation. Fix the problem by explicitly calling
init_clock_gating() from the resume path.
I really hope this doesn't break something else again. At least
the problems reported at https://bugs.freedesktop.org/show_bug.cgi?id=103549
didn't make a comeback, even after a hibernate cycle.
v2: Reorder the init_clock_gating vs. modeset_init_hw to match
the display reset path (Rodrigo)
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Fixes: 6ac4327276 ("drm/i915: Move init_clock_gating() back to where it was")
Reviewed-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: https://patchwork.freedesktop.org/patch/msgid/20171116160215.25715-1-ville.syrjala@linux.intel.com
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
(cherry picked from commit 675f7ff35b )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:25 +01:00
Ville Syrjälä
37928ffde4
drm/i915: Move init_clock_gating() back to where it was
...
commit 6ac4327276 upstream.
Apparently setting up a bunch of GT registers before we've properly
initialized the rest of the GT hardware leads to these setting being
lost. So looks like I broke HSW with commit b7048ea12f ("drm/i915:
Do .init_clock_gating() earlier to avoid it clobbering watermarks")
by doing init_clock_gating() too early. This should actually affect
other platforms as well, but apparently not to such a great degree.
What I was ultimately after in that commit was to move the
ilk_init_lp_watermarks() call earlier. So let's undo the damage and
move init_clock_gating() back to where it was, and call
ilk_init_lp_watermarks() just before the watermark state readout.
This highlights how fragile and messed up our init order really is.
I wonder why we even initialize the display before gem. The opposite
order would make much more sense to me...
v2: Keep WaRsPkgCStateDisplayPMReq:hsw early as it really must
be done before all planes might get disabled.
Cc: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mark Janes <mark.a.janes@intel.com >
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Oscar Mateo <oscar.mateo@intel.com >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Reported-by: Mark Janes <mark.a.janes@intel.com >
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103549
Fixes: b7048ea12f ("drm/i915: Do .init_clock_gating() earlier to avoid it clobbering watermarks")
References: https://lists.freedesktop.org/archives/intel-gfx/2017-November/145432.html
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20171108133555.14091-1-ville.syrjala@linux.intel.com
Tested-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk >
(cherry picked from commit f72b84c677 )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:25 +01:00
Kenneth Graunke
08a56f347a
drm/i915: Whitelist SLICE_COMMON_ECO_CHICKEN1 on Geminilake.
...
commit 4636bda86a upstream.
Geminilake requires the 3D driver to select whether barriers are
intended for compute shaders, or tessellation control shaders, by
whacking a "Barrier Mode" bit in SLICE_COMMON_ECO_CHICKEN1 when
switching pipelines. Failure to do this properly can result in GPU
hangs.
Unfortunately, this means it needs to switch mid-batch, so only
userspace can properly set it. To facilitate this, the kernel needs
to whitelist the register.
The workarounds page currently tags this as applying to Broxton only,
but that doesn't make sense. The documentation for the register it
references says the bit userspace is supposed to toggle only exists on
Geminilake. Empirically, the Mesa patch to toggle this bit appears to
fix intermittent GPU hangs in tessellation control shader barrier tests
on Geminilake; we haven't seen those hangs on Broxton.
v2: Mention WA #0862 in the comment (it doesn't have a name).
Signed-off-by: Kenneth Graunke <kenneth@whitecape.org >
Acked-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20180105085905.9298-1-kenneth@whitecape.org
(cherry picked from commit ab062639ed )
Signed-off-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:25 +01:00
Zhi Wang
4675bdd85c
drm/i915/gvt: Clear the shadow page table entry after post-sync
...
commit 121d760d07 upstream.
A shadow page table entry needs to be cleared after being set as
post-sync. This patch fixes the recent error reported in Win7-32 test.
Fixes: 2707e44466 ("drm/i915/gvt: vGPU graphics memory virtualization")
Signed-off-by: Zhi Wang <zhi.a.wang@intel.com >
Signed-off-by: Zhenyu Wang <zhenyuw@linux.intel.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:24 +01:00
Dan Carpenter
9fc16b259a
drm/vmwgfx: Potential off by one in vmw_view_add()
...
commit 0d9cac0ca0 upstream.
The vmw_view_cmd_to_type() function returns vmw_view_max (3) on error.
It's one element beyond the end of the vmw_view_cotables[] table.
My read on this is that it's possible to hit this failure. header->id
comes from vmw_cmd_check() and it's a user controlled number between
1040 and 1225 so we can hit that error. But I don't have the hardware
to test this code.
Fixes: d80efd5cb3 ("drm/vmwgfx: Initial DX support")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Thomas Hellstrom <thellstrom@vmware.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:24 +01:00
Thomas Hellstrom
2f6ff75e48
drm/vmwgfx: Don't cache framebuffer maps
...
commit 98648ae6ef upstream.
Buffer objects need to be either pinned or reserved while a map is active,
that's not the case here, so avoid caching the framebuffer map.
This will cause increasing mapping activity mainly when we don't do
page flipping.
This fixes occasional garbage filled screens when the framebuffer has been
evicted after the map.
Since in-kernel mapping of whole buffer objects is error-prone on 32-bit
architectures and also quite inefficient, we will revisit this later.
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com >
Reviewed-by: Sinclair Yeh <syeh@vmware.com >
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2018-01-17 09:45:24 +01:00