[Intel-gfx] ✗ Fi.CI.IGT: failure for drm/i915/dpt: Use shmem for dpt objects (rev2)

2023-07-18 Thread Patchwork
== Series Details == Series: drm/i915/dpt: Use shmem for dpt objects (rev2) URL : https://patchwork.freedesktop.org/series/120885/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13394_full -> Patchwork_120885v2_full Summary

[Intel-gfx] ✗ Fi.CI.IGT: failure for Reduce MTL-specific platform checks

2023-07-18 Thread Patchwork
== Series Details == Series: Reduce MTL-specific platform checks URL : https://patchwork.freedesktop.org/series/120943/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13394_full -> Patchwork_120943v1_full Summary ---

[Intel-gfx] ✓ Fi.CI.IGT: success for Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-18 Thread Patchwork
== Series Details == Series: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout() URL : https://patchwork.freedesktop.org/series/120940/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394_full -> Patchwork_120940v1_full

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/dpt: Use shmem for dpt objects (rev2)

2023-07-18 Thread Patchwork
== Series Details == Series: drm/i915/dpt: Use shmem for dpt objects (rev2) URL : https://patchwork.freedesktop.org/series/120885/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120885v2 Summary ---

Re: [Intel-gfx] [PATCH 11/11] drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS

2023-07-18 Thread Dixit, Ashutosh
On Tue, 18 Jul 2023 12:49:47 -0700, Matt Roper wrote: > Hi Matt, > On Thu, Mar 23, 2023 at 03:59:01PM -0700, Umesh Nerlige Ramappa wrote: > > OAM does not work with media C6 enabled on some steppings of MTL. > > I just stumbled across this while looking at something else, but > 14017512683 isn't

[Intel-gfx] ✓ Fi.CI.BAT: success for Reduce MTL-specific platform checks

2023-07-18 Thread Patchwork
== Series Details == Series: Reduce MTL-specific platform checks URL : https://patchwork.freedesktop.org/series/120943/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120943v1 Summary ---

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for Reduce MTL-specific platform checks

2023-07-18 Thread Patchwork
== Series Details == Series: Reduce MTL-specific platform checks URL : https://patchwork.freedesktop.org/series/120943/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Reduce MTL-specific platform checks

2023-07-18 Thread Patchwork
== Series Details == Series: Reduce MTL-specific platform checks URL : https://patchwork.freedesktop.org/series/120943/ State : warning == Summary == Error: dim checkpatch failed c3afd0a4c654 drm/i915: Consolidate condition for Wa_22011802037 448c3a48c6f6 drm/i915/xelpg: Call Xe_LPG

[Intel-gfx] ✓ Fi.CI.BAT: success for Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-18 Thread Patchwork
== Series Details == Series: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout() URL : https://patchwork.freedesktop.org/series/120940/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120940v1

[Intel-gfx] [PATCH v2] drm/i915/dpt: Use shmem for dpt objects

2023-07-18 Thread Radhakrishna Sripada
Dpt objects that are created from internal get evicted when there is memory pressure and do not get restored when pinned during scanout. The pinned page table entries look corrupted and programming the display engine with the incorrect pte's result in DE throwing pipe faults. Create DPT objects

[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume URL : https://patchwork.freedesktop.org/series/120931/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13394_full -> Patchwork_120931v1_full

[Intel-gfx] [PATCH 2/8] drm/i915/xelpg: Call Xe_LPG workaround functions based on IP version

2023-07-18 Thread Matt Roper
Although some of our Xe_LPG workarounds were already being applied based on IP version correctly, others were matching on MTL as a base platform, which is incorrect. Although MTL is the only platform right now that uses Xe_LPG IP, this may not always be the case. If a future platform re-uses

[Intel-gfx] [PATCH 5/8] drm/i915: Eliminate IS_MTL_DISPLAY_STEP

2023-07-18 Thread Matt Roper
Stepping-specific display behavior shouldn't be tied to MTL as a platform, but rather specifically to the Xe_LPM+ IP. Future non-MTL platforms may re-use this IP and will need to follow the exact same logic and apply the same workarounds. IS_MTL_DISPLAY_STEP() is dropped in favor of a new macro

[Intel-gfx] [PATCH 7/8] drm/i915/display: Eliminate IS_METEORLAKE checks

2023-07-18 Thread Matt Roper
Most of the IS_METEORLAKE checks in the display code shouldn't actually be tied to MTL as a platform, but rather to the Xe_LPD+ display IP (which is used in MTL, but may show up again in future platforms). In cases where we're trying to match that specific IP, use a version check against

[Intel-gfx] [PATCH 6/8] drm/i915/mtl: Eliminate subplatforms

2023-07-18 Thread Matt Roper
Now that we properly match the Xe_LPG IP versions associated with various workarounds, there's no longer any need to define separate MTL subplatform in the driver. Nothing in the code is conditional on MTL-M or MTL-P base platforms. Furthermore, I'm not sure the "M" and "P" designations are even

[Intel-gfx] [PATCH 8/8] drm/i915: Replace several IS_METEORLAKE with proper IP version checks

2023-07-18 Thread Matt Roper
Many of the IS_METEORLAKE conditions throughout the driver are supposed to be checks for Xe_LPG and/or Xe_LPM+ IP, not for the MTL platform specifically. Update those checks to ensure that the code will still operate properly if/when these IP versions show up on future platforms. Signed-off-by:

[Intel-gfx] [PATCH 1/8] drm/i915: Consolidate condition for Wa_22011802037

2023-07-18 Thread Matt Roper
The workaround bounds for Wa_22011802037 are somewhat complex and are replicated in several places throughout the code. Pull the condition out to a helper function to prevent mistakes if this condition needs to change again in the future. Signed-off-by: Matt Roper ---

[Intel-gfx] [PATCH 3/8] drm/i915: Eliminate IS_MTL_GRAPHICS_STEP

2023-07-18 Thread Matt Roper
Several workarounds are guarded by IS_MTL_GRAPHICS_STEP. However none of these workarounds are actually tied to MTL as a platform; they only relate to the Xe_LPG graphics IP, regardless of what platform it appears in. At the moment MTL is the only platform that uses Xe_LPG with IP versions 12.70

[Intel-gfx] [PATCH 4/8] drm/i915: Eliminate IS_MTL_MEDIA_STEP

2023-07-18 Thread Matt Roper
Stepping-specific media behavior shouldn't be tied to MTL as a platform, but rather specifically to the Xe_LPM+ IP. Future non-MTL platforms may re-use this IP and will need to follow the exact same logic and apply the same workarounds. IS_MTL_MEDIA_STEP() is dropped in favor of a new macro

[Intel-gfx] [PATCH 0/8] Reduce MTL-specific platform checks

2023-07-18 Thread Matt Roper
Starting with MTL, the hardware moved to a disaggregated IP design where graphics, media, and display are supposed to be treated independently of the base platform that they're incorporated into. For driver logic that is conditional on these IPs, the code should be checking the IP versions (as

Re: [Intel-gfx] [PATCH] drm/i915/dpt: Use shmem for dpt objects

2023-07-18 Thread Sripada, Radhakrishna
Hi Tvrtko, > -Original Message- > From: Tvrtko Ursulin > Sent: Tuesday, July 18, 2023 3:08 AM > To: Sripada, Radhakrishna ; intel- > g...@lists.freedesktop.org > Subject: Re: [Intel-gfx] [PATCH] drm/i915/dpt: Use shmem for dpt objects > > > On 18/07/2023 06:33, Radhakrishna Sripada

[Intel-gfx] [PATCH 1/2] drm/v3d: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-18 Thread Nathan Chancellor
A proposed update to clang's -Wconstant-logical-operand to warn when the left hand side is a constant shows the following instance in nsecs_to_jiffies_timeout() when NSEC_PER_SEC is not a multiple of HZ, such as CONFIG_HZ=300: In file included from drivers/gpu/drm/v3d/v3d_debugfs.c:12:

[Intel-gfx] [PATCH 2/2] drm/i915: Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-18 Thread Nathan Chancellor
A proposed update to clang's -Wconstant-logical-operand to warn when the left hand side is a constant shows the following instance in nsecs_to_jiffies_timeout() when NSEC_PER_SEC is not a multiple of HZ, such as CONFIG_HZ=300: drivers/gpu/drm/i915/gem/i915_gem_wait.c:189:24: warning: use of

[Intel-gfx] [PATCH 0/2] Avoid -Wconstant-logical-operand in nsecs_to_jiffies_timeout()

2023-07-18 Thread Nathan Chancellor
operand in nsecs_to_jiffies_timeout() drivers/gpu/drm/i915/gem/i915_gem_wait.c | 2 +- drivers/gpu/drm/v3d/v3d_drv.h| 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- base-commit: fdf0eaf11452d72945af31804e2a1048ee1b574c change-id: 20230718-nsecs_to_jiffies_timeout-constant-logical-operand-4a944690f3e9 Best regards, -- Nathan Chancellor

[Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3)

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3) URL : https://patchwork.freedesktop.org/series/120857/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13394_full -> Patchwork_120857v3_full

Re: [Intel-gfx] [v4 15/15] drm/i915/mtl: s/MTL/METEORLAKE for platform/subplatform defines

2023-07-18 Thread Matt Roper
On Tue, Jul 18, 2023 at 09:59:14AM +0100, Tvrtko Ursulin wrote: > > On 18/07/2023 09:11, Dnyaneshwar Bhadane wrote: > > Follow consistent naming convention. Replace MTL with > > METEORLAKE. Added defines that are replacing IS_MTL_GRAPHICS_STEP with > > IS_METEORLAKE_P_GRAPHICS_STEP and

Re: [Intel-gfx] [PATCH 11/11] drm/i915/perf: Wa_14017512683: Disable OAM if media C6 is enabled in BIOS

2023-07-18 Thread Matt Roper
On Thu, Mar 23, 2023 at 03:59:01PM -0700, Umesh Nerlige Ramappa wrote: > OAM does not work with media C6 enabled on some steppings of MTL. I just stumbled across this while looking at something else, but 14017512683 isn't a valid workaround number; that's just a per-platform identifier associated

Re: [Intel-gfx] [igt-dev] [PATCH i-g-t] tests/i915_pm_rps: Fix test after silent conflict harder

2023-07-18 Thread Rodrigo Vivi
On Tue, Jul 18, 2023 at 09:40:41AM +0100, Tvrtko Ursulin wrote: > From: Tvrtko Ursulin > > Feature test also needs adjusting after sysfs helper API changes... > > Signed-off-by: Tvrtko Ursulin > Fixes: d86ca7e17b58 ("tests/i915_pm_rps: Exercise sysfs thresholds") > Reference: 54dc25efaf10

Re: [Intel-gfx] [PATCH i-g-t] tests/i915_pm_rps: Fix test after silent conflict harder

2023-07-18 Thread Dixit, Ashutosh
On Tue, 18 Jul 2023 01:40:41 -0700, Tvrtko Ursulin wrote: > > From: Tvrtko Ursulin > > Feature test also needs adjusting after sysfs helper API changes... > > Signed-off-by: Tvrtko Ursulin > Fixes: d86ca7e17b58 ("tests/i915_pm_rps: Exercise sysfs thresholds") > Reference: 54dc25efaf10

Re: [Intel-gfx] [igt-dev] [PATCH v2 i-g-t] i915_pm_freq_api: Add some debug to tests

2023-07-18 Thread Dixit, Ashutosh
On Tue, 18 Jul 2023 11:00:36 -0700, Belgaumkar, Vinay wrote: > > > On 7/17/2023 9:26 PM, Dixit, Ashutosh wrote: > > On Mon, 17 Jul 2023 21:19:13 -0700, Belgaumkar, Vinay wrote: > >> > >> On 7/17/2023 6:50 PM, Dixit, Ashutosh wrote: > >>> On Mon, 17 Jul 2023 11:42:13 -0700, Vinay Belgaumkar wrote:

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume URL : https://patchwork.freedesktop.org/series/120931/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120931v1

Re: [Intel-gfx] [igt-dev] [PATCH v2 i-g-t] i915_pm_freq_api: Add some debug to tests

2023-07-18 Thread Belgaumkar, Vinay
On 7/17/2023 9:26 PM, Dixit, Ashutosh wrote: On Mon, 17 Jul 2023 21:19:13 -0700, Belgaumkar, Vinay wrote: On 7/17/2023 6:50 PM, Dixit, Ashutosh wrote: On Mon, 17 Jul 2023 11:42:13 -0700, Vinay Belgaumkar wrote: Some subtests seem to be failing in CI, use igt_assert_(lt/eq) which print the

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume URL : https://patchwork.freedesktop.org/series/120931/ State : warning == Summary == Error: dim checkpatch failed 0aa33f8c1790 drm/i915: Avoid endless HPD poll

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume URL : https://patchwork.freedesktop.org/series/120931/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit

[Intel-gfx] [PATCH 1/3] drm/i915: Avoid endless HPD poll detect loop via runtime suspend/resume

2023-07-18 Thread Imre Deak
The issue fixed in commit a8ddac7c9f06 ("drm/i915: Avoid HPD poll detect triggering a new detect cycle") on VLV, CHV is still present on platforms where the display hotplug detection functionality is available whenever the device is in D0 state (hence these platforms switch to HPD polling only

[Intel-gfx] [PATCH 3/3] drm/i915: Fix HPD polling, reenabling the output poll work as needed

2023-07-18 Thread Imre Deak
After the commit in the Fixes: line below, HPD polling stopped working on i915, since after that change calling drm_kms_helper_poll_enable() doesn't restart drm_mode_config::output_poll_work if the work was stopped (no connectors needing polling) and enabling polling for a connector (during

[Intel-gfx] [PATCH 2/3] drm: Add an HPD poll helper to reschedule the poll work

2023-07-18 Thread Imre Deak
Add a helper to reschedule drm_mode_config::output_poll_work after polling has been enabled for a connector (and needing a reschedule, since previously polling was disabled for all connectors and hence output_poll_work was not running). This is needed by the next patch fixing HPD polling on i915.

Re: [Intel-gfx] [PATCH 1/2] drm/i915/perf: Subtract gtt_offset from hw_tail

2023-07-18 Thread Dixit, Ashutosh
On Tue, 18 Jul 2023 01:39:35 -0700, Lionel Landwerlin wrote: > Hi Lionel, > On 18/07/2023 05:43, Ashutosh Dixit wrote: > > The code in oa_buffer_check_unlocked() is correct only if the OA buffer is > > 16 MB aligned (which seems to be the case today in i915). However when the > > 16 MB alignment

Re: [Intel-gfx] [PATCH v15 00/26] Add vfio_device cdev for iommufd support

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 06:55:25AM -0700, Yi Liu wrote: > Existing VFIO provides group-centric user APIs for userspace. Userspace > opens the /dev/vfio/$group_id first before getting device fd and hence > getting access to device. This is not the desired model for iommufd. Per > the conclusion of

Re: [Intel-gfx] [PATCH v15 22/26] vfio: Add VFIO_DEVICE_BIND_IOMMUFD

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 06:55:47AM -0700, Yi Liu wrote: > This adds ioctl for userspace to bind device cdev fd to iommufd. > > VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA > control provided by the iommufd. open_device >

Re: [Intel-gfx] [PATCH v15 20/26] iommufd: Add iommufd_ctx_from_fd()

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 06:55:45AM -0700, Yi Liu wrote: > It's common to get a reference to the iommufd context from a given file > descriptor. So adds an API for it. Existing users of this API are compiled > only when IOMMUFD is enabled, so no need to have a stub for the IOMMUFD > disabled case.

Re: [Intel-gfx] [PATCH v10 09/10] vfio/pci: Copy hot-reset device info to userspace in the devices loop

2023-07-18 Thread Jason Gunthorpe
On Tue, Jul 18, 2023 at 03:55:41AM -0700, Yi Liu wrote: > This copies the vfio_pci_dependent_device to userspace during looping each > affected device for reporting vfio_pci_hot_reset_info. This avoids counting > the affected devices and allocating a potential large buffer to store the >

[Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915: Refactor PAT/object cache handling

2023-07-18 Thread Patchwork
== Series Details == Series: drm/i915: Refactor PAT/object cache handling URL : https://patchwork.freedesktop.org/series/120924/ State : failure == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120924v1 Summary ---

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for drm/i915: Refactor PAT/object cache handling

2023-07-18 Thread Patchwork
== Series Details == Series: drm/i915: Refactor PAT/object cache handling URL : https://patchwork.freedesktop.org/series/120924/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked separately.

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Refactor PAT/object cache handling

2023-07-18 Thread Patchwork
== Series Details == Series: drm/i915: Refactor PAT/object cache handling URL : https://patchwork.freedesktop.org/series/120924/ State : warning == Summary == Error: dim checkpatch failed ad8a0b08444d drm/i915: Refactor PAT/object cache handling Traceback (most recent call last): File

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3)

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3) URL : https://patchwork.freedesktop.org/series/120857/ State : success == Summary == CI Bug Log - changes from CI_DRM_13394 -> Patchwork_120857v3

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Add vfio_device cdev for iommufd support (rev19)

2023-07-18 Thread Patchwork
== Series Details == Series: Add vfio_device cdev for iommufd support (rev19) URL : https://patchwork.freedesktop.org/series/113696/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/113696/revisions/19/mbox/ not applied Applying: vfio: Allocate per

Re: [Intel-gfx] [PATCH v4 2/6] drm/i915/gt: Ensure memory quiesced before invalidation

2023-07-18 Thread Matt Roper
On Tue, Jul 18, 2023 at 02:28:26AM +0200, Andi Shyti wrote: > Hi Matt, > > > > > > > + /* > > > > > > +* Aux invalidations on Aux CCS platforms require > > > > > > +* memory traffic is quiesced prior. > > > > > > +*/ > > > > > > + if ((mode & EMIT_INVALIDATE) &&

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Update AUX invalidation sequence (rev5)

2023-07-18 Thread Patchwork
== Series Details == Series: Update AUX invalidation sequence (rev5) URL : https://patchwork.freedesktop.org/series/119798/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/119798/revisions/5/mbox/ not applied Applying: drm-tip:

Re: [Intel-gfx] [PATCH v2] drm/i915/gt: update request engine before removing virtual GuC engine

2023-07-18 Thread Tvrtko Ursulin
On 17/07/2023 19:03, John Harrison wrote: On 7/13/2023 05:11, Tvrtko Ursulin wrote: On 13/07/2023 12:09, Andrzej Hajda wrote: Hi, On 13.07.2023 09:39, Tvrtko Ursulin wrote: On 12/07/2023 19:54, John Harrison wrote: On 7/12/2023 09:27, Andrzej Hajda wrote: On 12.07.2023 14:35, Tvrtko

[Intel-gfx] ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3)

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3) URL : https://patchwork.freedesktop.org/series/120857/ State : warning == Summary == Error: dim sparse failed Sparse version: v0.6.2 Fast mode used, each commit won't be checked

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3)

2023-07-18 Thread Patchwork
== Series Details == Series: series starting with [CI,1/4] drm/i915: Move setting of rps thresholds to init (rev3) URL : https://patchwork.freedesktop.org/series/120857/ State : warning == Summary == Error: dim checkpatch failed 225af759e3c0 drm/i915: Move setting of rps thresholds to init

[Intel-gfx] ✓ Fi.CI.IGT: success for Enhance vfio PCI hot reset for vfio cdev device (rev10)

2023-07-18 Thread Patchwork
== Series Details == Series: Enhance vfio PCI hot reset for vfio cdev device (rev10) URL : https://patchwork.freedesktop.org/series/116991/ State : success == Summary == CI Bug Log - changes from CI_DRM_13393_full -> Patchwork_116991v10_full

Re: [Intel-gfx] [PATCH v5 7/9] drm/i915/gt: Ensure memory quiesced before invalidation for all engines

2023-07-18 Thread Nirmoy Das
Hi Andi, On 7/18/2023 3:38 PM, Andi Shyti wrote: Commit af9e423a8aae ("drm/i915/gt: Ensure memory quiesced before invalidation") has made sure that the memory is quiesced before invalidating the AUX CCS table. Do it for all the other engines and not just RCS. Signed-off-by: Andi Shyti Cc:

[Intel-gfx] [PATCH v2] drm/i915: Refactor PAT/object cache handling

2023-07-18 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Commit 9275277d5324 ("drm/i915: use pat_index instead of cache_level") has introduced PAT indices to i915 internal APIs, partially replacing the usage of driver internal cache_level, but has also added a few questionable design decisions which this patch tries to improve

[Intel-gfx] [PATCH v15 26/26] docs: vfio: Add vfio device cdev description

2023-07-18 Thread Yi Liu
This gives notes for userspace applications on device cdev usage. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Signed-off-by: Yi Liu --- Documentation/driver-api/vfio.rst | 139 ++ 1 file changed, 139 insertions(+) diff --git

[Intel-gfx] [PATCH v15 25/26] vfio: Compile vfio_group infrastructure optionally

2023-07-18 Thread Yi Liu
vfio_group is not needed for vfio device cdev, so with vfio device cdev introduced, the vfio_group infrastructures can be compiled out if only cdev is needed. Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by: Shameer Kolothum

[Intel-gfx] [PATCH v15 22/26] vfio: Add VFIO_DEVICE_BIND_IOMMUFD

2023-07-18 Thread Yi Liu
This adds ioctl for userspace to bind device cdev fd to iommufd. VFIO_DEVICE_BIND_IOMMUFD: bind device to an iommufd, hence gain DMA control provided by the iommufd. open_device op is called after bind_iommufd op. Tested-by: Nicolin

[Intel-gfx] [PATCH v15 21/26] vfio: Avoid repeated user pointer cast in vfio_device_fops_unl_ioctl()

2023-07-18 Thread Yi Liu
This adds a local variable to store the user pointer cast result from arg. It avoids the repeated casts in the code when more ioctls are added. Reviewed-by: Jason Gunthorpe Signed-off-by: Yi Liu --- drivers/vfio/vfio_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

[Intel-gfx] [PATCH v15 23/26] vfio: Add VFIO_DEVICE_[AT|DE]TACH_IOMMUFD_PT

2023-07-18 Thread Yi Liu
This adds ioctl for userspace to attach device cdev fd to and detach from IOAS/hw_pagetable managed by iommufd. VFIO_DEVICE_ATTACH_IOMMUFD_PT: attach vfio device to IOAS or hw_pagetable managed by iommufd. Attach can be undo

[Intel-gfx] [PATCH v15 24/26] vfio: Move the IOMMU_CAP_CACHE_COHERENCY check in __vfio_register_dev()

2023-07-18 Thread Yi Liu
The IOMMU_CAP_CACHE_COHERENCY check only applies to the physical devices that are IOMMU-backed. But it is now in the group code. If want to compile vfio_group infrastructure out, this check needs to be moved out of the group code. Another reason for this change is to fail the device registration

[Intel-gfx] [PATCH v15 17/26] vfio: Move device_del() before waiting for the last vfio_device registration refcount

2023-07-18 Thread Yi Liu
device_del() destroys the vfio-dev/vfioX under the sysfs for vfio_device. There is no reason to keep it while the device is going to be unregistered. This movement is also a preparation for adding vfio_device cdev. Kernel should remove the cdev node of the vfio_device to avoid new registration

[Intel-gfx] [PATCH v15 20/26] iommufd: Add iommufd_ctx_from_fd()

2023-07-18 Thread Yi Liu
It's common to get a reference to the iommufd context from a given file descriptor. So adds an API for it. Existing users of this API are compiled only when IOMMUFD is enabled, so no need to have a stub for the IOMMUFD disabled case. Signed-off-by: Yi Liu --- drivers/iommu/iommufd/main.c | 24

[Intel-gfx] [PATCH v15 15/26] vfio-iommufd: Add detach_ioas support for emulated VFIO devices

2023-07-18 Thread Yi Liu
This prepares for adding DETACH ioctl for emulated VFIO devices. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by: Shameer Kolothum Tested-by: Zhenzhong Duan Signed-off-by: Yi

[Intel-gfx] [PATCH v15 19/26] vfio: Test kvm pointer in _vfio_device_get_kvm_safe()

2023-07-18 Thread Yi Liu
This saves some lines when adding the kvm get logic for the vfio_device cdev path. This also renames _vfio_device_get_kvm_safe() to be vfio_device_get_kvm_safe(). Suggested-by: Jason Gunthorpe Reviewed-by: Jason Gunthorpe Tested-by: Zhenzhong Duan Signed-off-by: Yi Liu ---

[Intel-gfx] [PATCH v15 09/26] vfio: Make vfio_df_open() single open for device cdev path

2023-07-18 Thread Yi Liu
VFIO group has historically allowed multi-open of the device FD. This was made secure because the "open" was executed via an ioctl to the group FD which is itself only single open. However, no known use of multiple device FDs today. It is kind of a strange thing to do because new device FDs can

[Intel-gfx] [PATCH v15 16/26] vfio: Move vfio_device_group_unregister() to be the first operation in unregister

2023-07-18 Thread Yi Liu
This avoids endless vfio_device refcount increment by userspace, which would keep blocking the vfio_unregister_group_dev(). Reviewed-by: Jason Gunthorpe Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by: Shameer Kolothum Tested-by: Terrence Xu Tested-by:

[Intel-gfx] [PATCH v15 13/26] vfio-iommufd: Add detach_ioas support for physical VFIO devices

2023-07-18 Thread Yi Liu
This prepares for adding DETACH ioctl for physical VFIO devices. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by: Shameer Kolothum Tested-by: Zhenzhong Duan Signed-off-by: Yi

[Intel-gfx] [PATCH v15 08/26] vfio: Add cdev_device_open_cnt to vfio_group

2023-07-18 Thread Yi Liu
This is for counting the devices that are opened via the cdev path. This count is increased and decreased by the cdev path. The group path checks it to achieve exclusion with the cdev path. With this, only one path (group path or cdev path) will claim DMA ownership. This avoids scenarios in which

[Intel-gfx] [PATCH v15 07/26] vfio: Block device access via device fd until device is opened

2023-07-18 Thread Yi Liu
Allow the vfio_device file to be in a state where the device FD is opened but the device cannot be used by userspace (i.e. its .open_device() hasn't been called). This inbetween state is not used when the device FD is spawned from the group FD, however when we create the device FD directly by

[Intel-gfx] [PATCH v15 05/26] kvm/vfio: Accept vfio device file from userspace

2023-07-18 Thread Yi Liu
This defines KVM_DEV_VFIO_FILE* and make alias with KVM_DEV_VFIO_GROUP*. Old userspace uses KVM_DEV_VFIO_GROUP* works as well. Reviewed-by: Jason Gunthorpe Reviewed-by: Kevin Tian Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by:

[Intel-gfx] [PATCH v15 12/26] vfio: Record devid in vfio_device_file

2023-07-18 Thread Yi Liu
.bind_iommufd() will generate an ID to represent this bond, which is needed by userspace for further usage. Store devid in vfio_device_file to avoid passing the pointer in multiple places. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen

[Intel-gfx] [PATCH v15 18/26] vfio: Add cdev for vfio_device

2023-07-18 Thread Yi Liu
This adds cdev support for vfio_device. It allows the user to directly open a vfio device w/o using the legacy container/group interface, as a prerequisite for supporting new iommu features like nested translation and etc. The device fd opened in this manner doesn't have the capability to access

[Intel-gfx] [PATCH v15 14/26] iommufd/device: Add iommufd_access_detach() API

2023-07-18 Thread Yi Liu
From: Nicolin Chen Previously, the detach routine is only done by the destroy(). And it was called by vfio_iommufd_emulated_unbind() when the device runs close(), so all the mappings in iopt were cleaned in that setup, when the call trace reaches this detach() routine. Now, there's a need of a

[Intel-gfx] [PATCH v15 11/26] vfio-iommufd: Split bind/attach into two steps

2023-07-18 Thread Yi Liu
This aligns the bind/attach logic with the coming vfio device cdev support. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting Jiang Tested-by: Shameer Kolothum Tested-by: Zhenzhong Duan

[Intel-gfx] [PATCH v15 10/26] vfio-iommufd: Move noiommu compat validation out of vfio_iommufd_bind()

2023-07-18 Thread Yi Liu
This moves the noiommu compat validation logic into vfio_df_group_open(). This is more consistent with what will be done in vfio device cdev path. Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting

[Intel-gfx] [PATCH v15 04/26] kvm/vfio: Prepare for accepting vfio device fd

2023-07-18 Thread Yi Liu
This renames kvm_vfio_group related helpers to prepare for accepting vfio device fd. No functional change is intended. Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Reviewed-by: Jason Gunthorpe Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato Tested-by: Yanting

[Intel-gfx] [PATCH v15 06/26] vfio: Pass struct vfio_device_file * to vfio_device_open/close()

2023-07-18 Thread Yi Liu
This avoids passing too much parameters in multiple functions. Per the input parameter change, rename the function to be vfio_df_open/close(). Reviewed-by: Kevin Tian Reviewed-by: Jason Gunthorpe Reviewed-by: Eric Auger Tested-by: Terrence Xu Tested-by: Nicolin Chen Tested-by: Matthew Rosato

[Intel-gfx] [PATCH v15 03/26] vfio: Accept vfio device file in the KVM facing kAPI

2023-07-18 Thread Yi Liu
This makes the vfio file kAPIs to accept vfio device files, also a preparation for vfio device cdev support. For the kvm set with vfio device file, kvm pointer is stored in struct vfio_device_file, and use kvm_ref_lock to protect kvm set and kvm pointer usage within VFIO. This kvm pointer will be

[Intel-gfx] [PATCH v15 02/26] vfio: Refine vfio file kAPIs for KVM

2023-07-18 Thread Yi Liu
This prepares for making the below kAPIs to accept both group file and device file instead of only vfio group file. bool vfio_file_enforced_coherent(struct file *file); void vfio_file_set_kvm(struct file *file, struct kvm *kvm); Reviewed-by: Kevin Tian Reviewed-by: Eric Auger Reviewed-by:

[Intel-gfx] [PATCH v15 01/26] vfio: Allocate per device file structure

2023-07-18 Thread Yi Liu
This is preparation for adding vfio device cdev support. vfio device cdev requires: 1) A per device file memory to store the kvm pointer set by KVM. It will be propagated to vfio_device:kvm after the device cdev file is bound to an iommufd. 2) A mechanism to block device access through

[Intel-gfx] [PATCH v15 00/26] Add vfio_device cdev for iommufd support

2023-07-18 Thread Yi Liu
Existing VFIO provides group-centric user APIs for userspace. Userspace opens the /dev/vfio/$group_id first before getting device fd and hence getting access to device. This is not the desired model for iommufd. Per the conclusion of community discussion[1], iommufd provides device-centric kAPIs

Re: [Intel-gfx] [PATCH v5 1/9] drm-tip: 2023y-07m-17d-16h-04m-53s UTC integration manifest

2023-07-18 Thread Andi Shyti
Sorry! wrong format-patch :) Please ignore patch 1. Andi On Tue, Jul 18, 2023 at 03:38:28PM +0200, Andi Shyti wrote: > From: Robert Foss > > --- > integration-manifest | 24 > 1 file changed, 24 insertions(+) > create mode 100644 integration-manifest > > diff --git

[Intel-gfx] [PATCH v5 9/9] drm/i915/gt: Support aux invalidation on all engines

2023-07-18 Thread Andi Shyti
Perform some refactoring with the purpose of keeping in one single place all the operations around the aux table invalidation. With this refactoring add more engines where the invalidation should be performed. Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines")

[Intel-gfx] [PATCH v5 7/9] drm/i915/gt: Ensure memory quiesced before invalidation for all engines

2023-07-18 Thread Andi Shyti
Commit af9e423a8aae ("drm/i915/gt: Ensure memory quiesced before invalidation") has made sure that the memory is quiesced before invalidating the AUX CCS table. Do it for all the other engines and not just RCS. Signed-off-by: Andi Shyti Cc: Jonathan Cavitt Cc: Matt Roper ---

[Intel-gfx] [PATCH v5 8/9] drm/i915/gt: Poll aux invalidation register bit on invalidation

2023-07-18 Thread Andi Shyti
From: Jonathan Cavitt For platforms that use Aux CCS, wait for aux invalidation to complete by checking the aux invalidation register bit is cleared. Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines") Signed-off-by: Jonathan Cavitt Signed-off-by: Andi Shyti Cc:

[Intel-gfx] [PATCH v5 3/9] drm/i915: Add the has_aux_ccs device property

2023-07-18 Thread Andi Shyti
We always assumed that a device might either have AUX or FLAT CCS, but this is an approximation that is not always true as it requires some further per device checks. Add the "has_aux_ccs" flag in the intel_device_info structure in order to have a per device flag indicating of the AUX CCS.

[Intel-gfx] [PATCH v5 5/9] drm/i915/gt: Rename flags with bit_group_X according to the datasheet

2023-07-18 Thread Andi Shyti
In preparation of the next patch align with the datasheet (BSPEC 47112) with the naming of the pipe control set of flag values. The variable "flags" in gen12_emit_flush_rcs() is applied as a set of flags called Bit Group 1. Define also the Bit Group 0 as bit_group_0 where currently only

[Intel-gfx] [PATCH v5 4/9] drm/i915/gt: Ensure memory quiesced before invalidation

2023-07-18 Thread Andi Shyti
From: Jonathan Cavitt All memory traffic must be quiesced before requesting an aux invalidation on platforms that use Aux CCS. Fixes: 972282c4cf24 ("drm/i915/gen12: Add aux table invalidate for all engines") Signed-off-by: Jonathan Cavitt Signed-off-by: Andi Shyti Cc: # v5.8+ Reviewed-by:

[Intel-gfx] [PATCH v5 6/9] drm/i915/gt: Refactor intel_emit_pipe_control_cs() in a single function

2023-07-18 Thread Andi Shyti
Just a trivial refactoring for reducing the number of code duplicate. This will come at handy in the next commits. Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/gen8_engine_cs.c | 44 +--- 1 file changed, 23 insertions(+), 21 deletions(-) diff --git

[Intel-gfx] [PATCH v5 2/9] drm/i915/gt: Cleanup aux invalidation registers

2023-07-18 Thread Andi Shyti
Fix the 'NV' definition postfix that is supposed to be INV. Take the chance to also order properly the registers based on their address and call the GEN12_GFX_CCS_AUX_INV address as GEN12_CCS_AUX_INV like all the other similar registers. Remove also VD1, VD3 and VE1 registers that don't exist

[Intel-gfx] [PATCH v5 1/9] drm-tip: 2023y-07m-17d-16h-04m-53s UTC integration manifest

2023-07-18 Thread Andi Shyti
From: Robert Foss --- integration-manifest | 24 1 file changed, 24 insertions(+) create mode 100644 integration-manifest diff --git a/integration-manifest b/integration-manifest new file mode 100644 index 0..8642016b34817 --- /dev/null +++

[Intel-gfx] [PATCH v5 0/9] Update AUX invalidation sequence

2023-07-18 Thread Andi Shyti
Hi, as there are new hardware directives, we need a little adaptation for the AUX invalidation sequence. In this version we support all the engines affected by this change. The stable backport has some challenges because the original patch that this series fixes has had more changes in between.

Re: [Intel-gfx] [PATCH] drm/i915: Fix an error handling path in igt_write_huge()

2023-07-18 Thread Andrzej Hajda
On 17.07.2023 20:49, Christophe JAILLET wrote: All error handling paths go to 'out', except this one. Be consistent and also branch to 'out' here. Fixes: c10a652e239e ("drm/i915/selftests: Rework context handling in hugepages selftests") Signed-off-by: Christophe JAILLET For me seems

Re: [Intel-gfx] [v2 14/15] drm/i915/adls: s/ADLS/ALDERLAKE_S in platform and subplatform defines

2023-07-18 Thread Lucas De Marchi
On Tue, Jul 18, 2023 at 11:53:17AM +0100, Tvrtko Ursulin wrote: On 18/07/2023 09:11, Dnyaneshwar Bhadane wrote: From: Anusha Srivatsa Driver refers to the platform Alderlake S as ADLS in places and ALDERLAKE_S in some. Making the consistent change to avoid confusion of the right naming

[Intel-gfx] ✓ Fi.CI.BAT: success for Enhance vfio PCI hot reset for vfio cdev device (rev10)

2023-07-18 Thread Patchwork
== Series Details == Series: Enhance vfio PCI hot reset for vfio cdev device (rev10) URL : https://patchwork.freedesktop.org/series/116991/ State : success == Summary == CI Bug Log - changes from CI_DRM_13393 -> Patchwork_116991v10 Summary

Re: [Intel-gfx] [PATCH] drm/i915/tv: avoid possible division by zero

2023-07-18 Thread Andrzej Hajda
On 18.07.2023 12:10, Su Hui wrote: On 2023/7/18 13:39, Dan Carpenter wrote: On Mon, Jul 17, 2023 at 04:52:51PM +0200, Andrzej Hajda wrote: On 17.07.2023 08:22, Su Hui wrote: Clang warning: drivers/gpu/drm/i915/display/intel_tv.c: line 991, column 22 Division by zero. Assuming

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Enhance vfio PCI hot reset for vfio cdev device (rev10)

2023-07-18 Thread Patchwork
== Series Details == Series: Enhance vfio PCI hot reset for vfio cdev device (rev10) URL : https://patchwork.freedesktop.org/series/116991/ State : warning == Summary == Error: dim checkpatch failed 7a4aaa443b7a vfio/pci: Update comment around group_fd get in vfio_pci_ioctl_pci_hot_reset()

[Intel-gfx] [PATCH v10 10/10] vfio/pci: Allow passing zero-length fd array in VFIO_DEVICE_PCI_HOT_RESET

2023-07-18 Thread Yi Liu
This is the way user to invoke hot-reset for the devices opened by cdev interface. User should check the flag VFIO_PCI_HOT_RESET_FLAG_DEV_ID_OWNED in the output of VFIO_DEVICE_GET_PCI_HOT_RESET_INFO ioctl before doing hot-reset for cdev devices. Suggested-by: Jason Gunthorpe Reviewed-by: Jason

[Intel-gfx] [PATCH v10 07/10] vfio: Add helper to search vfio_device in a dev_set

2023-07-18 Thread Yi Liu
There are drivers that need to search vfio_device within a given dev_set. e.g. vfio-pci. So add a helper. vfio_pci_is_device_in_set() now returns -EBUSY in commit a882c16a2b7e ("vfio/pci: Change vfio_pci_try_bus_reset() to use the dev_set") where it was trying to preserve the return of

  1   2   >