[PATCH v11 3/4] drm/panel: lvds: Read panel orientation

2020-06-18 Thread Dmitry Osipenko
The panel orientation needs to parsed from a device-tree and assigned to the panel's connector in order to make orientation property available to userspace. That's what this patch does for the generic LVDS panel. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panel/panel-lvds.c | 10

Re: [PATCH v2 5/5] drm/tegra: plane: Support 180° rotation

2020-06-18 Thread Dmitry Osipenko
16.06.2020 14:25, Dmitry Osipenko пишет: > 16.06.2020 00:47, Emil Velikov пишет: >> Hi all, >> >> Perhaps a silly question: >> >> On Mon, 15 Jun 2020 at 08:28, Dmitry Osipenko wrote: >>> >>> Combining horizontal and vertical reflections gives us 180 degrees of >>> rotation. >>> >>> Signed-off-by:

Re: [PATCH 1/2] drm: drm_fourcc: add NV20 YUV format【请注意,邮件由linux-rockchip-bounces+sandy.huang=rock-chips....@lists.infradead.org代发】

2020-06-18 Thread Huang Jiachai
Hi Jonas Karlman,     Is there an another yuv 10bit format with 4:4:4 sub-simpling but has no padding?  Maybe we can call it DRM_FORMAT_NV30: { .format = DRM_FORMAT_NV30,.depth = 0, .num_planes = 2, .char_per_block = { 5, 5, 0 }, .block_w = { 4, 2, 0 }, .block_h = { 1, 1, 0 },

Re: [PATCH v2 0/5] 180 degrees rotation support for NVIDIA Tegra DRM

2020-06-18 Thread Dmitry Osipenko
17.06.2020 12:34, Daniel Stone пишет: > Hi, > > On Tue, 16 Jun 2020 at 22:16, Dmitry Osipenko wrote: >> The panel's orientation could be parsed by any panel driver and then >> assigned as the connector's property in order to allow userspace/FB-core >> to decide what to do with the rotated display

[PATCH v2 2/2] drm/amdgpu/debugfs: fix memory leak when amdgpu_virt_enable_access_debugfs failed

2020-06-18 Thread Chen Tao
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when amdgpu_virt_enable_access_debugfs failed. Fixes: 95a2f917387a2 ("drm/amdgpu: restrict debugfs register accessunder SR-IOV") Signed-off-by: Chen Tao --- v1->v2: - remove the duplication of result and r here and then use "goto err"

Re: [PATCH v3] drm/tegra: Add zpos property for cursor planes

2020-06-18 Thread Dmitry Osipenko
17.06.2020 17:10, Thierry Reding пишет: > On Tue, Jun 16, 2020 at 09:39:19PM +0300, Dmitry Osipenko wrote: >> 16.06.2020 21:14, Thierry Reding пишет: >>> From: Thierry Reding >>> >>> As of commit 4dc55525b095 ("drm: plane: Verify that no or all planes >>> have a zpos property") a warning is emitte

[RESEND PATCH] drm/msm/dpu: fix error return code in dpu_encoder_init

2020-06-18 Thread Chen Tao
Fix to return negative error code -ENOMEM with the use of ERR_PTR from dpu_encoder_init. Fixes: 25fdd5933e4c ("drm/msm: Add SDM845 DPU support") Signed-off-by: Chen Tao --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v2 1/2] drm/amdgpu/debugfs: fix memory leak when pm_runtime_get_sync failed

2020-06-18 Thread Chen Tao
Fix memory leak in amdgpu_debugfs_gpr_read not freeing data when pm_runtime_get_sync failed. Fixes: a9ffe2a983383 ("drm/amdgpu/debugfs: properly handle runtime pm") Signed-off-by: Chen Tao --- v1->v2: - remove the duplication of result and r here and then use "goto err" drivers/gpu/drm/amd/amd

Re: [PATCH v2] drm/etnaviv: fix ref count leak via pm_runtime_get_sync

2020-06-18 Thread Navid Emamdoost
Hi Lucas, On Wed, Jun 17, 2020 at 4:53 AM Lucas Stach wrote: > > Hi Navid, > > Am Montag, den 15.06.2020, 01:12 -0500 schrieb Navid Emamdoost: > > in etnaviv_gpu_submit, etnaviv_gpu_recover_hang, etnaviv_gpu_debugfs, > > and etnaviv_gpu_init the call to pm_runtime_get_sync increments the > > cou

[PATCH v8 2/7] drm/of: Make drm_of_find_panel_or_bridge() to check graph's presence

2020-06-18 Thread Dmitry Osipenko
When graph isn't defined in a device-tree, the of_graph_get_remote_node() prints a noisy error message, telling that port node is not found. This is undesirable behaviour in our case because absence of a panel/bridge graph is a valid case. Let's check the graph's presence in a device-tree before pr

Re: [PATCH v3] drm/tegra: Add zpos property for cursor planes

2020-06-18 Thread Dmitry Osipenko
17.06.2020 19:37, Thierry Reding пишет: > On Wed, Jun 17, 2020 at 05:20:14PM +0300, Dmitry Osipenko wrote: >> 17.06.2020 17:10, Thierry Reding пишет: >>> On Tue, Jun 16, 2020 at 09:39:19PM +0300, Dmitry Osipenko wrote: 16.06.2020 21:14, Thierry Reding пишет: > From: Thierry Reding > >

Re: [PATCH v6 1/5] dt-bindings: msm/dp: add bindings of DP/DP-PLL driver for Snapdragon

2020-06-18 Thread Stephen Boyd
Quoting Rob Herring (2020-06-17 08:38:20) > On Tue, Jun 16, 2020 at 5:15 AM Stephen Boyd wrote: > > > > Quoting Tanmay Shah (2020-06-11 18:50:26) > > > diff --git a/Documentation/devicetree/bindings/display/msm/dp-sc7180.yaml > > > b/Documentation/devicetree/bindings/display/msm/dp-sc7180.yaml >

[PATCH v8 1/7] of_graph: add of_graph_presents()

2020-06-18 Thread Dmitry Osipenko
In some case, like a DRM display code for example, it's useful to silently check whether port node exists at all in a device-tree before proceeding with parsing of the graph. This patch adds of_graph_presents() that returns true if given device-tree node contains OF graph port. Signed-off-by: Dmi

Re: [PATCH v5 0/2] mfd: Add ENE KB3930 Embedded Controller driver

2020-06-18 Thread Lubomir Rintel
On Wed, Jun 17, 2020 at 10:58:28AM +0200, Lucas Stach wrote: > Hi Lubomir, > > Am Mittwoch, den 17.06.2020, 00:44 +0200 schrieb Lubomir Rintel: > > Hi, > > > > please consider applying the patches chained to this message. It's the > > fifth version of the driver for the ENE KB3930 Embedded Contro

[PATCH v8 5/7] drm/tegra: output: rgb: Support LVDS encoder bridge

2020-06-18 Thread Dmitry Osipenko
Newer Tegra device-trees will specify a video output graph, which involves LVDS encoder bridge. This patch adds support for the LVDS encoder bridge to the RGB output, allowing us to model the display hardware properly. Reviewed-by: Laurent Pinchart Acked-by: Sam Ravnborg Signed-off-by: Dmitry Os

[PATCH v11 4/4] drm/panel-simple: Read panel orientation

2020-06-18 Thread Dmitry Osipenko
The panel orientation needs to parsed from a device-tree and assigned to the panel's connector in order to make orientation property available to userspace. That's what this patch does for the panel-simple driver. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/panel/panel-simple.c | 11 +

[PATCH] drm/lima: Expose job_hang_limit module parameter

2020-06-18 Thread Andrey Lebedev
From: Andrey Lebedev Some pp or gp jobs can be successfully repeated even after they time outs. Introduce lima module parameter to specify number of times a job can hang before being dropped. Signed-off-by: Andrey Lebedev --- Hello, This patch allows to work around a freezing problem as discu

Re: [PATCH v8 0/8] Add support for devices in the Energy Model

2020-06-18 Thread Lukasz Luba
Hi Rafael, On 5/29/20 5:18 PM, Rafael J. Wysocki wrote: On Fri, May 29, 2020 at 5:01 PM Lukasz Luba wrote: Hi Rafael, On 5/27/20 10:58 AM, Lukasz Luba wrote: Hi all, Background of this version: This is the v8 of the patch set and is has smaller scope. I had to split the series into two: E

RE: [PATCH] dmabuf: use spinlock to access dmabuf->name

2020-06-18 Thread David Laight
From: Charan Teja Kalla > Sent: 17 June 2020 07:29 ... > >> If name is freed you will copy garbage, but the only way > >> for that to happen is that _set_name or _release have to be called > >> at just the right time. > >> > >> And the above would probably only be an issue if the set_name > >> was

[PATCH v11 0/4] Panel rotation patches

2020-06-18 Thread Dmitry Osipenko
Hello! This series adds support for display panel's DT rotation property. It's a continuation of the work that was initially started by Derek Basehore for the panel driver that is used by some Mediatek device [1]. I picked up the Derek's patches and added my t-b and r-b tags to them, I also added

[PATCH v3 2/3] drm/tegra: plane: Support horizontal reflection

2020-06-18 Thread Dmitry Osipenko
Support horizontal reflection mode which will allow to support 180° rotation mode when combined with the vertical reflection. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c| 38 +-- drivers/gpu/drm/tegra/dc.h| 1 + drivers/gpu/drm/tegra/pla

[PATCH] drm/lima: Expose job_hang_limit module parameter

2020-06-18 Thread Andrey Lebedev
From: Andrey Lebedev Some pp or gp jobs can be successfully repeated even after they time outs. Introduce lima module parameter to specify number of times a job can hang before being dropped. Signed-off-by: Andrey Lebedev --- Changed type of lima_job_hang_limit to unsigned int. drivers/gpu/d

[PATCH v8 6/7] drm/tegra: output: rgb: Wrap directly-connected panel into DRM bridge

2020-06-18 Thread Dmitry Osipenko
Currently Tegra DRM driver manually manages display panel, but this management could be moved out into DRM core if we'll wrap panel into DRM bridge. This patch wraps RGB panel into a DRM bridge and removes manual handling of the panel from the RGB output code. Suggested-by: Laurent Pinchart Acked

[PATCH v3 1/3] drm/tegra: plane: Rename bottom_up to reflect_y

2020-06-18 Thread Dmitry Osipenko
This makes the naming consistent with the DRM core. Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/dc.c| 10 +- drivers/gpu/drm/tegra/dc.h| 2 +- drivers/gpu/drm/tegra/plane.c | 2 +- drivers/gpu/drm/tegra/plane.h | 2 +- 4 files changed, 8 insertions(+), 8 deletions

[PATCH v8 4/7] drm/tegra: output: Support DRM bridges

2020-06-18 Thread Dmitry Osipenko
Newer Tegra device-trees will specify a video output graph which involves a bridge. This patch adds initial support for the DRM bridges to the Tegra DRM output. Acked-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/drm.h| 2 ++ drivers/gpu/drm/tegra/output.c | 12

[PATCH v8 7/7] drm/panel-simple: Add missing connector type for some panels

2020-06-18 Thread Dmitry Osipenko
The DRM panel bridge core requires connector type to be set up properly, otherwise it rejects the panel. The missing connector type problem popped up while I was trying to wrap CLAA070WP03XG panel into a DRM bridge in order to test whether panel's rotation property work properly using panel-simple

[PATCH v3 0/3] 180 degrees rotation support for NVIDIA Tegra DRM

2020-06-18 Thread Dmitry Osipenko
Hello! This series adds 180° display plane rotation support to the NVIDIA Tegra DRM driver which is needed for devices that have display panel physically mounted upside-down, like Nexus 7 tablet device for example [1]. Since DRM panel rotation is a new thing for a userspace, currently only Openteg

Re: [PATCH] dmabuf: use spinlock to access dmabuf->name

2020-06-18 Thread Charan Teja Kalla
On 6/17/2020 1:51 PM, David Laight wrote: > From: Charan Teja Kalla >> Sent: 17 June 2020 07:29 > ... If name is freed you will copy garbage, but the only way for that to happen is that _set_name or _release have to be called at just the right time. And the above would p

[PATCH v11 2/4] drm/panel: Read panel orientation for BOE TV101WUM-NL6

2020-06-18 Thread Dmitry Osipenko
From: Derek Basehore This reads the DT setting for the panel rotation to set the panel orientation in the get_modes callback. Reviewed-by: Dmitry Osipenko Signed-off-by: Derek Basehore --- drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a

[PATCH v8 0/7] Support DRM bridges on NVIDIA Tegra

2020-06-18 Thread Dmitry Osipenko
Hello, This series adds initial support for the DRM bridges to NVIDIA Tegra DRM driver. This is required by newer device-trees where we model the LVDS encoder bridge properly. Changelog: v8: - The new of_graph_get_local_port() helper is replaced with the of_graph_presents(), which simply c

[PATCH v11 1/4] drm/panel: Add helper for reading DT rotation

2020-06-18 Thread Dmitry Osipenko
From: Derek Basehore This adds a helper function for reading the rotation (panel orientation) from the device tree. Signed-off-by: Derek Basehore Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/drm_panel.c | 43 + include/drm/drm_panel.h | 9 2

Re: [PATCH v4 22/37] dt-bindings: host1x: Document new interconnect properties

2020-06-18 Thread Dmitry Osipenko
18.06.2020 00:37, Rob Herring пишет: > On Tue, Jun 09, 2020 at 04:13:49PM +0300, Dmitry Osipenko wrote: >> Most of Host1x devices have at least one memory client. These clients >> are directly connected to the memory controller. The new interconnect >> properties represent the memory client's conne

Re: [PATCH v4 22/37] dt-bindings: host1x: Document new interconnect properties

2020-06-18 Thread Dmitry Osipenko
18.06.2020 00:44, Dmitry Osipenko пишет: > 18.06.2020 00:37, Rob Herring пишет: >> On Tue, Jun 09, 2020 at 04:13:49PM +0300, Dmitry Osipenko wrote: >>> Most of Host1x devices have at least one memory client. These clients >>> are directly connected to the memory controller. The new interconnect >>>

[PATCH v3 3/3] drm/tegra: plane: Support 180° rotation

2020-06-18 Thread Dmitry Osipenko
Combining horizontal and vertical reflections gives us 180 degrees of rotation. Both reflection modes are already supported, and thus, we just need to mark the 180 rotation mode as supported. The 180 rotation mode is needed for devices like Nexus 7 tablet, which have display panel mounted upside-do

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Jason Gunthorpe
On Wed, Jun 17, 2020 at 08:48:50AM +0200, Daniel Vetter wrote: > Now my understanding for rdma is that if you don't have hw page fault > support, The RDMA ODP feature is restartable HW page faulting just like nouveau has. The classical MR feature doesn't have this. Only mlx5 HW supports ODP today

[PATCH v8 3/7] drm/tegra: output: Don't leak OF node on error

2020-06-18 Thread Dmitry Osipenko
The OF node should be put before returning error in tegra_output_probe(), otherwise node's refcount will be leaked. Reviewed-by: Laurent Pinchart Reviewed-by: Sam Ravnborg Signed-off-by: Dmitry Osipenko --- drivers/gpu/drm/tegra/output.c | 9 - 1 file changed, 4 insertions(+), 5 deleti

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Jason Gunthorpe
On Wed, Jun 17, 2020 at 09:57:54AM +0200, Daniel Vetter wrote: > > At the very least I think there should be some big warning that > > dma_fence in notifiers should be avoided. > > Yeah I'm working on documentation, and also the notifiers here > hopefully make it clear it's massive pain. I think

Re: [PATCH v2 1/4] drm/bridge: ti-sn65dsi86: Don't compile GPIO bits if not CONFIG_OF_GPIO

2020-06-18 Thread Neil Armstrong
Hi Doug, On 15/06/2020 16:36, Doug Anderson wrote: > Hi, > > On Fri, Jun 12, 2020 at 12:31 PM Douglas Anderson > wrote: >> >> The kernel test robot noted that if "OF" is defined (which is needed >> to select DRM_TI_SN65DSI86 at all) but not OF_GPIO that we'd get >> compile failures because some

Re: [PATCH 4/6] video: backlight: tosa_lcd: convert to use i2c_new_client_device()

2020-06-18 Thread Lee Jones
On Mon, 15 Jun 2020, Wolfram Sang wrote: > Move away from the deprecated API and return the shiny new ERRPTR where > useful. > > Signed-off-by: Wolfram Sang > Reviewed-by: Daniel Thompson > --- > > I'd like to push it via I2C for 5.8-rc2. Go for it: Acked-by: Lee Jones -- Lee Jones [李琼斯]

[Bug 208231] New: The kernel after the boot not show desktop with Nvidia gtx 760 with Nouveau Driver

2020-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=208231 Bug ID: 208231 Summary: The kernel after the boot not show desktop with Nvidia gtx 760 with Nouveau Driver Product: Drivers Version: 2.5 Kernel Version: 5.8 rc1 Hardwar

Re: [PATCH v3] drm/panfrost: Reduce the amount of logs on deferred probe

2020-06-18 Thread Steven Price
On 17/06/2020 20:57, Rob Herring wrote: On Wed, Jun 17, 2020 at 8:36 AM Steven Price wrote: On 17/06/2020 15:15, Krzysztof Kozlowski wrote: On Wed, May 27, 2020 at 04:43:34PM -0400, Alyssa Rosenzweig wrote: Reviewed-by: Alyssa Rosenzweig On Wed, May 27, 2020 at 10:05:44PM +0200, Krzysztof

[PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Colin King
From: Colin Ian King Shifting the integer value 1 is evaluated using 32-bit arithmetic and then used in an expression that expects a long value leads to a potential integer overflow. Fix this by using the BIT macro to perform the shift to avoid the overflow. Addresses-Coverity: ("Unintentional i

[PATCH] drm/amdgpu: remove redundant initialization of variable ret

2020-06-18 Thread Colin King
From: Colin Ian King The variable ret is being initialized with a value that is never read and it is being updated later with a new value. The initialization is redundant and can be removed. Addresses-Coverity: ("Unused value") Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdg

Re: [PATCH][next] drm/mm/selftests: fix unsigned comparison with less than zero

2020-06-18 Thread Dan Carpenter
On Wed, Jun 17, 2020 at 04:59:59PM +0100, Colin King wrote: > From: Colin Ian King > > Function get_insert_time can return error values that are cast > to a u64. The checks of insert_time1 and insert_time2 check for > the errors but because they are u64 variables the check for less > than zero ca

Re: [PATCH 1/5] drm/omap: Fix suspend resume regression after platform data removal

2020-06-18 Thread Grygorii Strashko
On 17/06/2020 09:04, Tomi Valkeinen wrote: On 16/06/2020 19:56, Grygorii Strashko wrote: On 16/06/2020 18:30, Tony Lindgren wrote: * Tomi Valkeinen [200616 13:02]: On 11/06/2020 17:00, Grygorii Strashko wrote: I think, suspend might be fixed if all devices, which are now child of ti-sysc

Re: [PATCH v5 08/12] device core: Introduce multiple dma pfn offsets

2020-06-18 Thread Jim Quinlan
On Wed, Jun 17, 2020 at 9:00 AM Robin Murphy wrote: > > Hi Jim, > > Thanks for taking this on! Hi Robin, > > On 2020-06-16 21:55, Jim Quinlan wrote: > > The new field in struct device 'dma_pfn_offset_map' is used to facilitate > > the use of single or multiple pfn offsets between cpu addrs and d

Re: [PATCH v2] drm/hisilicon: Add the shutdown for hibmc_pci_driver

2020-06-18 Thread Thomas Zimmermann
Hi Am 16.04.20 um 03:02 schrieb Tian Tao: > add the shutdown function to release the resource. Why is this necessary for hibmc? The other PCI drivers don't require a shutdown method. > > v2: > Remove the unnecessary unmap function. > > Signed-off-by: Tian Tao > Reviewed-by: Sam Ravnborg > --

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Liviu Dudau
On Thu, Jun 18, 2020 at 11:04:00AM +0100, Colin King wrote: > From: Colin Ian King Hi Colin, > > Shifting the integer value 1 is evaluated using 32-bit arithmetic > and then used in an expression that expects a long value leads to > a potential integer overflow. I'm afraid this explanation mak

[PULL] drm-intel-fixes

2020-06-18 Thread Joonas Lahtinen
Hi Dave & Daniel, -rc1 required the usual juggling to get baseline from CI. Needed to temporarily apply this fixup to drm-intel-fixes: "ext4: mballoc: Use this_cpu_read instead of this_cpu_ptr" For display side, fix for TypeC interrupt storm detection. Fixes to TypeC, DDI and MST hardware registe

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Colin Ian King
On 18/06/2020 13:14, Liviu Dudau wrote: > On Thu, Jun 18, 2020 at 11:04:00AM +0100, Colin King wrote: >> From: Colin Ian King > > Hi Colin, > >> >> Shifting the integer value 1 is evaluated using 32-bit arithmetic >> and then used in an expression that expects a long value leads to >> a potentia

[PATCH] drm/mgag200: Enable caching for SHMEM pages

2020-06-18 Thread Thomas Zimmermann
We've had reports about performance regressions after switching mgag200 from VRAM helpers to SHMEM helpers. SHMEM pages use writecombine caching by default, but can also use the platform's default page caching. Doing so improves the performance of I/O on the framebuffer. Mgag200's hardware does no

Re: [PATCH] drm/mgag200: Don't set in MISC

2020-06-18 Thread Thomas Zimmermann
Hi Am 18.06.20 um 03:40 schrieb Rong Chen: > > > On 6/17/20 8:29 PM, Thomas Zimmermann wrote: >> Hi >> >> Am 17.06.20 um 11:22 schrieb Rong Chen: >>> On Wed, Jun 17, 2020 at 08:28:02AM +0200, Thomas Zimmermann wrote: Hi Emil Am 16.06.20 um 17:14 schrieb Emil Velikov: > Hi Thom

[PATCH v2] drm/omap: force runtime PM suspend on system suspend

2020-06-18 Thread Tomi Valkeinen
Use SET_LATE_SYSTEM_SLEEP_PM_OPS in DSS submodules to force runtime PM suspend and resume. We use suspend late version so that omapdrm's system suspend callback is called first, as that will disable all the display outputs after which it's safe to force DSS into suspend. Signed-off-by: Tomi Valke

Re: [PATCH v2] drm/hisilicon: Code refactoring for hibmc_drv_vdac

2020-06-18 Thread Thomas Zimmermann
Hi, sorry for letting these patches sit around for so long. I'd say that if you waited for a week or two without further responses, it's ok to ping people. Am 11.04.20 um 08:25 schrieb Tian Tao: > code refactoring for hibmc_drv_vdac.c, no actual function changes. > > v2: > remove the debug messa

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Liviu Dudau
On Thu, Jun 18, 2020 at 01:50:34PM +0100, Colin Ian King wrote: > On 18/06/2020 13:14, Liviu Dudau wrote: > > On Thu, Jun 18, 2020 at 11:04:00AM +0100, Colin King wrote: > >> From: Colin Ian King > > > > Hi Colin, > > > >> > >> Shifting the integer value 1 is evaluated using 32-bit arithmetic >

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Colin Ian King
On 18/06/2020 15:36, Garrit Franke wrote: > Hi all, newbie here. > Can the BIT macro be safely used on other parts of the kernel as well? > Just using git grep "1 <<" returns a ton of results where bit shifting > is used the old fashioned way. The BIT macro casts the 1 it a UL before shifting so i

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Daniel Vetter
On Wed, Jun 17, 2020 at 12:29:40PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 17, 2020 at 09:57:54AM +0200, Daniel Vetter wrote: > > > > At the very least I think there should be some big warning that > > > dma_fence in notifiers should be avoided. > > > > Yeah I'm working on documentation, and

Re: [Linaro-mm-sig] [PATCH 04/18] dma-fence: prime lockdep annotations

2020-06-18 Thread Daniel Vetter
On Wed, Jun 17, 2020 at 12:28:35PM -0300, Jason Gunthorpe wrote: > On Wed, Jun 17, 2020 at 08:48:50AM +0200, Daniel Vetter wrote: > > > Now my understanding for rdma is that if you don't have hw page fault > > support, > > The RDMA ODP feature is restartable HW page faulting just like nouveau > h

[Bug 207901] Nouveau: In a 4 monitor setup, 1-2 displays remains black after boot

2020-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207901 --- Comment #17 from Lyude Paul (ly...@redhat.com) --- (got the mmiotrace via email, thanks!) Also another update on this: we actually got some feedback from nvidia regarding this issue and I think we have a pretty good idea of what's happening,

Re: [PATCH] drm/amdgpu: remove redundant initialization of variable ret

2020-06-18 Thread Alex Deucher
On Thu, Jun 18, 2020 at 6:26 AM Colin King wrote: > > From: Colin Ian King > > The variable ret is being initialized with a value that is never read > and it is being updated later with a new value. The initialization is > redundant and can be removed. > > Addresses-Coverity: ("Unused value") >

Re: [PATCH] drm/noveau: fix reference count leak in nv50_disp_atomic_commit

2020-06-18 Thread Lyude Paul
On Sat, 2020-06-13 at 20:29 -0500, Aditya Pakki wrote: > nv50_disp_atomic_commit() calls calls pm_runtime_get_sync and in turn > increments the reference count. In case of failure, decrement the > ref count before returning the error. > > Signed-off-by: Aditya Pakki > --- > drivers/gpu/drm/nouve

Re: [PATCH] drm/arm: fix unintentional integer overflow on left shift

2020-06-18 Thread Dan Carpenter
On Thu, Jun 18, 2020 at 04:36:51PM +0200, Garrit Franke wrote: > Hi all, newbie here. > Can the BIT macro be safely used on other parts of the kernel as well? > Just using git grep "1 <<" returns a ton of results where bit shifting > is used the old fashioned way. Yeah. There is a checkpatch warn

[Bug 207901] Nouveau: In a 4 monitor setup, 1-2 displays remains black after boot

2020-06-18 Thread bugzilla-daemon
https://bugzilla.kernel.org/show_bug.cgi?id=207901 --- Comment #18 from Maurice Gale (mauricega...@gmail.com) --- That's awesome. Thanks! -- You are receiving this mail because: You are watching the assignee of the bug. ___ dri-devel mailing list dri-d

[PATCH v6 00/36] DRM: fix struct sg_table nents vs. orig_nents misuse

2020-06-18 Thread Marek Szyprowski
map_sg function. In this patchset I only fixed the sg_table objects exported by dmabuf related functions. I hope that I didn't break anything there. Patches are based on top of Linux next-20200618. The required changes to DMA-mapping framework has been already merged to v5.8-rc1. If possib

[PATCH v6 04/36] drm: amdgpu: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 17/36] drm: radeon: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 16/36] drm: panfrost: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 11/36] drm: mediatek: use common helper for a scatterlist contiguity check

2020-06-18 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf and do this check before allocating resources, so the error path is simpler. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 28 ++ 1 file changed, 6 insertions(+), 22 delet

[PATCH v6 25/36] drm: host1x: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 21/36] drm: v3d: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 24/36] xen: gntdev: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 19/36] drm: rockchip: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 05/36] drm: armada: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 01/36] drm: prime: add common helper to check scatterlist contiguity

2020-06-18 Thread Marek Szyprowski
It is a common operation done by DRM drivers to check the contiguity of the DMA-mapped buffer described by a scatterlist in the sg_table object. Let's add a common helper for this operation. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/drm_gem_cma_helper.c | 23 +++ dr

[PATCH v6 13/36] drm: msm: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 02/36] drm: prime: use sgtable iterators in drm_prime_sg_to_page_addr_arrays()

2020-06-18 Thread Marek Szyprowski
Replace the current hand-crafted code for extracting pages and DMA addresses from the given scatterlist by the much more robust code based on the generic scatterlist iterators and recently introduced sg_table-based wrappers. The resulting code is simple and easy to understand, so the comment descri

[PATCH v6 27/36] dmabuf: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 10/36] drm: lima: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 06/36] drm: etnaviv: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 08/36] drm: exynos: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 22/36] drm: virtio: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 12/36] drm: mediatek: use common helper for extracting pages array

2020-06-18 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 9 ++--- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/med

[PATCH v6 07/36] drm: exynos: use common helper for a scatterlist contiguity check

2020-06-18 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/exynos/exynos_drm_gem.c | 23 +++ 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_gem.c b/drivers/gpu/d

[PATCH v6 03/36] drm: core: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 26/36] drm: rcar-du: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 14/36] drm: omapdrm: use common helper for extracting pages array

2020-06-18 Thread Marek Szyprowski
Use common helper for converting a sg_table object into struct page pointer array. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/omapdrm/omap_gem.c | 14 -- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_gem.c b/drivers/gpu/drm/omap

[PATCH v6 34/36] media: pci: fix common ALSA DMA-mapping related codes

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that dma_map_sg returns the numer of the created entries in the DMA address space. However the subsequent calls to dma_sync_sg_for_{device,cpu} and dma_unmap_sg must be called with the original number of entries passed to dma_map_sg. The sg_table->nents in

[PATCH v6 09/36] drm: i915: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 32/36] rapidio: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 20/36] drm: tegra: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 35/36] videobuf2: use sgtable-based scatterlist wrappers

2020-06-18 Thread Marek Szyprowski
Use recently introduced common wrappers operating directly on the struct sg_table objects and scatterlist page iterators to make the code a bit more compact, robust, easier to follow and copy/paste safe. No functional change, because the code already properly did all the scaterlist related calls.

[PATCH v6 30/36] staging: tegra-vde: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 33/36] samples: vfio-mdev/mbochs: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 23/36] drm: vmwgfx: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 18/36] drm: rockchip: use common helper for a scatterlist contiguity check

2020-06-18 Thread Marek Szyprowski
Use common helper for checking the contiguity of the imported dma-buf. Signed-off-by: Marek Szyprowski --- drivers/gpu/drm/rockchip/rockchip_drm_gem.c | 19 +-- 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_gem.c b/drivers/gp

[PATCH v6 31/36] misc: fastrpc: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 15/36] drm: omapdrm: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

[PATCH v6 28/36] staging: ion: remove dead code

2020-06-18 Thread Marek Szyprowski
ion_heap_pages_zero() function is not used at all, so remove it to simplify the ion_heap_sglist_zero() function later. Signed-off-by: Marek Szyprowski --- drivers/staging/android/ion/ion.h | 1 - drivers/staging/android/ion/ion_heap.c | 9 - 2 files changed, 10 deletions(-) diff --

[PATCH v6 29/36] staging: ion: fix common struct sg_table related issues

2020-06-18 Thread Marek Szyprowski
The Documentation/DMA-API-HOWTO.txt states that the dma_map_sg() function returns the number of the created entries in the DMA address space. However the subsequent calls to the dma_sync_sg_for_{device,cpu}() and dma_unmap_sg must be called with the original number of the entries passed to the dma_

Re: [PATCH v2] drm/etnaviv: convert get_user_pages() --> pin_user_pages()

2020-06-18 Thread Lucas Stach
Am Montag, den 25.05.2020, 16:49 -0700 schrieb John Hubbard: > This code was using get_user_pages*(), in a "Case 2" scenario > (DMA/RDMA), using the categorization from [1]. That means that it's > time to convert the get_user_pages*() + put_page() calls to > pin_user_pages*() + unpin_user_pages() c

  1   2   >