Re: [Nouveau] [PATCH 01/14] iosys-map: Introduce renamed dma-buf-map

2022-01-28 Thread Daniel Vetter
On Fri, Jan 28, 2022 at 10:39:49AM +0100, Thomas Zimmermann wrote: > Hi > > Am 28.01.22 um 10:24 schrieb Lucas De Marchi: > > On Fri, Jan 28, 2022 at 09:53:59AM +0100, Thomas Zimmermann wrote: > > > Hi > > > > > > Am 28.01.22 um 09:36 schrieb Lucas De Marchi: > > > > Add a new type, struct

Re: [Nouveau] [RFC PATCH v6 0/3] Add support modifiers for drivers whose planes only support linear layout

2022-01-28 Thread Daniel Vetter
On Fri, Jan 28, 2022 at 03:08:33PM +0900, Tomohito Esaki wrote: > Some drivers whose planes only support linear layout fb do not support format > modifiers. > These drivers should support modifiers, however the DRM core should handle > this > rather than open-coding in every driver. > > In this

[Nouveau] [PATCH 09/14] drm/nouveau: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in nouveau. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/nouveau/nouveau_gem.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/nouveau/nouveau_gem.c

[Nouveau] [PATCH 01/14] iosys-map: Introduce renamed dma-buf-map

2022-01-28 Thread Lucas De Marchi
Add a new type, struct iosys_map, to eventually replace struct dma_buf_map and its helpers defiend in include/linux/dma-buf-map.h. This is mostly a copy of dma-buf-map with the renames in place and slightly different wording to avoid tying iosys_map to dma-buf: in fact it's just a shim layer to

[Nouveau] [PATCH 03/14] dma-buf: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API. Signed-off-by: Lucas De Marchi --- drivers/dma-buf/dma-buf.c | 22 +++--- drivers/dma-buf/heaps/cma_heap.c| 10 +- drivers/dma-buf/heaps/system_heap.c | 10

[Nouveau] [PATCH 11/14] drm/radeon: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in radeon. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/radeon/radeon_gem.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/radeon/radeon_gem.c

[Nouveau] [PATCH 14/14] dma-buf-map: Remove API in favor of iosys-map

2022-01-28 Thread Lucas De Marchi
All users are now converted to iosys-map, which is the renamed version of dma-buf-map. Remove remaining references to dma-buf-map. Signed-off-by: Lucas De Marchi --- MAINTAINERS | 1 - include/linux/dma-buf-map.h | 269

[Nouveau] [PATCH 07/14] drm/i915: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in i915. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 8 +--- drivers/gpu/drm/i915/gem/selftests/i915_gem_dmabuf.c | 6 +++---

[Nouveau] [RFC PATCH v6 2/3] drm: add support modifiers for drivers whose planes only support linear layout

2022-01-28 Thread Tomohito Esaki
The LINEAR modifier is advertised as default if a driver doesn't specify modifiers. v2: - rebase to the latest master branch (5.16.0+) + "drm/plane: Make format_mod_supported truly optional" patch [1] [1] https://patchwork.freedesktop.org/patch/467940/?series=98255=3 v3: - change the

[Nouveau] [PATCH 10/14] drm/tegra: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in tegra. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/tegra/gem.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/tegra/gem.c

[Nouveau] [PATCH 04/14] media: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API. Signed-off-by: Lucas De Marchi --- drivers/media/common/videobuf2/videobuf2-dma-contig.c | 8 drivers/media/common/videobuf2/videobuf2-dma-sg.c | 9 +

Re: [Nouveau] [PATCH 00/14] Rename dma-buf-map

2022-01-28 Thread Lucas De Marchi
On Fri, Jan 28, 2022 at 10:22:00AM +0100, Christian König wrote: Am 28.01.22 um 10:12 schrieb Lucas De Marchi: On Fri, Jan 28, 2022 at 09:41:14AM +0100, Christian König wrote: Rule #1 is to never ever break the build. Because of this all those patches needs to be squashed into a single one

Re: [Nouveau] [PATCH 01/14] iosys-map: Introduce renamed dma-buf-map

2022-01-28 Thread Lucas De Marchi
On Fri, Jan 28, 2022 at 09:53:59AM +0100, Thomas Zimmermann wrote: Hi Am 28.01.22 um 09:36 schrieb Lucas De Marchi: Add a new type, struct iosys_map, to eventually replace struct dma_buf_map and its helpers defiend in include/linux/dma-buf-map.h. This is mostly a copy of dma-buf-map with the

[Nouveau] [RFC PATCH v6 3/3] drm: remove allow_fb_modifiers

2022-01-28 Thread Tomohito Esaki
The allow_fb_modifiers flag is unnecessary since it has been replaced with fb_modifiers_not_supported flag. v3: - change the order as follows: 1. add fb_modifiers_not_supported flag 2. add default modifiers 3. remove allow_fb_modifiers flag v5: - keep a sanity check in plane init func

[Nouveau] [PATCH 08/14] drm/msm: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in msm. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/msm/msm_drv.h | 4 ++-- drivers/gpu/drm/msm/msm_gem_prime.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff

[Nouveau] [RFC PATCH v6 1/3] drm: introduce fb_modifiers_not_supported flag in mode_config

2022-01-28 Thread Tomohito Esaki
If only linear modifier is advertised, since there are many drivers that only linear supported, the DRM core should handle this rather than open-coding in every driver. However, there are legacy drivers such as radeon that do not support modifiers but infer the actual layout of the underlying

Re: [Nouveau] [PATCH 00/14] Rename dma-buf-map

2022-01-28 Thread Lucas De Marchi
On Fri, Jan 28, 2022 at 09:41:14AM +0100, Christian König wrote: Rule #1 is to never ever break the build. Because of this all those patches needs to be squashed into a single one as far as I can see. what config are you building on? I built this series, full config with CONFIG_COMPILE_TEST

[Nouveau] [PATCH 13/14] Documentation: Refer to iosys-map instead of dma-buf-map

2022-01-28 Thread Lucas De Marchi
dma-buf-map is being phased out in favor of the equivalent and renamed interface: iosys-map. Use the new header in documentation. Signed-off-by: Lucas De Marchi --- Documentation/driver-api/dma-buf.rst | 4 ++-- Documentation/gpu/todo.rst | 20 ++-- 2 files changed,

[Nouveau] [PATCH 12/14] drm: Replace dma-buf-map with iosys-map in common code

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in all the helpers and common code for the drivers. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/drm_cache.c | 18 +++--- drivers/gpu/drm/drm_client.c

[Nouveau] [PATCH 00/14] Rename dma-buf-map

2022-01-28 Thread Lucas De Marchi
Motivation for this started in https://lore.kernel.org/lkml/20220126203702.1784589-1-lucas.demar...@intel.com/ when trying to extend the dma-buf-map API to cover new use cases: help a single driver with allocations and sharing code paths for IO and system memory. I'm leaving the API additions

[Nouveau] [RFC PATCH v6 0/3] Add support modifiers for drivers whose planes only support linear layout

2022-01-28 Thread Tomohito Esaki
Some drivers whose planes only support linear layout fb do not support format modifiers. These drivers should support modifiers, however the DRM core should handle this rather than open-coding in every driver. In this patch series, these drivers expose format modifiers based on the following

[Nouveau] [PATCH 06/14] drm: Replace dma-buf-map with iosys-map in drivers

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in some drivers. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/ast/ast_drv.h | 2 +- drivers/gpu/drm/ast/ast_mode.c | 8

[Nouveau] [PATCH 05/14] drm/ttm: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API in the ttm layer. Signed-off-by: Lucas De Marchi --- drivers/gpu/drm/ttm/ttm_bo_util.c | 16 drivers/gpu/drm/ttm/ttm_resource.c | 26 +-

[Nouveau] [PATCH 02/14] misc: fastrpc: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lucas De Marchi
iosys-map is the new name for dma-buf-map and will gain new capabitilities. Replace with the new API. Signed-off-by: Lucas De Marchi --- drivers/misc/fastrpc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/misc/fastrpc.c b/drivers/misc/fastrpc.c index

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Alex Deucher
On Fri, Jan 28, 2022 at 2:58 PM Karol Herbst wrote: > > On Fri, Jan 28, 2022 at 8:54 PM Alex Deucher wrote: > > > > On Fri, Jan 28, 2022 at 2:20 PM Lyude Paul wrote: > > > > > > Sigh-thank you for catching this - I had totally forgot about the umn.edu > > > ban. > > > I pushed this already but

Re: [Nouveau] [PATCH] Revert "drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()"

2022-01-28 Thread Lyude Paul
on further reconsideration: Self-NAKing this. I don't see any issues with those patches. On Fri, 2022-01-28 at 14:29 -0500, Lyude Paul wrote: > This reverts commit 2343bcdb4747d4f418a4daf2e898b94f86c24a59. > > Unfortunately, as Greg pointed out I totally missed the fact that this > patch came

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Karol Herbst
On Fri, Jan 28, 2022 at 8:54 PM Alex Deucher wrote: > > On Fri, Jan 28, 2022 at 2:20 PM Lyude Paul wrote: > > > > Sigh-thank you for catching this - I had totally forgot about the umn.edu > > ban. > > I pushed this already but I will go ahead and send a revert for this patch. > > Will cc you on

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Lyude Paul
On Fri, 2022-01-28 at 14:53 -0500, Alex Deucher wrote: > On Fri, Jan 28, 2022 at 2:20 PM Lyude Paul wrote: > > > > Sigh-thank you for catching this - I had totally forgot about the umn.edu > > ban. > > I pushed this already but I will go ahead and send a revert for this > > patch. > > Will cc

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Alex Deucher
On Fri, Jan 28, 2022 at 2:20 PM Lyude Paul wrote: > > Sigh-thank you for catching this - I had totally forgot about the umn.edu ban. > I pushed this already but I will go ahead and send a revert for this patch. > Will cc you on it as well. This seems short-sighted. If the patch is valid I see

[Nouveau] [PATCH] Revert "drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()"

2022-01-28 Thread Lyude Paul
This reverts commit 2343bcdb4747d4f418a4daf2e898b94f86c24a59. Unfortunately, as Greg pointed out I totally missed the fact that this patch came from a umn.edu patch. umn.edu is still banned from contributing to the Linux kernel, so let's revert this for the time being. I'll re-evaluate this fix

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Lyude Paul
Sigh-thank you for catching this - I had totally forgot about the umn.edu ban. I pushed this already but I will go ahead and send a revert for this patch. Will cc you on it as well. On Fri, 2022-01-28 at 11:18 +0100, Greg KH wrote: > On Tue, Jan 25, 2022 at 12:58:55AM +0800, Zhou Qingyang wrote:

Re: [Nouveau] [PATCH 09/14] drm/nouveau: Replace dma-buf-map with iosys-map

2022-01-28 Thread Lyude Paul
For this patch: Reviewed-by: Lyude Paul On Fri, 2022-01-28 at 00:36 -0800, Lucas De Marchi wrote: > iosys-map is the new name for dma-buf-map and will gain new > capabitilities. Replace with the new API in nouveau. > > Signed-off-by: Lucas De Marchi > --- >  

Re: [Nouveau] [PATCH] drm/nouveau/acr: Fix undefined behavior in nvkm_acr_hsfw_load_bl()

2022-01-28 Thread Greg KH
On Tue, Jan 25, 2022 at 12:58:55AM +0800, Zhou Qingyang wrote: > In nvkm_acr_hsfw_load_bl(), the return value of kmalloc() is directly > passed to memcpy(), which could lead to undefined behavior on failure > of kmalloc(). > > Fix this bug by using kmemdup() instead of kmalloc()+memcpy(). > >

Re: [Nouveau] [PATCH 01/14] iosys-map: Introduce renamed dma-buf-map

2022-01-28 Thread Thomas Zimmermann
Hi Am 28.01.22 um 10:24 schrieb Lucas De Marchi: On Fri, Jan 28, 2022 at 09:53:59AM +0100, Thomas Zimmermann wrote: Hi Am 28.01.22 um 09:36 schrieb Lucas De Marchi: Add a new type, struct iosys_map, to eventually replace struct dma_buf_map and its helpers defiend in

Re: [Nouveau] [PATCH 01/14] iosys-map: Introduce renamed dma-buf-map

2022-01-28 Thread Thomas Zimmermann
Hi Am 28.01.22 um 09:36 schrieb Lucas De Marchi: Add a new type, struct iosys_map, to eventually replace struct dma_buf_map and its helpers defiend in include/linux/dma-buf-map.h. This is mostly a copy of dma-buf-map with the renames in place and slightly different wording to avoid tying