Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Thomas Hellström
On 2/16/23 08:11, Christian König wrote: Am 15.02.23 um 20:00 schrieb Thomas Hellström: On Wed, 2023-02-15 at 19:30 +0100, Christian König wrote: Am 15.02.23 um 19:12 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:42 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas

Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Christian König
Am 15.02.23 um 20:00 schrieb Thomas Hellström: On Wed, 2023-02-15 at 19:30 +0100, Christian König wrote: Am 15.02.23 um 19:12 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:42 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas Hellström: When swapping out, we will split

[Intel-gfx] ✓ Fi.CI.IGT: success for series starting with [v2,1/3] drm/i915: Make backlight setup debugs consistent (rev2)

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v2,1/3] drm/i915: Make backlight setup debugs consistent (rev2) URL : https://patchwork.freedesktop.org/series/114012/ State : success == Summary == CI Bug Log - changes from CI_DRM_12742_full -> Patchwork_114012v2_full

Re: [Intel-gfx] [PATCH 4/9] drm/i915/perf: Fail modprobe if i915_perf_init fails

2023-02-15 Thread Dixit, Ashutosh
On Tue, 14 Feb 2023 16:54:14 -0800, Umesh Nerlige Ramappa wrote: > > Check for return value from i915_perf_init and fail driver init if perf > init fails. Guess we'll start returning anything other than zero later: Reviewed-by: Ashutosh Dixit > > Signed-off-by: Umesh Nerlige Ramappa > --- >

Re: [Intel-gfx] [PATCH 3/9] drm/i915/perf: Validate OA sseu config outside switch

2023-02-15 Thread Dixit, Ashutosh
On Wed, 15 Feb 2023 21:08:43 -0800, Dixit, Ashutosh wrote: > > On Tue, 14 Feb 2023 16:54:13 -0800, Umesh Nerlige Ramappa wrote: > > > > Validate the OA sseu config after all params are parsed. > > Commit messages for all patches need to answer the "why" or the reason for > the patch. In this case

Re: [Intel-gfx] [PATCH 3/9] drm/i915/perf: Validate OA sseu config outside switch

2023-02-15 Thread Dixit, Ashutosh
On Tue, 14 Feb 2023 16:54:13 -0800, Umesh Nerlige Ramappa wrote: > > Validate the OA sseu config after all params are parsed. Commit messages for all patches need to answer the "why" or the reason for the patch. In this case maybe an overkill but probably something like: Validate the OA sseu

Re: [Intel-gfx] [PATCH 2/9] drm/i915/perf: Add helper to check supported OA engines

2023-02-15 Thread Dixit, Ashutosh
On Tue, 14 Feb 2023 16:54:12 -0800, Umesh Nerlige Ramappa wrote: > > Add helper to check for supported OA engines. > > Signed-off-by: Umesh Nerlige Ramappa > --- > drivers/gpu/drm/i915/i915_perf.c | 19 --- > 1 file changed, 16 insertions(+), 3 deletions(-) > > diff --git

Re: [Intel-gfx] [PATCH 1/9] drm/i915/perf: Drop wakeref on GuC RC error

2023-02-15 Thread Dixit, Ashutosh
On Tue, 14 Feb 2023 16:54:11 -0800, Umesh Nerlige Ramappa wrote: > > diff --git a/drivers/gpu/drm/i915/i915_perf.c > b/drivers/gpu/drm/i915/i915_perf.c > index 824a34ec0b83..393a0da8b7c8 100644 > --- a/drivers/gpu/drm/i915/i915_perf.c > +++ b/drivers/gpu/drm/i915/i915_perf.c > @@ -1592,9 +1592,7

Re: [Intel-gfx] [PATCH v2 2/2] drm/i915: Don't use BAR mappings for ring buffers with LLC

2023-02-15 Thread kernel test robot
Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on drm-tip/drm-tip] url: https://github.com/intel-lab-lkp/linux/commits/John-C-Harrison-Intel-com/drm-i915-Don-t-use-stolen-memory-for-ring-buffers-with-LLC/20230216-082552 base:

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

2023-02-15 Thread Liu, Yi L
> From: Alex Williamson > Sent: Thursday, February 16, 2023 4:09 AM > > On Wed, 15 Feb 2023 07:54:31 + > "Liu, Yi L" wrote: > > > > From: Alex Williamson > > > Sent: Tuesday, February 14, 2023 11:47 PM > > > > > > On Tue, 14 Feb 2023 01:55:17 + > > > "Liu, Yi L" wrote: > > > > > > >

[Intel-gfx] [linux-next:master] BUILD REGRESSION 9d9019bcea1aac7eed64a1a4966282b6b7b141c8

2023-02-15 Thread kernel test robot
tree/branch: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master branch HEAD: 9d9019bcea1aac7eed64a1a4966282b6b7b141c8 Add linux-next specific files for 20230215 Error/Warning reports: https://lore.kernel.org/oe-kbuild-all/202301300743.bp7dpazv-...@intel.com https

[Intel-gfx] ✗ Fi.CI.BAT: failure for Don't use stolen memory or BAR mappings for ring buffers

2023-02-15 Thread Patchwork
== Series Details == Series: Don't use stolen memory or BAR mappings for ring buffers URL : https://patchwork.freedesktop.org/series/114080/ State : failure == Summary == CI Bug Log - changes from CI_DRM_12746 -> Patchwork_114080v1 Summary

[Intel-gfx] [PATCH v3 0/2] Don't use stolen memory or BAR mappings for ring buffers

2023-02-15 Thread John . C . Harrison
From: John Harrison Instruction from hardware arch is that stolen memory and BAR mappings are unsafe for use as ring buffers. There can be issues with cache aliasing due to the CPU access going to memory via the BAR. So, don't do it. v2: Dont use BAR mappings either. Make conditional on LLC so

[Intel-gfx] [PATCH v3 2/2] drm/i915: Don't use BAR mappings for ring buffers with LLC

2023-02-15 Thread John . C . Harrison
From: John Harrison Direction from hardware is that ring buffers should never be mapped via the BAR on systems with LLC. There are too many caching pitfalls due to the way BAR accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison Fixes: 9d80841ea4c9 ("drm/i915:

[Intel-gfx] [PATCH v3 1/2] drm/i915: Don't use stolen memory for ring buffers with LLC

2023-02-15 Thread John . C . Harrison
From: John Harrison Direction from hardware is that stolen memory should never be used for ring buffer allocations on platforms with LLC. There are too many caching pitfalls due to the way stolen memory accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Use encoder->devdata more (rev2)

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v2,1/3] drm/i915: Use encoder->devdata more (rev2) URL : https://patchwork.freedesktop.org/series/114029/ State : success == Summary == CI Bug Log - changes from CI_DRM_12746 -> Patchwork_114029v2

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Don't use stolen memory or BAR mappings for ring buffers

2023-02-15 Thread Patchwork
== Series Details == Series: Don't use stolen memory or BAR mappings for ring buffers URL : https://patchwork.freedesktop.org/series/114074/ State : failure == Summary == Error: make failed CALLscripts/checksyscalls.sh DESCEND objtool CC [M] drivers/gpu/drm/i915/gt/intel_ring.o

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v2,1/3] drm/i915: Use encoder->devdata more (rev2)

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v2,1/3] drm/i915: Use encoder->devdata more (rev2) URL : https://patchwork.freedesktop.org/series/114029/ State : warning == Summary == Error: dim checkpatch failed 6d862c28ab08 drm/i915: Use encoder->devdata more c197ab2941f5 drm/i915:

[Intel-gfx] [PATCH v2 0/2] Don't use stolen memory or BAR mappings for ring buffers

2023-02-15 Thread John . C . Harrison
From: John Harrison Instruction from hardware arch is that stolen memory and BAR mappings are unsafe for use as ring buffers. There can be issues with cache aliasing due to the CPU access going to memory via the BAR. So, don't do it. v2: Dont use BAR mappings either. Make conditional on LLC so

[Intel-gfx] [PATCH v2 1/2] drm/i915: Don't use stolen memory for ring buffers with LLC

2023-02-15 Thread John . C . Harrison
From: John Harrison Direction from hardware is that stolen memory should never be used for ring buffer allocations on platforms with LLC. There are too many caching pitfalls due to the way stolen memory accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison

[Intel-gfx] [PATCH v2 2/2] drm/i915: Don't use BAR mappings for ring buffers with LLC

2023-02-15 Thread John . C . Harrison
From: Daniele Ceraolo Spurio Direction from hardware is that ring buffers should never be mapped via the BAR on systems with LLC. There are too many caching pitfalls due to the way BAR accesses are routed. So it is safest to just not use it. Signed-off-by: John Harrison Fixes: 9d80841ea4c9

[Intel-gfx] [PATCH v2 1/3] drm/i915: Use encoder->devdata more

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä Switch a lot of the intel_bios_foo() stuff to just accept the devdata (VBT child device info) directly, instead of taking detours via vbt.ports[]. Also unify the function naming scheme. v2: Drop the redundant "encoder" from the dp/hdmi specific functions Signed-off-by:

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [1/2] drm/i915: Don't leak the DPT if drm_framebuffer_init() fails

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [1/2] drm/i915: Don't leak the DPT if drm_framebuffer_init() fails URL : https://patchwork.freedesktop.org/series/114069/ State : success == Summary == CI Bug Log - changes from CI_DRM_12745 -> Patchwork_114069v1

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add a few more debugs for failed framebuffer creation

2023-02-15 Thread Matt Roper
On Thu, Feb 16, 2023 at 12:24:26AM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > Most of the .fb_create() failure paths are annotated but there > are a few that seem capable of failing silently (well, higher > level code should print something, just not anything actually > useful). Drop

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Don't leak the DPT if drm_framebuffer_init() fails

2023-02-15 Thread Matt Roper
On Thu, Feb 16, 2023 at 12:24:25AM +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > We are failing to free the already allocated DPT if the final > drm_framebuffer_init() fails. That would require idr_alloc() to > fail, so not very likely, but let's add the cleanup code anyway. > >

[Intel-gfx] ✓ Fi.CI.IGT: success for Provision to ignore long HPDs in CI systems (rev5)

2023-02-15 Thread Patchwork
== Series Details == Series: Provision to ignore long HPDs in CI systems (rev5) URL : https://patchwork.freedesktop.org/series/109475/ State : success == Summary == CI Bug Log - changes from CI_DRM_12741_full -> Patchwork_109475v5_full

[Intel-gfx] [PATCH 2/2] drm/i915: Add a few more debugs for failed framebuffer creation

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä Most of the .fb_create() failure paths are annotated but there are a few that seem capable of failing silently (well, higher level code should print something, just not anything actually useful). Drop a few more hints into the log to aid in debugging. Signed-off-by: Ville

[Intel-gfx] [PATCH 1/2] drm/i915: Don't leak the DPT if drm_framebuffer_init() fails

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä We are failing to free the already allocated DPT if the final drm_framebuffer_init() fails. That would require idr_alloc() to fail, so not very likely, but let's add the cleanup code anyway. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_fb.c | 5 -

Re: [Intel-gfx] [PATCH] drm/i915/xelpmp: Consider GSI offset when doing MCR lookups

2023-02-15 Thread Matt Roper
On Wed, Feb 15, 2023 at 11:48:13AM -0800, Sripada, Radhakrishna wrote: > > > > -Original Message- > > From: dri-devel On Behalf Of Matt > > Roper > > Sent: Monday, February 13, 2023 4:19 PM > > To: intel-gfx@lists.freedesktop.org > > Cc: dri-de...@lists.freedesktop.org > > Subject:

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

2023-02-15 Thread Alex Williamson
On Wed, 15 Feb 2023 07:54:31 + "Liu, Yi L" wrote: > > From: Alex Williamson > > Sent: Tuesday, February 14, 2023 11:47 PM > > > > On Tue, 14 Feb 2023 01:55:17 + > > "Liu, Yi L" wrote: > > > > > > From: Alex Williamson > > > > Sent: Tuesday, February 14, 2023 3:47 AM > > > > > > >

Re: [Intel-gfx] [PATCH v5 4/8] drm/i915/pxp: Add GSC-CS backend to send GSC fw messages

2023-02-15 Thread Teres Alexis, Alan Previn
On Tue, 2023-02-14 at 13:38 -0800, Teres Alexis, Alan Previn wrote: alan:snip > +static int gsccs_send_message(struct intel_pxp *pxp, > + void *msg_in, size_t msg_in_size, > + void *msg_out, size_t msg_out_size_max, > +

[Intel-gfx] ✓ Fi.CI.BAT: success for Add a TTM shrinker

2023-02-15 Thread Patchwork
== Series Details == Series: Add a TTM shrinker URL : https://patchwork.freedesktop.org/series/114060/ State : success == Summary == CI Bug Log - changes from CI_DRM_12744 -> Patchwork_114060v1 Summary --- **SUCCESS** No

Re: [Intel-gfx] [PATCH] drm/i915/xelpmp: Consider GSI offset when doing MCR lookups

2023-02-15 Thread Sripada, Radhakrishna
> -Original Message- > From: dri-devel On Behalf Of Matt > Roper > Sent: Monday, February 13, 2023 4:19 PM > To: intel-gfx@lists.freedesktop.org > Cc: dri-de...@lists.freedesktop.org > Subject: [PATCH] drm/i915/xelpmp: Consider GSI offset when doing MCR > lookups > > MCR range tables

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Reduce ELD hex dumps a bit (rev2)

2023-02-15 Thread Patchwork
== Series Details == Series: drm/i915: Reduce ELD hex dumps a bit (rev2) URL : https://patchwork.freedesktop.org/series/114051/ State : success == Summary == CI Bug Log - changes from CI_DRM_12744 -> Patchwork_114051v2 Summary ---

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for Add a TTM shrinker

2023-02-15 Thread Patchwork
== Series Details == Series: Add a TTM shrinker URL : https://patchwork.freedesktop.org/series/114060/ State : warning == Summary == Error: dim checkpatch failed 868fc3be5310 drm/ttm: Fix a NULL pointer dereference 98296903c17c drm/ttm/pool: Fix ttm_pool_alloc error path f7427cf5528b drm/ttm:

[Intel-gfx] ✓ Fi.CI.IGT: success for drm/i915: move a Kconfig symbol to unbreak the menu presentation

2023-02-15 Thread Patchwork
== Series Details == Series: drm/i915: move a Kconfig symbol to unbreak the menu presentation URL : https://patchwork.freedesktop.org/series/114037/ State : success == Summary == CI Bug Log - changes from CI_DRM_12741_full -> Patchwork_114037v1_full

Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 19:30 +0100, Christian König wrote: > Am 15.02.23 um 19:12 schrieb Thomas Hellström: > > On Wed, 2023-02-15 at 18:42 +0100, Christian König wrote: > > > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > > > When swapping out, we will split multi-order pages both in > > > >

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v3,1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch]

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v3,1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch] URL : https://patchwork.freedesktop.org/series/114055/ State : success == Summary == CI Bug Log - changes from CI_DRM_12744 -> Patchwork_114055v1

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 19:26 +0100, Christian König wrote: > Am 15.02.23 um 19:02 schrieb Thomas Hellström: > > On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: > > > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > > > When hitting an error, the error path forgot to unmap dma > > > >

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch]

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v3,1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch] URL : https://patchwork.freedesktop.org/series/114055/ State : warning == Summary == Error: dim checkpatch failed 0a089d0ac10a drm/i915/wm: move ILK watermark sanitization

Re: [Intel-gfx] [RFC PATCH 04/16] drm/ttm, drm/vmwgfx: Update the TTM swapout interface

2023-02-15 Thread Christian König
Am 15.02.23 um 19:19 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:39 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas Hellström: Update the TTM swapout interfaces for better compatibility with a shrinker. - Replace number-of-pages int return with a long to better match

Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Christian König
Am 15.02.23 um 19:12 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:42 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas Hellström: When swapping out, we will split multi-order pages both in order to move them to the swap-cache and to be able to return memory to the swap

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Include connector id+name in all backlight debugs/errors

2023-02-15 Thread Patchwork
== Series Details == Series: drm/i915: Include connector id+name in all backlight debugs/errors URL : https://patchwork.freedesktop.org/series/114053/ State : success == Summary == CI Bug Log - changes from CI_DRM_12744 -> Patchwork_114053v1

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Christian König
Am 15.02.23 um 19:02 schrieb Thomas Hellström: On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: Am 15.02.23 um 17:13 schrieb Thomas Hellström: When hitting an error, the error path forgot to unmap dma mappings and I don't see where this happens? From what I can tell,

Re: [Intel-gfx] [RFC PATCH 04/16] drm/ttm, drm/vmwgfx: Update the TTM swapout interface

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 18:39 +0100, Christian König wrote: > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > Update the TTM swapout interfaces for better compatibility with a > > shrinker. > > - Replace number-of-pages int return with a long to better match > > the > >    kernel's shrinker

Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 18:42 +0100, Christian König wrote: > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > When swapping out, we will split multi-order pages both in order to > > move them to the swap-cache and to be able to return memory to the > > swap cache as soon as possible on a

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
On Wed, 2023-02-15 at 18:31 +0100, Christian König wrote: > Am 15.02.23 um 17:13 schrieb Thomas Hellström: > > When hitting an error, the error path forgot to unmap dma mappings > > and > > I don't see where this happens? From what I can tell, ttm_pool_page_allocated() maps the page for dma, If

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Include connector id+name in all backlight debugs/errors

2023-02-15 Thread Patchwork
== Series Details == Series: drm/i915: Include connector id+name in all backlight debugs/errors URL : https://patchwork.freedesktop.org/series/114053/ State : warning == Summary == Error: dim checkpatch failed 871e05e89e67 drm/i915: Include connector id+name in all backlight debugs/errors

Re: [Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: When swapping out, we will split multi-order pages both in order to move them to the swap-cache and to be able to return memory to the swap cache as soon as possible on a page-by-page basis. By reducing the page max order to the system PMD size, we

Re: [Intel-gfx] [RFC PATCH 04/16] drm/ttm, drm/vmwgfx: Update the TTM swapout interface

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: Update the TTM swapout interfaces for better compatibility with a shrinker. - Replace number-of-pages int return with a long to better match the kernel's shrinker interface. - The gfp_flags parameter to ttm_xx_swapout() currently only takes the

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Jason Gunthorpe
On Wed, Feb 15, 2023 at 10:19:35AM -0700, Alex Williamson wrote: > On Wed, 15 Feb 2023 13:04:13 -0400 > Jason Gunthorpe wrote: > > > On Wed, Feb 15, 2023 at 08:32:34AM -0700, Alex Williamson wrote: > > > > > We've discussed this with Paolo before and I believe the bar of proof > > > is not very

Re: [Intel-gfx] [RFC PATCH 03/16] drm/ttm: Use the BIT macro for the TTM_TT_FLAGs

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: New code is recommended to use the BIT macro instead of the explicit shifts. Change the older defines so that we can keep the style consistent with upcoming changes. Signed-off-by: Thomas Hellström --- include/drm/ttm/ttm_tt.h | 10 +-

Re: [Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: When hitting an error, the error path forgot to unmap dma mappings and I don't see where this happens? could call set_pages_wb() on already uncached pages. Yeah, but what's the problem? Regards, Christian. Fix this by introducing a common

Re: [Intel-gfx] [RFC PATCH 01/16] drm/ttm: Fix a NULL pointer dereference

2023-02-15 Thread Christian König
Am 15.02.23 um 17:13 schrieb Thomas Hellström: The LRU mechanism may look up a resource in the process of being removed from an object. The locking rules here are a bit unclear but it looks currently like res->bo assignment is protected by the LRU lock, whereas bo->resource is protected by the

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Alex Williamson
On Wed, 15 Feb 2023 13:04:13 -0400 Jason Gunthorpe wrote: > On Wed, Feb 15, 2023 at 08:32:34AM -0700, Alex Williamson wrote: > > > We've discussed this with Paolo before and I believe the bar of proof > > is not very high. I suspect it's not a problem that the device itself > > is not yet

Re: [Intel-gfx] [PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-02-15 Thread Rodrigo Vivi
On Wed, Feb 15, 2023 at 08:24:51AM -0800, Dixit, Ashutosh wrote: > On Wed, 15 Feb 2023 07:37:30 -0800, Jani Nikula wrote: > > > > On Wed, 08 Feb 2023, Rodrigo Vivi wrote: > > > On Wed, Feb 08, 2023 at 11:03:12AM -0800, Ashutosh Dixit wrote: > > >> This reverts commit

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Jason Gunthorpe
On Wed, Feb 15, 2023 at 08:32:34AM -0700, Alex Williamson wrote: > We've discussed this with Paolo before and I believe the bar of proof > is not very high. I suspect it's not a problem that the device itself > is not yet accessible, so long as the user can prove they have the > ability to

Re: [Intel-gfx] [PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-02-15 Thread Dixit, Ashutosh
On Wed, 15 Feb 2023 07:37:30 -0800, Jani Nikula wrote: > > On Wed, 08 Feb 2023, Rodrigo Vivi wrote: > > On Wed, Feb 08, 2023 at 11:03:12AM -0800, Ashutosh Dixit wrote: > >> This reverts commit 0349c41b05968befaffa5fbb7e73d0ee6004f610. > >> > >> 0349c41b0596 ("drm/i915/hwmon: Enable PL1 power

[Intel-gfx] [RFC PATCH 16/16] drm/i915, drm/ttm: Use the TTM shrinker rather than the external shmem pool

2023-02-15 Thread Thomas Hellström
Remove the external i915 TTM shmem pool and replace it with the normal TTM page allocation. Also provide a callback for the TTM shrinker functionality. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_object.h| 6 - .../gpu/drm/i915/gem/i915_gem_object_types.h | 6

[Intel-gfx] [RFC PATCH 15/16] drm/ttm: Use fault-injection to test error paths

2023-02-15 Thread Thomas Hellström
Use fault-injection to test partial TTM swapout and interrupted swapin. Return -EINTR for swapin to test the callers ability to handle and restart the swapin, and on swapout perform a partial swapout to test that the swapin and release_shrunken functionality. Signed-off-by: Thomas Hellström ---

[Intel-gfx] [RFC PATCH 13/16] drm/ttm: Make the call to ttm_tt_populate() interruptible when faulting

2023-02-15 Thread Thomas Hellström
When swapping in, or under memory pressure ttm_tt_populate() may sleep for a substantiable amount of time. Allow interrupts during the sleep. This will also allow us to inject -EINTR errors during swapin in upcoming patches. Also avoid returning VM_FAULT_OOM, since that will confuse the core mm,

[Intel-gfx] [RFC PATCH 14/16] drm/ttm: Provide helpers for shrinking

2023-02-15 Thread Thomas Hellström
Provide a helper to be used by the driver bo_shrink() callback to either insert the pages of a struct ttm_tt into the swap-cache or to purge them if the struct ttm_tt is purgeable. For pages with write-combined or uncached linear kernel map, that linear kernel map is first changed to cached.

[Intel-gfx] [RFC PATCH 12/16] mm: Add interfaces to back up and recover folio contents using swap

2023-02-15 Thread Thomas Hellström
GPU drivers have traditionally used shmem to back up GPU buffer contents for swap on physical memory shortage. Some integrated GPU drivers use shmem files as the backing storage for their GPU buffers, other drivers, in particular drivers that need a Write-Combining caching strategy on system

[Intel-gfx] [RFC PATCH 11/16] drm/ttm: Add a simple api to set / clear purgeable ttm_tt content

2023-02-15 Thread Thomas Hellström
In the absence of free swap space, a shrinker could still efficiently free memory the content of which is no longer needed, and graphics drivers typically has an interface to mark buffer object content as no longer needed. Add a possibility to propagate this to TTM, so that the shrinker

[Intel-gfx] [RFC PATCH 10/16] drm/ttm: Remove pinned bos from shrinkable accounting

2023-02-15 Thread Thomas Hellström
Pinned bos aren't shinkable and needs to be removed from the shrinkable accounting. Do that, and in the process constify the tt argument to ttm_tt_is_populated. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_bo.c | 7 +++ drivers/gpu/drm/ttm/ttm_tt.c | 22

[Intel-gfx] [RFC PATCH 09/16] drm/ttm: Introduce shrink throttling.

2023-02-15 Thread Thomas Hellström
Since pages are not immediately freed by the TTM shrinker but rather inserted into the swap cache, the system will keep on calling the shrinker rapidly filling the swap cache which has a negative impact on system performance. When shrinking, throttle on the number of pages present in the swap

[Intel-gfx] [RFC PATCH 08/16] drm/ttm: Add a shrinker and shrinker accounting

2023-02-15 Thread Thomas Hellström
Register a TTM system memory-backed object shrinker and add accounting for shrinkable and purgeable pages. For the shrinker to work, the driver needs to register the bo_shrink callback which is responsible for unbinding from GPU and the dma layer if needed. Helpers for that callback to actually

[Intel-gfx] [RFC PATCH 07/16] drm/ttm: Reduce the number of used allocation orders for TTM pages

2023-02-15 Thread Thomas Hellström
When swapping out, we will split multi-order pages both in order to move them to the swap-cache and to be able to return memory to the swap cache as soon as possible on a page-by-page basis. By reducing the page max order to the system PMD size, we can be nicer to the system and avoid splitting

[Intel-gfx] [RFC PATCH 06/16] drm/ttm: Don't use watermark accounting on shrinkable pools

2023-02-15 Thread Thomas Hellström
Clarify the meaning of the ttm_tt pages_limit watermarks as the max number of pages not accessible by shrinkers, and update accordingly so that memory allocated by TTM devices that support shrinking is not accounted against those limits. In particular this means that devices using the dma_alloc

[Intel-gfx] [RFC PATCH 05/16] drm/ttm: Unexport ttm_global_swapout()

2023-02-15 Thread Thomas Hellström
Unexport ttm_global_swapout() since it is not used outside of TTM. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/ttm/ttm_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_device.c b/drivers/gpu/drm/ttm/ttm_device.c index 7eadea07027f..a3cac42bb456 100644

[Intel-gfx] [RFC PATCH 04/16] drm/ttm, drm/vmwgfx: Update the TTM swapout interface

2023-02-15 Thread Thomas Hellström
Update the TTM swapout interfaces for better compatibility with a shrinker. - Replace number-of-pages int return with a long to better match the kernel's shrinker interface. - The gfp_flags parameter to ttm_xx_swapout() currently only takes the GFP_KERNEL value and shouldn't really be needed

[Intel-gfx] [RFC PATCH 03/16] drm/ttm: Use the BIT macro for the TTM_TT_FLAGs

2023-02-15 Thread Thomas Hellström
New code is recommended to use the BIT macro instead of the explicit shifts. Change the older defines so that we can keep the style consistent with upcoming changes. Signed-off-by: Thomas Hellström --- include/drm/ttm/ttm_tt.h | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-)

[Intel-gfx] [RFC PATCH 00/16] Add a TTM shrinker

2023-02-15 Thread Thomas Hellström
This series introduces a TTM shrinker. Currently the TTM subsystem allows a certain watermark fraction of system memory to be pinned by GPUs. Any allocation beyond that will cause TTM to attempt to copy memory to shmem objects for possible later swapout so that that fraction is fulfilled. That

[Intel-gfx] [RFC PATCH 02/16] drm/ttm/pool: Fix ttm_pool_alloc error path

2023-02-15 Thread Thomas Hellström
When hitting an error, the error path forgot to unmap dma mappings and could call set_pages_wb() on already uncached pages. Fix this by introducing a common __ttm_pool_free() function that does the right thing. Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Cc: Christian

[Intel-gfx] [RFC PATCH 01/16] drm/ttm: Fix a NULL pointer dereference

2023-02-15 Thread Thomas Hellström
The LRU mechanism may look up a resource in the process of being removed from an object. The locking rules here are a bit unclear but it looks currently like res->bo assignment is protected by the LRU lock, whereas bo->resource is protected by the object lock, while *clearing* of bo->resource is

Re: [Intel-gfx] [PATCH] Revert "drm/i915/hwmon: Enable PL1 power limit"

2023-02-15 Thread Jani Nikula
On Wed, 08 Feb 2023, Rodrigo Vivi wrote: > On Wed, Feb 08, 2023 at 11:03:12AM -0800, Ashutosh Dixit wrote: >> This reverts commit 0349c41b05968befaffa5fbb7e73d0ee6004f610. >> >> 0349c41b0596 ("drm/i915/hwmon: Enable PL1 power limit") is incorrect and >> caused a major regression on ATSM. The

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Alex Williamson
[Cc +Paolo] On Wed, 15 Feb 2023 10:46:34 -0400 Jason Gunthorpe wrote: > On Wed, Feb 15, 2023 at 02:43:20PM +, Liu, Yi L wrote: > > > From: Jason Gunthorpe > > > Sent: Wednesday, February 15, 2023 8:39 PM > > > > > > On Tue, Feb 14, 2023 at 02:02:37AM +, Liu, Yi L wrote: > > > > >

[Intel-gfx] ✓ Fi.CI.IGT: success for Enable YCbCr420 for VDSC (rev4)

2023-02-15 Thread Patchwork
== Series Details == Series: Enable YCbCr420 for VDSC (rev4) URL : https://patchwork.freedesktop.org/series/113729/ State : success == Summary == CI Bug Log - changes from CI_DRM_12739_full -> Patchwork_113729v4_full Summary ---

Re: [Intel-gfx] [PATCH v2] drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjala wrote: > From: Ville Syrjälä > > Do the ELD hexdumps only up to the last differing byte. > The rest is typically all zeroes anyway so not much point > in dumping it. > > Couldn't find anything for memcmp_diff_len() so > rolled my own. > > v2: Use semantics and

[Intel-gfx] [PATCH v2] drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä Do the ELD hexdumps only up to the last differing byte. The rest is typically all zeroes anyway so not much point in dumping it. Couldn't find anything for memcmp_diff_len() so rolled my own. v2: Use semantics and function name suggested by Jani Cc: Jani Nikula

[Intel-gfx] ✓ Fi.CI.BAT: success for series starting with [v2,1/3] drm/i915: Make backlight setup debugs consistent (rev2)

2023-02-15 Thread Patchwork
== Series Details == Series: series starting with [v2,1/3] drm/i915: Make backlight setup debugs consistent (rev2) URL : https://patchwork.freedesktop.org/series/114012/ State : success == Summary == CI Bug Log - changes from CI_DRM_12742 -> Patchwork_114012v2

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Jason Gunthorpe
On Wed, Feb 15, 2023 at 02:43:20PM +, Liu, Yi L wrote: > > From: Jason Gunthorpe > > Sent: Wednesday, February 15, 2023 8:39 PM > > > > On Tue, Feb 14, 2023 at 02:02:37AM +, Liu, Yi L wrote: > > > > From: Jason Gunthorpe > > > > Sent: Tuesday, February 14, 2023 7:44 AM > > > > > > > >

Re: [Intel-gfx] [PATCH v3 03/15] vfio: Accept vfio device file in the driver facing kAPI

2023-02-15 Thread Liu, Yi L
> From: Jason Gunthorpe > Sent: Wednesday, February 15, 2023 8:39 PM > > On Tue, Feb 14, 2023 at 02:02:37AM +, Liu, Yi L wrote: > > > From: Jason Gunthorpe > > > Sent: Tuesday, February 14, 2023 7:44 AM > > > > > > On Mon, Feb 13, 2023 at 07:13:36AM -0800, Yi Liu wrote: > > > > +static

Re: [Intel-gfx] [PATCH v3 5/5] drm/i915/wm: remove ILK+ nop funcs fallback

2023-02-15 Thread Ville Syrjälä
On Wed, Feb 15, 2023 at 04:19:10PM +0200, Jani Nikula wrote: > Disabling ILK+ watermarks on failure to read the watermark levels dates > back to 2010 and commit 7f8a85698f5c ("drm/i915: Add the support of > memory self-refresh on Ironlake"), with no explanations, and it's been > copied and

Re: [Intel-gfx] [PATCH v3 2/5] drm/i915/wm: warn about ilk_wm_sanitize() on display ver 9+

2023-02-15 Thread Ville Syrjälä
On Wed, Feb 15, 2023 at 04:19:07PM +0200, Jani Nikula wrote: > The sanitization should be limited to PCH split platforms up to display > version 8. Warn and bail out otherwise. > > Signed-off-by: Jani Nikula > --- > drivers/gpu/drm/i915/display/i9xx_wm.c | 3 +++ > 1 file changed, 3

Re: [Intel-gfx] [PATCH v3 1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch]

2023-02-15 Thread Ville Syrjälä
On Wed, Feb 15, 2023 at 04:19:06PM +0200, Jani Nikula wrote: > Move sanitize_watermarks() to i9xx_wm.[ch] and rename as > ilk_wm_sanitize(). The slightly unfortunate downside is having to expose > intel_atomic_check() from intel_display.c, but this declutters > intel_display.c nicely. > > v2: > -

Re: [Intel-gfx] [PATCH v2 5/7] drm/i915/wm: move watermark sanitization to intel_wm.[ch]

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjälä wrote: > On Wed, Feb 15, 2023 at 01:21:39PM +0200, Jani Nikula wrote: >> On Mon, 13 Feb 2023, Ville Syrjälä wrote: >> > On Mon, Feb 13, 2023 at 10:00:00PM +0200, Jani Nikula wrote: >> >> Move the generic sanitize_watermarks() to intel_wm.[ch] and rename as >> >

[Intel-gfx] [PATCH v3 5/5] drm/i915/wm: remove ILK+ nop funcs fallback

2023-02-15 Thread Jani Nikula
Disabling ILK+ watermarks on failure to read the watermark levels dates back to 2010 and commit 7f8a85698f5c ("drm/i915: Add the support of memory self-refresh on Ironlake"), with no explanations, and it's been copied and modified from that ever since. Finally drop it. If the value are actually

[Intel-gfx] [PATCH v3 4/5] drm/i915: rename intel_pm_types.h -> display/intel_wm_types.h

2023-02-15 Thread Jani Nikula
The file was never really about pm types, and now it's even more obvious. Move under display as intel_wm_types.h. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/intel_display_core.h | 2 +-

[Intel-gfx] [PATCH v3 3/5] drm/i915/wm: move watermark debugfs to intel_wm.c

2023-02-15 Thread Jani Nikula
Follow the new convention of placing debugfs with the code. Cc: Ville Syrjälä Reviewed-by: Ville Syrjälä Signed-off-by: Jani Nikula --- .../drm/i915/display/intel_display_debugfs.c | 219 + drivers/gpu/drm/i915/display/intel_wm.c | 226 ++

[Intel-gfx] [PATCH v3 2/5] drm/i915/wm: warn about ilk_wm_sanitize() on display ver 9+

2023-02-15 Thread Jani Nikula
The sanitization should be limited to PCH split platforms up to display version 8. Warn and bail out otherwise. Signed-off-by: Jani Nikula --- drivers/gpu/drm/i915/display/i9xx_wm.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/display/i9xx_wm.c

[Intel-gfx] [PATCH v3 1/5] drm/i915/wm: move ILK watermark sanitization to i9xx_wm.[ch]

2023-02-15 Thread Jani Nikula
Move sanitize_watermarks() to i9xx_wm.[ch] and rename as ilk_wm_sanitize(). The slightly unfortunate downside is having to expose intel_atomic_check() from intel_display.c, but this declutters intel_display.c nicely. v2: - Move to i9xx_wm.[ch] instead of intel_wm.[ch] (Ville) Cc: Ville Syrjälä

Re: [Intel-gfx] [PATCH] drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjälä wrote: > On Wed, Feb 15, 2023 at 03:15:41PM +0200, Jani Nikula wrote: >> On Wed, 15 Feb 2023, Ville Syrjala wrote: >> > From: Ville Syrjälä >> > >> > Do the ELD hexdumps only up to the last differing byte. >> > The rest is typically all zeroes anyway so not

Re: [Intel-gfx] [PATCH] drm/i915: Include connector id+name in all backlight debugs/errors

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjala wrote: > From: Ville Syrjälä > > With multi panel machines becoming more prominent it's also > important to know which connector's backlight we're talking > about. Include that information in all the backlight debug/error > messages. > > Signed-off-by: Ville

Re: [Intel-gfx] [PATCH v2 1/3] drm/i915: Make backlight setup debugs consistent

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjala wrote: > From: Ville Syrjälä > > It's confusing to debug backlight issues when one can't > easily even tell what kind of backlight control was > selected. Sprinkle uniform debug messages to all the > backlight setup functions. > > Also the one that was already

[Intel-gfx] [PATCH] drm/i915: Include connector id+name in all backlight debugs/errors

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä With multi panel machines becoming more prominent it's also important to know which connector's backlight we're talking about. Include that information in all the backlight debug/error messages. Signed-off-by: Ville Syrjälä --- .../gpu/drm/i915/display/intel_backlight.c

[Intel-gfx] [PATCH v2 1/3] drm/i915: Make backlight setup debugs consistent

2023-02-15 Thread Ville Syrjala
From: Ville Syrjälä It's confusing to debug backlight issues when one can't easily even tell what kind of backlight control was selected. Sprinkle uniform debug messages to all the backlight setup functions. Also the one that was already there (ext_pwm) was using drm_info() for some reason. I

Re: [Intel-gfx] [PATCH] drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Ville Syrjälä
On Wed, Feb 15, 2023 at 03:15:41PM +0200, Jani Nikula wrote: > On Wed, 15 Feb 2023, Ville Syrjala wrote: > > From: Ville Syrjälä > > > > Do the ELD hexdumps only up to the last differing byte. > > The rest is typically all zeroes anyway so not much point > > in dumping it. > > Arguably part of

Re: [Intel-gfx] [PATCH] drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Jani Nikula
On Wed, 15 Feb 2023, Ville Syrjala wrote: > From: Ville Syrjälä > > Do the ELD hexdumps only up to the last differing byte. > The rest is typically all zeroes anyway so not much point > in dumping it. Arguably part of the reason for big dumps is that we use MAX_ELD_BYTES for the size instead of

[Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915: Reduce ELD hex dumps a bit

2023-02-15 Thread Patchwork
== Series Details == Series: drm/i915: Reduce ELD hex dumps a bit URL : https://patchwork.freedesktop.org/series/114051/ State : success == Summary == CI Bug Log - changes from CI_DRM_12742 -> Patchwork_114051v1 Summary ---

  1   2   >