[PATCH v5 30/33] drm_print: add _ddebug descriptor to drm_*dbg prototypes

2022-08-05 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 v5 33/33] nouveau: WIP add 2 LEVEL_NUM classmaps for CLI, SUBDEV

2022-08-05 Thread Jim Cromie
clone the nvkm_printk,_,__ macro ladder into nvkm_drmdbg,_,__. And alter the debug, trace, spam macros to use the renamed ladder. This *sets-up* (not done yet) to remove the _subdev->debug >= (l) condition, once the bitmap-param is wired up correctly, and figured into dyndbg's jump-label

[PATCH v5 21/33] dyndbg: test DECLARE_DYNDBG_CLASSMAP, sysfs nodes

2022-08-05 Thread Jim Cromie
Demonstrate use of DECLARE_DYNDBG_CLASSMAP macro, and expose them as sysfs-nodes for testing. For each of the 4 class-map-types: - declare a class-map of that type, - declare the enum corresponding to those class-names - share _base across 0..30 range - add a __pr_debug_cls() call for

[PATCH v5 20/33] dyndbg: add drm.debug style (drm/parameters/debug) bitmap support

2022-08-05 Thread Jim Cromie
Add kernel_param_ops and callbacks to use a class-map to validate and apply input to a sysfs-node, which allows users to control classes defined in that class-map. This supports uses like: echo 0x3 > /sys/module/drm/parameters/debug IE add these: - int param_set_dyndbg_classes() - int

[PATCH v5 32/33] nouveau: adapt NV_DEBUG, NV_ATOMIC to use DRM.debug

2022-08-05 Thread Jim Cromie
These 2 macros used drm_debug_enabled() on DRM_UT_{DRIVER,ATOMIC} respectively, replace those with drm_dbg_##cat invocations. this results in new class'd prdbg callsites: :#> grep nouveau /proc/dynamic_debug/control | grep class | wc 1161130 15584 :#> grep nouveau

[PATCH v5 18/33] doc-dyndbg: describe "class CLASS_NAME" query support

2022-08-05 Thread Jim Cromie
Add an explanation of the new "class CLASS_NAME" syntax and meaning, noting that the module determines if CLASS_NAME applies to it. Signed-off-by: Jim Cromie --- Documentation/admin-guide/dynamic-debug-howto.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git

[PATCH v5 25/33] drm_print: wrap drm_*_dbg in dyndbg descriptor factory macro

2022-08-05 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 v5 29/33] drm_print: prefer bare printk KERN_DEBUG on generic fn

2022-08-05 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 v5 31/33] nouveau: change nvkm_debug/trace to use dev_dbg POC

2022-08-05 Thread Jim Cromie
These 2 macros formerly used dev_info, and they still check subdev->debug to gate the printing. So dyndbg control is redundant ATM (and possibly confusing, since its off by default). prdbg count is up from 3, or from 65 (with VMM_DEBUG here) [7.765379] dyndbg: 516 debug prints in module

[PATCH v5 27/33] drm-print: add drm_dbg_driver to improve namespace symmetry

2022-08-05 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 v5 19/33] doc-dyndbg: edit dynamic-debug-howto for brevity, audience

2022-08-05 Thread Jim Cromie
Rework/modernize docs: - use /proc/dynamic_debug/control in examples its *always* there (when dyndbg is config'd), even when is not. drop talk, its a distraction here. - alias ddcmd='echo $* > /proc/dynamic_debug/control focus on args: declutter, hide boilerplate, make pwd

[PATCH v5 24/33] drm_print: interpose drm_*dbg with forwarding macros

2022-08-05 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 v5 14/33] dyndbg: add DECLARE_DYNDBG_CLASSMAP macro

2022-08-05 Thread Jim Cromie
With DECLARE_DYNDBG_CLASSMAP modules can declare up to 31 classnames. By doing so, they authorize dyndbg to manipulate class'd prdbgs (ie: __pr_debug_cls, and soon drm_*dbg) :#> echo class DRM_UT_KMS +p > /proc/dynamic_debug/control The macro declares and initializes a static struct

[PATCH v5 15/33] kernel/module: add __dyndbg_classes section

2022-08-05 Thread Jim Cromie
Add __dyndbg_classes section, using __dyndbg as a model. Use it: vmlinux.lds.h: KEEP the new section, which also silences orphan section warning on loadable modules. Add (__start_/__stop_)__dyndbg_classes linker symbols for the c externs (below). kernel/module/main.c: - fill new fields in

[PATCH v5 28/33] drm_print: refine drm_debug_enabled for jump-label

2022-08-05 Thread Jim Cromie
In order to use dynamic-debug's jump-label optimization in drm-debug, its clarifying to refine drm_debug_enabled into 3 uses: 1. drm_debug_enabled - legacy, public 2. __drm_debug_enabled - optimized for dyndbg jump-label enablement. 3. _drm_debug_enabled - pr_debug instrumented, observable 1.

[PATCH v5 23/33] drm: POC drm on dyndbg - use in core, 2 helpers, 3 drivers.

2022-08-05 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 v5 26/33] drm-print.h: include dyndbg header

2022-08-05 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 v5 22/33] drm_print: condense enum drm_debug_category

2022-08-05 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 v5 17/33] dyndbg: validate class FOO by checking with module

2022-08-05 Thread Jim Cromie
Add module-to-class validation: #> echo class DRM_UT_KMS +p > /proc/dynamic_debug/control If a query has "class FOO", then ddebug_find_valid_class(), called from ddebug_change(), requires that FOO is known to module X, otherwize the query is skipped entirely for X. This protects each module's

[PATCH v5 12/33] dyndbg: add class_id to pr_debug callsites

2022-08-05 Thread Jim Cromie
DRM issues ~10 exclusive categories of debug messages; to represent this directly in dyndbg, add a new field: struct _ddebug.class_id:5. This gives us 32 classes, which is a practical usability limit with a bitmap interface: #> echo 0x012345678 > /sys/module/drm/parameters/debug All existing

[PATCH v5 13/33] dyndbg: add __pr_debug_cls for testing

2022-08-05 Thread Jim Cromie
For selftest purposes, add __pr_debug_cls(class, fmt, ...) I didn't think we'd need to define this, since DRM effectively has it already in drm_dbg, drm_devdbg. But test_dynamic_debug needs it in order to demonstrate all the moving parts. Note the __ prefix; its not intended for general use, at

[PATCH v5 07/33] dyndbg: let query-modname override actual module name

2022-08-05 Thread Jim Cromie
dyndbg's control-parser: ddebug_parse_query(), requires that search terms: module, func, file, lineno, are used only once in a query; a thing cannot be named both foo and bar. The cited commit added an overriding module modname, taken from the module loader, which is authoritative. So it set

[PATCH v5 09/33] dyndbg: drop EXPORTed dynamic_debug_exec_queries

2022-08-05 Thread Jim Cromie
This exported fn is unused, and will not be needed. Lets dump it. The export was added to let drm control pr_debugs, as part of using them to avoid drm_debug_enabled overheads. But its better to just implement the drm.debug bitmap interface, then its available for everyone. Fixes: a2d375eda771

[PATCH v5 08/33] dyndbg: add test_dynamic_debug module

2022-08-05 Thread Jim Cromie
Provide a simple module to allow testing DYNAMIC_DEBUG behavior. It calls do_prints() from module-init, and with a sysfs-node. dmesg -C dmesg -w & modprobe test_dynamic_debug dyndbg=+p echo 1 > /sys/module/dynamic_debug/parameters/verbose cat

[PATCH v5 16/33] dyndbg: add ddebug_attach_module_classes

2022-08-05 Thread Jim Cromie
Add ddebug_attach_module_classes(), call it from ddebug_add_module(). It scans the classes/section its given, finds records where the module-name matches the module being added, and adds them to the module's maps list. No locking here, since the record isn't yet linked into the ddebug_tables

[PATCH v5 05/33] dyndbg: reverse module.callsite walk in cat control

2022-08-05 Thread Jim Cromie
Walk the module's vector of callsites backwards; ie N..0. This "corrects" the backwards appearance of a module's prdbg vector when walked 0..N. I think this is due to linker mechanics, which I'm inclined to treat as immutable, and the order is fixable in display. No functional changes.

[PATCH v5 06/33] dyndbg: use ESCAPE_SPACE for cat control

2022-08-05 Thread Jim Cromie
`cat control` currently does octal escape, so '\n' becomes "\012". Change this to display as "\n" instead, which reads much cleaner. :#> head -n7 /proc/dynamic_debug/control # filename:lineno [module]function flags format init/main.c:1179 [main]initcall_blacklist =_ "blacklisting

[PATCH v5 11/33] dyndbg: create and use struct _ddebug_info

2022-08-05 Thread Jim Cromie
this new struct gathers the linker provided vectors/sections: descs - the vector of descriptors in __dyndbg section. num_descs - length of the data/section Use it as follows: In lib/dynamic_debug.c: Alter ddebug_add_module() params-list, replacing descriptor-table and its length with a

[PATCH v5 10/33] dyndbg: cleanup local vars in ddebug_init

2022-08-05 Thread Jim Cromie
rework var-names for clarity, regularity rename variables - n to mod_sites - it counts sites-per-module - entries to i - display only - iter_start to iter_mod_start - marks start of each module's subrange - modct to mod_ct - stylistic new iterator var: - site - cursor parallel to iter

[PATCH v5 04/33] dyndbg: reverse module walk in cat control

2022-08-05 Thread Jim Cromie
/proc/dynamic_debug/control walks the prdbg catalog in "reverse", fix this by adding new ddebug_tables to tail of list. This puts init/main.c entries 1st, which looks more than coincidental. no functional changes. Signed-off-by: Jim Cromie Acked-by: Jason Baron --- lib/dynamic_debug.c | 2 +-

[PATCH v5 02/33] dyndbg: fix module.dyndbg handling

2022-08-05 Thread Jim Cromie
For CONFIG_DYNAMIC_DEBUG=N, the ddebug_dyndbg_module_param_cb() stub-fn is too permissive: bash-5.1# modprobe drm JUNKdyndbg bash-5.1# modprobe drm dyndbgJUNK [ 42.933220] dyndbg param is supported only in CONFIG_DYNAMIC_DEBUG builds [ 42.937484] ACPI: bus type drm_connector registered This

[PATCH v5 03/33] dyndbg: show both old and new in change-info

2022-08-05 Thread Jim Cromie
print "old => new" flag values to the info("change") message. no functional change. Signed-off-by: Jim Cromie Acked-by: Jason Baron --- lib/dynamic_debug.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index

[PATCH v5 01/33] dyndbg: fix static_branch manipulation

2022-08-05 Thread Jim Cromie
In https://lore.kernel.org/lkml/20211209150910.ga23...@axis.com/ Vincent's patch commented on, and worked around, a bug toggling static_branch's, when a 2nd PRINTK-ish flag was added. The bug results in a premature static_branch_disable when the 1st of 2 flags was disabled. The cited commit

[PATCH v5 00/33] DYNDBG: opt-in class'd debug for modules, use in drm.

2022-08-05 Thread Jim Cromie
Hi Jason, Greg, DRM-folk, heres V5. Diffs vs V4: 1st 9 have Jason's Ack 10 is new: simple var cleanup 11 new struct, to contain future addins. touches kernel/module/ dyndbg-param callbacks moved to last (of dyndbg patches) they're where the uncertainty is, and the bulk of the API

Re: [PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-05 Thread Lyude Paul
lgtm! Reviewed-by: Lyude Paul On Fri, 2022-08-05 at 17:13 -0400, Hamza Mahfooz wrote: > Currently, there is no way to identify if DSC pass-through can be > enabled and what aux DSC pass-through requests ought to be sent to. So, > add a variable to struct drm_dp_mst_port that keeps track of the

[PATCH v2 3/3] drm/amd/display: implement DSC pass-through support

2022-08-05 Thread Hamza Mahfooz
Currently, we only attempt to setup DSC at the virtual DPCD port, however many modern displays come with DSC support and MST hubs can now support DSC pass-through. So, to more optimally make use of the available bandwidth, use DSC pass-through when possible by adding DSC pass-through enablement

[PATCH v2 2/3] drm/amd/display: consider DSC pass-through during mode validation

2022-08-05 Thread Hamza Mahfooz
Add a mode validation routine for DSC pass-through. Both the link from source to hub, and the link from hub to monitor are checked, according to the current link training result and full pbn returned by enum path resource sideband message. Pick up the minimum value as the bandwidth bottleneck for

[PATCH v2 1/3] drm/dp_mst: add passthrough_aux to struct drm_dp_mst_port

2022-08-05 Thread Hamza Mahfooz
Currently, there is no way to identify if DSC pass-through can be enabled and what aux DSC pass-through requests ought to be sent to. So, add a variable to struct drm_dp_mst_port that keeps track of the aforementioned information. Signed-off-by: Hamza Mahfooz --- v2: define

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Arnd Bergmann
On Fri, Aug 5, 2022 at 8:02 PM Nathan Chancellor wrote: > On Fri, Aug 05, 2022 at 06:16:45PM +0200, Arnd Bergmann wrote: > > On Fri, Aug 5, 2022 at 5:32 PM Harry Wentland > > wrote: > > While splitting out sub-functions can help reduce the maximum stack > > usage, it seems that in this case it

[PATCH 08/32] drm/amd/display: Refactor SubVP calculation to remove FPU

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] Refactor calculation to remove floating point operations Reviewed-by: Rodrigo Siqueira Acked-by: Tom Chung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 86 ++-- 1 file changed, 42 insertions(+), 44 deletions(-)

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Nathan Chancellor
On Fri, Aug 05, 2022 at 06:16:45PM +0200, Arnd Bergmann wrote: > On Fri, Aug 5, 2022 at 5:32 PM Harry Wentland wrote: > > > I do notice that these files build with a non-configurable > > > -Wframe-large-than value: > > > > > > $ rg frame_warn_flag drivers/gpu/drm/amd/display/dc/dml/Makefile > > >

[PATCH 32/32] drm/amd/display: 3.2.197

2022-08-05 Thread Tom Chung
From: Aric Cyr This version brings along following fixes: - Move fpu file to dml folder - Fix CAB allocation for multiple displays - Add a variable to update FCLK - Fix TMDS 4K@60Hz YCbCr420 corruption issue - Fix MPC tree infinite loop in some case - Fix SubVP calculations - Fix HDMI VSIF V3

[PATCH 31/32] drm/amd/display: Fix TDR eDP and USB4 display light up issue

2022-08-05 Thread Tom Chung
From: Meenakshikumar Somasundaram [Why] After TDR recovery, eDP and USB4 display does not light up. Because dmub outbox notifications are not enabled after dmub reload and link encoder assignments for the streams are not cleared before dc state reset. [How] - Dmub outbox notification is enabled

[PATCH 30/32] drm/amd/display: clear optc underflow before turn off odm clock

2022-08-05 Thread Tom Chung
From: Fudong Wang [Why] After ODM clock off, optc underflow bit will be kept there always and clear not work. We need to clear that before clock off. [How] Clear that if have when clock off. Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Fudong Wang ---

[PATCH 29/32] drm/amd/display: Don't try to enter MALL SS if stereo3d

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] MALL not supported with stereo3D according to DCN doc. Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee --- .../drm/amd/display/dc/dcn32/dcn32_hwseq.c| 26 --- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git

[PATCH 28/32] drm/amd/display: For stereo keep "FLIP_ANY_FRAME"

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] Observed in stereomode that programming FLIP_LEFT_EYE can cause hangs. Keep FLIP_ANY_FRAME in stereo mode so the surface flip can take place before left or right eye Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee ---

[PATCH 27/32] drm/amd/display: Revert "attempt to fix the logic in commit_planes_for_stream()"

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] Reverts commit "attempt to fix the logic in commit_planes_for_stream()" since it caused a regression. Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/core/dc.c | 27 +++- 1 file

[PATCH 26/32] drm/amd/display: Correct DTBCLK for dcn314

2022-08-05 Thread Tom Chung
From: Duncan Ma [Why] DTBCLK clocks reset after clocks are initialized and bounding box values are also incorrect. [How] Use dcn31 init clock function programming sequence and correct bounding box values for dcn314 Reviewed-by: Nicholas Kazlauskas Reviewed-by: Jun Lei Acked-by: Tom Chung

[PATCH 25/32] drm/amd/display: Enable SubVP by default on DCN32 & DCN321

2022-08-05 Thread Tom Chung
From: Aurabindo Pillai [Why] Set the debug options to enable SubVP feature Reviewed-by: Alvin Lee Acked-by: Tom Chung Signed-off-by: Aurabindo Pillai --- drivers/gpu/drm/amd/display/dc/dcn32/dcn32_resource.c | 2 +- drivers/gpu/drm/amd/display/dc/dcn321/dcn321_resource.c | 2 +- 2 files

[PATCH 24/32] drm/amd/display: Check correct bounds for stream encoder instances for DCN303

2022-08-05 Thread Tom Chung
From: Aurabindo Pillai [Why & How] eng_id for DCN303 cannot be more than 1, since we have only two instances of stream encoders. Check the correct boundary condition for engine ID for DCN303 prevent the potential out of bounds access. Fixes: cd6d421e3d1a ("drm/amd/display: Initial DC support

[PATCH 23/32] drm/amd/display: Fix VPG instancing for dcn314 HPO

2022-08-05 Thread Tom Chung
From: Duncan Ma [Why] An issue during VPG indexing offset generation causing to use the incorrect VPG. HW team placed VPG instances 5 at end of list, making it VPG 9 in register headers. [How] Correct VPG instance for HPO encoders. Reviewed-by: Charlene Liu Acked-by: Tom Chung Signed-off-by:

[PATCH 22/32] drm/amd/display: Fix Compile-time Warning

2022-08-05 Thread Tom Chung
From: David Galiffi Fixed bracketing around condition statement. Reviewed-by: Alvin Lee Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: David Galiffi --- drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git

[PATCH 21/32] drm/amd/display: Allow alternate prefetch modes in DML for DCN32

2022-08-05 Thread Tom Chung
From: David Galiffi [Why] Driver is restricting voltage levels if system cannot switch in vblank. [How] Change allow_for_pstate_or_stutter_in_vblank_final from dm_prefetch_support_uclk_fclk_and_stutter to dm_prefetch_support_uclk_fclk_and_stutter_if_possible. Add support for a new registry

[PATCH 19/32] drm/amd/display: Expand documentation for timing

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira The timing programming inside DCN is far from trivial, it has multiple parameters associated with that, and the lack of documentation does not help comprehend this already complicated topic. This commit tries to improve this situation by expanding the documentation of

[PATCH 20/32] drm/amd/display: Document some of the DML structs

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- .../amd/display/dc/dml/display_mode_structs.h | 34 +++ 1 file changed, 34 insertions(+) diff --git a/drivers/gpu/drm/amd/display/dc/dml/display_mode_structs.h

[PATCH 18/32] drm/amd/display: Document pipe split policy

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira In the DCN code, we can find some references to three different pipe split policies but no clear description. This commit adds some kernel-doc that explains more about these options and a little bit of their impact. Reviewed-by: Harry Wentland Acked-by: Tom Chung

[PATCH 17/32] drm/amd/display: Add some extra kernel doc to amdgpu_dm

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 16 +-- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 46 +-- 2 files changed, 54 insertions(+), 8 deletions(-)

[PATCH 16/32] drm/amd/display: Add basic kernel doc to CRC code under DC

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/core/dc.c | 17 +++-- .../gpu/drm/amd/display/dc/dcn10/dcn10_optc.c | 25 --- .../gpu/drm/amd/display/dc/inc/core_types.h |

[PATCH 15/32] drm/amd/display: Add documentation to some of the cursor struct

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira Reviewed-by: Harry Wentland Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/dc/dc_hw_types.h | 62 +--- 1 file changed, 55 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/display/dc/dc_hw_types.h

[PATCH 14/32] drm/amd/display: Fix HDMI VSIF V3 incorrect issue

2022-08-05 Thread Tom Chung
From: Leo Ma [Why] Reported from customer the checksum in AMD VSIF V3 is incorrect and causing blank screen issue. [How] Fix the packet length issue on AMD HDMI VSIF V3. Reviewed-by: Anthony Koo Acked-by: Tom Chung Signed-off-by: Leo Ma --- .../drm/amd/display/modules/freesync/freesync.c

[PATCH 13/32] drm/amd/display: Fix subvp calculations

2022-08-05 Thread Tom Chung
From: Alvin Lee [Descriptions] Missed some brackets in order of operations Reviewed-by: Samson Tam Acked-by: Tom Chung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 48 ++-- 1 file changed, 25 insertions(+), 23 deletions(-) diff --git

[PATCH 12/32] drm/amd/display: Avoid MPC infinite loop

2022-08-05 Thread Tom Chung
From: Josip Pavic [Why] In some cases MPC tree bottom pipe ends up point to itself. This causes iterating from top to bottom to hang the system in an infinite loop. [How] When looping to next MPC bottom pipe, check that the pointer is not same as current to avoid infinite loop. Reviewed-by:

[PATCH 10/32] drm/amd/display: Device flash garbage before get in OS

2022-08-05 Thread Tom Chung
From: Chiawen Huang [Why] Enabling stream with tg lock makes config settings pending causing the garbage until tg unlock. [How] Keep the original lock mechanism The driver doesn't lock tg if plane_state is null. Reviewed-by: Anthony Koo Acked-by: Tom Chung Signed-off-by: Chiawen Huang ---

[PATCH 11/32] drm/amd/display: Add 16 lines margin for SubVP

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] SUBVP_START_LINE must be aligned to 2 swaths, so add 16 lines of margin so the start line can be adjusted by up to 16 lines for alignment purposes in FW. Reviewed-by: Jun Lei Reviewed-by: Jun Lei Acked-by: Tom Chung Signed-off-by: Alvin Lee ---

[PATCH 09/32] drm/amd/display: Fix TMDS 4K@60Hz YCbCr420 corruption issue

2022-08-05 Thread Tom Chung
From: Daniel Miess [Why] DIG_FIFO_OUTPUT_PIXEL_MODE not being set for dcn314 resulting in incorrect timing for YCbCr4:2:0 [How] Copy the implementation of set_pixels_per_cycle from dcn32 over to dcn314 Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Daniel Miess ---

[PATCH 05/32] drm/amd/display: fix CAB allocation for multiple displays

2022-08-05 Thread Tom Chung
From: Aurabindo Pillai [Why & How] When multiple displays are used, the underlying framebuffers could be two separate framebuffers, or a single large framebuffer. Fix the calculation logic for CAB to account for large framebuffer. Current logic assumes that any FB that the plane points to are

[PATCH 06/32] drm/amd/display: Revert "fix 32 bit compilation errors in dc_dmub_srv.c"

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] Revert commit that refactors SubVP calculation incorrectly. Reviewed-by: Chaitanya Dhere Acked-by: Tom Chung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc_dmub_srv.c | 67 ++-- 1 file changed, 33 insertions(+), 34 deletions(-)

[PATCH 07/32] drm/amd/display: Add a variable to update FCLK latency

2022-08-05 Thread Tom Chung
From: Alvin Lee [Description] Add a variable to update FCLK latency Reviewed-by: Martin Leung Acked-by: Tom Chung Signed-off-by: Alvin Lee --- drivers/gpu/drm/amd/display/dc/dc.h| 1 + drivers/gpu/drm/amd/display/dc/dml/dcn32/dcn32_fpu.c | 7 +++

[PATCH 04/32] drm/amd/display: Drop FPU flags from Makefile

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira At this point, we isolate the FPU code associated with DCN314 under the DML folder. This commit drops the FPU flags from the Makefile. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dcn314/Makefile

[PATCH 02/32] drm/amd/display: Create FPU files for DCN314

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira DCN314 has multiple references to FPU operations inside the resource files, and we need to move those codes to the DML folder. This commit creates the dcn314_fpu files and moves the bounding box operation to this file. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung

[PATCH 03/32] drm/amd/display: Move populate dml pipes from DCN314 to dml

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira The function responsible for populating DML pipes has some FPU operations, and for this reason, it must be moved to the dml folder. This commit moves such function from resource to the fpu file under the dml folder. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung

[PATCH 01/32] drm/amd/display: Use pixels per container logic for DCN314 DCCG dividers

2022-08-05 Thread Tom Chung
From: Daniel Miess [Why] DP DSC YCbCr422 not working because dcn314_calculate_dccg_k1_k2_values does not account for two pixels per container [How] Replace the contents of dcn314_calculate_dccg_k1_k2_values with the code from the function dcn32_calculate_dccg_k1_k2_values Reviewed-by: Charlene

[PATCH 00/32] DC Patches July 29 2022

2022-08-05 Thread Tom Chung
This DC patchset brings along following fixes: - Move fpu file to dml folder - Fix CAB allocation for multiple displays - Add a variable to update FCLK - Fix TMDS 4K@60Hz YCbCr420 corruption issue - Fix MPC tree infinite loop in some case - Fix SubVP calculations - Fix HDMI VSIF V3 blank screen

Re: [PATCH] drm/amd/display: set panel orientation before drm_dev_register

2022-08-05 Thread Simon Ser
Hi, Have you seen [1] and [2]? CC'ing Sean and Hans, it seems like there's a disagreement regarding probing early vs. setting the initial value to UNKNOWN. If a driver doesn't fetch EDIDs before exposing them to user-space, then there is an amount of time where the connectors are exposed as

[PATCH 03/32] drm/amd/display: Move populate dml pipes from DCN314 to dml

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira The function responsible for populating DML pipes has some FPU operations, and for this reason, it must be moved to the dml folder. This commit moves such function from resource to the fpu file under the dml folder. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung

[PATCH 01/32] drm/amd/display: Use pixels per container logic for DCN314 DCCG dividers

2022-08-05 Thread Tom Chung
From: Daniel Miess [Why] DP DSC YCbCr422 not working because dcn314_calculate_dccg_k1_k2_values does not account for two pixels per container [How] Replace the contents of dcn314_calculate_dccg_k1_k2_values with the code from the function dcn32_calculate_dccg_k1_k2_values Reviewed-by: Charlene

[PATCH 02/32] drm/amd/display: Create FPU files for DCN314

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira DCN314 has multiple references to FPU operations inside the resource files, and we need to move those codes to the DML folder. This commit creates the dcn314_fpu files and moves the bounding box operation to this file. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung

[PATCH 04/32] drm/amd/display: Drop FPU flags from Makefile

2022-08-05 Thread Tom Chung
From: Rodrigo Siqueira At this point, we isolate the FPU code associated with DCN314 under the DML folder. This commit drops the FPU flags from the Makefile. Reviewed-by: Nicholas Kazlauskas Acked-by: Tom Chung Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/dc/dcn314/Makefile

[PATCH 00/32] DC Patches July 29 2022

2022-08-05 Thread Tom Chung
This DC patchset brings along following fixes: - Move fpu file to dml folder - Fix CAB allocation for multiple displays - Add a variable to update FCLK - Fix TMDS 4K@60Hz YCbCr420 corruption issue - Fix MPC tree infinite loop in some case - Fix SubVP calculations - Fix HDMI VSIF V3 blank screen

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Arnd Bergmann
On Fri, Aug 5, 2022 at 5:32 PM Harry Wentland wrote: > > I do notice that these files build with a non-configurable > > -Wframe-large-than value: > > > > $ rg frame_warn_flag drivers/gpu/drm/amd/display/dc/dml/Makefile > > 54:frame_warn_flag := -Wframe-larger-than=2048 > > Tbh, I was looking at

[PATCH] drm/amdgpu: use sjt mec fw on aldebaran for sriov

2022-08-05 Thread shaoyunl
The second jump table is required on live migration or mulitple VF configuration on Aldebaran. With this implemented, the first level jump table(hw used) will be same, mec fw internal will use the second level jump table jump to the real functionality implementation. so the different VF can load

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Harry Wentland
On 2022-08-04 16:43, Nathan Chancellor wrote: > On Thu, Aug 04, 2022 at 09:24:41PM +0200, Arnd Bergmann wrote: >> On Thu, Aug 4, 2022 at 8:52 PM Linus Torvalds >> wrote: >>> >>> On Thu, Aug 4, 2022 at 11:37 AM Sudip Mukherjee (Codethink) >>> wrote:cov_trace_cmp git bisect points to

RE: [PATCH 2/2] drm/amdgpu: enable GFX Clock Gating control for GC IP v11.0.1

2022-08-05 Thread Zhang, Yifan
[Public] This series is Reviewed-by: Yifan Zhang -Original Message- From: Huang, Tim Sent: Friday, August 5, 2022 12:13 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Du, Xiaojian ; Huang, Tim Subject: [PATCH 2/2] drm/amdgpu: enable GFX Clock Gating

RE: [PATCH 2/2] drm/amdgpu/pm: remove EnableGfxOff message for SMU IP v13.0.4

2022-08-05 Thread Zhang, Yifan
[Public] This series is: Reviewed-by: Yifan Zhang -Original Message- From: Huang, Tim Sent: Friday, August 5, 2022 5:44 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Du, Xiaojian ; Huang, Tim Subject: [PATCH 2/2] drm/amdgpu/pm: remove EnableGfxOff

[PATCH 2/2] drm/amdgpu/pm: remove EnableGfxOff message for SMU IP v13.0.4

2022-08-05 Thread Tim Huang
The EnableGfxOff message is dropped from the new PMFW ppsmc interface. Signed-off-by: Tim Huang --- .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c | 14 -- 1 file changed, 14 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_4_ppt.c

[PATCH 1/2] drm/amdgpu/pm: update smu driver interface header for SMU IP v13.0.4

2022-08-05 Thread Tim Huang
Update the SmuMetrics_t defination and SMU driver interface version. Signed-off-by: Tim Huang --- .../drm/amd/pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_4.h| 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git

Re: [PATCH v4 4/6] drm/i915: Implement intersect/compatible functions

2022-08-05 Thread Matthew Auld
On 04/08/2022 09:59, Arunpravin Paneer Selvam wrote: Implemented a new intersect and compatible callback function fetching start offset from drm buddy allocator. v3: move the bits that are specific to buddy_man (Matthew) v4: consider the block size /range (Matthew) Signed-off-by: Christian

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Linus Torvalds
On Thu, Aug 4, 2022 at 11:37 AM Sudip Mukherjee (Codethink) wrote: > > git bisect points to 3876a8b5e241 ("drm/amd/display: Enable building new > display engine with KCOV enabled"). Ahh. So that was presumably why it was disabled before - because it presumably does disgusting things that make

Re: mainline build failure due to 6fdd2077ec03 ("drm/amd/amdgpu: add memory training support for PSP_V13")

2022-08-05 Thread Sudip Mukherjee
On Thu, Aug 4, 2022 at 6:17 PM Linus Torvalds wrote: > > On Thu, Aug 4, 2022 at 12:35 AM Sudip Mukherjee (Codethink) > wrote: > > > > I will be happy to test any patch or provide any extra log if needed. > > It sounds like that file just needs to get a > > #include > > there, and for some

mainline build failure due to 6fdd2077ec03 ("drm/amd/amdgpu: add memory training support for PSP_V13")

2022-08-05 Thread Sudip Mukherjee (Codethink)
Hi All, The latest mainline kernel branch fails to build for alpha and mips allmodconfig with the error: drivers/gpu/drm/amd/amdgpu/psp_v13_0.c: In function 'psp_v13_0_memory_training': drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:23: error: implicit declaration of function 'vmalloc'; did you

[PATCH] drm/amd/amdgpu: fix build failure due to implicit declaration

2022-08-05 Thread Sudip Mukherjee
The builds for alpha and mips allmodconfig fails with the error: drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:23: error: implicit declaration of function 'vmalloc'; did you mean 'kvmalloc'? [-Werror=implicit-function-declaration] drivers/gpu/drm/amd/amdgpu/psp_v13_0.c:534:21: error:

Re: mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Linus Torvalds
On Thu, Aug 4, 2022 at 1:43 PM Nathan Chancellor wrote: > > I do note that commit 1b54a0121dba ("drm/amd/display: Reduce stack size > in the mode support function") did have a workaround for GCC. It appears > clang will still inline mode_support_configuration(). If I mark it as > 'noinline', the

Re: mainline build failure due to 6fdd2077ec03 ("drm/amd/amdgpu: add memory training support for PSP_V13")

2022-08-05 Thread Linus Torvalds
On Thu, Aug 4, 2022 at 12:35 AM Sudip Mukherjee (Codethink) wrote: > > I will be happy to test any patch or provide any extra log if needed. It sounds like that file just needs to get a #include there, and for some reason architectures other than alpha and mips end up getting it

[drm:radeon_cs_ioctl [radeon]] *ERROR* Failed to parse relocation -12!

2022-08-05 Thread Tj
On Debian 11 Bullseye amd64 with local builds of the kernel (mainline RCs, and stable tree) and at least since v5.16 through to v5.19, this error consistently occurs when using VLC (vlc/stable,stable-security,now 3.0.17.4-0+deb11u1 amd64) to play videos - although other players which likely

[PATCH -next RESEND] drm/amd/display: Simplify bool conversion

2022-08-05 Thread Yang Li
Fix the following coccicheck warning: ./drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c:109:52-57: WARNING: conversion to bool not needed here Reported-by: Abaci Robot Signed-off-by: Yang Li --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_crtc.c | 2 +- 1 file changed, 1

Re: [PATCH v3 2/3] drm/amdgpu_dm: Rely on split out luminance calculation function

2022-08-05 Thread Jani Nikula
On Tue, 19 Jul 2022, Jouni Högander wrote: > Luminance range calculation was split out into drm_edid.c and is now > part of edid parsing. Rely on values calculated during edid parsing and > use these for caps->aux_max_input_signal and caps->aux_min_input_signal. Harry, I'll merge patches 1 & 3

mainline build failure for x86_64 allmodconfig with clang

2022-08-05 Thread Sudip Mukherjee (Codethink)
Hi All, The latest mainline kernel branch fails to build for x86_64 allmodconfig with clang. The errors are: drivers/gpu/drm/amd/amdgpu/../display/dc/dml/dcn30/display_mode_vba_30.c:3596:6: error: stack frame size (2216) exceeds limit (2048) in 'dml30_ModeSupportAndSystemConfigurationFull'