93fe862812
drm/i915: Fix transposed arguments to skl_plane_wm_level()
...
Accidentally transposed the arguments to skl_plane_wm_level()
which is causing us to mistakenly think that the plane watermarks
have/have not changed when the opposite may be true. Swap the
arguments so this actually works.
The other uses of this look OK.
Cc: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
Fixes: 2871b2fde4
("drm/i915: Fix TGL+ plane SAGV watermark programming")
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210325004415.17432-1-ville.syrjala@linux.intel.com
Reviewed-by: Stanislav Lisovskiy <stanislav.lisovskiy@intel.com >
2021-03-26 03:25:10 +02:00
54d4e9f5c4
drm/i915: Allow configuring default request expiry via modparam
...
Module parameter is added (request_timeout_ms) to allow configuring the
default request/fence expiry.
Default value is inherited from CONFIG_DRM_I915_REQUEST_TIMEOUT.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-8-tvrtko.ursulin@linux.intel.com
2021-03-26 01:01:38 +01:00
e8dbb566b3
drm/i915: Fail too long user submissions by default
...
A new Kconfig option CONFIG_DRM_I915_REQUEST_TIMEOUT is added, defaulting
to 20s, and this timeout is applied to all users contexts using the
previously added watchdog facility.
Result of this is that any user submission will simply fail after this
timeout, either causing a reset (for non-preemptable), or incomplete
results.
This can have an effect that workloads which used to work fine will
suddenly start failing. Even workloads comprised of short batches but in
long dependency chains can be terminated.
And because of lack of agreement on usefulness and safety of fence error
propagation this partial execution can be invisible to userspace even if
it is "listening" to returned fence status.
Another interaction is with hangcheck where care needs to be taken timeout
is not set lower or close to three times the heartbeat interval. Otherwise
a hang in any application can cause complete termination of all
submissions from unrelated clients. Any users modifying the per engine
heartbeat intervals therefore need to be aware of this potential denial of
service to avoid inadvertently enabling it.
Given all this I am personally not convinced the scheme is a good idea.
Intuitively it feels object importers would be better positioned to
enforce the time they are willing to wait for something to complete.
v2:
* Improved commit message and Kconfig text.
* Pull in some helper code from patch which got dropped.
v3:
* Bump timeout to 20s to see if it helps Tigerlake.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Acked-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-7-tvrtko.ursulin@linux.intel.com
2021-03-26 01:01:27 +01:00
9b4d0598ee
drm/i915: Request watchdog infrastructure
...
Prepares the plumbing for setting request/fence expiration time. All code
is put in place but is never activated due yet missing ability to actually
configure the timer.
Outline of the basic operation:
A timer is started when request is ready for execution. If the request
completes (retires) before the timer fires, timer is cancelled and nothing
further happens.
If the timer fires request is added to a lockless list and worker queued.
Purpose of this is twofold: a) It allows request cancellation from a more
friendly context and b) coalesces multiple expirations into a single event
of consuming the list.
Worker locklessly consumes the list of expired requests and cancels them
all using previous added i915_request_cancel().
Associated timeout value is stored in rq->context.watchdog.timeout_us.
v2:
* Log expiration.
v3:
* Include more information about user timeline in the log message.
v4:
* Remove obsolete comment and fix formatting. (Matt)
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Cc: Daniel Vetter <daniel.vetter@ffwll.ch >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-6-tvrtko.ursulin@linux.intel.com
2021-03-26 00:58:52 +01:00
90a79a91dc
drm/i915: Handle async cancellation in sentinel assert
...
With the watchdog cancelling requests asynchronously to preempt-to-busy we
need to relax one assert making it apply only to requests not in error.
v2:
* Check against the correct request!
v3:
* Simplify the check to avoid the question of when to sample the fence
error vs sentinel bit.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-5-tvrtko.ursulin@linux.intel.com
2021-03-26 00:58:14 +01:00
8f922e4227
drm/i915: Restrict sentinel requests further
...
Disallow sentinel requests follow previous sentinels to make request
cancellation work better when faced with a chain of requests which have
all been marked as in error.
Because in cases where we end up with a stream of cancelled requests we
want to turn off request coalescing so they each will get individually
skipped by the execlists_schedule_in (which is called per ELSP port, not
per request).
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
[danvet: Fix typo in the commit message that Matthew spotted.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-4-tvrtko.ursulin@linux.intel.com
2021-03-26 00:55:36 +01:00
38b237eab2
drm/i915: Individual request cancellation
...
Currently, we cancel outstanding requests within a context when the
context is closed. We may also want to cancel individual requests using
the same graceful preemption mechanism.
v2 (Tvrtko):
* Cancel waiters carefully considering no timeline lock and RCU.
* Fixed selftests.
v3 (Tvrtko):
* Remove error propagation to waiters for now.
v4 (Tvrtko):
* Rebase for extracted i915_request_active_engine. (Matt)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
[danvet: Resolve conflict because intel_engine_flush_scheduler is
still called intel_engine_flush_submission]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-3-tvrtko.ursulin@linux.intel.com
2021-03-26 00:55:30 +01:00
7dbc19da5d
drm/i915: Extract active lookup engine to a helper
...
Move active engine lookup to exported i915_request_active_engine.
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
Reviewed-by: Matthew Auld <matthew.auld@intel.com >
[danvet: Slight rebase, engine->sched.lock is still called
engine->active.lock.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324121335.2307063-2-tvrtko.ursulin@linux.intel.com
2021-03-26 00:48:08 +01:00
ce517f1894
drm: bridge: Add Chipone ICN6211 MIPI-DSI to RGB bridge
...
ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone.
It has a flexible configuration of MIPI DSI signal input and
produce RGB565, RGB666, RGB888 output format.
Add bridge driver for it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210322103328.66442-2-jagan@amarulasolutions.com
2021-03-25 17:46:08 +01:00
a42e37db23
dt-bindings: display: bridge: Add Chipone ICN6211 bindings
...
ICN6211 is MIPI-DSI to RGB Converter bridge from Chipone.
It has a flexible configuration of MIPI DSI signal input and
produces RGB565, RGB666, RGB888 output format.
Add dt-bingings for it.
Signed-off-by: Jagan Teki <jagan@amarulasolutions.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Reviewed-by: Rob Herring <robh@kernel.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20210322103328.66442-1-jagan@amarulasolutions.com
2021-03-25 17:46:07 +01:00
fffa69aa6b
drm: bridge: convert sysfs sprintf/snprintf family to sysfs_emit
...
Fix the following coccicheck warning:
drivers/gpu/drm/bridge/lontium-lt9611uxc.c:858:8-16: WARNING: use
scnprintf or sprintf.
Reported-by: Abaci Robot<abaci@linux.alibaba.com >
Signed-off-by: Jiapeng Chong <jiapeng.chong@linux.alibaba.com >
Reviewed-by: Robert Foss <robert.foss@linaro.org >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Link: https://patchwork.freedesktop.org/patch/msgid/1612689000-64577-1-git-send-email-jiapeng.chong@linux.alibaba.com
2021-03-25 17:26:22 +01:00
d1a97648ae
drm/bridge: lt9611: Fix handling of 4k panels
...
4k requires two dsi pipes, so don't report MODE_OK when only a
single pipe is configured. But rather report MODE_PANEL to
signal that requirements of the panel are not being met.
Reported-by: Peter Collingbourne <pcc@google.com >
Suggested-by: Peter Collingbourne <pcc@google.com >
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Tested-by: John Stultz <john.stultz@linaro.org >
Tested-by: Anibal Limon <anibal.limon@linaro.org >
Tested-by: Peter Collingbourne <pcc@google.com >
Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org >
Acked-by: Vinod Koul <vkoul@kernel.org >
Link: https://patchwork.freedesktop.org/patch/msgid/20201217140933.1133969-1-robert.foss@linaro.org
2021-03-25 16:18:31 +01:00
1d282019f3
MAINTAINERS: Update Maintainers of DRM Bridge Drivers
...
Add myself as co-maintainer of DRM Bridge Drivers. Repository
commit access has already been granted.
https://gitlab.freedesktop.org/freedesktop/freedesktop/-/issues/338
Signed-off-by: Robert Foss <robert.foss@linaro.org >
Acked-by: Neil Armstrong <narmstrong@baylibre.com >
Acked-by: Maxime Ripard <maxime@cerno.tech >
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Acked-by: Andrzej Hajda <a.hajda@samsung.com >
Cc: Neil Armstrong <narmstrong@baylibre.com >
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com >
Cc: Jonas Karlman <jonas@kwiboo.se >
Cc: Andrzej Hajda <a.hajda@samsung.com >
Cc: Jernej Škrabec <jernej.skrabec@siol.net >
Cc: Daniel Vetter <daniel@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210325145154.1433060-1-robert.foss@linaro.org
2021-03-25 15:52:52 +01:00
9eda0155e6
MAINTAINERS: Add linux-mediatek ML for drm Mediatek drivers
...
Add the linux-mediatek mailing list to drm Mediatek drivers
Signed-off-by: Dafna Hirschfeld <dafna.hirschfeld@collabora.com >
Signed-off-by: Chun-Kuang Hu <chunkuang.hu@kernel.org >
2021-03-25 22:46:25 +08:00
b4142fc4d5
drm/vkms: fix misuse of WARN_ON
...
vkms_vblank_simulate() uses WARN_ON for timing-dependent condition
(timer overrun). This is a mis-use of WARN_ON, WARN_ON must be used
to denote kernel bugs. Use pr_warn() instead.
Signed-off-by: Dmitry Vyukov <dvyukov@google.com >
Reported-by: syzbot+4fc21a003c8332eb0bdd@syzkaller.appspotmail.com
Cc: Rodrigo Siqueira <rodrigosiqueiramelo@gmail.com >
Cc: Melissa Wen <melissa.srw@gmail.com >
Cc: Haneen Mohammed <hamohammed.sa@gmail.com >
Cc: Daniel Vetter <daniel@ffwll.ch >
Cc: David Airlie <airlied@linux.ie >
Cc: dri-devel@lists.freedesktop.org
Cc: linux-kernel@vger.kernel.org
Acked-by: Melissa Wen <melissa.srw@gmail.com >
Signed-off-by: Melissa Wen <melissa.srw@gmail.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210320132840.1315853-1-dvyukov@google.com
2021-03-25 08:23:28 -03:00
2da21daa7d
drm/i915/gt: Always flush the submission queue on checking for idle
...
We check for idle during debug prints and other debugging actions.
Simplify the flow by not touching execlists state.
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/20210205174358.28465-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
985458d706
drm/i915/selftest: Synchronise with the GPU timestamp
...
Wait for the GPU to wake up from the semaphore before measuring the
time, so that we coordinate the sampling on both the CPU and GPU for
more accurate comparisons.
v2: Switch to local_irq_disable() as once suggested by Mika.
Reported-by: Bruce Chang <yu.bruce.chang@intel.com >
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: CQ Tang <cq.tang@intel.com >
Reviewed-by: Bruce Chang <yu.bruce.chang@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210205112912.22978-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
dc43040012
drm/i915: give stolen system memory its own class
...
In some future patches we will need to also support a stolen region
carved from device local memory, on platforms like DG1. To handle this
we can simply describe each in terms of its own memory class.
Signed-off-by: Matthew Auld <matthew.auld@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/20210205102026.806699-2-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
8ec8ad0f2f
drm/i915: cleanup the region class/instance encoding
...
Get rid of the strange REGION_MAP encoding stuff and just use an
explicit class/instance pair for each region. This better matches our
future uAPI where all queryable regions are identified with a u16 class
and u16 instance.
v2: fix whitespace
Signed-off-by: Matthew Auld <matthew.auld@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/20210205102026.806699-1-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
2827ce6e54
drm/i915/gt: Double check heartbeat timeout before resetting
...
Check that we have actually passed the heartbeat interval since last
checking the request before resetting the device.
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2780
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/20210204211303.21347-2-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
10c5585b51
drm/i915/selftests: Restore previous heartbeat interval
...
Use the defaults we store on the engine when resetting the heartbeat as
we may have had to adjust it from the config value during initialisation.
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/20210204211303.21347-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
e762bdf582
drm/i915/gtt/dg1: add PTE_LM plumbing for GGTT
...
For the PTEs we get an LM bit, to signal whether the page resides in
SMEM or LMEM.
Based on a patch from Michel Thierry.
BSpec: 45015
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@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/20210203171231.551338-3-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:59 +01:00
11724eea0d
drm/i915/gtt/dg1: add PTE_LM plumbing for ppGTT
...
For the PTEs we get an LM bit, to signal whether the page resides in
SMEM or LMEM.
BSpec: 45040
v2: just use gen8_pte_encode for dg1
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Signed-off-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com >
Signed-off-by: Niranjana Vishwanathapura <niranjana.vishwanathapura@intel.com >
Signed-off-by: Venkata Sandeep Dhanalakota <venkata.s.dhanalakota@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/20210203171231.551338-2-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:58 +01:00
c538d54e49
drm/i915: Distinction of memory regions
...
In preparation for Xe HP multi-tile architecture with multiple memory
regions, we need to be able differentiate multiple instances of device
local-memory.
Note that the region name is just to give it a human friendly
identifier, instead of using class/instance which also uniquely
identifies the region. So far the region name is only for our own
internal debugging in the kernel(like in the selftests), or debugfs
which prints the list of regions, including the regions name.
v2: add commentary for our current region name use
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210203171231.551338-1-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:31:58 +01:00
c9a995e5a7
drm/i915/gt: Retire unexpected starting state error dumping
...
We have not seen an occurrence of the false restart state recenty, and if
we did see such an event from inside engine-reset, it would deadlock on
trying to suspend the tasklet to read the register state (from inside
the tasklet). Instead, we inspect the context state before submission
which will alert us to any issues prior to execution on HW.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Cc: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Cc: Andi Shyti <andi.shyti@intel.com >
Reviewed-by: Andi Shyti <andi.shyti@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210201164222.14455-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
8bb92516da
drm/i915/selftests: Use a single copy of the mocs table
...
Instead of copying the whole table to each category (mocs, l3cc), use a
single table with a pointer to it if the category is enabled.
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/20210201100448.9802-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
c10e4a7960
drm/i915: Protect against request freeing during cancellation on wedging
...
As soon as we mark a request as completed, it may be retired. So when
cancelling a request and marking it complete, make sure we first keep a
reference to the request.
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/20210201085715.27435-4-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
d712f4ce25
drm/i915: allocate cmd ring in lmem
...
Prefer allocating the cmd ring from LMEM on dgfx.
Signed-off-by: Michel Thierry <michel.thierry@intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-8-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
772d5bdf2b
drm/i915: move engine scratch to LMEM
...
Prefer allocating the engine scratch from LMEM on dgfx.
v2: flatten the chain
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-7-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
ba485bc8ed
drm/i915: allocate context from LMEM
...
Prefer allocating the context from LMEM on dgfx.
Based on a patch from Michel Thierry.
v2: flatten the chain
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-6-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
7c5cc94133
drm/i915/dg1: Reserve first 1MB of local memory
...
On DG1 A0/B0 steppings the first 1MB of local memory must be reserved.
One reason for this is that the 0xA0000-0xB0000 range is not accessible
by the display, probably since this region is redirected to another
memory location for legacy VGA compatibility.
BSpec: 50586
Testcase: igt/kms_big_fb/linear-64bpp-rotate-0
v2:
- Reserve the memory on B0 as well.
v3: replace DRM_DEBUG/DRM_ERROR with drm_dbg/drm_err
v4: fix the insanity
Signed-off-by: Imre Deak <imre.deak@intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-5-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
adeca641bc
drm/i915: introduce mem->reserved
...
In the following patch we need to reserve regions unaccessible to the
driver during initialization, so add mem->reserved for collecting such
regions.
v2: turn into an actual intel_memory_region_reserve api
Cc: Imre Deak <imre.deak@intel.com >
Signed-off-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-4-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
7f2aa5b301
drm/i915: reserve stolen for LMEM region
...
The lmem region needs to remove the stolen part, which should just be a
case of snipping it off the end.
Signed-off-by: CQ Tang <cq.tang@intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-3-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
a50ca39fbd
drm/i915: setup the LMEM region
...
Hook up the LMEM region. Addresses will start from zero, and for CPU
access we get LMEM_BAR which is just a 1:1 mapping of said region.
Based on a patch from Michel Thierry.
v2 by Jani:
- use intel_uncore_read/intel_uncore_write
- remove trailing blank line
v3: s/drm_info/drm_dbg for info which in non-pertinent for the user
Cc: Lucas De Marchi <lucas.demarchi@intel.com >
Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com >
Cc: Rodrigo Vivi <rodrigo.vivi@intel.com >
Signed-off-by: Matthew Auld <matthew.auld@intel.com >
Signed-off-by: Lucas De Marchi <lucas.demarchi@intel.com >
Signed-off-by: Jani Nikula <jani.nikula@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/20210127131417.393872-2-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
2dfcc7f4e9
drm/i915: make local-memory probing a GT operation
...
Device local memory is very much a GT thing, therefore it should be the
responsibility of the GT to setup the device local memory region.
Suggested-by: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com >
Signed-off-by: Matthew Auld <matthew.auld@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/20210127131417.393872-1-matthew.auld@intel.com
[danvet: Rebase conflict.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
2913fa4d7d
drm/i915/gt: use new tasklet API for execution list
...
This converts the driver to use the new tasklet API introduced in
commit 12cc923f1c
("tasklet: Introduce new initialization API")
v2: Fix up selftests/execlists.
Signed-off-by: Emil Renner Berthing <kernel@esmil.dk >
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/20210126150155.1617-1-kernel@esmil.dk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:36 +01:00
a29a22917d
drm/i915/buddy: document the unused header bits
...
The largest possible order is (63-PAGE_SHIFT), given that our min chunk
size is PAGE_SIZE. With that we should only need at most 6 bits to
represent all possible orders, giving us back 4 bits for other potential
uses. Include a simple selftest to verify this.
Signed-off-by: Matthew Auld <matthew.auld@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/20210126103019.177622-1-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
b3f0c15a8e
drm/i915/gt: Move the defer_request waiter active assertion
...
In defer_request() we start with the request we just unsubmitted (that
should be the active request on the gpu) and then defer all of its
waiters. No waiter should be ahead of the active request, so none should
be marked as active. That assert failed.
Of particular note this machine was undergoing persistent GPU resets due
to underlying HW issues, so that may be a clue. A request is also marked
as active when it is retired, regardless of current queue status, and so
this assertion failure may be a result of the queue being completed by
the reset and then subsequently processed by the tasklet.
We can filter out retired requests here by doing the assertion check
after the is-ready check (active is a subset of being ready).
Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2978
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/20210125140136.10494-2-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
310528114f
drm/i915/selftests: Check for engine-reset errors in the middle of workarounds
...
As we reset the engine between verifying the workarounds remain intact,
report an engine reset failure.
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/20210125140136.10494-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
ae2fb480f3
drm/i915/gem: consolidate 2big error checking for object sizes
...
Throw it into a simple helper, and throw a warning if we encounter an
object which has been initialised with an object size that exceeds our
limit of INT_MAX pages.
Suggested-by: Chris Wilson <chris@chris-wilson.co.uk >
Signed-off-by: Matthew Auld <matthew.auld@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/20210122181514.541436-2-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
f63f452ea6
drm/i915/gem: don't trust the dma_buf->size
...
At least for the time being, we need to limit our object sizes such that
the number of pages can fit within a 32b signed int. It looks like we
should also apply the same restriction to any imported dma-buf.
Signed-off-by: Matthew Auld <matthew.auld@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/20210122181514.541436-1-matthew.auld@intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
041b7f0762
drm/i915/gt: Replace 'return' with a fall-through
...
Checkpatch worries that the 'return' before an else clause might be
redundant. In this case, it is avoiding hitting the MISSING_CASE()
warning. Let us appease checkpatch by falling through to the end of the
function, which typically means that we then clean up the unused
wa_list.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-10-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
32ce590bdd
drm/i915/gt: Add a space before '('
...
Checkpatch noticed a while(0) and complains about the lack of space.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-9-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
70b0f07770
drm/i915/gt: Replace unnecessary ',' with '; '
...
Checkpatch spotted a couple of commas where we can use the more common
';', and so not worry about the subtle implications of sequence points.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-8-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
512114178e
drm/i915/gt: Insert spaces into GEN3_L3LOG_SIZE/4
...
Checkpatch wants spaces, let's give it some spaces.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-7-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
cbdeab13ad
drm/i915/gt: Wrap macro arg in ()
...
Checkpatch noticed that ppgtt->pd should have been (ppgtt)->pd to avoid
issues with macros.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-6-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
ec450576f8
drm/i915/gt: Remove a bonus newline
...
Trailing newlines before closing the function are best forgotten, or
else checkpatch moans.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-5-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
7898843c44
drm/i915/gt: Fixup misaligned function parameters
...
Remember to align parameters to the '(', thanks checkpatch
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-4-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
1ca9b8da0f
drm/i915/gt: Remove repeated words from comments
...
Checkpatch spotted a few repeated words in the comment, genuine
mistakes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-3-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00
2f8aa3b80e
drm/i915/gt: Add some missing blank lines after declaration
...
Trivial checkpatch cleanup.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Michal Wajdeczko <michal.wajdeczko@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210122192913.4518-2-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:35 +01:00