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

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

2022-09-11 Thread Andi Shyti
Hi Gwan-gyeong, On Fri, Sep 09, 2022 at 07:59:07PM +0900, Gwan-gyeong Mun wrote: > It adds assert_type and assert_typable macros to catch type mis-match while /Add/It adds/, please use the imperative form. > compiling. The existing typecheck() macro outputs build warnings, but the > newly added

[Intel-gfx] ✗ Fi.CI.BUILD: failure for Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation (rev2)

2022-09-11 Thread Patchwork
== Series Details == Series: Fixes integer overflow or integer truncation issues in page lookups, ttm place configuration and scatterlist creation (rev2) URL : https://patchwork.freedesktop.org/series/108358/ State : failure == Summary == Error: make failed CALLscripts/checksyscalls.sh

Re: [Intel-gfx] [PATCH v4 1/3] drm: Use XArray instead of IDR for minors

2022-09-11 Thread Michał Winiarski
On Tue, Sep 06, 2022 at 10:02:24PM +0100, Matthew Wilcox wrote: > On Tue, Sep 06, 2022 at 10:16:27PM +0200, Michał Winiarski wrote: > > IDR is deprecated, and since XArray manages its own state with internal > > locking, it simplifies the locking on DRM side. > > Additionally, don't use the IRQ-saf

[Intel-gfx] [PATCH v5 0/3] drm: Use full allocated minor range for DRM

2022-09-11 Thread Michał Winiarski
64 DRM device nodes is not enough for everyone. Upgrade it to ~512K (which definitely is more than enough). To allow testing userspace support for >64 devices, add additional DRM modparam (skip_legacy_minors) which causes DRM to skip allocating minors in 0-192 range. Additionally - convert minors

[Intel-gfx] [PATCH v5 1/3] drm: Use XArray instead of IDR for minors

2022-09-11 Thread Michał Winiarski
IDR is deprecated, and since XArray manages its own state with internal locking, it simplifies the locking on DRM side. Additionally, don't use the IRQ-safe variant, since operating on drm minor is not done in IRQ context. Signed-off-by: Michał Winiarski Suggested-by: Matthew Wilcox --- drivers

[Intel-gfx] [PATCH v5 3/3] drm: Introduce skip_legacy_minors modparam

2022-09-11 Thread Michał Winiarski
While there is support for >64 DRM devices on kernel side, existing userspace may still have some hardcoded assumptions and it's possible that it will require changes to be able to use more than 64 devices. Add a modparam to simplify testing and development of >64 devices support on userspace side

[Intel-gfx] [PATCH v5 2/3] drm: Expand max DRM device number to full MINORBITS

2022-09-11 Thread Michał Winiarski
Having a limit of 64 DRM devices is not good enough for modern world where we have multi-GPU servers, SR-IOV virtual functions and virtual devices used for testing. Let's utilize full minor range for DRM devices. To avoid regressing the existing userspace, we're still maintaining the numbering sche

[Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm: Use full allocated minor range for DRM (rev2)

2022-09-11 Thread Patchwork
== Series Details == Series: drm: Use full allocated minor range for DRM (rev2) URL : https://patchwork.freedesktop.org/series/108206/ State : warning == Summary == Error: dim checkpatch failed 48b297af081c drm: Use XArray instead of IDR for minors aa7dc1fa2e97 drm: Expand max DRM device numbe

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

2022-09-11 Thread Andi Shyti
Hi Mauro, On Fri, Sep 09, 2022 at 09:34:24AM +0200, Mauro Carvalho Chehab wrote: > The return codes for i915_gem_wait_ioctl() have identation issues, > and will be displayed on a very confusing way. Use lists to improve > its output. > > Reviewed-by: Rodrigo Vivi > Signed-off-by: Mauro Carvalho

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

2022-09-11 Thread Andi Shyti
Hi Mauro, On Fri, Sep 09, 2022 at 09:34:26AM +0200, Mauro Carvalho Chehab wrote: > There are some occurrences of "/**" that aren't actually part of > a kernel-doc markup. Replace them by "/*", in order to make easier > to identify what i915 files contain kernel-doc markups. > > Reviewed-by: Rodri

Re: [Intel-gfx] [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: [Intel-gfx] [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 ... > +/** >

[Intel-gfx] linux-next: manual merge of the drm-intel tree with the drm tree

2022-09-11 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the drm-intel tree got a conflict in: drivers/gpu/drm/i915/intel_pm.c between commit: 254e5e8829a9 ("drm: Remove unnecessary include statements of drm_plane_helper.h") from the drm tree and commit: 42a0d256496f ("drm/i915: Extract skl_watermark.c")

[Intel-gfx] [PATCH v7 0/9] dyndbg: drm.debug adaptation

2022-09-11 Thread Jim Cromie
hi Greg, Dan, Jason, DRM-folk, heres follow-up to V6: rebased on driver-core/driver-core-next for -v6 applied bits (thanks) rework drm_debug_enabled{_raw,_instrumented,} per Dan. It excludes: nouveau parts (immature) tracefs parts (I missed --to=Steve on v6) split _ddebug_site and de-du

[Intel-gfx] [PATCH v7 1/9] drm_print: condense enum drm_debug_category

2022-09-11 Thread Jim Cromie
enum drm_debug_category has 10 categories, but is initialized with bitmasks which require 10 bits of underlying storage. By using natural enumeration, and moving the BIT(cat) into drm_debug_enabled(), the enum fits in 4 bits, allowing the category to be represented directly in pr_debug callsites,

[Intel-gfx] [PATCH v7 3/9] drm_print: interpose drm_*dbg with forwarding macros

2022-09-11 Thread Jim Cromie
change drm_dev_dbg & drm_dbg to macros, which forward to the renamed functions (with __ prefix added). Those functions sit below the categorized layer of macros implementing the DRM debug.category API, and implement most of it. These are good places to insert dynamic-debug jump-label mechanics, w

[Intel-gfx] [PATCH v7 2/9] drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.

2022-09-11 Thread Jim Cromie
Use DECLARE_DYNDBG_CLASSMAP across DRM: - in .c files, since macro defines/initializes a record - in drivers, $mod_{drv,drm,param}.c ie where param setup is done, since a classmap is param related - in drm/drm_print.c since existing __drm_debug param is defined there, and we ifdef it

[Intel-gfx] [PATCH v7 4/9] drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro

2022-09-11 Thread Jim Cromie
For CONFIG_DRM_USE_DYNAMIC_DEBUG=y, wrap __drm_dbg() & __drm_dev_dbg() in one of dyndbg's Factory macros: _dynamic_func_call_no_desc(). This adds the callsite descriptor into the code, and an entry for each into /proc/dynamic_debug/control. #> echo class DRM_UT_ATOMIC +p > /proc/dynamic_debug/c

[Intel-gfx] [PATCH v7 5/9] drm-print.h: include dyndbg header

2022-09-11 Thread Jim Cromie
lkp robot told me: >> drivers/gpu/drm/drm_ioc32.c:989:2: error: call to undeclared function '_dynamic_func_call_cls'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration] DRM_DEBUG("comm=\"%s\", pid=%d, dev=0x%lx, auth=%d, %s\n", Si

[Intel-gfx] [PATCH v7 7/9] drm_print: optimize drm_debug_enabled for jump-label

2022-09-11 Thread Jim Cromie
When CONFIG_DRM_USE_DYNAMIC_DEBUG=y, the drm.debug API (a macro stack, calling _+drm_*dbg() eventually) invokes a dyndbg Factory macro to create a descriptor for each callsite, thus making them individually >control-able. In this case, the calls to _drm_*dbg are unreachable unless the callsite is

[Intel-gfx] [PATCH v7 8/9] drm_print: prefer bare printk KERN_DEBUG on generic fn

2022-09-11 Thread Jim Cromie
drm_print.c calls pr_debug() just once, from __drm_printfn_debug(), which is a generic/service fn. The callsite is compile-time enabled by DEBUG in both DYNAMIC_DEBUG=y/n builds. For dyndbg builds, reverting this callsite back to bare printk is correcting a few anti-features: 1- callsite is gene

[Intel-gfx] [PATCH v7 9/9] drm_print: add _ddebug descriptor to drm_*dbg prototypes

2022-09-11 Thread Jim Cromie
upgrade the callchain to drm_dbg() and drm_dev_dbg(); add a struct _ddebug ptr parameter to them, and supply that additional param by replacing the '_no_desc' flavor of dyndbg Factory macro currently used with the flavor that supplies the descriptor. NOTES: The descriptor gives these fns access t

[Intel-gfx] [PATCH v7 6/9] drm-print: add drm_dbg_driver to improve namespace symmetry

2022-09-11 Thread Jim Cromie
drm_print defines all of these: drm_dbg_{core,kms,prime,atomic,vbl,lease,_dp,_drmres} but not drm_dbg_driver itself, since it was the original drm_dbg. To improve namespace symmetry, change the drm_dbg defn to drm_dbg_driver, and redef grandfathered name to symmetric one. This will help with

[Intel-gfx] ✗ Fi.CI.BUILD: failure for dyndbg: drm.debug adaptation

2022-09-11 Thread Patchwork
== Series Details == Series: dyndbg: drm.debug adaptation URL : https://patchwork.freedesktop.org/series/108416/ State : failure == Summary == Error: patch https://patchwork.freedesktop.org/api/1.0/series/108416/revisions/1/mbox/ not applied Applying: drm_print: condense enum drm_debug_categ

Re: [Intel-gfx] [PATCH v3 2/2] drm/i915/dgfx: Release mmap on rpm suspend

2022-09-11 Thread Gupta, Anshuman
> -Original Message- > From: Auld, Matthew > Sent: Friday, September 9, 2022 9:06 PM > To: Gupta, Anshuman ; intel- > g...@lists.freedesktop.org > Cc: joonas.lahti...@linux.intel.com; Vivi, Rodrigo ; > Nilawar, Badal ; ch...@chris-wilson.co.uk > Subject: Re: [PATCH v3 2/2] drm/i915/dgfx: