Re: [PATCH 00/13] drm: Fix reservation locking for pin/unpin and console

2024-02-28 Thread Christian König
Am 27.02.24 um 19:14 schrieb Dmitry Osipenko: Hello, Thank you for the patches! On 2/27/24 13:14, Thomas Zimmermann wrote: Dma-buf locking semantics require the caller of pin and unpin to hold the buffer's reservation lock. Fix DRM to adhere to the specs. This enables to fix the locking in DRM

Re: [PATCH 00/13] drm: Fix reservation locking for pin/unpin and console

2024-02-28 Thread Christian König
Nice, looks totally valid to me. Feel free to add to patch #2, #9, #10, #11 and #12 Reviewed-by: Christian König And Acked-by: Christian König to the rest. Regards, Christian. Am 27.02.24 um 11:14 schrieb Thomas Zimmermann: Dma-buf locking semantics require the caller of pin and unpin to

Re: [PATCH 00/13] drm: Fix reservation locking for pin/unpin and console

2024-02-28 Thread Dmitry Osipenko
Hello, Thank you for the patches! On 2/27/24 13:14, Thomas Zimmermann wrote: > Dma-buf locking semantics require the caller of pin and unpin to hold > the buffer's reservation lock. Fix DRM to adhere to the specs. This > enables to fix the locking in DRM's console emulation. Similar changes > for

Re: [PATCH 00/13] drm: Fix reservation locking for pin/unpin and console

2024-02-28 Thread Zack Rusin
On Tue, Feb 27, 2024 at 6:38 AM Thomas Zimmermann wrote: > > Dma-buf locking semantics require the caller of pin and unpin to hold > the buffer's reservation lock. Fix DRM to adhere to the specs. This > enables to fix the locking in DRM's console emulation. Similar changes > for vmap and mmap have

[PATCH] drm/qxl: remove redundant code

2024-02-28 Thread Jiapeng Chong
Variable num_relocs is not effectively used, so delete it. Having two labels seems somewhat redundant; the 'out_free_release' can be removed, leaving 'out_free_bos'. drivers/gpu/drm/qxl/qxl_ioctl.c:148:14: warning: variable 'num_relocs' set but not used. Reported-by: Abaci Robot Closes: https:/

Re: [PATCH 08/13] drm/qxl: Acquire reservation lock in GEM pin/unpin callbacks

2024-02-28 Thread Zack Rusin
On Tue, Feb 27, 2024 at 6:39 AM Thomas Zimmermann wrote: > > Acquire the reservation lock directly in GEM pin callback. Same for > unpin. Prepares for further changes. > > Dma-buf locking semantics require callers to hold the buffer's > reservation lock when invoking the pin and unpin callbacks. P

Re: [PATCH 09/13] drm/gem: Acquire reservation lock in drm_gem_{pin/unpin}()

2024-02-28 Thread Zack Rusin
On Tue, Feb 27, 2024 at 6:39 AM Thomas Zimmermann wrote: > > Acquire the buffer object's reservation lock in drm_gem_pin() and > remove locking the drivers' GEM callbacks where necessary. Same for > unpin(). > > DRM drivers and memory managers modified by this patch will now have > correct dma-buf

[PATCH v4 5/5] video-stream: Don't stop a stream associated with gl_draw (v2)

2024-02-28 Thread Vivek Kasireddy
We do not want to stop a stream associated with gl_draw as a result of timeout because we may not get another opportunity to create a new stream if the current one gets stopped. However, when the stream does get stopped for other reasons, we need to clear the gl_draw_stream pointer associated with

[PATCH v4 2/5] dcc: Create a stream associated with gl_draw for non-gl clients (v3)

2024-02-28 Thread Vivek Kasireddy
For non-gl/remote clients, if there is no stream associated with the DisplayChannel, then we create a new stream. Otherwise, we just update the current stream's timestamp. v2: (suggestions and fixups from Frediano) - Moved the gl_draw_stream object from DCC to DC - Moved the stream initialization

[PATCH v4 1/5] dcc: Check to see if the client supports multiple codecs (v2)

2024-02-28 Thread Vivek Kasireddy
We need to determine if the client is new enough to support multiple codecs -- which might include any of the Gstreamer based ones. v2: (suggestions and fixups from Frediano) - Add is_gl_client() method to DisplayChannelClient instead of a dcc_is_gl_client() function. - Avoid the usage of XXX_CA

[PATCH v4 4/5] gstreamer-encoder: Add an encoder function that takes dmabuf fd as input (v2)

2024-02-28 Thread Vivek Kasireddy
This patch adds a new function to enable the creation of Gst memory with the dmabuf fd as the source by using a dmabuf allocator. And, it also adds a mechanism to register and invoke any callbacks once the Gst memory object is no longer used by the pipeline. This patch also ensures that the source

[PATCH v4 3/5] dcc-send: Encode and send gl_draw stream data to the remote client (v2)

2024-02-28 Thread Vivek Kasireddy
For remote (or non-gl) clients, if a valid gl_draw stream exists, then we first extract the dmabuf fd associated with the scanout and share it with the encoder along with other key parameters such as stride, width and height. Once the encoder finishes creating an encoded buffer (using the dmabuf fd

[PATCH v4 0/5] dcc: Create a stream for non-gl/remote clients that want to use dmabuf (v4)

2024-02-28 Thread Vivek Kasireddy
For clients that cannot accept a dmabuf fd directly (such as those running on a remote system), this patch series provides a way for the Spice server to stream the gl/dmabuf data/buffer instead. This is mostly done by enabling the creation of Gst memory using a dmabuf fd as the source. This ability

Re: [PATCH 00/13] drm: Fix reservation locking for pin/unpin and console

2024-02-28 Thread Thomas Zimmermann
Hi Am 27.02.24 um 19:14 schrieb Dmitry Osipenko: Hello, Thank you for the patches! On 2/27/24 13:14, Thomas Zimmermann wrote: Dma-buf locking semantics require the caller of pin and unpin to hold the buffer's reservation lock. Fix DRM to adhere to the specs. This enables to fix the locking in