Re: [Intel-gfx] [PATCH v2 2/4] drm/i915: Introduce guard pages to i915_vma

2022-11-23 Thread Andi Shyti
Hi Tvrtko, [...] > > @@ -768,6 +768,9 @@ i915_vma_insert(struct i915_vma *vma, struct > > i915_gem_ww_ctx *ww, > > GEM_BUG_ON(!IS_ALIGNED(alignment, I915_GTT_MIN_ALIGNMENT)); > > GEM_BUG_ON(!is_power_of_2(alignment)); > > + guard = vma->guard; /* retain guard across rebinds */ > > +

[PATCH v2 4/4] Revert "drm/i915: Improve on suspend / resume time with VT-d enabled"

2022-11-22 Thread Andi Shyti
we avoid adding scratch pages to the entire GGTT we don't need this hack anymore. Signed-off-by: Andi Shyti Cc: Thomas Hellström Cc: Chris Wilson Cc: Tvrtko Ursulin --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 69 ++-- drivers/gpu/drm/i915/gt/intel_gtt.h | 24

[PATCH v2 3/4] drm/i915: Refine VT-d scanout workaround

2022-11-22 Thread Andi Shyti
-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 13 +++ drivers/gpu/drm/i915/gt/intel_ggtt.c | 25 +- drivers/gpu/drm/i915/i915_vma.c| 9 3 files changed, 23

[PATCH v2 2/4] drm/i915: Introduce guard pages to i915_vma

2022-11-22 Thread Andi Shyti
Signed-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 14 drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++- drivers/gpu/drm/i915/i915_vma.c | 27 ++-- drivers/gpu/drm/i915

[PATCH v2 1/4] drm/i915: Wrap all access to i915_vma.node.start|size

2022-11-22 Thread Andi Shyti
rapper. The notable exceptions are the selftests that are testing exact behaviour of i915_vma_pin/i915_vma_insert. Signed-off-by: Chris Wilson Signed-off-by: Tejas Upadhyay Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi

[PATCH v2 0/4] Add guard padding around i915_vma

2022-11-22 Thread Andi Shyti
n suspend / resume time with VT-d enabled") Andi Andi Shyti (1): Revert "drm/i915: Improve on suspend / resume time with VT-d enabled" Chris Wilson (3): drm/i915: Wrap all access to i915_vma.node.start|size drm/i915: Introduce guard pages to i915_vma drm/i915: Refine

Re: [PATCH v7 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-15 Thread Andi Shyti
) > spin_unlock_irq(>closed_lock); > } > > -static void force_unbind(struct i915_vma *vma) > +static void force_unbind(struct i915_vma *vma, bool async) I still like the defines on this, they look cleaner, but it's a matter of taste. Reviewed-by: Andi Shyti Andi

Re: [PATCH 0/3] add guard padding around i915_vma

2022-11-10 Thread Andi Shyti
> Just a short heads up on the history. > > /Thomas > > > On Wed, 2022-11-09 at 18:40 +0100, Andi Shyti wrote: > > Hi, > > > > This series adds guards around vma's but setting a pages at the > > beginning and at the end that work as padding. > &g

Re: [PATCH v6 20/20] drm/i915/vm_bind: Async vm_unbind support

2022-11-09 Thread Andi Shyti
Hi Niranjana, ... > -static void force_unbind(struct i915_vma *vma) > +static void force_unbind(struct i915_vma *vma, bool async) > { > if (!drm_mm_node_allocated(>node)) > return; > @@ -1725,7 +1727,21 @@ static void force_unbind(struct i915_vma *vma) >

Re: [PATCH 0/3] add guard padding around i915_vma

2022-11-09 Thread Andi Shyti
Hi Thomas, On Wed, Nov 09, 2022 at 07:03:03PM +0100, Thomas Hellström wrote: > Hi, Andi, > > This has been on the list before (three times I think) and at that > point it (the guard pages) was NAK'd by Daniel as yet another > complication, and a VT-d > scanout workaround was implemented and

[PATCH 0/3] add guard padding around i915_vma

2022-11-09 Thread Andi Shyti
Hi, This series adds guards around vma's but setting a pages at the beginning and at the end that work as padding. The first user of the vma guard are scanout objects which don't need anymore to add scratch to all the unused ggtt's and speeding up up considerably the boot and resume by several

[PATCH 1/3] drm/i915: Wrap all access to i915_vma.node.start|size

2022-11-09 Thread Andi Shyti
rapper. The notable exceptions are the selftests that are testing exact behaviour of i915_vma_pin/i915_vma_insert. Signed-off-by: Chris Wilson Signed-off-by: Tejas Upadhyay Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi

[PATCH 2/3] drm/i915: Introduce guard pages to i915_vma

2022-11-09 Thread Andi Shyti
Signed-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 14 drivers/gpu/drm/i915/i915_gem_gtt.h | 3 ++- drivers/gpu/drm/i915/i915_vma.c | 27 ++-- drivers/gpu/drm/i915

[PATCH 3/3] drm/i915: Refine VT-d scanout workaround

2022-11-09 Thread Andi Shyti
-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 13 +++ drivers/gpu/drm/i915/gt/intel_ggtt.c | 25 +- drivers/gpu/drm/i915/i915_vma.c| 9 3 files changed, 23

Re: [PATCH 0/3] add guard patting around i915_vma

2022-11-09 Thread Andi Shyti
Please ignore, this series is rebased on the wrong branch. Andi On Wed, Nov 09, 2022 at 05:49:10PM +0100, Andi Shyti wrote: > Hi, > > This patch series adds a padding around i915_vma's reducing > consequently the need to add scratch to the unused GGTT. > > This speeds up con

[PATCH 3/3] drm/i915: Refine VT-d scanout workaround

2022-11-09 Thread Andi Shyti
-off-by: Tejas Upadhyay Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 13 +++ drivers/gpu/drm/i915/gt/intel_ggtt.c | 25 +- drivers/gpu/drm/i915/i915_vma.c| 9 3 files changed, 23

[PATCH 2/3] drm/i915: Introduce guard pages to i915_vma

2022-11-09 Thread Andi Shyti
Cc: Matthew Auld Reviewed-by: Matthew Auld Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_ggtt.c | 12 ++-- drivers/gpu/drm/i915/i915_gem_gtt.h | 1 + drivers/gpu/drm/i915/i915_vma.c | 28 ++- drivers/gpu/drm

[PATCH 1/3] drm/i915: Wrap all access to i915_vma.node.start|size

2022-11-09 Thread Andi Shyti
rapper. The notable exceptions are the selftests that are testing exact behaviour of i915_vma_pin/i915_vma_insert. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld Signed-off-by: Tvrtko Ursulin Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/display/intel_dpt.c | 4 +- drivers/g

[PATCH 0/3] add guard patting around i915_vma

2022-11-09 Thread Andi Shyti
Hi, This patch series adds a padding around i915_vma's reducing consequently the need to add scratch to the unused GGTT. This speeds up considerably the boot and resume by several hundreds of milliseconds up to over a full second in slower machines. Andi Chris Wilson (3): drm/i915: Wrap all

Re: [PATCH v5 18/19] drm/i915/vm_bind: Add uapi for user to enable vm_bind_mode

2022-10-28 Thread Andi Shyti
Hi Niranjana, [...] > +/* > + * VM_BIND feature version supported. > + * > + * The following versions of VM_BIND have been defined: > + * > + * 0: No VM_BIND support. > + * > + * 1: In VM_UNBIND calls, the UMD must specify the exact mappings created > + *previously with VM_BIND, the ioctl

Re: [PATCH v2] drm/i915: Fix CFI violations in gt_sysfs

2022-10-27 Thread Andi Shyti
adjust certain functions to match the > type of the ->show() and ->store() members in 'struct kobj_attribute'. > Add a macro to generate functions for that can be called via both > dev_attr_{show,store}() or kobj_attr_{show,store}() so that they can be > called through both kobje

[PATCH v3] drm/i915: Fix CFI violations in gt_sysfs

2022-10-25 Thread Andi Shyti
tr_{show,store}() so that they can be called through both kobject locations without violating kCFI and adjust the attribute groups to account for this. Link: https://github.com/ClangBuiltLinux/linux/issues/1716 Reviewed-by: Andi Shyti Reviewed-by: Andrzej Hajda Reviewed-by: Kees Cook Signed-off-b

Re: [PATCH v4 16/17] drm/i915/vm_bind: userptr dma-resv changes

2022-10-20 Thread Andi Shyti
Hi Niranjana, [...] > @@ -307,6 +307,8 @@ struct i915_vma { > struct list_head non_priv_vm_bind_link; > /* @vm_rebind_link: link to vm_rebind_list and protected by > vm_rebind_lock */ > struct list_head vm_rebind_link; /* Link in vm_rebind_list */ > +

[PATCH] drm/i915/trace: Removed unused frequency trace

2022-10-11 Thread Andi Shyti
Commit 3e7abf814193 ("drm/i915: Extract GT render power state management") removes the "trace_intel_gpu_freq_change()" trace points but their definition was left without users. Remove it. Suggested-by: Tvrtko Ursulin Signed-off-by: Andi Shyti Cc: Chris Wilson ---

Re: [Intel-gfx] [RFC] drm: split build lists one per line and sort

2022-10-11 Thread Andi Shyti
m_atomic.o \ > + drm_atomic_uapi.o \ > + drm_auth.o drm_cache.o \ You forgot to split here and drm_cache.o goes after drm_bridge.o Other than this there are no errors, I checked them all. Reviewed-by: Andi Shyti Andi > + drm_blend.o \ > + drm_bridge.o \ > + drm_client.o \ > + drm_client_modeset.o \ > + drm_color_mgmt.o \ > + drm_connector.o \ > + drm_crtc.o \ [...]

Re: [PATCH v2 10/17] drm/i915/vm_bind: Abstract out common execbuf functions

2022-10-03 Thread Andi Shyti
Hi Niranjana, On Mon, Oct 03, 2022 at 02:06:18PM -0700, Niranjana Vishwanathapura wrote: > On Mon, Oct 03, 2022 at 05:53:37PM +0200, Andi Shyti wrote: > > Hi Niranjana, > > > > [...] > > > > > + for_each_child(ce, child) { > > > +

Re: [Intel-gfx] [PATCH 7/7] drm/i915/hwmon: Extend power/energy for XEHPSDV

2022-10-03 Thread Andi Shyti
> Reviewed-by: Anshuman Gupta This last patch is making me thing that the hwmon should have been under gt rather than under i915. We leave it to a later refactoring. Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 6/7] drm/i915/hwmon: Expose power1_max_interval

2022-10-03 Thread Andi Shyti
Hi Badal, > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > index f9d6d3b08bba..19b9fe3ef237 100644 > --- a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > +++

Re: [Intel-gfx] [PATCH 5/7] drm/i915/hwmon: Expose card reactive critical power

2022-10-03 Thread Andi Shyti
Hi Badal, [...] > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > index 7525db243d74..f9d6d3b08bba 100644 > --- a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > +++

Re: [Intel-gfx] [PATCH 4/7] drm/i915/hwmon: Show device level energy usage

2022-10-03 Thread Andi Shyti
Hi Badal, [...] > > diff --git a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > b/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > index 16e697b1db3d..7525db243d74 100644 > > --- a/Documentation/ABI/testing/sysfs-driver-intel-i915-hwmon > > +++

Re: [Intel-gfx] [PATCH 3/7] drm/i915/hwmon: Power PL1 limit and TDP setting

2022-10-03 Thread Andi Shyti
> + } else { > + val_sku_unit = 0; > + } please remove the brackets here and, just a small nitpick: move val_sky_unit inside the "with_intel_runtime_pm()" and initialize it to '0', you will save the else statement. Other than that: Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 2/7] drm/i915/hwmon: Add HWMON current voltage support

2022-10-03 Thread Andi Shyti
Hi Badal, [...] > static void > hwm_get_preregistration_info(struct drm_i915_private *i915) > { > + struct i915_hwmon *hwmon = i915->hwmon; > + > + if (IS_DG1(i915) || IS_DG2(i915)) why not GRAPHICS_VER(i915) >= 12 here? Andi > + hwmon->rg.gt_perf_status =

Re: [Intel-gfx] [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-10-03 Thread Andi Shyti
k > Signed-off-by: Dale B Stimson > Signed-off-by: Ashutosh Dixit > Signed-off-by: Riana Tauro > Signed-off-by: Badal Nilawar > Acked-by: Guenter Roeck > Reviewed-by: Ashutosh Dixit > Reviewed-by: Anshuman Gupta Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH 1/1] drm/i915: Use GEN12 RPSTAT register

2022-10-03 Thread Andi Shyti
perhaps also in a comment... (continue) > > Thanks. > -- > Ashutosh > > > v2: > > - Fixed review comments(Ashutosh) > > - Added function intel_rps_read_rpstat_fw to read RPSTAT without > > forcewake, required especially for GEN6_RPSTAT1 (Ashutosh, Tv

Re: [PATCH v2 14/17] drm/i915/vm_bind: Expose i915_request_await_bind()

2022-10-03 Thread Andi Shyti
Hi Niranjana, On Sun, Oct 02, 2022 at 11:12:42PM -0700, Niranjana Vishwanathapura wrote: > Rename __i915_request_await_bind() as i915_request_await_bind() > and make it non-static as it will be used in execbuf3 ioctl path. > > Signed-off-by: Niranjana Vishwanathapura Reviewed-by

Re: [PATCH v2 10/17] drm/i915/vm_bind: Abstract out common execbuf functions

2022-10-03 Thread Andi Shyti
Hi Niranjana, [...] > + for_each_child(ce, child) { > + err = intel_context_pin_ww(child, ww); > + GEM_BUG_ON(err);/* perma-pinned should incr a counter */ > + } > + > + for_each_child(ce, child) { > + err = eb_pin_timeline(child, throttle,

Re: [PATCH 08/16] drm/i915/vm_bind: Support persistent vma activeness tracking

2022-09-30 Thread Andi Shyti
SAGE_BOOKKEEP > usage. dma-resv fence list will be updated with this usage > during each submission with this VM in the new execbuf3 > ioctl path. > > Update i915_vma_is_active(), i915_vma_sync() and the > __i915_vma_unbind_async() functions to properly handle > persistent vmas. &g

Re: [Intel-gfx] [PATCH] drm/i915: Fix CFI violations in gt_sysfs

2022-09-29 Thread Andi Shyti
it as it's very easy to get tangled-up in between all those defines: Reviewed-by: Andi Shyti For now I'm quite surprised to see how easily our CI gives green lights :-P On Sat, Sep 24, 2022 at 09:39:30PM -0700, Nathan Chancellor wrote: > On Fri, Sep 23, 2022 at 09:57:47PM -0700, Kees Cook wr

Re: [PATCH 04/16] drm/i915/vm_bind: Add support to create persistent vma

2022-09-28 Thread Andi Shyti
tion > of VA space. Hence, it do not support aliasing. ie., multiple > mappings (at different VA) point to the same gtt_view of object. > Skip vma_lookup for persistent vmas to support aliasing. > > Signed-off-by: Niranjana Vishwanathapura > Signed-off-by: Andi Shyti > --- &

Re: [Intel-gfx] [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-09-21 Thread Andi Shyti
Hi Badal, > > > +struct hwm_reg { > > > +}; > > > + > > > +struct hwm_drvdata { > > > + struct i915_hwmon *hwmon; > > > + struct intel_uncore *uncore; > > > + struct device *hwmon_dev; > > > + char name[12]; > > > +}; > > > + > > > +struct i915_hwmon { > > > + struct hwm_drvdata ddat; > > > +

Re: [Intel-gfx] [PATCH 1/7] drm/i915/hwmon: Add HWMON infrastructure

2022-09-21 Thread Andi Shyti
Hi Badal, > +struct hwm_reg { > +}; > + > +struct hwm_drvdata { > + struct i915_hwmon *hwmon; > + struct intel_uncore *uncore; > + struct device *hwmon_dev; > + char name[12]; > +}; > + > +struct i915_hwmon { > + struct hwm_drvdata ddat; > + struct mutex hwmon_lock;

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Andi Shyti
Hi Matt, Lucas, thanks for your feedback, > > > + switch (gms) { > > > + case 0x0 ... 0x10: > > > + return gms * 32; > > > + case 0x20: > > > + return 1024; > > > + case 0x30: > > > + return 1536; > > > + case 0x40: > > > + return 2048; > > > + case 0xf0 ... 0xfe:

Re: [Intel-gfx] [PATCH 1/1] drm/i915/mtl: enable local stolen memory

2022-09-20 Thread Andi Shyti
Hi Aravind, > +static int get_mtl_gms_size(struct intel_uncore *uncore) > +{ > + u16 ggc, gms; > + > + ggc = intel_uncore_read16(uncore, _MMIO(0x108040)); > + > + /* check GGMS, should be fixed 0x3 (8MB) */ > + if ((ggc & 0xc0) != 0xc0) > + return -EIO; > + > + /*

Re: [Intel-gfx] [PATCH 1/2] drm/i915/mtl: Modify CAGF functions for MTL

2022-09-19 Thread Andi Shyti
Hi Badal, On Mon, Sep 19, 2022 at 05:29:05PM +0530, Badal Nilawar wrote: > Updated the CAGF functions to get actual resolved frequency of > 3D and SAMedia can you please use the imperative form? "Update" and not "Updated". Besides I don't really understand what you did from the commit, can you

Re: [PATCH v3 0/2] drm/i915/gem: Really move i915_gem_context.link under ref protection

2022-09-19 Thread Andi Shyti
Pushed, Thanks! Andi On Fri, Sep 16, 2022 at 11:24:01AM +0200, Janusz Krzysztofik wrote: > i915_perf assumes that it can use the i915_gem_context reference to > protect its i915->gem.contexts.list iteration. However, this requires > that we do not remove the context from the list until after we

Re: [Intel-gfx] [PATCH v2 4/4] drm/i915: Handle all GTs on driver (un)load paths

2022-09-16 Thread Andi Shyti
ually known to the driver. > > To accomplish this we need to sprinkle a lot of for_each_gt calls around > but is otherwise pretty un-eventuful. > > v2: > - Consolidate adjacent GT loops in a couple places. (Daniele) > > Cc: Daniele Ceraolo Spurio > Signed-off-by: Tvrtko Ursu

Re: [Intel-gfx] [PATCH 0/4] Further multi-gt handling

2022-09-15 Thread Andi Shyti
Hi Jani, On Thu, Sep 15, 2022 at 03:25:15PM +0300, Jani Nikula wrote: > On Wed, 14 Sep 2022, Matt Roper wrote: > > Now that MTL is going to start providing two GTs, there are a few more > > places in the driver that need to iterate over each GT instead of > > operating directly on gt0. Also

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Make GEM suspend all GTs

2022-09-15 Thread Andi Shyti
Hi Matt, On Wed, Sep 14, 2022 at 03:04:26PM -0700, Matt Roper wrote: > From: Tvrtko Ursulin > > Walk all GTs when suspending. > > Signed-off-by: Tvrtko Ursulin > Signed-off-by: Matt Roper I had this as well... thanks again! Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Make GEM resume all engines

2022-09-15 Thread Andi Shyti
Hi Matt, On Wed, Sep 14, 2022 at 03:04:25PM -0700, Matt Roper wrote: > From: Tvrtko Ursulin > > Walk all GTs from i915_gem_resume when resuming engines. > > Cc: Andi Shyti > Signed-off-by: Tvrtko Ursulin > Signed-off-by: Matt Roper I had this (and others) in my multi-

Re: [Intel-gfx] [PATCH v1 1/1] drm/i915: Skip applying copy engine fuses

2022-09-12 Thread Andi Shyti
Hi Lucas, On Mon, Sep 12, 2022 at 11:12:47AM -0700, Lucas De Marchi wrote: > On Mon, Sep 12, 2022 at 06:59:53PM +0200, Andi Shyti wrote: > > Hi Lucas, > > > > On Mon, Sep 12, 2022 at 09:19:38AM -0700, Lucas De Marchi wrote: > > > Support for reading the fuses t

Re: [Intel-gfx] [PATCH v1 1/1] drm/i915: Skip applying copy engine fuses

2022-09-12 Thread Andi Shyti
LL(i915) >= IP_VER(12, 60) && > + GRAPHICS_VER_FULL(i915) < IP_VER(12, 70))) > + return; > + Isn't it easier if you wrote if (GRAPHICS_VER_FULL(i915) < IP_VER(12, 60) || GRAPHICS_VER_FULL(i915) >= IP_VER(12, 70))

Re: [PATCH v10 3/9] compiler_types.h: Add assert_type to catch type mis-match while compiling

2022-09-12 Thread Andi Shyti
Hi Rasmus, Thanks for dropping in, [...] > >> + * @t1: data type or variable > >> + * @t2: data type or variable > >> + * > >> + * The first and second arguments can be data types or variables or mixed > >> (the > >> + * first argument is the data type and the second argument is variable or >

Re: [PATCH v3 35/37] drm/i915: add descriptions for some RPM macros at intel_gt_pm.h

2022-09-11 Thread Andi Shyti
Hi Mauro, [...] > +/** > + * intel_gt_pm_is_awake: Query whether the runtime PM is awake held > + * > + * @gt: pointer to the graphics engine ... > +/** > + * intel_gt_pm_get: grab a runtime PM reference ensuring that GT is powered > up > + * @gt: pointer to the graphics engine ... > +/** >

Re: [PATCH v3 33/37] drm/i915 i915_gem_object_types.h: document struct i915_lut_handle

2022-09-11 Thread Andi Shyti
Hi Mauro, On Fri, Sep 09, 2022 at 09:34:40AM +0200, Mauro Carvalho Chehab wrote: > commit d1b48c1e7184 ("drm/i915: Replace execbuf vma ht with an idr") > added a rbtree list to allow searching for obj/ctx. > > Document it. > > Reviewed-by: Rodrigo Vivi > Signed-off-by: Mauro Carvalho Chehab >

Re: [PATCH v3 19/37] drm/i915: stop using kernel-doc markups for something else

2022-09-11 Thread Andi Shyti
el-doc markups. > > Reviewed-by: Rodrigo Vivi > Signed-off-by: Mauro Carvalho Chehab nice cleanup! Reviewed-by: Andi Shyti Thanks, Andi > --- > > To avoid mailbombing on a large number of people, only mailing lists were C/C > on the cover. > See [PATCH v3 00/37] at: &g

Re: [PATCH v3 17/37] drm/i915: i915_gem_wait.c: fix a kernel-doc markup

2022-09-11 Thread Andi Shyti
by: Mauro Carvalho Chehab Reviewed-by: Andi Shyti Andi > --- > > To avoid mailbombing on a large number of people, only mailing lists were C/C > on the cover. > See [PATCH v3 00/37] at: > https://lore.kernel.org/all/cover.1662708705.git.mche...@kernel.org/ > > dri

Re: [PATCH v10 3/9] compiler_types.h: Add assert_type to catch type mis-match while compiling

2022-09-11 Thread Andi Shyti
s the second argument. > > Suggested-by: Kees Cook > Signed-off-by: Gwan-gyeong Mun > Cc: Thomas Hellström > Cc: Matthew Auld > Cc: Nirmoy Das > Cc: Jani Nikula > Cc: Andi Shyti > Cc: Mauro Carvalho Chehab > Cc: Andrzej Hajda > Cc: K

Re: [PATCH v10 1/9] overflow: Allow mixed type arguments

2022-09-11 Thread Andi Shyti
Hi Kees, On Fri, Sep 09, 2022 at 07:59:05PM +0900, Gwan-gyeong Mun wrote: > From: Kees Cook > > When the check_[op]_overflow() helpers were introduced, all arguments were > required to be the same type to make the fallback macros simpler. However, > now that the fallback macros have been

[RFC PATCH v3 11/17] drm/i915: Add i915_vma_is_bind_complete()

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Add i915_vma_is_bind_complete() to check if the binding of a of the VM of a specific VMA is complete. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/i915_vma.c | 28

[RFC PATCH v3 15/17] drm/i915: Extend getparm for VM_BIND capability

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Add getparam support for VM_BIND capability version support. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/i915_getparam.c | 3 +++ include/uapi/drm/i915_drm.h | 21

[RFC PATCH v3 14/17] drm/i915/vm_bind: Skip vma_lookup for persistent vmas

2022-08-27 Thread Andi Shyti
Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/display/intel_fb_pin.c | 2 +- .../drm/i915/display/intel_plane_initial.c| 2 +- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 4 +- .../drm/i915/gem/i915_gem_vm_bind_object.c| 2 +- .../gpu

[RFC PATCH v3 17/17] drm/i915: Enable execbuf3 ioctl for vm_bind

2022-08-27 Thread Andi Shyti
C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/i915_driver.c | 1 + include/uapi/drm/i915_drm.h| 2 ++ 2 files changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_driver.c b/drivers/gpu/drm/i915/i915_driver.c index 841b5d62c2c01..f3b0bbfbe9746 100644 --- a/drivers/gpu

[RFC PATCH v3 16/17] drm/i915/ioctl: Enable the vm_bind/unbind ioctls

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Add ioctls to enable the vm_bind and vm_unbind feature Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/i915_driver.c | 2 ++ include/uapi/drm/i915_drm.h| 4 2 files changed

[RFC PATCH v3 13/17] drm/i915/vm_bind: userptr dma-resv changes

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura For persistent (vm_bind) vmas of userptr BOs, handle the user page pinning by using the i915_gem_object_userptr_submit_init() /done() functions Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- .../gpu/drm/i915

[RFC PATCH v3 12/17] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Handle persistent (VM_BIND) mappings during the request submission in the execbuf3 path. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- .../gpu/drm/i915/gem/i915_gem_execbuffer3.c | 200

[RFC PATCH v3 08/17] drm/i915/vm_bind: Add out fence support

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Add support for handling out fence of vm_bind call. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_vm_bind.h | 3 + .../drm/i915/gem/i915_gem_vm_bind_object.c| 82

[RFC PATCH v3 10/17] drm/i915/vm_bind: Implement I915_GEM_EXECBUFFER3 ioctl

2022-08-27 Thread Andi Shyti
been requested by the userspace before submitting the execbuf3. And the legacy support like relocations etc are removed. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/Makefile |1 + .../gpu/drm/i915/gem

[RFC PATCH v3 01/17] drm/i915: Expose vm_lookup in i915_gem_context.h

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura To reuse i915_gem_vm_lookup in upcoming implementation, expose it in i915_gem_context.h Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 11 ++- drivers

[RFC PATCH v3 07/17] drm/i915/vm_bind: Handle persistent vmas

2022-08-27 Thread Andi Shyti
Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_object.c| 1 + .../drm/i915/gem/i915_gem_vm_bind_object.c| 8 +++ drivers/gpu/drm/i915/gt/intel_gtt.c | 2 + drivers/gpu/drm/i915/gt/intel_gtt.h | 4 ++ drivers

[RFC PATCH v3 09/17] drm/i915: Do not support vm_bind mode in execbuf2

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Do not support the vm in vm_bind_mode in execbuf2 ioctl. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 5 + 1 file changed, 5 insertions(+) diff --git

[RFC PATCH v3 06/17] drm/i915/dmabuf: Deny the dmabuf export for VM private BOs

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura VM private BOs can be only mapped on specified VM and cannot be dmabuf exported. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 6 ++ 1 file changed, 6

[RFC PATCH v3 05/17] drm/i915: Support for VM private BOs

2022-08-27 Thread Andi Shyti
, in the execbuf path. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_object_types.h | 3 +++ drivers/gpu/drm/i915/gem/i915_gem_vm_bind_object.c | 9 + drivers/gpu/drm/i915/gt/intel_gtt.c| 4

[RFC PATCH v3 04/17] drm/i915: Implement bind and unbind of object

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura Implement the bind and unbind of an object at the specified GPU virtual addresses. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Prathap Kumar Valsan Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/Makefile

[RFC PATCH v3 03/17] drm/i915/gem: expose i915_gem_object_max_page_size() in i915_gem_object.h

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura To reuse i915_gem_object_max_page_size() in upcoming implementation, expose it in i915_gem_object.h Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_create.c | 16

[RFC PATCH v3 02/17] drm/i915: Mark vm for vm_bind usage at creation

2022-08-27 Thread Andi Shyti
From: Niranjana Vishwanathapura At vm creation time, add a flag to indicate that the new vm will use vm_bind only for object binding. Signed-off-by: Niranjana Vishwanathapura Signed-off-by: Ramalingam C Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_context.c | 5

[RFC PATCH v3 00/17] drm/i915/vm_bind: Add VM_BIND functionality

2022-08-27 Thread Andi Shyti
Hi, just sending the original Niranjana's patch as an RFC. It's v3 as the v2 has been reviewed offline with Ramalingam. I'm still keeping most of the structure even though some further discussion can be done starting from here. Copy pasting Niranjana's original cover letter message:

Re: [PATCH v7 1/8] overflow: Move and add few utility macros into overflow

2022-08-17 Thread Andi Shyti
> Cc: Thomas Hellström > Cc: Matthew Auld > Cc: Nirmoy Das > Cc: Jani Nikula > Cc: Andi Shyti > Reviewed-by: Mauro Carvalho Chehab (v5) > --- > drivers/gpu/drm/i915/i915_utils.h | 5 +-- > include/linux/overflow.h | 54 +++ > 2

Re: [Intel-gfx] [PATCH v3 1/3] drm/i915: pass a pointer for tlb seqno at vma_invalidate_tlb()

2022-08-08 Thread Andi Shyti
Hi Rodrigo, On Mon, Aug 08, 2022 at 03:04:13PM -0400, Rodrigo Vivi wrote: > On Mon, Aug 08, 2022 at 06:37:58PM +0200, Andi Shyti wrote: > > Hi Mauro, > > > > On Thu, Aug 04, 2022 at 09:37:22AM +0200, Mauro Carvalho Chehab wrote: > > > WRITE_ONCE() sho

Re: [PATCH v3 3/3] drm/i915/gt: document TLB cache invalidation functions

2022-08-08 Thread Andi Shyti
Hi Mauro, On Thu, Aug 04, 2022 at 09:37:24AM +0200, Mauro Carvalho Chehab wrote: > Add a description for the TLB cache invalidation algorithm and for > the related kAPI functions. > > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andi Shyti Andi

Re: [PATCH v3 1/3] drm/i915: pass a pointer for tlb seqno at vma_invalidate_tlb()

2022-08-08 Thread Andi Shyti
Hi Mauro, On Thu, Aug 04, 2022 at 09:37:22AM +0200, Mauro Carvalho Chehab wrote: > WRITE_ONCE() should happen at the original var, not on a local > copy of it. > > Fixes: 5d36acb7198b ("drm/i915/gt: Batch TLB invalidations") > Signed-off-by: Mauro Carvalho Chehab

Re: [PATCH v3 3/3] drm/i915/gt: document TLB cache invalidation functions

2022-08-05 Thread Andi Shyti
Hi Randy, > > +/** > > + * intel_gt_invalidate_tlb_full - do full TLB cache invalidation > > + * @gt: GT structure > > In multiple places (here and below) it would be nice to know what a > GT structure is. I looked thru multiple C and header files yesterday > and didn't find any comments about

Re: [Intel-gfx] [PATCH v5 1/7] drm: Move and add a few utility macros into drm util header

2022-08-04 Thread Andi Shyti
Hi Jani, > >> It moves overflows_type utility macro into drm util header from i915_utils > >> header. The overflows_type can be used to catch the truncation between data > >> types. And it adds safe_conversion() macro which performs a type conversion > >> (cast) of an source value into a new

Re: [PATCH v2 1/2] drm/i915/gt: Move TLB invalidation to its own file

2022-08-03 Thread Andi Shyti
gt; Signed-off-by: Mauro Carvalho Chehab I already reviewed this patch... anyway I checked it again and it's all correct. Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH v3 0/6] drm/i915: reduce TLB performance regressions

2022-07-28 Thread Andi Shyti
Hi Mauro, Pushed in drm-intel-gt-next. Thanks, Andi On Wed, Jul 27, 2022 at 02:29:50PM +0200, Mauro Carvalho Chehab wrote: > Doing TLB invalidation cause performance regressions, like: > [424.370996] i915 :00:02.0: [drm] *ERROR* rcs0 TLB invalidation did > not complete in 4ms! > >

Re: [PATCH v3 5/6] drm/i915/gt: Batch TLB invalidations

2022-07-27 Thread Andi Shyti
Hi Mauro, I think there are still some unanswered questions from Tvrtko on this patch, am I right? Andi On Wed, Jul 27, 2022 at 02:29:55PM +0200, Mauro Carvalho Chehab wrote: > From: Chris Wilson > > Invalidate TLB in batches, in order to reduce performance regressions. > > Currently, every

Re: [Intel-gfx] [PATCH v3 6/6] drm/i915/gt: describe the new tlb parameter at i915_vma_resource

2022-07-27 Thread Andi Shyti
d - Unbind a vma resource > * @vma_res: The vma resource to unbind. > + * @tlb: pointer to vma->obj->mm.tlb associated with the resource > + *to be stored at vma_res->tlb. When not-NULL, it will be used > + * to do TLB cache invalidation before freeing a VMA resource. > + *used only for async unbind. /used/Used/ With that: Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH v3 2/6] drm/i915/gt: document with_intel_gt_pm_if_awake()

2022-07-27 Thread Andi Shyti
Hi Mauro, > Add a kernel-doc markup to document this new macro. > > Reviewed-by: Tvrtko Ursulin > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH v5 1/7] drm: Move and add a few utility macros into drm util header

2022-07-27 Thread Andi Shyti
Hi, On Mon, Jul 25, 2022 at 12:25:22PM +0300, Gwan-gyeong Mun wrote: > It moves overflows_type utility macro into drm util header from i915_utils > header. The overflows_type can be used to catch the truncation between data > types. And it adds safe_conversion() macro which performs a type

Re: [PATCH v2 08/21] drm/i915/gt: Move TLB invalidation to its own file

2022-07-22 Thread Andi Shyti
gt; Signed-off-by: Mauro Carvalho Chehab Just a copy paste, I checked line by line and it looked all correct: Reviewed-by: Andi Shyti Thanks, Andi

Re: [PATCH v2 05/21] drm/i915/gt: Skip TLB invalidations once wedged

2022-07-22 Thread Andi Shyti
nger has access to the TLB's in each engine. > > That helps to reduce the performance regression introduced by TLB > invalidate logic. > > Cc: sta...@vger.kernel.org > Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") > Signed-off-by: Chris Wil

Re: [PATCH v2 04/21] drm/i915/gt: Only invalidate TLBs exposed to user manipulation

2022-07-22 Thread Andi Shyti
> Signed-off-by: Chris Wilson > Cc: Fei Yang > Cc: Andi Shyti > Acked-by: Thomas Hellström > Signed-off-by: Mauro Carvalho Chehab Please, once you have sorted out Tvrtko's question you can add: Reviewed-by: Andi Shyti Thanks, Andi

Re: [PATCH v2 03/21] drm/i915/gt: Invalidate TLB of the OA unit at TLB invalidations

2022-07-22 Thread Andi Shyti
er.kernel.org > Fixes: 7938d61591d3 ("drm/i915: Flush TLBs before releasing backing store") > Signed-off-by: Chris Wilson > Cc: Fei Yang > Cc: Andi Shyti > Acked-by: Thomas Hellström > Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Andi Shyti Thanks, Andi

Re: [PATCH v2 01/21] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-07-22 Thread Andi Shyti
ing store") > Signed-off-by: Chris Wilson > Cc: Fei Yang > Cc: Andi Shyti > Cc: Thomas Hellström > Signed-off-by: Mauro Carvalho Chehab For me it's good, but please, sort out with Tvrtko about his doubts: Reviewed-by: Andi Shyti Andi > --- > > To avoi

Re: [PATCH] drm/i915/selftests: Fix comment typo

2022-07-21 Thread Andi Shyti
would be [PATCH v2] > 3. please add a changelog, as this is a single patch, do it > after the '---' > > No need to resend, just keep the three notes in mind for your > next patches. Anyway, thanks for the fix and as I am at it: > > Reviewed-by: Andi Shyti Pushed in drm-intel-next. Thanks, Andi

Re: [PATCH] drm/i915/selftests: Fix comment typo

2022-07-21 Thread Andi Shyti
lease add a changelog, as this is a single patch, do it after the '---' No need to resend, just keep the three notes in mind for your next patches. Anyway, thanks for the fix and as I am at it: Reviewed-by: Andi Shyti Thanks, Andi > --- > drivers/gpu/drm/i915/selftests/i915_request.c | 2 +- &g

[PATCH] drm/doc/rfc: VM_BIND fix a few grammatical slip-ups and typos

2022-07-11 Thread Andi Shyti
Just a trivial review of an the vm bind document that is still an rfc document. Signed-off-by: Andi Shyti --- Hi, I'm not a big fan of this kind of patches, but while reading and reviewing this document I spotted few potential grammatical fixes. Andi Documentation/gpu/rfc/i915_vm_bind.rst

Re: [Intel-gfx] [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl

2022-07-07 Thread Andi Shyti
Hi, > It seems we are duplicating a lot of code from i915_execbuffer.c. Did > you consider yeah... while reading the code I was thinking the same then I see that you made the same comment. Perhaps we need to group commonalities and make common library for execbuf 2 and 3. Andi

Re: [Intel-gfx] [RFC 02/10] drm/i915/vm_bind: Bind and unbind mappings

2022-07-06 Thread Andi Shyti
Hi, [...] > > @@ -28,7 +28,6 @@ static u32 object_max_page_size(struct > > intel_memory_region **placements, > > max_page_size = max_t(u32, max_page_size, mr- > > >min_page_size); > > } > >   > > -   GEM_BUG_ON(!max_page_size); > > return max_page_size; > >  }

Re: [Intel-gfx] [RFC 01/10] drm/i915/vm_bind: Introduce VM_BIND ioctl

2022-07-06 Thread Andi Shyti
Hi, [...] > > +/* > > + * VM_BIND feature version supported. > > + * > > + * The following versions of VM_BIND have been defined: > > + * > > + * 0: No VM_BIND support. > > + * > > + * 1: In VM_UNBIND calls, the UMD must specify the exact mappings > > created > > + *    previously with VM_BIND,

Re: [PATCH] drm/i915/gem: Really move i915_gem_context.link under ref protection

2022-07-06 Thread Andi Shyti
Hi, [...] > @@ -1265,10 +1264,15 @@ static void i915_gem_context_release_work(struct > work_struct *work) > struct i915_gem_context *ctx = container_of(work, typeof(*ctx), > release_work); > struct i915_address_space *vm; > +

<    3   4   5   6   7   8   9   10   11   >