Daniel Vetter
4644453747
drm: Remove display_info->min/max_(h|v)max
...
No one looks at it, only i915/gma500 lvds even bother to fill it
out. I guess a very old plan was to use this for filtering modes,
but that's already done within the edid parser.
v2: Move misplaced hunk to this patch.
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-18-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:49:41 +02:00
Daniel Vetter
ae2a6da876
drm: Update connector documentation
...
- Shuffle docs from drm-kms.rst into the structure docs where it makes
sense.
- Put the remaining bits into a new overview section.
One thing I've changed is around probing: Old docs says that you
_must_ use the probe helpers, which isn't correct. Helpers are always
optional.
v2: Review from Sean.
Cc: Sean Paul <seanpaul@chromium.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-17-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:49:33 +02:00
Daniel Vetter
e15c8f4b6e
drm: Don't export dp-aux devnode functions
...
They're only used internally within the dp helpers. Also nuke the
kerneldoc (we only document the driver interface in the drm shared
functions). And move the header file from the public include/
directory to the source files into drm_crtc_helper_internal.h, similar
to how we already have drm_crtc_internal.h.
While at it also move drm_fb_helper_modinit since that belongs in
there, too.
I noticed this all since I spotted kerneldoc which wasn't pulled into
the rst templates.
v2: Update Copyright date.
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Rafael Antognolli <rafael.antognolli@intel.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-16-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:49:26 +02:00
Daniel Vetter
52a9fcdac3
drm/doc: Include new drm_blend.c
...
There's not much point in kerneldoc if it's not included:
- It won't show up in the pretty html pages.
- The comments itself won't get parsed, which means 0day won't pick up
changes, resulting in stale docs fast.
Also, uapi really should be core, not helpers, so move drm_blend.c to
that. That also means that the zpos normilize function loses it's
helper status (and we might as well call it always). For that,
EXPORT_SYMBOL. Just spotted while integrating docs and noticing that
one was missing.
With sphinx there's really no excuse any more to not build the docs
and make sure it's all nice!
$ make DOCBOOKS="" htmldocs
Cc: Marek Szyprowski <m.szyprowski@samsung.com >
Cc: Benjamin Gaignard <benjamin.gaignard@linaro.org >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-15-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:49:20 +02:00
Daniel Vetter
5221719517
drm: Extract drm_connector.[hc]
...
Pulls in quite a lot of connector related structures (cmdline mode,
force/status enums, display info), but I think that all makes perfect
sense.
Also had to move a few more core kms object stuff into drm_modeset.h.
And as a first cleanup remove the kerneldoc for the 2 connector IOCTL
- DRM core docs are aimed at drivers, no point documenting internal in
excruciating detail.
v2: And also pull in all the connector property code.
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-14-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:48:46 +02:00
Daniel Vetter
adebd6fe9f
drm: Export drm_property_replace_global_blob
...
It's really part of the core blob interface, and the drm_connector.c
extraction needs it too.
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-13-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 18:48:35 +02:00
Lothar Waßmann
cb34d7f2dc
drm: update kerneldoc for changes introduced by commits "16fadc2568e9" and "9671e228fb78"
...
Describe the new parameter 'bus_flags' to of_get_drm_display_mode() in
the kerneldoc comments and add kerneldoc comments to the new function
drm_bus_flags_from_videomode().
Signed-off-by: Lothar Waßmann <LW@KARO-electronics.de >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1471354477-25877-1-git-send-email-LW@KARO-electronics.de
2016-08-16 17:32:08 +02:00
Daniel Vetter
750fb8c439
drm/doc: Update drm_framebuffer docs
...
- Move the intro section into a DOC comment, and update it slightly.
- kernel-doc for struct drm_framebuffer!
v2:
- Copypaste fail (Sean).
- Explain the linear @offsets clearer (Ville).
Cc: Sean Paul <seanpaul@chromium.org >
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-12-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 17:11:19 +02:00
Daniel Vetter
7520a277d9
drm: Extract drm_framebuffer.[hc]
...
Also start with drm_modeset.h with the core bits, since we need
to untangle this mess somehow. That allows us to move the drm_modes.h
include to the right spot, except for the temporary connector status
enum. That will get fixed as soon as drm_connector.h exists.
v2: Rebase.
v3: Move drm_crtc_force_disable_all back again, that wasn't meant to
be moved (Sean).
v4: Rebase.
Cc: Sean Paul <seanpaul@chromium.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-08-16 16:49:03 +02:00
Tom St Denis
89a8f30900
drm/amd/amdgpu: Add more config data for debugfs
...
Adds rev_id as well as cg/pg flags to help debug runtime.
Signed-off-by: Tom St Denis <tom.stdenis@amd.com >
Acked-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:45:05 -04:00
Christian König
6681c5eba1
drm/amdgpu: fix coding style in amdgpu_object.c
...
Just a few 80 chars problems.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:44:55 -04:00
Christian König
afef8b8f99
drm/amdgpu: add function pointer to the pte_update_params
...
Remember what function to call while planning the commands instead
of figuring it our later on.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:44:45 -04:00
Christian König
96105e5375
drm/amdgpu: stop splitting PTE commands into smaller ones
...
It doesn't make much sense to create bigger commands first which we then need
to split into smaller one again. Just make sure the commands we create aren't
to big in the first place.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:44:34 -04:00
Christian König
dc157c6daa
drm/amdgpu: remove AMDGPU_VM_NO_FLUSH define
...
Not used any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:44:20 -04:00
Christian König
de9ea7bd36
drm/amdgpu: cleanup the write_pte implementations
...
We don't need the gart mapping handling here any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:44:10 -04:00
Christian König
b7fc2cbd5e
drm/amdgpu: remove pages_addr handling from the VM code
...
Not needed any more.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:43:59 -04:00
Christian König
b0456f9306
drm/amdgpu: write PTEs directly into the IB.
...
Write the PTEs at the end of the IB instead of directly into the SDMA commands.
This can save quite some CPU cycles building the entries.
This doesn't change the DW estimation because PTEs where embedded into the IB
before as well. It just moves them to the end of the IB.
Signed-off-by: Christian König <christian.koenig@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Reviewed-by: Edward O'Callaghan <funfunctor@folklore1984.net >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:43:44 -04:00
Chunming Zhou
478feaf6cc
drm/amdgpu: add shadow flag V2
...
Indicate if need to sync between bo and shadow, where sync to where.
V2:
Rename to backup_shadow
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:43:14 -04:00
Chunming Zhou
1baa439fb2
drm/amdgpu: allocate shadow for pd/pt bo V2
...
The pd/pt shadow bo will be used to backup page table, when gpu reset
happens, we can restore the page table by them.
V2:
Free shadow bo.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:42:53 -04:00
Chunming Zhou
14fd833efa
drm/amdgpu: validate shadow as well when validating bo
...
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:42:33 -04:00
Chunming Zhou
e7893c4bd3
drm/amdgpu: add shadow bo support V2
...
shadow bo is the shadow of a bo, which is always in GTT,
which can be used to backup the original bo.
V2:
reference shadow parent, shadow bo will be freed by who allocted him.
Signed-off-by: Chunming Zhou <David1.Zhou@amd.com >
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
2016-08-16 10:40:01 -04:00
Tom St Denis
f4a7f127d9
drm/amd/amdgpu: UVD v6 register cleanup
...
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 >
2016-08-16 10:39:46 -04:00
Tom St Denis
21d3cbbe01
drm/amd/amdgpu: VCE v2 register cleanup
...
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 >
2016-08-16 10:39:37 -04:00
Tom St Denis
9aeb774c1e
drm/amd/amdgpu: add mutex in check_soft for VCE v3
...
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 >
2016-08-16 10:39:27 -04:00
Tom St Denis
f3f0ea9536
drm/amd/amdgpu: Cleanup register access in VCE v3
...
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 >
2016-08-16 10:39:17 -04:00
Daniel Vetter
6ab10b76ff
drm/kms: Nuke dirty_info property
...
It was added way back together with the dirty_fb ioctl, but neither
generic xfree86-modesetting nor the vmware driver use it. Everyone is
supposed to just unconditionally call the dirtyfb when they do
frontbuffer rendering.
And since unused uabi is bad uabi (there's reasons we require open
source userspace for everything) let's nuke this.
For reference see
commit 884840aa3c
Author: Jakob Bornecrantz <jakob@vmware.com >
Date: Thu Dec 3 23:25:47 2009 +0000
drm: Add dirty ioctl and property
Cc: Jakob Bornecrantz <jakob@vmware.com >
Cc: Dave Airlie <airlied@redhat.com >
Cc: Sinclair Yeh <syeh@vmware.com >
Cc: Thomas Hellstrom <thellstrom@vmware.com >
Acked-by: Thomas Hellstrom <thellstrom@vmware.com >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-9-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 16:30:50 +02:00
Daniel Vetter
d25bcfb8c2
drm/hisilicon: Don't set drm_device->platformdev
...
It's deprecated and only should be used by drivers which still use
drm_platform_init, not by anyone else.
And indeed it's entirely unused and can be nuked.
This required a bit more fudging, but I guess kirin_dc_ops really
wants to operate on the platform_device, not something else. Also
bonus points for implementing abstraction, and then storing the vfunc
in a global variable.
Cc: Xinliang Liu <xinliang.liu@linaro.org >
Cc: Xinwei Kong <kong.kongxinwei@hisilicon.com >
Cc: Archit Taneja <architt@codeaurora.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-7-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 16:30:49 +02:00
Felix Kuehling
cab0b8d50e
drm/amdgpu: Change GART offset to 64-bit
...
The GART aperture size can be bigger than 4GB. Therefore the offset
used in amdgpu_gart_bind and amdgpu_gart_unbind must be 64-bit.
Reviewed-by: Christian König <christian.koenig@amd.com >
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com >
Reviewed-by: Alex Deucher <alexander.deucher@amd.com >
Signed-off-by: Alex Deucher <alexander.deucher@amd.com >
Cc: stable@vger.kernel.org
2016-08-16 10:27:09 -04:00
Daniel Vetter
f1d1326c99
drm/etnaviv: Don't set drm_device->platformdev
...
It's deprecated and only should be used by drivers which still use
drm_platform_init, not by anyone else.
And indeed it's entirely unused and can be nuked.
Cc: Lucas Stach <l.stach@pengutronix.de >
Cc: Russell King <rmk+kernel@arm.linux.org.uk >
Cc: Christian Gmeiner <christian.gmeiner@gmail.com >
Acked-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-6-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 16:10:43 +02:00
Daniel Vetter
1de72faf10
drm/kms-helpers: Extract drm_modeset_helper.[hc]
...
While reviewing docs I spotted that we have a few functions that
really just don't fit into their containing helper library section.
Extract them and shovel them all into a new library for random one-off
aux stuff.
v2: Remove wrongly added files for real.
Cc: Sean Paul <seanpaul@chromium.org >
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-3-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 16:10:19 +02:00
Daniel Vetter
62cacc7939
drm/doc: Fix more kerneldoc/sphinx warnings
...
These are the leftovers I could only track down using keep_warnings =
True. For some of them we might want to update our style guide on how
to reference structures and constants, not sure ...
Cc: Markus Heiser <markus.heiser@darmarit.de >
Cc: Jonathan Corbet <corbet@lwn.net >
Cc: linux-doc@vger.kernel.org
Reviewed-by: Sean Paul <seanpaul@chromium.org >
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471034937-651-1-git-send-email-daniel.vetter@ffwll.ch
2016-08-16 16:09:58 +02:00
Shawn Guo
e1f96ef46c
drm: drop DRIVER_HAVE_IRQ flag for some drivers
...
Since commit 4984979b9b
("drm/irq: simplify irq checks in
drm_wait_vblank"), the drm driver feature flag DRIVER_HAVE_IRQ is only
required for drivers that have an IRQ handler managed by the DRM core.
Some drivers, armada, etnaviv, kirin and sti, set this flag without
.irq_handler setup in drm_driver. These drivers manage IRQ handler
by themselves and the flag DRIVER_HAVE_IRQ makes no sense there.
Drop the flag for these drivers to avoid confusion.
Signed-off-by: Shawn Guo <shawnguo@kernel.org >
Cc: Vincent Abriou <vincent.abriou@st.com >
Cc: Xinliang Liu <z.liuxinliang@hisilicon.com >
Acked-by: Russell King <rmk+kernel@armlinux.org.uk > (for armada and etnaviv)
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1471331168-5601-1-git-send-email-shawnguo@kernel.org
2016-08-16 14:07:43 +02:00
Eric Engestrom
d382814707
drm: remove const
attribute to hint at caller that they now own the memory
...
Signed-off-by: Eric Engestrom <eric.engestrom@imgtec.com >
Reviewed-by: Jani Nikula <jani.nikula@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2016-08-16 14:06:53 +02:00
Chris Wilson
ca99d8781f
drm/i915: Silence GCC warning for cmn_a_well
...
Just make the logic simple enough for even GCC to understand (and
foolproof against random changes):
drivers/gpu/drm/i915/intel_runtime_pm.c: warning: 'cmn_a_well' may be
used uninitialized in this function [-Wuninitialized]: => 871:23
Reported-by: Geert Uytterhoeven <geert@linux-m68k.org >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1471284383-22324-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Imre Deak <imre.deak@intel.com >
2016-08-16 10:53:29 +01:00
Chris Wilson
1255501d86
drm/i915: Embrace the race in busy-ioctl
...
Daniel Vetter proposed a new challenge to the serialisation inside the
busy-ioctl that exposed a flaw that could result in us reporting the
wrong engine as being busy. If the request is reallocated as we test
its busyness and then reassigned to this object by another thread, we
would not notice that the test itself was incorrect.
We are faced with a choice of using __i915_gem_active_get_request_rcu()
to first acquire a reference to the request preventing the race, or to
acknowledge the race and accept the limitations upon the accuracy of the
busy flags. Note that we guarantee that we never falsely report the
object as idle (providing userspace itself doesn't race), and so the
most important use of the busy-ioctl and its guarantees are fulfilled.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Daniel Vetter <daniel.vetter@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
Reviewed-by: Daniel Vetter <daniel.vetter@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471337440-16777-1-git-send-email-chris@chris-wilson.co.uk
2016-08-16 10:35:02 +01:00
Wei Yongjun
b0f566838c
drm/mgag200: fix error return code in mgag200fb_create()
...
Fix to return error code -ENOMEM from the vmalloc() error handling
case instead of 0, as done elsewhere in this function.
Fixes: aec9e12953
("drm/mgag200: Fix error handling paths in fbdev driver")
Signed-off-by: Wei Yongjun <weiyj.lk@gmail.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: http://patchwork.freedesktop.org/patch/msgid/1471273431-6753-1-git-send-email-weiyj.lk@gmail.com
2016-08-16 09:10:16 +02:00
Chris Wilson
1544c42ed9
drm/i915: Initialise mmaped_count for i915_gem_object_info
...
Reported-by: 0day kbuild test robot
Fixes: 2bd160a131
("drm/i915: Reduce i915_gem_objects to only show...")
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Link: http://patchwork.freedesktop.org/patch/msgid/1471263496-27537-1-git-send-email-chris@chris-wilson.co.uk
Reviewed-by: Mika Kuoppala <mika.kuoppala@intel.com >
2016-08-15 14:02:41 +01:00
Lucas Stach
d985349017
drm/etnaviv: take GPU lock later in the submit process
...
Both the fence and event alloc are safe to be done without holding the GPU
lock, as they either don't need any locking (fences) or are protected by
their own lock (events).
This solves a bad locking interaction between the submit path and the
recover worker. If userspace manages to exhaust all available events while
the GPU is hung, the submit will wait for events to become available
holding the GPU lock. The recover worker waits for this lock to become
available before trying to recover the GPU which frees up the allocated
events. Essentially both paths are deadlocked until the submit path
times out waiting for available events, failing the submit that could
otherwise be handled just fine if the recover worker had the chance to
bring the GPU back in a working state.
Signed-off-by: Lucas Stach <l.stach@pengutronix.de >
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com >
2016-08-15 14:00:40 +02:00
Chris Wilson
21a2c58a9c
drm/i915: Record the RING_MODE register for post-mortem debugging
...
Just another useful register to inspect following a GPU hang.
v2: Remove partial decoding of RING_MODE to userspace, be consistent and
use GEN > 2 guards around RING_MODE everywhere.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-32-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:19 +01:00
Chris Wilson
57bc699d43
drm/i915: Only record active and pending requests upon a GPU hang
...
There is no other state pertaining to the completed requests in the
hang, other than gleamed through the ringbuffer, so including the
expired requests in the list of outstanding requests simply adds noise.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-31-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:18 +01:00
Chris Wilson
03382dfb63
drm/i915: Print the batchbuffer offset next to BBADDR in error state
...
It is useful when looking at captured error states to check the recorded
BBADDR register (the address of the last batchbuffer instruction loaded)
against the expected offset of the batch buffer, and so do a quick check
that (a) the capture is true or (b) HEAD hasn't wandered off into the
badlands.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-30-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:16 +01:00
Chris Wilson
c84455b4ba
drm/i915: Move debug only per-request pid tracking from request to ctx
...
Since contexts are not currently shared between userspace processes, we
have an exact correspondence between context creator and guilty batch
submitter. Therefore we can save some per-batch work by inspecting the
context->pid upon error instead. Note that we take the context's
creator's pid rather than the file's pid in order to better track fd
passed over sockets.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-29-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:15 +01:00
Chris Wilson
bde13ebdab
drm/i915: Introduce i915_ggtt_offset()
...
This little helper only exists to safely discard the upper unused 32bits
of the general 64-bit VMA address - as we know that all Global GTT
currently are less than 4GiB in size and so that the upper bits must be
zero. In many places, we use a u32 for the global GTT offset and we want
to document where we are discarding the full VMA offset.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-28-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:14 +01:00
Chris Wilson
058d88c433
drm/i915: Track pinned VMA
...
Treat the VMA as the primary struct responsible for tracking bindings
into the GPU's VM. That is we want to treat the VMA returned after we
pin an object into the VM as the cookie we hold and eventually release
when unpinning. Doing so eliminates the ambiguity in pinning the object
and then searching for the relevant pin later.
v2: Joonas' stylistic nitpicks, a fun rebase.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-27-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:13 +01:00
Chris Wilson
19880c4a3f
drm/i915: Consolidate i915_vma_unpin_and_release()
...
In a few places, we repeat a call to clear a pointer to a vma whilst
unpinning and releasing a reference to its owner. Refactor those into a
common function.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-26-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:12 +01:00
Chris Wilson
48bb74e48b
drm/i915: Use VMA for wa_ctx tracking
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-25-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:11 +01:00
Chris Wilson
a5e85c8a4d
drm/i915: Use VMA for render state page tracking
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-24-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:11 +01:00
Chris Wilson
51d545d026
drm/i915: Use VMA as the primary tracker for semaphore page
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-23-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:10 +01:00
Chris Wilson
9b3b7841b8
drm/i915/overlay: Use VMA as the primary tracker for images
...
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-22-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:09 +01:00
Chris Wilson
57f275a22b
drm/i915: Move common seqno reset to intel_engine_cs.c
...
Since the intel_engine_init_seqno() is shared by all engine submission
backends, move it out of the legacy intel_ringbuffer.c and
into the new home for common routines, intel_engine_cs.c
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Reviewed-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Link: http://patchwork.freedesktop.org/patch/msgid/1471254551-25805-21-git-send-email-chris@chris-wilson.co.uk
2016-08-15 11:01:08 +01:00