[Intel-gfx] [PATCH 0/3] mmu_notifier fs fs_reclaim lockdep annotations

2020-11-20 Thread Daniel Vetter
Hi all, I've finally gotten around to polish of my lockdep anntotation patches from a while ago: https://lore.kernel.org/dri-devel/20200610194101.1668038-1-daniel.vet...@ffwll.ch/ That patch has been in -mm for a few days already, but it immediately hit some issues with xfs. Changes since v2: -

[Intel-gfx] [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Daniel Vetter
Extracted from slab.h, which seems to have the most complete version including the correct might_sleep() check. Roll it out to slob.c. Motivated by a discussion with Paul about possibly changing call_rcu behaviour to allocate memory, but only roughly every 500th call. There are a lot fewer places

[Intel-gfx] [PATCH 1/3] mm: Track mmu notifiers in fs_reclaim_acquire/release

2020-11-20 Thread Daniel Vetter
fs_reclaim_acquire/release nicely catch recursion issues when allocating GFP_KERNEL memory against shrinkers (which gpu drivers tend to use to keep the excessive caches in check). For mmu notifier recursions we do have lockdep annotations since 23b68395c7c7 ("mm/mmu_notifiers: add a lockdep map for

[Intel-gfx] [PATCH 3/3] locking/selftests: Add testcases for fs_reclaim

2020-11-20 Thread Daniel Vetter
Since I butchered this I figured better to make sure we have testcases for this now. Since we only have a locking context for __GFP_FS that's the only thing we're testing right now. Cc: linux-fsde...@vger.kernel.org Cc: Dave Chinner Cc: Qian Cai Cc: linux-...@vger.kernel.org Cc: Thomas Hellström

[Intel-gfx] [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Daniel Vetter
Random observation while trying to review Christian's patch series to stop looking at struct page for dma-buf imports. This was originally added in commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 2014 +0100 drm/ttm: Correctly set page mapp

[Intel-gfx] [PATCH 1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg

2020-11-20 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Guc->mmio_msg is set under the guc->irq_lock in guc_get_mmio_msg so it should be consumed under the same lock from guc_handle_mmio_msg. I am not sure if the overall flow here makes complete sense but at least the correct lock is now used. Signed-off-by: Tvrtko Ursulin Cc:

[Intel-gfx] [PATCH 2/2] drm/i915/guc: Use correct lock for CT event handler

2020-11-20 Thread Tvrtko Ursulin
From: Tvrtko Ursulin CT event handler is called under the gt->irq_lock from the interrupt handling paths so make it the same from the init path. I don't think this mismatch caused any functional issue but we need to wean the code of the global i915->irq_lock. Signed-off-by: Tvrtko Ursulin Cc: D

Re: [Intel-gfx] [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Christian König
Am 20.11.20 um 10:54 schrieb Daniel Vetter: Random observation while trying to review Christian's patch series to stop looking at struct page for dma-buf imports. This was originally added in commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 20

Re: [Intel-gfx] [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 11:04 AM Christian König wrote: > > Am 20.11.20 um 10:54 schrieb Daniel Vetter: > > Random observation while trying to review Christian's patch series to > > stop looking at struct page for dma-buf imports. > > > > This was originally added in > > > > commit 58aa6622d32af7d

Re: [Intel-gfx] [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Christian König
Am 20.11.20 um 11:05 schrieb Daniel Vetter: On Fri, Nov 20, 2020 at 11:04 AM Christian König wrote: Am 20.11.20 um 10:54 schrieb Daniel Vetter: Random observation while trying to review Christian's patch series to stop looking at struct page for dma-buf imports. This was originally added in

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/ttm: don't set page->mapping

2020-11-20 Thread Patchwork
== Series Details == Series: drm/ttm: don't set page->mapping URL : https://patchwork.freedesktop.org/series/84098/ State : warning == Summary == $ dim checkpatch origin/drm-tip cd6a3ea2fee2 mm: Track mmu notifiers in fs_reclaim_acquire/release -:12: ERROR:GIT_COMMIT_ID: Please use git commit

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/ttm: don't set page->mapping

2020-11-20 Thread Patchwork
== Series Details == Series: drm/ttm: don't set page->mapping URL : https://patchwork.freedesktop.org/series/84098/ 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/amd/amdgpu/.

Re: [Intel-gfx] [PATCH v4 0/7] Convert the intel iommu driver to the dma-iommu api

2020-11-20 Thread Lu Baolu
On 2020/11/3 18:54, Joerg Roedel wrote: Hi, On Tue, Nov 03, 2020 at 11:58:26AM +0200, Joonas Lahtinen wrote: Would that work for you? We intend to send the feature pull requests to DRM for 5.11 in the upcoming weeks. For the IOMMU side it is best to include the workaround for now. When the DR

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/ttm: don't set page->mapping

2020-11-20 Thread Patchwork
== Series Details == Series: drm/ttm: don't set page->mapping URL : https://patchwork.freedesktop.org/series/84098/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9367 -> Patchwork_18949 Summary --- **FAILURE** Ser

Re: [Intel-gfx] [PATCH] drm/i915/gt: Plug IPS into intel_rps_set

2020-11-20 Thread Mika Kuoppala
Chris Wilson writes: > The old IPS interface did not match the RPS interface that we tried to > plug it into (bool vs int return). Once repaired, our minimal > selftesting is finally happy! > > Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala > --- > drivers/gpu/drm/i915/gt/intel_rps.c

Re: [Intel-gfx] [PATCH 3/3] locking/selftests: Add testcases for fs_reclaim

2020-11-20 Thread Peter Zijlstra
On Fri, Nov 20, 2020 at 10:54:44AM +0100, Daniel Vetter wrote: > Since I butchered this I figured better to make sure we have testcases > for this now. Since we only have a locking context for __GFP_FS that's > the only thing we're testing right now. > > Cc: linux-fsde...@vger.kernel.org > Cc: Dav

[Intel-gfx] [CI 3/3] drm/i915/selftests: Small tweak to put the termination conditions together

2020-11-20 Thread Chris Wilson
If we run out of ring space, or exceed the desired runtime, we wish to stop the subtest. Put these checks together, so that we always keep the requests flushed on completion. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/selftest_timeline.c | 12 +---

[Intel-gfx] [CI 1/3] drm/i915/gem: Remove incorrect early dbg print

2020-11-20 Thread Chris Wilson
We print out the "logical" context support before we discover whether or not the engines have logical contexts. No one seems to have noticed the error, so the debug message must not be useful to anyone. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gem/i915_gem

[Intel-gfx] [CI 2/3] drm/i915/selftests: Improve granularity for mocs reset checks

2020-11-20 Thread Chris Wilson
Allow us to validate mocs configurations after reset if we have either engine or global reset. Signed-off-by: Chris Wilson Reviewed-by: Mika Kuoppala --- drivers/gpu/drm/i915/gt/selftest_mocs.c | 40 + 1 file changed, 21 insertions(+), 19 deletions(-) diff --git a/drive

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg

2020-11-20 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg URL : https://patchwork.freedesktop.org/series/84100/ State : success == Summary == CI Bug Log - changes from CI_DRM_9370 -> Patchwork_18950 =

Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg

2020-11-20 Thread Chris Wilson
Quoting Tvrtko Ursulin (2020-11-20 09:56:35) > From: Tvrtko Ursulin > > Guc->mmio_msg is set under the guc->irq_lock in guc_get_mmio_msg so it > should be consumed under the same lock from guc_handle_mmio_msg. > > I am not sure if the overall flow here makes complete sense but at least > the cor

Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Use correct lock for CT event handler

2020-11-20 Thread Chris Wilson
Quoting Tvrtko Ursulin (2020-11-20 09:56:36) > From: Tvrtko Ursulin > > CT event handler is called under the gt->irq_lock from the interrupt > handling paths so make it the same from the init path. I don't think this > mismatch caused any functional issue but we need to wean the code of the > glo

Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Use correct lock for CT event handler

2020-11-20 Thread Tvrtko Ursulin
On 20/11/2020 14:32, Chris Wilson wrote: Quoting Tvrtko Ursulin (2020-11-20 09:56:36) From: Tvrtko Ursulin CT event handler is called under the gt->irq_lock from the interrupt handling paths so make it the same from the init path. I don't think this mismatch caused any functional issue but w

Re: [Intel-gfx] [PATCH 1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg

2020-11-20 Thread Tvrtko Ursulin
On 20/11/2020 14:26, Chris Wilson wrote: > Quoting Tvrtko Ursulin (2020-11-20 09:56:35) >> From: Tvrtko Ursulin >> >> Guc->mmio_msg is set under the guc->irq_lock in guc_get_mmio_msg so it >> should be consumed under the same lock from guc_handle_mmio_msg. >> >> I am not sure if the overall flow

Re: [Intel-gfx] [CI 1/3] drm/i915/gem: Remove incorrect early dbg print

2020-11-20 Thread Tvrtko Ursulin
On 20/11/2020 14:03, Chris Wilson wrote: We print out the "logical" context support before we discover whether or not the engines have logical contexts. No one seems to have noticed the error, so the debug message must not be useful to anyone. I have, many months ago! :) Regards, Tvrtko S

Re: [Intel-gfx] [CI 1/3] drm/i915/gem: Remove incorrect early dbg print

2020-11-20 Thread Chris Wilson
Quoting Tvrtko Ursulin (2020-11-20 14:49:16) > > On 20/11/2020 14:03, Chris Wilson wrote: > > We print out the "logical" context support before we discover whether or > > not the engines have logical contexts. No one seems to have noticed the > > error, so the debug message must not be useful to a

Re: [Intel-gfx] [PATCH] drm/ttm: don't set page->mapping

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 11:08:31AM +0100, Christian König wrote: > Am 20.11.20 um 11:05 schrieb Daniel Vetter: > > On Fri, Nov 20, 2020 at 11:04 AM Christian König > > wrote: > > > Am 20.11.20 um 10:54 schrieb Daniel Vetter: > > > > Random observation while trying to review Christian's patch serie

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/3] drm/i915/gem: Remove incorrect early dbg print

2020-11-20 Thread Patchwork
== Series Details == Series: series starting with [CI,1/3] drm/i915/gem: Remove incorrect early dbg print URL : https://patchwork.freedesktop.org/series/84110/ State : success == Summary == CI Bug Log - changes from CI_DRM_9371 -> Patchwork_18951 ==

[Intel-gfx] [PATCH] drm/i915: Properly flag modesets for all bigjoiner pipes

2020-11-20 Thread Ville Syrjala
From: Ville Syrjälä If either of the bigjoiner pipes needs a modeset then we need a modeset on both pipes. Make it so. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_display.c | 40 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/driver

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg

2020-11-20 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915/guc: Use correct lock for accessing guc->mmio_msg URL : https://patchwork.freedesktop.org/series/84100/ State : success == Summary == CI Bug Log - changes from CI_DRM_9370_full -> Patchwork_18950_full ===

Re: [Intel-gfx] [PATCH 2/2] drm/i915/guc: Use correct lock for CT event handler

2020-11-20 Thread Daniele Ceraolo Spurio
On 11/20/2020 6:43 AM, Tvrtko Ursulin wrote: On 20/11/2020 14:32, Chris Wilson wrote: Quoting Tvrtko Ursulin (2020-11-20 09:56:36) From: Tvrtko Ursulin CT event handler is called under the gt->irq_lock from the interrupt handling paths so make it the same from the init path. I don't think

Re: [Intel-gfx] [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Randy Dunlap
Hi, On 11/20/20 1:54 AM, Daniel Vetter wrote: > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > index d5ece7a9a403..f94405d43fd1 100644 > --- a/include/linux/sched/mm.h > +++ b/include/linux/sched/mm.h > @@ -180,6 +180,22 @@ static inline void fs_reclaim_acquire(gfp_t gfp_mask)

Re: [Intel-gfx] [PATCH 2/3] mm: Extract might_alloc() debug check

2020-11-20 Thread Daniel Vetter
On Fri, Nov 20, 2020 at 6:20 PM Randy Dunlap wrote: > > Hi, > > On 11/20/20 1:54 AM, Daniel Vetter wrote: > > diff --git a/include/linux/sched/mm.h b/include/linux/sched/mm.h > > index d5ece7a9a403..f94405d43fd1 100644 > > --- a/include/linux/sched/mm.h > > +++ b/include/linux/sched/mm.h > > @@ -1

Re: [Intel-gfx] [PATCH 1/6] relay: allow the use of const callback structs

2020-11-20 Thread Christoph Hellwig
On Thu, Nov 19, 2020 at 08:11:20AM +, Christoph Hellwig wrote: > Please also add a patch to mark all rchan_callbacks instances const > while you're at it. Oops, I just noticed you actually sent that one. ___ Intel-gfx mailing list Intel-gfx@lists.fre

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Properly flag modesets for all bigjoiner pipes

2020-11-20 Thread Patchwork
== Series Details == Series: drm/i915: Properly flag modesets for all bigjoiner pipes URL : https://patchwork.freedesktop.org/series/84118/ State : warning == Summary == $ dim checkpatch origin/drm-tip 2bed74690121 drm/i915: Properly flag modesets for all bigjoiner pipes -:90: WARNING:LONG_LIN

Re: [Intel-gfx] [PATCH 4/6] ath11k: make relay callbacks const

2020-11-20 Thread Kalle Valo
Jani Nikula writes: > On Wed, 18 Nov 2020, Jani Nikula wrote: >> Now that relay_open() accepts const callbacks, make relay callbacks >> const. >> >> Cc: Kalle Valo >> Cc: ath...@lists.infradead.org >> Signed-off-by: Jani Nikula > > Kalle, thanks for the acks on the other two ath patches - can

Re: [Intel-gfx] [PATCH 1/6] relay: allow the use of const callback structs

2020-11-20 Thread Christoph Hellwig
> +/* > + * rchan_callback wrappers. Call the callbacks if available, otherwise fall > back > + * to default behaviour. > + */ This adds an overly long line. That being said this behavior is pretty normal for kernel APIs, so I'm not even sure we need it at all. > + > +/* > + * subbuf_start() ca

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Properly flag modesets for all bigjoiner pipes

2020-11-20 Thread Patchwork
== Series Details == Series: drm/i915: Properly flag modesets for all bigjoiner pipes URL : https://patchwork.freedesktop.org/series/84118/ State : success == Summary == CI Bug Log - changes from CI_DRM_9373 -> Patchwork_18952 Summary -

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [CI,1/3] drm/i915/gem: Remove incorrect early dbg print

2020-11-20 Thread Patchwork
== Series Details == Series: series starting with [CI,1/3] drm/i915/gem: Remove incorrect early dbg print URL : https://patchwork.freedesktop.org/series/84110/ State : success == Summary == CI Bug Log - changes from CI_DRM_9371_full -> Patchwork_18951_full

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Joe Perches
On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: > Hi all, > > This series aims to fix almost all remaining fall-through warnings in > order to enable -Wimplicit-fallthrough for Clang. > > In preparation to enable -Wimplicit-fallthrough for Clang, explicitly > add multiple break/goto

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
Hi, On 11/20/20 12:53, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to enable -Wimplicit-fallthrough for Cla

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > This series aims to fix almost all remaining fall-through warnings in > > order to enable -Wimplicit-fallthrough for Clang. > > > > In preparation to enable -Wimplici

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Gustavo A. R. Silva
On 11/20/20 12:28, Joe Perches wrote: > On Fri, 2020-11-20 at 12:21 -0600, Gustavo A. R. Silva wrote: >> Hi all, >> >> This series aims to fix almost all remaining fall-through warnings in >> order to enable -Wimplicit-fallthrough for Clang. >> >> In preparation to enable -Wimplicit-fallthrough

[Intel-gfx] [PATCH] drm/i915/display: Warn about types of backlight not handled

2020-11-20 Thread José Roberto de Souza
Right now we are only explicitly handling the backlight of types INTEL_BACKLIGHT_VESA_EDP_AUX_INTERFACE, INTEL_BACKLIGHT_DSI_DCS and INTEL_BACKLIGHT_DISPLAY_DDI all others are being handled as INTEL_BACKLIGHT_DISPLAY_DDI(south display engine PWM) but that might not be the intended HW usage, so lets

Re: [Intel-gfx] [PATCH 16/21] drm/i915/adl_s: MCHBAR memory info registers are moved

2020-11-20 Thread Lucas De Marchi
On Tue, Nov 17, 2020 at 10:50:24AM -0800, Aditya Swarup wrote: From: Caz Yokoyama The crwebview indicates on ADL-S that some of our MCHBAR registers have moved from their traditional 0x50XX offsets to new locations. The meaning and bit layout of the registers remain same. Cc: Lucas De Marchi

Re: [Intel-gfx] [PATCH 16/21] drm/i915/adl_s: MCHBAR memory info registers are moved

2020-11-20 Thread Caz Yokoyama
On Fri, 2020-11-20 at 12:18 -0800, Lucas De Marchi wrote: > On Tue, Nov 17, 2020 at 10:50:24AM -0800, Aditya Swarup wrote: > > From: Caz Yokoyama > > > > The crwebview indicates on ADL-S that some of our MCHBAR > > registers have moved from their traditional 0x50XX offsets to > > new locations. T

Re: [Intel-gfx] [PATCH 000/141] Fix fall-through warnings for Clang

2020-11-20 Thread Kees Cook
On Fri, Nov 20, 2020 at 11:51:42AM -0800, Jakub Kicinski wrote: > On Fri, 20 Nov 2020 11:30:40 -0800 Kees Cook wrote: > > On Fri, Nov 20, 2020 at 10:53:44AM -0800, Jakub Kicinski wrote: > > > On Fri, 20 Nov 2020 12:21:39 -0600 Gustavo A. R. Silva wrote: > > > > This series aims to fix almost all

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/display: Warn about types of backlight not handled

2020-11-20 Thread Patchwork
== Series Details == Series: drm/i915/display: Warn about types of backlight not handled URL : https://patchwork.freedesktop.org/series/84125/ State : success == Summary == CI Bug Log - changes from CI_DRM_9373 -> Patchwork_18953 Summary --

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: Properly flag modesets for all bigjoiner pipes

2020-11-20 Thread Patchwork
== Series Details == Series: drm/i915: Properly flag modesets for all bigjoiner pipes URL : https://patchwork.freedesktop.org/series/84118/ State : success == Summary == CI Bug Log - changes from CI_DRM_9373_full -> Patchwork_18952_full Sum

Re: [Intel-gfx] [PATCH] drm/i915: Properly flag modesets for all bigjoiner pipes

2020-11-20 Thread Navare, Manasi
On Fri, Nov 20, 2020 at 06:01:35PM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > If either of the bigjoiner pipes needs a modeset then we need > a modeset on both pipes. Make it so. > > Signed-off-by: Ville Syrjälä > --- > drivers/gpu/drm/i915/display/intel_display.c | 40 -

[Intel-gfx] [RFC-v2 00/26] Introduce Intel PXP component

2020-11-20 Thread Huang, Sean Z
PXP is an i915 componment, that helps user space to establish the hardware protected session and manage the status of each alive software session, as well as the life cycle of each session. This ioctl is to allow user space driver to create, set, and destroy each session. It also provides the comm

[Intel-gfx] [RFC-v2 01/26] drm/i915/pxp: Introduce Intel PXP component

2020-11-20 Thread Huang, Sean Z
PXP (Protected Xe Path) is an i915 componment, that helps user space to establish the hardware protected session and manage the status of each alive software session, as well as the life cycle of each session. By design PXP will expose ioctl so allow user space to create, set, and destroy each ses

[Intel-gfx] [RFC-v2 05/26] drm/i915/pxp: Implement ioctl action to set the user space context

2020-11-20 Thread Huang, Sean Z
Implement one ioctl action to allow user space driver to set its user space context, so PXP can track the context id through this user space context list. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 56 drivers/gpu/drm/i915/pxp/intel_pxp.h

[Intel-gfx] [RFC-v2 09/26] drm/i915/pxp: Implement ioctl action to reserve session slot

2020-11-20 Thread Huang, Sean Z
With this ioctl action, user space driver can reserve a specific session slot/id assigned by PXP, as the first step of PXP session establishment flow. The session info is stored in the session list structure. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 20 dr

[Intel-gfx] [RFC-v2 17/26] drm/i915/pxp: Implement funcs to create the TEE channel

2020-11-20 Thread Huang, Sean Z
Currently ring3 driver sends the TEE commands directly to TEE, but later, as our design, we would like to make ring3 sending the TEE commands via the ring0 PXP ioctl action instead of TEE ioctl, so we can centralize those protection operations at ring0 PXP. Signed-off-by: Huang, Sean Z --- drive

[Intel-gfx] [RFC-v2 13/26] drm/i915/pxp: Enable ioctl action to query PXP tag

2020-11-20 Thread Huang, Sean Z
Enable the PXP ioctl action to allow user space driver to query the PXP tag, which is a 32-bit bitwise value indicating the current session info, including protection type, session id, and whether the session is enabled. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c|

[Intel-gfx] [RFC-v2 26/26] drm/i915/pxp: Enable the PXP ioctl for protected session

2020-11-20 Thread Huang, Sean Z
In the previous commits, we have implemented the PXP ioctl functions. Now we enable those handlers and expose them as PXP ioctl, so allow the user space driver can establish, set, or destory the protected session via this ioctl. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [RFC-v2 03/26] drm/i915/pxp: Add PXP context for logical hardware states.

2020-11-20 Thread Huang, Sean Z
Add PXP context which represents combined view of driver and logical HW states. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile| 3 +- drivers/gpu/drm/i915/pxp/intel_pxp.c | 26 ++- drivers/gpu/drm/i915/pxp/intel_pxp.h | 3 ++ drivers/gpu/

[Intel-gfx] [RFC-v2 02/26] drm/i915/pxp: Enable PXP irq worker and callback stub

2020-11-20 Thread Huang, Sean Z
Create the irq worker that serves as callback handler, those callback stubs should be called while the hardware key teardown occurs. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/gt/intel_gt_irq.c | 4 ++ drivers/gpu/drm/i915/i915_reg.h| 1 + drivers/gpu/drm/i915/pxp/intel_pxp.

[Intel-gfx] [RFC-v2 15/26] drm/i915/pxp: Termiante the session upon app crash

2020-11-20 Thread Huang, Sean Z
PXP should terminate the hardware session and cleanup the software state gracefully when the application has established the protection session, but doesn't close the session correctly due to some cases like application crash. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [RFC-v2 19/26] drm/i915/pxp: Create the arbitrary session after boot

2020-11-20 Thread Huang, Sean Z
Create the arbitrary session, with the fixed session id 0xf, after system boot, for the case that application allocates the protected buffer without establishing any protection session. Because the hardware requires at least one alive session for protected buffer creation. This arbitrary session n

[Intel-gfx] [RFC-v2 24/26] drm/i915/pxp: User interface for Protected buffer

2020-11-20 Thread Huang, Sean Z
From: Bommu Krishnaiah This api allow user mode to create Protected buffer and context creation. Signed-off-by: Bommu Krishnaiah Cc: Telukuntla Sreedhar Cc: Kondapally Kalyan Cc: Gupta Anshuman Cc: Huang Sean Z --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 15 ++-- drivers/gp

[Intel-gfx] [RFC-v2 20/26] drm/i915/pxp: Add i915 trace logs for PXP operations

2020-11-20 Thread Huang, Sean Z
Add several i915 trace logs for PXP calls for debugging or performance measurement, including: (1) PXP ioctl (2) PXP teardown callbacks To trun on this feature, we need to set "CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS=y" in .config for compiling the Linux kernel. Signed-off-by: Huang, Sean Z --- d

[Intel-gfx] [RFC-v2 11/26] drm/i915/pxp: Func to send hardware session termination

2020-11-20 Thread Huang, Sean Z
Implement the functions to allow PXP to send a GPU command, in order to terminate the hardware session, so hardware can recycle this session slot for the next usage. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 288 drivers/gpu/drm/i915/pxp/

[Intel-gfx] [RFC-v2 06/26] drm/i915/pxp: Add PXP-related registers into allowlist

2020-11-20 Thread Huang, Sean Z
Add several PXP-related reg into allowlist to allow user space driver to read the those register values. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/i915_reg.h | 6 drivers/gpu/drm/i915/intel_uncore.c | 50 - 2 files changed, 41 insertions(+), 15 d

[Intel-gfx] [RFC-v2 04/26] drm/i915/pxp: set KCR reg init during the boot time

2020-11-20 Thread Huang, Sean Z
Set the KCR init during the boot time, which is required by hardware, to allow us doing further protection operation such as sending commands to GPU or TEE Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/pxp/intel_pxp.c| 11 ++- drive

[Intel-gfx] [RFC-v2 25/26] drm/i915/pxp: Add plane decryption support

2020-11-20 Thread Huang, Sean Z
From: Anshuman Gupta Add support to enable/disable PLANE_SURF Decryption Request bit. It requires only to enable plane decryption support when following condition met. 1. PAVP session is enabled. 2. Buffer object is protected. v2: - Rebased to libva_cp-drm-tip_tgl_cp tree. - Used gen fb obj user

[Intel-gfx] [RFC-v2 14/26] drm/i915/pxp: Destroy all type0 sessions upon teardown

2020-11-20 Thread Huang, Sean Z
Teardown is triggered when the display topology changes and no long meets the secure playback requirement, and hardware trashes all the encryption keys for display. So as a result, PXP should handle such case and terminate all the type0 sessions. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/

[Intel-gfx] [RFC-v2 18/26] drm/i915/pxp: Implement ioctl action to send TEE commands

2020-11-20 Thread Huang, Sean Z
Implement the ioctl action to allow user space driver sends TEE commands via PXP ioctl, instead of TEE iotcl. So we can centralize those protection operations at PXP. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 14 ++ drivers/gpu/drm/i915/pxp/intel_pxp.h |

[Intel-gfx] [RFC-v2 21/26] drm/i915/pxp: Expose session state for display protection flip

2020-11-20 Thread Huang, Sean Z
Implement the intel_pxp_gem_object_status() to allow i915 display querying the current PXP session state. In the design, display should not perform protection flip on the protected buffers if there is no PXP session alive. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c | 8

[Intel-gfx] [RFC-v2 16/26] drm/i915/pxp: Enable PXP power management

2020-11-20 Thread Huang, Sean Z
During the power event S3+ sleep/resume, hardware will lose all the encryption keys for every hardware session, even though the software session state was marked as alive after resume. So to handle such case, PXP should terminate all the hardware sessions and cleanup all the software states after t

[Intel-gfx] [RFC-v2 22/26] mei: pxp: export pavp client to me client bus

2020-11-20 Thread Huang, Sean Z
From: Vitaly Lubart Export PAVP client to work with i915_cp driver, for binding it uses kernel component framework. Signed-off-by: Vitaly Lubart Signed-off-by: Tomas Winkler --- drivers/misc/mei/Kconfig | 2 + drivers/misc/mei/Makefile | 1 + drivers/misc/mei/pxp/Kconfig | 1

[Intel-gfx] [RFC-v2 07/26] drm/i915/pxp: Read register to check hardware session state

2020-11-20 Thread Huang, Sean Z
Implement the functions to check the hardware protected session state via reading the hardware register session in play. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.h| 3 + drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 177 drivers/gpu/drm/i915/

[Intel-gfx] [RFC-v2 10/26] drm/i915/pxp: Implement ioctl action to set session in play

2020-11-20 Thread Huang, Sean Z
With this ioctl action, user space driver can set the session in state "session in play", after dirver reserved the session slot/id from driver, and sent the TEE commands to activate the corresponding hardware session. Session state "session in play" means this session is ready for secure playback.

[Intel-gfx] [RFC-v2 08/26] drm/i915/pxp: Implement funcs to get/set PXP tag

2020-11-20 Thread Huang, Sean Z
Implement the functions to get/set the PXP tag, which is 32-bit bitwise value containing the hardware session info, such as its session id, protection mode or whether it's enabled. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp_sm.c | 95 + drivers/gp

[Intel-gfx] [RFC-v2 23/26] drm/i915/uapi: introduce drm_i915_gem_create_ext

2020-11-20 Thread Huang, Sean Z
From: Bommu Krishnaiah Same old gem_create but with now with extensions support. This is needed to support various upcoming usecases. For now we use the extensions mechanism to support PAVP. Signed-off-by: Bommu Krishnaiah Signed-off-by: Matthew Auld Cc: Joonas Lahtinen joonas.lahti...@linux.i

[Intel-gfx] [RFC-v2 12/26] drm/i915/pxp: Implement ioctl action to terminate the session

2020-11-20 Thread Huang, Sean Z
Implement the PXP ioctl action to allow user space driver to terminate the hardware session and cleanup its software session state. PXP sends the session termination command to GPU once receves this ioctl action. Signed-off-by: Huang, Sean Z --- drivers/gpu/drm/i915/pxp/intel_pxp.c| 7 + d

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915/display: Warn about types of backlight not handled

2020-11-20 Thread Patchwork
== Series Details == Series: drm/i915/display: Warn about types of backlight not handled URL : https://patchwork.freedesktop.org/series/84125/ State : success == Summary == CI Bug Log - changes from CI_DRM_9373_full -> Patchwork_18953_full

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Introduce Intel PXP component

2020-11-20 Thread Patchwork
== Series Details == Series: Introduce Intel PXP component URL : https://patchwork.freedesktop.org/series/84136/ State : warning == Summary == $ dim checkpatch origin/drm-tip 66b76da7fe5d drm/i915/pxp: Introduce Intel PXP component -:78: WARNING:FILE_PATH_CHANGES: added, moved or deleted file(

[Intel-gfx] ✗ Fi.CI.BAT: failure for Introduce Intel PXP component

2020-11-20 Thread Patchwork
== Series Details == Series: Introduce Intel PXP component URL : https://patchwork.freedesktop.org/series/84136/ State : failure == Summary == CI Bug Log - changes from CI_DRM_9373 -> Patchwork_18954 Summary --- **FAILURE** Seriou