Re: [PATCH v3 09/16] platform/x86/amd/pmf: Add facility to dump TA inputs

2023-10-13 Thread kernel test robot
Hi Shyam, kernel test robot noticed the following build warnings: [auto build test WARNING on hid/for-next] [also build test WARNING on drm-misc/drm-misc-next linus/master v6.6-rc5 next-20231013] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch

Re: [PATCH v5 7/7] drm/sched: Add helper to queue TDR immediately for current and future jobs

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Add helper to queue TDR immediately for current and future jobs. This is > used in Xe, a new Intel GPU driver, to trigger a TDR to cleanup a > drm_scheduler that encounter errors. I think the best (most optimal) thing to do is to remove the last

Re: [PATCH v5 6/7] drm/sched: Add drm_sched_start_timeout_unlocked helper

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Also add a lockdep assert to drm_sched_start_timeout. > > Signed-off-by: Matthew Brost > Reviewed-by: Luben Tuikov I don't remember sending a Reviewed-by email to this patch. I'll add the R-V to the commit when I apply and push this patch, after

Re: [PATCH v5 5/7] drm/sched: Split free_job into own work item

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Rather than call free_job and run_job in same work item have a dedicated > work item for each. This aligns with the design and intended use of work > queues. > > v2: >- Test for DMA_FENCE_FLAG_TIMESTAMP_BIT before setting > timestamp in

Re: [PATCH v5 4/7] drm/sched: Add DRM_SCHED_POLICY_SINGLE_ENTITY scheduling policy

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > DRM_SCHED_POLICY_SINGLE_ENTITY creates a 1 to 1 relationship between > scheduler and entity. No priorities or run queue used in this mode. > Intended for devices with firmware schedulers. > > v2: > - Drop sched / rq union (Luben) > v3: > - Don't

Re: [PATCH v5 3/7] drm/sched: Move schedule policy to scheduler

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Rather than a global modparam for scheduling policy, move the scheduling > policy to scheduler so user can control each scheduler policy. > > v2: > - s/DRM_SCHED_POLICY_MAX/DRM_SCHED_POLICY_COUNT (Luben) > - Only include policy in scheduler (Luben)

Re: [PATCH v5 2/7] drm/sched: Convert drm scheduler to use a work queue rather than kthread

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > In Xe, the new Intel GPU driver, a choice has made to have a 1 to 1 > mapping between a drm_gpu_scheduler and drm_sched_entity. At first this > seems a bit odd but let us explain the reasoning below. > > 1. In Xe the submission order from multiple

Re: [PATCH v5 1/7] drm/sched: Add drm_sched_wqueue_* helpers

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Add scheduler wqueue ready, stop, and start helpers to hide the > implementation details of the scheduler from the drivers. > > v2: > - s/sched_wqueue/sched_wqueue (Luben) > - Remove the extra white line after the return-statement (Luben) > -

Re: [PATCH drm-misc-next v2] drm/sched: implement dynamic job-flow control

2023-10-13 Thread Luben Tuikov
On 2023-10-11 22:10, Danilo Krummrich wrote: > > > On 10/12/23 03:52, Luben Tuikov wrote: >> Hi, >> >> Thanks for fixing the title and submitting a v2 of this patch. Comments >> inlined below. >> >> On 2023-10-09 18:35, Danilo Krummrich wrote: >>> Currently, job flow control is implemented

[PATCH v5 3/3] drm/i915/gt: Timeout when waiting for idle in suspending

2023-10-13 Thread Alan Previn
When suspending, add a timeout when calling intel_gt_pm_wait_for_idle else if we have a lost G2H event that holds a wakeref (which would be indicative of a bug elsewhere in the driver), driver will at least complete the suspend-resume cycle, (albeit not hitting all the targets for low power hw

[PATCH v5 0/3] Resolve suspend-resume racing with GuC destroy-context-worker

2023-10-13 Thread Alan Previn
This series is the result of debugging issues root caused to races between the GuC's destroyed_worker_func being triggered vs repeating suspend-resume cycles with concurrent delayed fence signals for engine-freeing. The reproduction steps require that an app is launched right before the start of

[PATCH v5 1/3] drm/i915/guc: Flush context destruction worker at suspend

2023-10-13 Thread Alan Previn
When suspending, flush the context-guc-id deregistration worker at the final stages of intel_gt_suspend_late when we finally call gt_sanitize that eventually leads down to __uc_sanitize so that the deregistration worker doesn't fire off later as we reset the GuC microcontroller. Signed-off-by:

[PATCH v5 2/3] drm/i915/guc: Close deregister-context race against CT-loss

2023-10-13 Thread Alan Previn
If we are at the end of suspend or very early in resume its possible an async fence signal (via rcu_call) is triggered to free_engines which could lead us to the execution of the context destruction worker (after a prior worker flush). Thus, when suspending, insert rcu_barriers at the start of

Re: [PATCH v2 1/2] drm/msm/dsi: use msm_gem_kernel_put to free TX buffer

2023-10-13 Thread Abhinav Kumar
On 10/11/2023 6:29 PM, Dmitry Baryshkov wrote: Use exiting function to free the allocated GEM object instead of open-coding it. This has a bonus of internally calling msm_gem_put_vaddr() to compensate for msm_gem_get_vaddr() in msm_get_kernel_new(). Fixes: 1e29dff00400 ("drm/msm: Add a

[PATCH] drm/msm/a6xx: Fix up QMP handling

2023-10-13 Thread Konrad Dybcio
The commit referenced in the Fixes tag had a couple problems (as pointed out by Dan): - qmp_put was never called, resulting in refcnt leaks - failling to acquire the QMP mailbox on A7xx would not undo the probe function properly - the qmp_put call present in the code was unreachable Fix all of

[PATCH v7b 25/25] drm: restore CONFIG_DRM_USE_DYNAMIC_DEBUG un-BROKEN

2023-10-13 Thread Jim Cromie
Lots of burn-in testing needed before signing, upstreaming. NOTE: I set default Y to maximize testing by default. Is there a better way to do this ? Signed-off-by: Jim Cromie --- drivers/gpu/drm/Kconfig | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[PATCH v7b 20/25] dyndbg: add _DPRINTK_FLAGS_INCL_LOOKUP

2023-10-13 Thread Jim Cromie
dyndbg's dynamic prefixing (by +tmfsl flags) is needlessly expensive. When an enabled (with +p) pr_debug is called, _DPRINTK_FLAGS_INCL_ANY prefix decorations are sprintf'd into stack-mem for every call. This string (or part of it) could be cached once its 1st generated, and retrieved

[PATCH v7b 21/25] dyndbg: refactor *dynamic_emit_prefix

2023-10-13 Thread Jim Cromie
Refactor the split of duties between outer & inner fns. The outer fn was previously just an inline unlikely forward to inner, which did all the work. Now, outer handles +t and +l flags itself, and calls inner only when _DPRINTK_FLAGS_INCL_LOOKUP is needed. No functional change. But it does

[PATCH v7b 23/25] drm: use correct ccflags-y spelling

2023-10-13 Thread Jim Cromie
Incorrectly spelled CFLAGS- failed to add -DDYNAMIC_DEBUG_MODULE, which broke builds with: CONFIG_DRM_USE_DYNAMIC_DEBUG=y CONFIG_DYNAMIC_DEBUG_CORE=y CONFIG_DYNAMIC_DEBUG=n Also add subdir-ccflags so that all drivers pick up the addition. Fixes: 84ec67288c10 ("drm_print: wrap drm_*_dbg in

[PATCH v7b 24/25] drm-drivers: DRM_CLASSMAP_USE in 2nd batch of drivers, helpers

2023-10-13 Thread Jim Cromie
Add a DRM_CLASSMAP_USE declaration to 2nd batch of helpers and *_drv.c files. For drivers, add the decl just above the module's PARAMs, since it identifies the "inherited" drm.debug param. Note: with CONFIG_DRM_USE_DYNAMIC_DEBUG=y, a module not also declaring DRM_CLASSMAP_USE will have its

[PATCH v7b 22/25] dyndbg: change WARN_ON to WARN_ON_ONCE

2023-10-13 Thread Jim Cromie
This shouldn't ever happen, and 1st 2 conditions never have. The 3rd condition did happen, due to corrupt linkage due to a missing align(8) in DYNDBG_CLASSMAP_USE, on the static struct allocation into the __dyndbg_class_users section. Not sure whether changing to _ONCE is appropriate - this is a

[PATCH v7b 19/25] dyndbg: reserve flag bit _DPRINTK_FLAGS_PREFIX_CACHED

2023-10-13 Thread Jim Cromie
Reserve bit 7 to remember that a pr-debug callsite is/was: - enabled, with +p - wants a dynamic-prefix, with one+ of module:function:sourcfile - was previously called - was thus saved in the cache. NOT YET. Its unclear whether any cache fetch would be faster than 2-3 field fetches, but theres

[PATCH v7b 18/25] dyndbg-doc: add classmap info to howto

2023-10-13 Thread Jim Cromie
Add some basic info on classmap usage and api cc: linux-...@vger.kernel.org Signed-off-by: Jim Cromie --- v5- adjustments per Randy Dunlap, me v7b- checkpatch fixes --- .../admin-guide/dynamic-debug-howto.rst | 60 ++- 1 file changed, 59 insertions(+), 1 deletion(-) diff

[PATCH v7b 17/25] dyndbg-API: promote DYNDBG_CLASSMAP_PARAM to API

2023-10-13 Thread Jim Cromie
move the DYNDBG_CLASSMAP_PARAM macro from test-dynamic-debug.c into the header, and refine it, by distinguishing the 2 use cases: 1.DYNDBG_CLASSMAP_PARAM_REF for DRM, to pass in extern __drm_debug by name. dyndbg keeps bits in it, so drm can still use it as before 2.DYNDBG_CLASSMAP_PARAM

[PATCH v7b 14/25] dyndbg-API: fix CONFIG_DRM_USE_DYNAMIC_DEBUG regression

2023-10-13 Thread Jim Cromie
DECLARE_DYNDBG_CLASSMAP() has a design error; it fails a basic K rule: "define once, refer many times". When DRM_USE_DYNAMIC_DEBUG=y, DECLARE_DYNDBG_CLASSMAP() is used across DRM core & drivers; they all repeat the same classmap-defn args, which must match for the modules to respond together when

[PATCH v7b 16/25] dyndbg: refactor ddebug_classparam_clamp_input

2023-10-13 Thread Jim Cromie
Extract input validation code, from param_set_dyndbg_module_classes() (the sys-node >handler) to new: ddebug_classparam_clamp_input(kp), call it from former. It takes kernel-param arg, so it can complain about "foo: bad input". Reuse ddparam_clamp_input(kp) in ddebug_sync_classbits(), to

[PATCH v7b 15/25] dyndbg: add for_each_boxed_vector

2023-10-13 Thread Jim Cromie
Add a for_each iterator to walk a counted vector member in a struct (ie the box), and use it to replace 8 open-coded loops. Signed-off-by: Jim Cromie --- v5- parens-on-box-force-precedence --- lib/dynamic_debug.c | 20 +++- 1 file changed, 11 insertions(+), 9 deletions(-) diff

[PATCH v7b 11/25] dyndbg: tighten fn-sig of ddebug_apply_class_bitmap

2023-10-13 Thread Jim Cromie
old_bits arg is currently a pointer to the input bits, but this could allow inadvertent changes to the input by the fn. Disallow this. And constify new_bits while here. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 21 +++-- 1 file changed, 11 insertions(+), 10

[PATCH v7b 13/25] dyndbg-API: remove DD_CLASS_TYPE_(DISJOINT|LEVEL)_NAMES and code

2023-10-13 Thread Jim Cromie
Remove the NAMED class types; these 2 classmap types accept class names at the PARAM interface, for example: echo +DRM_UT_CORE,-DRM_UT_KMS > /sys/module/drm/parameters/debug_names The code works, but its only used by test-dynamic-debug, and wasn't asked for by anyone else, so simplify things

[PATCH v7b 09/25] dyndbg: silence debugs with no-change updates

2023-10-13 Thread Jim Cromie
check for actual changes before announcing them, declutter logs. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index b0e11f6bfaa2..b07aab422604 100644 ---

[PATCH v7b 12/25] dyndbg: reduce verbose=3 messages in ddebug_add_module

2023-10-13 Thread Jim Cromie
The fn currently says "add-module", then "skipping" if the module has no prdbgs. Just check 1st and return quietly. no functional change Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/dynamic_debug.c

[PATCH v7b 08/25] dyndbg: reduce verbose/debug clutter

2023-10-13 Thread Jim Cromie
currently, for verbose=3, these are logged (blank lines for clarity): dyndbg: query 0: "class DRM_UT_CORE +p" mod:* dyndbg: split into words: "class" "DRM_UT_CORE" "+p" dyndbg: op='+' dyndbg: flags=0x1 dyndbg: *flagsp=0x1 *maskp=0x dyndbg: parsed: func="" file="" module=""

[PATCH v7b 10/25] dyndbg: tighten ddebug_class_name() 1st arg type

2023-10-13 Thread Jim Cromie
Change function's 1st arg-type, and deref in the caller. The fn doesn't need any other fields in the struct. no functional change. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c

[PATCH v7b 07/25] dyndbg: drop NUM_TYPE_ARRAY

2023-10-13 Thread Jim Cromie
ARRAY_SIZE works here, since array decl is complete. no functional change Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/include/linux/dynamic_debug.h b/include/linux/dynamic_debug.h index

[PATCH v7b 06/25] dyndbg: split param_set_dyndbg_classes to module/wrapper fns

2023-10-13 Thread Jim Cromie
rename param_set_dyndbg_classes: add _module_ name & arg, old name is wrapper to new. New arg allows caller to specify that only one module is affected by a prdbgs update. Outer fn preserves kernel_param interface, passing NULL to inner fn. This selectivity will be used later to narrow the scope

[PATCH v7b 05/25] dyndbg: ddebug_apply_class_bitmap - add module arg, select on it

2023-10-13 Thread Jim Cromie
Add query_module param to ddebug_apply_class_bitmap(). This allows its caller to update just one module, or all (as currently). We'll use this later to propagate drm.debug to each USEr as they're modprobed. No functional change. Signed-off-by: Jim Cromie --- after `modprobe i915`, heres the

[PATCH v7b 04/25] dyndbg: replace classmap list with a vector

2023-10-13 Thread Jim Cromie
Classmaps are stored/linked in a section/array, but are each added to the module's ddebug_table.maps list-head. This is unnecessary; even when ddebug_attach_classmap() is handling the builtin section (with classmaps for multiple builtin modules), its contents are ordered, so a module's possibly

[PATCH v7b 03/25] dyndbg: make ddebug_class_param union members same size

2023-10-13 Thread Jim Cromie
struct ddebug_class_param keeps a ref to the state-storage of the param, make both flavors use the same unsigned long under-type. ISTM this is simpler and safer. Signed-off-by: Jim Cromie --- include/linux/dynamic_debug.h | 2 +- lib/dynamic_debug.c | 2 +- 2 files changed, 2

[PATCH v7b 01/25] test-dyndbg: fixup CLASSMAP usage error

2023-10-13 Thread Jim Cromie
more careful reading of test output reveals: lib/test_dynamic_debug.c:103 [test_dynamic_debug]do_cats =pmf "doing categories\n" lib/test_dynamic_debug.c:105 [test_dynamic_debug]do_cats =p "LOW msg\n" class:MID lib/test_dynamic_debug.c:106 [test_dynamic_debug]do_cats =p "MID msg\n" class:HI

[PATCH v7b 02/25] dyndbg: reword "class unknown, " to "class:_UNKNOWN_"

2023-10-13 Thread Jim Cromie
This appears in the control-file to report an unknown class-name, which indicates that the class_id is not authorized, and dyndbg will ignore changes to it. Generally, this means that a DYNDBG_CLASSMAP_DEFINE or DYNDBG_CLASSMAP_USE is missing. But the word "unknown" appears in quite a few prdbg

[PATCH v7b 00/25] fix DRM_USE_DYNAMIC_DEBUG=y regression

2023-10-13 Thread Jim Cromie
hi Jason, DRM-folk (now with checkpatch fixes) This patchest fixes the chicken-egg initialization problem in the 1st version of ddebug-class-maps, that DRM-CI uncovered. The root-problem was DECLARE_DYNDBG_CLASSMAP, which broke the K rule: "define once, refer many". In patch 14 it is replaced

Re: [v4 0/3] Break out as separate driver from boe-tv101wum-nl6 panel driver

2023-10-13 Thread Doug Anderson
Hi, On Fri, Oct 13, 2023 at 2:18 AM Cong Yang wrote: > > Linus series proposed to break out ili9882t as separate driver, > but he didn't have time for that extensive rework of the driver. > As discussed by Linus and Doug [1], keep macro using the "struct > panel_init_cmd" > until we get some

Re: [v4 2/3] drm/panel: ili9882t: Avoid blurred screen from fast sleep

2023-10-13 Thread Doug Anderson
Hi, On Fri, Oct 13, 2023 at 2:19 AM Cong Yang wrote: > > At present, we have found that there may be a problem of blurred > screen during fast sleep/resume. The direct cause of the blurred > screen is that the IC does not receive 0x28/0x10. Because of the > particularity of the IC, before the

Re: [Intel-gfx] [PATCH] drm/i915/gem: Allow users to disable waitboost

2023-10-13 Thread Rodrigo Vivi
On Thu, Sep 28, 2023 at 01:48:34PM +0100, Tvrtko Ursulin wrote: > > On 27/09/2023 20:34, Belgaumkar, Vinay wrote: > > > > On 9/21/2023 3:41 AM, Tvrtko Ursulin wrote: > > > > > > On 20/09/2023 22:56, Vinay Belgaumkar wrote: > > > > Provide a bit to disable waitboost while waiting on a gem

[PATCH v2 2/2] video: fbdev: core: syscopyarea: fix sloppy typing

2023-10-13 Thread Sergey Shtylyov
In sys_copyarea(), the local variable bits_per_line is needlessly typed as *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit type on the 64-bit arches; that variable's value is derived from the __u32 typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a

[PATCH v2 0/2] Fix sloppy typing in the FB area copying routines

2023-10-13 Thread Sergey Shtylyov
Here are 2 patches against the 'master' branch of Linus' 'linux.git' repo... In {cfb|sys}_copyarea(), the local variable bits_per_line is needlessly typed as *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit type on the 64-bit arches;; that variable's value is derived

[PATCH v2 1/2] video: fbdev: core: cfbcopyarea: fix sloppy typing

2023-10-13 Thread Sergey Shtylyov
In cfb_copyarea(), the local variable bits_per_line is needlessly typed as *unsigned long* -- which is a 32-bit type on the 32-bit arches and a 64-bit type on the 64-bit arches; that variable's value is derived from the __u32 typed fb_fix_screeninfo::line_length field (multiplied by 8u) and a

Re: Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Pavel Machek
Hi! > coming from the leds mailing list I'm writing with Pavel how to best handle > per-key RGB keyboards. > > His suggestion was that it could be implemented as an aux display, but he > also suggested that I ask first if this fits. Thanks for doing this. > The specific keyboard RGB controller

Re: Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Pavel Machek
Hi! > > The specific keyboard RGB controller I want to implement takes 6*21 rgb > > values. However not every one is actually mapped to a physical key. e.g. the > > bottom row needs less entries because of the space bar. Additionally the > > keys are ofc not in a straight line from top to bottom.

Re: [PATCH 5/7] drm/sun4i: dw-hdmi: Split driver registration

2023-10-13 Thread Jernej Škrabec
Dne četrtek, 05. oktober 2023 ob 10:43:14 CEST je Maxime Ripard napisal(a): > On Mon, Sep 25, 2023 at 05:07:45PM +0200, Jernej Škrabec wrote: > > Dne ponedeljek, 25. september 2023 ob 09:47:15 CEST je Maxime Ripard > > napisal(a): > > > On Sun, Sep 24, 2023 at 09:26:02PM +0200, Jernej Skrabec

Re: [PATCH 5/9] dma-buf: heaps: mtk_sec_heap: Initialise tee session

2023-10-13 Thread Jeffrey Kardatzke
Sorry for the delayed reply, needed to get some more info. This really wouldn't be possible due to the limitation on the number of regions...for example only 32 regions can be defined on some SoCs, and you'd run out of regions really fast trying to do this. That's why this is creating heaps for

Re: [PATCH 5/9] dma-buf: heaps: mtk_sec_heap: Initialise tee session

2023-10-13 Thread Jeffrey Kardatzke
Sorry for the delayed reply, needed to get some more info. This really wouldn't be possible due to the limitation on the number of regions...for example only 32 regions can be defined on some SoCs, and you'd run out of regions really fast trying to do this. That's why this is creating heaps for

[PATCH 3/5] drm/panel: st7703: Add Powkiddy RGB30 Panel Support

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 4 inch panel is a 4 inch 720x720 DSI panel used in the Powkiddy RGB30 handheld gaming device. Add support for it. TODO: The panel seems to not resume properly from suspend. I've confirmed on the other ST7703 based devices it works correctly. Signed-off-by:

[PATCH 5/5] arm64: dts: rockchip: add support for Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 is a portable game device based on the Rockchip RK3566 SoC. It has GPIO buttons on the face and sides for input, stereo speakers, a 720x720 4 inch DSI display, a USB-C host port and a USB-C peripheral port, dual SD card slots, WiFi, Bluetooth, and 1GB of

[PATCH 1/5] dt-bindings: vendor-prefixes: document Powkiddy

2023-10-13 Thread Chris Morgan
From: Chris Morgan Document Powkiddy (https://powkiddy.com/). Signed-off-by: Chris Morgan --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml

[PATCH 4/5] dt-bindings: arm64: rockchip: add Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 is a portable handheld console from Powkiddy which uses the Rockchip RK3566 SoC. Signed-off-by: Chris Morgan --- Documentation/devicetree/bindings/arm/rockchip.yaml | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 2/5] dt-bindings: panel: Add Powkiddy RGB30 panel compatible

2023-10-13 Thread Chris Morgan
From: Chris Morgan The Powkiddy RGB30 panel is a 4 inch 720x720 MIPI-DSI LCD panel. It appears to be based on the ST7703 LCD controller (this is assumed from the init sequence similarity between this and other displays). Powkiddy would not share the part number or name for the display from the

[PATCH 0/5] Add Support for RK3566 Powkiddy RGB30

2023-10-13 Thread Chris Morgan
From: Chris Morgan Add support for the Powkiddy RGB30 handheld gaming console. Chris Morgan (5): dt-bindings: vendor-prefixes: document Powkiddy dt-bindings: panel: Add Powkiddy RGB30 panel compatible drm/panel: st7703: Add Powkiddy RGB30 Panel Support dt-bindings: arm64: rockchip: add

BUG: KASAN: slab-use-after-free in drm_connector_cleanup

2023-10-13 Thread Naresh Kamboju
Following kasan bug was noticed on arm64 bcm2711-rpi-4-b device running Linux next 6.6.0-rc5-next-20231011 with given config. This was first noticed on 6.6.0-rc2-next-20230918. This is an intermittent issue. Links to build and test logs provided. Reported-by: Linux Kernel Functional Testing

Re: [PATCH] drm/ci: Default to UART for logging

2023-10-13 Thread Rob Clark
On Fri, Oct 13, 2023 at 9:28 AM Daniel Stone wrote: > > On Fri, 6 Oct 2023 at 18:32, Rob Clark wrote: > > ssh logging is the default for mesa, as it is generally more reliable. > > But if there are kernel issues, especially at boot, UART logging is > > infinitely more useful. > > Hmm, we should

[pull] amdgpu, amdkfd, radeon, UAPI drm-next-6.7

2023-10-13 Thread Alex Deucher
Hi Dave, Daniel, New stuff for 6.7. The following changes since commit 3698a75f5a98d0a6599e2878ab25d30a82dd836a: Merge tag 'drm-intel-next-fixes-2023-08-24' of git://anongit.freedesktop.org/drm/drm-intel into drm-next (2023-08-25 12:55:55 +1000) are available in the Git repository at:

Re: [PATCH v5 3/7] drm/sched: Move schedule policy to scheduler

2023-10-13 Thread Luben Tuikov
On 2023-10-11 19:58, Matthew Brost wrote: > Rather than a global modparam for scheduling policy, move the scheduling > policy to scheduler so user can control each scheduler policy. > > v2: > - s/DRM_SCHED_POLICY_MAX/DRM_SCHED_POLICY_COUNT (Luben) > - Only include policy in scheduler (Luben)

Re: [PATCH v5 6/7] drm/ssd130x: Fix atomic_check for disabled planes

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, > The plane's atomic_check returns -EINVAL if the CRTC has not been > set. This is the case for disabled planes, for which atomic_check > should return 0. For disabled planes, it also omits the mandatory > call to drm_atomic_helper_check_plane_state(). >

Re: [v3 2/3] drm/panel: ili9882t: Avoid blurred screen from fast sleep

2023-10-13 Thread Doug Anderson
Hi, On Thu, Oct 12, 2023 at 8:56 PM cong yang wrote: > > Hi, > > On Fri, Oct 13, 2023 at 10:28 AM Doug Anderson wrote: > > > > Hi, > > > > On Thu, Oct 12, 2023 at 6:12 PM cong yang > > wrote: > > > > > > Hi, > > > > > > On Thu, Oct 12, 2023 at 11:15 PM Doug Anderson > > > wrote: > > > > > >

Re: Warning notice "Memory manager not clean during takedown" on RB5 runs

2023-10-13 Thread Dmitry Baryshkov
Hello Aishwarya, On Fri, 13 Oct 2023 at 19:05, Aishwarya TCV wrote: > > Hi Dmitry > > > On 17/08/2023 15:59, Dmitry Baryshkov wrote: > > Add displayport altmode declaration to the Type-C controller node to > > enable DP altmode negotiation. > > > > Signed-off-by: Dmitry Baryshkov > > --- > >

Re: [PATCH] drm/ci: Default to UART for logging

2023-10-13 Thread Daniel Stone
On Fri, 6 Oct 2023 at 18:32, Rob Clark wrote: > ssh logging is the default for mesa, as it is generally more reliable. > But if there are kernel issues, especially at boot, UART logging is > infinitely more useful. Hmm, we should still be capturing the UART boot logs regardless. Those go into a

Re: [PATCH v7 04/23] dt-bindings: display: mediatek: padding: Add MT8188

2023-10-13 Thread Daniel Stone
Hi Shawn, On Fri, 6 Oct 2023 at 08:38, Hsiao Chien Sung wrote: > + Padding provides ability to add pixels to width and height of a layer with > + specified colors. Due to hardware design, Mixer in VDOSYS1 requires > + width of a layer to be 2-pixel-align, or 4-pixel-align when ETHDR is >

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Daniel Vetter
On Fri, Oct 13, 2023 at 02:28:21PM +0200, Nirmoy Das wrote: > Hi Ville, > > On 10/13/2023 12:50 PM, Ville Syrjälä wrote: > > On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: > > > gen8_ggtt_invalidate() is only needed for limitted set of platforms > > > where GGTT is mapped as WC > > I

Re: [PATCH v2] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Matt Roper
On Fri, Oct 13, 2023 at 03:44:39PM +0200, Nirmoy Das wrote: > gen8_ggtt_invalidate() is only needed for limited set of platforms > where GGTT is mapped as WC otherwise this can cause unwanted > side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not > valid. > > v2: Add a func to detect

[PATCH v2] drm/i915/gvt: Optimize mmio_offset_compare() for efficiency

2023-10-13 Thread Kuan-Wei Chiu
The original code used conditional branching in the mmio_offset_compare function to compare two values and return -1, 1, or 0 based on the result. However, the list_sort comparison function only needs results <0, >0, or =0. This patch optimizes the code to make the comparison branchless, improving

[PATCH] drm/bridge: analogix: anx78xx: Check return value

2023-10-13 Thread Artem Chernyshev
In anx78xx_start() err value of anx78xx_clear_bits() overwriting without check. Found by Linux Verification Center (linuxtesting.org) with SVACE. Signed-off-by: Artem Chernyshev --- drivers/gpu/drm/bridge/analogix/analogix-anx78xx.c | 4 1 file changed, 4 insertions(+) diff --git

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, [...] >> As you mention that these could be follow-up changes, I assume that you >> agree with the current approach. Should I expect your review / ack for >> this patch-set? > > Please take my ack for this patchset > > Acked-by: Thomas Zimmermann >

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Thomas Zimmermann
Hi Am 13.10.23 um 16:57 schrieb Javier Martinez Canillas: Thomas Zimmermann writes: Hello Thomas, Thanks a lot for your feedback. Hi Javier, thanks for this patch. Am 12.10.23 um 23:38 schrieb Javier Martinez Canillas: [...] +static int ssd132x_fb_blit_rect(struct drm_framebuffer

Implement per-key keyboard backlight as auxdisplay?

2023-10-13 Thread Werner Sembach
Hi, coming from the leds mailing list I'm writing with Pavel how to best handle per-key RGB keyboards. His suggestion was that it could be implemented as an aux display, but he also suggested that I ask first if this fits. The specific keyboard RGB controller I want to implement takes 6*21

Re: [PATCH v3 4/6] drm/ssd130x: Add support for the SSD132x OLED controller family

2023-10-13 Thread Javier Martinez Canillas
Thomas Zimmermann writes: Hello Thomas, Thanks a lot for your feedback. > Hi Javier, > > thanks for this patch. > > Am 12.10.23 um 23:38 schrieb Javier Martinez Canillas: > [...] >> >> +static int ssd132x_fb_blit_rect(struct drm_framebuffer *fb, >> +const struct

[PATCH libdrm v4 1/9] util: improve SMPTE color LUT accuracy

2023-10-13 Thread Geert Uytterhoeven
Fill in the LSB when converting color components from 8-bit to 16-bit. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - New. --- tests/util/pattern.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH libdrm v4 9/9] modetest: add SMPTE pattern support for C[124] formats

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in buffers using a color-indexed frame buffer formats with two, four, or sixteen colors. Note that this still uses 256 as the CLUT size, as DRM_IOCTL_MODE_SETGAMMA enforces that the size matches against the (fixed) gamma size, while the CLUT size depends

[PATCH libdrm v4 4/9] util: store number of colors for indexed formats

2023-10-13 Thread Geert Uytterhoeven
Store the number of available colors for color-indexed frame buffer formats in the format_info[] array. This avoids the need of test code for having to use switch statements all the time to obtain the number of colors, or to check if a mode is color-indexed or not. Signed-off-by: Geert

[PATCH libdrm v4 2/9] util: factor out and optimize C8 SMPTE color LUT

2023-10-13 Thread Geert Uytterhoeven
The color LUT for the SMPTE pattern in indexed mode contains 22 entries, although only 13 are non-unique. Reduce the size of the color LUT by dropping duplicate entries, so it can be reused for formats supporting e.g. 16 colors. Rename the function util_smpte_c8_gamma() to util_smpte_fill_lut(),

[PATCH libdrm v4 7/9] util: add SMPTE pattern support for C2 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C2 indexed format. As only four colors are available, resolution is halved, and the pattern is drawn in a PenTile RG-GB matrix, using Floyd-Steinberg dithering. The magnitude of the green subpixels is reduced, as there are twice as

[PATCH libdrm v4 6/9] util: add SMPTE pattern support for C1 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C1 indexed format. As only two colors are available, the pattern is drawn in black and white, using Floyd-Steinberg dithering[1]. [1] https://en.wikipedia.org/wiki/Floyd%E2%80%93Steinberg_dithering Signed-off-by: Geert Uytterhoeven

[PATCH libdrm v4 5/9] util: add SMPTE pattern support for C4 format

2023-10-13 Thread Geert Uytterhoeven
Add support for drawing the SMPTE pattern in a buffer using the C4 indexed format. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Use new smpte_top[], - Split off changes to tests/util/pattern.c. --- tests/util/pattern.c | 42

[PATCH libdrm v4 8/9] modetest: add support for DRM_FORMAT_C[124]

2023-10-13 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Split off changes to tests/modetest/buffers.c. ---

[PATCH libdrm v4 3/9] util: add support for DRM_FORMAT_C[124]

2023-10-13 Thread Geert Uytterhoeven
Add support for creating buffers using the new color-indexed frame buffer formats with two, four, and sixteen colors. Signed-off-by: Geert Uytterhoeven Acked-by: Sam Ravnborg --- v4: - No changes, v3: - Add Acked-by, v2: - Split off changes to tests/util/format.c. ---

[PATCH libdrm v4 0/9] util, modetest: add support for low-color frame buffer formats

2023-10-13 Thread Geert Uytterhoeven
Hi all, A long outstanding issue with the DRM subsystem has been the lack of support for low-color displays, as used typically on older desktop systems, and on small embedded displays. This patch series adds support for color-indexed frame buffer formats with 2, 4, and 16 colors. It has

[PATCH] drm/ttm: Drain workqueue before sys manager release

2023-10-13 Thread Karolina Stolarek
In rare cases, a delayed destruction of a BO with a system resource could stay in the workqueue until drain_workqueue() is called in ttm_device_fini(). An attempt to free a resource from an already released manager results in NULL pointer dereference. Move the step of draining and destroying the

Re: DRM FB emulation initialisation leaving the display disabled

2023-10-13 Thread Dave Stevenson
Hi Thomas Thanks for the response. On Thu, 12 Oct 2023 at 08:03, Thomas Zimmermann wrote: > > Hi Dave > > Am 11.10.23 um 17:52 schrieb Dave Stevenson: > > Hi Thomas (and everyone else) > > > > Maxime has suggested you're the person for DRM framebuffer emulation. > > > > I'm getting some

Re: [PATCH v3 1/2] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: switch to drm_do_get_edid()

2023-10-13 Thread Robert Foss
On Thu, 21 Sep 2023 13:47:50 +0300, Ian Ray wrote: > Migrate away from custom EDID parsing and validity checks. > > Note: This is a follow-up to the original RFC by Jani [1]. The first > submission in this series should have been marked v2. > > [1] >

Re: [PATCH v3 2/2] MAINTAINERS: Update entry for megachips-stdpxxxx-ge-b850v3-fw

2023-10-13 Thread Robert Foss
On Thu, Sep 21, 2023 at 12:48 PM Ian Ray wrote: > > Replace Martin, who has left GE. > > Signed-off-by: Ian Ray > --- > MAINTAINERS | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MAINTAINERS b/MAINTAINERS > index bf0f54c..31bb835 100644 > --- a/MAINTAINERS > +++

Re: [PATCH v3 1/2] drm/bridge: megachips-stdpxxxx-ge-b850v3-fw: switch to drm_do_get_edid()

2023-10-13 Thread Robert Foss
On Thu, Sep 21, 2023 at 12:48 PM Ian Ray wrote: > > Migrate away from custom EDID parsing and validity checks. > > Note: This is a follow-up to the original RFC by Jani [1]. The first > submission in this series should have been marked v2. > > [1] >

Re: [PATCH] drm/atomic: Perform blocking commits on workqueue

2023-10-13 Thread Ray Strode
Hi On Fri, Oct 13, 2023 at 5:41 AM Daniel Vetter wrote: > > I mean we're not talking about scientific computing, or code > > compilation, or seti@home. We're talking about nearly the equivalent > > of `while (1) __asm__ ("nop");` > > I don't think anyone said this shouldn't be fixed or improved.

[PATCH v2] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
gen8_ggtt_invalidate() is only needed for limited set of platforms where GGTT is mapped as WC otherwise this can cause unwanted side-effects on XE_HP platforms where GFX_FLSH_CNTL_GEN6 is not valid. v2: Add a func to detect wc ggtt detection (Ville) Fixes: d2eae8e98d59 ("drm/i915/dg2: Drop

Re: [PATCH] drm/amdgpu/vkms: fix a possible null pointer dereference

2023-10-13 Thread Alex Deucher
On Thu, Oct 12, 2023 at 10:32 PM Ma Ke wrote: > > In amdgpu_vkms_conn_get_modes(), the return value of drm_cvt_mode() > is assigned to mode, which will lead to a NULL pointer dereference > on failure of drm_cvt_mode(). Add a check to avoid null pointer > dereference. > > Signed-off-by: Ma Ke

Re: [PATCH drm-misc-next v6 4/6] drm/gpuvm: track/lock/validate external/evicted objects

2023-10-13 Thread Thomas Hellström
Hi, On Mon, 2023-10-09 at 01:32 +0200, Danilo Krummrich wrote: > Currently the DRM GPUVM offers common infrastructure to track GPU VA > allocations and mappings, generically connect GPU VA mappings to > their > backing buffers and perform more complex mapping operations on the > GPU VA > space. >

[PATCH 4/4] drm/i915: Fix glk+ degamma LUT conversions

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current implementation of change_lut_val_precision() is just a convoluted way of shifting by 8. Implement the proper rounding by just using drm_color_lut_extract() and intel_color_lut_pack() like everyone else does. And as the uapi can't handle >=1.0 values but the

[PATCH 3/4] drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack()

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä Use min() instead of clamp() since the color values involved are unsigned. No functional changes. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH 2/4] drm/i915: Adjust LUT rounding rules

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä drm_color_lut_extract() rounding was changed to follow the OpenGL int<->float conversion rules. Adjust intel_color_lut_pack() to match. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/i915/display/intel_color.c | 14 ++ 1 file changed, 6 insertions(+), 8

[PATCH 1/4] drm: Fix color LUT rounding

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current implementation of drm_color_lut_extract() generates weird results. Eg. if we go through all the values for 16->8bpc conversion we see the following pattern: inout (count) 0 - 7f -> 0 (128) 80 - 17f -> 1 (256) 180 - 27f -> 2 (256) 280 -

[PATCH 0/4] drm/i915: Fix LUT rounding

2023-10-13 Thread Ville Syrjala
From: Ville Syrjälä The current LUT rounding is generating weird results. Adjust it to follow the OpenGL int<->float conversion rules. Ville Syrjälä (4): drm: Fix color LUT rounding drm/i915: Adjust LUT rounding rules drm/i915: s/clamp()/min()/ in i965_lut_11p6_max_pack() drm/i915: Fix

Re: [PATCH] drm/i915: Flush WC GGTT only on required platforms

2023-10-13 Thread Nirmoy Das
On 10/13/2023 2:55 PM, Ville Syrjälä wrote: On Fri, Oct 13, 2023 at 02:28:21PM +0200, Nirmoy Das wrote: Hi Ville, On 10/13/2023 12:50 PM, Ville Syrjälä wrote: On Fri, Oct 13, 2023 at 12:31:40PM +0200, Nirmoy Das wrote: gen8_ggtt_invalidate() is only needed for limitted set of platforms

  1   2   >