Re: [PATCH 2/2] drm/panel: himax-hx83102: Add a check to prevent NULL pointer dereference

2024-10-31 Thread neil . armstrong
On 25/10/2024 09:34, Zhang Zekun wrote: drm_mode_duplicate() could return NULL due to lack of memory, which will then call NULL pointer dereference. Add a check to prevent it. Fixes: 0ef94554dc40 ("drm/panel: himax-hx83102: Break out as separate driver") Signed-off-by: Zhang Zekun --- drivers

Re: [PATCH 3/5] perf: Add pmu get/put

2024-10-31 Thread Peter Zijlstra
On Thu, Oct 31, 2024 at 12:07:42AM -0500, Lucas De Marchi wrote: > On Wed, Oct 23, 2024 at 12:07:58AM -0500, Lucas De Marchi wrote: > > On Tue, Oct 22, 2024 at 11:52:10PM +0200, Peter Zijlstra wrote: > > > On Fri, Oct 18, 2024 at 02:46:31PM -0500, Lucas De Marchi wrote: > > > > > > > I will give t

[PATCH v13 7/7] drm/vkms: Add support for DRM_FORMAT_R*

2024-10-31 Thread Louis Chauvet
This add the support for: - R1/R2/R4/R8 R1 format was tested with [1] and [2]. [1]: https://lore.kernel.org/r/20240313-new_rotation-v2-0-6230fd5ca...@bootlin.com [2]: https://lore.kernel.org/igt-dev/20240306-b4-kms_tests-v1-0-8fe451efd...@bootlin.com/ Reviewed-by: Pekka Paalanen Signed-off-by

Re: [PATCH v4 00/13] Add ITE IT6263 LVDS to HDMI converter support

2024-10-31 Thread Dmitry Baryshkov
On Wed, 30 Oct 2024 at 11:02, Biju Das wrote: > > Hi Dmitry Baryshkov, > > > -Original Message- > > From: Dmitry Baryshkov > > Sent: 30 October 2024 03:17 > > Subject: Re: [PATCH v4 00/13] Add ITE IT6263 LVDS to HDMI converter support > > > > On Tue, 29 Oct 2024 at 04:41, Liu Ying wrote:

Re: [RFC PATCH] i2c: skip of_i2c_register_device() for invalid child nodes

2024-10-31 Thread Dmitry Baryshkov
On Wed, 30 Oct 2024 at 03:07, Abhinav Kumar wrote: > > of_i2c_register_devices() adds all child nodes of a given i2c bus > however in certain device trees of_alias_from_compatible() and > of_property_read_u32() can fail as the child nodes of the device > might not be valid i2c client devices. One

[PATCH v13 5/7] drm/vkms: Create KUnit tests for YUV conversions

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo Create KUnit tests to test the conversion between YUV and RGB. Test each conversion and range combination with some common colors. The code used to compute the expected result can be found in comment. [Louis Chauvet: - fix minor formating issues (whitespace, double line) - c

[PATCH v13 6/7] drm/vkms: Add how to run the Kunit tests

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo Now that we have KUnit tests, add instructions on how to run them. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 11 +++ 1 file changed, 11 insertions(+) diff --git a/Documentation/gpu/vkms.rst b/Documentation/gpu/vkms.

[PATCH v13 1/7] drm/vkms: Add YUV support

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo Add support to the YUV formats bellow: - NV12/NV16/NV24 - NV21/NV61/NV42 - YUV420/YUV422/YUV444 - YVU420/YVU422/YVU444 The conversion from yuv to rgb is done with fixed-point arithmetic, using 32.32 fixed-point numbers and the drm_fixed helpers. To do the conversion, a spec

[PATCH v13 3/7] drm/vkms: Drop YUV formats TODO

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo VKMS has support for YUV formats now. Remove the task from the TODO list. Signed-off-by: Arthur Grillo Signed-off-by: Louis Chauvet --- Documentation/gpu/vkms.rst | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Documentation/gpu/vkms.rst b/Documentati

[PATCH v13 0/7] drm/vkms: Add support for YUV and DRM_FORMAT_R*

2024-10-31 Thread Louis Chauvet
ions(+), 4 deletions(-) --- base-commit: 623b1e4d2eace0958996995f9f88cb659a6f69dd change-id: 20240201-yuv-1337d90d9576 prerequisite-message-id: 20241031-yuv-v13-0-bd5463126...@bootlin.com prerequisite-patch-id: 2eed29b53617ba76169e1af303e4899d517a3a18 prerequisit

[PATCH v13 4/7] drm: Export symbols to use in tests

2024-10-31 Thread Louis Chauvet
The functions drm_get_color_encoding_name and drm_get_color_range_name are useful for clarifying test results. Therefore, export them so they can be used in tests built as modules. --- drivers/gpu/drm/drm_color_mgmt.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/drm_color_

[PATCH v13 2/7] drm/vkms: Add range and encoding properties to the plane

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo Now that the driver internally handles these quantization ranges and YUV encoding matrices, expose the UAPI for setting them. Signed-off-by: Arthur Grillo [Louis Chauvet: retained only relevant parts, updated the commit message] Acked-by: Pekka Paalanen Signed-off-by: Louis

Re: [RFC PATCH] i2c: skip of_i2c_register_device() for invalid child nodes

2024-10-31 Thread Dmitry Baryshkov
On Thu, Oct 31, 2024 at 11:45:53AM -0700, Abhinav Kumar wrote: > > > On 10/31/2024 11:23 AM, Dmitry Baryshkov wrote: > > On Wed, 30 Oct 2024 at 03:07, Abhinav Kumar > > wrote: > > > > > > of_i2c_register_devices() adds all child nodes of a given i2c bus > > > however in certain device trees of

Re: [PATCH libdrm] modetest: Make modetest availble to vendor on Android

2024-10-31 Thread Dmitry Baryshkov
On Tue, Oct 29, 2024 at 02:43:05PM +, Rob Barnes wrote: > Make modetest available to vendors on Android. libdrm_util and > libdrm_test_headers is also made available to vendors since these are > depenencies of modetest. This results in the module target > modetest.vendor being availble to vendo

Re: [PATCH v3 05/23] drm/msm/dpu: move resource allocation to CRTC

2024-10-31 Thread Abhinav Kumar
On 10/16/2024 6:21 PM, Jessica Zhang wrote: From: Dmitry Baryshkov All resource allocation is centered around the LMs. Then other blocks (except DSCs) are allocated basing on the LMs that was selected, and LM powers up the CRTC rather than the encoder. Moreover if at some point the driver s

Re: [PATCH] drm/bridge: it6505: Fix inverted reset polarity

2024-10-31 Thread Dmitry Baryshkov
On Tue, Oct 29, 2024 at 05:54:10PM +0800, Chen-Yu Tsai wrote: > The IT6505 bridge chip has a active low reset line. Since it is a > "reset" and not an "enable" line, the GPIO should be asserted to > put it in reset and deasserted to bring it out of reset during > the power on sequence. > > The pol

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Sui Jingfeng
Hi, Dears maintainers On 2024/10/31 20:31, Neil Armstrong wrote: On 30/10/2024 15:49, Sui Jingfeng wrote: Hi, On 2024/10/21 21:08, Neil Armstrong wrote: Hi, On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote: The assignment of the of_node to the aux bridge needs to mark the of_node as reus

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Johan Hovold
On Thu, Oct 31, 2024 at 11:06:38PM +0800, Sui Jingfeng wrote: > But I think Johan do need more times to understand what exactly > the real problem is. We do need times to investigate new method. No, I know perfectly well what the (immediate) problem is here (I was the one adding support for the o

[PATCH v13 0/9] drm/vkms: Reimplement line-per-line pixel conversion for plane reading

2024-10-31 Thread Louis Chauvet
This patchset is the second version of [1]. It is almost a complete rewrite to use a line-by-line algorithm for the composition. It can be divided in multiple parts: - PATCH 1 to 3: no functional change is intended, only some formatting and documenting (PATCH 2 is taken from [2]) - PATCH 4 to 7:

[PATCH v13 1/9] drm/vkms: Code formatting

2024-10-31 Thread Louis Chauvet
Few no-op changes to remove double spaces and fix wrong alignments. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_composer.c | 10 +- drivers/gpu/drm/vkms/vkms_crtc.c | 6 ++ drivers/gpu/drm/vkms/vkms_drv.c

[PATCH v13 2/9] drm/vkms: Use drm_frame directly

2024-10-31 Thread Louis Chauvet
From: Arthur Grillo Remove intermidiary variables and access the variables directly from drm_frame. These changes should be noop. Signed-off-by: Arthur Grillo Acked-by: Pekka Paalanen Reviewed-by: Maíra Canal Reviewed-by: Louis Chauvet [Louis Chauvet: Applied review from Maíra] Signed-off-by

Re: [PATCH v2 05/29] drm/gpusvm: Add support for GPU Shared Virtual Memory

2024-10-31 Thread Thomas Hellström
On Tue, 2024-10-15 at 20:24 -0700, Matthew Brost wrote: > This patch introduces support for GPU Shared Virtual Memory (SVM) in > the > Direct Rendering Manager (DRM) subsystem. SVM allows for seamless > sharing of memory between the CPU and GPU, enhancing performance and > flexibility in GPU comput

Re: Requirements to merge new heaps in the kernel

2024-10-31 Thread Al Viro
On Thu, Oct 31, 2024 at 05:45:23PM +0100, Maxime Ripard wrote: > On Wed, Oct 30, 2024 at 12:16:22PM +0100, metux wrote: > > On 22.10.24 10:38, Maxime Ripard wrote: > > > I'm still interested in merging a carve-out driver[1], since it seems to > > > be > > > in every vendor BSP and got asked again

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Johan Hovold
On Thu, Oct 31, 2024 at 05:48:24PM +0200, Dmitry Baryshkov wrote: > On Mon, 21 Oct 2024 at 10:23, Johan Hovold wrote: > > > > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: > > > The assignment of the of_node to the aux bridge needs to mark the > > > of_node as reused as well, otherwis

[PATCH v13 5/9] drm/vkms: Update pixels accessor to support packed and multi-plane formats.

2024-10-31 Thread Louis Chauvet
Introduce the usage of block_h/block_w to compute the offset and the pointer of a pixel. The previous implementation was specialized for planes with block_h == block_w == 1. To avoid confusion and allow easier implementation of tiled formats. It also remove the usage of the deprecated format field

[PATCH v13 9/9] drm/vkms: Remove useless drm_rotation_simplify

2024-10-31 Thread Louis Chauvet
As all the rotation are now supported by VKMS, this simplification does not make sense anymore, so remove it. Acked-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_plane.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vkms/v

[PATCH v13 8/9] drm/vkms: Re-introduce line-per-line composition algorithm

2024-10-31 Thread Louis Chauvet
Re-introduce a line-by-line composition algorithm for each pixel format. This allows more performance by not requiring an indirection per pixel read. This patch is focused on readability of the code. Line-by-line composition was introduced by [1] but rewritten back to pixel-by-pixel algorithm in [

[PATCH v13 3/9] drm/vkms: Add typedef and documentation for pixel_read and pixel_write functions

2024-10-31 Thread Louis Chauvet
Introduce two typedefs: pixel_read_t and pixel_write_t. It allows the compiler to check if the passed functions take the correct arguments. Such typedefs will help ensuring consistency across the code base in case of update of these prototypes. Rename input/output variable in a consistent way betw

[PATCH v13 4/9] drm/vkms: Use const for input pointers in pixel_read an pixel_write functions

2024-10-31 Thread Louis Chauvet
As the pixel_read and pixel_write function should never modify the input buffer, mark those pointers const. Reviewed-by: Pekka Paalanen Reviewed-by: Maíra Canal Signed-off-by: Louis Chauvet --- drivers/gpu/drm/vkms/vkms_drv.h | 4 ++-- drivers/gpu/drm/vkms/vkms_formats.c | 20 ++--

[PATCH v13 7/9] drm/vkms: Introduce pixel_read_direction enum

2024-10-31 Thread Louis Chauvet
The pixel_read_direction enum is useful to describe the reading direction in a plane. It avoids using the rotation property of DRM, which not practical to know the direction of reading. This patch also introduce two helpers, one to compute the pixel_read_direction from the DRM rotation property, an

[PATCH v13 6/9] drm/vkms: Avoid computing blending limits inside pre_mul_alpha_blend

2024-10-31 Thread Louis Chauvet
The pre_mul_alpha_blend is dedicated to blending, so to avoid mixing different concepts (coordinate calculation and color management), extract the x_limit and x_dst computation outside of this helper. It also increases the maintainability by grouping the computation related to coordinates in the sa

Re: [PATCH v4 15/18] dt-bindings: usb: Add ports to google,cros-ec-typec for DP altmode

2024-10-31 Thread Dmitry Baryshkov
On Tue, Oct 29, 2024 at 01:15:51PM -0700, Stephen Boyd wrote: > Quoting Dmitry Baryshkov (2024-10-25 03:49:36) > > On Tue, Oct 22, 2024 at 06:15:47PM -0700, Stephen Boyd wrote: > > > Quoting Dmitry Baryshkov (2024-09-20 02:38:53) > > > > On Sat, Aug 31, 2024 at 09:06:53PM GMT, Stephen Boyd wrote: >

[PATCH] drm/vkms: Drop unnecessary call to drm_crtc_cleanup()

2024-10-31 Thread José Expósito
CRTC creation uses drmm_crtc_init_with_planes(), which automatically handles cleanup. However, an unnecessary call to drm_crtc_cleanup() is still present in the vkms_output_init() error path. Fixes: 99cc528ebe92 ("drm/vkms: Use drmm_crtc_init_with_planes()") Signed-off-by: José Expósito --- driv

Re: [PATCH v2] drm/vkms: Remove index parameter from init_vkms_output

2024-10-31 Thread José Expósito
> On 26/10/24 - 12:22, Maíra Canal wrote: > > Hi Louis, > > > > On 10/10/24 14:27, Louis Chauvet wrote: > > > VKMS currently supports only one CRTC, so it make no sense to have this > > > index configurable. To avoid issues, replace this hardcoded index by > > > drm_crtc_mask when applicable. > >

Re: [PATCH] drm/vkms: Drop unnecessary call to drm_crtc_cleanup()

2024-10-31 Thread Louis Chauvet
On 31/10/24 - 19:38, José Expósito wrote: > CRTC creation uses drmm_crtc_init_with_planes(), which automatically > handles cleanup. However, an unnecessary call to drm_crtc_cleanup() is > still present in the vkms_output_init() error path. Thanks! I discussed about this with Maíra on Monday, I ag

Re: [RFC PATCH] i2c: skip of_i2c_register_device() for invalid child nodes

2024-10-31 Thread Abhinav Kumar
On 10/31/2024 11:23 AM, Dmitry Baryshkov wrote: On Wed, 30 Oct 2024 at 03:07, Abhinav Kumar wrote: of_i2c_register_devices() adds all child nodes of a given i2c bus however in certain device trees of_alias_from_compatible() and of_property_read_u32() can fail as the child nodes of the devic

Re: [PATCH v3 06/23] drm/msm/dpu: fill CRTC resources in dpu_crtc.c

2024-10-31 Thread Abhinav Kumar
On 10/16/2024 6:21 PM, Jessica Zhang wrote: From: Dmitry Baryshkov Stop poking into CRTC state from dpu_encoder.c, fill CRTC HW resources from dpu_crtc_assign_resources(). Signed-off-by: Dmitry Baryshkov [quic_abhin...@quicinc.com: cleaned up formatting] Signed-off-by: Abhinav Kumar Signe

[PATCH 1/1] dt-bindings: display: nwl-dsi: Allow 'data-lanes' property for port@1

2024-10-31 Thread Frank Li
Change $ref of port@1 from 'port' to 'port-base' and add 'endpoint' property referencing video-interfaces.yaml. Allow 'data-lanes' values 1, 2, 3, and 4 for port@1. Fix below CHECK_DTB warnings: arch/arm64/boot/dts/freescale/imx8mq-tqma8mq-mba8mx-lvds-tm070jvhg33.dtb: dsi@30a0: ports:port@1:e

Re: [PATCH v18 1/8] drm: bridge: Cadence: Create MHDP helper driver

2024-10-31 Thread Dmitry Baryshkov
On Tue, Oct 29, 2024 at 02:02:09PM +0800, Sandor Yu wrote: > Mailbox access functions in MHDP8546 will be share to other MHDP driver > and Cadence HDP-TX HDMI/DP PHY drivers. > > Create a new MHDP helper driver and move all mailbox access functions into. > According the mailbox access sequence and

Re: [PATCH] MAINTAINERS: Remove myself as a VKMS maintainer

2024-10-31 Thread Louis Chauvet
On 30/10/24 - 16:45, Louis Chauvet wrote: > On 14/10/24 - 11:50, Maíra Canal wrote: > > I haven't been able to properly review the work on the driver for a while. > > Hence, this commit removes me from the maintainers list. > > > > Signed-off-by: Maíra Canal > > Acked-by: Louis Chauvet Applied

[PATCH RFC 0/4] drm/dp: Rework LTTPR transparent mode handling and add support to msm driver

2024-10-31 Thread Abel Vesa
| 9 +++- include/drm/display/drm_dp_helper.h| 1 + 5 files changed, 47 insertions(+), 7 deletions(-) --- base-commit: 6fb2fa9805c501d9ade047fc511961f3273cdcb5 change-id: 20241031-drm-dp-msm-add-lttpr-transparent-mode-set-136cd5bfde07 Best regards, -- Abel Vesa

[pull] amdgpu drm-fixes-6.12

2024-10-31 Thread Alex Deucher
Hi Dave, Simona, Fixes for 6.12. The following changes since commit 4d95a12beba146b0ca2de59c7ce905bc0aadfd0c: Merge tag 'drm-xe-fixes-2024-10-24-1' of https://gitlab.freedesktop.org/drm/xe/kernel into drm-fixes (2024-10-25 16:55:39 +1000) are available in the Git repository at: https://g

[PATCH RFC 1/4] drm/dp: Add helper to set LTTPRs in transparent mode

2024-10-31 Thread Abel Vesa
According to the DisplayPort standard, LTTPRs have two operating modes: - non-transparent - it replies to DPCD LTTPR field specific AUX requests, while passes through all other AUX requests - transparent - it passes through all AUX requests. Switching between this two modes is done by the DPT

[PATCH RFC 3/4] drm/i915/dp: Use the generic helper to control LTTPR transparent mode

2024-10-31 Thread Abel Vesa
LTTPRs operating modes are defined by the DisplayPort standard and the generic framework now provides a helper to switch between them. So use the drm generic helper instead as it makes the code a bit cleaner. Signed-off-by: Abel Vesa --- drivers/gpu/drm/i915/display/intel_dp_link_training.c | 2

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Dmitry Baryshkov
On Mon, 21 Oct 2024 at 10:23, Johan Hovold wrote: > > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: > > The assignment of the of_node to the aux bridge needs to mark the > > of_node as reused as well, otherwise resource providers like pinctrl will > > report a gpio as already requeste

Re: [PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Markus Elfring
… > Although this case may be unrealistic for the current code, it is > still better to protect against possible bugs. > > Bail out also when status is AE_NOT_FOUND. … How do you think about to add any tags (like “Fixes” and “Cc”) accordingly? https://git.kernel.org/pub/scm/linux/kernel/git/torval

Re: Requirements to merge new heaps in the kernel

2024-10-31 Thread metux
On 22.10.24 10:38, Maxime Ripard wrote: Hi, I'm still interested in merging a carve-out driver[1], since it seems to be in every vendor BSP and got asked again last week. I remember from our discussion that for new heap types to be merged, we needed a kernel use-case. Looking back, I'm not ent

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Johan Hovold
On Thu, Oct 31, 2024 at 06:13:45PM +0200, Abel Vesa wrote: > On 24-10-31 15:05:52, Johan Hovold wrote: > > On Mon, Oct 21, 2024 at 09:23:24AM +0200, Johan Hovold wrote: > > > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: > > > > Cc: sta...@vger.kernel.org # 6.8 > > > > I assume

Re: Requirements to merge new heaps in the kernel

2024-10-31 Thread Maxime Ripard
On Wed, Oct 30, 2024 at 12:16:22PM +0100, metux wrote: > On 22.10.24 10:38, Maxime Ripard wrote: > > I'm still interested in merging a carve-out driver[1], since it seems to be > > in every vendor BSP and got asked again last week. > > > > I remember from our discussion that for new heap types to

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Bail out also when status is AE_NOT_FOUND with a proper err

Re: [PATCH RFC 4/4] drm/msm/dp: Add support for LTTPR handling

2024-10-31 Thread Dmitry Baryshkov
On Thu, Oct 31, 2024 at 05:12:48PM +0200, Abel Vesa wrote: > Link Training Tunable PHY Repeaters (LTTPRs) are defined in DisplayPort > 1.4a specification. As the name suggests, these PHY repeaters are > capable of adjusting their output for link training purposes. > > The msm DP driver is currentl

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Sui Jingfeng
Hi, On 2024/10/31 22:02, Johan Hovold wrote: On Thu, Oct 31, 2024 at 01:31:47PM +0100, Neil Armstrong wrote: On 30/10/2024 15:49, Sui Jingfeng wrote: On 2024/10/21 21:08, Neil Armstrong wrote: On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote: The assignment of the of_node to the aux bridg

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Abel Vesa
On 24-10-31 15:05:52, Johan Hovold wrote: > On Mon, Oct 21, 2024 at 09:23:24AM +0200, Johan Hovold wrote: > > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: > > > The assignment of the of_node to the aux bridge needs to mark the > > > of_node as reused as well, otherwise resource provid

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
On 31/10/2024 15:41, Mario Limonciello wrote: On 10/30/2024 16:06, Antonio Quartulli wrote: Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffe

[PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Antonio Quartulli
acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Although this case may be unrealistic for the current code, it is still better to protect against possible bugs. Bail out also when status is AE_NOT_FOUND. This fi

[etnaviv-next v3] drm/etnaviv: Print an error message if inserting IOVA range fails

2024-10-31 Thread Sui Jingfeng
Print an error message to help debug when such an error happens, since there meight have other CPU page size & GPU page size combinations. Reviewed-by: Lucas Stach Signed-off-by: Sui Jingfeng --- v3: - Pick up tags and resend. - Slightly improve commit message. --- drivers/gpu/drm/etnaviv/etn

[PATCH RFC 2/4] drm/nouveau/dp: Use the generic helper to control LTTPR transparent mode

2024-10-31 Thread Abel Vesa
LTTPRs operating modes are defined by the DisplayPort standard and the generic framework now provides a helper to switch between them. So use the drm generic helper instead as it makes the code a bit cleaner. Signed-off-by: Abel Vesa --- drivers/gpu/drm/nouveau/nouveau_dp.c | 9 +++-- 1 file

Re: [PATCH V2 drm-dp 2/4] drm/hisilicon/hibmc: add dp link moduel in hibmc

2024-10-31 Thread Yongbang Shi
On Tue, Oct 22, 2024 at 08:41:46PM +0800, Yongbang Shi wrote: From: baihan li Add link training process functions in this moduel. We should probably have a bounty for a developer who finally writes a generic DP link training helpers. Signed-off-by: baihan li Missing SoB --- ChangeLog: v1

Re: [PATCH v6 7/9] drm/msm/dpu: add support for virtual planes

2024-10-31 Thread Dmitry Baryshkov
Hi Abhinav, On Wed, 30 Oct 2024 at 21:26, Abhinav Kumar wrote: > > > > On 10/30/2024 3:48 AM, Dmitry Baryshkov wrote: > > On Tue, Oct 29, 2024 at 02:30:12PM -0700, Abhinav Kumar wrote: > >> > >> > >> On 10/24/2024 5:20 PM, Dmitry Baryshkov wrote: > >>> Only several SSPP blocks support such featur

[PATCH RFC 4/4] drm/msm/dp: Add support for LTTPR handling

2024-10-31 Thread Abel Vesa
Link Training Tunable PHY Repeaters (LTTPRs) are defined in DisplayPort 1.4a specification. As the name suggests, these PHY repeaters are capable of adjusting their output for link training purposes. The msm DP driver is currently lacking any handling of LTTPRs. This means that if at least one LTT

Re: [PATCH RFC 2/4] drm/nouveau/dp: Use the generic helper to control LTTPR transparent mode

2024-10-31 Thread Dmitry Baryshkov
On Thu, Oct 31, 2024 at 05:12:46PM +0200, Abel Vesa wrote: > LTTPRs operating modes are defined by the DisplayPort standard and the > generic framework now provides a helper to switch between them. > So use the drm generic helper instead as it makes the code a bit cleaner. > > Signed-off-by: Abel

Re: [PATCH v6 7/9] drm/msm/dpu: add support for virtual planes

2024-10-31 Thread Dmitry Baryshkov
On Thu, 31 Oct 2024 at 17:11, Dmitry Baryshkov wrote: > > Hi Abhinav, > > On Wed, 30 Oct 2024 at 21:26, Abhinav Kumar wrote: > > On 10/30/2024 3:48 AM, Dmitry Baryshkov wrote: > > > On Tue, Oct 29, 2024 at 02:30:12PM -0700, Abhinav Kumar wrote: > > >> On 10/24/2024 5:20 PM, Dmitry Baryshkov wrote

Re: [RFC][PATCH] drm: i915: do not NULL deref hdmi attached_connector

2024-10-31 Thread Jani Nikula
On Thu, 31 Oct 2024, Sergey Senozhatsky wrote: > *** RFC *** > > intel_ddi_init() may skip connector initialization, for instance, > both intel_ddi_init_dp_connector() and intel_ddi_init_hdmi_connector() > are optional. This leads to situation that ->attached_connector may > be NULL for som

Re: [PATCH] drm/panel: leadtek-ltk050h3146w: transition to mipi_dsi wrapped functions

2024-10-31 Thread Neil Armstrong
Hi, On Sat, 26 Oct 2024 09:29:28 +0530, Tejas Vipin wrote: > Changes the leadtek-ltk050h3146w panel to use multi style functions for > improved error handling. > > Thanks, Applied to https://gitlab.freedesktop.org/drm/misc/kernel.git (drm-misc-next) [1/1] drm/panel: leadtek-ltk050h3146w: tran

Re: [PATCH] drm/panel: leadtek-ltk050h3146w: transition to mipi_dsi wrapped functions

2024-10-31 Thread neil . armstrong
On 30/10/2024 18:50, Doug Anderson wrote: Hi, On Wed, Oct 30, 2024 at 12:24 AM Tejas Vipin wrote: On 10/29/24 12:24 AM, Doug Anderson wrote: Hi, On Fri, Oct 25, 2024 at 9:00 PM Tejas Vipin wrote: @@ -418,79 +398,42 @@ static const struct ltk050h3146w_desc ltk050h3146w_data = {

Re: [PATCH] drm/sched: Document purpose of drm_sched_{start,stop}

2024-10-31 Thread Philipp Stanner
On Tue, 2024-10-29 at 09:47 -0400, Alex Deucher wrote: > On Tue, Oct 29, 2024 at 9:39 AM Philipp Stanner > wrote: > > > > drm_sched_start()'s and drm_sched_stop()'s names suggest that those > > functions might be intended for actively starting and stopping the > > scheduler on initialization and

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Neil Armstrong
On 30/10/2024 17:45, Sui Jingfeng wrote: Hi, On 2024/10/18 23:43, Dmitry Baryshkov wrote: On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: The assignment of the of_node to the aux bridge needs to mark the of_node as reused as well, otherwise resource providers like pinctrl will repor

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Neil Armstrong
On 30/10/2024 15:49, Sui Jingfeng wrote: Hi, On 2024/10/21 21:08, Neil Armstrong wrote: Hi, On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote: The assignment of the of_node to the aux bridge needs to mark the of_node as reused as well, otherwise resource providers like pinctrl will report a

Re: [PATCH v6 4/5] drm: add drm_memory_stats_is_zero

2024-10-31 Thread Christian König
Am 25.10.24 um 19:41 schrieb Yunxiang Li: Add a helper to check if the memory stats is zero, this will be used to check for memory accounting errors. Signed-off-by: Yunxiang Li Reviewed-by: Christian König In theory I would need to upstream that through the drm-misc-next channel, but I thi

Re: [PATCH v4 0/5] Add new panel driver Samsung S6E88A0-AMS427AP24

2024-10-31 Thread Neil Armstrong
Hi, On Mon, 28 Oct 2024 00:42:01 +0100, Jakob Hauser wrote: > The patchset adds a new driver for Samsung AMS427AP24 panel with S6E88A0 > controller. Patches are based on current branch drm-misc-next. > > The discussion in v3 was not finished. I send v4 nonetheless as a new base to > continue the

Re: [PATCH] drm/virtio: Add drm_panic support

2024-10-31 Thread Jocelyn Falempe
On 31/10/2024 04:20, Ryosuke Yasuoka wrote: From: Jocelyn Falempe Virtio gpu supports the drm_panic module, which displays a message to the screen when a kernel panic occurs. Thanks for this patch. I think a few things can be simplified, see below. Other than that, it looks good to me. Sig

[RFC][PATCH] drm: i915: do not NULL deref hdmi attached_connector

2024-10-31 Thread Sergey Senozhatsky
*** RFC *** intel_ddi_init() may skip connector initialization, for instance, both intel_ddi_init_dp_connector() and intel_ddi_init_hdmi_connector() are optional. This leads to situation that ->attached_connector may be NULL for some connectors. For instance, on my setup 'DDI A/PHY A' an

[PULL] drm-misc-next

2024-10-31 Thread Maarten Lankhorst
Hi Dave, Simona, drm-misc-next-2024-10-31: drm-misc-next for v6.13: All of the previous pull request, with MORE! Core Changes: - Update documentation for scheduler start/stop and job init. - Add dedede and sm8350-hdk hardware to ci runs. Driver Changes: - Small fixes and cleanups to panfrost,

Re: [PATCH V2 drm-dp 1/4] drm/hisilicon/hibmc: add dp aux in hibmc

2024-10-31 Thread Yongbang Shi
On Tue, 29 Oct 2024 at 16:15, Yongbang Shi wrote: On Tue, Oct 22, 2024 at 08:41:45PM +0800, Yongbang Shi wrote: From: baihan li +} + +enum dpcd_revision { +DPCD_REVISION_10 = 0x10, +DPCD_REVISION_11, +DPCD_REVISION_12, +DPCD_REVISION_13, +DPCD_REVISION_14, Any reason for i

RE: [PATCH v6 5/5] drm/amdgpu: track bo memory stats at runtime

2024-10-31 Thread Li, Yunxiang (Teddy)
[Public] > From: Christian König > Sent: Thursday, October 31, 2024 8:54 > Am 25.10.24 um 19:41 schrieb Yunxiang Li: > > Before, every time fdinfo is queried we try to lock all the BOs in the > > VM and calculate memory usage from scratch. This works okay if the > > fdinfo is rarely read and the

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Johan Hovold
On Thu, Oct 31, 2024 at 01:31:47PM +0100, Neil Armstrong wrote: > On 30/10/2024 15:49, Sui Jingfeng wrote: > > On 2024/10/21 21:08, Neil Armstrong wrote: > >> On Fri, 18 Oct 2024 15:49:34 +0300, Abel Vesa wrote: > >>> The assignment of the of_node to the aux bridge needs to mark the > >>> of_node a

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Johan Hovold
On Mon, Oct 21, 2024 at 09:23:24AM +0200, Johan Hovold wrote: > On Fri, Oct 18, 2024 at 03:49:34PM +0300, Abel Vesa wrote: > > The assignment of the of_node to the aux bridge needs to mark the > > of_node as reused as well, otherwise resource providers like pinctrl will > > report a gpio as already

[PATCH] drm/prime: drm_prime_sg_to_dma_addr_array(): Return -EINVAL on error

2024-10-31 Thread Sui Jingfeng
'-EINVAL' stands for invalid argument, while '-1' will accidently be interpreted as '-EPERM' by the potential upper caller. Which does not describe the error case accurately, since such an error can happens when the caller pass a smaller number than actually needed size to describe the array passed

Re: [RFC][PATCH] drm: i915: do not NULL deref hdmi attached_connector

2024-10-31 Thread Sergey Senozhatsky
On (24/10/31 13:33), Jani Nikula wrote: > > intel_ddi_init() may skip connector initialization, for instance, > > both intel_ddi_init_dp_connector() and intel_ddi_init_hdmi_connector() > > are optional. This leads to situation that ->attached_connector may > > be NULL for some connectors. For ins

Re: [PATCH] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Mario Limonciello
On 10/30/2024 16:06, Antonio Quartulli wrote: Hi Mario, On 30/10/2024 02:41, Mario Limonciello wrote: On 10/29/2024 18:32, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Bail out als

[PULL] drm-misc-fixes

2024-10-31 Thread Thomas Zimmermann
Hi Dave, Sima, this is the week's PR for drm-misc-fixes. Best regards Thomas drm-misc-fixes-2024-10-31: Short summary of fixes pull: ivpu: - Fix firewall IRQ handling panthor: - Fix firmware initialization wrt page sizes - Fix handling and reporting of dead job groups sched: - Guarantee forwa

Re: [PATCH v2] drm/bridge: Fix assignment of the of_node of the parent to aux bridge

2024-10-31 Thread Sui Jingfeng
On 2024/11/1 00:23, Johan Hovold wrote: On Thu, Oct 31, 2024 at 11:06:38PM +0800, Sui Jingfeng wrote: But I think Johan do need more times to understand what exactly the real problem is. We do need times to investigate new method. No, I know perfectly well what the (immediate) problem is her

RE: [PATCH 0/6] Samsung Exynos 7870 DECON driver support

2024-10-31 Thread SR
Hi Kaustabh Chakraborty, Sorry for late. > -Original Message- > From: Kaustabh Chakraborty > Sent: Friday, September 20, 2024 12:11 AM > To: Inki Dae ; Seung-Woo Kim > ; Kyungmin Park ; David > Airlie ; Simona Vetter ; Krzysztof > Kozlowski ; Alim Akhtar ; > Maarten Lankhorst ; Maxime Ri

Re: [PATCH 1/1] dt-bindings: display: nwl-dsi: Allow 'data-lanes' property for port@1

2024-10-31 Thread Dmitry Baryshkov
On Thu, Oct 31, 2024 at 03:47:14PM -0400, Frank Li wrote: > Change $ref of port@1 from 'port' to 'port-base' and add 'endpoint' > property referencing video-interfaces.yaml. Allow 'data-lanes' values > 1, 2, 3, and 4 for port@1. > > Fix below CHECK_DTB warnings: > arch/arm64/boot/dts/freescale/imx

Re: [PATCH v6 7/9] drm/msm/dpu: add support for virtual planes

2024-10-31 Thread Abhinav Kumar
On 10/31/2024 8:11 AM, Dmitry Baryshkov wrote: Hi Abhinav, On Wed, 30 Oct 2024 at 21:26, Abhinav Kumar wrote: On 10/30/2024 3:48 AM, Dmitry Baryshkov wrote: On Tue, Oct 29, 2024 at 02:30:12PM -0700, Abhinav Kumar wrote: On 10/24/2024 5:20 PM, Dmitry Baryshkov wrote: Only several SSP

Re: [PATCH v6 7/9] drm/msm/dpu: add support for virtual planes

2024-10-31 Thread Dmitry Baryshkov
On Thu, Oct 31, 2024 at 01:06:34PM -0700, Abhinav Kumar wrote: > > > On 10/31/2024 8:11 AM, Dmitry Baryshkov wrote: > > Hi Abhinav, > > > > On Wed, 30 Oct 2024 at 21:26, Abhinav Kumar > > wrote: > > > > > > > > > > > > On 10/30/2024 3:48 AM, Dmitry Baryshkov wrote: > > > > On Tue, Oct 29, 2

Re: [PATCH RFC 1/4] drm/dp: Add helper to set LTTPRs in transparent mode

2024-10-31 Thread Imre Deak
On Thu, Oct 31, 2024 at 05:12:45PM +0200, Abel Vesa wrote: > According to the DisplayPort standard, LTTPRs have two operating > modes: > - non-transparent - it replies to DPCD LTTPR field specific AUX >requests, while passes through all other AUX requests > - transparent - it passes through a

Re: [PATCH v2] amdgpu: prevent NULL pointer dereference if ATIF is not supported

2024-10-31 Thread Mario Limonciello
On 10/31/2024 10:28, Antonio Quartulli wrote: acpi_evaluate_object() may return AE_NOT_FOUND (failure), which would result in dereferencing buffer.pointer (obj) while being NULL. Although this case may be unrealistic for the current code, it is still better to protect against possible bugs. Bai

Re: [PATCH] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-31 Thread Christian Gmeiner
Hi André > > Em 20/10/2024 17:41, Christian Gmeiner escreveu: > > From: Christian Gmeiner > > > > This patch adds a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, which > > allows the configuration of a global performance monitor (perfmon). > > The global perfmon is used for all jobs, ensuring cons

Re: [PATCH RFC 3/4] drm/i915/dp: Use the generic helper to control LTTPR transparent mode

2024-10-31 Thread Imre Deak
On Thu, Oct 31, 2024 at 05:12:47PM +0200, Abel Vesa wrote: > LTTPRs operating modes are defined by the DisplayPort standard and the > generic framework now provides a helper to switch between them. > So use the drm generic helper instead as it makes the code a bit cleaner. > > Signed-off-by: Abel

[PATCH v2 2/6] drm/sun4i: use drm_hdmi_connector_mode_valid()

2024-10-31 Thread Dmitry Baryshkov
Use new drm_hdmi_connector_mode_valid() helper instead of a module-specific copy. Reviewed-by: Chen-Yu Tsai Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 12 +--- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_hdm

[PATCH v2 0/6] drm/display: hdmi: add drm_hdmi_connector_mode_valid()

2024-10-31 Thread Dmitry Baryshkov
Several HDMI drivers have common code pice in the .mode_valid function that validates RGB / 8bpc rate using the TMDS char rate callbacks. Move this code piece to the common helper and remove the need to perform this check manually. In case of DRM_BRIDGE_OP_HDMI bridges, they can skip the check in

[PATCH v2 5/6] drm/bridge: lontium-lt9611: drop TMDS char rate check in mode_valid

2024-10-31 Thread Dmitry Baryshkov
Drop manual check of the TMDS char rate in the mode_valid callback. This check is now being performed by the core. Reviewed-by: Chen-Yu Tsai Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/bridge/lontium-lt9611.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers

[PATCH v2 1/6] drm/display: hdmi: add generic mode_valid helper

2024-10-31 Thread Dmitry Baryshkov
Add drm_hdmi_connector_mode_valid(), generic helper for HDMI connectors. It can be either used directly or as a part of the .mode_valid callback. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_hdmi_helper.c | 45 ++ drivers/gpu/drm/display/drm_hdmi_helper_internal.

Re: [PATCH v18 3/8] dt-bindings: display: bridge: Add Cadence MHDP8501

2024-10-31 Thread Dmitry Baryshkov
On Tue, Oct 29, 2024 at 02:02:11PM +0800, Sandor Yu wrote: > Add bindings for Cadence MHDP8501 DisplayPort/HDMI bridge. > > Signed-off-by: Sandor Yu > --- > v17->v18: > - remove lane-mapping and replace it with data-lanes > - remove r-b tag as property changed. > > v16->v17: > - Add lane-mapping

Re: [PATCH 1/1] dt-bindings: display: nwl-dsi: Allow 'data-lanes' property for port@1

2024-10-31 Thread Frank Li
On Thu, Oct 31, 2024 at 09:59:26PM +0200, Dmitry Baryshkov wrote: > On Thu, Oct 31, 2024 at 03:47:14PM -0400, Frank Li wrote: > > Change $ref of port@1 from 'port' to 'port-base' and add 'endpoint' > > property referencing video-interfaces.yaml. Allow 'data-lanes' values > > 1, 2, 3, and 4 for port

[PATCH v2] drm/v3d: Add DRM_IOCTL_V3D_PERFMON_SET_GLOBAL

2024-10-31 Thread Christian Gmeiner
From: Christian Gmeiner Add a new ioctl, DRM_IOCTL_V3D_PERFMON_SET_GLOBAL, to allow configuration of a global performance monitor (perfmon). Use the global perfmon for all jobs to ensure consistent performance tracking across submissions. Signed-off-by: Christian Gmeiner --- Changes in v2: - R

Re: [PATCH 1/3] drm/msm: move msm_display_topology to the DPU driver

2024-10-31 Thread Abhinav Kumar
On 10/31/2024 2:44 PM, Dmitry Baryshkov wrote: The struct msm_display_topology is only used by the DPU driver. Remove it from the global header and move it to DPU-specific header. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_rm.h | 16 drivers/gpu

Re: [PATCH 2/3] drm/msm: move MAX_H_TILES_PER_DISPLAY to the DPU driver

2024-10-31 Thread Abhinav Kumar
On 10/31/2024 2:44 PM, Dmitry Baryshkov wrote: The MAX_H_TILES_PER_DISPLAY const is only used by the DPU driver, move it to the corresponding header. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.h | 2 ++ drivers/gpu/drm/msm/msm_drv.h | 1 -

[PATCH v2 4/6] drm/display: bridge_connector: use drm_bridge_connector_mode_valid()

2024-10-31 Thread Dmitry Baryshkov
Use new drm_bridge_connector_mode_valid() helper if there is a HDMI bridge in the bridge chain. This removes the need to perform TMDS char rate check manually in the bridge driver. Reviewed-by: Chen-Yu Tsai Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/display/drm_bridge_connector.c | 16

  1   2   >