[PATCH v3 2/3] drm/mgag200: Remove vidrst callbacks from struct mgag200_device_funcs

2024-07-11 Thread Thomas Zimmermann
The callbacks disable_vidrst and enable_vidrst are obsolete. Remove the fields from struct mgag200_device_funcs. Instead call their implementations directly of the field 'has_vidrst' has been set in struct mgag200_device_info. Also change the logic slightly. The BMC used to start and stop scanout

[PATCH v3 0/3] drm/mgag200: Control VIDRST and BMC from CRTC

2024-07-11 Thread Thomas Zimmermann
(was: drm/mgag200: Handle VIDRST from BMC helpers) The VIDRST pin controls CRTC synchronization with an external clock chip, such as a BMC or TV encoder. This patchset separates the CRTC state from the BMC state and streamlines the driver code. v3: - don't clear VIDRST bits unnecessarily (Jocelyn

[PATCH v3 3/3] drm/mgag200: Rename BMC vidrst names

2024-07-11 Thread Thomas Zimmermann
The BMC's scanout synchronization is only indirectly related to the VIDRST functionality. Do some renaming. Signed-off-by: Thomas Zimmermann Reviewed-by: Jocelyn Falempe --- drivers/gpu/drm/mgag200/mgag200_bmc.c| 4 ++-- drivers/gpu/drm/mgag200/mgag200_drv.h| 14 +++--- drivers

[PATCH v3 1/3] drm/mgag200: Only set VIDRST bits in CRTC modesetting

2024-07-11 Thread Thomas Zimmermann
The VRSTEN and HRSTEN bits control whether a CRTC synchronizes its display signal with an external source on the VIDRST pin. The G200WB and G200EW3 models synchronize with a BMC chip, but different external video encoders, such as the Matrox Maven, can also be attached to the pin. Only set VRSTEN

Re: [PATCH v4 07/11] drm/bridge: cdns-dsi: Reset the DCS write FIFO

2024-07-11 Thread Aradhya Bhatia
On 26/06/24 16:33, Tomi Valkeinen wrote: > On 22/06/2024 14:09, Aradhya Bhatia wrote: >> If any normal DCS write command has already been transmitted prior to >> transmitting any Zero-Parameter DCS command, then it is necessary to >> clear the TX FIFO by resetting it. Otherwise, the FIFO points

Re: [PATCH v4 10/11] drm/atomic-helper: Re-order bridge chain pre-enable and post-disable

2024-07-11 Thread Aradhya Bhatia
On 26/06/24 18:37, Maxime Ripard wrote: > On Wed, Jun 26, 2024 at 02:28:57PM GMT, Tomi Valkeinen wrote: >> On 22/06/2024 14:09, Aradhya Bhatia wrote: >>> Move the bridge pre_enable call before crtc enable, and the bridge >>> post_disable call after the crtc disable. >>> >>> The sequence of enabl

Re: [PATCH 2/4] drm/bridge: add Microchip DSI controller support for sam9x7 SoC series

2024-07-11 Thread Manikandan.M
Hi Krzysztof, On 04/07/24 4:27 pm, Krzysztof Kozlowski wrote: > EXTERNAL EMAIL: Do not click links or open attachments unless you know the > content is safe > > On 04/07/2024 10:48, Manikandan Muralidharan wrote: >> Add the Microchip's DSI controller wrapper driver that uses >> the Synopsys Desi

[PATCH] drm/amd/amdgpu: Fix uninitialized variable warnings

2024-07-11 Thread Ma Ke
Return 0 to avoid returning an uninitialized variable r. Fixes: 230dd6bb6117 ("drm/amd/amdgpu: implement mode2 reset on smu_v13_0_10") Signed-off-by: Ma Ke --- drivers/gpu/drm/amd/amdgpu/smu_v13_0_10.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

Re: [PATCH 04/12] drm/v3d: Validate passed in drm syncobj handles in the timestamp extension

2024-07-11 Thread Tvrtko Ursulin
On 10/07/2024 18:06, Maíra Canal wrote: On 7/10/24 10:41, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfuly or other

Re: [PATCH v2 8/8] arm64: dts: qcom: add OnePlus 8T (kebab)

2024-07-11 Thread Konrad Dybcio
On 30.06.2024 8:36 PM, Caleb Connolly wrote: > Initial support for USB, UFS, touchscreen, panel, wifi, and bluetooth. > > Co-developed-by: Frieder Hannenheim > Signed-off-by: Frieder Hannenheim > Signed-off-by: Caleb Connolly > --- [...] > +/delete-node/ &spss_mem; > +/delete-node/ &cdsp_secu

Re: [PATCH 09/12] drm/v3d: Move perfmon init completely into own unit

2024-07-11 Thread Tvrtko Ursulin
On 10/07/2024 18:38, Maíra Canal wrote: On 7/10/24 10:41, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Now that the build time dependencies on various array sizes have been removed, we can move the perfmon init completely into its own compilation unit and remove the hardcoded defines. This im

Re: [PATCH 1/2] dma-buf: heaps: DMA_HEAP_IOCTL_ALLOC_READ_FILE framework

2024-07-11 Thread Christian König
Am 11.07.24 um 09:42 schrieb Huan Yang: Some user may need load file into dma-buf, current way is: 1. allocate a dma-buf, get dma-buf fd 2. mmap dma-buf fd into vaddr 3. read(file_fd, vaddr, fsz) This is too heavy if fsz reached to GB. You need to describe a bit more why that is to hea

Re: [PATCH 2/4] drm/bridge: add Microchip DSI controller support for sam9x7 SoC series

2024-07-11 Thread Krzysztof Kozlowski
On 11/07/2024 10:30, manikanda...@microchip.com wrote: > Hi Krzysztof, > > On 04/07/24 4:27 pm, Krzysztof Kozlowski wrote: >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the >> content is safe >> >> On 04/07/2024 10:48, Manikandan Muralidharan wrote: >>> Add the Microch

Re: [PATCH 11/12] drm/v3d: Add some local variables in queries/extensions

2024-07-11 Thread Tvrtko Ursulin
On 10/07/2024 18:43, Maíra Canal wrote: On 7/10/24 10:41, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Add some local variables to make the code a bit less verbose, with the main benefit being pulling some lines to under 80 columns wide. Signed-off-by: Tvrtko Ursulin I'd prefer `query_info

[PATCH 01/11] drm/v3d: Prevent out of bounds access in performance query extensions

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Check that the number of perfmons userspace is passing in the copy and reset extensions is not greater than the internal kernel storage where the ids will be copied into. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3d: Create a CPU job extension for the reset

[PATCH 04/11] drm/v3d: Validate passed in drm syncobj handles in the timestamp extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko

[PATCH 02/11] drm/v3d: Fix potential memory leak in the timestamp extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: 9ba0ff3e083f ("drm/v3

[PATCH 03/11] drm/v3d: Fix potential memory leak in the performance extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3

[PATCH 05/11] drm/v3d: Validate passed in drm syncobj handles in the performance extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfuly or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko U

[PATCH v3 00/11] v3d: Perfmon cleanup

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin When we had to quickly deal with a tree build issue via merging 792d16b5375d ("drm/v3d: Move perfmon init completely into own unit"), we promised to follow up with a nicer solution. As in the process of eliminating the hardcoded defines we have discovered a few issues in han

[PATCH 07/11] drm/v3d: Size the kperfmon_ids array at runtime

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Instead of statically reserving pessimistic space for the kperfmon_ids array, make the userspace extension code allocate the exactly required amount of space. Apart from saving some memory at runtime, this also removes the need for the V3D_MAX_PERFMONS macro whose removal wi

[PATCH 08/11] drm/v3d: Do not use intermediate storage when copying performance query results

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Removing the intermediate buffer removes the last use of the V3D_MAX_COUNTERS define, which will enable further driver cleanup. While at it pull the 32 vs 64 bit copying decision outside the loop in order to reduce the number of conditional instructions. Signed-off-by: Tvrt

[PATCH 06/11] drm/v3d: Move part of copying of reset/copy performance extension to a helper

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin The loop which looks up the syncobj and copies the kperfmon ids is identical so lets move it to a helper. The only change is replacing copy_from_user with get_user when copying a scalar. Signed-off-by: Tvrtko Ursulin --- drivers/gpu/drm/v3d/v3d_submit.c | 152

[PATCH 09/11] drm/v3d: Move perfmon init completely into own unit

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that the build time dependencies on various array sizes have been removed, we can move the perfmon init completely into its own compilation unit and remove the hardcoded defines. This improves on the temporary fix quickly delivered in 9c3951ec27b9 ("drm/v3d: Fix perfmon

[PATCH 11/11] drm/v3d: Add some local variables in queries/extensions

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Add some local variables to make the code a bit less verbose, with the main benefit being pulling some lines to under 80 columns wide. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_submit.c | 88 ++-- 1 file

[PATCH 10/11] drm/v3d: Prefer get_user for scalar types

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin It makes it just a tiny bit more obvious what is going on. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_submit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers

[PATCH] drm/ast: add multiple connectors support

2024-07-11 Thread oushixiong1025
From: Shixiong Ou [WHY] The AST2600 tx_chip_types will be detected as AST_TX_DP, but some BMC boards that use AST2600 use the VGA interface instead of the DP interface. In this case, it will use Virtual connector as the DP is disconnected. [HOW] Allows multiple physical connectors to exist at th

Re: [PATCH v2 5/6] drm/dp: Add helper to dump an LTTPR PHY descriptor

2024-07-11 Thread Nautiyal, Ankit K
LGTM Reviewed-by: Ankit Nautiyal On 7/9/2024 12:30 AM, Imre Deak wrote: Add a helper to dump the DPCD descriptor for an LTTPR PHY. This is based on [1] and [2] moving the helper to DRM core as suggested by Ville. [1] https://lore.kernel.org/all/20240703155937.1674856-5-imre.d...@intel.com [2]

[PULL] drm-misc-fixes

2024-07-11 Thread Maarten Lankhorst
Hi Dave, Sima, Few fixes for v6.10. :) Cheers, ~Maarten drm-misc-fixes-2024-07-11: drm-misc-fixes for v6.10: - EDID irq fix for bridge/adv7511. - gma500 null mode fixes. - Cleanup meson binding. The following changes since commit 256abd8e550ce977b728be79a74e1729438b4948: Linux 6.10-rc7 (2024-

Re: [PATCH 2/4] drm/bridge: add Microchip DSI controller support for sam9x7 SoC series

2024-07-11 Thread Conor Dooley
On Thu, Jul 11, 2024 at 11:05:37AM +0200, Krzysztof Kozlowski wrote: > On 11/07/2024 10:30, manikanda...@microchip.com wrote: > > Hi Krzysztof, > > > > On 04/07/24 4:27 pm, Krzysztof Kozlowski wrote: > >> EXTERNAL EMAIL: Do not click links or open attachments unless you know the > >> content is s

[PATCH 0/4] fixes for Adreno A5Xx preemption

2024-07-11 Thread Vladimir Lypak
There are several issues with preemption on Adreno A5XX GPUs which render system unusable if more than one priority level is used. Those issues include persistent GPU faults and hangs, full UI lockups with idling GPU. --- Vladimir Lypak (4): drm/msm/a5xx: disable preemption in submits by default

[PATCH 1/4] drm/msm/a5xx: disable preemption in submits by default

2024-07-11 Thread Vladimir Lypak
Fine grain preemption (switching from/to points within submits) requires extra handling in command stream of those submits, especially when rendering with tiling (using GMEM). However this handling is missing at this point in mesa (and always was). For this reason we get random GPU faults and hangs

Re: [PATCH] drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8

2024-07-11 Thread Tvrtko Ursulin
On 11/07/2024 06:12, Nitin Gote wrote: We're seeing a GPU HANG issue on a CHV platform, which was caused by bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for gen8"). Gen8 platform has only timeslice and doesn't support a preemption mechanism as engines do not have a p

[PATCH 2/4] drm/msm/a5xx: properly clear preemption records on resume

2024-07-11 Thread Vladimir Lypak
Two fields of preempt_record which are used by CP aren't reset on resume: "data" and "info". This is the reason behind faults which happen when we try to switch to the ring that was active last before suspend. In addition those faults can't be recovered from because we use suspend and resume to do

[PATCH 3/4] drm/msm/a5xx: fix races in preemption evaluation stage

2024-07-11 Thread Vladimir Lypak
On A5XX GPUs when preemption is used it's invietable to enter a soft lock-up state in which GPU is stuck at empty ring-buffer doing nothing. This appears as full UI lockup and not detected as GPU hang (because it's not). This happens due to not triggering preemption when it was needed. Sometimes th

[PATCH 4/4] drm/msm/a5xx: workaround early ring-buffer emptiness check

2024-07-11 Thread Vladimir Lypak
There is another cause for soft lock-up of GPU in empty ring-buffer: race between GPU executing last commands and CPU checking ring for emptiness. On GPU side IRQ for retire is triggered by CACHE_FLUSH_TS event and RPTR shadow (which is used to check ring emptiness) is updated a bit later from CP_C

Re: [PATCH 2/4] drm/bridge: add Microchip DSI controller support for sam9x7 SoC series

2024-07-11 Thread Manikandan.M
On 11/07/24 3:28 pm, Conor Dooley wrote: > On Thu, Jul 11, 2024 at 11:05:37AM +0200, Krzysztof Kozlowski wrote: >> On 11/07/2024 10:30,manikanda...@microchip.com wrote: >>> Hi Krzysztof, >>> >>> On 04/07/24 4:27 pm, Krzysztof Kozlowski wrote: EXTERNAL EMAIL: Do not click links or open attachm

Re: [PATCH v4 5/6] fbdev/smscufx: Make I2C terminology more inclusive

2024-07-11 Thread Helge Deller
On 7/11/24 07:27, Easwar Hariharan wrote: I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage e

Re: [PATCH v4 6/6] fbdev/viafb: Make I2C terminology more inclusive

2024-07-11 Thread Helge Deller
On 7/11/24 07:27, Easwar Hariharan wrote: I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, fix the terminology for users of I2C_ALGOBIT bitbanging interface, now that the approved verbiage e

Re: [PATCH] media: videobuf2: sync caches for dmabuf memory

2024-07-11 Thread Tomasz Figa
On Thu, Jun 20, 2024 at 3:52 PM Hans Verkuil wrote: > > On 19/06/2024 06:19, Tomasz Figa wrote: > > On Wed, Jun 19, 2024 at 1:24 AM Nicolas Dufresne > > wrote: > >> > >> Le mardi 18 juin 2024 à 16:47 +0900, Tomasz Figa a écrit : > >>> Hi TaoJiang, > >>> > >>> On Tue, Jun 18, 2024 at 4:30 PM TaoJ

Re: [PATCH 2/4] drm/msm/a5xx: properly clear preemption records on resume

2024-07-11 Thread Konrad Dybcio
On 11.07.2024 12:00 PM, Vladimir Lypak wrote: > Two fields of preempt_record which are used by CP aren't reset on > resume: "data" and "info". This is the reason behind faults which happen > when we try to switch to the ring that was active last before suspend. > In addition those faults can't be r

Re: [PATCH] drm/rockchip: cdn-dp: Remove redundant workarounds for firmware loading

2024-07-11 Thread Maxime Ripard
On Wed, Jul 10, 2024 at 04:22:12PM GMT, Dragan Simic wrote: > Hello Maxime, > > On 2024-07-10 09:13, Maxime Ripard wrote: > > On Tue, Jul 09, 2024 at 06:36:08PM GMT, Dragan Simic wrote: > > > > > > > As I already wrote earlier, and as the above-linked discussions > > > > > > > conclude, solving th

Re: [PATCH v4 3/6] drm/i915: Make I2C terminology more inclusive

2024-07-11 Thread Andi Shyti
Hi Easwar, On Thu, Jul 11, 2024 at 05:27:31AM +, Easwar Hariharan wrote: > I2C v7, SMBus 3.2, and I3C 1.1.1 specifications have replaced "master/slave" > with more appropriate terms. Inspired by Wolfram's series to fix drivers/i2c/, > fix the terminology for users of I2C_ALGOBIT bitbanging int

[PATCH] drm/bridge-connector: Fix double free in error handling paths

2024-07-11 Thread Cristian Ciocaltea
; + if (ret) return ERR_PTR(ret); - } drm_connector_helper_add(connector, &drm_bridge_connector_helper_funcs); --- base-commit: 1eb586a9782cde8e5091b9de74603e0a8386b09e change-id: 20240711-bridge-connector-fix-dbl-free-9dd324f0b270

Re: [PATCH 1/2] dma-buf: heaps: DMA_HEAP_IOCTL_ALLOC_READ_FILE framework

2024-07-11 Thread Christian König
Am 11.07.24 um 11:18 schrieb Huan Yang: Hi Christian, Thanks for your reply. 在 2024/7/11 17:00, Christian König 写道: Am 11.07.24 um 09:42 schrieb Huan Yang: Some user may need load file into dma-buf, current way is:    1. allocate a dma-buf, get dma-buf fd    2. mmap dma-buf fd into vaddr    3

[PULL] drm-misc-next-fixes

2024-07-11 Thread Maxime Ripard
Hi, Here's this week drm-misc-next-fixes PR Thanks! Maxime drm-misc-next-fixes-2024-07-11: A fix for fbdev on big endian systems, a condition fix for a sharp panel at removal, and a fix for qxl to prevent unpinned buffer access under certain conditions. The following changes since commit 896868e

Re: [PATCH v1] drm/ci: uprev IGT

2024-07-11 Thread Helen Koike
On 04/07/2024 06:22, Vignesh Raman wrote: Uprev IGT to the latest version, which includes a fix for the writeback tests issue on MSM devices. Enable debugging for igt-runner to log output such as 'Begin test' and 'End test'. This will help identify which test causes system freeze or hangs. Upd

Re: [PATCH 4/7] drm/ttm: move LRU walk defines into new internal header

2024-07-11 Thread Christian König
Am 10.07.24 um 20:19 schrieb Matthew Brost: On Wed, Jul 10, 2024 at 02:42:58PM +0200, Christian König wrote: That is something drivers really shouldn't mess with. Thomas uses this in Xe to implement a shrinker [1]. Seems to need to remain available for drivers. No, that is exactly what I try

Re: [PATCH 11/12] drm/v3d: Do not use intermediate storage when copying performance query results

2024-07-11 Thread Iago Toral
El mar, 09-07-2024 a las 17:34 +0100, Tvrtko Ursulin escribió: > From: Tvrtko Ursulin > > Removing the intermediate buffer removes the last use of the > V3D_MAX_COUNTERS define, which will enable further driver cleanup. > > While at it pull the 32 vs 64 bit copying decision outside the loop > in

Re: [PATCH 0/8] dma-buf: heaps: Support carved-out heaps and ECC related-flags

2024-07-11 Thread Thierry Reding
On Wed, Jul 10, 2024 at 02:10:09PM GMT, Maxime Ripard wrote: > On Fri, Jul 05, 2024 at 04:31:34PM GMT, Thierry Reding wrote: > > On Thu, Jul 04, 2024 at 02:24:49PM GMT, Maxime Ripard wrote: > > > On Fri, Jun 28, 2024 at 04:42:35PM GMT, Thierry Reding wrote: > > > > On Fri, Jun 28, 2024 at 03:08:46P

Re: [Linaro-mm-sig] Re: [PATCH 0/8] dma-buf: heaps: Support carved-out heaps and ECC related-flags

2024-07-11 Thread Thierry Reding
On Mon, Jul 08, 2024 at 09:14:14AM GMT, Christian König wrote: > Am 05.07.24 um 17:35 schrieb Daniel Vetter: > > Just figured I'll jump in on one detail here. > > > > On Fri, Jul 05, 2024 at 04:31:34PM +0200, Thierry Reding wrote: > > > On Thu, Jul 04, 2024 at 02:24:49PM GMT, Maxime Ripard wrote:

Re: [PATCH 11/12] drm/v3d: Do not use intermediate storage when copying performance query results

2024-07-11 Thread Tvrtko Ursulin
On 11/07/2024 13:31, Iago Toral wrote: El mar, 09-07-2024 a las 17:34 +0100, Tvrtko Ursulin escribió: From: Tvrtko Ursulin Removing the intermediate buffer removes the last use of the V3D_MAX_COUNTERS define, which will enable further driver cleanup. While at it pull the 32 vs 64 bit copyin

Re: [PATCH 03/11] drm/v3d: Fix potential memory leak in the performance extension

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tv

Re: [PATCH 02/11] drm/v3d: Fix potential memory leak in the timestamp extension

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tv

Re: [PATCH 03/11] drm/v3d: Fix potential memory leak in the performance extension

2024-07-11 Thread Tvrtko Ursulin
On 11/07/2024 14:00, Maíra Canal wrote: On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using

Re: [PATCH 04/11] drm/v3d: Validate passed in drm syncobj handles in the timestamp extension

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into th

Re: [DO NOT MERGE v8 20/36] serial: sh-sci: fix SH4 OF support.

2024-07-11 Thread John Paul Adrian Glaubitz
Hi Yoshinori, On Wed, 2024-05-29 at 17:01 +0900, Yoshinori Sato wrote: > - Separated RZ's earlycon initialization from normal SCIF. > - fix earlyprintk hung (NULL pointer reference). > - fix SERIAL_SH_SCI_EARLYCON enablement I feel like this could actually be split into three patches. Adrian >

Re: [PATCH 05/11] drm/v3d: Validate passed in drm syncobj handles in the performance extension

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfuly or otherwise fail the extension by jumping into the

Re: [PATCH 06/11] drm/v3d: Move part of copying of reset/copy performance extension to a helper

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin The loop which looks up the syncobj and copies the kperfmon ids is identical so lets move it to a helper. The only change is replacing copy_from_user with get_user when copying a scalar. Signed-off-by: Tvrtko Ursulin Reviewed-by:

Re: [PATCH 07/11] drm/v3d: Size the kperfmon_ids array at runtime

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Instead of statically reserving pessimistic space for the kperfmon_ids array, make the userspace extension code allocate the exactly required amount of space. Apart from saving some memory at runtime, this also removes the need for t

Re: [PATCH 08/11] drm/v3d: Do not use intermediate storage when copying performance query results

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Removing the intermediate buffer removes the last use of the V3D_MAX_COUNTERS define, which will enable further driver cleanup. While at it pull the 32 vs 64 bit copying decision outside the loop in order to reduce the number of cond

Re: [PATCH 09/11] drm/v3d: Move perfmon init completely into own unit

2024-07-11 Thread Maíra Canal
On 7/11/24 06:15, Tvrtko Ursulin wrote: From: Tvrtko Ursulin Now that the build time dependencies on various array sizes have been removed, we can move the perfmon init completely into its own compilation unit and remove the hardcoded defines. This improves on the temporary fix quickly deliver

[PATCH v4 00/11] v3d: Perfmon cleanup

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin When we had to quickly deal with a tree build issue via merging 792d16b5375d ("drm/v3d: Move perfmon init completely into own unit"), we promised to follow up with a nicer solution. As in the process of eliminating the hardcoded defines we have discovered a few issues in han

[PATCH 01/11] drm/v3d: Prevent out of bounds access in performance query extensions

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Check that the number of perfmons userspace is passing in the copy and reset extensions is not greater than the internal kernel storage where the ids will be copied into. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3d: Create a CPU job extension for the reset

[PATCH 02/11] drm/v3d: Fix potential memory leak in the timestamp extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: 9ba0ff3e083f ("drm/v3

[PATCH 03/11] drm/v3d: Fix potential memory leak in the performance extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If fetching of userspace memory fails during the main loop, all drm sync objs looked up until that point will be leaked because of the missing drm_syncobj_put. Fix it by exporting and using a common cleanup helper. Signed-off-by: Tvrtko Ursulin Fixes: bae7cb5d6800 ("drm/v3

[PATCH 04/11] drm/v3d: Validate passed in drm syncobj handles in the timestamp extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko

[PATCH 10/11] drm/v3d: Prefer get_user for scalar types

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin It makes it just a tiny bit more obvious what is going on. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_submit.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/v3d/v3d_submit.c b/drivers

[PATCH 07/11] drm/v3d: Size the kperfmon_ids array at runtime

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Instead of statically reserving pessimistic space for the kperfmon_ids array, make the userspace extension code allocate the exactly required amount of space. Apart from saving some memory at runtime, this also removes the need for the V3D_MAX_PERFMONS macro whose removal wi

[PATCH 06/11] drm/v3d: Move part of copying of reset/copy performance extension to a helper

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin The loop which looks up the syncobj and copies the kperfmon ids is identical so lets move it to a helper. The only change is replacing copy_from_user with get_user when copying a scalar. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_s

[PATCH 08/11] drm/v3d: Do not use intermediate storage when copying performance query results

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Removing the intermediate buffer removes the last use of the V3D_MAX_COUNTERS define, which will enable further driver cleanup. While at it pull the 32 vs 64 bit copying decision outside the loop in order to reduce the number of conditional instructions. Signed-off-by: Tvrt

[PATCH 09/11] drm/v3d: Move perfmon init completely into own unit

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Now that the build time dependencies on various array sizes have been removed, we can move the perfmon init completely into its own compilation unit and remove the hardcoded defines. This improves on the temporary fix quickly delivered in commit 9c3951ec27b9 ("drm/v3d: Fix p

[PATCH 05/11] drm/v3d: Validate passed in drm syncobj handles in the performance extension

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin If userspace provides an unknown or invalid handle anywhere in the handle array the rest of the driver will not handle that well. Fix it by checking handle was looked up successfully or otherwise fail the extension by jumping into the existing unwind. Signed-off-by: Tvrtko

[PATCH 11/11] drm/v3d: Add some local variables in queries/extensions

2024-07-11 Thread Tvrtko Ursulin
From: Tvrtko Ursulin Add some local variables to make the code a bit less verbose, with the main benefit being pulling some lines to under 80 columns wide. Signed-off-by: Tvrtko Ursulin Reviewed-by: Maíra Canal --- drivers/gpu/drm/v3d/v3d_submit.c | 88 ++-- 1 file

Re: [PATCH 0/2] Support direct I/O read and write for memory allocated by dmabuf

2024-07-11 Thread Christian König
Am 10.07.24 um 18:34 schrieb T.J. Mercier: On Wed, Jul 10, 2024 at 8:08 AM Lei Liu wrote: on 2024/7/10 22:48, Christian König wrote: Am 10.07.24 um 16:35 schrieb Lei Liu: on 2024/7/10 22:14, Christian König wrote: Am 10.07.24 um 15:57 schrieb Lei Liu: Use vm_insert_page to establish a mappi

[PATCH] drm/v3d: Expose memory stats through fdinfo

2024-07-11 Thread Maíra Canal
Use the common DRM function `drm_show_memory_stats()` to expose standard fdinfo memory stats. V3D exposes global GPU memory stats through debugfs. Those stats will be preserved while the DRM subsystem doesn't have a standard solution to expose global GPU stats. Signed-off-by: Maíra Canal --- *

Re: [PATCH] drm/ast: add multiple connectors support

2024-07-11 Thread Thomas Zimmermann
Hi Am 11.07.24 um 11:01 schrieb oushixiong1...@163.com: From: Shixiong Ou [WHY] The AST2600 tx_chip_types will be detected as AST_TX_DP, but some BMC boards that use AST2600 use the VGA interface instead of the DP interface. In this case, it will use Virtual connector as the DP is disconnected

XDC 2024: Registration & Call for Proposals now open!

2024-07-11 Thread Mark Filion
Hello! Registration & Call for Proposals are now open for XDC 2024, which will take place at the Concordia University Conference Centre in Montréal, Canada on October 9 to 11. New this year: XDC 2024 will feature two full days dedicated to talks followed by a day dedicated to workshops, meetings

[PULL] drm-xe-next-fixes v2

2024-07-11 Thread Rodrigo Vivi
Hi Dave and Sima, This is a v2 of https://lore.kernel.org/intel-xe/zo2so4t32dxqy...@intel.com/ v2 - Removed Thomas' write-back caching mode patch since Lucas will propagete that through drm-xe-fixes towards 6.10. So we remove the amount of patch duplication. Again, it is important to highlight t

Re: [PATCH net-next v16 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-07-11 Thread Mina Almasry
On Wed, Jul 10, 2024 at 5:44 PM John Hubbard wrote: > > On 7/9/24 5:17 PM, Mina Almasry wrote: > ... > > diff --git a/tools/testing/selftests/net/Makefile > > b/tools/testing/selftests/net/Makefile > > index bc3925200637c..39420a6e86b7f 100644 > > --- a/tools/testing/selftests/net/Makefile > > ++

Re: [PATCH v2 1/2] drm: bridge: samsung-dsim: Initialize bridge on attach

2024-07-11 Thread Marek Vasut
On 6/26/24 10:02 AM, Michael Walle wrote: On Wed Jun 26, 2024 at 5:21 AM CEST, Marek Vasut wrote: Thank you for testing and keeping up with this. I will wait for more feedback if there is any (Frieder? Lucas? Michael?). If there are no objections, then I can merge it in a week or two ? I'll tr

Re: [PATCH 4/7] drm/ttm: move LRU walk defines into new internal header

2024-07-11 Thread Matthew Brost
On Thu, Jul 11, 2024 at 02:01:00PM +0200, Christian König wrote: > Am 10.07.24 um 20:19 schrieb Matthew Brost: > > On Wed, Jul 10, 2024 at 02:42:58PM +0200, Christian König wrote: > > > That is something drivers really shouldn't mess with. > > > > > Thomas uses this in Xe to implement a shrinker [

Re: [PATCH v2 1/2] drm: bridge: samsung-dsim: Initialize bridge on attach

2024-07-11 Thread Marek Szyprowski
On 11.07.2024 17:38, Marek Vasut wrote: > On 6/26/24 10:02 AM, Michael Walle wrote: >> On Wed Jun 26, 2024 at 5:21 AM CEST, Marek Vasut wrote: >>> Thank you for testing and keeping up with this. I will wait for more >>> feedback if there is any (Frieder? Lucas? Michael?). If there are no >>> object

[PATCH v3] drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8

2024-07-11 Thread Nitin Gote
We're seeing a GPU HANG issue on a CHV platform, which was caused by bac24f59f454 ("drm/i915/execlists: Enable coarse preemption boundaries for gen8"). Gen8 platform has only timeslice and doesn't support a preemption mechanism as engines do not have a preemption timer and doesn't send an irq if

Re: [PATCH] drm/atomic: allow no-op FB_ID updates for async flips

2024-07-11 Thread André Almeida
Hi Simon, thanks for the fix! Em 29/06/2024 12:22, Simon Ser escreveu: User-space is allowed to submit any property in an async flip as long as the value doesn't change. However we missed one case: as things stand, the kernel rejects no-op FB_ID changes on non-primary planes. Fix this by changin

RE: [PATCH v3] drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8

2024-07-11 Thread Cavitt, Jonathan
-Original Message- From: Intel-gfx On Behalf Of Nitin Gote Sent: Thursday, July 11, 2024 9:32 AM To: Wilson, Chris P ; tursu...@ursulin.net; intel-...@lists.freedesktop.org Cc: dri-devel@lists.freedesktop.org; Shyti, Andi ; Das, Nirmoy ; janusz.krzyszto...@linux.intel.com; Gote, Nitin

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-11 Thread Liviu Dudau
On Wed, Jul 10, 2024 at 07:50:06PM -0300, Daniel Almeida wrote: > Dump the state of the GPU. This feature is useful for debugging purposes. > --- > Hi everybody! Hi Daniel, I know this is an RFC, but are you trying to avoid Cc-ing Panthor maintainers by mistake or by choice? I will be away on sab

Re: [PATCH] drm/panel-edp: Add BOE NV140WUM-N41

2024-07-11 Thread Doug Anderson
Hi, On Wed, Jul 10, 2024 at 12:02 PM Hsin-Yi Wang wrote: > > The raw edid of the panel is: > 00 ff ff ff ff ff ff 00 09 e5 e8 0a 00 00 00 00 > 2a 1f 01 04 a5 1e 13 78 03 fb f5 96 5d 5a 91 29 > 1e 50 54 00 00 00 01 01 01 01 01 01 01 01 01 01 > 01 01 01 01 01 01 9c 3e 80 c8 70 b0 3c 40 30 20 > 36 0

Re: [PATCH] drm/v3d: Expose memory stats through fdinfo

2024-07-11 Thread Tvrtko Ursulin
On 11/07/2024 15:25, Maíra Canal wrote: Use the common DRM function `drm_show_memory_stats()` to expose standard fdinfo memory stats. V3D exposes global GPU memory stats through debugfs. Those stats will be preserved while the DRM subsystem doesn't have a standard solution to expose global GPU

[PATCH] drm/nouveau: Improve variable names in nouveau_sched_init()

2024-07-11 Thread Philipp Stanner
nouveau_sched_init() uses the function drm_sched_init(). The latter function has parameters called "hang_limit" and "timeout" in its API documentation. nouveau_sched_init(), however, defines a variable called "job_hang_limit" which is passed to drm_sched_init()'s "timeout" parameter. The actual "h

[PATCH v3 1/1] drm/loongson: Introduce component framework support

2024-07-11 Thread Sui Jingfeng
In some display subsystems, the functionality of a PCIe device may too complex to be managed by a single driver. A split of the functionality into child devices can help to achieve better modularity. For example, KMS drivers who has a dependency on external modules will suffer from the deferral pro

[PATCH v3 0/1]drm/loongson: Introduce component framework support

2024-07-11 Thread Sui Jingfeng
In some display subsystems, the functionality of a PCIe device may too complex to be managed by a single driver. A split of the functionality into child devices can help to achieve better modularity. For example, KMS drivers who has a dependency on external modules will suffer from the deferral pro

Re: [PATCH 2/2] drm/msm/dpu: don't play tricks with debug macros

2024-07-11 Thread Abhinav Kumar
On 7/10/2024 12:40 AM, Dmitry Baryshkov wrote: On Tue, 9 Jul 2024 at 22:39, Abhinav Kumar wrote: On 7/9/2024 6:48 AM, Dmitry Baryshkov wrote: DPU debugging macros need to be converted to a proper drm_debug_* macros, however this is a going an intrusive patch, not suitable for a fix. Wire

Re: [PATCH] drm/nouveau: Improve variable names in nouveau_sched_init()

2024-07-11 Thread Danilo Krummrich
On Thu, Jul 11, 2024 at 07:35:51PM +0200, Philipp Stanner wrote: > nouveau_sched_init() uses the function drm_sched_init(). The latter > function has parameters called "hang_limit" and "timeout" in its API > documentation. > > nouveau_sched_init(), however, defines a variable called > "job_hang_li

Re: [PATCH v3] drm/i915/gt: Do not consider preemption during execlists_dequeue for gen8

2024-07-11 Thread Rodrigo Vivi
On Thu, Jul 11, 2024 at 04:28:53PM +, Cavitt, Jonathan wrote: > -Original Message- > From: Intel-gfx On Behalf Of Nitin > Gote > Sent: Thursday, July 11, 2024 9:32 AM > To: Wilson, Chris P ; tursu...@ursulin.net; > intel-...@lists.freedesktop.org > Cc: dri-devel@lists.freedesktop.org

Re: [PATCH] agp: uninorth: add missing MODULE_DESCRIPTION() macro

2024-07-11 Thread Jeff Johnson
On 6/28/24 20:14, Jeff Johnson wrote: On 6/15/2024 2:01 PM, Jeff Johnson wrote: With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/uninorth-agp.o Add the missing invocation of the MODULE_DESCRIPTION() macro. Signed-

Re: [PATCH net-next v16 12/13] selftests: add ncdevmem, netcat for devmem TCP

2024-07-11 Thread John Hubbard
On 7/11/24 8:28 AM, Mina Almasry wrote: On Wed, Jul 10, 2024 at 5:44 PM John Hubbard wrote: On 7/9/24 5:17 PM, Mina Almasry wrote: ... diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index bc3925200637c..39420a6e86b7f 100644 --- a/tools/testing/selfte

Re: [RFC PATCH] drm: panthor: add dev_coredumpv support

2024-07-11 Thread Daniel Almeida
Hi Liviu, > Hi Daniel, > > I know this is an RFC, but are you trying to avoid Cc-ing Panthor maintainers > by mistake or by choice? I will be away on sabbatical from next week, but > Steven Price at least would be interested in having a look. Definitely by mistake. Boris is my coworker, but ever

Re: ✓ Fi.CI.IGT: success for drm/i915/dp: Fix LTTPR detection (rev2)

2024-07-11 Thread Imre Deak
On Tue, Jul 09, 2024 at 11:12:26AM +, Patchwork wrote: > == Series Details == > > Series: drm/i915/dp: Fix LTTPR detection (rev2) > URL : https://patchwork.freedesktop.org/series/135711/ > State : success Thanks for the reviews, pushed patches 1-4 to drm-intel-next, patch 5 to drm-misc-next

Re: [PATCH] agp: uninorth: add missing MODULE_DESCRIPTION() macro

2024-07-11 Thread Jeffrey Hugo
On 7/11/2024 12:19 PM, Jeff Johnson wrote: On 6/28/24 20:14, Jeff Johnson wrote: On 6/15/2024 2:01 PM, Jeff Johnson wrote: With ARCH=powerpc, make allmodconfig && make W=1 C=1 reports: WARNING: modpost: missing MODULE_DESCRIPTION() in drivers/char/agp/uninorth-agp.o Add the missing invocatio

  1   2   >