[Intel-gfx] ✗ Fi.CI.IGT: failure for Gen12 forcewake and multicast updates

2020-10-02 Thread Patchwork
== Series Details == Series: Gen12 forcewake and multicast updates URL : https://patchwork.freedesktop.org/series/82359/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9093_full -> Patchwork_18621_full Summary --- **F

Re: [Intel-gfx] [PATCH v2] drm/i915/display/ehl: Limit eDP to HBR2

2020-10-02 Thread Matt Roper
On Mon, Sep 28, 2020 at 01:03:09PM -0700, José Roberto de Souza wrote: > Recent update in documentation defeatured eDP HBR3 for EHL and JSL. > > v2: > - Remove dead code in ehl_get_combo_buf_trans() > > BSpec: 32247 > Cc: Matt Roper > Cc: Vidya Srinivas > Signed-off-by: José Roberto de Souza

[Intel-gfx] ✓ Fi.CI.BAT: success for Gen12 forcewake and multicast updates

2020-10-02 Thread Patchwork
== Series Details == Series: Gen12 forcewake and multicast updates URL : https://patchwork.freedesktop.org/series/82359/ State : success == Summary == CI Bug Log - changes from CI_DRM_9093 -> Patchwork_18621 Summary --- **SUCCESS**

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3) URL : https://patchwork.freedesktop.org/series/82173/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9093_full -> Patchwork_18620_full

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Gen12 forcewake and multicast updates

2020-10-02 Thread Patchwork
== Series Details == Series: Gen12 forcewake and multicast updates URL : https://patchwork.freedesktop.org/series/82359/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. - +./include/linux/spinlock.

[Intel-gfx] [PATCH 0/2] Gen12 forcewake and multicast updates

2020-10-02 Thread Matt Roper
The hardware architects have finally provided an updated MMIO table for gen12 platforms (TGL, RKL, DG1). We should update our driver's forcewake and MCR programming accordingly. Bspec: 66696 Cc: Caz Yokoyama Cc: Daniele Ceraolo Spurio Matt Roper (2): drm/i915: Update gen12 forcewake table

[Intel-gfx] [PATCH 2/2] drm/i915: Update gen12 multicast register ranges

2020-10-02 Thread Matt Roper
The updated bspec forcewake table also provides us with new multicast ranges that should be reflected in our workaround code. Note that there are different types of multicast registers with different styles of replication and different steering registers. The i915 MCR range lists we're updating h

[Intel-gfx] [PATCH 1/2] drm/i915: Update gen12 forcewake table

2020-10-02 Thread Matt Roper
The bspec's forcewake page was very stale and out of date for recent platforms. The hardware team finally provided us with an updated gen12 table (which applies to TGL, RKL, and DG1) and there are a lot of changes. Bspec: 66696 Cc: Caz Yokoyama Cc: Daniele Ceraolo Spurio Signed-off-by: Matt Rop

[Intel-gfx] ✗ Fi.CI.IGT: failure for Allow privileged user to map the OA buffer

2020-10-02 Thread Patchwork
== Series Details == Series: Allow privileged user to map the OA buffer URL : https://patchwork.freedesktop.org/series/82353/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9093_full -> Patchwork_18618_full Summary ---

Re: [Intel-gfx] [PATCH 2/6] drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock

2020-10-02 Thread kernel test robot
Hi Umesh, Thank you for the patch! Perhaps something to improve: [auto build test WARNING on drm-intel/for-linux-next] [also build test WARNING on drm-tip/drm-tip linus/master v5.9-rc7 next-20201002] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3) URL : https://patchwork.freedesktop.org/series/82173/ State : success == Summary == CI Bug Log - changes from CI_DRM_9093 -> Patchwork_18620 ==

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev3) URL : https://patchwork.freedesktop.org/series/82173/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be chec

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications URL : https://patchwork.freedesktop.org/series/82351/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9093_full -> Patchwork_18617_full ==

[Intel-gfx] [PATCH v2 2/5] drm/i915: Move the initial fastset commit check to encoder hooks

2020-10-02 Thread Imre Deak
Move the checks to decide whether a fastset is possible during the initial commit to an encoder hook. This check is really encoder specific and the next patch will also require this adding a DP encoder specific check. v2: Fix negated condition in gen11_dsi_initial_fastset_check(). Cc: Ville Syrjä

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev2)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev2) URL : https://patchwork.freedesktop.org/series/82173/ State : success == Summary == CI Bug Log - changes from CI_DRM_9093 -> Patchwork_18619 ==

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev2)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock (rev2) URL : https://patchwork.freedesktop.org/series/82173/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be chec

[Intel-gfx] ✓ Fi.CI.BAT: success for Allow privileged user to map the OA buffer

2020-10-02 Thread Patchwork
== Series Details == Series: Allow privileged user to map the OA buffer URL : https://patchwork.freedesktop.org/series/82353/ State : success == Summary == CI Bug Log - changes from CI_DRM_9093 -> Patchwork_18618 Summary --- **SUCCES

[Intel-gfx] [PATCH 1/5] drm/i915/skl: Work around incorrect BIOS WRPLL PDIV programming

2020-10-02 Thread Imre Deak
The BIOS of at least one ASUS-Z170M system with an SKL I have programs the 101b WRPLL PDIV divider value, which is the encoding for PDIV=7 with bit#0 incorrectly set. This happens with the "3840x2160": 30 262750 3840 3888 3920 4000 2160 2163 2168 2191 0x48 0x9 HDMI mode (scaled from a 1024x768 s

[Intel-gfx] [PATCH 3/5] drm/i915: Check for unsupported DP link rates during initial commit

2020-10-02 Thread Imre Deak
Some BIOSes set an unsupported/imprecise DP link rate (for instance on TGL A stepping). Make sure that we do an encoder recompute and a modeset in this case. Cc: Ville Syrjälä Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/intel_dp.c | 12 1 file changed, 12 insertions(+

[Intel-gfx] [PATCH 0/5] drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock

2020-10-02 Thread Imre Deak
This patchset replaces [1]. That version's solution to work around broken TGL A BIOSes turned out to be papering over something. The real root cause was the lack of a full encoder recompute/modeset during the initial commit and leaking the incorrect link rate into the PLL frequency calculation code

[Intel-gfx] [PATCH 4/5] drm/i915: Add an encoder hook to sanitize its state during init/resume

2020-10-02 Thread Imre Deak
Atm, if a full modeset is performed during the initial modeset the link training will happen with uninitialized max DP rate and lane count. Make sure the corresponding encoder state is initialized by adding an encoder hook called during driver init and system resume. A better alternative would be

[Intel-gfx] [PATCH 2/5] drm/i915: Move the initial fastset commit check to encoder hooks

2020-10-02 Thread Imre Deak
Move the checks to decide whether a fastset is possible during the initial commit to an encoder hook. This check is really encoder specific and the next patch will also require this adding a DP encoder specific check. Cc: Ville Syrjälä Signed-off-by: Imre Deak --- drivers/gpu/drm/i915/display/i

[Intel-gfx] [PATCH 5/5] drm/i915/tgl: Fix Combo PHY DPLL fractional divider for 38.4MHz ref clock

2020-10-02 Thread Imre Deak
Apply Display WA #22010492432 for combo PHY PLLs too. This should fix a problem where the PLL output frequency is slightly off with the current PLL fractional divider value. I haven't seen an actual case where this causes a problem, but let's follow the spec. It's also needed on some EHL platforms

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Allow privileged user to map the OA buffer

2020-10-02 Thread Patchwork
== Series Details == Series: Allow privileged user to map the OA buffer URL : https://patchwork.freedesktop.org/series/82353/ State : warning == Summary == $ dim sparse --fast origin/drm-tip Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately. +drivers/gpu/drm/i915/g

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Allow privileged user to map the OA buffer

2020-10-02 Thread Patchwork
== Series Details == Series: Allow privileged user to map the OA buffer URL : https://patchwork.freedesktop.org/series/82353/ State : warning == Summary == $ dim checkpatch origin/drm-tip febfa8b6a73d drm/i915/perf: Ensure observation logic is not clock gated ed4d60599ff2 drm/i915/gt: Lock int

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications URL : https://patchwork.freedesktop.org/series/82351/ State : success == Summary == CI Bug Log - changes from CI_DRM_9093 -> Patchwork_18617 Su

[Intel-gfx] [PATCH 3/6] drm/i915/perf: Whitelist OA report trigger registers

2020-10-02 Thread Umesh Nerlige Ramappa
OA reports can be triggered into the OA buffer by writing into the OAREPORTTRIG registers. Whitelist the registers to allow non-privileged user to trigger reports. Whitelist registers only if perf_stream_paranoid is set to 0. In i915_perf_open_ioctl, this setting is checked and the whitelist is en

[Intel-gfx] [PATCH 5/6] drm/i915/perf: Whitelist OA counter and buffer registers

2020-10-02 Thread Umesh Nerlige Ramappa
It is useful to have markers in the OA reports to identify triggered reports. Whitelist some OA counters that can be used as markers. A triggered report can be found faster if we can sample the HW tail and head registers when the report was triggered. Whitelist OA buffer specific registers. v2: -

[Intel-gfx] [PATCH 4/6] drm/i915/gt: Refactor _wa_add to reuse wa_index and wa_list_grow

2020-10-02 Thread Umesh Nerlige Ramappa
Switch the search and grow code of the _wa_add to use _wa_index and _wa_list_grow. Signed-off-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 54 +++-- 1 file changed, 17 insertions(+), 37 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_workar

[Intel-gfx] [PATCH 0/6] Allow privileged user to map the OA buffer

2020-10-02 Thread Umesh Nerlige Ramappa
Allow user to map the OA buffer and also trigger reports into it. CI fixes: v1: Fixes a memory corruption due to addition of OA whitelist on demand. v2: Spinlock when applying whitelist v3: Use uncore->lock. Do not check for wal->count when applying whitelist. v4: Refresh and rerun with newly adde

[Intel-gfx] [PATCH 1/6] drm/i915/perf: Ensure observation logic is not clock gated

2020-10-02 Thread Umesh Nerlige Ramappa
From: Piotr Maciejewski A clock gating switch can control if the performance monitoring and observation logic is enaled or not. Ensure that we enable the clocks. v2: Separate code from other patches (Lionel) v3: Reset PMON enable when disabling perf to save power (Lionel) v4: Use intel_uncore_rm

[Intel-gfx] [PATCH 6/6] drm/i915/perf: Map OA buffer to user space for gen12 performance query

2020-10-02 Thread Umesh Nerlige Ramappa
i915 used to support time based sampling mode which is good for overall system monitoring, but is not enough for query mode used to measure a single draw call or dispatch. Gen9-Gen11 are using current i915 perf implementation for query, but Gen12+ requires a new approach for query based on triggere

[Intel-gfx] [PATCH 2/6] drm/i915/gt: Lock intel_engine_apply_whitelist with uncore->lock

2020-10-02 Thread Umesh Nerlige Ramappa
Refactor intel_engine_apply_whitelist into locked and unlocked versions so that a caller who already has the lock can apply whitelist. Signed-off-by: Umesh Nerlige Ramappa --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 44 +++-- 1 file changed, 31 insertions(+), 13 deletions(-

[Intel-gfx] [PATCH] drm/i915/tgl/psr: Fix glitches when doing frontbuffer modifications

2020-10-02 Thread José Roberto de Souza
Writes to CURSURFLIVE in TGL are causing IOMMU errors and visual glitches that are often reproduced when executing CPU intensive workloads while a eDP 4K panel is attached. Manually exiting PSR causes the frontbuffer to be updated without glitches and the IOMMU errors are also gone but this comes

Re: [Intel-gfx] [PATCH 10/61] drm/i915: Disable userptr pread/pwrite support.

2020-10-02 Thread Ruhl, Michael J
>-Original Message- >From: Intel-gfx On Behalf Of >Maarten Lankhorst >Sent: Friday, October 2, 2020 8:59 AM >To: intel-gfx@lists.freedesktop.org >Subject: [Intel-gfx] [PATCH 10/61] drm/i915: Disable userptr pread/pwrite >support. > >Userptr should not need the kernel for a userspace memcpy

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/gt: Track the most recent pulse for the heartbeat (rev2)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/gt: Track the most recent pulse for the heartbeat (rev2) URL : https://patchwork.freedesktop.org/series/82339/ State : success == Summary == CI Bug Log - changes from CI_DRM_9092_full -> Patchwork_18615_full

Re: [Intel-gfx] [PATCH 00/61] drm/i915: Remove obj->mm.lock!

2020-10-02 Thread Chris Wilson
Quoting Maarten Lankhorst (2020-10-02 13:58:38) > Finally there, just needs a lot of fixes! You are joking, right? -Chris ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PULL] drm-intel-next-fixes

2020-10-02 Thread Rodrigo Vivi
Hi Dave and Daniel, Here goes our first next-fixes. Please be aware this includes both drm-intel-next and drm-intel-gt-next. Also, most of patches from drm-intel-gt-next were accumulated for not being part of current drm-intel-fixes flow while we are defining the new split and flow. So, there ar

[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915: Remove obj->mm.lock!

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915: Remove obj->mm.lock! URL : https://patchwork.freedesktop.org/series/82337/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9092_full -> Patchwork_18613_full Summary --- **FAILURE*

[Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915: fix size_t greater or equal to zero comparison

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915: fix size_t greater or equal to zero comparison URL : https://patchwork.freedesktop.org/series/82342/ State : failure == Summary == Applying: drm/i915: fix size_t greater or equal to zero comparison Using index info to reconstruct a base tree... M dr

[Intel-gfx] [PATCH][next] drm/i915: fix size_t greater or equal to zero comparison

2020-10-02 Thread Colin King
From: Colin Ian King Currently the check that the unsigned size_t variable i is >= 0 is always true because the unsigned variable will never be negative, causing the loop to run forever. Fix this by changing the pre-decrement check to a zero check on i followed by a decrement of i. Addresses-Co

Re: [Intel-gfx] [PATCH rdma-next v4 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-10-02 Thread Jason Gunthorpe
On Fri, Oct 02, 2020 at 07:11:33PM +0300, Maor Gottlieb wrote: > > On 10/2/2020 6:02 PM, Jason Gunthorpe wrote: > > On Sun, Sep 27, 2020 at 09:46:44AM +0300, Leon Romanovsky wrote: > > > +struct scatterlist *__sg_alloc_table_from_pages(struct sg_table *sgt, > > > + struct page **pages, uns

Re: [Intel-gfx] [PATCH rdma-next v4 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-10-02 Thread Maor Gottlieb
On 10/2/2020 6:02 PM, Jason Gunthorpe wrote: On Sun, Sep 27, 2020 at 09:46:44AM +0300, Leon Romanovsky wrote: +struct scatterlist *__sg_alloc_table_from_pages(struct sg_table *sgt, + struct page **pages, unsigned int n_pages, unsigned int offset, + unsigned long siz

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/gt: Track the most recent pulse for the heartbeat (rev2)

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/gt: Track the most recent pulse for the heartbeat (rev2) URL : https://patchwork.freedesktop.org/series/82339/ State : success == Summary == CI Bug Log - changes from CI_DRM_9092 -> Patchwork_18615 Summ

Re: [Intel-gfx] [PATCH rdma-next v4 1/4] lib/scatterlist: Add support in dynamic allocation of SG table from pages

2020-10-02 Thread Jason Gunthorpe
On Sun, Sep 27, 2020 at 09:46:44AM +0300, Leon Romanovsky wrote: > +struct scatterlist *__sg_alloc_table_from_pages(struct sg_table *sgt, > + struct page **pages, unsigned int n_pages, unsigned int offset, > + unsigned long size, unsigned int max_segment, > + str

[Intel-gfx] [PATCH v2] drm/i915/gt: Track the most recent pulse for the heartbeat

2020-10-02 Thread Chris Wilson
Since we track the idle_pulse for flushing the barriers and avoid re-emitting the pulse upon idling if no futher action is required, this also impacts the heartbeat. Before emitting a fresh heartbeat, we look at the engine idle status and assume that if the pulse was the last request emitted along

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/gt: Track the most recent pulse for the heartbeat

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915/gt: Track the most recent pulse for the heartbeat URL : https://patchwork.freedesktop.org/series/82339/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9092 -> Patchwork_18614 Summary ---

[Intel-gfx] [PATCH] drm/i915/gt: Track the most recent pulse for the heartbeat

2020-10-02 Thread Chris Wilson
Since we track the idle_pulse for flushing the barriers and avoid re-emitting the pulse upon idling if no futher action is required, this also impacts the heartbeat. Before emitting a fresh heartbeat, we look at the engine idle status and assume that if the pulse was the last request emitted along

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Remove obj->mm.lock!

2020-10-02 Thread Patchwork
== Series Details == Series: drm/i915: Remove obj->mm.lock! URL : https://patchwork.freedesktop.org/series/82337/ State : success == Summary == CI Bug Log - changes from CI_DRM_9092 -> Patchwork_18613 Summary --- **SUCCESS** No re

[Intel-gfx] [PATCH 47/61] drm/i915/selftests: Prepare object tests for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Convert a single pin_pages call to use the unlocked version. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object.c b/drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 51/61] drm/i915/selftests: Prepare hangcheck for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Convert a few calls to use the unlocked versions. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_hangcheck.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_hangcheck.c b/drivers/gpu/drm/i915/gt/selftest_hangche

[Intel-gfx] [PATCH 19/61] drm/i915: Handle ww locking in init_status_page

2020-10-02 Thread Maarten Lankhorst
Try to pin to ggtt first, and use a full ww loop to handle eviction correctly. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_engine_cs.c | 37 +++ 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_engine_cs.c b

[Intel-gfx] [PATCH 54/61] drm/i915/selftests: Prepare ring submission for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Use unlocked versions when the ww lock is not held. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_ring_submission.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_ring_submission.c b/drivers/gpu/drm/i915/gt/selfte

[Intel-gfx] [PATCH 49/61] drm/i915/selftests: Prepare igt_gem_utils for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
igt_emit_store_dw needs to use the unlocked version, as it's not holding a lock. This fixes igt_gpu_fill_dw() which is used by some other selftests. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/igt_gem_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

[Intel-gfx] [PATCH 39/61] drm/i915: Use a single page table lock for each gtt.

2020-10-02 Thread Maarten Lankhorst
We may create page table objects on the fly, but we may need to wait with the ww lock held. Instead of waiting on a freed obj lock, ensure we have the same lock for each object to keep -EDEADLK working. This ensures that i915_vma_pin_ww can lock the page tables when required. Signed-off-by: Maarte

[Intel-gfx] [PATCH 53/61] drm/i915/selftests: Prepare mocs tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Use pin_map_unlocked when we're not holding locks. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_mocs.c b/drivers/gpu/drm/i915/gt/selftest_mocs.c index b25eba50c88

[Intel-gfx] [PATCH 48/61] drm/i915/selftests: Prepare object blit tests for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Use some unlocked versions where we're not holding the ww lock. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_object_blt.c b/driv

[Intel-gfx] [PATCH 50/61] drm/i915/selftests: Prepare context selftest for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Only needs to convert a single call to the unlocked version. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_context.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_context.c b/drivers/gpu/drm/i915/gt/selftest_cont

[Intel-gfx] [PATCH 43/61] drm/i915/selftests: Prepare context tests for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_context.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_co

[Intel-gfx] [PATCH 60/61] drm/i915: Finally remove obj->mm.lock.

2020-10-02 Thread Maarten Lankhorst
With all callers and selftests fixed to use ww locking, we can now finally remove this lock. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_object.c| 2 - drivers/gpu/drm/i915/gem/i915_gem_object.h| 5 +-- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 - dr

[Intel-gfx] [PATCH 41/61] drm/i915/selftests: Prepare client blit for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_client_blt.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_cl

[Intel-gfx] [PATCH 59/61] drm/i915/selftests: Prepare gtt tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
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 --- drivers/gp

[Intel-gfx] [PATCH 38/61] drm/i915: Fix ww locking in shmem_create_from_object

2020-10-02 Thread Maarten Lankhorst
Quick fix, just use the unlocked version. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/shmem_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gt/shmem_utils.c b/drivers/gpu/drm/i915/gt/shmem_utils.c index 43c7acbdc79d..8c8dfa41e032

[Intel-gfx] [PATCH 35/61] drm/i915: Lock ww in ucode objects correctly

2020-10-02 Thread Maarten Lankhorst
In the ucode functions, the calls are done before userspace runs, when debugging using debugfs, or when creating semi-permanent mappings; we can safely use the unlocked versions that does the ww dance for us. Because there is no pin_pages_unlocked yet, add it as convenience function. This removes

[Intel-gfx] [PATCH 55/61] drm/i915/selftests: Prepare timeline tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
We can no longer call intel_timeline_pin with a null argument, so add a ww loop that locks the backing object. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_timeline.c | 26 ++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/d

[Intel-gfx] [PATCH 56/61] drm/i915/selftests: Prepare i915_request tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Straightforward conversion by using unlocked versions. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/selftests/i915_request.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i915/selftests/i915_request.c b/drivers/gpu/drm/i915/selftests

[Intel-gfx] [PATCH 42/61] drm/i915/selftests: Prepare coherency tests for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_coherency.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_coheren

[Intel-gfx] [PATCH 12/61] drm/i915: Reject more ioctls for userptr

2020-10-02 Thread Maarten Lankhorst
Allow set_domain to fail silently, waiting for idle should be good enough. set_tiling and set_caching are rejected with -ENXIO, there's no valid reason to allow it. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_domain.

[Intel-gfx] [PATCH 57/61] drm/i915/selftests: Prepare memory region tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Use the unlocked variants for pin_map and pin_pages, and add lock around unpinning/putting pages. Signed-off-by: Maarten Lankhorst --- .../drm/i915/selftests/intel_memory_region.c | 18 +++--- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/selft

[Intel-gfx] [PATCH 29/61] drm/i915: Fix pread/pwrite to work with new locking rules.

2020-10-02 Thread Maarten Lankhorst
We are removing obj->mm.lock, and need to take the reservation lock before we can pin pages. Move the pinning pages into the helper, and merge gtt pwrite/pread preparation and cleanup paths. The fence lock is also removed; it will conflict with fence annotations, because of memory allocations done

[Intel-gfx] [PATCH 23/61] drm/i915: Move pinning to inside engine_wa_list_verify()

2020-10-02 Thread Maarten Lankhorst
This should be done as part of the ww loop, in order to remove a i915_vma_pin that needs ww held. Now only i915_ggtt_pin() callers remaining. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_workarounds.c | 24 -- .../gpu/drm/i915/gt/selftest_workarounds.c

[Intel-gfx] [PATCH 61/61] drm/i915: Keep userpointer bindings if seqcount is unchanged

2020-10-02 Thread Maarten Lankhorst
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. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 29

[Intel-gfx] [PATCH 28/61] drm/i915: Defer pin calls in buffer pool until first use by caller.

2020-10-02 Thread Maarten Lankhorst
We need to take the obj lock to pin pages, so wait until the callers have done so, before making the object unshrinkable. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 2 + .../gpu/drm/i915/gem/i915_gem_object_blt.c| 6 +++ .../gpu/drm/i915/gt/intel_g

[Intel-gfx] [PATCH 16/61] drm/i915: Pin timeline map after first timeline pin.

2020-10-02 Thread Maarten Lankhorst
We're starting to require the reservation lock for pinning, so wait until we have that. Update the selftests to handle this correctly, and ensure pin is called in live_hwsp_rollover_user() and mock_hwsp_freelist(). Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_timeline.c

[Intel-gfx] [PATCH 22/61] drm/i915: Add object locking to vm_fault_cpu

2020-10-02 Thread Maarten Lankhorst
Take a simple lock so we hold ww around (un)pin_pages as needed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_mman.c b/drivers/gpu/drm/i915/gem/i915_gem_mman.c index 5aa037

[Intel-gfx] [PATCH 13/61] drm/i915: Reject UNSYNCHRONIZED for userptr

2020-10-02 Thread Maarten Lankhorst
We should not allow this any more, as it will break with the new userptr implementation, it could still be made to work, but there's no point in doing so. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 2 + drivers/gpu/drm/i915/gem/i915_gem_object.h| 4

[Intel-gfx] [PATCH 32/61] drm/i915: Add igt_spinner_pin() to allow for ww locking around spinner.

2020-10-02 Thread Maarten Lankhorst
By default, we assume that it's called inside igt_create_request to keep existing selftests working, but allow for manual pinning when passing a ww context. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/selftests/igt_spinner.c | 136 --- drivers/gpu/drm/i915/selftests

[Intel-gfx] [PATCH 09/61] drm/i915: make lockdep slightly happier about execbuf.

2020-10-02 Thread Maarten Lankhorst
As soon as we install fences, we should stop allocating memory in order to prevent any potential deadlocks. This is required later on, when we start adding support for dma-fence annotations. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 24 ++--

[Intel-gfx] [PATCH 15/61] drm/i915: Flatten obj->mm.lock

2020-10-02 Thread Maarten Lankhorst
With userptr fixed, there is no need for all separate lockdep classes now, and we can remove all lockdep tricks used. A trylock in the shrinker is all we need now to flatten the locking hierarchy. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 6 +--- driver

[Intel-gfx] [PATCH 18/61] drm/i915: Make ring submission compatible with obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
We map the initial context during first pin. This allows us to remove pin_map from state allocation, which saves us a few retry loops. We won't need this until first pin anyway. intel_ring_submission_setup() is also reworked slightly to do all pinning in a single ww loop. Signed-off-by: Maarten

[Intel-gfx] [PATCH 21/61] drm/i915: Pass ww ctx to intel_pin_to_display_plane

2020-10-02 Thread Maarten Lankhorst
Instead of multiple lockings, lock the object once, and perform the ww dance around attach_phys and pin_pages. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_display.c | 69 --- drivers/gpu/drm/i915/display/intel_display.h | 2 +- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH 45/61] drm/i915/selftests: Prepare execbuf tests for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Also quite simple, a single call needs to use the unlocked version. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_execbuffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/i915_gem_execbuffer.c b/driver

[Intel-gfx] [PATCH 26/61] drm/i915: Make __engine_unpark() compatible with ww locking.

2020-10-02 Thread Maarten Lankhorst
Take the ww lock around engine_unpark. Because of the many many places where rpm is used, I chose the safest option and used a trylock to opportunistically take this lock for __engine_unpark. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 4 +++- 1 file changed,

[Intel-gfx] [PATCH 01/61] drm/i915: Move cmd parser pinning to execbuffer

2020-10-02 Thread Maarten Lankhorst
We need to get rid of allocations in the cmd parser, because it needs to be called from a signaling context, first move all pinning to execbuf, where we already hold all locks. Allocate jump_whitelist in the execbuffer, and add annotations around intel_engine_cmd_parser(), to ensure we only call t

[Intel-gfx] [PATCH 11/61] drm/i915: No longer allow exporting userptr through dma-buf

2020-10-02 Thread Maarten Lankhorst
It doesn't make sense to export a memory address, we will prevent allowing access this way to different address spaces when we rework userptr handling, so best to explicitly disable it. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 5 ++--- 1 file changed, 2

[Intel-gfx] [PATCH 08/61] drm/i915: Convert i915_gem_object_attach_phys() to ww locking

2020-10-02 Thread Maarten Lankhorst
Simple adding of i915_gem_object_lock, we may start to pass ww to get_pages() in the future, but that won't be the case here; We override shmem's get_pages() handling by calling i915_gem_object_get_pages_phys(), no ww is needed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_

[Intel-gfx] [PATCH 20/61] drm/i915: Rework clflush to work correctly without obj->mm.lock.

2020-10-02 Thread Maarten Lankhorst
Pin in the caller, not in the work itself. This should also work better for dma-fence annotations. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_clflush.c | 15 +++ 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_ge

[Intel-gfx] [PATCH 00/61] drm/i915: Remove obj->mm.lock!

2020-10-02 Thread Maarten Lankhorst
Finally there, just needs a lot of fixes! A lot of places were calling certain calls without any object lock held, with the removal of mm.lock we can no longer do this, and have to fix it. Phys page handling has to be redone, as nothing protects obj->ops structure, we have to remove swapping it,

[Intel-gfx] [PATCH 17/61] drm/i915: Populate logical context during first pin.

2020-10-02 Thread Maarten Lankhorst
This allows us to remove pin_map from state allocation, which saves us a few retry loops. We won't need this until first pin, anyway. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_context_types.h | 13 ++- drivers/gpu/drm/i915/gt/intel_lrc.c | 107 +---

[Intel-gfx] [PATCH 02/61] drm/i915: Add missing -EDEADLK handling to execbuf pinning

2020-10-02 Thread Maarten Lankhorst
i915_vma_pin may fail with -EDEADLK when we start locking page tables, so ensure we handle this correctly. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 23 +++ 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/i

[Intel-gfx] [PATCH 33/61] drm/i915: Add ww locking around vm_access()

2020-10-02 Thread Maarten Lankhorst
i915_gem_object_pin_map potentially needs a ww context, so ensure we have one we can revoke. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 24 ++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_g

[Intel-gfx] [PATCH 46/61] drm/i915/selftests: Prepare mman testcases for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Ensure we hold the lock around put_pages, and use the unlocked wrappers for pinning pages and mappings. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/selftests/i915_gem_mman.c | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/

[Intel-gfx] [PATCH 30/61] drm/i915: Fix workarounds selftest, part 1

2020-10-02 Thread Maarten Lankhorst
pin_map needs the ww lock, so ensure we pin both before submission. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_object.h| 3 + drivers/gpu/drm/i915/gem/i915_gem_pages.c | 12 +++ .../gpu/drm/i915/gt/selftest_workarounds.c| 76 --- 3 files c

[Intel-gfx] [PATCH 58/61] drm/i915/selftests: Prepare cs engine tests for obj->mm.lock removal

2020-10-02 Thread Maarten Lankhorst
Same as other tests, use pin_map_unlocked. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/selftest_engine_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/selftest_engine_cs.c b/drivers/gpu/drm/i915/gt/selftest_engine_cs.c index

[Intel-gfx] [PATCH 37/61] drm/i915: Add missing ww lock in intel_dsb_prepare.

2020-10-02 Thread Maarten Lankhorst
Because of the long lifetime of the mapping, we cannot wrap this in a simple limited ww lock. Just use the unlocked version of pin_map, because we'll likely release the mapping a lot later, in a different thread. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_dsb.c | 2 +

[Intel-gfx] [PATCH 10/61] drm/i915: Disable userptr pread/pwrite support.

2020-10-02 Thread Maarten Lankhorst
Userptr should not need the kernel for a userspace memcpy, userspace needs to call memcpy directly. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_object_types.h | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_userptr.c | 20 +++ drivers/gpu/drm/i915/i915_gem.c

[Intel-gfx] [PATCH 40/61] drm/i915/selftests: Prepare huge_pages testcases for obj->mm.lock removal.

2020-10-02 Thread Maarten Lankhorst
Straightforward conversion, just convert a bunch of calls to unlocked versions. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/selftests/huge_pages.c | 28 ++- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/selftests/huge_page

[Intel-gfx] [PATCH 36/61] drm/i915: Add ww locking to dma-buf ops.

2020-10-02 Thread Maarten Lankhorst
vmap is using pin_pages, but needs to use ww locking, add pin_pages_unlocked to correctly lock the mapping. Also add ww locking to begin/end cpu access. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 60 -- 1 file changed, 33 insertions(+),

[Intel-gfx] [PATCH 06/61] drm/i915: Move HAS_STRUCT_PAGE to obj->flags

2020-10-02 Thread Maarten Lankhorst
We want to remove the changing of ops structure for attaching phys pages, so we need to kill off HAS_STRUCT_PAGE from ops->flags, and put it in the bo. This will remove a potential race of dereferencing the wrong obj->ops without ww mutex held. Signed-off-by: Maarten Lankhorst --- drivers/gpu/d

[Intel-gfx] [PATCH 34/61] drm/i915: Increase ww locking for perf.

2020-10-02 Thread Maarten Lankhorst
We need to lock a few more objects, some temporarily, add ww lock where needed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_perf.c | 56 1 file changed, 43 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_perf.c b/drivers/

  1   2   >