[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

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

[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

[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",

[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

[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

[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,

[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

[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,

[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

[PATCH linux-next] drm/amd/display/amdgpu_dm: remove duplicate included header files

2022-09-11 Thread cgel . zte
From: Xu Panda soc15_common.h is included more than once. Reported-by: Zeal Robot Signed-off-by: Xu Panda --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

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")

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

Re: [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

linux-next: Fixes tag needs some work in the drm tree

2022-09-11 Thread Stephen Rothwell
Hi all, In commit 89b03aeaef16 ("drm/vkms: fix 32bit compilation error by replacing macros") Fixes tag Fixes: a19c2ac9858 ("drm: vkms: Add support to the RGB565 format") has these problem(s): - Target SHA1 does not exist Maybe you meant Fixes: 396369d67549 ("drm: vkms: Add support to

Re: [v4] drm/msm/disp/dpu1: add support for dspp sub block flush in sc7280

2022-09-11 Thread Stephen Boyd
Quoting Kalyan Thota (2022-09-08 00:26:28) > diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > index a35ecb6..bbda09a 100644 > --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_ctl.c > @@ -307,6

[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

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

[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

[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

Re: [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

Re: [PATCH v3 4/9] drm/mediatek: Add gamma support different lut_size for other SoC

2022-09-11 Thread kernel test robot
plied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Jason-JH-Lin/Add-gamma-lut-support-for-mt8195/20220911-233949

Re: [PATCH 0/5] drm/amd/display: Reduce stack usage for clang

2022-09-11 Thread Maíra Canal
Hi Nathan, I have built-tested the whole series with clang 14.0.5 (Fedora 14.0.5-1.fc36), using: $ make -kj"$(nproc)" ARCH=x86_64 LLVM=1 mrproper allmodconfig drivers/gpu/drm/amd/amdgpu/ Great to see this patchset coming for DML! To the whole series: Tested-by: Maíra Canal Best Regards, -

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 11/09/2022 20:36, Krzysztof Kozlowski wrote: >> If your child schema fails, the referencing schema fails as well... > > > Although now with DSI-PHY I cannot reproduce it and I am pretty sure I > reproduced it with DPU controllers after modifying the DTS to lack a > property... Hmmm

[PATCH v5 2/2] drm/tests: Change "igt_" prefix to "drm_test_"

2022-09-11 Thread Maíra Canal
With the introduction of KUnit, IGT is no longer the only option to run the DRM unit tests, as the tests can be run through kunit-tool or on real hardware with CONFIG_KUNIT. Therefore, remove the "igt_" prefix from the tests and replace it with the "drm_test_" prefix, making the tests' names

[PATCH v5 1/2] drm/tests: Split drm_framebuffer_create_test into parameterized tests

2022-09-11 Thread Maíra Canal
The igt_check_drm_framebuffer_create is based on a loop that executes tests for all createbuffer_tests test cases. This could be better represented by parameterized tests, provided by KUnit. So, convert the igt_check_drm_framebuffer_create into parameterized tests. Signed-off-by: Maíra Canal

NULL pointer dereference in i915 in i915_gem_do_execbuffer, eb_lookup_vmas

2022-09-11 Thread Maxim Mikityanskiy
Hi all, I experience periodic crashes on HP Elite Dragonfly G2 (i7-1165G7) which, I believe, are related to a bug in the i915 driver. I collected a stacktrace and a kdump on 5.19.8 compiled with KASAN. This time the screen was frozen, but I could SSH into the machine. Sometimes a kernel panic

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 11/09/2022 20:36, Krzysztof Kozlowski wrote: >> /home/krzk/dev/linux/linux/out/arch/arm64/boot/dts/qcom/sda660-inforce-ifc6560.dtb: >> dsi@c994000: 'vdda-supply' does not match any of the regexes: >> 'pinctrl-[0-9]+' >> >> >> >> If your child schema fails, the referencing schema fails as

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 11/09/2022 20:32, Krzysztof Kozlowski wrote: > On 11/09/2022 19:45, Dmitry Baryshkov wrote: >> On Sun, 11 Sept 2022 at 16:57, Krzysztof Kozlowski >> wrote: >>> >>> On 11/09/2022 15:45, Dmitry Baryshkov wrote: On Sun, 11 Sept 2022 at 14:27, Krzysztof Kozlowski wrote: > > On

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 11/09/2022 19:45, Dmitry Baryshkov wrote: > On Sun, 11 Sept 2022 at 16:57, Krzysztof Kozlowski > wrote: >> >> On 11/09/2022 15:45, Dmitry Baryshkov wrote: >>> On Sun, 11 Sept 2022 at 14:27, Krzysztof Kozlowski >>> wrote: On 10/09/2022 14:54, Dmitry Baryshkov wrote: >> >>

Re: [PATCH v8 2/2] drm/gem: Don't map imported GEMs

2022-09-11 Thread Rob Clark
On Wed, Sep 7, 2022 at 3:25 AM Dmitry Osipenko wrote: > > On 8/23/22 19:47, Rob Clark wrote: > > On Tue, Aug 23, 2022 at 3:01 AM Christian König > > wrote: > >> > >> Am 22.08.22 um 19:26 schrieb Dmitry Osipenko: > >>> On 8/16/22 22:55, Dmitry Osipenko wrote: > On 8/16/22 15:03, Christian

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom, mdss bindings

2022-09-11 Thread Dmitry Baryshkov
On Sun, 11 Sept 2022 at 16:57, Krzysztof Kozlowski wrote: > > On 11/09/2022 15:45, Dmitry Baryshkov wrote: > > On Sun, 11 Sept 2022 at 14:27, Krzysztof Kozlowski > > wrote: > >> > >> On 10/09/2022 14:54, Dmitry Baryshkov wrote: > > However I think there is no such problem, as Dmitry

Re: [PATCH 1/4] drm/gma500: Refactor backlight support

2022-09-11 Thread Sam Ravnborg
Hi Hans, > >> +static int gma_backlight_update_status(struct backlight_device *bd) > >> +{ > >> + struct drm_device *dev = bl_get_data(bd); > >> + int level = bd->props.brightness; > > > > Here backlight_get_brightness(bd) should be used. > > Ack, but the old set methods all 3 used: > >

Re: [PATCH] drm/hyperv: Don't rely on screen_info.lfb_base for Gen1 VMs

2022-09-11 Thread Saurabh Singh Sengar
On Sat, Sep 10, 2022 at 08:11:24PM +0200, Thomas Zimmermann wrote: > Hi > > Am 09.09.22 um 16:43 schrieb Saurabh Sengar: > >hyperv_setup_vram tries to remove conflicting framebuffer based on > >'screen_info'. As observed in past due to some bug or wrong setting > >in grub, the 'screen_info'

Re: [PATCH] drm/hyperv: Add ratelimit on error message

2022-09-11 Thread Saurabh Singh Sengar
On Sat, Sep 10, 2022 at 08:06:05PM +0200, Thomas Zimmermann wrote: > Hi > > Am 09.09.22 um 17:09 schrieb Saurabh Sengar: > >Due to a full ring buffer, the driver may be unable to send updates to > >the Hyper-V host. But outputing the error message can make the problem > >worse because console

Re: [PATCH v2] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-11 Thread Igor Matheus Andrade Torrente
Reviewed-by: Igor Torrente On 9/10/22 16:03, Melissa Wen wrote: Replace vkms_formats macro for fixed-point operations with functions from drm/drm_fixed.h to do the same job and fix 32-bit compilation errors. v2: - don't cast results to s32 (Igor) - add missing drm_fixp2int conversion (Igor)

Re: [PATCH] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-11 Thread Igor Matheus Andrade Torrente
On 9/10/22 16:10, Melissa Wen wrote: On 09/09, Igor Matheus Andrade Torrente wrote: Hi Mellisa, Thanks for the patch fixing my mistakes. On 9/9/22 08:41, Melissa Wen wrote: Replace vkms_formats macros for fixed-point operations with functions from drm/drm_fixed.h to do the same job and fix

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 11/09/2022 15:45, Dmitry Baryshkov wrote: > On Sun, 11 Sept 2022 at 14:27, Krzysztof Kozlowski > wrote: >> >> On 10/09/2022 14:54, Dmitry Baryshkov wrote: However I think there is no such problem, as Dmitry said, that ref changes anything. There will be always failure - either

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom, mdss bindings

2022-09-11 Thread Dmitry Baryshkov
On Sun, 11 Sept 2022 at 14:27, Krzysztof Kozlowski wrote: > > On 10/09/2022 14:54, Dmitry Baryshkov wrote: > >> > >> However I think there is no such problem, as Dmitry said, that ref > >> changes anything. There will be always failure - either from parent > >> schema (using $ref) or from device

Re: [PATCH 1/4] drm/gma500: Refactor backlight support

2022-09-11 Thread Hans de Goede
Hi Sam, On 9/11/22 13:48, Sam Ravnborg wrote: > Hi Hans, > > just a few minor things. See comments. > I like the diff - removes much more than it adds. I'm glad you like it and thank you for the review. > On Sat, Sep 10, 2022 at 10:50:58PM +0200, Hans de Goede wrote: >> Refactor backlight

Re: [PATCH v2] drm/vkms: fix 32bit compilation error by replacing macros

2022-09-11 Thread Dave Airlie
On Sun, 11 Sept 2022 at 05:03, Melissa Wen wrote: > > Replace vkms_formats macro for fixed-point operations with functions > from drm/drm_fixed.h to do the same job and fix 32-bit compilation > errors. > > v2: > - don't cast results to s32 (Igor) > - add missing drm_fixp2int conversion (Igor)

Re: [PATCH 1/4] drm/gma500: Refactor backlight support

2022-09-11 Thread Sam Ravnborg
Hi Hans, just a few minor things. See comments. I like the diff - removes much more than it adds. Sam On Sat, Sep 10, 2022 at 10:50:58PM +0200, Hans de Goede wrote: > Refactor backlight support so that the gma_backlight_enable() / > gma_backlight_disable() / gma_backlight_set()

Re: [PATCH v6 01/12] dt-bindings: display/msm: split qcom,mdss bindings

2022-09-11 Thread Krzysztof Kozlowski
On 10/09/2022 14:54, Dmitry Baryshkov wrote: >> >> However I think there is no such problem, as Dmitry said, that ref >> changes anything. There will be always failure - either from parent >> schema (using $ref) or from device child schema (the one which actually >> misses the property). > >

Re: [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

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

Re: Meeting (BOF) at Plumbers Dublin to discuss backlight brightness as connector object property RFC?

2022-09-11 Thread Hans de Goede
Hi All, On 9/9/22 12:23, Hans de Goede wrote: > Hi All, > > I will be at Plumbers Dublin next week and I was wondering if > anyone interested in this wants to get together for a quick > discussion / birds of a feather session about this? > > I have just posted version 2 of the RFC: >

Re: [Intel-gfx] Developing a new backlight driver for specific OLED screen

2022-09-11 Thread Aurélien
Hi, > + dri-devel mailing list that looks more appropriated. > + Hans and Lyude who were recently working to standardize some of the > backlight stuff. Thank you for these contacts. I'll try there if I need. > I don't believe you want to use the i915 API, but move the common functions > to the

Re: [PATCH v3 01/15] vfio: Add helpers for unifying vfio_device life cycle

2022-09-11 Thread Ethan Zhao
Hi, Kevin, 在 2022/9/9 18:22, Kevin Tian 写道: The idea is to let vfio core manage the vfio_device life cycle instead of duplicating the logic cross drivers. This is also a preparatory step for adding struct device into vfio_device. New pair of helpers together with a kref in vfio_device: -