[PATCH v2 3/3] dma-buf: system_heap: Add deferred freeing to the system heap

2021-01-22 Thread John Stultz
Utilize the deferred free helper library in the system heap. This provides a nice performance bump and puts the system heap performance on par with ION. Cc: Daniel Vetter Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laura Abbott Cc: Brian Starkey Cc: Hridya Valsaraju Cc: Suren

[PATCH v2 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-22 Thread John Stultz
Reuse/abuse the pagepool code from the network code to speed up allocation performance. This is similar to the ION pagepool usage, but tries to utilize generic code instead of a custom implementation. Cc: Daniel Vetter Cc: Sumit Semwal Cc: Liam Mark Cc: Chris Goldsworthy Cc: Laura Abbott Cc:

[PATCH v2 1/3] dma-buf: heaps: Add deferred-free-helper library code

2021-01-22 Thread John Stultz
This patch provides infrastructure for deferring buffer frees. This is a feature ION provided which when used with some form of a page pool, provides a nice performance boost in an allocation microbenchmark. The reason it helps is it allows the page-zeroing to be done out of the normal allocation/

Re: [RFC][PATCH 2/3] dma-buf: system_heap: Add pagepool support to system heap

2021-01-22 Thread John Stultz
On Mon, Dec 21, 2020 at 2:09 PM Daniel Vetter wrote: > > On Fri, Dec 18, 2020 at 05:16:56PM -0800, John Stultz wrote: > > On Fri, Dec 18, 2020 at 6:36 AM Daniel Vetter wrote: > > > On Thu, Dec 17, 2020 at 11:06:11PM +, John Stultz wrote: > > > > Reuse/abuse the pagepool code from the network

Re: [RESEND][PATCH 2/3] dma-buf: heaps: Add a WARN_ON should the vmap_cnt go negative

2021-01-22 Thread John Stultz
On Fri, Jan 22, 2021 at 2:21 PM Suren Baghdasaryan wrote: > On Thu, Jan 21, 2021 at 11:56 PM Sumit Semwal wrote: > > On Wed, 20 Jan 2021 at 02:15, John Stultz wrote: > > > > > > We shouldn't vunmap more then we vmap, but if we do, make > > > sure we complain loudly. > > > > I was checking the ge

Re: [PATCH 2/2] drm/amdgpu/display: buffer INTERRUPT_LOW_IRQ_CONTEXT interrupt work

2021-01-22 Thread Chen, Xiaogang
On 1/19/2021 4:29 PM, Grodzovsky, Andrey wrote: On 1/15/21 2:21 AM, Chen, Xiaogang wrote: On 1/14/2021 1:24 AM, Grodzovsky, Andrey wrote: On 1/14/21 12:11 AM, Chen, Xiaogang wrote: On 1/12/2021 10:54 PM, Grodzovsky, Andrey wrote: On 1/4/21 1:01 AM, Xiaogang.Chen wrote: From: Xiaogang Chen

Re: [PATCH v4 1/3] drm/uapi: Add USB connector type

2021-01-22 Thread Noralf Trønnes
Den 22.01.2021 15.55, skrev Thomas Zimmermann: > Hi > > Am 22.01.21 um 15:35 schrieb Noralf Trønnes: >> >> >> Den 22.01.2021 13.47, skrev Thomas Zimmermann: >>> Hi >>> >>> Am 22.01.21 um 12:44 schrieb Noralf Trønnes: And wrt PCI it wouldn't be a PCI connector if the card has some other

Re: [PATCH] RFC: dma-fence: Document recoverable page fault implications

2021-01-22 Thread Felix Kuehling
Am 2021-01-21 um 2:40 p.m. schrieb Daniel Vetter: > Recently there was a fairly long thread about recoreable hardware page > faults, how they can deadlock, and what to do about that. > > While the discussion is still fresh I figured good time to try and > document the conclusions a bit. Thank you D

Re: [PATCH v2 1/2] dt-bindings: drm/bridge: anx7625: add DPI flag and swing setting

2021-01-22 Thread Rob Herring
On Tue, Jan 12, 2021 at 2:57 AM Xin Ji wrote: > > Hi Rob Herring, thanks for the comments. > > On Mon, Jan 11, 2021 at 04:14:35PM -0600, Rob Herring wrote: > > On Thu, Dec 31, 2020 at 10:21:12AM +0800, Xin Ji wrote: > > > Add DPI flag for distinguish MIPI input signal type, DSI or DPI. Add > > > s

Re: [PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret

2021-01-22 Thread Jani Nikula
On Fri, 22 Jan 2021, Colin King wrote: > From: Colin Ian King > > Currently when there are other connectors on the port using HDCP the > function _intel_hdcp_disable returns a garbage uninitialized value in > variable ret. I believe the intention is to return 0, so return this > literal value in

Re: [PATCH 0/3] Experimental freesync video mode optimization

2021-01-22 Thread Alex Deucher
On Fri, Jan 22, 2021 at 4:43 AM Daniel Vetter wrote: > > On Fri, Jan 22, 2021 at 10:32:48AM +0200, Pekka Paalanen wrote: > > On Tue, 19 Jan 2021 10:50:26 -0500 > > Aurabindo Pillai wrote: > > > > > Changes in V5 > > > = > > > > > > * More info in commit messages on the rationale of ch

Re: [PATCH v1 1/2] drm/gma500: Convert to use new SCU IPC API

2021-01-22 Thread Patrik Jakobsson
On Fri, Jan 22, 2021 at 3:51 PM Andy Shevchenko wrote: > > On Fri, Jan 22, 2021 at 03:16:55PM +0100, Patrik Jakobsson wrote: > > On Fri, Jan 22, 2021 at 12:39 PM Andy Shevchenko > > wrote: > > > > > > Convert the GMA500 driver to use the new SCU IPC API. This allows us > > > to get rid of the dup

[PATCH][next] drm/i915/hdcp: Fix return of value in uninitialized variable ret

2021-01-22 Thread Colin King
From: Colin Ian King Currently when there are other connectors on the port using HDCP the function _intel_hdcp_disable returns a garbage uninitialized value in variable ret. I believe the intention is to return 0, so return this literal value instead of the value in ret. Addresses-Coverity: ("U

Re: [PATCH v3 0/3] dt-bindings: display: Convert mxsfb DT bindings to YAML

2021-01-22 Thread Rob Herring
On Sat, Jan 16, 2021 at 12:23:01AM +0200, Laurent Pinchart wrote: > Hello, > > This patch series has previously been posted as part of "[PATCH v2 0/7] > drm: mxsfb: Allow overriding bus width". I've split the DT bindings > conversion to a separate series as I believe they're ready, and Martin > ha

[PATCH][next] drm/amdgpu: Fix masking binary not operator on two mask operations

2021-01-22 Thread Colin King
From: Colin Ian King Currently the ! operator is incorrectly being used to flip bits on mask values. Fix this by using the bit-wise ~ operator instead. Addresses-Coverity: ("Logical vs. bitwise operator") Fixes: 3c9a7b7d6e75 ("drm/amdgpu: update mmhub mgcg&ls for mmhub_v2_3") Signed-off-by: Coli

Re: [PATCH v4 1/3] drm/uapi: Add USB connector type

2021-01-22 Thread Thomas Zimmermann
Hi Am 22.01.21 um 15:35 schrieb Noralf Trønnes: Den 22.01.2021 13.47, skrev Thomas Zimmermann: Hi Am 22.01.21 um 12:44 schrieb Noralf Trønnes: And wrt PCI it wouldn't be a PCI connector if the card has some other connector for the display, but if it was possible to connect a display direct

Re: possible IO map leak in drm/gem

2021-01-22 Thread Thomas Zimmermann
Hi Am 22.01.21 um 15:27 schrieb Chuck Lever: On Jan 21, 2021, at 10:05 AM, Chuck Lever wrote: On Jan 21, 2021, at 9:47 AM, Thomas Zimmermann wrote: (cc'ing dri-devel) Hi, thanks for reporting the bug. Am 21.01.21 um 15:35 schrieb Chuck Lever: Hi Thomas- I was not able to find an ap

Re: [PATCH v4 1/3] drm/uapi: Add USB connector type

2021-01-22 Thread Noralf Trønnes
Den 22.01.2021 13.47, skrev Thomas Zimmermann: > Hi > > Am 22.01.21 um 12:44 schrieb Noralf Trønnes: >> >> And wrt PCI it wouldn't be a PCI connector if the card has some other >> connector for the display, but if it was possible to connect a display >> directly to the PCI connector, then yes I

Re: [PATCH v1 1/2] drm/gma500: Convert to use new SCU IPC API

2021-01-22 Thread Patrik Jakobsson
On Fri, Jan 22, 2021 at 12:39 PM Andy Shevchenko wrote: > > Convert the GMA500 driver to use the new SCU IPC API. This allows us > to get rid of the duplicate PMC IPC implementation which is now covered > in SCU IPC driver. > > Signed-off-by: Andy Shevchenko > Acked-by: Linus Walleij Both patch

Re: [PATCH] drm/todo: Add entry for moving to dma_resv_lock

2021-01-22 Thread Thomas Zimmermann
Hi Am 22.01.21 um 14:36 schrieb Daniel Vetter: Requested by Thomas. I think it justifies a new level, since I tried to make some forward progress on this last summer, and gave up (for now). This is very tricky. Adding it to the TODO list is a first step. :) Acked-by: Thomas Zimmermann Sig

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 2:35 PM Gerd Hoffmann wrote: > > On Fri, Jan 22, 2021 at 09:13:42AM +0100, Thomas Zimmermann wrote: > > Hi > > > > Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: > > > Balances the qxl_create_bo(..., pinned=true, ...); > > > call in qxl_release_bo_alloc(). > > > > > > Signed-o

Re: [Linaro-mm-sig] [PATCH] drm/todo: Add entry for moving to dma_resv_lock

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 2:40 PM Christian König wrote: > > Am 22.01.21 um 14:36 schrieb Daniel Vetter: > > Requested by Thomas. I think it justifies a new level, since I tried > > to make some forward progress on this last summer, and gave up (for > > now). This is very tricky. > > > > Signed-off-

Re: [Linaro-mm-sig] [PATCH] drm/todo: Add entry for moving to dma_resv_lock

2021-01-22 Thread Christian König
Am 22.01.21 um 14:36 schrieb Daniel Vetter: Requested by Thomas. I think it justifies a new level, since I tried to make some forward progress on this last summer, and gave up (for now). This is very tricky. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimme

[PATCH] drm/todo: Add entry for moving to dma_resv_lock

2021-01-22 Thread Daniel Vetter
Requested by Thomas. I think it justifies a new level, since I tried to make some forward progress on this last summer, and gave up (for now). This is very tricky. Signed-off-by: Daniel Vetter Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter Cc

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Gerd Hoffmann
On Fri, Jan 22, 2021 at 09:13:42AM +0100, Thomas Zimmermann wrote: > Hi > > Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: > > Balances the qxl_create_bo(..., pinned=true, ...); > > call in qxl_release_bo_alloc(). > > > > Signed-off-by: Gerd Hoffmann > > --- > > drivers/gpu/drm/qxl/qxl_release.c

Re: [PATCH] RFC: dma-fence: Document recoverable page fault implications

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 2:24 PM Christian König wrote: > > Am 22.01.21 um 14:18 schrieb Daniel Vetter: > > On Fri, Jan 22, 2021 at 2:10 PM Christian König > > wrote: > >> Am 21.01.21 um 20:40 schrieb Daniel Vetter: > >>> Recently there was a fairly long thread about recoreable hardware page > >>>

Re: [PATCH v2 13/15] dt-binding: display: bcm2711-hdmi: Add CEC and hotplug interrupts

2021-01-22 Thread Dave Stevenson
Hi Maxime On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: > > The CEC and hotplug interrupts were missing when that binding was > introduced, let's add them in now that we've figured out how it works. > > Signed-off-by: Maxime Ripard Looks reasonable to me, but I'm not a DT bindings expert

Re: [PATCH] RFC: dma-fence: Document recoverable page fault implications

2021-01-22 Thread Christian König
Am 22.01.21 um 14:18 schrieb Daniel Vetter: On Fri, Jan 22, 2021 at 2:10 PM Christian König wrote: Am 21.01.21 um 20:40 schrieb Daniel Vetter: Recently there was a fairly long thread about recoreable hardware page faults, how they can deadlock, and what to do about that. While the discussion

Re: [PATCH] RFC: dma-fence: Document recoverable page fault implications

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 2:10 PM Christian König wrote: > > Am 21.01.21 um 20:40 schrieb Daniel Vetter: > > Recently there was a fairly long thread about recoreable hardware page > > faults, how they can deadlock, and what to do about that. > > > > While the discussion is still fresh I figured good

Re: [PATCH v2 10/15] drm/vc4: hdmi: Support BCM2711 CEC interrupt setup

2021-01-22 Thread Dave Stevenson
Hi Maxime On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: > > The HDMI controller found in the BCM2711 has an external interrupt > controller for the CEC and hotplug interrupt shared between the two > instances. > > Let's add a variant flag to register a single interrupt handler and > deals wi

Re: [PATCH] RFC: dma-fence: Document recoverable page fault implications

2021-01-22 Thread Christian König
Am 21.01.21 um 20:40 schrieb Daniel Vetter: Recently there was a fairly long thread about recoreable hardware page faults, how they can deadlock, and what to do about that. While the discussion is still fresh I figured good time to try and document the conclusions a bit. References: https://na

Re: [PATCH v2 09/15] drm/vc4: hdmi: Split the interrupt handlers

2021-01-22 Thread Dave Stevenson
Hi Maxime On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: > > The BCM2711 has two different interrupt sources to transmit and receive > CEC messages, provided through an external interrupt chip shared between > the two HDMI interrupt controllers. > > The rest of the CEC controller is identical

Re: [PATCH v4 1/3] drm/uapi: Add USB connector type

2021-01-22 Thread Thomas Zimmermann
Hi Am 22.01.21 um 12:44 schrieb Noralf Trønnes: And wrt PCI it wouldn't be a PCI connector if the card has some other connector for the display, but if it was possible to connect a display directly to the PCI connector, then yes I would call that a PCI connector. You're not connecting a displ

[PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Yiwei Zhang
On the success of virtio_gpu_object_create, add size of newly allocated bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem bo loses its last refcount, subtract the bo size from the tracked total_mem if the original underlying memory allocation is successful. It's more accurat

[PATCH v3] drm/virtio: trace total gem bo for virtio

2021-01-22 Thread Yiwei Zhang
From: Yiwei Zhang On the success of virtio_gpu_object_create, add size of newly allocated bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem bo lost its last refcount, subtract the bo size from the tracked total_mem if the original underlying memory allocation is successful.

Re: [PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Yiwei Zhang‎
On Thu, Jan 21, 2021 at 9:40 PM Yiwei Zhang wrote: > > On the success of virtio_gpu_object_create, add size of newly allocated > bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem > bo loses its last refcount, subtract the bo size from the tracked > total_mem if the original

Re: [PATCH v2 08/11] drm: Rename plane->state variables in atomic update and disable

2021-01-22 Thread Ville Syrjälä
On Thu, Jan 21, 2021 at 05:35:33PM +0100, Maxime Ripard wrote: > Some drivers are storing the plane->state pointer in atomic_update and > atomic_disable in a variable simply called state, while the state passed > as an argument is called old_state. > > In order to ease subsequent reworks and to av

Re: [PATCH v2 06/11] drm: Use state helper instead of plane state pointer in atomic_check

2021-01-22 Thread Ville Syrjälä
On Thu, Jan 21, 2021 at 05:35:31PM +0100, Maxime Ripard wrote: > Many drivers reference the plane->state pointer in order to get the > current plane state in their atomic_check hook, which would be the old > plane state in the global atomic state since _swap_state hasn't happened > when atomic_chec

Re: [PATCH v4 1/3] drm/uapi: Add USB connector type

2021-01-22 Thread Noralf Trønnes
Den 22.01.2021 08.54, skrev Thomas Zimmermann: > Hi > > Am 21.01.21 um 19:07 schrieb Noralf Trønnes: >> >> >> Den 21.01.2021 11.01, skrev Thomas Zimmermann: >>> Hi >>> >>> Am 21.01.21 um 09:27 schrieb Daniel Vetter: On Thu, Jan 21, 2021 at 8:45 AM Thomas Zimmermann wrote: > >

Re: [PATCH v6] drm/bridge: add it6505 driver

2021-01-22 Thread Andrzej Hajda
Hi Allen, Sorry for long delay. W dniu 08.12.2020 o 11:58, allen pisze: > This adds support for the iTE IT6505. > This device can convert DPI signal to DP output. > > From: Allen Chen > Signed-off-by: Jitao Shi > Signed-off-by: Pi-Hsun Shih > Signed-off-by: Yilun Lin > Signed-off-by: Hermes W

Re: [PATCH v2 05/15] drm/vc4: hdmi: Restore cec physical address on reconnect

2021-01-22 Thread Dave Stevenson
Hi Maxime Sorry for the slow reply on these patches. On Mon, 11 Jan 2021 at 14:23, Maxime Ripard wrote: > > From: Dom Cobley > > Currently we call cec_phys_addr_invalidate on a hotplug deassert. > That may be due to a TV power cycling, or an AVR being switched > on (and switching edid). > > Thi

Re: [PATCH libdrm] tests/util: Add mxsfb-drm driver

2021-01-22 Thread Lucas Stach
Hi Fabio, I've pushed this patch to the libdrm git repo. Regards, Lucas Am Mittwoch, dem 30.12.2020 um 15:29 -0300 schrieb Fabio Estevam: > Add an entry for the "mxsfb-drm" driver, so that the test utilities > work with the mxsfb driver without passing the -M argument. > > Signed-off-by: Fabio

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:00, Lukasz Luba wrote: On 1/22/21 8:21 AM, Steven Price wrote: On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the go

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 22/01/2021 10:11, Lukasz Luba wrote: On 1/21/21 5:15 PM, Daniel Lezcano wrote: On 21/01/2021 18:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the

Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5

2021-01-22 Thread Dave Stevenson
Hi Maxime. On Thu, 21 Jan 2021 at 10:58, Maxime Ripard wrote: > > From: Dom Cobley > > Fixes failure with 4096x1080 resolutions > > [ 284.315379] WARNING: CPU: 1 PID: 901 at > drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4 > [ 284.315385] Modules linked in: ir_rc5_decode

Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Dave Stevenson
Hi Maxime On Thu, 21 Jan 2021 at 10:58, Maxime Ripard wrote: > > From: Dom Cobley > > LBM base address is measured in units of pixels per cycle. > That is 4 for 2711 (hvs5) and 2 for 2708. > > We are wasting 75% of lbm by indexing without the scaling. > But we were also using too high a size for

Re: [PATCH v4] drm/virtio: Track total GPU memory for virtio driver

2021-01-22 Thread Daniel Vetter
On Thu, Jan 21, 2021 at 11:58:22PM -0800, Yiwei Zhang wrote: > On Thu, Jan 21, 2021 at 9:40 PM Yiwei Zhang wrote: > > > > On the success of virtio_gpu_object_create, add size of newly allocated > > bo to the tracked total_mem. In drm_gem_object_funcs.free, after the gem > > bo loses its last refco

Re: [PATCH 0/3] Experimental freesync video mode optimization

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 10:42:53AM +0100, Daniel Vetter wrote: > On Fri, Jan 22, 2021 at 10:32:48AM +0200, Pekka Paalanen wrote: > > On Tue, 19 Jan 2021 10:50:26 -0500 > > Aurabindo Pillai wrote: > > > > > Changes in V5 > > > = > > > > > > * More info in commit messages on the ration

Re: [PATCH 0/3] Experimental freesync video mode optimization

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 10:32:48AM +0200, Pekka Paalanen wrote: > On Tue, 19 Jan 2021 10:50:26 -0500 > Aurabindo Pillai wrote: > > > Changes in V5 > > = > > > > * More info in commit messages on the rationale of changes being added > > to the kernel. > > * Minor fixes > > Hi, > > t

Re: [PATCH v4 3/3] drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler

2021-01-22 Thread Andrzej Hajda
W dniu 22.01.2021 o 00:33, Dmitry Baryshkov pisze: > drm hotplug handling code (drm_client_dev_hotplug()) can wait on mutex, > thus delaying further lt9611uxc IRQ events processing. It was observed > occasionally during bootups, when drm_client_modeset_probe() was waiting > for EDID ready event, w

Re: [PATCH] drm/i915/selftest: Fix potential memory leak

2021-01-22 Thread Chris Wilson
Quoting Pan Bian (2021-01-22 01:56:40) > Object out is not released on path that no VMA instance found. The root > cause is jumping to an unexpected label on the error path. Wouldn't the root cause be whatever caused the allocation to fail? Language notwithstanding, Reviewed-by: Chris Wilson -Ch

Re: [PATCH v4 2/3] drm/bridge/lontium-lt9611uxc: fix get_edid return code

2021-01-22 Thread Andrzej Hajda
W dniu 22.01.2021 o 00:33, Dmitry Baryshkov pisze: > Return NULL pointer from get_edid() callback rather than ERR_PTR() > pointer, as DRM code does NULL checks rather than IS_ERR(). Also while > we are at it, return NULL if getting EDID timed out. > > Signed-off-by: Dmitry Baryshkov > Fixes: 0cbb

Re: [PATCH v4 1/3] drm/bridge/lontium-lt9611uxc: fix waiting for EDID to become available

2021-01-22 Thread Andrzej Hajda
W dniu 22.01.2021 o 00:33, Dmitry Baryshkov pisze: > - Call wake_up() when EDID ready event is received to wake >wait_event_interruptible_timeout() > > - Increase waiting timeout, reading EDID can take longer than 100ms, so >let's be on a safe side. > > Signed-off-by: Dmitry Baryshkov > F

Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Ryutaroh Matsumoto
Hi Maxime, >> This one should fix your issue >> Feel free to test it and let me know if it's not the case > I confirm that the patches fix the issue I was seeing. I also applied the sent patches [PATCH 1/2] drm/vc4: Correct lbm size and calculation [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 t

[PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Lukasz Luba
The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the governor decision, e.g. how fast to increase the frequency or how rapidly limit the frequency. This patch adds needed governor d

[PATCH] drm/i915/selftest: Fix potential memory leak

2021-01-22 Thread Pan Bian
Object out is not released on path that no VMA instance found. The root cause is jumping to an unexpected label on the error path. Fixes: a47e788c2310 ("drm/i915/selftests: Exercise CS TLB invalidation") Signed-off-by: Pan Bian --- drivers/gpu/drm/i915/selftests/i915_gem_gtt.c | 2 +- 1 file cha

[PATCH v4 1/3] drm/bridge/lontium-lt9611uxc: fix waiting for EDID to become available

2021-01-22 Thread Dmitry Baryshkov
- Call wake_up() when EDID ready event is received to wake wait_event_interruptible_timeout() - Increase waiting timeout, reading EDID can take longer than 100ms, so let's be on a safe side. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC

[PATCH v4 2/3] drm/bridge/lontium-lt9611uxc: fix get_edid return code

2021-01-22 Thread Dmitry Baryshkov
Return NULL pointer from get_edid() callback rather than ERR_PTR() pointer, as DRM code does NULL checks rather than IS_ERR(). Also while we are at it, return NULL if getting EDID timed out. Signed-off-by: Dmitry Baryshkov Fixes: 0cbbd5b1a012 ("drm: bridge: add support for lontium LT9611UXC bridg

[PATCH v2 10/11] drm: Use state helper instead of the plane state pointer

2021-01-22 Thread Maxime Ripard
Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_update or atomic_disable hooks, which would be the new plane state in the global atomic state since _swap_state happened when those hooks are run. Use the drm_atomic_get_new_plane_state helper t

[PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5

2021-01-22 Thread Maxime Ripard
From: Dom Cobley Fixes failure with 4096x1080 resolutions [ 284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4 [ 284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm283

[PATCH v2 05/11] drm: Use the state pointer directly in planes atomic_check

2021-01-22 Thread Maxime Ripard
Now that atomic_check takes the global atomic state as a parameter, we don't need to go through the pointer in the plane state. This was done using the following coccinelle script: @ plane_atomic_func @ identifier helpers; identifier func; @@ static struct drm_plane_helper_funcs helpers = {

[PATCH v2 09/11] drm/atomic: Pass the full state to planes atomic disable and update

2021-01-22 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert the remaining helpers to provide a consistent interfa

[PATCH v2 07/11] drm: Store new plane state in a variable for atomic_update and disable

2021-01-22 Thread Maxime Ripard
In order to store the new plane state in a subsequent helper, let's move the plane->state dereferences into a variable. This was done using the following coccinelle script, plus some hand changes for vmwgfx: @ plane_atomic_func @ identifier helpers; identifier func; @@ ( static const struct drm

[PATCH v2 02/11] drm: Rename plane atomic_check state names

2021-01-22 Thread Maxime Ripard
Most drivers call the argument to the plane atomic_check hook simply state, which is going to conflict with the global atomic state in a later rework. Let's rename it to new_plane_state (or new_state depending on the convention used in the driver). This was done using the coccinelle script below,

Re: possible IO map leak in drm/gem

2021-01-22 Thread Chuck Lever
> On Jan 21, 2021, at 9:47 AM, Thomas Zimmermann wrote: > > (cc'ing dri-devel) > > Hi, > > thanks for reporting the bug. > > Am 21.01.21 um 15:35 schrieb Chuck Lever: >> Hi Thomas- >> I was not able to find an appropriate mailing list entry in MAINTAINERS, > > That would be dri-devel@lists.

[PATCH v4 3/3] drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler

2021-01-22 Thread Dmitry Baryshkov
drm hotplug handling code (drm_client_dev_hotplug()) can wait on mutex, thus delaying further lt9611uxc IRQ events processing. It was observed occasionally during bootups, when drm_client_modeset_probe() was waiting for EDID ready event, which was delayed because IRQ handler was stuck trying to de

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Daniel Lezcano
On 21/01/2021 18:04, Lukasz Luba wrote: > The simple_ondemand devfreq governor uses two thresholds to decide about > the frequency change: upthreshold, downdifferential. These two tunable > change the behavior of the governor decision, e.g. how fast to increase > the frequency or how rapidly limit

[PATCH v2 03/11] drm/atmel-hlcdc: Rename custom plane state variable

2021-01-22 Thread Maxime Ripard
Subsequent reworks will pass the global atomic state in the function prototype, and atomic_check and atomic_update already have such a variable already. Let's change them to ease the rework. Acked-by: Sam Ravnborg Signed-off-by: Maxime Ripard --- .../gpu/drm/atmel-hlcdc/atmel_hlcdc_plane.c |

[PATCH v4 0/3] drm/bridge/lontium-lt9611uxc: fix handling of EDID/HPD

2021-01-22 Thread Dmitry Baryshkov
These three patches provide fixes for HPD handling and EDID readout for Lontium lt9611uxc DSI-to-HDMI bridge driver. Changes since v3: - Protect hdmi_connected using ocm_mutex - Remove !! conversion from int to boolean - Add missing Reviewed-by tags. Changes since v2: - Declare lt9611uxc_hpd_

Re: [PATCH 01/13] powerpc/powernv: remove get_cxl_module

2021-01-22 Thread Andrew Donnellan
On 21/1/21 6:49 pm, Christoph Hellwig wrote: The static inline get_cxl_module function is entirely unused, remove it. Signed-off-by: Christoph Hellwig The one user of this was removed in 8bf6b91a5125a ("Revert "powerpc/powernv: Add support for the cxl kernel api on the real phb"). Thanks f

[PATCH v2 06/11] drm: Use state helper instead of plane state pointer in atomic_check

2021-01-22 Thread Maxime Ripard
Many drivers reference the plane->state pointer in order to get the current plane state in their atomic_check hook, which would be the old plane state in the global atomic state since _swap_state hasn't happened when atomic_check is run. Use the drm_atomic_get_old_plane_state helper to get that st

[PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Maxime Ripard
From: Dom Cobley LBM base address is measured in units of pixels per cycle. That is 4 for 2711 (hvs5) and 2 for 2708. We are wasting 75% of lbm by indexing without the scaling. But we were also using too high a size for the lbm resulting in partial corruption (right hand side) of vertically scal

RE: [PATCH 02/13] module: add a module_loaded helper

2021-01-22 Thread David Laight
> > On Thu, Jan 21, 2021 at 11:00:20AM +0100, Christophe Leroy wrote: > > > +bool module_loaded(const char *name); > > > > Maybe module_is_loaded() would be a better name. > > Fine with me. It does look like both callers aren't 'unsafe'. But it is a bit strange returning a stale value. It did m

Re: [PATCH 02/13] module: add a module_loaded helper

2021-01-22 Thread Christophe Leroy
Le 21/01/2021 à 08:49, Christoph Hellwig a écrit : > Add a helper that takes modules_mutex and uses find_module to check if a > given module is loaded. This provides a better abstraction for the two > callers, and allows to unexport modules_mutex and find_module. > > Signed-off-by: Christoph H

Re: [PATCH] drm: Update todo.rst

2021-01-22 Thread Maxime Ripard
Hi Daniel, On Thu, Jan 21, 2021 at 12:29:19PM +0100, Daniel Vetter wrote: > Interrnship season is starting, let's review this. One thing that's ^ internship > pending is Maxime's work to roll out drm_atomic_state pointers to all > callbacks, he said he'll remove that entry once it's all done.

[PATCH] drm: drm_modes: Fix signed-integer-overflow UBSAN warning

2021-01-22 Thread AngeloGioacchino Del Regno
During a UBSAN run on ARM64 MSM8998, kernel built with GCC 7.5.0, a signed integer overflow was shown. To solve this warning split the multiplication by assigning the mode clock first to the "num" variable and then multiply: this way was chosen because no explicit casting is required. Solves the f

[PATCH v2 01/11] drm/atomic: Pass the full state to planes async atomic check and update

2021-01-22 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's start convert all the remaining helpers to provide a consiste

Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Maxime Ripard
Hi Lucas, Ryutaroh, On Thu, Jan 21, 2021 at 11:57:58AM +0100, Maxime Ripard wrote: > From: Dom Cobley > > LBM base address is measured in units of pixels per cycle. > That is 4 for 2711 (hvs5) and 2 for 2708. > > We are wasting 75% of lbm by indexing without the scaling. > But we were also usin

[PATCH v2 08/11] drm: Rename plane->state variables in atomic update and disable

2021-01-22 Thread Maxime Ripard
Some drivers are storing the plane->state pointer in atomic_update and atomic_disable in a variable simply called state, while the state passed as an argument is called old_state. In order to ease subsequent reworks and to avoid confusing or inconsistent names, let's rename those variables to new_

Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Lucas Nussbaum
Hi Maxime, On 21/01/21 at 12:04 +0100, Maxime Ripard wrote: > Hi Lucas, Ryutaroh, > > On Thu, Jan 21, 2021 at 11:57:58AM +0100, Maxime Ripard wrote: > > From: Dom Cobley > > > > LBM base address is measured in units of pixels per cycle. > > That is 4 for 2711 (hvs5) and 2 for 2708. > > > > We

[PATCH 12/13] drm: msm: Migrate to dev_pm_opp_set_opp()

2021-01-22 Thread Viresh Kumar
dev_pm_opp_set_bw() is getting removed and dev_pm_opp_set_opp() should be used instead. Migrate to the new API. Signed-off-by: Viresh Kumar --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c

Re: [PATCH v2] drm/bridge: lt9611: Fix handling of 4k panels

2021-01-22 Thread Robert Foss
Hi, +Sam Ravnborg I think this patch is ready to get pulled into the drm-misc tree. On Thu, 17 Dec 2020 at 15:09, Robert Foss wrote: > > 4k requires two dsi pipes, so don't report MODE_OK when only a > single pipe is configured. But rather report MODE_PANEL to > signal that requirements of the

Re: [PATCH v16 0/4] RDMA: Add dma-buf support

2021-01-22 Thread Jason Gunthorpe
On Tue, Dec 15, 2020 at 01:27:12PM -0800, Jianxin Xiong wrote: > Jianxin Xiong (4): > RDMA/umem: Support importing dma-buf as user memory region > RDMA/core: Add device method for registering dma-buf based memory > region > RDMA/uverbs: Add uverbs command for dma-buf based MR registration

[PATCH v2 04/11] drm/atomic: Pass the full state to planes atomic_check

2021-01-22 Thread Maxime Ripard
The current atomic helpers have either their object state being passed as an argument or the full atomic state. The former is the pattern that was done at first, before switching to the latter for new hooks or when it was needed. Let's convert all the remaining helpers to provide a consistent int

[PATCH 00/13] opp: Implement dev_pm_opp_set_opp()

2021-01-22 Thread Viresh Kumar
Hello, This patchset implements a new API dev_pm_opp_set_opp(), which configures the devices represented by an opp table to a particular opp. The opp core supports a wide variety of devices now, some of them can change frequency and other properties (like CPUs), while others can just change their

[PATCH v2 11/11] drm/todo: Remove the drm_atomic_state todo item

2021-01-22 Thread Maxime Ripard
Only planes' prepare_fb and cleanup_fb, and encoders' atomic_check and atomic_mode_set hooks remain with an object state and not the global drm_atomic_state. prepare_fb and cleanup_fb operate by design on a given state and depending on the calling site can operate on either the old or new state, s

Re: [PATCH v3 3/3] drm/bridge/lontium-lt9611uxc: move HPD notification out of IRQ handler

2021-01-22 Thread Dmitry Baryshkov
Hello, On Thu, 21 Jan 2021 at 14:45, Andrzej Hajda wrote: > W dniu 17.01.2021 o 01:23, Dmitry Baryshkov pisze: > > drm hotplug handling code (drm_client_dev_hotplug()) can wait on mutex, > > thus delaying further lt9611uxc IRQ events processing. It was observed > > occasionally during bootups, w

Re: [PATCH v2] drm: Introduce a drm_crtc_commit_wait helper

2021-01-22 Thread Maxime Ripard
On Mon, Jan 11, 2021 at 09:44:01AM +0100, Maxime Ripard wrote: > There's currently four users of the same logic to wait for a commit to > be flipped: three for the CRTCs, connectors and planes in > drm_atomic_helper_wait_for_dependencies, and one in vc4. > > Let's consolidate this a bit to avoid a

Re: linux-next: build warning after merge of the drm tree

2021-01-22 Thread Daniel Vetter
On Fri, Jan 22, 2021 at 8:29 AM Stephen Rothwell wrote: > > Hi Daniel, > > On Fri, 22 Jan 2021 08:17:58 +0100 Daniel Vetter wrote: > > > > Hm that has been in drm-intel-gt-next for a few days, is that tree not > > in linux-next? > > It is not. Adding -intel maintainers to get that sorted. -Danie

Re: [PATCH 0/3] Experimental freesync video mode optimization

2021-01-22 Thread Pekka Paalanen
On Tue, 19 Jan 2021 10:50:26 -0500 Aurabindo Pillai wrote: > Changes in V5 > = > > * More info in commit messages on the rationale of changes being added > to the kernel. > * Minor fixes Hi, thank you for adding the explanations in the commit messages I asked for. It is now up to D

Re: [PATCH] drm/ttm: device naming cleanup

2021-01-22 Thread Huang Rui
On Thu, Jan 21, 2021 at 07:58:18PM +0800, Christian König wrote: > Rename ttm_bo_device to ttm_device. > Rename ttm_bo_driver to ttm_device_funcs. > Rename ttm_bo_global to ttm_global. > > Move global and device related functions to ttm_device.[ch]. > > No functional change. > > Signed-off-by: C

Re: [PATCH] drm/panfrost: Add governor data with pre-defined thresholds

2021-01-22 Thread Steven Price
On 21/01/2021 17:04, Lukasz Luba wrote: The simple_ondemand devfreq governor uses two thresholds to decide about the frequency change: upthreshold, downdifferential. These two tunable change the behavior of the governor decision, e.g. how fast to increase the frequency or how rapidly limit the fr

Re: [PATCH v3 3/4] drm/qxl: release shadow on shutdown

2021-01-22 Thread Thomas Zimmermann
Hi Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: In case we have a shadow surface on shutdown release it so it doesn't leak. Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_display.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/

Re: [PATCH v3 2/4] drm/qxl: unpin release objects

2021-01-22 Thread Thomas Zimmermann
Hi Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: Balances the qxl_create_bo(..., pinned=true, ...); call in qxl_release_bo_alloc(). Signed-off-by: Gerd Hoffmann --- drivers/gpu/drm/qxl/qxl_release.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/qxl/qxl_release.c b/drive

Re: [PATCH v3 1/4] drm/qxl: use drmm_mode_config_init

2021-01-22 Thread Thomas Zimmermann
Am 20.01.21 um 12:12 schrieb Gerd Hoffmann: Signed-off-by: Gerd Hoffmann Reviewed-by: Daniel Vetter Acked-by: Thomas Zimmermann --- drivers/gpu/drm/qxl/qxl_display.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/qxl/qxl_display.c b/drivers/g