Re: [PATCH v6 0/2] Add p2p via dmabuf to habanalabs

2021-09-15 Thread Oded Gabbay
On Tue, Sep 14, 2021 at 7:12 PM Jason Gunthorpe wrote: > > On Tue, Sep 14, 2021 at 04:18:31PM +0200, Daniel Vetter wrote: > > On Sun, Sep 12, 2021 at 07:53:07PM +0300, Oded Gabbay wrote: > > > Hi, > > > Re-sending this patch-set following the release of our user-space TPC > > > compiler and runtim

Re: [PATCH] drm/ttm: fix the type mismatch error on sparc64

2021-09-15 Thread Christian König
Am 14.09.21 um 22:03 schrieb Linus Torvalds: On Tue, Sep 14, 2021 at 12:48 PM Alex Deucher wrote: On Tue, Sep 7, 2021 at 6:25 AM Christian König wrote: Reviewed-by: Christian König Is one of you going to push this to drm-misc? I was assuming it was there already. I guess I'll just app

Re: [PATCH v2 2/7] drm/ttm: add TTM_PAGE_FLAG_SHMEM

2021-09-15 Thread Christian König
Am 14.09.21 um 19:31 schrieb Matthew Auld: On Tue, 14 Sept 2021 at 10:03, Christian König wrote: Am 14.09.21 um 10:50 schrieb Matthew Auld: Add new flag to indicate special shmem based tt, which can directly handle swapping itself, and should be visible to some shrinker. As part of this we sh

Re: [Intel-gfx] [PATCH 08/27] drm/i915: Add logical engine mapping

2021-09-15 Thread Tvrtko Ursulin
On 14/09/2021 19:04, Matthew Brost wrote: On Tue, Sep 14, 2021 at 09:34:08AM +0100, Tvrtko Ursulin wrote: 8< Today we have: for_each intel_engines: // intel_engines is a flat list of all engines intel_engine_setup() You propose to change it to: for_each engine_class: for 0.

Re: [PATCH] drm/i915/dp: add a delay before setting panel brightness after power on

2021-09-15 Thread Jani Nikula
On Tue, 14 Sep 2021, Vasily Khoruzhick wrote: > On Tue, Sep 14, 2021 at 3:31 PM Jani Nikula > wrote: >> >> On Tue, 14 Sep 2021, Lyude Paul wrote: >> > On Tue, 2021-09-14 at 12:09 +0300, Jani Nikula wrote: >> >> On Mon, 13 Sep 2021, Vasily Khoruzhick wrote: >> >> > Panel in my Dell XPS 7590, th

Re: [PATCH] drm/v3d: fix wait for TMU write combiner flush

2021-09-15 Thread Melissa Wen
On 09/14, Iago Toral Quiroga wrote: > The hardware sets the TMUWCF bit back to 0 when the TMU write > combiner flush completes so we should be checking for that instead > of the L2TFLS bit. > > Fixes spurious Vulkan CTS failures in: > dEQP-VK.binding_model.descriptorset_random.* Hi Iago, makes se

[BUG] gpu: drm: amd: amdgpu: possible ABBA deadlock in amdgpu_set_power_dpm_force_performance_level() and amdgpu_debugfs_process_reg_op()

2021-09-15 Thread Jia-Ju Bai
Hello, My static analysis tool reports a possible ABBA deadlock in the amdgpu driver in Linux 5.10: amdgpu_debugfs_process_reg_op()   mutex_lock(&adev->grbm_idx_mutex); --> Line 250 (Lock A)   mutex_lock(&adev->pm.mutex); --> Line 259 (Lock B) amdgpu_set_power_dpm_force_performance_level()  

Re: [PATCH] drm/v3d: fix wait for TMU write combiner flush

2021-09-15 Thread Iago Toral
On Wed, 2021-09-15 at 09:57 +0100, Melissa Wen wrote: > On 09/14, Iago Toral Quiroga wrote: > > The hardware sets the TMUWCF bit back to 0 when the TMU write > > combiner flush completes so we should be checking for that instead > > of the L2TFLS bit. > > > > Fixes spurious Vulkan CTS failures in:

[PATCH v2] drm/v3d: fix wait for TMU write combiner flush

2021-09-15 Thread Iago Toral Quiroga
The hardware sets the TMUWCF bit back to 0 when the TMU write combiner flush completes so we should be checking for that instead of the L2TFLS bit. v2 (Melissa Wen): - Add Signed-off-by and Fixes tags. - Change the error message for the timeout to be more clear. Fixes spurious Vulkan CTS fail

Re: [resend PATCH] drm/ttm: Fix a deadlock if the target BO is not idle during swap

2021-09-15 Thread Christian König
Am 14.09.21 um 15:50 schrieb Daniel Vetter: On Thu, Sep 09, 2021 at 09:10:39AM +0200, Christian König wrote: Am 08.09.21 um 20:27 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 11:28:23AM +0200, Christian König wrote: Am 07.09.21 um 11:05 schrieb Daniel Vetter: On Tue, Sep 07, 2021 at 08:22:2

Re: [PATCH 1/1] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-15 Thread Jani Nikula
On Sat, 11 Sep 2021, Imran Khan wrote: > To print stack entries into a buffer, users of stackdepot, > first get a list of stack entries using stack_depot_fetch > and then print this list into a buffer using stack_trace_snprint. > Provide a helper in stackdepot for this purpose. > Also change above

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: > I don't love it, a new C file and an out-of-line call to then call back > to a static inline that for most configuration will return false ... but > whatever :) Yeah, hch thinks it'll cause a big mess otherwise: https://lore.kern

Re: [Intel-gfx] [PATCH 01/26] dma-buf: add dma_resv_for_each_fence_unlocked

2021-09-15 Thread Christian König
Am 14.09.21 um 15:07 schrieb Tvrtko Ursulin: On 14/09/2021 12:25, Christian König wrote: Am 14.09.21 um 12:53 schrieb Tvrtko Ursulin: On 13/09/2021 14:16, Christian König wrote: [SNIP] +    if (fence) { +    fence = dma_fence_get_rcu(fence); +    } else if (all_fences && curso

[PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
Fixes the following splat: i915: Running i915_gem_mman_live_selftests/igt_mmap [ cut here ] WARNING: CPU: 3 PID: 5654 at include/linux/mmap_lock.h:164 find_vma+0x4e/0xb0 Modules linked in: i915(+) vgem fuse snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic led

Re: [Intel-gfx] [PATCH 18/26] drm/i915: use new iterator in i915_gem_object_last_write_engine

2021-09-15 Thread Christian König
Am 14.09.21 um 14:47 schrieb Tvrtko Ursulin: On 14/09/2021 13:32, Christian König wrote: Am 14.09.21 um 14:27 schrieb Tvrtko Ursulin: On 13/09/2021 14:16, Christian König wrote: This is maybe even a fix since the RCU usage here looks incorrect. What you think is incorrect? Pointless extra

[PATCH][next] drm/i915: make array states static const

2021-09-15 Thread Colin King
From: Colin Ian King Don't populate the read-only array states on the stack but instead it static. Also makes the object code smaller. Signed-off-by: Colin Ian King --- drivers/gpu/drm/i915/display/intel_display_power.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver

[PATCH] drm/radeon: make array encoded_lanes static

2021-09-15 Thread Colin King
From: Colin Ian King Don't populate the read-only array encoded_lanes on the stack but instead it static. Also makes the object code smaller by 97 bytes: Before: textdatabss dechex filename 388998064 0 46963 b773 ./drivers/gpu/drm/radeon/r600_dpm.o After: te

[PATCH] drm/i915/debugfs: Do not report currently active engine when describing objects

2021-09-15 Thread Tvrtko Ursulin
From: Tvrtko Ursulin It is not very useful to have code which tries to report a rapidly transient state which will not report anything majority of the time, especially since it is currently only used from /i915_gem_framebuffers. Signed-off-by: Tvrtko Ursulin Acked-by: Christian König Cc: Danie

Re: [PATCH 1/2] drm/sched: fix the bug of time out calculation(v4)

2021-09-15 Thread Christian König
Yes, I think so as well. Andrey can you push this? Christian. Am 15.09.21 um 00:59 schrieb Grodzovsky, Andrey: AFAIK this one is independent. Christian, can you confirm ? Andrey *From:* amd-gfx on behalf of Alex Deuche

Re: [PATCH v9 1/4] dt-bindings: display: Document the Xylon LogiCVC display controller

2021-09-15 Thread Rob Herring
On Tue, 14 Sep 2021 22:05:36 +0200, Paul Kocialkowski wrote: > The Xylon LogiCVC is a display controller implemented as programmable > logic in Xilinx FPGAs. > > Signed-off-by: Paul Kocialkowski > Acked-by: Rob Herring > --- > .../display/xylon,logicvc-display.yaml| 302

Re: [Intel-gfx] Intel UHD resolutions

2021-09-15 Thread Jani Nikula
On Fri, 10 Sep 2021, Randy Dunlap wrote: > Hi, > > I would like to use QHD resolution (2560x1440) with my shiny new > computer and display. That resolution works if I boot Windows 10 > (cough). > > What do I need to do to use that resolution in Linux? > > I first tried openSUSE 15.3 (kernel 5.3.18

Re: [Intel-gfx] [PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Matthew Auld
On Wed, 15 Sept 2021 at 12:00, Maarten Lankhorst wrote: > > Fixes the following splat: > > i915: Running i915_gem_mman_live_selftests/igt_mmap > [ cut here ] > WARNING: CPU: 3 PID: 5654 at include/linux/mmap_lock.h:164 find_vma+0x4e/0xb0 > Modules linked in: i915(+) vgem fu

Re: [PATCH 2/3] drm/v3d: add generic ioctl extension

2021-09-15 Thread Iago Toral
On Wed, 2021-08-18 at 18:56 +0100, Melissa Wen wrote: > Add support to attach generic extensions on job submission. > This patch is a second prep work to enable multiple syncobjs on job > submission. With this work, when the job submission interface needs > to be extended to accomodate a new featur

Re: [Intel-gfx] [PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
Op 15-09-2021 om 15:19 schreef Matthew Auld: > On Wed, 15 Sept 2021 at 12:00, Maarten Lankhorst > wrote: >> Fixes the following splat: >> >> i915: Running i915_gem_mman_live_selftests/igt_mmap >> [ cut here ] >> WARNING: CPU: 3 PID: 5654 at include/linux/mmap_lock.h:164 fin

Re: [PATCH v9 03/17] drm/i915/pxp: define PXP device flag and kconfig

2021-09-15 Thread Jani Nikula
On Fri, 10 Sep 2021, Daniele Ceraolo Spurio wrote: > Ahead of the PXP implementation, define the relevant define flag and > kconfig option. > > v2: flip kconfig default to N. Some machines have IFWIs that do not > support PXP, so we need it to be an opt-in until we add support to query > the caps

[PATCH] video: fbdev: use memset_io() instead of memset()

2021-09-15 Thread Christophe Leroy
While investigating a lockup at startup on Powerbook 3400C, it was identified that the fbdev driver generates alignment exception at startup: --- interrupt: 600 at memset+0x60/0xc0 NIP: c0021414 LR: c03fc49c CTR: 7fff REGS: ca021c10 TRAP: 0600 Tainted: GW

Re: [Intel-gfx] [PATCH v9 04/17] drm/i915/pxp: allocate a vcs context for pxp usage

2021-09-15 Thread Jani Nikula
On Fri, 10 Sep 2021, Daniele Ceraolo Spurio wrote: > diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h > b/drivers/gpu/drm/i915/pxp/intel_pxp.h > new file mode 100644 > index ..e87550fb9821 > --- /dev/null > +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.h > @@ -0,0 +1,35 @@ > +/* SPDX-Lic

Re: [RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-09-15 Thread Pekka Paalanen
On Fri, 30 Jul 2021 16:41:29 -0400 Harry Wentland wrote: > Use the new DRM RFC doc section to capture the RFC previously only > described in the cover letter at > https://patchwork.freedesktop.org/series/89506/ > > v3: > * Add sections on single-plane and multi-plane HDR > * Describe approach

[PATCH] drm: Fix scaling_mode docs

2021-09-15 Thread Ville Syrjala
From: Ville Syrjälä Fix the bad copy-pasta in the scaling_mode docs. Signed-off-by: Ville Syrjälä --- drivers/gpu/drm/drm_connector.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/drm_connector.c b/drivers/gpu/drm/drm_connector.c index e0a30e0ee86a..3b

Re: [PATCH] drm: Fix scaling_mode docs

2021-09-15 Thread Simon Ser
Reviewed-by: Simon Ser

Re: [RFC PATCH v3 1/6] drm/doc: Color Management and HDR10 RFC

2021-09-15 Thread Pekka Paalanen
On Mon, 16 Aug 2021 15:37:23 +0200 sebast...@sebastianwick.net wrote: > On 2021-08-16 14:40, Harry Wentland wrote: > > On 2021-08-16 7:10 a.m., Brian Starkey wrote: > >> On Fri, Aug 13, 2021 at 10:42:12AM +0530, Sharma, Shashank wrote: > >>> Hello Brian, > >>> (+Uma in cc) > >>> > >>> Thanks

[Bug 214413] New: Kernel oops on boot for amdgpu (in si_dpm_set_power_state)

2021-09-15 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214413 Bug ID: 214413 Summary: Kernel oops on boot for amdgpu (in si_dpm_set_power_state) Product: Drivers Version: 2.5 Kernel Version: 5.14.4 Hardware: All OS

Re: [PATCH v9 12/17] drm/i915/pxp: Enable PXP power management

2021-09-15 Thread Daniele Ceraolo Spurio
On 9/14/2021 12:13 PM, Rodrigo Vivi wrote: On Fri, Sep 10, 2021 at 08:36:22AM -0700, Daniele Ceraolo Spurio wrote: From: "Huang, Sean Z" During the power event S3+ sleep/resume, hardware will lose all the encryption keys for every hardware session, even though the session state might still

Re: [PATCH] drm/radeon: make array encoded_lanes static

2021-09-15 Thread Alex Deucher
On Wed, Sep 15, 2021 at 7:36 AM Colin King wrote: > > From: Colin Ian King > > Don't populate the read-only array encoded_lanes on the stack but instead it > static. Also makes the object code smaller by 97 bytes: > > Before: >textdatabss dechex filename > 388998064

Re: [PATCH v2 1/5] dt-bindings: reserved-memory: Document memory region specifier

2021-09-15 Thread Thierry Reding
On Tue, Sep 07, 2021 at 07:44:44PM +0200, Thierry Reding wrote: > On Tue, Sep 07, 2021 at 10:33:24AM -0500, Rob Herring wrote: > > On Fri, Sep 3, 2021 at 10:36 AM Thierry Reding > > wrote: > > > > > > On Fri, Sep 03, 2021 at 09:36:33AM -0500, Rob Herring wrote: > > > > On Fri, Sep 3, 2021 at 8:52

Re: [PATCH v9 12/17] drm/i915/pxp: Enable PXP power management

2021-09-15 Thread Rodrigo Vivi
On Wed, Sep 15, 2021 at 08:11:54AM -0700, Daniele Ceraolo Spurio wrote: > > > On 9/14/2021 12:13 PM, Rodrigo Vivi wrote: > > On Fri, Sep 10, 2021 at 08:36:22AM -0700, Daniele Ceraolo Spurio wrote: > > > From: "Huang, Sean Z" > > > > > > During the power event S3+ sleep/resume, hardware will los

Re: [PATCH v9 03/17] drm/i915/pxp: define PXP device flag and kconfig

2021-09-15 Thread Rodrigo Vivi
On Wed, Sep 15, 2021 at 04:29:50PM +0300, Jani Nikula wrote: > On Fri, 10 Sep 2021, Daniele Ceraolo Spurio > wrote: > > Ahead of the PXP implementation, define the relevant define flag and > > kconfig option. > > > > v2: flip kconfig default to N. Some machines have IFWIs that do not > > support

Re: [PATCH 2/3] drm/v3d: add generic ioctl extension

2021-09-15 Thread Melissa Wen
On 09/15, Iago Toral wrote: > On Wed, 2021-08-18 at 18:56 +0100, Melissa Wen wrote: > > Add support to attach generic extensions on job submission. > > This patch is a second prep work to enable multiple syncobjs on job > > submission. With this work, when the job submission interface needs > > to

Re: [PATCH 2/3] drm/v3d: add generic ioctl extension

2021-09-15 Thread Iago Toral
On Wed, 2021-09-15 at 17:28 +0100, Melissa Wen wrote: > On 09/15, Iago Toral wrote: > > On Wed, 2021-08-18 at 18:56 +0100, Melissa Wen wrote: (...) > > > > > > /** > > > @@ -248,6 +266,15 @@ struct drm_v3d_submit_tfu { > > > __u32 in_sync; > > > /* Sync object to signal when the TFU job is do

[PATCH v8 00/16] use DYNAMIC_DEBUG to implement DRM.debug

2021-09-15 Thread Jim Cromie
Hi Jason, Greg, Daniel, DRM folks, In DRM-debug currently, drm_debug_enabled() is called a lot to decide whether or not to write debug messages. Each test is cheap, but costs continue with uptime. DYNAMIC_DEBUG "dyndbg", when built with JUMP_LABEL, replaces each of those tests with a patchable N

[PATCH v8 01/16] dyndbg: add module to a vpr-info in dd-exec-queries

2021-09-15 Thread Jim Cromie
dd-exec-queries accepts a separate module arg (so it can support $module.dyndbg cmdline arg), add it to the vpr-info for more context. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c i

[PATCH v8 02/16] dyndbg: pr-info in boot-param should say so

2021-09-15 Thread Jim Cromie
add "bootparam" to format. no functional changes. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index dfe1e6a857bc..da91ff507117 100644 --- a/lib/dynamic_debug.c +++ b/lib/dynamic_de

[PATCH v8 03/16] dyndbg: rationalize verbosity

2021-09-15 Thread Jim Cromie
change current v*pr_info() calls to fit this new scheme: -1 module add/remove, callsite counts - a few v2s here now -2 command ingest, splitting -3 command parsing - many v1s here now -4 per-site changes - was v2 2 is new, to isolate a problem where a stress-test script (which feeds large multi-c

[PATCH v8 05/16] dyndbg: vpr-info on remove-module complete, not starting

2021-09-15 Thread Jim Cromie
On qemu --smp 3 runs, remove-module can get called 3 times. Instead, print once at end, if entry was found and removed. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/dynamic_debug.c b/lib/dynamic_debug.c index eac6c6

[PATCH v8 04/16] dyndbg: use alt-quotes in vpr-infos, not those user might use

2021-09-15 Thread Jim Cromie
`echo $cmd > control` can be finicky with respect to quoting (mostly wrt * expansion), so lets not complicate things by adding our own in debug messages. Quote as <%s> instead of '%s' or \"%s\" Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 16 1 file changed, 8 insertions

[PATCH v8 07/16] dyndbg-doc: fix bootparam usage example

2021-09-15 Thread Jim Cromie
This example uses dyndbg as a core/kernel param; it is a (fake) module param. Using it as given gets an "Unknown command line parameters:" warning. Fix the broken example. Signed-off-by: Jim Cromie --- Documentation/admin-guide/dynamic-debug-howto.rst | 6 ++ 1 file changed, 2 insertions(+

[PATCH v8 06/16] dyndbg: no vpr-info on empty queries

2021-09-15 Thread Jim Cromie
when `echo $cmd > control` contains multiple queries, extra query separators (;\n) can parse as empty statements. This is normal, and pr-info on empty command is just noise. Also change varname. Signed-off-by: Jim Cromie --- lib/dynamic_debug.c | 13 +++-- 1 file changed, 7 insertions(

[PATCH v8 08/16] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES bitmap and callbacks

2021-09-15 Thread Jim Cromie
DEFINE_DYNAMIC_DEBUG_CATEGORIES(fsname, var, bitmap_desc, @bit_descs) allows users to create a drm.debug style (bitmap) sysfs interface, mapping each bit to a pr_debug "category". Unlike drm, dyndbg has no coding of "category", but it can select a set of pr_debugs with a substr match on their form

[PATCH v8 10/16] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-09-15 Thread Jim Cromie
Taking embedded spaces out of existing prefixes makes them better class-prefixes; simplifying the extra quoting needed otherwise: $> echo format "^gvt: core:" +p >control Dropping the internal spaces means any trailing space in a query will more clearly terminate the prefix being searched for.

[PATCH v8 09/16] drm: fix doc grammar error

2021-09-15 Thread Jim Cromie
no code changes, good for rc Signed-off-by: Jim Cromie --- include/drm/drm_drv.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_drv.h b/include/drm/drm_drv.h index b439ae1921b8..ebb22166ace1 100644 --- a/include/drm/drm_drv.h +++ b/include/drm/drm_drv.h @@ -5

[PATCH v8 11/16] i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES for existing prdbgs

2021-09-15 Thread Jim Cromie
The gvt component of this driver has ~120 pr_debugs, in 9 categories quite similar to those in DRM. Following the interface model of drm.debug, add a parameter to map bits to these categorizations. DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_gvt, __gvt_debug, "dyndbg bitmap desc", _DD_c

[PATCH v8 12/16] amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES on existing prdbgs

2021-09-15 Thread Jim Cromie
logger_types.h defines many DC_LOG_*() categorized debug wrappers. Most of these already use DRM debug API, so are controllable using drm.debug, but others use a bare pr_debug("$prefix: .."), with 1 of 13 different class-prefixes matching ~/^\[[_A-Z]+\]:/ Use DEFINE_DYNAMIC_DEBUG_CATEGORIES to cre

[PATCH v8 13/16] drm_print: add choice to use dynamic debug in drm-debug

2021-09-15 Thread Jim Cromie
drm's debug system writes 10 distinct categories of messages to syslog using a small API[1]: drm_dbg*(10 names), DRM_DEV_DEBUG*(3 names), DRM_DEBUG*(8 names). There are thousands of these callsites, each categorized in this systematized way. These callsites can be enabled at runtime by their cate

[PATCH v8 14/16] drm_print: instrument drm_debug_enabled

2021-09-15 Thread Jim Cromie
Duplicate drm_debug_enabled() code into both "basic" and "dyndbg" ifdef branches. Then add a pr_debug("todo: ...") into the "dyndbg" branch. Then convert the "dyndbg" branch's code to a macro, so that the pr_debug() get its callsite info from the invoking function, instead of from drm_debug_enabl

[PATCH v8 15/16] amdgpu_ucode: reduce number of pr_debug calls

2021-09-15 Thread Jim Cromie
There are blocks of DRM_DEBUG calls, consolidate their args into single calls. With dynamic-debug in use, each callsite consumes 56 bytes of callsite data, and this patch removes about 65 calls, so it saves ~3.5kb. no functional changes. RFC: this creates multi-line log messages, does that break

[PATCH v8 16/16] nouveau: fold multiple DRM_DEBUG_DRIVERs together

2021-09-15 Thread Jim Cromie
With DRM_USE_DYNAMIC_DEBUG, each callsite record requires 56 bytes. We can combine 12 into one here and save ~620 bytes. Signed-off-by: Jim Cromie --- drivers/gpu/drm/nouveau/nouveau_drm.c | 36 +-- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/drivers/g

Re: [PATCH v3 2/3] drm/bridge: parade-ps8640: Use regmap APIs

2021-09-15 Thread Doug Anderson
Hi, On Tue, Sep 14, 2021 at 7:50 PM Stephen Boyd wrote: > > Quoting Doug Anderson (2021-09-14 19:17:03) > > Hi, > > > > On Tue, Sep 14, 2021 at 5:29 PM Stephen Boyd wrote: > > > > > > Quoting Philip Chen (2021-09-14 16:28:44) > > > > diff --git a/drivers/gpu/drm/bridge/parade-ps8640.c > > > > b

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Borislav Petkov
On Wed, Sep 08, 2021 at 05:58:31PM -0500, Tom Lendacky wrote: > This patch series provides a generic helper function, cc_platform_has(), > to replace the sme_active(), sev_active(), sev_es_active() and > mem_encrypt_active() functions. > > It is expected that as new confidential computing technolo

Re: [Intel-gfx] [PATCH 08/27] drm/i915: Add logical engine mapping

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 09:24:15AM +0100, Tvrtko Ursulin wrote: > > On 14/09/2021 19:04, Matthew Brost wrote: > > On Tue, Sep 14, 2021 at 09:34:08AM +0100, Tvrtko Ursulin wrote: > > > > > 8< > > > > Today we have: > > > > > > for_each intel_engines: // intel_engines is a flat list of all engin

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Christophe Leroy
Le 15/09/2021 à 12:08, Borislav Petkov a écrit : On Wed, Sep 15, 2021 at 10:28:59AM +1000, Michael Ellerman wrote: I don't love it, a new C file and an out-of-line call to then call back to a static inline that for most configuration will return false ... but whatever :) Yeah, hch thinks it

Re: [PATCH v3 0/8] Implement generic cc_platform_has() helper function

2021-09-15 Thread Kuppuswamy, Sathyanarayanan
On 9/15/21 9:46 AM, Borislav Petkov wrote: Sathya, if you want to prepare the Intel variant intel_cc_platform_has() ontop of those and send it to me, that would be good because then I can integrate it all in one branch which can be used to base future work ontop. I have a Intel variant patc

[PATCH RESEND v2 0/3] lib, stackdepot: check stackdepot handle before accessing slabs

2021-09-15 Thread Imran Khan
Changes in v2: - Fixed compilation error [1] due to typo in patch-3 (stack_depot_print used in place of stack_depot_snprint) This compilation error appears with CONFIG_DRM_I915_DEBUG_RUNTIME_PM=y and this was missed by my test config (x86_64_defconfig) [1] https://patchwork.freedesktop.o

[PATCH RESEND v2 1/3] lib, stackdepot: check stackdepot handle before accessing slabs.

2021-09-15 Thread Imran Khan
stack_depot_save allocates slabs that will be used for storing objects in future.If this slab allocation fails we may get to a situation where space allocation for a new stack_record fails, causing stack_depot_save to return 0 as handle. If user of this handle ends up invoking stack_depot_fetch wit

[PATCH RESEND v2 2/3] lib, stackdepot: Add helper to print stack entries.

2021-09-15 Thread Imran Khan
To print a stack entries, users of stackdepot, first use stack_depot_fetch to get a list of stack entries and then use stack_trace_print to print this list. Provide a helper in stackdepot to print stack entries based on stackdepot handle. Also change above mentioned users to use this helper. Signe

[PATCH RESEND v2 3/3] lib, stackdepot: Add helper to print stack entries into buffer.

2021-09-15 Thread Imran Khan
To print stack entries into a buffer, users of stackdepot, first get a list of stack entries using stack_depot_fetch and then print this list into a buffer using stack_trace_snprint. Provide a helper in stackdepot for this purpose. Also change above mentioned users to use this helper. Signed-off-b

Re: [PATCH v2] drm/v3d: fix wait for TMU write combiner flush

2021-09-15 Thread Melissa Wen
On 09/15, Iago Toral Quiroga wrote: > The hardware sets the TMUWCF bit back to 0 when the TMU write > combiner flush completes so we should be checking for that instead > of the L2TFLS bit. > > v2 (Melissa Wen): > - Add Signed-off-by and Fixes tags. > - Change the error message for the timeout

[PATCH v2] drm/sun4i: dw-hdmi: Fix HDMI PHY clock setup

2021-09-15 Thread Jernej Skrabec
Recent rework, which made HDMI PHY driver a platform device, inadvertely reversed clock setup order. HW is very touchy about it. Proper way is to handle controllers resets and clocks first and HDMI PHYs second. Currently, without this fix, first mode set completely fails (nothing on HDMI monitor)

Re: [PATCH 1/2] drm/sched: fix the bug of time out calculation(v4)

2021-09-15 Thread Andrey Grodzovsky
Pushed Andrey On 2021-09-15 7:45 a.m., Christian König wrote: Yes, I think so as well. Andrey can you push this? Christian. Am 15.09.21 um 00:59 schrieb Grodzovsky, Andrey: AFAIK this one is independent. Christian, can you confirm ? Andrey --

Re: [PATCH v3 4/8] powerpc/pseries/svm: Add a powerpc version of cc_platform_has()

2021-09-15 Thread Borislav Petkov
On Wed, Sep 15, 2021 at 07:18:34PM +0200, Christophe Leroy wrote: > Could you please provide more explicit explanation why inlining such an > helper is considered as bad practice and messy ? Tom already told you to look at the previous threads. Let's read them together. This one, for example: htt

[PATCH v3 01/12] drm/ttm: stop setting page->index for the ttm_tt

2021-09-15 Thread Matthew Auld
In commit: commit 58aa6622d32af7d2c08d45085f44c54554a16ed7 Author: Thomas Hellstrom Date: Fri Jan 3 11:47:23 2014 +0100 drm/ttm: Correctly set page mapping and -index members we started setting the page->mapping and page->index to point to the virtual address space, if the pages were faul

[PATCH v3 02/12] drm/ttm: move ttm_tt_{add, clear}_mapping into amdgpu

2021-09-15 Thread Matthew Auld
Now that setting page->index shouldn't be needed anymore, we are just left with setting page->mapping, and here it looks like amdgpu is the only user, where pointing the page->mapping at the dev_mapping is used to verify that the pages do indeed belong to the device, if userspace later tries to tou

[PATCH v3 03/12] drm/ttm: remove TTM_PAGE_FLAG_NO_RETRY

2021-09-15 Thread Matthew Auld
No longer used it seems. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- include/drm/ttm/ttm_tt.h | 1 - 1 file changed, 1 deletion(-) diff --git a/include/drm/ttm/ttm_tt.h b/include/drm/ttm/ttm_tt.h index 89b15d673b22..842ce756213c 100644 --- a/include/drm/ttm/ttm_tt

[PATCH v3 05/12] drm/ttm: add some kernel-doc for TTM_PAGE_FLAG_*

2021-09-15 Thread Matthew Auld
Move it to inline kernel-doc, otherwise we can't add empty lines it seems. Also drop the kernel-doc for pages_list, which doesn't seem to exist, and get rid of all the strange holes. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- include/drm/ttm/ttm_tt.h | 57

[PATCH v3 04/12] drm/ttm: s/FLAG_SG/FLAG_EXTERNAL/

2021-09-15 Thread Matthew Auld
It covers more than just ttm_bo_type_sg usage, like with say dma-buf, since one other user is userptr in amdgpu, and in the future we might have some more. Hence EXTERNAL is likely a more suitable name. Suggested-by: Christian König Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian

[PATCH v3 07/12] drm/i915/gem: Break out some shmem backend utils

2021-09-15 Thread Matthew Auld
From: Thomas Hellström Break out some shmem backend utils for future reuse by the TTM backend: shmem_alloc_st(), shmem_free_st() and __shmem_writeback() which we can use to provide a shmem-backed TTM page pool for cached-only TTM buffer objects. Main functional change here is that we now compute

[PATCH v3 09/12] drm/i915/ttm: use cached system pages when evicting lmem

2021-09-15 Thread Matthew Auld
This should let us do an accelerated copy directly to the shmem pages when temporarily moving lmem-only objects, where the i915-gem shrinker can later kick in to swap out the pages, if needed. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 8 -

[PATCH v3 06/12] drm/ttm: add TTM_PAGE_FLAG_EXTERNAL_MAPPABLE

2021-09-15 Thread Matthew Auld
In commit: commit 667a50db0477d47fdff01c666f5ee1ce26b5264c Author: Thomas Hellstrom Date: Fri Jan 3 11:17:18 2014 +0100 drm/ttm: Refuse to fault (prime-) imported pages we introduced the restriction that imported pages should not be directly mappable through TTM(this also extends to userp

[PATCH v3 10/12] drm/i915: try to simplify make_{un}shrinkable

2021-09-15 Thread Matthew Auld
Drop the atomic shrink_pin stuff, and just have make_{un}shrinkable update the shrinker visible lists immediately. This at least simplifies the next patch, and does make the behaviour more obvious. The potential downside is that make_unshrinkable now grabs a global lock even when the object itself

[PATCH v3 08/12] drm/i915/ttm: add tt shmem backend

2021-09-15 Thread Matthew Auld
For cached objects we can allocate our pages directly in shmem. This should make it possible(in a later patch) to utilise the existing i915-gem shrinker code for such objects. For now this is still disabled. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Christian König --- drivers/gpu/d

[PATCH v3 11/12] drm/i915/ttm: make evicted shmem pages visible to the shrinker

2021-09-15 Thread Matthew Auld
We currently just evict lmem objects to system memory when under memory pressure. For this case we lack the usual object mm.pages, which effectively hides the pages from the i915-gem shrinker, until we actually "attach" the TT to the object, or in the case of lmem-only objects it just gets migrated

[PATCH v3 12/12] drm/i915/ttm: enable shmem tt backend

2021-09-15 Thread Matthew Auld
Enable shmem tt backend, and enable shrinking. Signed-off-by: Matthew Auld Cc: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index e758de336b96..

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data structures are needed for multi-lrc submission. Signed-off-by: Matthew Brost --- drivers/gpu/drm/i915/g

Re: [PATCH] drm/i915/guc/slpc: remove unneeded clflush calls

2021-09-15 Thread Belgaumkar, Vinay
On 9/14/2021 12:51 PM, Lucas De Marchi wrote: The clflush calls here aren't doing anything since we are not writting something and flushing the cache lines to be visible to GuC. Here the intention seems to be to make sure whatever GuC has written is visible to the CPU before we read them. Howe

Re: [Intel-gfx] [PATCH 13/27] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: In GuC parent-child contexts the parent context controls the scheduling, ensure only the parent does the scheduling operations. Signed-off-by: Matthew Brost --- .../gpu/drm/i915/gt/uc/intel_guc_submission.c | 24 ++- 1 file changed, 18

Re: [PATCH] drm/i915/guc/slpc: remove unneeded clflush calls

2021-09-15 Thread John Harrison
On 9/15/2021 12:24, Belgaumkar, Vinay wrote: On 9/14/2021 12:51 PM, Lucas De Marchi wrote: The clflush calls here aren't doing anything since we are not writting something and flushing the cache lines to be visible to GuC. Here the intention seems to be to make sure whatever GuC has written is v

[PATCH] drm/i915: zero fill vma name buffer

2021-09-15 Thread Tim Gardner
In capture_vma() Coverity complains of a possible buffer overrun. Even though this is a static function where all call sites can be checked, limiting the copy length could save some future grief. CID 93300 (#1 of 1): Copy into fixed size buffer (STRING_OVERFLOW) 4. fixed_size_dest: You might overr

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > Add multi-lrc context registration H2G. In addition a workqueue and > > process descriptor are setup during multi-lrc context registration as > > these data structures are needed for multi-

Re: [Intel-gfx] [PATCH 13/27] drm/i915/guc: Ensure GuC schedule operations do not operate on child contexts

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 12:24:41PM -0700, John Harrison wrote: > On 8/20/2021 15:44, Matthew Brost wrote: > > In GuC parent-child contexts the parent context controls the scheduling, > > ensure only the parent does the scheduling operations. > > > > Signed-off-by: Matthew Brost > > --- > > .../

Re: [PATCH 1/9] drm/connector: Add support for privacy-screen properties (v4)

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > From: Rajat Jain > > Add support for generic electronic privacy screen properties, that > can be added by systems that have an integrated EPS. > > Changes in v2 (Hans de Goede) > - Create 2 properties, "privacy-screen sw-state" and >   "p

Re: [PATCH 2/9] drm: Add privacy-screen class (v3)

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > On some new laptops the LCD panel has a builtin electronic privacy-screen. > We want to export this functionality as a property on the drm connector > object. But often this functionality is not exposed on the GPU but on some > other (ACPI)

Re: [Intel-gfx] [PATCH 14/27] drm/i915/guc: Assign contexts in parent-child relationship consecutive guc_ids

2021-09-15 Thread John Harrison
On 8/20/2021 15:44, Matthew Brost wrote: Assign contexts in parent-child relationship consecutive guc_ids. This is accomplished by partitioning guc_id space between ones that need to be consecutive (1/16 available guc_ids) and ones that do not (15/16 of available guc_ids). The consecutive search

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread John Harrison
On 9/15/2021 12:31, Matthew Brost wrote: On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: On 8/20/2021 15:44, Matthew Brost wrote: Add multi-lrc context registration H2G. In addition a workqueue and process descriptor are setup during multi-lrc context registration as these data s

Re: [PATCH 4/9] drm/privacy-screen: Add notifier support

2021-09-15 Thread Lyude Paul
On Mon, 2021-09-06 at 09:35 +0200, Hans de Goede wrote: > Add support for privacy-screen consumers to register a notifier to > be notified of external (e.g. done by the hw itself on a hotkey press) > state changes. > > Reviewed-by: Emil Velikov > Signed-off-by: Hans de Goede > --- >  drivers/gpu

[PATCH v2 00/13] drm/hdcp: Pull HDCP auth/exchange/check into helpers

2021-09-15 Thread Sean Paul
From: Sean Paul Hello again, This is the second version of the HDCP helper patchset. See version 1 here: https://patchwork.freedesktop.org/series/94623/ In this second version, I've fixed up the oopsies exposed by 0-day and yamllint and incorporated early review feedback from the dt/dts reviews.

Re: [Intel-gfx] [PATCH 12/27] drm/i915/guc: Add multi-lrc context registration

2021-09-15 Thread Matthew Brost
On Wed, Sep 15, 2021 at 01:23:19PM -0700, John Harrison wrote: > On 9/15/2021 12:31, Matthew Brost wrote: > > On Wed, Sep 15, 2021 at 12:21:35PM -0700, John Harrison wrote: > > > On 8/20/2021 15:44, Matthew Brost wrote: > > > > Add multi-lrc context registration H2G. In addition a workqueue and > >

[PATCH v2 01/13] drm/hdcp: Add drm_hdcp_atomic_check()

2021-09-15 Thread Sean Paul
From: Sean Paul This patch moves the hdcp atomic check from i915 to drm_hdcp so other drivers can use it. No functional changes, just cleaned up some of the code when moving it over. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-2-s...@poorly

[PATCH v2 02/13] drm/hdcp: Avoid changing crtc state in hdcp atomic check

2021-09-15 Thread Sean Paul
From: Sean Paul Instead of forcing a modeset in the hdcp atomic check, simply return true if the content protection value is changing and let the driver decide whether a modeset is required or not. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.4745

[PATCH v2 03/13] drm/hdcp: Update property value on content type and user changes

2021-09-15 Thread Sean Paul
From: Sean Paul This patch updates the connector's property value in 2 cases which were previously missed: 1- Content type changes. The value should revert back to DESIRED from ENABLED in case the driver must re-authenticate the link due to the new content type. 2- Userspace sets value to

[PATCH v2 04/13] drm/hdcp: Expand HDCP helper library for enable/disable/check

2021-09-15 Thread Sean Paul
From: Sean Paul This patch expands upon the HDCP helper library to manage HDCP enable, disable, and check. Previous to this patch, the majority of the state management and sink interaction is tucked inside the Intel driver with the understanding that once a new platform supported HDCP we could m

[PATCH v2 05/13] drm/i915/hdcp: Consolidate HDCP setup/state cache

2021-09-15 Thread Sean Paul
From: Sean Paul Stick all of the setup for HDCP into a dedicated function. No functional change, but this will facilitate moving HDCP logic into helpers. Signed-off-by: Sean Paul Link: https://patchwork.freedesktop.org/patch/msgid/20210913175747.47456-6-s...@poorly.run #v1 Changes in v2: -No

  1   2   >