Re: [RESEND PATCH v4 2/2] drm/tiny: Add driver for Sharp Memory LCD

2024-08-19 Thread Christophe JAILLET
Le 19/08/2024 à 23:49, Alex Lanzano a écrit : Add support for the monochrome Sharp Memory LCDs. Hi, a few nitpick below, should thre be a v5. ... +struct sharp_memory_device { + struct drm_device drm; + struct spi_device *spi; + + const struct drm_display_mode *mode; + +

RE: [PATCH v3 1/4] dt-bindings: display: renesas,rzg2l-du: Document RZ/G2UL DU bindings

2024-08-19 Thread Biju Das
Hi Rob and all, > -Original Message- > From: Biju Das > Sent: Monday, August 19, 2024 1:37 PM > Subject: RE: [PATCH v3 1/4] dt-bindings: display: renesas,rzg2l-du: Document > RZ/G2UL DU bindings > > Hi Laurent and Rob, > > Thanks for the feedback > > > -Original Message- > > Fr

[PATCH net-next v21 10/13] net: add SO_DEVMEM_DONTNEED setsockopt to release RX frags

2024-08-19 Thread Mina Almasry
Add an interface for the user to notify the kernel that it is done reading the devmem dmabuf frags returned as cmsg. The kernel will drop the reference on the frags to make them available for reuse. Signed-off-by: Willem de Bruijn Signed-off-by: Kaiyuan Zhang Signed-off-by: Mina Almasry Reviewe

[PATCH net-next v21 13/13] netdev: add dmabuf introspection

2024-08-19 Thread Mina Almasry
Add dmabuf information to page_pool stats: $ ./cli.py --spec ../netlink/specs/netdev.yaml --dump page-pool-get ... {'dmabuf': 10, 'id': 456, 'ifindex': 3, 'inflight': 1023, 'inflight-mem': 4190208}, {'dmabuf': 10, 'id': 455, 'ifindex': 3, 'inflight': 1023, 'inflight-mem': 4190208

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

2024-08-19 Thread Mina Almasry
ncdevmem is a devmem TCP netcat. It works similarly to netcat, but it sends and receives data using the devmem TCP APIs. It uses udmabuf as the dmabuf provider. It is compatible with a regular netcat running on a peer, or a ncdevmem running on a peer. In addition to normal netcat support, ncdevmem

[PATCH net-next v21 04/13] netdev: netdevice devmem allocator

2024-08-19 Thread Mina Almasry
Implement netdev devmem allocator. The allocator takes a given struct netdev_dmabuf_binding as input and allocates net_iov from that binding. The allocation simply delegates to the binding's genpool for the allocation logic and wraps the returned memory region in a net_iov struct. Signed-off-by:

[PATCH net-next v21 09/13] tcp: RX path for devmem TCP

2024-08-19 Thread Mina Almasry
In tcp_recvmsg_locked(), detect if the skb being received by the user is a devmem skb. In this case - if the user provided the MSG_SOCK_DEVMEM flag - pass it to tcp_recvmsg_devmem() for custom handling. tcp_recvmsg_devmem() copies any data in the skb header to the linear buffer, and returns a cmsg

[PATCH net-next v21 11/13] net: add devmem TCP documentation

2024-08-19 Thread Mina Almasry
Add documentation outlining the usage and details of devmem TCP. Signed-off-by: Mina Almasry Reviewed-by: Bagas Sanjaya Reviewed-by: Donald Hunter --- v16: - Add documentation on unbinding the NIC from dmabuf (Donald). - Add note that any dmabuf should work (Donald). v9: https://lore.kernel

[PATCH net-next v21 07/13] net: support non paged skb frags

2024-08-19 Thread Mina Almasry
Make skb_frag_page() fail in the case where the frag is not backed by a page, and fix its relevant callers to handle this case. Signed-off-by: Mina Almasry Reviewed-by: Eric Dumazet --- v10: - Fixed newly generated kdoc warnings found by patchwork. While we're at it, fix the Return section

[PATCH net-next v21 08/13] net: add support for skbs with unreadable frags

2024-08-19 Thread Mina Almasry
For device memory TCP, we expect the skb headers to be available in host memory for access, and we expect the skb frags to be in device memory and unaccessible to the host. We expect there to be no mixing and matching of device memory frags (unaccessible) with host memory frags (accessible) in the

[PATCH net-next v21 06/13] memory-provider: dmabuf devmem memory provider

2024-08-19 Thread Mina Almasry
Implement a memory provider that allocates dmabuf devmem in the form of net_iov. The provider receives a reference to the struct netdev_dmabuf_binding via the pool->mp_priv pointer. The driver needs to set this pointer for the provider in the net_iov. The provider obtains a reference on the netde

[PATCH net-next v21 05/13] page_pool: devmem support

2024-08-19 Thread Mina Almasry
Convert netmem to be a union of struct page and struct netmem. Overload the LSB of struct netmem* to indicate that it's a net_iov, otherwise it's a page. Currently these entries in struct page are rented by the page_pool and used exclusively by the net stack: struct { unsigned long pp_mag

[PATCH net-next v21 03/13] netdev: support binding dma-buf to netdevice

2024-08-19 Thread Mina Almasry
Add a netdev_dmabuf_binding struct which represents the dma-buf-to-netdevice binding. The netlink API will bind the dma-buf to rx queues on the netdevice. On the binding, the dma_buf_attach & dma_buf_map_attachment will occur. The entries in the sg_table from mapping will be inserted into a genpool

[PATCH net-next v21 02/13] net: netdev netlink api to bind dma-buf to a net device

2024-08-19 Thread Mina Almasry
API takes the dma-buf fd as input, and binds it to the netdevice. The user can specify the rx queues to bind the dma-buf to. Suggested-by: Stanislav Fomichev Signed-off-by: Mina Almasry Reviewed-by: Donald Hunter Reviewed-by: Jakub Kicinski --- v16: - Use subset-of: queue queue-id instead of

[PATCH net-next v21 01/13] netdev: add netdev_rx_queue_restart()

2024-08-19 Thread Mina Almasry
Add netdev_rx_queue_restart(), which resets an rx queue using the queue API recently merged[1]. The queue API was merged to enable the core net stack to reset individual rx queues to actuate changes in the rx queue's configuration. In later patches in this series, we will use netdev_rx_queue_resta

[PATCH net-next v21 00/13] Device Memory TCP

2024-08-19 Thread Mina Almasry
v21: https://patchwork.kernel.org/project/netdevbpf/list/?series=880735&state=* v20 addressed some comments and resolved a test failure, but introduced an unfortunate build error with a config edge case I wasn't testing. v21 simply resolves that error. Major Changes: - Resolve build error wi

[PATCH v6] drm/i915/hwmon: expose fan speed

2024-08-19 Thread Raag Jadav
Add hwmon support for fan1_input attribute, which will expose fan speed in RPM. With this in place we can monitor fan speed using lm-sensors tool. $ sensors i915-pci-0300 Adapter: PCI adapter in0: 653.00 mV fan1:3833 RPM power1: N/A (max = 43.00 W) energy1: 32.02 k

Re: [PATCH v2] drm/mediatek: Fix missing configuration flags in mtk_crtc_ddp_config()

2024-08-19 Thread 胡俊光

Re: [PATCH v2 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC

2024-08-19 Thread kernel test robot
'--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Hui-Ping-Chen/dt-bindings-mtd-nuvoton-ma35d1-nand-add-new-bindings/20240819-172155 base: https://git.kernel.org/pub/scm/linux/kernel/git/mtd

Re: [PATCH v2 2/2] mtd: rawnand: nuvoton: add new driver for the Nuvoton MA35 SoC

2024-08-19 Thread Hui-Ping Chen
Dear Krzysztof, Thank you for your reply. On 2024/8/19 下午 07:19, Krzysztof Kozlowski wrote: On Mon, Aug 19, 2024 at 09:20:37AM +, Hui-Ping Chen wrote: Nuvoton MA35 SoCs NAND Flash Interface Controller supports 2KB, 4KB and 8KB page size, and up to 8-bit, 12-bit, and 24-bit hardware ECC c

Re: [PATCH v3] misc: fastrpc: Add support for multiple PD from one process

2024-08-19 Thread Ekansh Gupta
On 8/19/2024 4:35 PM, Caleb Connolly wrote: > Hi Ekansh, > > On 08/08/2024 12:42, Ekansh Gupta wrote: >> Memory intensive applications(which requires more tha 4GB) that wants >> to offload tasks to DSP might have to split the tasks to multiple >> user PD to make the resources available. >> >> Fo

Re: [PATCH 1/9] of: property: add of_graph_get_next_port()

2024-08-19 Thread Kuninori Morimoto
Hi Tomi Thank you for the feedback, and sorry for my late responce. I was under Summer Vacation > If we have this, of_graph_get_next_ports() returns the ports@0, and that > makes sense: > > parent { > ports@0 { > port@0 { }; > }; > }; > > If we have this, of_graph_g

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-19 Thread Mina Almasry
On Mon, Aug 19, 2024 at 6:53 PM Jakub Kicinski wrote: > > On Mon, 19 Aug 2024 00:44:27 +0900 Taehee Yoo wrote: > > > @@ -9537,6 +9540,10 @@ static int dev_xdp_attach(struct net_device *dev, > > > struct netlink_ext_ack *extack > > > NL_SET_ERR_MSG(extack, "Native and gener

Re: [PATCH v3 5/5] udmabuf: remove udmabuf_folio

2024-08-19 Thread Huan Yang
在 2024/8/17 9:05, Kasireddy, Vivek 写道: Hi Huan, Currently, udmabuf handles folio by creating an unpin list to record each folio obtained from the list and unpinning them when released. To maintain this approach, many data structures have been established. However, maintaining this type of da

Re: [PATCH v3 4/5] udmabuf: codestyle cleanup

2024-08-19 Thread Huan Yang
在 2024/8/17 8:58, Kasireddy, Vivek 写道: Hi Huan, There are some variables in udmabuf_create that are only used inside the loop. Therefore, there is no need to declare them outside the scope. This patch moved it into loop. It is difficult to understand the loop condition of the code that adds

Re: [PATCH v2 1/9] of: property: add of_graph_get_next_port()

2024-08-19 Thread Kuninori Morimoto
Hi Laurent Thank you for the review > Having multiple "ports" nodes in a device node is not something I've > ever seen before. There may be use cases, but how widespread are they ? > I would prefer handling this in driver code instead of creating a helper > function if the use case is rare. In

Re: [PATCH v3 3/5] fix vmap_udmabuf error page set

2024-08-19 Thread Huan Yang
在 2024/8/17 8:54, Kasireddy, Vivek 写道: Hi Huan, Subject: [PATCH v3 3/5] fix vmap_udmabuf error page set Please prepend a "udmabuf:" to the subject line and improve the wording. OK, sorry for this mistake. Currently vmap_udmabuf set page's array by each folio. But, ubuf->folios is only co

Re: [PATCH v3 1/5] udmabuf: cancel mmap page fault, direct map it

2024-08-19 Thread Huan Yang
在 2024/8/17 8:53, Kasireddy, Vivek 写道: Hi Huan, The current udmabuf mmap uses a page fault to populate the vma. However, the current udmabuf has already obtained and pinned the folio upon completion of the creation.This means that the physical memory has already been acquired, rather than be

Re:[PATCH v4] rockchip/drm: vop2: add support for gamma LUT

2024-08-19 Thread Andy Yan
Hi Piotr, At 2024-08-16 15:39:35, "Piotr Zalewski" wrote: >Add support for gamma LUT in VOP2 driver. The implementation was inspired >by one found in VOP1 driver. Blue and red channels in gamma LUT register >write were swapped with respect to how gamma LUT values are written in >VOP1. If the cur

Re: [REGRESSION][BISECTED] vmwgfx crashes with command buffer error after update

2024-08-19 Thread Doug Kehn
Hi Zack, Attached is a log from a BIOS system. Regards, ...doug On Mon, Aug 19, 2024 at 12:49 PM Paul Rolland wrote: > Hello, > > On Thu, 15 Aug 2024 19:48:47 +0200 > Christian Heusel wrote: > > > While we were still debugging the issue Brad (also CC'ed) messaged me > > that they were seeing

Re: [PATCH net-next v19 03/13] netdev: support binding dma-buf to netdevice

2024-08-19 Thread Jakub Kicinski
On Mon, 19 Aug 2024 00:44:27 +0900 Taehee Yoo wrote: > > @@ -9537,6 +9540,10 @@ static int dev_xdp_attach(struct net_device *dev, > > struct netlink_ext_ack *extack > > NL_SET_ERR_MSG(extack, "Native and generic XDP > > can't be active at the same time"); > >

Re: [PATCH net-next v20 00/13] Device Memory TCP

2024-08-19 Thread Jakub Kicinski
On Mon, 19 Aug 2024 16:38:32 -0400 Mina Almasry wrote: > Looks like in this iteration I resolved the previous test failure, but > introduced a build regression with certain configs: > > ld: vmlinux.o: in function `netdev_rx_queue_restart': > (.text+0x6a4133): undefined reference to `page_pool_chec

[PATCH v3 16/17] platform/chrome: cros_ec_typec: Support DP muxing

2024-08-19 Thread Stephen Boyd
Most ARM based chromebooks with two usb-c-connector nodes and one DP controller are muxing the DP lanes between the two USB ports. This is done so that the type-c ports are at least equal in capability if not functionality. Either an analog mux is used to steer the DP signal to one or the other por

[PATCH v3 17/17] platform/chrome: cros_ec_typec: Handle lack of HPD information

2024-08-19 Thread Stephen Boyd
Some EC firmwares on Trogdor/Strongbad boards don't properly indicate the state of DP HPD on a type-c port. Instead, the EC only indicates that a type-c port has entered or exited DP mode. To make matters worse, on these boards the DP signal is muxed between two USB type-c connectors, so we can't u

[PATCH v3 13/17] dt-bindings: Move google, cros-ec-typec binding to usb

2024-08-19 Thread Stephen Boyd
This binding is about USB type-c control. Move the binding to the usb directory as it's a better home than chrome. Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc: Lee Jones Cc: Benson Leung Cc: Guenter Roeck Cc: Prashant Malani Cc: Tzung-Bi Shih Cc: Cc: Cc: Pin-yen Lin Sugg

[PATCH v3 15/17] platform/chrome: cros_ec_typec: Add support for signaling DP HPD via drm_bridge

2024-08-19 Thread Stephen Boyd
We can imagine that logically the EC is a device that has some number of DisplayPort (DP) connector inputs, some number of USB3 connector inputs, and some number of USB type-c connector outputs. If you squint enough it looks like a USB type-c dock. Logically there's a crossbar pin assignment capabi

[PATCH v3 14/17] dt-bindings: usb: Add ports to google, cros-ec-typec for DP altmode

2024-08-19 Thread Stephen Boyd
Add a DT graph binding to google,cros-ec-typec so that it can combine DisplayPort (DP) and USB SuperSpeed (SS) data into a USB type-c endpoint that is connected to the usb-c-connector node's SS endpoint. This also allows us to connect the DP and USB nodes in the graph to the USB type-c connectors,

[PATCH v3 11/17] dt-bindings: usb-switch: Extract endpoints to defs

2024-08-19 Thread Stephen Boyd
Move the usb-switch endpoint bindings to defs so that they can be reused by other bindings. Future users of this binding will have more than one type-c output node when they're muxing a single DP signal to more than one usb-c-connector. Add an example to show how this binding can be used and accele

[PATCH v3 12/17] dt-bindings: usb-switch: Extend for DisplayPort altmode

2024-08-19 Thread Stephen Boyd
Extend the usb-switch binding to support DisplayPort (DP) alternate modes. A third port for the DP signal is necessary when a mode-switch is muxing USB and DP together onto a usb type-c connector. Add data-lanes to the usbc output node to allow a device using this binding to remap the data lanes on

[PATCH v3 10/17] device property: Add remote endpoint to devcon matcher

2024-08-19 Thread Stephen Boyd
When a single DT node has a graph connected to more than one usb-c-connector node we can't differentiate which typec switch registered for the device is associated with the USB connector because the devcon matcher code assumes a 1:1 relationship between remote node and typec switch. Furthermore, we

[PATCH v3 09/17] drm/bridge: dp_typec: Allow users to hook hpd notify path

2024-08-19 Thread Stephen Boyd
The previous patch added support for no-hpd to drm_dp_typec_bridge code. Allow users of this bridge to hook the HPD notification path of the bridge chain so that they can be made aware of the connector status changing. This helps HPD-less users of the bridge inject the HPD state into their code by

[PATCH v3 08/17] drm/bridge: dp_typec: Add "no-hpd" support

2024-08-19 Thread Stephen Boyd
Add support for HPD coming from somewhere else in the drm_bridge chain. Skip signaling HPD sate when "no-hpd" is present in the DT node backing the dp_typec bridge. Add this support because some EC firmwares on Trogdor/Strongbad boards don't properly indicate the state of the DP HPD level on a typ

[PATCH v3 05/17] usb: typec: Add device managed typec_switch_register()

2024-08-19 Thread Stephen Boyd
Simplify driver error paths by adding devm_typec_switch_register() which will unregister the typec switch when the parent device is unbound. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: Cc: Pin-yen Lin Signed-off-by: Stephen Boyd --- drivers/usb/typec/mux.c | 27 +

[PATCH v3 07/17] drm/bridge: dp_typec: Support USB Type-C orientation

2024-08-19 Thread Stephen Boyd
Register an orientation switch for each type-c output node to support flipping the lane mapping when the port is in reverse orientation. Only do this when the orientation-switch property is present. This is mostly useful for the case where the DP lanes are directly connected to the usb-c-connector

[PATCH v3 06/17] drm/bridge: aux-hpd: Support USB Type-C DP altmodes via DRM lane assignment

2024-08-19 Thread Stephen Boyd
Extend the aux-hpd bridge driver to support assigning DP lanes to USB type-c pins based on typec mux state entry. Existing users of this driver only need the HPD signaling support, so leave that in place and wrap the code with a variant that supports more features of USB type-c DP altmode, i.e. pin

[PATCH v3 04/17] usb: typec: Add device managed typec_mux_register()

2024-08-19 Thread Stephen Boyd
Simplify driver error paths by adding devm_typec_mux_register() which will unregister the typec mux when the parent device is unbound. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: Cc: Pin-yen Lin Signed-off-by: Stephen Boyd --- drivers/usb/typec/mux.c | 37 +++

[PATCH v3 03/17] usb: typec: Stub out typec_switch APIs when CONFIG_TYPEC=n

2024-08-19 Thread Stephen Boyd
Ease driver development by adding stubs for the typec_switch APIs when CONFIG_TYPEC=n. Copy the same method used for the typec_mux APIs to be consistent. Cc: Heikki Krogerus Cc: Greg Kroah-Hartman Cc: Cc: Pin-yen Lin Signed-off-by: Stephen Boyd --- include/linux/usb/typec_mux.h | 42

[PATCH v3 02/17] drm/bridge: Verify lane assignment is going to work during atomic_check

2024-08-19 Thread Stephen Boyd
Verify during drm_atomic_bridge_check() that the lane assignment set in a bridge's atomic_check() callback is going to be satisfied by the previous bridge. If the next bridge is requiring something besides the default 1:1 lane assignment on its input then there must be an output lane assignment on

[PATCH v3 00/17] platform/chrome: Add DT USB/DP muxing/topology support

2024-08-19 Thread Stephen Boyd
This series adds support for fully describing the USB/DP topology on ChromeOS Trogdor devices in DT. Trogdor devices have a single DP phy in the AP that is muxed to one of two usb type-c connectors depending on which port asserts HPD first to the EC. We'd like to know which port is connected to an

[PATCH v3 01/17] drm/atomic-helper: Introduce lane remapping support to bridges

2024-08-19 Thread Stephen Boyd
Add support to the DRM atomic logic to support lane remapping between bridges, encoders and connectors. Typically lane mapping is handled statically in firmware, e.g. on DT we use the data-lanes property to assign lanes when connecting display bridges. Lane assignment is dynamic with USB-C DisplayP

[RESEND PATCH v4 2/2] drm/tiny: Add driver for Sharp Memory LCD

2024-08-19 Thread Alex Lanzano
Add support for the monochrome Sharp Memory LCDs. Co-developed-by: Mehdi Djait Signed-off-by: Mehdi Djait Signed-off-by: Alex Lanzano --- MAINTAINERS | 6 + drivers/gpu/drm/tiny/Kconfig| 20 + drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/

[RESEND PATCH v4 1/2] dt-bindings: display: Add Sharp Memory LCD bindings

2024-08-19 Thread Alex Lanzano
Add device tree bindings for the monochrome Sharp Memory LCD Co-developed-by: Mehdi Djait Signed-off-by: Mehdi Djait Signed-off-by: Alex Lanzano Reviewed-by: Krzysztof Kozlowski --- .../bindings/display/sharp,ls010b7dh04.yaml | 92 +++ 1 file changed, 92 insertions(+) creat

[RESEND PATCH v4 0/2] Add driver for Sharp Memory LCD

2024-08-19 Thread Alex Lanzano
This patch series add support for the monochrome Sharp Memory LCD panels. This series is based off of the work done by Mehdi Djait. References: https://lore.kernel.org/dri-devel/71a9dbf4609dbba46026a31f60261830163a0b99.1701267411.git.mehdi.dj...@bootlin.com/ https://www.sharpsde.com/fileadmin/prod

[PATCH v5 41/44] drm/colorop: allow non-bypass colorops

2024-08-19 Thread Harry Wentland
Not all HW will be able to do bypass on all color operations. Introduce an 'allow_bypass' boolean for all colorop init functions and only create the BYPASS property when it's true. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 22 +--- drivers/gpu/drm/drm_

[PATCH v5 43/44] drm/amd/display: add 3D LUT colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a 3D LUT. The color pipeline now consists of the following colorops: 1. 1D curve colorop 2. Multiplier 3. 3x4 CTM 4. 1D curve colorop 5. 1D LUT 6. 3D LUT 7. 1D curve colorop 8. 1D LUT Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_color.

[PATCH v5 36/44] drm/amd/display: add 3x4 matrix colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a 3x4 color transformation matrix. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-ctm_3x4_50_desat kms_colorop --run plane-XR30-XR30-ctm_3x4_overdrive kms_colorop --run plane-XR30-XR30-ctm_3x4_oversaturate kms_colorop --run

[PATCH v5 44/44] drm/amd/display: Add AMD color pipeline doc

2024-08-19 Thread Harry Wentland
A short description about the AMD color pipeline. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 122 +++--- 1 file changed, 102 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_color.c b/drivers/gpu/drm/

[PATCH v5 38/44] drm/amd/display: add multiplier colorop

2024-08-19 Thread Harry Wentland
From: Alex Hung This adds support for a multiplier. This multiplier is programmed via the HDR Multiplier in DCN. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-multiply_125 kms_colorop --run plane-XR30-XR30-multiply_inv_125 The color pipeline now consists of th

[PATCH v5 34/44] drm/colorop: Add 1D Curve Custom LUT type

2024-08-19 Thread Harry Wentland
From: Alex Hung We've previously introduced DRM_COLOROP_1D_CURVE for pre-defined 1D curves. But we also have HW that supports custom curves and userspace needs the ability to pass custom curves, aka LUTs. This patch introduces a new colorop type, called DRM_COLOROP_1D_LUT that provides a SIZE pr

[PATCH v5 35/44] drm/amd/display: add shaper and blend colorops for 1D Curve Custom LUT

2024-08-19 Thread Harry Wentland
From: Alex Hung This patch adds colorops for custom 1D LUTs in the SHAPER and BLND HW blocks. With this change the following IGT tests pass: kms_colorop --run plane-XR30-XR30-srgb_inv_eotf_lut kms_colorop --run plane-XR30-XR30-srgb_inv_eotf_lut-srgb_eotf_lut The color pipeline now consists of t

[PATCH v5 37/44] drm/colorop: Add mutliplier type

2024-08-19 Thread Harry Wentland
From: Alex Hung This introduces a new drm_colorop_type: DRM_COLOROP_MULTIPLIER. It's a simple multiplier to all pixel values. The value is specified via a S31.32 fixed point provided via the "MULTIPLIER" property. v5: - Fix atomic state print - Add kernel doc Signed-off-by: Alex Hung --- d

[PATCH v5 40/44] drm/colorop: Define LUT_1D interpolation

2024-08-19 Thread Harry Wentland
We want to make sure userspace is aware of the 1D LUT interpolation. While linear interpolation is common it might not be supported on all HW. Give driver implementers a way to specify their interpolation. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 6 ++--

[PATCH v5 39/44] drm/amd/display: Swap matrix and multiplier

2024-08-19 Thread Harry Wentland
From: Alex Hung Swap the order of matrix and multiplier as designed in hardware. Signed-off-by: Alex Hung --- .../amd/display/amdgpu_dm/amdgpu_dm_color.c | 22 +++--- .../amd/display/amdgpu_dm/amdgpu_dm_colorop.c | 30 +-- 2 files changed, 26 insertions(+), 26 deletio

[PATCH v5 42/44] drm/colorop: Add 3D LUT supports to color pipeline

2024-08-19 Thread Harry Wentland
From: Alex Hung It is to be used to enable HDR by allowing userpace to create and pass 3D LUTs to kernel and hardware. 1. new drm_colorop_type: DRM_COLOROP_3D_LUT. 2. 3D LUT modes define hardware capabilities to userspace applications. 3. mode index points to current 3D LUT mode in lut_3d_modes.

[PATCH v5 32/44] drm/colorop: add BT2020/BT709 OETF and Inverse OETF

2024-08-19 Thread Harry Wentland
The BT.709 and BT.2020 OETFs are the same, the only difference being that the BT.2020 variant is defined with more precision for 10 and 12-bit per color encodings. Both are used as encoding functions for video content, and are therefore defined as OETF (opto-electronic transfer function) instead o

[PATCH v5 33/44] drm/amd/display: Add support for BT.709 and BT.2020 TFs

2024-08-19 Thread Harry Wentland
This adds support for the BT.709/BT.2020 transfer functions on all current 1D curve plane colorops, i.e., on DEGAM, SHAPER, and BLND blocks. With this change the following IGT subtests pass: kms_colorop --run plane-XR30-XR30-bt2020_inv_oetf kms_colorop --run plane-XR30-XR30-bt2020_oetf Signed-off

[PATCH v5 28/44] drm/amd/display: Add support for sRGB Inverse EOTF in SHAPER block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose a 2nd curve colorop with support for DRM_COLOROP_1D_CURVE_SRGB_INV_EOTF and program HW to perform the sRGB Inverse EOTF on the shaper block when the colorop is not in bypass. With this change the follow IGT tests pass: kms_colorop --run plane-XR30-XR30-srgb_inv_eotf kms_co

[PATCH v5 27/44] drm/amd/display: Add support for sRGB EOTF in DEGAM block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose one 1D curve colorop with support for DRM_COLOROP_1D_CURVE_SRGB_EOTF and program HW to perform the sRGB transform when the colorop is not in bypass. With this change the following IGT test passes: kms_colorop --run plane-XR30-XR30-srgb_eotf The color pipeline now consists

[PATCH v5 24/44] drm/amd/display: Ignore deprecated props when plane_color_pipeline set

2024-08-19 Thread Harry Wentland
When the plane_color_pipeline bit is set we should ignore deprecated properties, such as COLOR_RANGE and COLOR_ENCODING. Signed-off-by: Harry Wentland --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_

[PATCH v5 25/44] drm/amd/display: Add bypass COLOR PIPELINE

2024-08-19 Thread Harry Wentland
Add the default Bypass pipeline and ensure it passes the kms_colorop test plane-XR30-XR30-bypass. Signed-off-by: Harry Wentland --- .../amd/display/amdgpu_dm/amdgpu_dm_plane.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_

[PATCH v5 31/44] drm/amd/display: Enable support for PQ 125 EOTF and Inverse

2024-08-19 Thread Harry Wentland
This patchset enables support for the PQ_125 EOTF and its inverse on all existing plane 1D curve colorops, i.e., on DEGAM, SHAPER, and BLND blocks. With this patchset the following IGT subtests are passing: kms_colorop --run plane-XR30-XR30-pq_125_eotf kms_colorop --run plane-XR30-XR30-pq_125_inv_

[PATCH v5 22/44] drm/colorop: pass plane_color_pipeline client cap to atomic check

2024-08-19 Thread Harry Wentland
Drivers will need to know whether an atomic check/commit originated from a client with DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE so they can ignore deprecated properties, like COLOR_ENCODING and COLOR_RANGE. Pass the plane_color_pipeline bit to drm_atomic_state. v5: - Fix kernel docs Signed-off-by: H

[PATCH v5 30/44] drm/colorop: Add PQ 125 EOTF and its inverse

2024-08-19 Thread Harry Wentland
The PQ function defines a mapping of code values to nits (cd/m^2). The max code value maps to 10,000 nits. Windows DWM's canonical composition color space (CCCS) defaults to composing SDR contents to 80 nits and uses a float value of 1.0 to represent this. For this reason AMD HW hard-codes a PQ f

[PATCH v5 29/44] drm/amd/display: Add support for sRGB EOTF in BLND block

2024-08-19 Thread Harry Wentland
From: Alex Hung Expose a 3rd 1D curve colorop, with support for DRM_COLOROP_1D_CURVE_SRGB_EOTF and program the BLND block to perform the sRGB transform when the colorop is not in bypass With this change the following IGT test passes: kms_colorop --run plane-XR30-XR30-srgb_eotf-srgb_inv_eotf-srgb

[PATCH v5 26/44] drm/amd/display: Skip color pipeline initialization for cursor plane

2024-08-19 Thread Harry Wentland
From: Alex Hung Signed-off-by: Alex Hung --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_plane.c index d260db42d407..8fc0

[PATCH v5 12/44] drm/plane: Add COLOR PIPELINE property

2024-08-19 Thread Harry Wentland
We're adding a new enum COLOR PIPELINE property. This property will have entries for each COLOR PIPELINE by referencing the DRM object ID of the first drm_colorop of the pipeline. 0 disables the entire COLOR PIPELINE. Userspace can use this to discover the available color pipelines, as well as set

[PATCH v5 14/44] drm/vkms: Add enumerated 1D curve colorop

2024-08-19 Thread Harry Wentland
This patch introduces a VKMS color pipeline that includes two drm_colorops for named transfer functions. For now the only ones supported are sRGB EOTF, sRGB Inverse EOTF, and a Linear TF. We will expand this in the future but I don't want to do so without accompanying IGT tests. We introduce a new

[PATCH v5 21/44] drm/vkms: Add tests for CTM handling

2024-08-19 Thread Harry Wentland
A whole slew of tests for CTM handling that greatly helped in debugging the CTM code. The extent of tests might seem a bit silly but they're fast and might someday help save someone else's day when debugging this. v5: - Make apply_3x4_matrix static v4: - Comment on origin of bt709_enc matrix (P

[PATCH v5 17/44] drm/colorop: Add 3x4 CTM type

2024-08-19 Thread Harry Wentland
This type is used to support a 3x4 matrix in colorops. A 3x4 matrix uses the last column as a "bias" column. Some HW exposes support for 3x4. The calculation looks like: out matrixin |R| |0 1 2 3 | | R | |G| = |4 5 6 7 | x | G | |B| |8 9 10 11| | B |

[PATCH v5 20/44] drm/tests: Add a few tests around drm_fixed.h

2024-08-19 Thread Harry Wentland
While working on the CTM implementation of VKMS I had to ascertain myself of a few assumptions. One of those is whether drm_fixed.h treats its numbers using signed-magnitude or twos-complement. It is twos-complement. In order to make someone else's day easier I am adding the drm_test_int2fixp test

[PATCH v5 10/44] drm/colorop: Add NEXT property

2024-08-19 Thread Harry Wentland
We'll construct color pipelines out of drm_colorop by chaining them via the NEXT pointer. NEXT will point to the next drm_colorop in the pipeline, or by 0 if we're at the end of the pipeline. v5: - move next comment here from Add 3x4 CTM patch (Sebastian) - Add kernel doc v4: - Allow setting o

[PATCH v5 19/44] drm/vkms: add 3x4 matrix in color pipeline

2024-08-19 Thread Harry Wentland
We add two 3x4 matrices into the VKMS color pipeline. The reason we're adding matrices is so that we can test that application of a matrix and its inverse yields an output equal to the input image. One complication with the matrix implementation has to do with the fact that the matrix entries are

[PATCH v5 23/44] drm/colorop: define a new macro for_each_new_colorop_in_state

2024-08-19 Thread Harry Wentland
From: Alex Hung Create a new macro for_each_new_colorop_in_state to access new drm_colorop_state updated from uapi. Signed-off-by: Alex Hung --- include/drm/drm_atomic.h | 20 1 file changed, 20 insertions(+) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.

[PATCH v5 04/44] drm/doc/rfc: Describe why prescriptive color pipeline is needed

2024-08-19 Thread Harry Wentland
v5: - Don't require BYPASS to succeed (Sebastian) - use DATA for 1D and 3D LUT types (Sebastian) - update 3DLUT ops to use 3DLUT_MODES and 3DLUT_MODE_INDEX - Add section on drm_colorop extensibility - Add color_pipeline.rst to RFC toc tree v4: - Drop IOCTL docs since we dropped the IOCTLs (P

[PATCH v5 09/44] drm/colorop: Add BYPASS property

2024-08-19 Thread Harry Wentland
We want to be able to bypass each colorop at all times. Introduce a new BYPASS boolean property for this. v5: - Drop TODO Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic_uapi.c | 6 +- drivers/gpu/drm/drm_colorop.c | 15 +++ include/drm/drm_colorop.h |

[PATCH v5 15/44] drm/vkms: Add kunit tests for linear and sRGB LUTs

2024-08-19 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/tests/vkms_color_tests.c | 37 ++- 1 file changed, 36 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/tests/vkms_color_tests.c b/drivers/gpu/drm/vkms/tests/vkms_color_tests.c index fc73e48aa57c..e6ac01dee830 1

[PATCH v5 18/44] drm/vkms: Use s32 for internal color pipeline precision

2024-08-19 Thread Harry Wentland
Certain operations require us to preserve values below 0.0 and above 1.0 (0x0 and 0x respectively in 16 bpc unorm). One such operation is a BT709 encoding operation followed by its decoding operation, or the reverse. We'll use s32 values as intermediate in and outputs of our color operations,

[PATCH v5 16/44] drm/colorop: Introduce DRM_CLIENT_CAP_PLANE_COLOR_PIPELINE

2024-08-19 Thread Harry Wentland
With the introduction of the pre-blending color pipeline we can no longer have color operations that don't have a clear position in the color pipeline. We deprecate all existing plane properties. For upstream drivers those are: - COLOR_ENCODING - COLOR_RANGE Drivers are expected to ignore these

[PATCH v5 05/44] drm/colorop: Introduce new drm_colorop mode object

2024-08-19 Thread Harry Wentland
This patches introduces a new drm_colorop mode object. This object represents color transformations and can be used to define color pipelines. We also introduce the drm_colorop_state here, as well as various helpers and state tracking bits. v5: - Add comment to drm_atomic_state.colorops - Repla

[PATCH v5 06/44] drm/colorop: Add TYPE property

2024-08-19 Thread Harry Wentland
Add a read-only TYPE property. The TYPE specifies the colorop type, such as enumerated curve, 1D LUT, CTM, 3D LUT, PWL LUT, etc. v5: - Add drm_get_colorop_type_name in header - Add kernel docs v4: - Use enum property for TYPE (Pekka) v3: - Make TYPE a range property - Move enum drm_colorop_

[PATCH v5 03/44] drm/vkms: Add kunit tests for VKMS LUT handling

2024-08-19 Thread Harry Wentland
Debugging LUT math is much easier when we can unit test it. Add kunit functionality to VKMS and add tests for - get_lut_index - lerp_u16 v5: - Bring back static for lerp_u16 and get_lut_index (Arthur) v4: - Test the critical points of the lerp function (Pekka) v3: - Use include way of testi

[PATCH v5 07/44] drm/colorop: Add 1D Curve subtype

2024-08-19 Thread Harry Wentland
v5: - Add drm_get_colorop_curve_1d_type_name in header - Add drm_colorop_init - Set default curve - Add kernel docs v4: - Use drm_colorop_curve_1d_type_enum_list to get name (Pekka) - Create separate init function for 1D curve - Pass supported TFs into 1D curve init function Signed-off-by:

[PATCH v5 08/44] Documentation/gpu: document drm_colorop

2024-08-19 Thread Harry Wentland
Signed-off-by: Harry Wentland --- Documentation/gpu/drm-kms.rst | 15 +++ drivers/gpu/drm/drm_colorop.c | 31 +++ 2 files changed, 46 insertions(+) diff --git a/Documentation/gpu/drm-kms.rst b/Documentation/gpu/drm-kms.rst index abfe220764e1..2292e65f044c

[PATCH v5 11/44] drm/colorop: Add atomic state print for drm_colorop

2024-08-19 Thread Harry Wentland
Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 25 - 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index b09db9835e1f..096460d38545 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b

[PATCH v5 00/44] Color Pipeline API w/ VKMS

2024-08-19 Thread Harry Wentland
This is an RFC set for a color pipeline API, along with implementations in VKMS and amdgpu. It is tested with a set of IGT tests that can be found at [1]. The IGT tests run a pixel-by-pixel comparison with an allowable delta variation as the goal for these transformations is perceptual correctness,

[PATCH v5 13/44] drm/colorop: Add NEXT to colorop state print

2024-08-19 Thread Harry Wentland
v5: - Drop unused header definitions v3: - Read NEXT ID from drm_colorop's next pointer Signed-off-by: Harry Wentland --- drivers/gpu/drm/drm_atomic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index d333433319f6..9919a6f109

[PATCH v5 02/44] drm/vkms: Round fixp2int conversion in lerp_u16

2024-08-19 Thread Harry Wentland
fixp2int always rounds down, fixp2int_ceil rounds up. We need the new fixp2int_round. Signed-off-by: Harry Wentland --- drivers/gpu/drm/vkms/vkms_composer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vkms/vkms_composer.c b/drivers/gpu/drm/vkms/vkms_compo

[PATCH v5 01/44] drm: Add helper for conversion from signed-magnitude

2024-08-19 Thread Harry Wentland
CTM values are defined as signed-magnitude values. Add a helper that converts from CTM signed-magnitude fixed point value to the twos-complement value used by drm_fixed. Signed-off-by: Harry Wentland --- include/drm/drm_fixed.h | 18 ++ 1 file changed, 18 insertions(+) diff --gi

Re: [PATCH 7/7] drm/msm/A6xx: Enable preemption for A7xx targets

2024-08-19 Thread Akhil P Oommen
On Thu, Aug 15, 2024 at 08:26:17PM +0200, Antonino Maniscalco wrote: > Initialize with 4 rings to enable preemption. > > Signed-off-by: Antonino Maniscalco > --- > drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/msm/

Re: [PATCH net-next v20 00/13] Device Memory TCP

2024-08-19 Thread Mina Almasry
On Sun, Aug 18, 2024 at 11:54 PM Mina Almasry wrote: > > v20: > https://patchwork.kernel.org/project/netdevbpf/list/?series=879373&state=* > > > v20 aims to resolve a couple of bug reports against v19, and addresses > some review comments around the page_pool_check_memory_provider > mechanis

  1   2   3   >