[Intel-gfx] [PATCH v4 0/2] Introduce multitile support

2022-01-17 Thread Andi Shyti
en used manually. v1 -> v2 - fixed a couple of coding style issues in patch 2. Andi Shyti (1): drm/i915/gt: make a gt sysfs group and move power management files Tvrtko Ursulin (1): drm/i915: Prepare for multiple GTs drivers/gpu/drm/i915/Makefile | 4 +- drivers/gpu/drm

[Intel-gfx] [PATCH v4 1/2] drm/i915: Prepare for multiple GTs

2022-01-17 Thread Andi Shyti
ure is in place to handle them. Signed-off-by: Abdiel Janulgue Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Signed-off-by: Andi Shyti Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matt Roper --- drivers/gpu/dr

[Intel-gfx] [PATCH v4 2/2] drm/i915/gt: make a gt sysfs group and move power management files

2022-01-17 Thread Andi Shyti
gt0/ ├── gt_RP0_freq_mhz| └── gt_RP1_freq_mhz| └── gt_RPn_freq_mhz -+ As soon as multitile platforms will start being supported, this interface will allow to control the power (either manually or with tools) on each tile, instead of affecting only tile 0 and getting incomplete re

Re: [Intel-gfx] [PATCH v4 1/2] drm/i915: Prepare for multiple GTs

2022-01-17 Thread Andi Shyti
Hi Michal, > please find few late nits below thanks for the comments! > > On a multi-tile platform, each tile has its own registers + GGTT > > space, and BAR 0 is extended to cover all of them. > > > > Up to four gts are supported in i915->gt[], with slot zero > > s/gts/GTs (to match as below)

Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/gt: make a gt sysfs group and move power management files

2022-01-17 Thread Andi Shyti
Hi Michal, > > /sys/.../card0 > > ├── gt > > │   ├── gt0 > > │   │   ├── id > > │   │   ├── rc6_enable > > │   │   ├── rc6_residency_ms > > │   │   ├── rps_act_freq_mhz > > │   │   ├── rps_boost_freq_mhz > > │   │   ├── rps_cu

Re: [Intel-gfx] [PATCH] drm/i915/debugfs: Do not return '0' if there is nothing to return

2022-01-17 Thread Andi Shyti
Ping... Lucas, do you mind merging this trivial refactoring? Thanks, Andi On Sat, Nov 27, 2021 at 03:17:15AM +0200, Andi Shyti wrote: > Change functions that always return '0' to be void type. > > Signed-off-by: Andi Shyti > Cc: Maciej Patelczyk > --- &

Re: [Intel-gfx] [PATCH v4 2/2] drm/i915/gt: make a gt sysfs group and move power management files

2022-01-18 Thread Andi Shyti
Hi Tvrtko, > > +bool is_object_gt(struct kobject *kobj) > > Not sure if you will need it exported in a later patch but for now it seems > only users are local to this file. it is actually used by sysfs_gt.c and sysfs_gt_pm.c. Thank you, Andi PS. in this v4 I forgot to replace many drm_err() wi

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915/gt: make a gt sysfs group and move power management files

2022-01-19 Thread Andi Shyti
Hi Joonas, > > > The GT has its own properties and in sysfs they should be grouped > > > in the 'gt/' directory. > > > > > > Create a 'gt/' directory in sysfs which will contain gt0...gtN > > > directories related to each tile configured in the GPU. Move the > > > power management files inside th

Re: [Intel-gfx] [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-13 Thread Andi Shyti
Hi Andrzej, I'm sorry, but I'm not fully understanding, > > > > +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev, > > > > + const char *name) > > > > +{ > > > > + struct kobject *kobj = &dev->kobj; > > > > + > > > > + /* > > > >

Re: [Intel-gfx] [PATCH v5 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-13 Thread Andi Shyti
> > > > > +struct intel_gt *intel_gt_sysfs_get_drvdata(struct device *dev, > > > > > + const char *name) > > > > > +{ > > > > > + struct kobject *kobj = &dev->kobj; > > > > > + > > > > > + /* > > > > > + * We are interested at knowing from where

Re: [Intel-gfx] [PATCH v5 5/7] drm/i915/gt: Create per-tile RC6 sysfs interface

2022-03-13 Thread Andi Shyti
Hi Andrzej, > > Now tiles have their own sysfs interfaces under the gt/ > > directory. Because RC6 is a property that can be configured on a > > tile basis, then each tile should have its own interface > > > > The new sysfs structure will have a similar layout for the 4 tile > > case: > > > > /s

Re: [Intel-gfx] [PATCH v5 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-03-13 Thread Andi Shyti
Hi Andrzej, [...] > > +static ssize_t act_freq_mhz_show(struct device *dev, > > +struct device_attribute *attr, char *buff) > > +{ > > + s64 actual_freq = sysfs_gt_attribute_r_func(dev, attr, > > + __act_freq_mhz_show); >

Re: [Intel-gfx] [PATCH v5 7/7] drm/i915/gt: Adding new sysfs frequency attributes

2022-03-13 Thread Andi Shyti
Hi Michal, [...] > > +static ssize_t punit_req_freq_mhz_show(struct device *dev, > > + struct device_attribute *attr, > > + char *buff) > > +{ > > + struct intel_gt *gt = intel_gt_sysfs_get_drvdata(dev, attr->attr.name); > > +

[Intel-gfx] [PATCH v6 0/7] Introduce multitile support

2022-03-17 Thread Andi Shyti
line. and some other minor refactoring. v2 -> v3 - Added Matt and Sujaritha's r-b for patch 1 and 2. - Reworded the commit of patch 2 to underline the fact that the interface is useful also when used manually. v1 -> v2 - fixed a couple of coding style issues in patc

[Intel-gfx] [PATCH v6 1/7] drm/i915: Rename INTEL_REGION_LMEM with INTEL_REGION_LMEM_0

2022-03-17 Thread Andi Shyti
With the upcoming multitile support each tile will have its own local memory. Mark the current LMEM with the suffix '0' to emphasise that it belongs to the root tile. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --

[Intel-gfx] [PATCH v6 2/7] drm/i915/gt: add gt_is_root() helper

2022-03-17 Thread Andi Shyti
The "gt_is_root(struct intel_gt *gt)" helper return true if the gt is the root gt, which means that its id is 0. Return false otherwise. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/

[Intel-gfx] [PATCH v6 3/7] drm/i915: Prepare for multiple GTs

2022-03-17 Thread Andi Shyti
ure is in place to handle them. Signed-off-by: Abdiel Janulgue Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Signed-off-by: Andi Shyti Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matt Roper --- drivers/gpu/dr

[Intel-gfx] [PATCH v6 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-17 Thread Andi Shyti
interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvrtko Ursulin Reviewed-by: Sujaritha Sundaresan --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt.c

[Intel-gfx] [PATCH v6 5/7] drm/i915/gt: Create per-tile RC6 sysfs interface

2022-03-17 Thread Andi Shyti
the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvr

[Intel-gfx] [PATCH v6 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-03-17 Thread Andi Shyti
is not really adding exposing new interfaces (new ABI) other than adapting the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson

[Intel-gfx] [PATCH v6 7/7] drm/i915/gt: Adding new sysfs frequency attributes

2022-03-17 Thread Andi Shyti
- throttle_reason_prochot - throttle_reason_ratl - throttle_reason_vr_thermalert - throttle_reason_vr_tdc Signed-off-by: Sujaritha Sundaresan Cc: Dale B Stimson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 74 + drivers/gpu/drm/i915

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for Introduce multitile support

2022-03-18 Thread Andi Shyti
> • igt@i915_selftest@mock@requests: > > □ shard-kbl: PASS -> DMESG-FAIL > > □ shard-tglb: PASS -> DMESG-FAIL > > □ shard-apl: PASS -> DMESG-FAIL > > □ shard-glk: PASS -> DMESG-FAIL > > □ shard-skl: PASS -> DMESG-FAIL > > □ shard-snb: PASS -> DMESG-FAIL >

Re: [Intel-gfx] [PATCH v6 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-18 Thread Andi Shyti
On Fri, Mar 18, 2022 at 01:19:18PM +, Matthew Auld wrote: > On 18/03/2022 02:10, Andi Shyti wrote: > > Now that we have tiles we want each of them to have its own > > interface. A directory "gt/" is created under "cardN/" that will > > contain as many

Re: [Intel-gfx] ✗ Fi.CI.IGT: failure for Introduce multitile support

2022-03-18 Thread Andi Shyti
Hi Matt and Tvrtko, > On 18/03/2022 13:25, Matthew Auld wrote: > > On Fri, 18 Mar 2022 at 08:18, Andi Shyti wrote: > > > > > > >• igt@i915_selftest@mock@requests: > > > > > > > >□ shard-kbl: PASS -> DMESG-FAIL

[Intel-gfx] [PATCH v6 0/7] Introduce multitile support

2022-03-18 Thread Andi Shyti
line. and some other minor refactoring. v2 -> v3 - Added Matt and Sujaritha's r-b for patch 1 and 2. - Reworded the commit of patch 2 to underline the fact that the interface is useful also when used manually. v1 -> v2 - fixed a couple of coding style issues in patc

[Intel-gfx] [PATCH v6 1/7] drm/i915: Rename INTEL_REGION_LMEM with INTEL_REGION_LMEM_0

2022-03-18 Thread Andi Shyti
With the upcoming multitile support each tile will have its own local memory. Mark the current LMEM with the suffix '0' to emphasise that it belongs to the root tile. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --

[Intel-gfx] [PATCH v6 2/7] drm/i915/gt: add gt_is_root() helper

2022-03-18 Thread Andi Shyti
The "gt_is_root(struct intel_gt *gt)" helper return true if the gt is the root gt, which means that its id is 0. Return false otherwise. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/

[Intel-gfx] [PATCH v6 3/7] drm/i915: Prepare for multiple GTs

2022-03-18 Thread Andi Shyti
ure is in place to handle them. Signed-off-by: Abdiel Janulgue Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Signed-off-by: Andi Shyti Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matt Roper --- drivers/gpu/dr

[Intel-gfx] [PATCH v6 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-18 Thread Andi Shyti
interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvrtko Ursulin Reviewed-by: Sujaritha Sundaresan --- drivers/gpu/drm/i915/Makefile| 1 + drivers/gpu/drm/i915/gt/intel_gt.c

[Intel-gfx] [PATCH v6 5/7] drm/i915/gt: Create per-tile RC6 sysfs interface

2022-03-18 Thread Andi Shyti
the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvr

[Intel-gfx] [PATCH v6 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-03-18 Thread Andi Shyti
is not really adding exposing new interfaces (new ABI) other than adapting the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson

[Intel-gfx] [PATCH v6 7/7] drm/i915/gt: Adding new sysfs frequency attributes

2022-03-18 Thread Andi Shyti
- throttle_reason_prochot - throttle_reason_ratl - throttle_reason_vr_thermalert - throttle_reason_vr_tdc Signed-off-by: Sujaritha Sundaresan Cc: Dale B Stimson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 74 + drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v6 0/7] Introduce multitile support

2022-03-18 Thread Andi Shyti
Arghhh Sorry for spamming! I sent the wrong series! Please ignore this. Andi On Sat, Mar 19, 2022 at 12:46:33AM +0200, Andi Shyti wrote: > Hi, > > This is the second series that prepares i915 to host multitile > platforms. It introduces the for_each_gt() macro that loops over

[Intel-gfx] [PATCH v7 1/7] drm/i915: Rename INTEL_REGION_LMEM with INTEL_REGION_LMEM_0

2022-03-18 Thread Andi Shyti
With the upcoming multitile support each tile will have its own local memory. Mark the current LMEM with the suffix '0' to emphasise that it belongs to the root tile. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --

[Intel-gfx] [PATCH v7 2/7] drm/i915/gt: add gt_is_root() helper

2022-03-18 Thread Andi Shyti
The "gt_is_root(struct intel_gt *gt)" helper return true if the gt is the root gt, which means that its id is 0. Return false otherwise. Suggested-by: Michal Wajdeczko Signed-off-by: Andi Shyti Reviewed-by: Michal Wajdeczko Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/

[Intel-gfx] [PATCH v7 0/7] Introduce multitile support

2022-03-18 Thread Andi Shyti
or patch 1 and 2. - Reworded the commit of patch 2 to underline the fact that the interface is useful also when used manually. v1 -> v2 - fixed a couple of coding style issues in patch 2. Andi Shyti (5): drm/i915: Rename INTEL_REGION_LMEM with INTEL_REGION_LMEM_0 drm/i915/gt: add gt_i

[Intel-gfx] [PATCH v7 3/7] drm/i915: Prepare for multiple GTs

2022-03-18 Thread Andi Shyti
ure is in place to handle them. Signed-off-by: Abdiel Janulgue Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Tvrtko Ursulin Signed-off-by: Matt Roper Signed-off-by: Andi Shyti Cc: Daniele Ceraolo Spurio Cc: Joonas Lahtinen Cc: Matthew Auld Reviewed-by: Matt Roper Reviewed-by: Andrzej

[Intel-gfx] [PATCH v7 4/7] drm/i915/gt: create per-tile sysfs interface

2022-03-18 Thread Andi Shyti
interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Cc: Chris Wilson Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvrtko Ursulin Reviewed-by: Sujaritha Sundaresan Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/Makefile

[Intel-gfx] [PATCH v7 5/7] drm/i915/gt: Create per-tile RC6 sysfs interface

2022-03-18 Thread Andi Shyti
the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson Cc: Joonas Lahtinen Cc: Matt Roper Cc: Sujaritha Sundaresan Cc: Tvr

[Intel-gfx] [PATCH v7 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-03-18 Thread Andi Shyti
is not really adding exposing new interfaces (new ABI) other than adapting the existing one to more tiles. In any case this new set of interfaces will be a basic tool for system managers and administrators when using i915. Signed-off-by: Andi Shyti Signed-off-by: Lucas De Marchi Cc: Chris Wilson

[Intel-gfx] [PATCH v7 7/7] drm/i915/gt: Add sysfs throttle frequency interfaces

2022-03-18 Thread Andi Shyti
clipping. - throttle_reason_vr_tdc: when set indicates that VR TDC (Thermal Design Current) has caused GT frequency clipping. Signed-off-by: Sujaritha Sundaresan Signed-off-by: Andi Shyti Cc: Dale B Stimson Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 74

Re: [Intel-gfx] [PATCH v7 3/7] drm/i915: Prepare for multiple GTs

2022-03-20 Thread Andi Shyti
Hi Michal, [...] > > +static int intel_gt_tile_setup(struct intel_gt *gt, phys_addr_t phys_addr) > > +{ > > + int ret; > > + > > + if (!gt_is_root(gt)) { > > + struct intel_uncore_mmio_debug *mmio_debug; > > + struct intel_uncore *uncore; > > + > > + uncore = kza

[Intel-gfx] [PATCH RESEND] drm/i915/debugfs: Do not return '0' if there is nothing to return

2022-03-21 Thread Andi Shyti
Change functions that always return '0' to be void type. Signed-off-by: Andi Shyti Reviewed-by: Maciej Patelczyk --- Hi, just resending it once more time. Matt, can you please commit this refactoring if you are OK with it? Andi drivers/gpu/drm/i915/gt/intel_gt_debugfs

Re: [Intel-gfx] [PATCH v7 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-05-05 Thread Andi Shyti
Hi Tvrtko, [...] > > +static ssize_t act_freq_mhz_show(struct device *dev, > > +struct device_attribute *attr, char *buff) > > +{ > > + u32 actual_freq = sysfs_gt_attribute_r_max_func(dev, attr, > > + __act_freq_mhz_show)

Re: [Intel-gfx] [PATCH v5 1/2] module: update dependencies at try_module_get()

2022-05-05 Thread Andi Shyti
Hi Mauro, [...] > +static int ref_module_dependency(struct module *mod, struct module *this) > +{ > + int ret; > + > + if (!this || !this->name) > + return -EINVAL; > + > + if (mod == this) > + return 0; > + > + mutex_lock(&module_mutex); > + > + ret =

Re: [Intel-gfx] [PATCH -next] drm/i915/gt: Fix build error without CONFIG_PM

2022-05-06 Thread Andi Shyti
/i915/gt: Create per-tile RPS sysfs interfaces") > Signed-off-by: YueHaibing Reviewed-by: Andi Shyti Thanks, Andi > --- > drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/gt/intel_gt_s

Re: [Intel-gfx] [PATCH v7 6/7] drm/i915/gt: Create per-tile RPS sysfs interfaces

2022-05-06 Thread Andi Shyti
Hi Jani, On Fri, May 06, 2022 at 02:53:50PM +0300, Jani Nikula wrote: > On Sat, 19 Mar 2022, Andi Shyti wrote: > > +#define INTEL_GT_RPS_SYSFS_ATTR(_name, _mode, _show, _store) \ > > + struct device_attribute dev_attr_gt_##_name = __ATTR(gt_##_name, _mode, > > _show, _sto

Re: [Intel-gfx] [PATCH] fbdev: efifb: Fix a use-after-free due early fb_info cleanup

2022-05-06 Thread Andi Shyti
Cleanup fb_info in .fb_destroy rather > than .remove") > Reported-by: Ville Syrjälä > Reported-by: Andrzej Hajda > Signed-off-by: Javier Martinez Canillas Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH] drm/i915/gt: Fix memory leaks in per-gt sysfs

2022-05-09 Thread Andi Shyti
e organization. > > v2: s/gtn/gt/ (Andi) > > Cc: Andi Shyti > Cc: Andrzej Hajda > Fixes: b770bcfae9ad ("drm/i915/gt: create per-tile sysfs interface") > Signed-off-by: Ashutosh Dixit I'm still not convinced this patch is 100% correct, but I think it&

Re: [Intel-gfx] [PATCH 6/8] drm/i915/gt: Fix memory leaks in per-gt sysfs

2022-05-09 Thread Andi Shyti
e organization. > > v2: s/gtn/gt/ (Andi) > > Cc: Andi Shyti > Cc: Andrzej Hajda > Fixes: b770bcfae9ad ("drm/i915/gt: create per-tile sysfs interface") > Signed-off-by: Ashutosh Dixit I tagget the wrong version (which is the same as this one): Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH 3/8] drm/i915/pcode: Extend pcode functions for multiple gt's

2022-05-09 Thread Andi Shyti
n names to eliminate needless #defines (Rodrigo) > > Cc: Rodrigo Vivi > Cc: Jani Nikula > Cc: Andi Shyti > Signed-off-by: Ashutosh Dixit looks correct: Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 7/8] drm/i915/gt: Expose per-gt RPS defaults in sysfs

2022-05-10 Thread Andi Shyti
Hi Ashutosh, > > +static ssize_t > > +default_min_freq_mhz_show(struct kobject *kobj, struct kobj_attribute > > *attr, char *buf) > > +{ > > + struct intel_gt *gt = kobj_to_gt(kobj->parent); > > + > > + return sysfs_emit(buf, "%d\n", gt->rps_defaults.min_freq); I guess this is %u. > > +} >

[Intel-gfx] [PATCH] drm/i915/gt: Fix use of static in macro mismatch

2022-05-10 Thread Andi Shyti
ani Nikula Fixes: 56a709cf77468 ("drm/i915/gt: Create per-tile RPS sysfs interfaces") Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_sysfs_pm.c | 21 +++-- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_sysfs

[Intel-gfx] [PATCH] drm/i915/gem: Flush TLBs for all the tiles

2022-05-10 Thread Andi Shyti
During object cleanup we invalidate the TLBs but we do it only for gt0. Invalidate the caches for all the tiles. Reported-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a

[Intel-gfx] [PATCH v2 0/3] Clear TLB caches in all tiles when object is removed

2022-05-10 Thread Andi Shyti
Hi, The real fix is in patch 2. The rest is a helper that adds the with_intel_gt_pm_if_awake() (from Chris) and one more check on the status of the engine before accessing it for clearing the TLB. Andi Andi Shyti (2): drm/i915/gem: Flush TLBs for all the tiles when clearing an obj drm/i915

[Intel-gfx] [PATCH v2 1/3] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-05-10 Thread Andi Shyti
-off-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h index bc898df7a48cc..2654133b39f22 100644 --- a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v2 2/3] drm/i915/gem: Flush TLBs for all the tiles when clearing an obj

2022-05-10 Thread Andi Shyti
During object cleanup we invalidate the TLBs but we do it only for gt0. Invalidate the caches for all the tiles. Reported-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 12 +--- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 2 +- 2 files

[Intel-gfx] [PATCH v2 3/3] drm/i915/gt: Skip TLB invalidation if the engine is not awake

2022-05-10 Thread Andi Shyti
We want to check if the engine is awake first before invalidating its cache. Suggested-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v4 1/3] drm/i915/gt: Ignore TLB invalidations on idle engines

2022-05-10 Thread Andi Shyti
-off-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt_pm.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt_pm.h b/drivers/gpu/drm/i915/gt/intel_gt_pm.h index bc898df7a48cc..3b1fbce7ea369 100644 --- a/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v4 2/3] drm/i915/gem: Flush TLBs for all the tiles when clearing an obj

2022-05-10 Thread Andi Shyti
During object cleanup we invalidate the TLBs but we do it only for gt0. Invalidate the caches for all the tiles. Reported-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 12 +--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a

[Intel-gfx] [PATCH v4 3/3] drm/i915/gt: Skip TLB invalidation if the engine is not awake

2022-05-10 Thread Andi Shyti
We want to check if the engine is awake first before invalidating its cache. Suggested-by: Chris Wilson Signed-off-by: Andi Shyti --- drivers/gpu/drm/i915/gt/intel_gt.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/i915/gt/intel_gt.c b/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH v4 0/3] Clear TLB caches in all tiles when object is removed

2022-05-10 Thread Andi Shyti
t; v2 (v1: https://patchwork.freedesktop.org/series/103831/) - Add with_intel_gt_pm_if_awake() macro for gt specific wakeref. - Check if an engine is awake before invalidating its TLB. Andi Shyti (2): drm/i915/gem: Flush TLBs for all the tiles when clearing an obj drm/i915/gt: Skip TLB invali

Re: [Intel-gfx] [PATCH] drm/i915: Fix vm use-after-free in vma destruction

2022-05-19 Thread Andi Shyti
Hi Thomas, On Thu, May 12, 2022 at 11:40:45AM +0200, Thomas Hellström wrote: > In vma destruction, the following race may occur: > > Thread 1: Thread 2: > i915_vma_destroy(); > > ... > list_del_init(vma->vm_link); > ... > mutex_unlock(vma->vm->mutex); >

Re: [Intel-gfx] [PATCH v7 3/7] drm/i915: Prepare for multiple GTs

2022-05-19 Thread Andi Shyti
Hi Daniele, > > > @@ -909,6 +903,8 @@ int i915_driver_probe(struct pci_dev *pdev, > > > const struct pci_device_id *ent) > > >   i915_ggtt_driver_late_release(i915); > > >   out_cleanup_mmio: > > >   i915_driver_mmio_release(i915); > > > +out_tiles_cleanup: > > > +    intel_gt_release_all(

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

2022-07-21 Thread Andi Shyti
2] 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 Thanks, Andi > --- > drivers/gpu/drm/i915/selftests/i915

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

2022-07-21 Thread Andi Shyti
tch, this 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: [Intel-gfx] [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 avoid mai

Re: [Intel-gfx] [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: [Intel-gfx] [PATCH v2 04/21] drm/i915/gt: Only invalidate TLBs exposed to user manipulation

2022-07-22 Thread Andi Shyti
ore") > 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: [Intel-gfx] [PATCH v2 05/21] drm/i915/gt: Skip TLB invalidations once wedged

2022-07-22 Thread Andi Shyti
r 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: Chri

Re: [Intel-gfx] [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: [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 convers

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 v3 6/6] drm/i915/gt: describe the new tlb parameter at i915_vma_resource

2022-07-27 Thread Andi Shyti
d 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 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 c

Re: [Intel-gfx] [PATCH v2] drm/i915: disable pci resize on 32-bit machine

2022-07-27 Thread Andi Shyti
dd support for LMEM PCIe resizable bar") > Reported-by: Linux Kernel Functional Testing > Tested-by: Linux Kernel Functional Testing > Acked-by: Matthew Auld > Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti Andi PS You forgot to CC the author of the patch you are fixing

Re: [Intel-gfx] [PATCH] drm/i915: Suppress oom warning for shmemfs object allocation failure

2022-07-27 Thread Andi Shyti
ed-off-by: Chris Wilson > Co-developed-by: Nirmoy Das > Signed-off-by: Nirmoy Das Reviewed-by: Andi Shyti 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! > > As

Re: [Intel-gfx] [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 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 varia

Re: [Intel-gfx] [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 it

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 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 Revi

Re: [Intel-gfx] [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: [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() should happen

Re: [Intel-gfx] [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 2/9] drm/i915/gt: Add media freq factor to per-gt sysfs

2022-04-24 Thread Andi Shyti
ou could use in this case the ".is_visible()" function as you are not inheriting it from the upper drm class. Anyway, Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 1/9] drm/i915: Introduce has_media_ratio_mode

2022-04-24 Thread Andi Shyti
or XEHPSDV and DG2/ATS-M. > > Cc: Rodrigo Vivi > Signed-off-by: Ashutosh Dixit > Reviewed-by: Rodrigo Vivi Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 3/9] drm/i915/pcode: Extend pcode functions for multiple gt's

2022-04-24 Thread Andi Shyti
base_ms); > + > +#define snb_pcode_read(i915, mbox, val, val1) \ > + intel_gt_pcode_read(&(i915)->gt0, mbox, val, val1) > + > +#define snb_pcode_write_timeout(i915, mbox, val, fast_timeout_us, > slow_timeout_ms) \ > + intel_gt_pcode_write_timeout(&(i915)->

Re: [Intel-gfx] [PATCH 4/9] drm/i915/gt: Convert callers to user per-gt pcode functions

2022-04-24 Thread Andi Shyti
acy pcode interface. > > Cc: Andi Shyti > Cc: Jani Nikula > Cc: Rodrigo Vivi > Signed-off-by: Ashutosh Dixit Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH 5/9] drm/i915/pcode: Add a couple of pcode helpers

2022-04-24 Thread Andi Shyti
Hi Ashutosh, On Tue, Apr 19, 2022 at 11:25:05PM -0700, Ashutosh Dixit wrote: > From: Dale B Stimson > > Add a couple of helpers to help formatting pcode commands and improve code > readability. Can you please add some more details on the helpers? > v2: Fixed commit author (Rodrigo) > > Cc: Mi

Re: [Intel-gfx] [PATCH 6/9] drm/i915/gt: Add media RP0/RPn to per-gt sysfs

2022-04-24 Thread Andi Shyti
> + if (err) > + return err; > + > + /* data_out - Fused P0 for domain ID in units of 50 MHz */ this comment doesn't say much, can we make it a bit clearer? The same for the one below. The rest looks good: Reviewed-by: Andi Shyti > + val *= GT_FREQUE

Re: [Intel-gfx] [PATCH 7/9] drm/i915/gt: Fix memory leaks in per-gt sysfs

2022-04-24 Thread Andi Shyti
Hi Ashutosh, [...] > -static struct kobj_type kobj_gt_type = { > - .release = kobj_gt_release, > +static struct kobj_type kobj_gtn_type = { what does it mean GTN? Or is it GTn? Please use just GT, gtn is confusing. Same for all the rest of the gtn's you have used below. Thanks, Andi

Re: [Intel-gfx] [PATCH 7/9] drm/i915/gt: Fix memory leaks in per-gt sysfs

2022-04-24 Thread Andi Shyti
Hi Andrzej and Ashutosh, > > > > b/drivers/gpu/drm/i915/gt/intel_gt_types.h > > > > index 937b2e1a305e..4c72b4f983a6 100644 > > > > --- a/drivers/gpu/drm/i915/gt/intel_gt_types.h > > > > +++ b/drivers/gpu/drm/i915/gt/intel_gt_types.h > > > > @@ -222,6 +222,9 @@ struct intel_gt { > > > > }

Re: [Intel-gfx] [PATCH 1/2] drm/i915/xehp: Add compute engine ABI

2022-04-25 Thread Andi Shyti
Hi Matt, On Fri, Apr 22, 2022 at 12:50:06PM -0700, Matt Roper wrote: > We're now ready to start exposing compute engines to userspace. > > While we're at it, let's extend the kerneldoc description for the other > engine types as well. I would make two different patches. The kerneldoc description

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Xe_HP SDV and DG2 have up to 4 CCS engines

2022-04-25 Thread Andi Shyti
On Fri, Apr 22, 2022 at 12:50:07PM -0700, Matt Roper wrote: > From: Daniele Ceraolo Spurio > > Cc: Vinay Belgaumkar > Signed-off-by: Daniele Ceraolo Spurio > Signed-off-by: Matt Roper > Reviewed-by: Matt Roper Reviewed-by: Andi Shyti Andi

Re: [Intel-gfx] [PATCH 7/9] drm/i915/gt: Fix memory leaks in per-gt sysfs

2022-04-27 Thread Andi Shyti
Hi Ashutosh, > > > -static struct kobj_type kobj_gt_type = { > > > - .release = kobj_gt_release, > > > +static struct kobj_type kobj_gtn_type = { > > > > what does it mean GTN? Or is it GTn? Please use just GT, gtn is > > confusing. > > > > Same for all the rest of the gtn's you have used below. >

Re: [Intel-gfx] [PATCH] drm/i915/dmc: Add MMIO range restrictions

2022-04-27 Thread Andi Shyti
[...] > + if (!dmc_mmio_addr_sanity_check(dmc, mmioaddr, mmio_count, > dmc_header->header_ver, dmc_id)) > + drm_err(&i915->drm, "DMC firmware has Wrong MMIO Addresses\n"); > + return 0; > + mh? :)

Re: [Intel-gfx] [PATCH v2 1/4] drm/i915/uapi: Add kerneldoc for engine class enum

2022-04-28 Thread Andi Shyti
Hi Matt, On Wed, Apr 27, 2022 at 09:19:23PM -0700, Matt Roper wrote: > We'll be adding a new type of engine soon. Let's document the existing > engine classes first to help make it clear what each type of engine is > used for. > > Cc: Andi Shyti > Signed-off-by: Ma

Re: [Intel-gfx] [PATCH v2 3/4] drm/i915/xehp: Add compute engine ABI

2022-04-28 Thread Andi Shyti
in > Cc: Vinay Belgaumkar > Cc: Jordan Justen > Cc: Szymon Morek > UMD (mesa): https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14395 > Signed-off-by: Matt Roper looks good, Reviewed-by: Andi Shyti Thanks, Andi

Re: [Intel-gfx] [PATCH v3 05/10] drm/i915: Prepare for multiple gts

2021-11-02 Thread Andi Shyti
Hi Tvrtko, > > [...] > > > > > static int > > > intel_gt_tile_setup(struct intel_gt *gt, unsigned int id, phys_addr_t > > > phys_addr) > > > > we don't actually need 'id', it's gt->info.id. It's introduced in > > patch 3 with the value '0' but it's not needed. > > I have a suspicion code g

<    1   2   3   4   5   6   7   8   9   10   >