Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-17 Thread Dan Carpenter
I did this but it's hard to know which places return LONG_MAX and are problematic. This from an allyesconfig but on arm64 so it doesn't warn about the i915 driver. drivers/gpu/drm/tegra/submit.c:541 tegra_drm_ioctl_channel_submit() warn: save dma_fence_wait_timeout() returns to signed long drive

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-14 Thread Dan Carpenter
On Fri, Jul 04, 2025 at 03:00:55PM +0300, Jani Nikula wrote: > On Fri, 04 Jul 2025, Aakash Deep Sarkar wrote: > > dma_fence_wait_timeout returns a long type but the driver is > > only using the lower 32 bits of the retval and discarding the > > upper 32 bits. > > > > This is particularly problemat

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-07 Thread Matthew Brost
On Mon, Jul 07, 2025 at 08:30:02PM +0200, Christian König wrote: > On 07.07.25 20:12, Matthew Brost wrote: > >>> Then it occurs to me this looks like a common mistake to make. A little > >>> bit of git grep on dma_fence_wait_timeout() quickly finds multiple > >>> similar mistakes in drm, at least a

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-07 Thread Christian König
On 07.07.25 20:12, Matthew Brost wrote: >>> Then it occurs to me this looks like a common mistake to make. A little >>> bit of git grep on dma_fence_wait_timeout() quickly finds multiple >>> similar mistakes in drm, at least amdgpu, etnaviv, msm, and tegra. Cc >>> some maintainers FYI. This class o

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-07 Thread Matthew Brost
On Fri, Jul 04, 2025 at 02:27:02PM +0200, Christian König wrote: > On 04.07.25 14:00, Jani Nikula wrote: > > On Fri, 04 Jul 2025, Aakash Deep Sarkar > > wrote: > >> dma_fence_wait_timeout returns a long type but the driver is > >> only using the lower 32 bits of the retval and discarding the > >>

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Christian König
; intel-gfx@lists.freedesktop.org > Cc: Badrappan, Jeevaka ; Ville Syrjälä > ; Maarten Lankhorst > ; Hogander, Jouni > ; Alex Deucher ; Lucas > Stach ; Rob Clark ; > Thierry Reding ; Julia Lawall > ; Dan Carpenter > Subject: Re: [PATCH] drm/i915/display: Change ret value t

RE: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Aakash Deep Sarkar
sts.freedesktop.org Cc: Badrappan, Jeevaka ; Ville Syrjälä ; Maarten Lankhorst ; Hogander, Jouni ; Alex Deucher ; Lucas Stach ; Rob Clark ; Thierry Reding ; Julia Lawall ; Dan Carpenter Subject: Re: [PATCH] drm/i915/display: Change ret value type from int to long On 04.07.25 14:00, Jani Nik

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Jani Nikula
On Fri, 04 Jul 2025, Christian König wrote: > On 04.07.25 14:00, Jani Nikula wrote: >> On Fri, 04 Jul 2025, Aakash Deep Sarkar wrote: >>> dma_fence_wait_timeout returns a long type but the driver is >>> only using the lower 32 bits of the retval and discarding the >>> upper 32 bits. >>> >>> This

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Christian König
On 04.07.25 14:00, Jani Nikula wrote: > On Fri, 04 Jul 2025, Aakash Deep Sarkar wrote: >> dma_fence_wait_timeout returns a long type but the driver is >> only using the lower 32 bits of the retval and discarding the >> upper 32 bits. >> >> This is particularly problematic if there are already sign

Re: [PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Jani Nikula
On Fri, 04 Jul 2025, Aakash Deep Sarkar wrote: > dma_fence_wait_timeout returns a long type but the driver is > only using the lower 32 bits of the retval and discarding the > upper 32 bits. > > This is particularly problematic if there are already signalled > or stub fences on some of the hw plan

[PATCH] drm/i915/display: Change ret value type from int to long

2025-07-04 Thread Aakash Deep Sarkar
dma_fence_wait_timeout returns a long type but the driver is only using the lower 32 bits of the retval and discarding the upper 32 bits. This is particularly problematic if there are already signalled or stub fences on some of the hw planes. In this case the dma_fence_wait_timeout function will i