[PATCH v2 03/10] dt-bindings: display: bridge: tc358775: Add support for tc358765

2023-12-01 Thread Tony Lindgren
The tc358765 is similar to tc358775 except for the stdby-gpios. Signed-off-by: Tony Lindgren --- .../bindings/display/bridge/toshiba,tc358775.yaml | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH v2 02/10] dt-bindings: display: bridge: tc358775: Add data-lanes

2023-12-01 Thread Tony Lindgren
The device uses a clock lane, and 1 to 4 DSI data lanes. Let's add the data-lanes property starting at 1 similar to what the other bridge bindings are doing. Let's also drop the data-lanes properties in the example for the DSI host controller to avoid confusion. The configuration of the DSI host

[PATCH v2 01/10] dt-bindings: display: bridge: tc358775: make stby gpio and vdd supplies optional

2023-12-01 Thread Tony Lindgren
From: Michael Walle For a normal operation, the vdd supplies nor the stby GPIO is needed. There are boards, where these voltages are statically enabled during board power-up. The reset pin is required because once the PPI (PHY protocol interface) is started, it can only be stopped by asserting

[PATCH v2 00/10] Improvments for tc358775 with support for tc358765

2023-12-01 Thread Tony Lindgren
Here's v2 of these changes merged with patches from Michael. Regards, Tony Changes since v1: - After a brief offline discussion with Michael, merge series with Michael's patch series to make stby gpio and supplies optional as they may be hardwired - Use Michael's better patch for the

Re: [PATCH] drm/imagination: DRM_POWERVR should depend on ARCH_K3

2023-12-01 Thread Nishanth Menon
On 19:29-20231128, Geert Uytterhoeven wrote: > The Imagination Technologies PowerVR Series 6 GPU is currently only > supported on Texas Instruments K3 AM62x SoCs. Hence add a dependency on > ARCH_K3, to prevent asking the user about this driver when configuring a > kernel without Texas

Re: [PATCH 01/17] drm/msm: add arrays listing formats supported by MDP4/MDP5 hardware

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: MDP4 and MDP5 drivers enumerate supported formats each time the plane is created. As the list of supported image formats is constant, create corresponding data arrays to be used by MDP4 and MDP5 drivers. Signed-off-by: Dmitry Baryshkov ---

Re: [PATCH 17/17] drm/msm: drop mdp_get_formats()

2023-12-01 Thread Abhinav Kumar
On 12/1/2023 5:25 PM, Abhinav Kumar wrote: On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Drop the function mdp_get_formats(), which became unused after converting both MDP4 and MDP5 planes to use static formats arrays. Signed-off-by: Dmitry Baryshkov ---  

Re: [PATCH 17/17] drm/msm: drop mdp_get_formats()

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Drop the function mdp_get_formats(), which became unused after converting both MDP4 and MDP5 planes to use static formats arrays. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp_format.c | 24

Re: [PATCH 16/17] drm/msm/mdp4: use drmm-managed allocation for mdp4_plane

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp4_plane allocation to use drmm_plane_alloc(). This removes the need to perform any actions on plane destruction. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp4/mdp4_plane.c | 59 -- 1

Re: [PATCH 15/17] drm/msm/mdp4: use drmm-managed allocation for mdp4_lcdc_encoder

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp4_lcdc_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 36

Re: [PATCH 14/17] drm/msm/mdp4: use drmm-managed allocation for mdp4_dtv_encoder

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp4_dtv_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/mdp4/mdp4_dtv_encoder.c | 37

Re: [PATCH 13/17] drm/msm/mdp4: use drmm-managed allocation for mdp4_dsi_encoder

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp4_dsi_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on this encoder destruction. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/mdp4/mdp4_dsi_encoder.c | 32

Re: [PATCH 12/17] drm/msm/mdp4: use drmm-managed allocation for mdp4_crtc

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp4_crtc allocation to use drmm_crtc_alloc(). This removes the need to perform any actions on CRTC destruction. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp4/mdp4_crtc.c | 33 --- 1 file

Re: [PATCH] drm/msm/a6xx: add QMP dependency

2023-12-01 Thread Dmitry Baryshkov
On 16/10/2023 23:04, Arnd Bergmann wrote: From: Arnd Bergmann When QMP is in a loadable module, the A6xx GPU driver fails to link as built-in: x86_64-linux-ld: drivers/gpu/drm/msm/adreno/a6xx_gmu.o: in function `a6xx_gmu_resume': a6xx_gmu.c:(.text+0xd62): undefined reference to `qmp_send'

[PATCH v7 02/10] drm/msm/dpu: Drop unused get_scaler_ver callback from SSPP

2023-12-01 Thread Dmitry Baryshkov
From: Marijn Suijten This pointer callback is never used and should be removed. Signed-off-by: Marijn Suijten Reviewed-by: Dmitry Baryshkov [DB: dropped the helpers completely, which are unused now] Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov ---

[PATCH v7 09/10] drm/msm/dpu: merge DPU_SSPP_SCALER_QSEED3, QSEED3LITE, QSEED4

2023-12-01 Thread Dmitry Baryshkov
Three different features, DPU_SSPP_SCALER_QSEED3, QSEED3LITE and QSEED4 are all related to different versions of the same HW scaling block. Corresponding driver parts use scaler_blk.version to identify the correct way to program the hardware. In order to simplify the driver codepath, merge these

[PATCH v7 07/10] drm/msm/dpu: drop DPU_HW_SUBBLK_INFO macro

2023-12-01 Thread Dmitry Baryshkov
As the subblock info is now mostly gone, inline and drop the macro DPU_HW_SUBBLK_INFO. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.h| 40 ++- 1 file changed, 21 insertions(+), 19 deletions(-) diff --git

[PATCH v7 06/10] drm/msm/dpu: deduplicate some (most) of SSPP sub-blocks

2023-12-01 Thread Dmitry Baryshkov
As we have dropped the variadic parts of SSPP sub-blocks declarations, deduplicate them now, reducing memory cruft. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 16 +-- .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h| 16 +--

[PATCH v7 08/10] drm/msm/dpu: rewrite scaler and CSC presense checks

2023-12-01 Thread Dmitry Baryshkov
In order to check whether the SSPP block has scaler and CSC subblocks the funcion dpu_plane_atomic_check_pipe() uses macros which enumerate all possible scaler and CSC features. Replace those checks with the scaler and CSC subblock length checks in order to be able to drop those two macros.

[PATCH v7 10/10] drm/msm/gpu: drop duplicating VIG feature masks

2023-12-01 Thread Dmitry Baryshkov
After folding QSEED3LITE and QSEED4 feature bits into QSEED3_COMPATIBLE several VIG feature masks became equal. Drop these duplicates. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/catalog/dpu_5_4_sm6125.h| 2 +- .../gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h| 8

[PATCH v7 05/10] drm/msm/dpu: drop the `smart_dma_priority' field from struct dpu_sspp_sub_blks

2023-12-01 Thread Dmitry Baryshkov
In preparation to deduplicating SSPP subblocks, drop the (unused) `smart_dma_priority' field from struct dpu_sspp_sub_blks. If it is needed later (e.g. for SmartDMA v1), it should be added to the SSPP declarations themselves. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov ---

[PATCH v7 03/10] drm/msm/dpu: Drop unused qseed_type from catalog dpu_caps

2023-12-01 Thread Dmitry Baryshkov
From: Marijn Suijten The SSPP scaler subblk is responsible for reporting its version (via the .id field, feature bits on the parent SSPP block, and since recently also from reading a register to supersede a read-but-unset version field in the catalog), leaving this global qseed_type field

[PATCH v7 04/10] drm/msm/dpu: drop the `id' field from DPU_HW_SUBBLK_INFO

2023-12-01 Thread Dmitry Baryshkov
The field `id' is not used for subblocks. The handling code usually knows, which sub-block it is now looking at. Drop the field completely. Reviewed-by: Abhinav Kumar Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 76 +--

[PATCH v7 01/10] drm/msm/dpu: populate SSPP scaler block version

2023-12-01 Thread Dmitry Baryshkov
The function _dpu_hw_sspp_setup_scaler3() passes and dpu_hw_setup_scaler3() uses scaler_blk.version to determine in which way the scaler (QSEED3) block should be programmed. However up to now we were not setting this field. Set it now, splitting the vig_sblk data which has different version

[PATCH v7 00/10] drm/msm/dpu: simplify DPU sub-blocks info

2023-12-01 Thread Dmitry Baryshkov
The handling code also usually knows, which sub-block it is now looking at. Drop unused 'id' field and arguments and merge some of sub-block declarations. While we are at it, also fix all VIG subblocks to contain correct scaler block version and drop the becoming unused QSEED-related feature

Re: [PATCH 1/6] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-12-01 Thread Felix Kuehling
Hi Alex, I'm about to push patches 1-3 to the rebased amd-staging-drm-next. It would be good to get patch 1 into drm-fixes so that Linux 6.6 will be the only kernel without these prime helpers. That would minimize the hassle for DKMS driver installations on future distros. Thanks,   Felix

[PATCH 3/6] drm/amdkfd: Import DMABufs for interop through DRM

2023-12-01 Thread Felix Kuehling
Use drm_gem_prime_fd_to_handle to import DMABufs for interop. This ensures that a GEM handle is created on import and that obj->dma_buf will be set and remain set as long as the object is imported into KFD. Signed-off-by: Felix Kuehling Reviewed-by: Ramesh Errabolu Reviewed-by: Xiaogang.Chen

[PATCH 2/6] drm/amdkfd: Export DMABufs from KFD using GEM handles

2023-12-01 Thread Felix Kuehling
Create GEM handles for exporting DMABufs using GEM-Prime APIs. The GEM handles are created in a drm_client_dev context to avoid exposing them in user mode contexts through a DMABuf import. Signed-off-by: Felix Kuehling Reviewed-by: Ramesh Errabolu --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

[PATCH 5/6] drm/amdgpu: Auto-validate DMABuf imports in compute VMs

2023-12-01 Thread Felix Kuehling
DMABuf imports in compute VMs are not wrapped in a kgd_mem object on the process_info->kfd_bo_list. There is no explicit KFD API call to validate them or add eviction fences to them. This patch automatically validates and fences dymanic DMABuf imports when they are added to a compute VM.

[PATCH 6/6] drm/amdkfd: Bump KFD ioctl version

2023-12-01 Thread Felix Kuehling
This is not strictly a change in the IOCTL API. This version bump is meant to indicate to user mode the presence of a number of changes and fixes that enable the management of VA mappings in compute VMs using the GEM_VA ioctl for DMABufs exported from KFD. Signed-off-by: Felix Kuehling ---

[PATCH 4/6] drm/amdgpu: New VM state for evicted user BOs

2023-12-01 Thread Felix Kuehling
Create a new VM state to track user BOs that are in the system domain. In the next patch this will be used do conditionally re-validate them in amdgpu_vm_handle_moved. Signed-off-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 +

[PATCH 1/6] Revert "drm/prime: Unexport helpers for fd/handle conversion"

2023-12-01 Thread Felix Kuehling
This reverts commit 71a7974ac7019afeec105a54447ae1dc7216cbb3. These helper functions are needed for KFD to export and import DMABufs the right way without duplicating the tracking of DMABufs associated with GEM objects while ensuring that move notifier callbacks are working as intended.

Re: [git pull] drm fixes for 6.7-rc4

2023-12-01 Thread pr-tracker-bot
The pull request you sent on Fri, 1 Dec 2023 16:41:39 +1000: > git://anongit.freedesktop.org/drm/drm tags/drm-fixes-2023-12-01 has been merged into torvalds/linux.git: https://git.kernel.org/torvalds/c/b1e51588aa50287c3d33e14969d47ccdd403ad80 Thank you! -- Deet-doot-dot, I am a bot.

Re: [PATCH 11/17] drm/msm/mdp4: use bulk regulators API for LCDC encoder

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Switch mdp4_lcdc_encoder to using regulator_bulk_* API instead of enumerating regulators by hand. Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/mdp4/mdp4_lcdc_encoder.c | 51 ++- 1 file changed, 15 insertions(+), 36

[PATCH v2 5/6] drm/vmwgfx: Use vmware_hypercall API

2023-12-01 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. drivers/gpu/drm/vmwgfx/vmwgfx_msg_arm64.h: implement arm64 variant of vmware_hypercall here for now. The move of these functions to arch/arm64/include/asm/vmware.h as well as removal of

[PATCH v2 2/6] x86/vmware: Introduce vmware_hypercall API

2023-12-01 Thread Alexey Makhalov
Introducing vmware_hypercall family of functions as a common implementation to be used by the VMware guest code and virtual device drivers in architecture independent manner. By analogy with KVM hypercall API, vmware_hypercallX and vmware_hypercall_hb_{out,in} set of functions was added to

[PATCH v2 4/6] input/vmmouse: Use vmware_hypercall API

2023-12-01 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Zack Rusin Acked-by: Dmitry Torokhov --- drivers/input/mouse/vmmouse.c | 76

[PATCH v2 6/6] x86/vmware: Add TDX hypercall support

2023-12-01 Thread Alexey Makhalov
VMware hypercalls use I/O port, VMCALL or VMMCALL instructions. Add __tdx_hypercall path to support TDX guests. No change in high bandwidth hypercalls, as only low bandwidth ones are supported for TDX guests. Co-developed-by: Tim Merrifield Signed-off-by: Tim Merrifield Signed-off-by: Alexey

[PATCH v2 3/6] ptp/vmware: Use vmware_hypercall API

2023-12-01 Thread Alexey Makhalov
Switch from VMWARE_HYPERCALL macro to vmware_hypercall API. Eliminate arch specific code. No functional changes intended. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit Reviewed-by: Jeff Sipek --- drivers/ptp/ptp_vmw.c | 12 +++- 1 file changed, 3 insertions(+), 9 deletions(-)

[PATCH v2 0/6] VMware hypercalls enhancements

2023-12-01 Thread Alexey Makhalov
From: Alexey Makhalov VMware hypercalls invocations were all spread out across the kernel implementing same ABI as in-place asm-inline. With encrypted memory and confidential computing it became harder to maintain every changes in these hypercall implementations. Intention of this patchset is

[PATCH v2 1/6] x86/vmware: Move common macros to vmware.h

2023-12-01 Thread Alexey Makhalov
Move VMware hypercall macros to vmware.h as a preparation step for the next commit. No functional changes besides exporting vmware_hypercall_mode symbol. Signed-off-by: Alexey Makhalov Reviewed-by: Nadav Amit --- arch/x86/include/asm/vmware.h | 69 ++-

Re: [PATCH 10/17] drm/msm/mdp5: use drmm-managed allocation for mdp5_plane

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:04 PM, Dmitry Baryshkov wrote: Change struct mdp5_plane allocation to use drmm_plane_alloc(). This removes the need to perform any actions on plane destruction. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 40 -- 1

Re: [PATCH v9 0/3] dma-fence: Deadline awareness (uabi edition)

2023-12-01 Thread Dmitry Baryshkov
On Wed, 23 Aug 2023 14:54:53 -0700, Rob Clark wrote: > This is a re-post of the remaining patches from: > https://patchwork.freedesktop.org/series/114490/ > > Part of the hold-up of the remaining uabi patches was compositor > support, but now an MR for kwin exists: > >

[PATCH v9 5/7] drm/msm/dp: incorporate pm_runtime framework into DP driver

2023-12-01 Thread Kuogee Hsieh
Currently DP driver is executed independent of PM runtime framework. This leads msm eDP panel can not being detected by edp_panel driver during generic_edp_panel_probe() due to AUX DPCD read failed at edp panel driver. Incorporate PM runtime framework into DP driver so that host controller's power

[PATCH v9 7/7] drm/msm/dp: move of_dp_aux_populate_bus() to eDP probe()

2023-12-01 Thread Kuogee Hsieh
Currently eDP population is done at msm_dp_modeset_init() which happen at binding time. Move eDP population to be done at display probe time so that probe deferral cases can be handled effectively. wait_for_hpd_asserted callback is added during drm_dp_aux_init() to ensure eDP's HPD is up before

[PATCH v9 4/7] drm/msm/dp: move parser->parse() and dp_power_client_init() to probe

2023-12-01 Thread Kuogee Hsieh
Original both parser->parse() and dp_power_client_init() are done at dp_display_bind() since eDP population is done at binding time. In the preparation of having eDP population done at probe() time, move both function from dp_display_bind() to dp_display_probe(). Changes in v6: -- move

[PATCH v9 0/7] incorporate pm runtime framework and eDP clean up

2023-12-01 Thread Kuogee Hsieh
The purpose of this patch series is to incorporate pm runtime framework into MSM eDP/DP driver so that eDP panel can be detected by DRM eDP panel driver during system probe time. During incorporating procedure, original customized pm realted fucntions, such as dp_pm_prepare(), dp_pm_suspend(),

[PATCH v9 1/7] drm/msm/dp: tie dp_display_irq_handler() with dp driver

2023-12-01 Thread Kuogee Hsieh
Currently the dp_display_request_irq() is executed at msm_dp_modeset_init() which ties irq registering to the DPU device's life cycle, while depending on resources that are released as the DP device is torn down. Move register DP driver irq handler to dp_display_probe() to have

[PATCH v9 6/7] drm/msm/dp: delete EV_HPD_INIT_SETUP

2023-12-01 Thread Kuogee Hsieh
EV_HPD_INIT_SETUP flag is used to trigger the initialization of external DP host controller. Since external DP host controller initialization had been incorporated into pm_runtime_resume(), this flag became obsolete. msm_dp_irq_postinstall() which triggers EV_HPD_INIT_SETUP event is obsoleted

[PATCH v9 3/7] drm/msm/dp: use drm_bridge_hpd_notify() to report HPD status changes

2023-12-01 Thread Kuogee Hsieh
Currently DP driver use drm_helper_hpd_irq_event(), bypassing drm bridge framework, to report HPD status changes to user space frame work. Replace it with drm_bridge_hpd_notify() since DP driver is part of drm bridge. Signed-off-by: Kuogee Hsieh Reviewed-by: Dmitry Baryshkov ---

[PATCH v9 2/7] drm/msm/dp: rename is_connected with link_ready

2023-12-01 Thread Kuogee Hsieh
The is_connected flag is set to true after DP mainlink successfully finishes link training to enter into ST_MAINLINK_READY state rather than being set after the DP dongle is connected. Rename the is_connected flag with link_ready flag to match the state of DP driver's state machine. Changes in

Re: [PATCH 09/17] drm/msm/mdp5: use drmm-managed allocation for mdp5_encoder

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Change struct mdp5_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on encoder destruction. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_encoder.c | 29 +++-

Re: [PATCH 08/17] drm/msm/mdp5: use drmm-managed allocation for mdp5_crtc

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Change struct mdp5_crtc allocation to use drmm_crtc_alloc(). This removes the need to perform any actions on CRTC destruction. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_crtc.c | 30 +++ 1 file

Re: [PATCH 07/17] drm/msm/mdp5: use devres-managed allocation for INTF data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create INTF data structure. This allows us to remove corresponding kfree() call. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-)

Re: [PATCH 06/17] drm/msm/mdp5: use devres-managed allocation for SMP data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create SMP data structure. This allows us to remove corresponding kfree and drop mdp5_smp_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 3 ---

Re: [PATCH 05/17] drm/msm/mdp5: use devres-managed allocation for pipe data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create pipe data structure. This allows us to remove corresponding kfree and drop mdp5_pipe_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 6 +-

Re: [PATCH 04/17] drm/msm/mdp5: use devres-managed allocation for mixer data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create mixer data structure. This allows us to remove corresponding kfree and drop mdp5_mixer_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_kms.c | 5 +

Re: [PATCH 03/17] drm/msm/mdp5: use devres-managed allocation for CTL manager data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create CTL manager data structure. This allows us to remove corresponding kfree and drop mdp5_ctlm_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_ctl.c | 21 -

Re: [PATCH 03/17] drm/msm/mdp5: use devres-managed allocation for CTL manager data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create CTL manager data structure. This allows us to remove corresponding kfree and drop mdp5_ctlm_destroy() function. Signed-off-by: Dmitry Baryshkov --- Reviewed-by: Abhinav Kumar

Re: [Freedreno] [PATCH 02/17] drm/msm/mdp5: use devres-managed allocation for configuration data

2023-12-01 Thread Abhinav Kumar
On 7/7/2023 6:03 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create configuration data structure. This allows us to remove corresponding kfree and drop mdp5_cfg_destroy() function. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/mdp5/mdp5_cfg.c | 24

[PATCH RESEND] drm/atomic-helper: rename drm_atomic_helper_check_wb_encoder_state

2023-12-01 Thread Dmitry Baryshkov
The drm_atomic_helper_check_wb_encoder_state() function doesn't use encoder for anything other than getting the drm_device instance. The function's description talks about checking the writeback connector state, not the encoder state. Moreover, there is no such thing as an encoder state, encoders

Re: [PATCH 2/3] drm/msm/adreno: Add A305B support

2023-12-01 Thread Konrad Dybcio
On 30.11.2023 21:35, Luca Weiss wrote: > Add support for the Adreno 305B GPU that is found in MSM8226(v2) SoC. > Previously this was mistakenly claimed to be supported but using wrong > a configuration. > > In MSM8226v1 there's also a A305B but with chipid 0x03000510 which > should work with the

epoll + dmabuf + close = Kernel BUG NULL pointer dereference

2023-12-01 Thread Joshua Ashton
Hello! I was rewriting the code in our compositor for Steam Deck, Gamescope, to use epoll for dmabuf image waits. I found out that using epoll + dmabufs + close(...) while it is added to the epoll causes a NULL pointer dereference BUG in the kernel. Using epoll_ctl with EPOLL_CTL_DEL before

Re: [PATCH 2/2] drm/msm/dpu: Set input_sel bit for INTF

2023-12-01 Thread Abhinav Kumar
On 11/30/2023 11:36 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 03:31, Jessica Zhang wrote: Set the input_sel bit for encoders as it was missed in the initial implementation. Reported-by: Rob Clark Fixes: 91143873a05d ("drm/msm/dpu: Add MISR register support for interface") Closes:

Re: [RFC PATCH 0/6] Supporting GMEM (generalized memory management) for external memory devices

2023-12-01 Thread Philipp Stanner
On Fri, 2023-12-01 at 02:37 +, zhuweixi wrote: > From your argument on KVM I can see that the biggest miscommunication > between us is that you believed that GMEM wanted to share the whole > address space. No, it is not the case. GMEM is only providing > coordination via certain mmap() calls.

[PATCH v4 11/13] drm/msm/dpu: use drmm-managed allocation for dpu_encoder_phys

2023-12-01 Thread Dmitry Baryshkov
Change struct allocation of encoder's phys backend data to use drmm_kzalloc(). This removes the need to perform any actions on encoder destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 9

[PATCH v4 12/13] drm/msm/dpu: drop dpu_encoder_phys_ops::destroy

2023-12-01 Thread Dmitry Baryshkov
Drop the dpu_encoder_phys_ops' destroy() callback. No phys backend implements it anymore, so it is useless. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c| 18 -- .../gpu/drm/msm/disp/dpu1/dpu_encoder_phys.h | 2

[PATCH v4 13/13] drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt

2023-12-01 Thread Dmitry Baryshkov
It is incorrect to use devm-managed memory allocations for DRM data structures exposed to userspace. They should use drmm_ allocations. Change struct dpu_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions on encoder destruction. Reviewed-by: Jessica Zhang

[PATCH v4 10/13] drm/msm/dpu: use drmm-managed allocation for dpu_crtc

2023-12-01 Thread Dmitry Baryshkov
Change struct dpu_crtc allocation to use drmm_crtc_alloc_with_planes(). This removes the need to perform any actions on CRTC destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c | 25 +++- 1 file changed, 7

[PATCH v4 07/13] drm/msm/dpu: drop unused dpu_plane::lock

2023-12-01 Thread Dmitry Baryshkov
The field dpu_plane::lock was never used for protecting any kind of data. Drop it now. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 6 -- 1 file changed, 6 deletions(-) diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c

[PATCH v4 02/13] drm/msm/dpu: remove IS_ERR_OR_NULL for dpu_hw_intr_init() error handling

2023-12-01 Thread Dmitry Baryshkov
Using IS_ERR_OR_NULL() together with PTR_ERR() is a typical mistake. If the value is NULL, then the function will return 0 instead of a proper return code. Replace IS_ERR_OR_NULL() with IS_ERR() in the dpu_hw_intr_init() error check. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov

[PATCH v4 08/13] drm/msm/dpu: remove QoS teardown on plane destruction

2023-12-01 Thread Dmitry Baryshkov
There is little point in disabling QoS on plane destruction: it happens during DPU device destruction process, after which there will be no running planes. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 7 --- 1 file changed, 7

[PATCH v4 09/13] drm/msm/dpu: use drmm-managed allocation for dpu_plane

2023-12-01 Thread Dmitry Baryshkov
Change struct dpu_plane allocation to use drmm_universal_plane_alloc(). This removes the need to perform any actions on plane destruction. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_plane.c | 46 +-- 1 file changed, 10

[PATCH v4 04/13] drm/msm/dpu: use devres-managed allocation for VBIF data

2023-12-01 Thread Dmitry Baryshkov
Use devm_kzalloc to create VBIF data structure. This allows us to remove corresponding kfree and drop dpu_hw_vbif_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_vbif.c | 14 ++

[PATCH v4 06/13] drm/msm/dpu: use devres-managed allocation for HW blocks

2023-12-01 Thread Dmitry Baryshkov
Use devm_kzalloc to create HW block structure. This allows us to remove corresponding kfree and drop all dpu_hw_*_destroy() functions as well as dpu_rm_destroy(), which becomes empty afterwards. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov ---

[PATCH v4 05/13] drm/msm/dpu: use devres-managed allocation for MDP TOP

2023-12-01 Thread Dmitry Baryshkov
Use devm_kzalloc to create MDP TOP structure. This allows us to remove corresponding kfree and drop dpu_hw_mdp_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_top.c | 17 +++--

[PATCH v4 03/13] drm/msm/dpu: use devres-managed allocation for interrupts data

2023-12-01 Thread Dmitry Baryshkov
Use devm_kzalloc to create interrupts data structure. This allows us to remove corresponding kfree and drop dpu_hw_intr_destroy() function. Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_hw_interrupts.c | 14 ++

[PATCH v4 01/13] drm/msm/dpu: cleanup dpu_kms_hw_init error path

2023-12-01 Thread Dmitry Baryshkov
It was noticed that dpu_kms_hw_init()'s error path contains several labels which point to the same code path. Replace all of them with a single label. Suggested-by: Konrad Dybcio Reviewed-by: Jessica Zhang Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 25

[PATCH v4 00/13] drm/msm/dpu: use managed memory allocations

2023-12-01 Thread Dmitry Baryshkov
In a lots of places in DPU driver memory is allocated by using the kzalloc and then manually freed using kfree. However thes memory chunks have a well-defined life cycle. They are either a part of the driver's runtime and can be devm_kzalloc'ed or are exposed to userspace via the DRM objects and

Re: [Freedreno] [PATCH 11/16] drm/msm/dpu: add an API to setup the CDM block for writeback

2023-12-01 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 21:04, Abhinav Kumar wrote: > > > > On 11/30/2023 11:20 PM, Dmitry Baryshkov wrote: > > On Fri, 1 Dec 2023 at 02:41, Abhinav Kumar > > wrote: > >> > >> > >> > >> On 8/30/2023 5:11 PM, Dmitry Baryshkov wrote: > >>> On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar > >>> wrote:

Re: [PATCH v3 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-12-01 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 21:14, Abhinav Kumar wrote: > > > > On 11/30/2023 11:45 PM, Dmitry Baryshkov wrote: > > On Fri, 1 Dec 2023 at 03:41, Paloma Arellano > > wrote: > >> > >> When the irq callback returns a value other than zero, > >> modify vblank_refcount by performing the inverse > >>

Re: [PATCH 06/16] drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block

2023-12-01 Thread Dmitry Baryshkov
On Fri, 1 Dec 2023 at 20:19, Abhinav Kumar wrote: > > > > On 11/30/2023 11:05 PM, Dmitry Baryshkov wrote: > > On Fri, 1 Dec 2023 at 01:36, Abhinav Kumar > > wrote: > >> > >> > >> > >> On 8/30/2023 5:00 PM, Dmitry Baryshkov wrote: > >>> On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar > >>> wrote:

Re: [PATCH v3 0/2] Stabilize use of vblank_refcount

2023-12-01 Thread Paloma Arellano
On 11/30/2023 11:41 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 03:41, Paloma Arellano wrote: There is currently a race condition occuring when accessing vblank_refcount. Therefore, vblank irq timeouts may occur. Avoid any vblank irq timeouts by stablizing the use of vblank_refcount.

Re: [PATCH v3 08/13] drm/msm/dpu: remove QoS teardown on plane destruction

2023-12-01 Thread Jessica Zhang
On 7/29/2023 6:19 PM, Dmitry Baryshkov wrote: There is little point in disabling QoS on plane destruction: it happens during DPU device destruction process, after which there will be no running planes. Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang ---

Re: [PATCH v3 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-12-01 Thread Abhinav Kumar
On 12/1/2023 8:22 AM, Bjorn Andersson wrote: On Fri, Dec 01, 2023 at 10:34:50AM +0200, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 05:47, Bjorn Andersson wrote: On Thu, Nov 30, 2023 at 05:40:55PM -0800, Paloma Arellano wrote: [..] @@ -2386,6 +2390,7 @@ struct drm_encoder

Re: [PATCH v3 13/13] drm/msm/dpu: use drmm-managed allocation for dpu_encoder_virt

2023-12-01 Thread Jessica Zhang
On 7/29/2023 6:19 PM, Dmitry Baryshkov wrote: It is incorrect to use devm-managed memory allocations for DRM data structures exposed to userspace. They should use drmm_ allocations. Change struct dpu_encoder allocation to use drmm_encoder_alloc(). This removes the need to perform any actions

Re: [PATCH v3 1/2] drm/msm/dpu: Modify vblank_refcount if error in callback

2023-12-01 Thread Abhinav Kumar
On 11/30/2023 11:45 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 03:41, Paloma Arellano wrote: When the irq callback returns a value other than zero, modify vblank_refcount by performing the inverse operation of its corresponding if-else condition. I think it might be better to

Re: [Freedreno] [PATCH v3 01/13] drm/msm/dpu: cleanup dpu_kms_hw_init error path

2023-12-01 Thread Jessica Zhang
On 7/29/2023 6:19 PM, Dmitry Baryshkov wrote: It was noticed that dpu_kms_hw_init()'s error path contains several labels which point to the same code path. Replace all of them with a single label. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang

Re: [PATCH 11/16] drm/msm/dpu: add an API to setup the CDM block for writeback

2023-12-01 Thread Abhinav Kumar
On 11/30/2023 11:20 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 02:41, Abhinav Kumar wrote: On 8/30/2023 5:11 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: Add an API dpu_encoder_helper_phys_setup_cdm() which can be used by the writeback encoder

Re: [PATCH v3 05/13] drm/msm/dpu: use devres-managed allocation for MDP TOP

2023-12-01 Thread Jessica Zhang
On 8/16/2023 12:27 AM, Dmitry Baryshkov wrote: Hi Jessica, On Tue, 15 Aug 2023 at 23:17, Jessica Zhang wrote: On 7/29/2023 6:19 PM, Dmitry Baryshkov wrote: Use devm_kzalloc to create MDP TOP structure. This allows us to remove corresponding kfree and drop dpu_hw_mdp_destroy() function.

Re: [PATCH 06/16] drm/msm/dpu: add dpu_hw_cdm abstraction for CDM block

2023-12-01 Thread Abhinav Kumar
On 11/30/2023 11:05 PM, Dmitry Baryshkov wrote: On Fri, 1 Dec 2023 at 01:36, Abhinav Kumar wrote: On 8/30/2023 5:00 PM, Dmitry Baryshkov wrote: On Thu, 31 Aug 2023 at 01:50, Abhinav Kumar wrote: CDM block comes with its own set of registers and operations which can be done. In-line

[pull] amdgpu, amdkfd, radeon drm-next-6.8

2023-12-01 Thread Alex Deucher
Hi Dave, Sima, New stuff for 6.8. The following changes since commit e8c2d3e25b844ad8f7c8b269a7cfd65285329264: drm/amdgpu/gmc9: disable AGP aperture (2023-11-17 00:58:41 -0500) are available in the Git repository at: https://gitlab.freedesktop.org/agd5f/linux.git

Re: [PATCH] drm/doc: Define KMS atomic state set

2023-12-01 Thread Ville Syrjälä
On Fri, Dec 01, 2023 at 06:16:16PM +0200, Pekka Paalanen wrote: > On Fri, 1 Dec 2023 17:00:32 +0200 > Ville Syrjälä wrote: > > > On Thu, Nov 30, 2023 at 05:07:40PM -0300, André Almeida wrote: > > > From: Pekka Paalanen > > > > > > Specify how the atomic state is maintained between userspace

Re: [RFC] drm: enable W=1 warnings by default across the subsystem

2023-12-01 Thread Nathan Chancellor
On Thu, Nov 30, 2023 at 10:52:17AM +0200, Jani Nikula wrote: > On Wed, 29 Nov 2023, Hamza Mahfooz wrote: > > Cc: Nathan Chancellor > > > > On 11/29/23 13:12, Jani Nikula wrote: > >> At least the i915 and amd drivers enable a bunch more compiler warnings > >> than the kernel defaults. > >> > >>

Re: [PATCH 0/2] Convert to persistent DRM devices

2023-12-01 Thread Jeffrey Hugo
On 11/17/2023 10:43 AM, Jeffrey Hugo wrote: The qaic driver currently creates and destroys the DRM devices when the qaic device is in an operational state for userspace. This does not match what other DRM drivers do, and leads to a few race conditions that need to be handled. Instead, create

Re: [PATCH 6/9] drm/panel: himax-hx8394: Add Support for Powkiddy X55 panel

2023-12-01 Thread Chris Morgan
On Thu, Nov 30, 2023 at 09:19:40PM -0600, Kendrick Curry wrote: > On Thu, Nov 30, 2023 at 09:56:21AM -0600, Chris Morgan wrote: > > From: Chris Morgan > > > > Add support for the Powkiddy X55 panel as used on the Powkiddy X55 > > handheld gaming console. This panel uses a Himax HX8394 display > >

Re: Radeon regression in 6.6 kernel

2023-12-01 Thread Alex Deucher
Phillip, Can you test this patch? I was not able to repro the issue on the navi2x card I had handy, but I think it should fix it. Thanks, Alex On Wed, Nov 29, 2023 at 3:49 PM Alex Deucher wrote: > > On Wed, Nov 29, 2023 at 3:10 PM Alex Deucher wrote: > > > > Actually I think I see the

Re: [PATCH] drm/msm/dpu: Add missing safe_lut_tbl in sc8180x catalog

2023-12-01 Thread Bjorn Andersson
On Fri, Dec 01, 2023 at 09:06:45AM +0100, Johan Hovold wrote: > On Thu, Nov 30, 2023 at 04:35:01PM -0800, Bjorn Andersson wrote: > > Similar to SC8280XP, the misconfigured SAFE logic causes rather > > significant delays in __arm_smmu_tlb_sync(), resulting in poor > > performance for things such as

Re: [PATCH] drm/i915/dsi: Use devm_gpiod_get() for all GPIOs

2023-12-01 Thread Andy Shevchenko
On Fri, Dec 01, 2023 at 05:11:30PM +0100, Hans de Goede wrote: > soc_gpio_set_value() already uses devm_gpiod_get(), lets be consistent > and use devm_gpiod_get() for all GPIOs. > > This allows removing the intel_dsi_vbt_gpio_cleanup() function, > which only function was to put the

Re: [PATCH v3 2/2] drm/msm/dpu: Add mutex lock in control vblank irq

2023-12-01 Thread Bjorn Andersson
On Fri, Dec 01, 2023 at 10:34:50AM +0200, Dmitry Baryshkov wrote: > On Fri, 1 Dec 2023 at 05:47, Bjorn Andersson > wrote: > > On Thu, Nov 30, 2023 at 05:40:55PM -0800, Paloma Arellano wrote: [..] > > > @@ -2386,6 +2390,7 @@ struct drm_encoder *dpu_encoder_init(struct > > > drm_device *dev, > >

  1   2   >