Re: [PATCH v2] drm: Copy drm_wait_vblank to user before returning

2021-08-13 Thread Michel Dänzer
On 2021-08-12 9:49 p.m., Mark Yacoub wrote: > From: Mark Yacoub > > [Why] > Userspace should get back a copy of drm_wait_vblank that's been modified > even when drm_wait_vblank_ioctl returns a failure. > > Rationale: > drm_wait_vblank_ioctl modifies the request and expects the user to read > it

Re: [Intel-gfx] [PATCH v6 01/15] drm/i915/pxp: Define PXP component interface

2021-08-13 Thread Jani Nikula
On Wed, 28 Jul 2021, Daniele Ceraolo Spurio wrote: > This will be used for communication between the i915 driver and the mei > one. Defining it in a stand-alone patch to avoid circualr dependedencies > between the patches modifying the 2 drivers. > > Split out from an original patch from Huang,

Re: [PATCH 10/64] lib80211: Use struct_group() for memcpy() region

2021-08-13 Thread Johannes Berg
On Tue, 2021-07-27 at 13:58 -0700, Kees Cook wrote: > > +++ b/include/linux/ieee80211.h > @@ -297,9 +297,11 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2) >  struct ieee80211_hdr { >   __le16 frame_control; >   __le16 duration_id; > - u8 addr1[ETH_ALEN]; > - u8 addr2[ETH_A

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > On Tue, Jul 27, 2021 at 01:58:30PM -0700, Kees Cook wrote: > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > field bounds checking for memset(), avoid intentionally writing across > > neighboring fields. > > > > Use

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > > > @@ -278,9 +278,7 @@ static void carl9170_tx_release(struct kref *ref) > >   BUILD_BUG_ON( > >   offsetof(struct ieee80211_tx_info, status.ack_signal) != 20); > >   > > > > - memset(&txinfo->status.ack_signal, 0, > > - si

Re: [PATCH 2/2] drm/i915: Add pci ids and uapi for DG1

2021-08-13 Thread Maarten Lankhorst
Op 12-08-2021 om 23:10 schreef Jason Ekstrand: > On Thu, Aug 12, 2021 at 9:49 AM Daniel Vetter wrote: >> On Thu, Aug 12, 2021 at 2:44 PM Maarten Lankhorst >> wrote: >>> DG1 has support for local memory, which requires the usage of the >>> lmem placement extension for creating bo's, and memregion

Re: [PATCH v1] fbtft: fb_st7789v: added reset on init_display()

2021-08-13 Thread Greg KH
On Fri, Aug 13, 2021 at 08:25:10AM +0200, Oliver Graute wrote: > staging: fbtft: fb_st7789v: reset display before initialization What is this line here, and why is this not your subject line instead? > > In rare cases the display is flipped or mirrored. This was observed more > often in a low te

[PATCH] drm: radeon: r600_dma: Replace cpu_to_le32() by lower_32_bits()

2021-08-13 Thread zhaoxiao
This patch fixes the following sparse errors: drivers/gpu/drm/radeon/r600_dma.c:247:30: warning: incorrect type in assignment (different base types) drivers/gpu/drm/radeon/r600_dma.c:247:30:expected unsigned int volatile [usertype] drivers/gpu/drm/radeon/r600_dma.c:247:30:got restricted _

[PATCH 1/2] drm: avoid races with modesetting rights

2021-08-13 Thread Desmond Cheong Zhi Xi
In drm_client_modeset.c and drm_fb_helper.c, drm_master_internal_{acquire,release} are used to avoid races with DRM userspace. These functions hold onto drm_device.master_mutex while committing, and bail if there's already a master. However, ioctls can still race between themselves. A time-of-chec

[PATCH 2/2] drm: unexport drm_ioctl_permit

2021-08-13 Thread Desmond Cheong Zhi Xi
Since the last user of drm_ioctl_permit was removed, and it's now only used in drm_ioctl.c, unexport the symbol. Reported-by: Daniel Vetter Signed-off-by: Desmond Cheong Zhi Xi --- drivers/gpu/drm/drm_ioctl.c | 15 +-- include/drm/drm_ioctl.h | 1 - 2 files changed, 1 insertion

[PATCH 0/2] drm: update the ioctl handler

2021-08-13 Thread Desmond Cheong Zhi Xi
Hi, Finally got around to it. This patchset implements some updates to the drm ioctl handler that were first raised by Daniel Vetter in [1]. Namely: - Flush concurrent processes that can change the modeset when DRM masters are set/dropped or a lease is revoked - Unexport drm_ioctl_permit() Thoug

[PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Michel Dänzer
From: Michel Dänzer schedule_delayed_work does not push back the work if it was already scheduled before, so amdgpu_device_delay_enable_gfx_off ran ~100 ms after the first time GFXOFF was disabled and re-enabled, even if GFXOFF was disabled and re-enabled again during those 100 ms. This resulted

Re: [PATCH 2/2] drm/amdgpu: Use mod_delayed_work in JPEG/UVD/VCE/VCN ring_end_use hooks

2021-08-13 Thread Michel Dänzer
On 2021-08-13 6:23 a.m., Lazar, Lijo wrote: > > > On 8/12/2021 10:24 PM, Michel Dänzer wrote: >> On 2021-08-12 1:33 p.m., Lazar, Lijo wrote: >>> On 8/12/2021 1:41 PM, Michel Dänzer wrote: On 2021-08-12 7:55 a.m., Koenig, Christian wrote: > Hi James, > > Evan seems to have underst

Re: [PATCH v18 0/2] Add memory bandwidth management to NVIDIA Tegra DRM driver

2021-08-13 Thread Thierry Reding
On Mon, Jun 07, 2021 at 01:40:06AM +0300, Dmitry Osipenko wrote: > 01.06.2021 07:21, Dmitry Osipenko пишет: > > This series adds memory bandwidth management to the NVIDIA Tegra DRM driver, > > which is done using interconnect framework. It fixes display corruption that > > happens due to insufficie

[PATCH 0/4] drm/dp: add some defines and prep for DP 2.0

2021-08-13 Thread Jani Nikula
I'll probably want to merge these to drm-intel-next and drm-misc-next via a topic branch. Jani Nikula (4): drm/dp: add DP 2.0 UHBR link rate and bw code conversions drm/dp: use more of the extended receiver cap drm/dp: add LTTPR DP 2.0 DPCD addresses drm/dp: add helper for extracting adjus

[PATCH 1/4] drm/dp: add DP 2.0 UHBR link rate and bw code conversions

2021-08-13 Thread Jani Nikula
The bw code equals link_rate / 0.27 Gbps only for 8b/10b link rates. Handle DP 2.0 UHBR rates as special cases, though this is not pretty. Cc: Manasi Navare Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_dp_helper.c | 26 ++ 1 file changed, 22 insertions(+), 4 deleti

[PATCH 2/4] drm/dp: use more of the extended receiver cap

2021-08-13 Thread Jani Nikula
Extend the use of extended receiver cap at 0x2200 to cover MAIN_LINK_CHANNEL_CODING_CAP in 0x2206, in case an implementation hides the DP 2.0 128b/132b channel encoding cap. Cc: Manasi Navare Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_dp_helper.c | 2 +- 1 file changed, 1 insertion(+),

[PATCH 3/4] drm/dp: add LTTPR DP 2.0 DPCD addresses

2021-08-13 Thread Jani Nikula
DP 2.0 brings some new DPCD addresses for PHY repeaters. Cc: Manasi Navare Signed-off-by: Jani Nikula --- include/drm/drm_dp_helper.h | 4 1 file changed, 4 insertions(+) diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h index 1d5b3dbb6e56..f3a61341011d 100644 --- a/i

[PATCH 4/4] drm/dp: add helper for extracting adjust 128b/132b TX FFE preset

2021-08-13 Thread Jani Nikula
The DP 2.0 128b/132b channel coding uses TX FFE presets instead of vswing and pre-emphasis. Cc: Manasi Navare Signed-off-by: Jani Nikula --- drivers/gpu/drm/drm_dp_helper.c | 14 ++ include/drm/drm_dp_helper.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/gpu/

Re: [PATCH 2/2] drm/amdgpu: Use mod_delayed_work in JPEG/UVD/VCE/VCN ring_end_use hooks

2021-08-13 Thread Lazar, Lijo
On 8/13/2021 4:01 PM, Michel Dänzer wrote: On 2021-08-13 6:23 a.m., Lazar, Lijo wrote: On 8/12/2021 10:24 PM, Michel Dänzer wrote: On 2021-08-12 1:33 p.m., Lazar, Lijo wrote: On 8/12/2021 1:41 PM, Michel Dänzer wrote: On 2021-08-12 7:55 a.m., Koenig, Christian wrote: Hi James, Evan see

[PATCH] drm/i915/gt: Potential error pointer dereference in pinned_context()

2021-08-13 Thread Dan Carpenter
If the intel_engine_create_pinned_context() function returns an error pointer, then dereferencing "ce" will Oops. Use "vm" instead of "ce->vm". Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Dan Carpenter --- drivers/gpu/drm/i915/gt/intel_migrate.c | 2 +- 1 file c

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Lazar, Lijo
On 8/13/2021 3:59 PM, Michel Dänzer wrote: From: Michel Dänzer schedule_delayed_work does not push back the work if it was already scheduled before, so amdgpu_device_delay_enable_gfx_off ran ~100 ms after the first time GFXOFF was disabled and re-enabled, even if GFXOFF was disabled and re-e

Re: [RFC PATCH 06/17] drm/exynos: dsi: Handle exynos specifics via driver_data

2021-08-13 Thread Laurent Pinchart
Hi Inki, On Fri, Aug 13, 2021 at 03:50:56PM +0900, Inki Dae wrote: > 21. 7. 26. 오전 2:25에 Sam Ravnborg 이(가) 쓴 글: > > On Sun, Jul 04, 2021 at 02:32:19PM +0530, Jagan Teki wrote: > >> Exynos DSI driver is actually a Samsung MIPI DSIM bridge > >> IP which is also used in i.MX8MM platforms. > >> > >> R

Re: [PATCH v18 0/2] Add memory bandwidth management to NVIDIA Tegra DRM driver

2021-08-13 Thread Dmitry Osipenko
13.08.2021 13:33, Thierry Reding пишет: > On Mon, Jun 07, 2021 at 01:40:06AM +0300, Dmitry Osipenko wrote: >> 01.06.2021 07:21, Dmitry Osipenko пишет: >>> This series adds memory bandwidth management to the NVIDIA Tegra DRM driver, >>> which is done using interconnect framework. It fixes display co

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Michel Dänzer
On 2021-08-13 1:50 p.m., Lazar, Lijo wrote: > > > On 8/13/2021 3:59 PM, Michel Dänzer wrote: >> From: Michel Dänzer >> >> schedule_delayed_work does not push back the work if it was already >> scheduled before, so amdgpu_device_delay_enable_gfx_off ran ~100 ms >> after the first time GFXOFF was

Re: [Intel-gfx] [PATCH v2] fbdev/efifb: Release PCI device's runtime PM ref during FB destroy

2021-08-13 Thread Imre Deak
On Mon, Aug 09, 2021 at 04:31:46PM +0300, Imre Deak wrote: > Atm the EFI FB platform driver gets a runtime PM reference for the > associated GFX PCI device during probing the EFI FB platform device and > releases it only when the platform device gets unbound. > > When fbcon switches to the FB prov

Re: [PATCH v2 2/2] drm/panel: s6d27a1: Add driver for Samsung S6D27A1 display panel

2021-08-13 Thread Linus Walleij
On Sat, Aug 7, 2021 at 3:31 PM Markuss Broks wrote: > This adds a driver for Samsung S6D27A1 display controller and panel. > This panel is found in the Samsung GT-I8160 mobile phone, > and possibly some other mobile phones. > > This display needs manufacturer commands to configure it; > the comma

Re: [PATCH 1/2] dt-bindings: display: panel: Add Truly NT35521 panel support

2021-08-13 Thread Shawn Guo
On Wed, Aug 11, 2021 at 12:51:56PM -0600, Rob Herring wrote: > On Wed, Aug 04, 2021 at 04:13:51PM +0800, Shawn Guo wrote: > > The Truly NT35521 is a 5.24" 1280x720 DSI panel, and the backlight is > > managed through DSI link. > > > > Signed-off-by: Shawn Guo > > --- > > .../bindings/display/pane

Re: [PATCH] drm/i915/gt: Potential error pointer dereference in pinned_context()

2021-08-13 Thread Thomas Hellström
On 8/13/21 1:36 PM, Dan Carpenter wrote: If the intel_engine_create_pinned_context() function returns an error pointer, then dereferencing "ce" will Oops. Use "vm" instead of "ce->vm". Fixes: cf586021642d ("drm/i915/gt: Pipelined page migration") Signed-off-by: Dan Carpenter --- drivers/gp

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Lazar, Lijo
On 8/13/2021 7:04 PM, Michel Dänzer wrote: On 2021-08-13 1:50 p.m., Lazar, Lijo wrote: On 8/13/2021 3:59 PM, Michel Dänzer wrote: From: Michel Dänzer schedule_delayed_work does not push back the work if it was already scheduled before, so amdgpu_device_delay_enable_gfx_off ran ~100 ms af

Re: [Intel-gfx] [PATCH v6 09/15] drm/i915/pxp: Implement PXP irq handler

2021-08-13 Thread Daniel Vetter
On Wed, Jul 28, 2021 at 07:01:00PM -0700, Daniele Ceraolo Spurio wrote: > From: "Huang, Sean Z" > > The HW will generate a teardown interrupt when session termination is > required, which requires i915 to submit a terminating batch. Once the HW > is done with the termination it will generate anot

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniel Vetter
On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: > This api allow user mode to create protected buffers and to mark > contexts as making use of such objects. Only when using contexts > marked in such a way is the execution guaranteed to work as expected. > > Contexts can onl

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Michel Dänzer
On 2021-08-13 4:14 p.m., Lazar, Lijo wrote: > On 8/13/2021 7:04 PM, Michel Dänzer wrote: >> On 2021-08-13 1:50 p.m., Lazar, Lijo wrote: >>> On 8/13/2021 3:59 PM, Michel Dänzer wrote: From: Michel Dänzer schedule_delayed_work does not push back the work if it was already schedul

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 04:37:53PM +0200, Daniel Vetter wrote: > On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: > > This api allow user mode to create protected buffers and to mark > > contexts as making use of such objects. Only when using contexts > > marked in such a way

[PATCH v2 1/2] drm/i915/ttm: Reorganize the ttm move code somewhat

2021-08-13 Thread Thomas Hellström
In order to make the code a bit more readable and to facilitate async memcpy moves, reorganize the move code a little. Determine at an early stage whether to copy or to clear. v2: - Don't set up the memcpy iterators unless we are actually going to memcpy. Signed-off-by: Thomas Hellström Reviewed

[PATCH v2 0/2] drm/i915, drm/ttm: Update the ttm_move_memcpy() interface

2021-08-13 Thread Thomas Hellström
The ttm_move_memcpy() function was intended to be able to be used async under a fence. We are going to utilize that as a fallback if the gpu clearing blit fails before we set up CPU- or GPU ptes to the memory region. But to accomplish that the bo argument to ttm_move_memcpy() needs to be replaced.

[PATCH v2 2/2] drm/ttm, drm/i915: Update ttm_move_memcpy for async use

2021-08-13 Thread Thomas Hellström
The buffer object argument to ttm_move_memcpy was only used to determine whether the destination memory should be cleared only or whether we should copy data. Replace it with a "clear" bool, and update the callers. The intention here is to be able to use ttm_move_memcpy() async under a dma-fence a

[PATCH v6 0/6] Add Unisoc's drm kms module

2021-08-13 Thread Kevin Tang
ChangeList: RFC v1: 1. only upstream modeset and atomic at first commit. 2. remove some unused code; 3. use alpha and blend_mode properties; 3. add yaml support; 4. remove auto-adaptive panel driver; 5. bugfix RFC v2: 1. add sprd crtc and plane module for KMS, preparing for multi crtc&encoder 2. r

[PATCH v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

2021-08-13 Thread Kevin Tang
From: Kevin Tang The Unisoc DRM master device is a virtual device needed to list all DPU devices or other display interface nodes that comprise the graphics subsystem Unisoc's display pipeline have several components as below description, multi display controllers and corresponding physical inte

[PATCH v6 2/6] drm/sprd: add Unisoc's drm kms master

2021-08-13 Thread Kevin Tang
Adds drm support for the Unisoc's display subsystem. This is drm kms driver, this driver provides support for the application framework in Android, Yocto and more. Application framework can access Unisoc's display internal peripherals through libdrm or libkms, it's test ok by modetest (DRM/KMS te

[PATCH v6 3/6] dt-bindings: display: add Unisoc's dpu bindings

2021-08-13 Thread Kevin Tang
From: Kevin Tang DPU (Display Processor Unit) is the Display Controller for the Unisoc SoCs which transfers the image data from a video memory buffer to an internal LCD interface. Cc: Orson Zhai Cc: Chunyan Zhang Signed-off-by: Kevin Tang Reviewed-by: Rob Herring --- .../display/sprd/sprd,s

[PATCH v6 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-08-13 Thread Kevin Tang
Adds DPU(Display Processor Unit) support for the Unisoc's display subsystem. It's support multi planes, scaler, rotation, PQ(Picture Quality) and more. v2: - Use drm_xxx to replace all DRM_XXX. - Use kzalloc to replace devm_kzalloc for sprd_dpu structure init. v3: - Remove dpu_layer stuff l

[PATCH v6 5/6] dt-bindings: display: add Unisoc's mipi dsi controller bindings

2021-08-13 Thread Kevin Tang
From: Kevin Tang Adds MIPI DSI Controller support for Unisoc's display subsystem. v5: - Remove panel_in port for dsi node. Cc: Orson Zhai Cc: Chunyan Zhang Signed-off-by: Kevin Tang Reviewed-by: Rob Herring --- .../display/sprd/sprd,sharkl3-dsi-host.yaml | 88 +++ 1 fil

[PATCH v6 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver

2021-08-13 Thread Kevin Tang
Adds dsi host controller support for the Unisoc's display subsystem. Adds dsi phy support for the Unisoc's display subsystem. Only MIPI DSI Displays supported, DP/TV/HMDI will be support in the feature. v1: - Remove dphy and dsi graph binding, merge the dphy driver into the dsi. v2: - Use drm

Re: [PATCH v1] fbtft: fb_st7789v: added reset on init_display()

2021-08-13 Thread Greg KH
On Fri, Aug 13, 2021 at 02:54:30PM +0200, Oliver Graute wrote: > On 13/08/21, Greg KH wrote: > > On Fri, Aug 13, 2021 at 08:25:10AM +0200, Oliver Graute wrote: > > > staging: fbtft: fb_st7789v: reset display before initialization > > > > What is this line here, and why is this not your subject lin

Re: [PATCH v1] staging: fbtft: fb_st7789v: reset display before initialization

2021-08-13 Thread Greg KH
On Fri, Aug 13, 2021 at 02:59:27PM +0200, Oliver Graute wrote: > In rare cases the display is flipped or mirrored. This was observed more > often in a low temperature environment. A clean reset on init_display() > should help to get registers in a sane state. > > Signed-off-by: Oliver Graute > --

Re: [PATCH] drm: radeon: r600_dma: Replace cpu_to_le32() by lower_32_bits()

2021-08-13 Thread Michel Dänzer
On 2021-08-13 10:54 a.m., zhaoxiao wrote: > This patch fixes the following sparse errors: > drivers/gpu/drm/radeon/r600_dma.c:247:30: warning: incorrect type in > assignment (different base types) > drivers/gpu/drm/radeon/r600_dma.c:247:30:expected unsigned int volatile > [usertype] > drivers

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Lazar, Lijo
On 8/13/2021 8:10 PM, Michel Dänzer wrote: On 2021-08-13 4:14 p.m., Lazar, Lijo wrote: On 8/13/2021 7:04 PM, Michel Dänzer wrote: On 2021-08-13 1:50 p.m., Lazar, Lijo wrote: On 8/13/2021 3:59 PM, Michel Dänzer wrote: From: Michel Dänzer schedule_delayed_work does not push back the work i

Re: [PATCH 5/9] drm/i915/guc: Flush the work queue for GuC generated G2H

2021-08-13 Thread Daniel Vetter
On Thu, Aug 12, 2021 at 10:38:18PM +, Matthew Brost wrote: > On Thu, Aug 12, 2021 at 09:47:23PM +0200, Daniel Vetter wrote: > > On Thu, Aug 12, 2021 at 03:23:30PM +, Matthew Brost wrote: > > > On Thu, Aug 12, 2021 at 04:11:28PM +0200, Daniel Vetter wrote: > > > > On Wed, Aug 11, 2021 at 01:

[PATCH v5 0/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and use in DRM

2021-08-13 Thread Jim Cromie
hi Jason, Greg, Daniel, dri-everyone, drm_debug_enabled() is called a lot (by drm-debug api) to do unlikely bit-tests to selectively enable debug printing; this is a good job for DYNAMIC_DEBUG, IFF it is built with JUMP_LABEL. This patchset enables the use of dynamic-debug to avoid those drm_deb

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniele Ceraolo Spurio
On 8/13/2021 7:37 AM, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only when using contexts marked in such a way is the execution guaranteed

[PATCH v5 1/9] drm/print: fixup spelling in a comment

2021-08-13 Thread Jim Cromie
s/prink/printk/ - no functional changes Signed-off-by: Jim Cromie --- include/drm/drm_print.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/drm/drm_print.h b/include/drm/drm_print.h index 9b66be54dd16..15a089a87c22 100644 --- a/include/drm/drm_print.h +++ b/include/

[PATCH v5 2/9] moduleparam: add data member to struct kernel_param

2021-08-13 Thread Jim Cromie
Add a const void* data member to the struct, to allow attaching private data that will be used soon by a setter method (via kp->data) to perform more elaborate actions. To attach the data at compile time, add new macros: module_param_cbd() derives from module_param_cb(), adding data param, and la

[PATCH v5 3/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks

2021-08-13 Thread Jim Cromie
DEFINE_DYNAMIC_DEBUG_CATEGORIES(name, var, bitmap_desc, @bit_descs) allows users to define a drm.debug style (bitmap) sysfs interface, and to specify the desired mapping from bits[0-N] to the format-prefix'd pr_debug()s to be controlled. DEFINE_DYNAMIC_DEBUG_CATEGORIES(debug_gvt, __gvt_debug,

[PATCH v5 4/9] i915/gvt: remove spaces in pr_debug "gvt: core:" etc prefixes

2021-08-13 Thread Jim Cromie
Taking embedded spaces out of existing prefixes makes them better class-prefixes; simplifying the nested 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 fo

[PATCH v5 5/9] i915/gvt: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to create "gvt:core:" etc categories

2021-08-13 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", { "gv

[PATCH v5 6/9] amdgpu: use DEFINE_DYNAMIC_DEBUG_CATEGORIES to control categorized pr_debugs

2021-08-13 Thread Jim Cromie
logger_types.h defines many DC_LOG_*() categorized debug wrappers. Most of these use DRM debug API, so are controllable using drm.debug, but others use bare pr_debug("$prefix: .."), each with a different class-prefix matching "^\[\w+\]:" Use DEFINE_DYNAMIC_DEBUG_CATEGORIES to create a /sys debug_d

[PATCH v5 7/9] drm_print: add choice to use dynamic debug in drm-debug

2021-08-13 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_DEBUG*(8 names), DRM_DEV_DEBUG*(3 names). There are thousands of these callsites, each categorized by their authors. These callsites can be enabled at runtime by their category, ea

[PATCH v5 8/9] amdgpu_ucode: reduce number of pr_debug calls

2021-08-13 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 ro callsite data, and this patch removes about 65 calls, so it saves ~3.5kb. no functional changes. Signed-off-by: Jim Cromie --- drivers/gpu/drm/amd/amd

[PATCH v5 9/9] dyndbg: RFC add tracer facility RFC

2021-08-13 Thread Jim Cromie
Sean Paul seanp...@chromium.org proposed, in https://patchwork.freedesktop.org/series/78133/ drm/trace: Mirror DRM debug logs to tracefs That patchset's goal is to be able to duplicate the debug stream to a tracing destination, by splitting drm_debug_enabled() into syslog & trace flavors, and enab

Re: [Intel-gfx] [PATCH v6 10/15] drm/i915/pxp: interfaces for using protected objects

2021-08-13 Thread Daniele Ceraolo Spurio
On 8/13/2021 7:42 AM, Daniel Vetter wrote: On Fri, Aug 13, 2021 at 04:37:53PM +0200, Daniel Vetter wrote: On Wed, Jul 28, 2021 at 07:01:01PM -0700, Daniele Ceraolo Spurio wrote: This api allow user mode to create protected buffers and to mark contexts as making use of such objects. Only when

Re: [PATCH v5 2/9] moduleparam: add data member to struct kernel_param

2021-08-13 Thread Andy Shevchenko
On Fri, Aug 13, 2021 at 09:17:10AM -0600, Jim Cromie wrote: > Add a const void* data member to the struct, to allow attaching > private data that will be used soon by a setter method (via kp->data) > to perform more elaborate actions. > > To attach the data at compile time, add new macros: > > mo

Re: [PATCH v2] drm: Copy drm_wait_vblank to user before returning

2021-08-13 Thread Mark Yacoub
Thanks for your review Michel! @MAINTAINER, could you please strip the Change-Id when applying. Thanks! On Fri, Aug 13, 2021 at 3:33 AM Michel Dänzer wrote: > > On 2021-08-12 9:49 p.m., Mark Yacoub wrote: > > From: Mark Yacoub > > > > [Why] > > Userspace should get back a copy of drm_wait_vblank

Re: [PATCH 10/64] lib80211: Use struct_group() for memcpy() region

2021-08-13 Thread Kees Cook
On Fri, Aug 13, 2021 at 10:04:09AM +0200, Johannes Berg wrote: > On Tue, 2021-07-27 at 13:58 -0700, Kees Cook wrote: > > > > +++ b/include/linux/ieee80211.h > > @@ -297,9 +297,11 @@ static inline u16 ieee80211_sn_sub(u16 sn1, u16 sn2) > >  struct ieee80211_hdr { > >   __le16 frame_control; > >  

Re: [PATCH 1/2] drm: avoid races with modesetting rights

2021-08-13 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 04:54:49PM +0800, Desmond Cheong Zhi Xi wrote: > In drm_client_modeset.c and drm_fb_helper.c, > drm_master_internal_{acquire,release} are used to avoid races with DRM > userspace. These functions hold onto drm_device.master_mutex while > committing, and bail if there's alrea

Re: [PATCH 2/2] drm: unexport drm_ioctl_permit

2021-08-13 Thread Daniel Vetter
On Fri, Aug 13, 2021 at 04:54:50PM +0800, Desmond Cheong Zhi Xi wrote: > Since the last user of drm_ioctl_permit was removed, and it's now only > used in drm_ioctl.c, unexport the symbol. > > Reported-by: Daniel Vetter > Signed-off-by: Desmond Cheong Zhi Xi Applied to drm-misc-next for 5.16, th

Re: [PATCH v5 3/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks

2021-08-13 Thread Andy Shevchenko
On Fri, Aug 13, 2021 at 09:17:11AM -0600, Jim Cromie wrote: > DEFINE_DYNAMIC_DEBUG_CATEGORIES(name, var, bitmap_desc, @bit_descs) > allows users to define a drm.debug style (bitmap) sysfs interface, and > to specify the desired mapping from bits[0-N] to the format-prefix'd > pr_debug()s to be contr

Re: [PATCH] drm/amdgpu: Cancel delayed work when GFXOFF is disabled

2021-08-13 Thread Michel Dänzer
On 2021-08-13 5:07 p.m., Lazar, Lijo wrote: > > > On 8/13/2021 8:10 PM, Michel Dänzer wrote: >> On 2021-08-13 4:14 p.m., Lazar, Lijo wrote: >>> On 8/13/2021 7:04 PM, Michel Dänzer wrote: On 2021-08-13 1:50 p.m., Lazar, Lijo wrote: > On 8/13/2021 3:59 PM, Michel Dänzer wrote: >> From:

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Kees Cook
On Fri, Aug 13, 2021 at 09:40:07AM +0200, Johannes Berg wrote: > On Sat, 2021-07-31 at 08:55 -0700, Kees Cook wrote: > > On Tue, Jul 27, 2021 at 01:58:30PM -0700, Kees Cook wrote: > > > In preparation for FORTIFY_SOURCE performing compile-time and run-time > > > field bounds checking for memset(),

Re: [PATCH v5 3/9] dyndbg: add DEFINE_DYNAMIC_DEBUG_CATEGORIES and callbacks

2021-08-13 Thread Matthew Wilcox
On Fri, Aug 13, 2021 at 06:51:05PM +0300, Andy Shevchenko wrote: > On Fri, Aug 13, 2021 at 09:17:11AM -0600, Jim Cromie wrote: > > +int param_set_dyndbg(const char *instr, const struct kernel_param *kp) > > +{ > > + unsigned long inbits; > > + int rc, i, chgct = 0, totct = 0; > > + char query

[GIT PULL] drm/tegra: Changes for v5.15-rc1

2021-08-13 Thread Thierry Reding
Hi Dave, The following changes since commit e73f0f0ee7541171d89f2e2491130c7771ba58d3: Linux 5.14-rc1 (2021-07-11 15:07:40 -0700) are available in the Git repository at: ssh://git.freedesktop.org/git/tegra/linux.git tags/drm/tegra/for-5.15-rc1 for you to fetch changes up to fed0289394173509

[tegra-drm:drm/tegra/for-next 16/17] drivers/gpu/drm/tegra/dc.c:1843:53: warning: variable 'new_dc_state' set but not used

2021-08-13 Thread kernel test robot
tree: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next head: ad85b0843ee4536593415ca890d7fb52cd7f1fbe commit: 04d5d5df9df79f9045e76404775fc8a084aac23d [16/17] drm/tegra: dc: Support memory bandwidth management config: arm-defconfig (attached as .config) compiler: arm-linux-gnue

Re: [PATCH 0/1] Fix DRM driver initialization failure in kernel v5.14

2021-08-13 Thread Dan Moulding
Just a friendly reminder that this fix for a regression needs review. It should be a quick review. It would probably be good to ensure this gets in before the final 5.14 release, otherwise this is going to be a very visible regression for anyone that uses DRM and does not use debugfs. Thanks! --

[pull] amdgpu, amdkfd drm-next-5.15

2021-08-13 Thread Alex Deucher
Hi Dave, Daniel, Updates for 5.15. Mostly bug fixes and cleanups. The following changes since commit a43e2a0e11491b73e2acaa27ee74d6c3b86deac0: drm/amdkfd: Allow querying SVM attributes that are clear (2021-08-06 16:12:32 -0400) are available in the Git repository at: https://gitlab.freed

[PATCH v2 00/12] Implement generic prot_guest_has() helper function

2021-08-13 Thread Tom Lendacky
This patch series provides a generic helper function, prot_guest_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new protected virtualization technologies are added to the kernel, they can all be covered by a single funct

[PATCH v2 01/12] x86/ioremap: Selectively build arch override encryption functions

2021-08-13 Thread Tom Lendacky
In prep for other uses of the prot_guest_has() function besides AMD's memory encryption support, selectively build the AMD memory encryption architecture override functions only when CONFIG_AMD_MEM_ENCRYPT=y. These functions are: - early_memremap_pgprot_adjust() - arch_memremap_can_ram_remap() Add

[PATCH v2 02/12] mm: Introduce a function to check for virtualization protection features

2021-08-13 Thread Tom Lendacky
In prep for other protected virtualization technologies, introduce a generic helper function, prot_guest_has(), that can be used to check for specific protection attributes, like memory encryption. This is intended to eliminate having to add multiple technology-specific checks to the code (e.g. if

[PATCH v2 03/12] x86/sev: Add an x86 version of prot_guest_has()

2021-08-13 Thread Tom Lendacky
Introduce an x86 version of the prot_guest_has() function. This will be used in the more generic x86 code to replace vendor specific calls like sev_active(), etc. While the name suggests this is intended mainly for guests, it will also be used for host memory encryption checks in place of sme_acti

[PATCH v2 04/12] powerpc/pseries/svm: Add a powerpc version of prot_guest_has()

2021-08-13 Thread Tom Lendacky
Introduce a powerpc version of the prot_guest_has() function. This will be used to replace the powerpc mem_encrypt_active() implementation, so the implementation will initially only support the PATTR_MEM_ENCRYPT attribute. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signe

[PATCH v2 05/12] x86/sme: Replace occurrences of sme_active() with prot_guest_has()

2021-08-13 Thread Tom Lendacky
Replace occurrences of sme_active() with the more generic prot_guest_has() using PATTR_HOST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SME will be used. If future support is added for other memory encryption technologies, the use of PATTR_HOST_MEM_ENCRYPT can be updated, as r

[PATCH v2 06/12] x86/sev: Replace occurrences of sev_active() with prot_guest_has()

2021-08-13 Thread Tom Lendacky
Replace occurrences of sev_active() with the more generic prot_guest_has() using PATTR_GUEST_MEM_ENCRYPT, except for in arch/x86/mm/mem_encrypt*.c where PATTR_SEV will be used. If future support is added for other memory encryption technologies, the use of PATTR_GUEST_MEM_ENCRYPT can be updated, as

[PATCH v2 07/12] x86/sev: Replace occurrences of sev_es_active() with prot_guest_has()

2021-08-13 Thread Tom Lendacky
Replace occurrences of sev_es_active() with the more generic prot_guest_has() using PATTR_GUEST_PROT_STATE, except for in arch/x86/kernel/sev*.c and arch/x86/mm/mem_encrypt*.c where PATTR_SEV_ES will be used. If future support is added for other memory encyrption techonologies, the use of PATTR_GUE

[PATCH v2 08/12] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-13 Thread Tom Lendacky
Replace occurrences of mem_encrypt_active() with calls to prot_guest_has() with the PATTR_MEM_ENCRYPT attribute. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: Dave Hansen Cc: Andy Lutomirski Cc: Peter Zijlstra Cc: David Airlie Cc: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxi

[PATCH v2 09/12] mm: Remove the now unused mem_encrypt_active() function

2021-08-13 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Reviewed-by: Joerg Roedel Signed-off-by: Tom Lendacky --- include/linux/mem_encrypt.h | 4 1 file changed, 4 deletions(-) diff --git a/include/linux/mem_encrypt.h b/include/linux/mem_enc

[PATCH v2 10/12] x86/sev: Remove the now unused mem_encrypt_active() function

2021-08-13 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Reviewed-by: Joerg Roedel Signed-off-by: Tom Lendacky --- arch/x86/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-

[PATCH v2 11/12] powerpc/pseries/svm: Remove the now unused mem_encrypt_active() function

2021-08-13 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Cc: Michael Ellerman Cc: Benjamin Herrenschmidt Cc: Paul Mackerras Signed-off-by: Tom Lendacky --- arch/powerpc/include/asm/mem_encrypt.h | 5 - 1 file changed, 5 deletions(-) diff --gi

[PATCH v2 12/12] s390/mm: Remove the now unused mem_encrypt_active() function

2021-08-13 Thread Tom Lendacky
The mem_encrypt_active() function has been replaced by prot_guest_has(), so remove the implementation. Since the default implementation of the prot_guest_has() matches the s390 implementation of mem_encrypt_active(), prot_guest_has() does not need to be implemented in s390 (the config option ARCH_H

Re: [PATCH] drm/arm/malidp: fix mode_valid couldn't cull invalid modes issue

2021-08-13 Thread Liviu Dudau
On Tue, Aug 10, 2021 at 10:43:31AM +0800, sandor...@nxp.com wrote: > From: Sandor Yu > > In function malidp_crtc_mode_valid, mode->crtc_mode = 0 when run > in drm_helper_probe_single_connector_modes. > Invalid video modes are not culled > and all modes move to the connector's modes list. > It is

Re: [PATCH 07/11] treewide: Replace the use of mem_encrypt_active() with prot_guest_has()

2021-08-13 Thread Tom Lendacky
On 8/12/21 5:07 AM, Kirill A. Shutemov wrote: On Wed, Aug 11, 2021 at 10:52:55AM -0500, Tom Lendacky wrote: On 8/11/21 7:19 AM, Kirill A. Shutemov wrote: On Tue, Aug 10, 2021 at 02:48:54PM -0500, Tom Lendacky wrote: On 8/10/21 1:45 PM, Kuppuswamy, Sathyanarayanan wrote: ... Looking at code a

[PATCH] drm/i915/selftest: Fix use of err in igt_reset_{fail, nop}_engine()

2021-08-13 Thread Nathan Chancellor
Clang warns: In file included from drivers/gpu/drm/i915/gt/intel_reset.c:1514: drivers/gpu/drm/i915/gt/selftest_hangcheck.c:465:62: warning: variable 'err' is uninitialized when used here [-Wuninitialized] pr_err("[%s] Create context failed: %d!\n", engine->name, err);

Re: [tegra-drm:drm/tegra/for-next 16/17] drivers/gpu/drm/tegra/dc.c:1843:53: warning: variable 'new_dc_state' set but not used

2021-08-13 Thread Dmitry Osipenko
13.08.2021 19:36, kernel test robot пишет: > tree: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next > head: ad85b0843ee4536593415ca890d7fb52cd7f1fbe > commit: 04d5d5df9df79f9045e76404775fc8a084aac23d [16/17] drm/tegra: dc: > Support memory bandwidth management > config: arm-def

Re: [PATCH v5 2/9] moduleparam: add data member to struct kernel_param

2021-08-13 Thread jim . cromie
On Fri, Aug 13, 2021 at 9:44 AM Andy Shevchenko wrote: > > On Fri, Aug 13, 2021 at 09:17:10AM -0600, Jim Cromie wrote: > > Add a const void* data member to the struct, to allow attaching > > private data that will be used soon by a setter method (via kp->data) > > to perform more elaborate actions

Re: [tegra-drm:drm/tegra/for-next 16/17] drivers/gpu/drm/tegra/dc.c:1843:53: warning: variable 'new_dc_state' set but not used

2021-08-13 Thread Dmitry Osipenko
13.08.2021 20:12, Dmitry Osipenko пишет: ... > I probably should update compiler or set W=1 to get that warning. These > variables were used in older versions of the patch and they can be removed > now. > > Please amend the patch with this: Perhaps too late already. I'll make patch for that and

Re: [PATCH v2 02/12] mm: Introduce a function to check for virtualization protection features

2021-08-13 Thread Kuppuswamy, Sathyanarayanan
On 8/13/21 9:59 AM, Tom Lendacky wrote: In prep for other protected virtualization technologies, introduce a generic helper function, prot_guest_has(), that can be used to check for specific protection attributes, like memory encryption. This is intended to eliminate having to add multiple tec

Re: [PATCH v2 00/12] Implement generic prot_guest_has() helper function

2021-08-13 Thread Tom Lendacky
On 8/13/21 11:59 AM, Tom Lendacky wrote: This patch series provides a generic helper function, prot_guest_has(), to replace the sme_active(), sev_active(), sev_es_active() and mem_encrypt_active() functions. It is expected that as new protected virtualization technologies are added to the kernel

[Bug 214001] [bisected][regression] After commit "drm/ttm: Initialize debugfs from ttm_global_init()" kernels without debugfs explicitly set to 'allow all' fail to boot

2021-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214001 Duncan (1i5t5.dun...@cox.net) changed: What|Removed |Added CC||1i5t5.dun...@cox.net ---

Re: [PATCH 39/64] mac80211: Use memset_after() to clear tx status

2021-08-13 Thread Johannes Berg
On Fri, 2021-08-13 at 09:08 -0700, Kees Cook wrote: > > > > The common helper should also clear ack_signal, but that was broken by > > commit e3e1a0bcb3f1 ("mac80211: reduce IEEE80211_TX_MAX_RATES"), because > > that commit changed the order of the fields and updated carl9170 and p54 > > properly

[Bug 214001] [bisected][regression] After commit "drm/ttm: Initialize debugfs from ttm_global_init()" kernels without debugfs explicitly set to 'allow all' fail to boot

2021-08-13 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=214001 --- Comment #3 from Linux_Chemist (untaintablean...@hotmail.co.uk) --- Thanks for your comment, Duncan! Yes, I'm on a customised kernel that has a lot removed (including debugfs as you can tell) and also amdgpu (RX 5700). There's usually a bug in

Re: [PATCH 5/9] drm/i915/guc: Flush the work queue for GuC generated G2H

2021-08-13 Thread Matthew Brost
On Fri, Aug 13, 2021 at 05:11:59PM +0200, Daniel Vetter wrote: > On Thu, Aug 12, 2021 at 10:38:18PM +, Matthew Brost wrote: > > On Thu, Aug 12, 2021 at 09:47:23PM +0200, Daniel Vetter wrote: > > > On Thu, Aug 12, 2021 at 03:23:30PM +, Matthew Brost wrote: > > > > On Thu, Aug 12, 2021 at 04:

Re: [PATCH v1] fbtft: fb_st7789v: added reset on init_display()

2021-08-13 Thread Oliver Graute
On 13/08/21, Greg KH wrote: > On Fri, Aug 13, 2021 at 08:25:10AM +0200, Oliver Graute wrote: > > staging: fbtft: fb_st7789v: reset display before initialization > > What is this line here, and why is this not your subject line instead? I'll put the line as subject instead. > > In rare cases the

  1   2   >