[PATCH v3][next] backlight: sky81452-backlight: Remove unnecessary call to of_node_get

2024-05-01 Thread Shresth Prasad
`dev->of_node` already has a reference to the device_node and calling of_node_get on it is unnecessary. All conresponding calls to of_node_put are also removed. Reviewed-by: Daniel Thompson Signed-off-by: Shresth Prasad --- Changes in v3: - Remove unnecessary braces drivers/video/backlight

Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free

2024-05-01 Thread Shresth Prasad
I'll remove the unnecessary braces and resend the patch. Regards, Shresth On Wed, May 1, 2024 at 7:49 PM Julia Lawall wrote: > > > > On Wed, 1 May 2024, Daniel Thompson wrote: > > > On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote: > > > Use the new cleanup magic to replace of_node_put()

Re: [PATCH] drm/vmwgfx: Stop using dev_private to store driver data.

2024-05-01 Thread Zack Rusin
On Wed, May 1, 2024 at 8:41 PM Maaz Mombasawala wrote: > > Currently vmwgfx uses the dev_private opaque pointer in drm_device to store > driver data in vmw_private struct. Using dev_private is deprecated, and the > recommendation is to embed struct drm_device in the larger per-device > structure.

[PATCH] drm/vmwgfx: Stop using dev_private to store driver data.

2024-05-01 Thread Maaz Mombasawala
Currently vmwgfx uses the dev_private opaque pointer in drm_device to store driver data in vmw_private struct. Using dev_private is deprecated, and the recommendation is to embed struct drm_device in the larger per-device structure. The vmwgfx driver already embeds struct drm_device in its struct

[PATCH v2 1/1] drm: Add ioctl for querying a DRM device's list of open client PIDs

2024-05-01 Thread Adrián Larumbe
Up to this day, all fdinfo-based GPU profilers must traverse the entire /proc directory structure to find open DRM clients with fdinfo file descriptors. This is inefficient and time-consuming. This patch adds a new DRM ioctl that allows users to obtain a list of PIDs for clients who have opened th

[PATCH v2 0/1] drm: Add ioctl for querying a DRM device's list of open client PIDs

2024-05-01 Thread Adrián Larumbe
This is v2 of the patch being discussed at https://lore.kernel.org/dri-devel/20240403182951.724488-1-adrian.laru...@collabora.com/ In the original patch, a DRM device sysfs attribute file was chosen as the interface for fetching the list of active client PIDs. That came with a hosts of problems:

Re: [PATCH] drm/sysfs: Add drm class-wide attribute to get active device clients

2024-05-01 Thread Lucas De Marchi
On Wed, May 01, 2024 at 09:25:01AM GMT, Rob Clark wrote: On Wed, May 1, 2024 at 9:19 AM Lucas De Marchi wrote: On Wed, May 01, 2024 at 04:58:05PM GMT, Tvrtko Ursulin wrote: > >Hi, > >On 24/04/2024 15:48, Adrián Larumbe wrote: >>Hi Tvrtko, >> >>On 15.04.2024 13:50, Tvrtko Ursulin wrote: >>> >>>

Re: [PATCH] drm/sysfs: Add drm class-wide attribute to get active device clients

2024-05-01 Thread Daniel Vetter
On Wed, Apr 03, 2024 at 07:29:39PM +0100, Adrián Larumbe wrote: > Up to this day, all fdinfo-based GPU profilers must traverse the entire > /proc directory structure to find open DRM clients with fdinfo file > descriptors. This is inefficient and time-consuming. > > This patch adds a new device cl

Re: [PATCH] drm/sysfs: Add drm class-wide attribute to get active device clients

2024-05-01 Thread Rob Clark
On Wed, May 1, 2024 at 9:19 AM Lucas De Marchi wrote: > > On Wed, May 01, 2024 at 04:58:05PM GMT, Tvrtko Ursulin wrote: > > > >Hi, > > > >On 24/04/2024 15:48, Adrián Larumbe wrote: > >>Hi Tvrtko, > >> > >>On 15.04.2024 13:50, Tvrtko Ursulin wrote: > >>> > >>>On 05/04/2024 18:59, Rob Clark wrote: >

Re: [PATCH] drm/sysfs: Add drm class-wide attribute to get active device clients

2024-05-01 Thread Lucas De Marchi
On Wed, May 01, 2024 at 04:58:05PM GMT, Tvrtko Ursulin wrote: Hi, On 24/04/2024 15:48, Adrián Larumbe wrote: Hi Tvrtko, On 15.04.2024 13:50, Tvrtko Ursulin wrote: On 05/04/2024 18:59, Rob Clark wrote: On Wed, Apr 3, 2024 at 11:37 AM Adrián Larumbe wrote: Up to this day, all fdinfo-based

Re: [PATCH v2] drm/debugfs: Drop conditionals around of_node pointers

2024-05-01 Thread Doug Anderson
Hi, On Tue, Apr 30, 2024 at 10:13 PM Sui Jingfeng wrote: > > Having conditional around the of_node pointer of the drm_bridge structure > is not necessary anymore, since drm_bridge structure always has the of_node > member since the commit d8dfccde2709 ("drm/bridge: Drop conditionals around > of_n

Re: [PATCH] drm/sysfs: Add drm class-wide attribute to get active device clients

2024-05-01 Thread Tvrtko Ursulin
Hi, On 24/04/2024 15:48, Adrián Larumbe wrote: Hi Tvrtko, On 15.04.2024 13:50, Tvrtko Ursulin wrote: On 05/04/2024 18:59, Rob Clark wrote: On Wed, Apr 3, 2024 at 11:37 AM Adrián Larumbe wrote: Up to this day, all fdinfo-based GPU profilers must traverse the entire /proc directory struct

Re: [PATCH v2 4/8] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()

2024-05-01 Thread Dmitry Baryshkov
On Wed, 1 May 2024 at 18:49, Doug Anderson wrote: > > Hi, > > On Mon, Apr 29, 2024 at 8:39 AM Jani Nikula > wrote: > > > > On Mon, 29 Apr 2024, Doug Anderson wrote: > > > Hi, > > > > > > On Mon, Apr 29, 2024 at 2:38 AM Neil Armstrong > > > wrote: > > >> > > >> > +/** > > >> > + * struct mipi_d

Re: [PATCH v2 4/8] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()

2024-05-01 Thread Doug Anderson
Hi, On Mon, Apr 29, 2024 at 8:39 AM Jani Nikula wrote: > > On Mon, 29 Apr 2024, Doug Anderson wrote: > > Hi, > > > > On Mon, Apr 29, 2024 at 2:38 AM Neil Armstrong > > wrote: > >> > >> > +/** > >> > + * struct mipi_dsi_multi_context - Context to call multiple MIPI DSI > >> > funcs in a row > >

[PATCH v3 9/9] drm/panel: innolux-p079zca: Don't use a table for initting panels

2024-05-01 Thread Douglas Anderson
Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. We'll use the same concepts as the recently introduced mipi_dsi_generic_write_seq_multi() to make this clean/easy and also not bloat the driver too much. Measuring before/afte

[PATCH v3 8/9] drm/panel: ili9882t: Don't use a table for initting panels

2024-05-01 Thread Douglas Anderson
Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. With the recently introduced mipi_dsi_dcs_write_seq_multi() this is not only clean/easy but also saves space. Measuring before/after this change: $ scripts/bloat-o-meter \

[PATCH v3 7/9] drm/panel: boe-tv101wum-nl6: Don't use a table for initting panels

2024-05-01 Thread Douglas Anderson
Consensus on the mailing lists is that panels shouldn't use a table of init commands but should instead use init functions. With the recently introduced mipi_dsi_dcs_write_seq_multi() this is not only clean/easy but also saves space. Measuring before/after this change: $ scripts/bloat-o-meter \

[PATCH v3 3/9] drm/mipi-dsi: mipi_dsi_*_write functions don't need to ratelimit prints

2024-05-01 Thread Douglas Anderson
We really don't expect these errors to be printed over and over again. When a driver hits the error it should bail out. Just use a normal error print. This gives a nice space savings for users of these functions: $ scripts/bloat-o-meter \ .../before/panel-novatek-nt36672e.ko \ .../after/panel

[PATCH v3 6/9] drm/panel: novatek-nt36672e: Switch to mipi_dsi_dcs_write_seq_multi()

2024-05-01 Thread Douglas Anderson
This is a mechanical conversion of the novatek-nt36672e driver to use the new mipi_dsi_dcs_write_seq_multi(). The new function is easier for clients to understand and using it also causes smaller code to be generated. Specifically: $ scripts/bloat-o-meter \ ...after/panel-novatek-nt36672e.ko \

[PATCH v3 5/9] drm/mipi-dsi: Introduce mipi_dsi_*_write_seq_multi()

2024-05-01 Thread Douglas Anderson
The current mipi_dsi_*_write_seq() macros are non-intutitive because they contain a hidden "return" statement that will return out of the _caller_ of the macro. Let's mark them as deprecated and instead introduce some new macros that are more intuitive. These new macros are less optimal when an er

[PATCH v3 4/9] drm/mipi-dsi: Reduce driver bloat of mipi_dsi_*_write_seq()

2024-05-01 Thread Douglas Anderson
Through a cooperative effort between Hsin-Yi Wang and Dmitry Baryshkov, we have realized the dev_err() in the mipi_dsi_*_write_seq() macros was causing quite a bit of bloat to the kernel. Let's hoist this call into drm_mipi_dsi.c by adding a "chatty" version of the functions that includes the print

[PATCH v3 2/9] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_generic_write_seq()

2024-05-01 Thread Douglas Anderson
The mipi_dsi_generic_write_seq() macro makes a call to mipi_dsi_generic_write() which returns a type ssize_t. The macro then stores it in an int and checks to see if it's negative. This could theoretically be a problem if "ssize_t" is larger than "int". To see the issue, imagine that "ssize_t" is

[PATCH v3 0/9] drm/mipi-dsi: Reduce bloat and add funcs for cleaner init seqs

2024-05-01 Thread Douglas Anderson
The consensus of many DRM folks is that we want to move away from DSI drivers defining tables of init commands. Instead, we want to move to init functions that can use common DRM functions. The issue thus far has been that using the macros mipi_dsi_generic_write_seq() and mipi_dsi_dcs_write_seq() b

[PATCH v3 1/9] drm/mipi-dsi: Fix theoretical int overflow in mipi_dsi_dcs_write_seq()

2024-05-01 Thread Douglas Anderson
The mipi_dsi_dcs_write_seq() macro makes a call to mipi_dsi_dcs_write_buffer() which returns a type ssize_t. The macro then stores it in an int and checks to see if it's negative. This could theoretically be a problem if "ssize_t" is larger than "int". To see the issue, imagine that "ssize_t" is 3

Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free

2024-05-01 Thread Julia Lawall
On Wed, 1 May 2024, Daniel Thompson wrote: > On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote: > > Use the new cleanup magic to replace of_node_put() with > > __free(device_node) marking to auto release when they get out of scope. > > > > Suggested-by: Julia Lawall > > Signed-off-by: R

Re: [PATCH] backlight: sky81452-backlight: replace of_node_put with __free

2024-05-01 Thread Daniel Thompson
On Wed, May 01, 2024 at 06:21:46PM +0530, R Sundar wrote: > Use the new cleanup magic to replace of_node_put() with > __free(device_node) marking to auto release when they get out of scope. > > Suggested-by: Julia Lawall > Signed-off-by: R Sundar Thanks for the patch but I think this one is a mo

Re: [RFC PATCH net-next v8 07/14] page_pool: devmem support

2024-05-01 Thread Jesper Dangaard Brouer
On 30/04/2024 20.55, Jens Axboe wrote: On 4/30/24 12:29 PM, Mina Almasry wrote: On Tue, Apr 30, 2024 at 6:46?AM Jens Axboe wrote: [...] In general, attempting to hide overhead behind config options is always a losing proposition. It merely serves to say "look, if these things aren't enable

[pull] amdgpu, amdkfd drm-fixes-6.9

2024-05-01 Thread Alex Deucher
Hi Dave, Sima, Fixes for 6.9. The following changes since commit e67572cd2204894179d89bd7b984072f19313b03: Linux 6.9-rc6 (2024-04-28 13:47:24 -0700) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git tags/amd-drm-fixes-6.9-2024-05-01 for you to fetch c

Re: [PATCH v1 2/2] vfio/pci: Allow MMIO regions to be exported through dma-buf

2024-05-01 Thread Jason Gunthorpe
On Tue, Apr 30, 2024 at 04:24:50PM -0600, Alex Williamson wrote: > > +static vm_fault_t vfio_pci_dma_buf_fault(struct vm_fault *vmf) > > +{ > > + struct vm_area_struct *vma = vmf->vma; > > + struct vfio_pci_dma_buf *priv = vma->vm_private_data; > > + pgoff_t pgoff = vmf->pgoff; > > + > > +

[PATCH] backlight: sky81452-backlight: replace of_node_put with __free

2024-05-01 Thread R Sundar
Use the new cleanup magic to replace of_node_put() with __free(device_node) marking to auto release when they get out of scope. Suggested-by: Julia Lawall Signed-off-by: R Sundar --- drivers/video/backlight/sky81452-backlight.c | 8 ++-- 1 file changed, 2 insertions(+), 6 deletions(-) diff