[PATCH 1/6] drm: Inline AGP wrappers into their only callers

2021-01-12 Thread Thomas Zimmermann
The AGP wrapper functions serve no purpose. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_agpsupport.c | 12 ++-- drivers/gpu/drm/drm_memory.c | 18 -- include/drm/drm_agpsupport.h | 18 -- 3 files changed, 6 insertions(+), 42 deletions(

[PATCH 0/6] Move struct drm_device.hose to legacy section

2021-01-12 Thread Thomas Zimmermann
This patchset moves struct drm_device.hose to the section for legacy drivers. As part of this, a number of other changes are applied in order to protect all uses of hose by CONFIG_DRM_LEGACY. Patches 1 to 3 move non-legacy code out put drm_memory.c and add the remaining I/O-memory helpers to the l

[PATCH 2/6] drm: Implement drm_need_swiotlb() in drm_cache.c

2021-01-12 Thread Thomas Zimmermann
The function is declared in drm_cache.h. I also removed the curly braces from the for loop to adhere to kernel coding style. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/drm_cache.c | 32 drivers/gpu/drm/drm_memory.c | 33

[PATCH 3/6] drm: Build drm_memory.o only for legacy drivers

2021-01-12 Thread Thomas Zimmermann
The file contains I/O-memory functions that are only used by legacy drivers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index fefaff4c832d..ba0ecb7756c6

[PATCH 6/6] drm: Move struct drm_device.hose to legacy section

2021-01-12 Thread Thomas Zimmermann
The field is only relevant for legacy DRM drivers. Its only non-legacy user in the DRM core is in drm_file.c. This code is now protected by CONFIG_DRM_LEGACY. Radeon, the only driver that used the field, has been changed to maintain it's own copy. Signed-off-by: Thomas Zimmermann --- drivers/gpu

[PATCH 5/6] drm/radeon: Store PCI controller in struct radeon_device.hose

2021-01-12 Thread Thomas Zimmermann
Moves struct drm_device.hose into struct radeon_device. The field in struct DRM device is only for legacy drivers. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/radeon/radeon.h | 3 +++ drivers/gpu/drm/radeon/radeon_drv.c | 4 drivers/gpu/drm/radeon/radeon_kms.c | 4 drivers

[PATCH 4/6] drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY

2021-01-12 Thread Thomas Zimmermann
CONFIG_DRM_VM gets selected by CONFIG_DRM_LEGACY, but nothing else. So remove it and build drm_vm.o as part of CONFIG_DRM_LEGACY. Signed-off-by: Thomas Zimmermann --- drivers/gpu/drm/Kconfig | 5 - drivers/gpu/drm/Makefile | 3 +-- drivers/gpu/drm/drm_legacy.h | 2 +- 3 files change

Re: [PATCH v5 1/4] drm/i915: Keep track of pwm-related backlight hooks separately

2021-01-12 Thread Vasily Khoruzhick
On Thu, Jan 7, 2021 at 2:52 PM Lyude Paul wrote: > > Currently, every different type of backlight hook that i915 supports is > pretty straight forward - you have a backlight, probably through PWM > (but maybe DPCD), with a single set of platform-specific hooks that are > used for controlling it. >

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Christian König
Am 11.01.21 um 17:13 schrieb Daniel Vetter: On Fri, Jan 08, 2021 at 04:49:55PM +, Grodzovsky, Andrey wrote: Ok then, I guess I will proceed with the dummy pages list implementation then. Andrey From: Koenig, Christian Sent: 08 January 2021 09:52 To: Grodzo

Re: [PATCH 0/6] Move struct drm_device.hose to legacy section

2021-01-12 Thread Christian König
I'm not even sure the radeon stuff still compiles/works on alpha :) Anyway looks sane to me and the whole set is Reviewed-by: Christian König . Thanks, Christian. Am 12.01.21 um 09:10 schrieb Thomas Zimmermann: This patchset moves struct drm_device.hose to the section for legacy drivers. As

Re: [PATCH] drm: arc: Use simple encoder

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 10:10:11AM +0800, Tian Tao wrote: > The arc driver uses empty implementations for its encoders. Replace > the code with the generic simple encoder. > > Signed-off-by: Tian Tao I have an entire patch series to convert arc over to simple display pipe. It's not seen much act

[PATCH 01/15] drm/arc: Switch to devm_drm_dev_alloc

2021-01-12 Thread Daniel Vetter
- Need to embedded the drm_device, but for now we keep the usual pointer chasing. - No more devm_kzalloc, which fixes a lifetime issues on driver remove. - No more drm_dev_put, that's done by devm_ now. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodk

[PATCH 02/15] drm/arc: Stop using drm_device->dev_private

2021-01-12 Thread Daniel Vetter
Upcasting using a container_of macro is more typesafe, faster and easier for the compiler to optimize. Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu.h | 2 ++ drivers/gpu/drm/arc/arcpgu_crtc.c | 4 ++-- drivers/gpu/drm/arc/arcpgu_drv.c

[PATCH 03/15] drm/arc: Delete arcpgu_priv->fb

2021-01-12 Thread Daniel Vetter
Leftover from the conversion to the generic fbdev emulation. Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/arc/arcpgu.h b/drivers/gpu/drm/arc/arcpgu.h index 87821c91a00c..e

[PATCH 05/15] drm/arc: Embedd a drm_connector for sim case

2021-01-12 Thread Daniel Vetter
Removes the last devm_kzalloc, which means we're now prepared to use drmm_mode_config_cleanup! Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu.h | 1 + drivers/gpu/drm/arc/arcpgu_sim.c | 14 +- 2 files

[PATCH 06/15] drm/arc: Drop surplus connector registration

2021-01-12 Thread Daniel Vetter
drm_connector_register does nothing before drm_dev_register(), it is meant for hotpluggable connectors only. Same for the unregister side. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu_sim.c | 2 -- 1 file changed, 2

[PATCH 04/15] drm/arc: Embedded a drm_simple_display_pipe

2021-01-12 Thread Daniel Vetter
This is a prep step to convert arc over to the simple kms helpers, for now we just use this as an embedding container to drop all the various allocations. Big change is the removal of the various devm_kzalloc, which have the wrong lifetimes anyway. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Sign

[PATCH 07/15] drm/arc: Use drmm_mode_config_cleanup

2021-01-12 Thread Daniel Vetter
With autocleanup through drm_device management we can delete all the code. Possible now that there's no confusion against devm_kzalloc'ed structures anymore. I inlined arcpgu_setup_mode_config because it's tiny and the newly needed return value handling would have been more ... Acked-by: Sam Ravn

[PATCH 10/15] drm/arc: Drop crtc check in arc_pgu_update

2021-01-12 Thread Daniel Vetter
It's redundant, drm core guarantees that state->fb is set iff state->crtc is set. v2: I had a misconception about simple helpers here and thought they filter this out. They don't. Issue reported by Eugeniy. Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/dr

[PATCH 09/15] drm/arc: Convert to drm_simple_kms_pipe_helper

2021-01-12 Thread Daniel Vetter
Really straighforward, only slight issue is that the sim connector is created after the pipe is set up, so can't use the helpers perfectly yet. Subsequent patches will fix that. Aside from lots of deleting code no functional changes in here. v2: Delete now unused crtc funcs (0day) v3: Move endco

[PATCH 13/15] drm/arc: Inline remaining files

2021-01-12 Thread Daniel Vetter
At less than 500 lines total feels like the right thing to do. Also noticed that the simple wrapper around drm_connector_cleanup can be dropped. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Cc: Alexey Brodkin Signed-off-by: Daniel Vetter --- drivers/gpu/drm/arc/Makefile | 2 +- drivers/

[PATCH 11/15] drm/arc: Inline arcpgu_crtc.c

2021-01-12 Thread Daniel Vetter
Really not big anymore. Note that we no longer clamp all errors to ENODEV, highlighted by Sam. v2: Fixup update function, bug reported by Eugeniy v3: Delete now unused crtc funcs (0day) v4: Move encoder removal to right patch (Sam). Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Sam Ra

[PATCH 08/15] drm/arc: Align with simple pipe helpers

2021-01-12 Thread Daniel Vetter
Simple pipe helpers only have an enable and disable hook, no more mode_set_nofb. Call it from our enable hook to align with that conversions. Atomic helpers always call mode_set_nofb and enable together, so there's no functional change here. Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off

[PATCH 14/15] drm/arc: Initialize sim connector before display pipe

2021-01-12 Thread Daniel Vetter
That way we can get rid of this final piece of init code, and use the simple pipe helpers as intended. v2: Fix indent (Sam) Acked-by: Sam Ravnborg Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- drivers/gpu/drm/arc/arcpgu_drv.c | 53 ++-- 1

[PATCH 12/15] drm/arc: Inline arcpgu_drm_hdmi_init

2021-01-12 Thread Daniel Vetter
Really not worth the function, much less the separate file now that almost all the code is gone. Cc: Eugeniy Paltsev Cc: Alexey Brodkin Signed-off-by: Daniel Vetter --- drivers/gpu/drm/arc/Makefile | 2 +- drivers/gpu/drm/arc/arcpgu.h | 1 - drivers/gpu/drm/arc/arcpgu_drv.c | 12 +

[PATCH 15/15] drm/arc: Move to drm/tiny

2021-01-12 Thread Daniel Vetter
Because it is. v2: Delete now unused crtc funcs (0day) Cc: Eugeniy Paltsev Signed-off-by: Daniel Vetter Cc: Alexey Brodkin --- MAINTAINERS | 2 +- drivers/gpu/drm/Kconfig | 2 -- drivers/gpu/drm/Makefile

Re: [PATCH] drm/bridge: nwl-dsi: Avoid potential multiplication overflow on 32-bit

2021-01-12 Thread Geert Uytterhoeven
Hi Laurent, On Tue, Jan 12, 2021 at 5:38 AM Laurent Pinchart wrote: > On Mon, Jan 11, 2021 at 01:57:02PM +0100, Geert Uytterhoeven wrote: > > As nwl_dsi.lanes is u32, and NSEC_PER_SEC is 10L, the second > > multiplication in > > > > dsi->lanes * 8 * NSEC_PER_SEC > > > > will overflow

Re: [PATCH 1/3] drm/vmwgfx: Drop svga_lock

2021-01-12 Thread Daniel Vetter
Hi Roland, Hopefully you had a nice start into the new year! Ping for some review/testing on this series. Thanks, Daniel On Fri, Dec 11, 2020 at 5:29 PM Daniel Vetter wrote: > > This isn't actually protecting anything becuase: > - when running, ttm_resource_manager->use_type is protected throug

Re: [PATCH] drm/virtio: make sure context is created in gem open

2021-01-12 Thread Anthoine Bourgeois
On Thu, Jan 07, 2021 at 01:07:26PM -0800, Chia-I Wu wrote: The context might still be missing when DRM_IOCTL_PRIME_FD_TO_HANDLE is the first ioctl on the drm_file. Fixes: 72b48ae800da ("drm/virtio: enqueue virtio_gpu_create_context after the first 3D ioctl") Cc: Gurchetan Singh Cc: Gerd Hoffma

Re: [PATCH] drm/virtio: fix prime export for vram objects

2021-01-12 Thread Anthoine Bourgeois
On Thu, Jan 07, 2021 at 01:07:43PM -0800, Chia-I Wu wrote: commit 16845c5d5409 ("drm/virtio: implement blob resources: implement vram object") and commit c6069a02fa55 ("drm/virtgpu: Set PRIME export function in struct drm_gem_object_funcs") landed from different trees, resulting in prime export n

Re: [PATCH] drm: Removes invalid function return value comment information

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:39:27AM +0800, Zhaoge Zhang wrote: > Signed-off-by: Zhaoge Zhang Applied, thanks for your patch. -Daniel > --- > drivers/gpu/drm/drm_file.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c > index b503

Re: [PATCH] drm: Fix macro name DRM_MODE_PROP_OBJECT in code comment

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:54:39AM +0800, Zhaoge Zhang wrote: > Signed-off-by: Zhaoge Zhang > --- > include/drm/drm_property.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/drm/drm_property.h b/include/drm/drm_property.h > index 4a0a80d..bbf5c1fd 100644 > --- a

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:10:30AM +0100, Thomas Zimmermann wrote: > The AGP wrapper functions serve no purpose. > > Signed-off-by: Thomas Zimmermann They do, without them we fail compiling (I think at least) when agp isn't enabled. Did you check for that? I should all work if we have the dummy

Re: [PATCH 2/6] drm: Implement drm_need_swiotlb() in drm_cache.c

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:10:31AM +0100, Thomas Zimmermann wrote: > The function is declared in drm_cache.h. I also removed the curly > braces from the for loop to adhere to kernel coding style. > > Signed-off-by: Thomas Zimmermann s/implement in/move to/ in the subject. Also would be nice to a

Re: [PATCH 3/6] drm: Build drm_memory.o only for legacy drivers

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:10:32AM +0100, Thomas Zimmermann wrote: > The file contains I/O-memory functions that are only used by legacy > drivers. Yay! > Signed-off-by: Thomas Zimmermann Acked-by: Daniel Vetter > --- > drivers/gpu/drm/Makefile | 5 +++-- > 1 file changed, 3 insertions(+), 2

Re: [PATCH 4/6] drm: Merge CONFIG_DRM_VM into CONFIG_DRM_LEGACY

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 09:10:33AM +0100, Thomas Zimmermann wrote: > CONFIG_DRM_VM gets selected by CONFIG_DRM_LEGACY, but nothing else. So > remove it and build drm_vm.o as part of CONFIG_DRM_LEGACY. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/Kconfig | 5 - > drivers/

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Daniel Vetter
On Mon, Jan 11, 2021 at 01:31:00PM -0500, Andrey Grodzovsky wrote: > > On 1/11/21 12:41 PM, Andrey Grodzovsky wrote: > > > > On 1/11/21 11:15 AM, Daniel Vetter wrote: > > > On Mon, Jan 11, 2021 at 05:13:56PM +0100, Daniel Vetter wrote: > > > > On Fri, Jan 08, 2021 at 04:49:55PM +, Grodzovsky,

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Daniel Vetter
On Mon, Jan 11, 2021 at 03:45:10PM -0500, Andrey Grodzovsky wrote: > > On 1/11/21 11:15 AM, Daniel Vetter wrote: > > On Mon, Jan 11, 2021 at 05:13:56PM +0100, Daniel Vetter wrote: > > > On Fri, Jan 08, 2021 at 04:49:55PM +, Grodzovsky, Andrey wrote: > > > > Ok then, I guess I will proceed with

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 9:12 AM Christian König wrote: > > Am 11.01.21 um 17:13 schrieb Daniel Vetter: > > On Fri, Jan 08, 2021 at 04:49:55PM +, Grodzovsky, Andrey wrote: > >> Ok then, I guess I will proceed with the dummy pages list implementation > >> then. > >> > >> Andrey > >> > >> __

Re: [PATCH 1/2] drm/radeon: stop re-init the TTM page pool

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 08:53:03AM +0100, Christian König wrote: > Am 11.01.21 um 17:17 schrieb Daniel Vetter: > > On Mon, Jan 11, 2021 at 11:16:13AM +0100, Christian König wrote: > > > Am 08.01.21 um 16:53 schrieb Daniel Vetter: > > > > On Fri, Jan 8, 2021 at 3:36 PM Christian König > > > > wrot

Re: [PATCH v4 11/13] drm/vboxvideo: Use drm_gem_vram_vmap_local() in cursor update

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 08:54:02AM +0100, Thomas Zimmermann wrote: > Hi > > Am 11.01.21 um 18:06 schrieb Daniel Vetter: > > On Fri, Jan 08, 2021 at 10:43:38AM +0100, Thomas Zimmermann wrote: > > > Cursor updates in vboxvideo require a short-term mapping of the > > > source BO. Use drm_gem_vram_vma

Re: [PATCH v2] drm: Check actual format for legacy pageflip.

2021-01-12 Thread Daniel Vetter
On Mon, Jan 11, 2021 at 04:28:31PM -0500, Alex Deucher wrote: > On Mon, Jan 11, 2021 at 11:39 AM Bas Nieuwenhuizen > wrote: > > > > On Mon, Jan 11, 2021 at 4:02 PM Alex Deucher wrote: > > > > > > On Sat, Jan 9, 2021 at 9:11 PM Bas Nieuwenhuizen > > > wrote: > > > > > > > > With modifiers one can

RE: [PATCH 1/2] drm: distinguish return value of drm_dp_check_and_send_link_address.

2021-01-12 Thread Simon Ser
On Tuesday, January 12th, 2021 at 7:36 AM, Chen, Xiaogang wrote: > Any comment? > > -Original Message- > From: Xiaogang.Chen > Sent: Monday, January 4, 2021 12:02 AM > To: amd-...@lists.freedesktop.org; Wentland, Harry ; > dri-devel@lists.freedesktop.org; airl...@linux.ie > Cc: Chen, X

Re: [PATCH v3 1/4] dp/dp_mst: Add support for sink event notify messages

2021-01-12 Thread Hans Verkuil
Hi Sam, This series still hasn't been merged. It still applies cleanly to v5.11-rc1. Daniel, can you merge this series for 5.12? Or Ack this series so I can merge it? The first three patches deal with DP MST support, and this needs review from you or David. Regards, Hans On 23/09/202

Re: [PATCH v4 11/13] drm/vboxvideo: Use drm_gem_vram_vmap_local() in cursor update

2021-01-12 Thread Thomas Zimmermann
Hi Am 12.01.21 um 10:17 schrieb Daniel Vetter: On Tue, Jan 12, 2021 at 08:54:02AM +0100, Thomas Zimmermann wrote: Hi Am 11.01.21 um 18:06 schrieb Daniel Vetter: On Fri, Jan 08, 2021 at 10:43:38AM +0100, Thomas Zimmermann wrote: Cursor updates in vboxvideo require a short-term mapping of the

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

2021-01-12 Thread Thomas Zimmermann
Hi Am 12.01.21 um 09:59 schrieb Daniel Vetter: On Tue, Jan 12, 2021 at 09:10:30AM +0100, Thomas Zimmermann wrote: The AGP wrapper functions serve no purpose. Signed-off-by: Thomas Zimmermann They do, without them we fail compiling (I think at least) when agp isn't I thought so. But the on

Re: [PATCH][next] drm/amdgpu: Add missing BOOTUP_DEFAULT to profile_name[]

2021-01-12 Thread Dan Carpenter
On Mon, Jan 11, 2021 at 11:46:38AM +, Colin King wrote: > From: Colin Ian King > > A recent change added a new BOOTUP_DEFAULT power profile mode > to the PP_SMC_POWER_PROFILE enum but omitted updating the > corresponding profile_name array. Fix this by adding in the > missing BOOTUP_DEFAULT

Re: [PATCH V5 1/3] drm/vkms: Add vkms_config type

2021-01-12 Thread Melissa Wen
On 01/12, Sumera Priyadarsini wrote: > Currently, data for the device instance is held by vkms_device. > Add a separate type, vkms_config to contain configuration details > for the device and various modes to be later used by configfs. > This config data stays constant once the device is created. >

Re: [PATCH V5 2/3] drm/vkms: Add support for writeback module

2021-01-12 Thread Melissa Wen
On 01/12, Sumera Priyadarsini wrote: > Add enable_writeback feature to vkms_config as a module. > > Signed-off-by: Sumera Priyadarsini > --- > drivers/gpu/drm/vkms/vkms_drv.c| 5 + > drivers/gpu/drm/vkms/vkms_drv.h| 1 + > drivers/gpu/drm/vkms/vkms_output.c | 9 ++--- > 3 files c

Re: [PATCH V5 3/3] drm/vkms: Add information about module options

2021-01-12 Thread Melissa Wen
On 01/12, Sumera Priyadarsini wrote: > Update vkms documentation to contain usage of `modinfo` > command and steps to load vkms with module options enabled. > > Signed-off-by: Sumera Priyadarsini > --- > Documentation/gpu/vkms.rst | 12 > 1 file changed, 12 insertions(+) > > diff -

Re: [Intel-gfx] [RFC PATCH 098/162] drm/i915/gtt: map the PD up front

2021-01-12 Thread Matthew Auld
On Fri, 27 Nov 2020 at 13:32, Chris Wilson wrote: > > Quoting Matthew Auld (2020-11-27 12:06:14) > > We need to general our accessor for the page directories and tables from > > using the simple kmap_atomic to support local memory, and this setup > > must be done on acquisition of the backing stor

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Christian König
Ping? Ray can I get an acked-by? It's an important bug fix. Thanks, Christian. Am 11.01.21 um 14:57 schrieb Christian König: set_pages_wb() might sleep and so we can't do this in an atomic context. Signed-off-by: Christian König Reported-by: Mikhail Gavrilov Fixes: d099fc8f540a ("drm/ttm: ne

Re: [PATCH] amdgpu: Avoid sleeping during FPU critical sections

2021-01-12 Thread Christian König
Am 11.01.21 um 17:32 schrieb Daniel Vetter: On Mon, Jan 11, 2021 at 09:53:56AM +0100, Christian König wrote: Am 08.01.21 um 22:58 schrieb Jeremy Cline: dcn20_resource_construct() includes a number of kzalloc(GFP_KERNEL) calls which can sleep, but kernel_fpu_begin() disables preemption and sleep

Re: [PATCH] amdgpu: Avoid sleeping during FPU critical sections

2021-01-12 Thread Christian König
Am 11.01.21 um 16:39 schrieb Jeremy Cline: Hi, On Mon, Jan 11, 2021 at 09:53:56AM +0100, Christian König wrote: Am 08.01.21 um 22:58 schrieb Jeremy Cline: dcn20_resource_construct() includes a number of kzalloc(GFP_KERNEL) calls which can sleep, but kernel_fpu_begin() disables preemption and s

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Huang Rui
On Tue, Jan 12, 2021 at 06:49:18PM +0800, Christian König wrote: > Ping? Ray can I get an acked-by? It's an important bug fix. > > Thanks, > Christian. > > Am 11.01.21 um 14:57 schrieb Christian König: > > set_pages_wb() might sleep and so we can't do this in an atomic context. > > > > Signed-off

Re: [PATCH 07/15] drm/arc: Use drmm_mode_config_cleanup

2021-01-12 Thread Thomas Zimmermann
Hi Am 12.01.21 um 09:43 schrieb Daniel Vetter: With autocleanup through drm_device management we can delete all the code. Possible now that there's no confusion against devm_kzalloc'ed structures anymore. I inlined arcpgu_setup_mode_config because it's tiny and the newly needed return value han

[PATCH 2/2] drm/tegra: vic: Add comments on STREAMID registers

2021-01-12 Thread Mikko Perttunen
Add comments clarifying use of the THI_STREAMID0 and THI_STREAMID1 registers. Signed-off-by: Mikko Perttunen --- drivers/gpu/drm/tegra/vic.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/gpu/drm/tegra/vic.c b/drivers/gpu/drm/tegra/vic.c index a3dbb8813faf..48e98a60ab6

[PATCH 1/2] drm/tegra: falcon: Support newer VIC firmware

2021-01-12 Thread Mikko Perttunen
Support newer VIC firmware by accepting the new magic number 0x10fe, loading the full code segment instead of just the first page at boot time, and skipping FCE setup if the firmware header indicates that FCE is handled internally by the firmware. Signed-off-by: Mikko Perttunen --- drivers/gpu/d

Re: [PATCH 01/15] drm/arc: Switch to devm_drm_dev_alloc

2021-01-12 Thread Thomas Zimmermann
Hi Am 12.01.21 um 09:43 schrieb Daniel Vetter: - Need to embedded the drm_device, but for now we keep the usual pointer chasing. - No more devm_kzalloc, which fixes a lifetime issues on driver remove. - No more drm_dev_put, that's done by devm_ now. Acked-by: Sam Ravnborg Cc: Eugeniy Pal

Re: [PATCH 0/4] drm: rcar-du: Add cubic LUT support

2021-01-12 Thread Pekka Paalanen
On Mon, 21 Dec 2020 03:57:26 +0200 Laurent Pinchart wrote: > Hello, > > This patch series adds cubic (3D) look up table support to the CMM and > DU drivers, and extend the KMS userspace API to expose the cubic LUT to > userspace. Hi, when you say "cubic" I immediately think "polynomial of thir

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Christian König
Am 12.01.21 um 10:10 schrieb Daniel Vetter: On Mon, Jan 11, 2021 at 03:45:10PM -0500, Andrey Grodzovsky wrote: On 1/11/21 11:15 AM, Daniel Vetter wrote: On Mon, Jan 11, 2021 at 05:13:56PM +0100, Daniel Vetter wrote: On Fri, Jan 08, 2021 at 04:49:55PM +, Grodzovsky, Andrey wrote: Ok then,

[PATCH AUTOSEL 5.10 41/51] drm/amd/display: fix sysfs amdgpu_current_backlight_pwm NULL pointer issue

2021-01-12 Thread Sasha Levin
From: Kevin Wang [ Upstream commit a7b5d9dd57298333e6e9f4c167f01385d922bbfb ] fix NULL pointer issue when read sysfs amdgpu_current_backlight_pwm sysfs node. Call Trace: [ 248.273833] BUG: kernel NULL pointer dereference, address: 0130 [ 248.273930] #PF: supervisor read access in

[PATCH AUTOSEL 5.10 42/51] drm/amdgpu: fix a GPU hang issue when remove device

2021-01-12 Thread Sasha Levin
From: Dennis Li [ Upstream commit 88e21af1b3f887d217f2fb14fc7e7d3cd87ebf57 ] When GFXOFF is enabled and GPU is idle, driver will fail to access some registers. Therefore change to disable power gating before all access registers with MMIO. Dmesg log is as following: amdgpu :03:00.0: amdgpu:

[PATCH AUTOSEL 5.10 44/51] drm/amdgpu: fix potential memory leak during navi12 deinitialization

2021-01-12 Thread Sasha Levin
From: Jiawei Gu [ Upstream commit e6d5c64efaa34aae3815a9afeb1314a976142e83 ] Navi12 HDCP & DTM deinitialization needs continue to free bo if already created though initialized flag is not set. Reviewed-by: Alex Deucher Signed-off-by: Jiawei Gu Signed-off-by: Alex Deucher Signed-off-by: Sasha

[PATCH AUTOSEL 5.10 43/51] drm/amd/pm: fix the failure when change power profile for renoir

2021-01-12 Thread Sasha Levin
From: Xiaojian Du [ Upstream commit 44cb39e19a05ca711bcb6e776e0a4399223204a0 ] This patch is to fix the failure when change power profile to "profile_peak" for renoir. Signed-off-by: Xiaojian Du Reviewed-by: Huang Rui Signed-off-by: Alex Deucher Signed-off-by: Sasha Levin --- drivers/gpu/d

[PATCH AUTOSEL 5.10 49/51] drm/msm: Call msm_init_vram before binding the gpu

2021-01-12 Thread Sasha Levin
From: Craig Tatlor [ Upstream commit d863f0c7b536288e2bd40cbc01c10465dd226b11 ] vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor Reviewed-by: Brian Masney Tested-by: Alexey Minnekhanov Signed

[PATCH AUTOSEL 5.4 24/28] drm/amdgpu: fix a GPU hang issue when remove device

2021-01-12 Thread Sasha Levin
From: Dennis Li [ Upstream commit 88e21af1b3f887d217f2fb14fc7e7d3cd87ebf57 ] When GFXOFF is enabled and GPU is idle, driver will fail to access some registers. Therefore change to disable power gating before all access registers with MMIO. Dmesg log is as following: amdgpu :03:00.0: amdgpu:

[PATCH AUTOSEL 5.4 27/28] drm/msm: Call msm_init_vram before binding the gpu

2021-01-12 Thread Sasha Levin
From: Craig Tatlor [ Upstream commit d863f0c7b536288e2bd40cbc01c10465dd226b11 ] vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor Reviewed-by: Brian Masney Tested-by: Alexey Minnekhanov Signed

[PATCH AUTOSEL 4.19 15/16] drm/msm: Call msm_init_vram before binding the gpu

2021-01-12 Thread Sasha Levin
From: Craig Tatlor [ Upstream commit d863f0c7b536288e2bd40cbc01c10465dd226b11 ] vram.size is needed when binding a gpu without an iommu and is defined in msm_init_vram(), so run that before binding it. Signed-off-by: Craig Tatlor Reviewed-by: Brian Masney Tested-by: Alexey Minnekhanov Signed

Re: [PATCH v4 04/13] drm/shmem-helper: Provide a vmap function for short-term mappings

2021-01-12 Thread Thomas Zimmermann
Hi Am 11.01.21 um 17:50 schrieb Daniel Vetter: On Fri, Jan 08, 2021 at 10:43:31AM +0100, Thomas Zimmermann wrote: Implementations of the vmap/vunmap GEM callbacks may perform pinning of the BO and may acquire the associated reservation object's lock. Callers that only require a mapping of the c

Re: [PATCHv1] video: omapfb2: Make standard and custom DSI command mode panel driver mutually exclusive

2021-01-12 Thread Tomi Valkeinen
Hi, On 12/01/2021 14:02, Sebastian Reichel wrote: > [replace Tomi's TI mail address with something working] > > Hi, > > On Fri, Jan 08, 2021 at 08:58:39PM +0100, Sam Ravnborg wrote: >> Hi Sebastian, >> >> On Fri, Jan 08, 2021 at 12:24:41PM +0100, Sebastian Reichel wrote: >>> Standard DRM panel d

[PULL] drm-misc-fixes

2021-01-12 Thread Thomas Zimmermann
Hi Dave and Daniel, here's this week's PR for drm-misc-fixes. Best regards Thomas drm-misc-fixes-2021-01-12: * dma-buf: Fix a memory leak in CMAV heap * drm: Fix format check for legacy pageflips * ttm: Pass correct address to dma_mapping_error(); Use mutex in pool shrinker The following c

Re: [PATCH v7 00/17] follow_pfn and other iomap races

2021-01-12 Thread Daniel Vetter
On Fri, Nov 27, 2020 at 05:41:14PM +0100, Daniel Vetter wrote: > Hi all > > Another update of my patch series to clamp down a bunch of races and gaps > around follow_pfn and other access to iomem mmaps. Previous version: > > v1: > https://lore.kernel.org/dri-devel/20201007164426.1812530-1-daniel

Re: [PATCH v7 00/17] follow_pfn and other iomap races

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 2:24 PM Daniel Vetter wrote: > > On Fri, Nov 27, 2020 at 05:41:14PM +0100, Daniel Vetter wrote: > > Hi all > > > > Another update of my patch series to clamp down a bunch of races and gaps > > around follow_pfn and other access to iomem mmaps. Previous version: > > > > v1:

Re: [PATCH 14/40] drm/amd/display/dc/calcs/dce_calcs: Remove some large variables from the stack

2021-01-12 Thread Lee Jones
On Mon, 11 Jan 2021, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function > ‘bw_calcs_init’: > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2726:1: warning: > the frame size of 1336 bytes

Re: [PATCH 13/40] drm/amd/display/dc/calcs/dce_calcs: Move some large variables from the stack to the heap

2021-01-12 Thread Lee Jones
On Mon, 11 Jan 2021, Lee Jones wrote: > Fixes the following W=1 kernel build warning(s): > > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c: In function > ‘calculate_bandwidth’: > drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dce_calcs.c:2016:1: warning: > the frame size of 1216

Re: [PATCH 1/6] drm: Inline AGP wrappers into their only callers

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 10:56 AM Thomas Zimmermann wrote: > > Hi > > Am 12.01.21 um 09:59 schrieb Daniel Vetter: > > On Tue, Jan 12, 2021 at 09:10:30AM +0100, Thomas Zimmermann wrote: > >> The AGP wrapper functions serve no purpose. > >> > >> Signed-off-by: Thomas Zimmermann > > > > They do, with

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Daniel Vetter
On Mon, Jan 11, 2021 at 2:57 PM Christian König wrote: > > set_pages_wb() might sleep and so we can't do this in an atomic context. > > Signed-off-by: Christian König > Reported-by: Mikhail Gavrilov > Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation pool v3") Hm I guess long term proper

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Christian König
Am 12.01.21 um 15:03 schrieb Daniel Vetter: On Mon, Jan 11, 2021 at 2:57 PM Christian König wrote: set_pages_wb() might sleep and so we can't do this in an atomic context. Signed-off-by: Christian König Reported-by: Mikhail Gavrilov Fixes: d099fc8f540a ("drm/ttm: new TT backend allocation po

Re: [PATCH] drm/ttm: make the pool shrinker lock a mutex

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 3:06 PM Christian König wrote: > > Am 12.01.21 um 15:03 schrieb Daniel Vetter: > > On Mon, Jan 11, 2021 at 2:57 PM Christian König > > wrote: > >> set_pages_wb() might sleep and so we can't do this in an atomic context. > >> > >> Signed-off-by: Christian König > >> Report

Re: [PATCH v4 04/13] drm/shmem-helper: Provide a vmap function for short-term mappings

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 02:11:24PM +0100, Thomas Zimmermann wrote: > Hi > > Am 11.01.21 um 17:50 schrieb Daniel Vetter: > > On Fri, Jan 08, 2021 at 10:43:31AM +0100, Thomas Zimmermann wrote: > > > Implementations of the vmap/vunmap GEM callbacks may perform pinning > > > of the BO and may acquire

Re: [PATCH] drm: Improve the output_poll_changed description

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 06:46:44PM +0800, ZhiJie.Zhang wrote: > From: zhangzhijie > > codeview the implementation of few Drivers. I'm not really understanding what you're trying to say here. > this callback was used by drm_kms_helper_hotplug_event() > > Signed-off-by: zhangzhijie > --- > inc

Re: [Intel-gfx] [RFC PATCH 098/162] drm/i915/gtt: map the PD up front

2021-01-12 Thread Daniel Vetter
On Tue, Jan 12, 2021 at 10:47:57AM +, Matthew Auld wrote: > On Fri, 27 Nov 2020 at 13:32, Chris Wilson wrote: > > > > Quoting Matthew Auld (2020-11-27 12:06:14) > > > We need to general our accessor for the page directories and tables from > > > using the simple kmap_atomic to support local me

RE: [PATCH 1/2] drm: distinguish return value of drm_dp_check_and_send_link_address.

2021-01-12 Thread Simon Ser
Pushed to drm-misc-next with a re-formatted commit message, thanks for your contribution! ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v9, 01/11] dt-bindings: mediatek: add rdma-fifo-size description for mt8183 display

2021-01-12 Thread Rob Herring
On Thu, 07 Jan 2021 11:11:11 +0800, Yongqiang Niu wrote: > rdma fifo size may be different even in same SOC, add this > property to the corresponding rdma > > Signed-off-by: Yongqiang Niu > --- > .../devicetree/bindings/display/mediatek/mediatek,disp.txt | 9 > + > 1 file changed,

[PATCH v2 0/4] Revert "drm/amd/display: Expose new CRC window property" and changes associated with this commit

2021-01-12 Thread Rodrigo Siqueira
Hi, In the V1, Wayne pointed out two problems: 1. The revert patch included one extra line that does not belong to it; 2. The original patch also had other fixes in the same commit; I removed the extra line from the reverted patch for tackling this issue, and I added one additional patch to this

[PATCH v2 1/4] Revert "drm/amd/display: Fix unused variable warning"

2021-01-12 Thread Rodrigo Siqueira
This reverts commit b5d8f1d02ba7021cad1bd5ad8460ce5611c479d8. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 +++- drivers/gpu/drm/amd/display/am

[PATCH v2 2/4] Revert "drm/amdgpu/disply: fix documentation warnings in display manager"

2021-01-12 Thread Rodrigo Siqueira
This reverts commit 1206904465c8a9eebff9ca5a65effc8cf8f3cb84. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.h | 21 +-- 1 file changed, 1 inse

[PATCH v2 3/4] Revert "drm/amd/display: Expose new CRC window property"

2021-01-12 Thread Rodrigo Siqueira
This reverts commit 110d586ba77ed573eb7464ca69b6490ec0b70c5f. Cc: Wayne Lin Cc: Alexander Deucher Cc: Harry Wentland Cc: Roman Li Cc: Bindu R Cc: Daniel Vetter Signed-off-by: Rodrigo Siqueira --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 142 +- .../gpu/drm/amd/displa

[PATCH v2 4/4] drm/amd/display: Fix to be able to stop crc calculation

2021-01-12 Thread Rodrigo Siqueira
From: Wayne Lin [Why] Find out when we try to disable CRC calculation, crc generation is still enabled. Main reason is that dc_stream_configure_crc() will never get called when the source is AMDGPU_DM_PIPE_CRC_SOURCE_NONE. [How] Add checking condition that when source is AMDGPU_DM_PIPE_CRC_SOURC

Re: [PATCH v2 0/4] Revert "drm/amd/display: Expose new CRC window property" and changes associated with this commit

2021-01-12 Thread Alex Deucher
On Tue, Jan 12, 2021 at 9:55 AM Rodrigo Siqueira wrote: > > Hi, > > In the V1, Wayne pointed out two problems: > > 1. The revert patch included one extra line that does not belong to it; > 2. The original patch also had other fixes in the same commit; > > I removed the extra line from the reverted

Re: [PATCH v9 1/4] dt-bindings: gpu: mali-bifrost: Add Mediatek MT8183

2021-01-12 Thread Rob Herring
On Fri, Jan 08, 2021 at 09:10:08AM +0800, Nicolas Boichat wrote: > Define a compatible string for the Mali Bifrost GPU found in > Mediatek's MT8183 SoCs. > > Signed-off-by: Nicolas Boichat > Reviewed-by: Alyssa Rosenzweig > --- > > (no changes since v6) > > Changes in v6: > - Rebased, actuall

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

2021-01-12 Thread Rob Herring
On Wed, Dec 23, 2020 at 10:29:44PM +0100, 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| 313 ++

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Andrey Grodzovsky
So - basically allocate the page and pass it as void* pointer to drmm_add_action with a release function which will do the free page, right ? Andrey On 1/12/21 4:10 AM, Daniel Vetter wrote: drm_add_action_or_reset (for better control flow) has both a void * data and a cleanup function (and it i

Re: fbcon: remove soft scrollback code (missing Doc. patch)

2021-01-12 Thread Daniel Vetter
On Sat, Jan 9, 2021 at 12:11 AM Linus Torvalds wrote: > > On Fri, Jan 8, 2021 at 11:13 AM Phillip Susi wrote: > > > > > Could we pause this madness? Scrollback is still useful. I needed it > > > today... it was too small, so command results I was looking for > > > already scrolled away, but... li

Re: [PATCH v3 01/12] drm: Add dummy page per device or GEM object

2021-01-12 Thread Andrey Grodzovsky
On 1/12/21 7:32 AM, Christian König wrote: Am 12.01.21 um 10:10 schrieb Daniel Vetter: On Mon, Jan 11, 2021 at 03:45:10PM -0500, Andrey Grodzovsky wrote: On 1/11/21 11:15 AM, Daniel Vetter wrote: On Mon, Jan 11, 2021 at 05:13:56PM +0100, Daniel Vetter wrote: On Fri, Jan 08, 2021 at 04:49:55P

Re: [PATCH 3/4] drm: Extend color correction to support 3D-CLU

2021-01-12 Thread Ville Syrjälä
On Mon, Dec 21, 2020 at 03:57:29AM +0200, Laurent Pinchart wrote: > From: Kieran Bingham > > Extend the existing color management properties to support provision > of a 3D cubic look up table, allowing for color specific adjustments. > > Signed-off-by: Kieran Bingham > Co-developed-by: Laurent

Re: omapfb removal (was: Re: [PATCHv1] video: omapfb2: Make standard and custom DSI command mode panel driver mutually exclusive)

2021-01-12 Thread Laurent Pinchart
Hi Sebastian, On Tue, Jan 12, 2021 at 05:24:54PM +0100, Sebastian Reichel wrote: > [dropped linux-next from Cc] > > Hi, > > On Tue, Jan 12, 2021 at 03:10:56PM +0200, Tomi Valkeinen wrote: > > >> But why is it it we need omapfb at all when we have omapdrm? > > > > > > I think there are two reaso

[PATCH 1/1] drm/amdgpu: Remove unused variable

2021-01-12 Thread Nirmoy Das
Remove unused space_needed variable. Fixes: 453f617a30a ("drm/amdgpu: Resize BAR0 to the maximum available size, even if it doesn't cover VRAM") Signed-off-by: Nirmoy Das --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH] drm/i915/hdcp: Disable the QSES check for HDCP 1.4 over MST

2021-01-12 Thread Jani Nikula
Anshuman, please review. BR, Jani. On Wed, 06 Jan 2021, Sean Paul wrote: > From: Sean Paul > > The HDCP 1.4 spec does not require the QUERY_STREAM_ENCRYPTION_STATUS > check, it was always a nice-to-have. After deploying this across various > devices, we've determined that some MST bridge chip

  1   2   >