Robert Foss
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
Robert Foss
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
Dafna Hirschfeld
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
Dmitry Vyukov
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
Chris Wilson
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
Chris Wilson
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
Matthew Auld
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
Matthew Auld
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
Chris Wilson
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
Chris Wilson
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
Matthew Auld
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
Matthew Auld
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
Zbigniew Kempczyński
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Michel Thierry
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
Matthew Auld
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
Matthew Auld
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
Imre Deak
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
Abdiel Janulgue
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
CQ Tang
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
Matthew Auld
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
Matthew Auld
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
Emil Renner Berthing
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
Matthew Auld
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
Chris Wilson
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
Chris Wilson
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
Matthew Auld
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
Matthew Auld
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
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
Chris Wilson
24f90d6688
drm/i915/gt: SPDX cleanup
...
Clean up the SPDX licence declarations to comply with 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-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:34 +01:00
Tvrtko Ursulin
56afa70151
drm/i915: Decrease number of subplatform bits
...
Commit 6ce1c33d6c ("drm/i915: Kill INTEL_SUBPLATFORM_AML") removed the
only platform which used bit 2 so could also decrease the
INTEL_SUBPLATFORM_BITS definition.
This is not a fixes material but still lets make it precise.
v2:
* Fix assert in intel_device_info_subplatform_init by introducing
INTEL_SUBPLATFORM_MASK. (Chris)
* Update intel_subplatform().
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com >
References: 6ce1c33d6c ("drm/i915: Kill INTEL_SUBPLATFORM_AML")
Cc: Chris Wilson <chris@chris-wilson.co.uk >
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/20210121161936.746591-2-tvrtko.ursulin@linux.intel.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:34 +01:00
Chris Wilson
536f77b1ca
drm/i915/gt: Call stop_ring() from ring resume, again
...
For reasons I cannot explain, except to say this is Sandybridge after
all, call stop_ring() again dring ring resume in order to prevent
mysterious hard hangs.
Testcase: igt/i915_selftest/hangcheck # snb
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Cc: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Acked-by: Mika Kuoppala <mika.kuoppala@linux.intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210121154950.19898-3-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:34 +01:00
Chris Wilson
eb5c10cbbc
drm/i915: Remove I915_USER_PRIORITY_SHIFT
...
As we do not have any internal priority levels, the priority can be set
directed from the user values.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Andi Shyti <andi.shyti@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210120121439.17600-2-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:34 +01:00
Chris Wilson
2867ff6ceb
drm/i915: Strip out internal priorities
...
Since we are not using any internal priority levels, and in the next few
patches will introduce a new index for which the optimisation is not so
lear cut, discard the small table within the priolist.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk >
Reviewed-by: Andi Shyti <andi.shyti@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210120121439.17600-1-chris@chris-wilson.co.uk
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
2021-03-24 19:30:34 +01:00
Kai Vehmanen
989634fb49
drm/i915/audio: set HDA link parameters in driver
...
Update logic to program AUD_FREQ_CNTRL register based on new guidance.
Earlier this register was configured by BIOS and driver discovered the
value at init. This is no longer recommended and instead driver should
set the values based on the hardware revision.
Add the recommended values for all supported hardware. This change applies
for all GEN12+ hardware. For TGL, some special case handling is needed
to not break existing systems.
Extend the debug print to also include values of the register as written
by BIOS. This can help debug rare cases where BIOS has configured the link
settings to incorrect values.
Bspec: 49279
Signed-off-by: Kai Vehmanen <kai.vehmanen@linux.intel.com >
Reviewed-by: Uma Shankar <uma.shankar@intel.com >
Signed-off-by: Uma Shankar <uma.shankar@intel.com >
Link: https://patchwork.freedesktop.org/patch/msgid/20210324123725.4170214-1-kai.vehmanen@linux.intel.com
2021-03-24 23:55:32 +05:30
Maarten Lankhorst
5b0a78ec0b
drm/i915: Move gt_revoke() slightly
...
We get a lockdep splat when the reset mutex is held, because it can be
taken from fence_wait. This conflicts with the mmu notifier we have,
because we recurse between reset mutex and mmap lock -> mmu notifier.
Remove this recursion by calling revoke_mmaps before taking the lock.
The reset code still needs fixing, as taking mmap locks during reset
is not allowed.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
[danvet: Add FIXME.]
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-64-maarten.lankhorst@linux.intel.com
2021-03-24 17:59:37 +01:00
Maarten Lankhorst
fd995a3cc4
drm/i915: Keep userpointer bindings if seqcount is unchanged, v2.
...
Instead of force unbinding and rebinding every time, we try to check
if our notifier seqcount is still correct when pages are bound. This
way we only rebind userptr when we need to, and prevent stalls.
Changes since v1:
- Missing mutex_unlock, reported by kbuild.
Reported-by: kernel test robot <lkp@intel.com >
Reported-by: Dan Carpenter <dan.carpenter@oracle.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@intel.com >
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-63-maarten.lankhorst@linux.intel.com
2021-03-24 17:48:11 +01:00
Maarten Lankhorst
cf41a8f1dc
drm/i915: Finally remove obj->mm.lock.
...
With all callers and selftests fixed to use ww locking, we can now
finally remove this lock.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-62-maarten.lankhorst@linux.intel.com
2021-03-24 17:47:20 +01:00
Maarten Lankhorst
480ae79537
drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal
...
We need to lock the global gtt dma_resv, use i915_vm_lock_objects
to handle this correctly. Add ww handling for this where required.
Add the object lock around unpin/put pages, and use the unlocked
versions of pin_pages and pin_map where required.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-61-maarten.lankhorst@linux.intel.com
2021-03-24 17:46:56 +01:00
Maarten Lankhorst
b91e1b11f9
drm/i915/selftests: Prepare cs engine tests for obj->mm.lock removal
...
Same as other tests, use pin_map_unlocked.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com >
Reviewed-by: Thomas Hellström <thomas.hellstrom@linux.intel.com >
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch >
Link: https://patchwork.freedesktop.org/patch/msgid/20210323155059.628690-60-maarten.lankhorst@linux.intel.com
2021-03-24 17:46:47 +01:00