[PATCH v2] drm/bridge_connector: Handle drm_connector_init_with_ddc() failures

2023-06-19 Thread Geert Uytterhoeven
drm_connector_init_with_ddc() can fail, but the call in drm_bridge_connector_init() does not check that. Fix this by adding the missing error handling. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v2: - Move declaration of ret to its own line, - Add Reviewed-by. ---

[PATCH 4/4] drm/rockchip: vop2: Add missing call to crtc reset helper

2023-06-19 Thread Jonas Karlman
Add missing call to crtc reset helper to properly vblank reset. Also move vop2_crtc_reset and call vop2_crtc_destroy_state to simplify and remove duplicated code. Fixes: 604be85547ce ("drm/rockchip: Add VOP2 driver") Signed-off-by: Jonas Karlman --- drivers/gpu/drm/rockchip/rockchip_drm_vop2.c

[PATCH 2/4] drm/rockchip: vop: Use cleanup helper directly as destroy funcs

2023-06-19 Thread Jonas Karlman
vop_plane_destroy and vop_crtc_destroy are plain wrappers around drm_plane_cleanup and drm_crtc_cleanup. Use them directly as plane and crtc funcs to closer match VOP2 driver. Signed-off-by: Jonas Karlman --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 16 +++- 1 file changed, 3 in

[PATCH 3/4] drm/rockchip: vop2: Don't crash for invalid duplicate_state

2023-06-19 Thread Jonas Karlman
It's possible for users to try to duplicate the CRTC state even when the state doesn't exist. drm_atomic_helper_crtc_duplicate_state() (and other users of __drm_atomic_helper_crtc_duplicate_state()) already guard this with a WARN_ON() instead of crashing, so let's do that here too. Fixes: 604be855

[PATCH 1/4] drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs

2023-06-19 Thread Jonas Karlman
struct rockchip_crtc_state members such as output_type, output_bpc and enable_afbc is always reset to zero in the atomic_duplicate_state crtc funcs. Fix this by using kmemdup on the subclass rockchip_crtc_state struct. Fixes: 4e257d9eee23 ("drm/rockchip: get rid of rockchip_drm_crtc_mode_config")

[PATCH 0/4] drm/rockchip: Fix crtc duplicate state and crtc reset funcs

2023-06-19 Thread Jonas Karlman
-20230619-duplicate-state Jonas Karlman (4): drm/rockchip: vop: Fix crtc duplicate state drm/rockchip: vop: User cleanup helpers directly as destroy ops drm/rockchip: vop2: Don't crash for invalid duplicate_state drm/rockchip: vop2: Add missing call to crtc reset helper drivers/gp

Re: [PATCH 01/13] drm: execution context for GEM buffers v4

2023-06-19 Thread Boris Brezillon
On Mon, 19 Jun 2023 14:29:23 +0200 Boris Brezillon wrote: > On Mon, 19 Jun 2023 12:44:06 +0200 > Christian König wrote: > > > Am 19.06.23 um 12:12 schrieb Boris Brezillon: > > > [SNIP] > > > Note that the drm_exec_until_all_locked() helper I introduced is taking > > > an expression, so in the

Re: [PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-19 Thread Christian König
Hi Danilo, sorry for the delayed reply. I've trying to dig myself out of a hole at the moment. Am 20.06.23 um 02:42 schrieb Danilo Krummrich: [SNIP] diff --git a/include/drm/drm_gem.h b/include/drm/drm_gem.h index bbc721870c13..5ec8148a30ee 100644 --- a/include/drm/drm_gem.h +++ b/include/drm

Re: [PATCH 1/2] fbdev/offb: Update expected device name

2023-06-19 Thread Helge Deller
On 6/15/23 23:19, Cyril Brulebois wrote: Hi Rob, Rob Herring (2023-06-15): On Thu, Jun 15, 2023 at 03:21:07PM +0200, Michal Suchánek wrote: At the time this was proposed it was said that "of-display", is wrong, and that "of-display.0" must be used for the first device instead, and if somethin

RE: [PATCH] mm: fix hugetlb page unmap count balance issue

2023-06-19 Thread Kasireddy, Vivek
Hi Gerd, > > On Mon, May 15, 2023 at 10:04:42AM -0700, Mike Kravetz wrote: > > On 05/12/23 16:29, Mike Kravetz wrote: > > > On 05/12/23 14:26, James Houghton wrote: > > > > On Fri, May 12, 2023 at 12:20 AM Junxiao Chang > wrote: > > > > > > > > This alone doesn't fix mapcounting for PTE-mapped H

[PATCH v2] drm/bridge: lt9611uxc: Add MODULE_FIRMWARE macro

2023-06-19 Thread Juerg Haefliger
The module loads firmware so add a MODULE_FIRMWARE macro to provide that information via modinfo. Signed-off-by: Juerg Haefliger Reviewed-by: Robert Foss --- v2: - Introduce FW_FILE macro - Add Rob's r-b --- drivers/gpu/drm/bridge/lontium-lt9611uxc.c | 6 +- 1 file changed, 5 insertions

[PATCH v2] drm/msm/adreno: Add missing MODULE_FIRMWARE macros

2023-06-19 Thread Juerg Haefliger
The driver references some firmware files that don't have corresponding MODULE_FIRMWARE macros and thus won't be listed via modinfo. Fix that. Signed-off-by: Juerg Haefliger --- v2: - Drop addition and removal of zap files (needs more discussion) - Add new a690_gmu.bin - Update commit subj

Re: [PATCH] drm/msm/adreno: Update MODULE_FIRMWARE macros

2023-06-19 Thread Juerg Haefliger
On Fri, 16 Jun 2023 21:25:01 +0530 Akhil P Oommen wrote: > On Fri, Jun 16, 2023 at 02:28:15PM +0200, Juerg Haefliger wrote: > > > > Add missing MODULE_FIRMWARE macros and remove some for firmwares that > > the driver no longer references. > > > > Signed-off-by: Juerg Haefliger > > --- > > dri

[PATCH] drm/amd/amdgpu: Properly tune the size of struct

2023-06-19 Thread Su Hui
Smatch error: gpu/drm/amd/amdgpu/amdgv_sriovmsg.h:316:49: error: static assertion failed: "amd_sriov_msg_pf2vf_info must be 1 KB" static assertion failed: "amd_sriov_msg_vf2pf_info must be 1 KB" Fixes: 1721bc1b2afa ("drm/amdgpu: Update VF2PF interface") Signed-off-by: Su Hui --- driv

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-19 Thread Tatsuyuki Ishi
On 6/20/23 13:07, Tatsuyuki Ishi wrote: @@ -1296,9 +1271,8 @@ static int amdgpu_cs_submit(struct amdgpu_cs_parser *p,    */   r = 0;   amdgpu_bo_list_for_each_userptr_entry(e, p->bo_list) { -    struct amdgpu_bo *bo = ttm_to_amdgpu_bo(e->tv.bo); - -    r |= !amdgpu_ttm_tt_get

Re: [PATCH] drm/drm_gem.c: remove surplus else after return clause

2023-06-19 Thread Sui Jingfeng
ping ? On 2023/3/14 20:53, Sui Jingfeng wrote: else is not generally useful after return Signed-off-by: Sui Jingfeng <15330273...@189.cn> --- drivers/gpu/drm/drm_gem.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_gem.c b/drivers/gpu/drm/drm

Re: [PATCH 06/13] drm/amdgpu: use the new drm_exec object for CS v2

2023-06-19 Thread Tatsuyuki Ishi
+Boris and +Matthew in case you want to take over this patch set. Here are some review / testing comments, including those I posted before to ease tracking. On 5/4/23 20:51, Christian König wrote: Use the new component here as well and remove the old handling. v2: drop dupplicate handling S

Re: [PATCH drm-next v5 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-06-19 Thread Dave Airlie
Since this is feature is nouveau only currently and doesn't disturb the current nouveau code paths, I'd like to try and get this work in tree so other drivers can work from it. If there are any major objections to this, I'm happy to pull it back out again, but I'd like to get some acks/rb in the n

Re: [PATCH v2] drm/logicvc: Kconfig: select REGMAP and REGMAP_MMIO

2023-06-19 Thread Sui Jingfeng
Hi, On 2023/6/8 15:15, Paul Kocialkowski wrote: Hi, On Thu 08 Jun 23, 10:42, Sui Jingfeng wrote: drm/logicvc driver is depend on REGMAP and REGMAP_MMIO, should select this two kconfig option, otherwise the driver failed to compile on platform without REGMAP_MMIO selected: ERROR: modpost: "__d

Re: [PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-19 Thread kernel test robot
Hi Danilo, kernel test robot noticed the following build warnings: [auto build test WARNING on dcb0775d36de28992f56455ab3967b30d380] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers-v4/20230620-084448 base: dcb0775d36de28992

Re: [PATCH v6 2/8] PCI/VGA: Deal only with VGA class devices

2023-06-19 Thread Sui Jingfeng
Hi, On 2023/6/20 02:12, Limonciello, Mario wrote: On 6/12/2023 2:25 PM, Sui Jingfeng wrote: From: Sui Jingfeng Deal only with the VGA devcie(pdev->class == 0x0300), so replace the pci_get_subsys() function with pci_get_class(). Filter the non-PCI display device(pdev->class != 0x0300) out. T

Re: [PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-19 Thread kernel test robot
Hi Danilo, kernel test robot noticed the following build warnings: [auto build test WARNING on dcb0775d36de28992f56455ab3967b30d380] url: https://github.com/intel-lab-lkp/linux/commits/Danilo-Krummrich/drm-execution-context-for-GEM-buffers-v4/20230620-084448 base: dcb0775d36de28992

linux-next: manual merge of the fbdev tree with the drm tree

2023-06-19 Thread Stephen Rothwell
Hi all, Today's linux-next merge of the fbdev tree got a conflict in: drivers/video/fbdev/hitfb.c between commit: bb47f218fd01 ("fbdev/hitfb: Cast I/O offset to address") from the drm tree and commit: dadeeffbe525 ("fbdev: hitfb: Use NULL for pointers") from the fbdev tree. I fixed it

Re: [PATCH drm-next v5 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-06-19 Thread Danilo Krummrich
Hi Donald, forgot to add your email address to the patch series - sorry about that. This series (v5) contains the Documentation changes you requested. - Danilo On 6/20/23 02:42, Danilo Krummrich wrote: This patch series provides a new UAPI for the Nouveau driver in order to support Vulkan fea

[PATCH drm-next v5 14/14] drm/nouveau: debugfs: implement DRM GPU VA debugfs

2023-06-19 Thread Danilo Krummrich
Provide the driver indirection iterating over all DRM GPU VA spaces to enable the common 'gpuvas' debugfs file for dumping DRM GPU VA spaces. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_debugfs.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a

[PATCH drm-next v5 13/14] drm/nouveau: implement new VM_BIND uAPI

2023-06-19 Thread Danilo Krummrich
This commit provides the implementation for the new uapi motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl for UMDs to specify the portion of VA space managed by the kernel and usersp

[PATCH drm-next v5 12/14] drm/nouveau: nvkm/vmm: implement raw ops to manage uvmm

2023-06-19 Thread Danilo Krummrich
The new VM_BIND UAPI uses the DRM GPU VA manager to manage the VA space. Hence, we a need a way to manipulate the MMUs page tables without going through the internal range allocator implemented by nvkm/vmm. This patch adds a raw interface for nvkm/vmm to pass the resposibility for managing the add

[PATCH drm-next v5 11/14] drm/nouveau: chan: provide nouveau_channel_kill()

2023-06-19 Thread Danilo Krummrich
The new VM_BIND UAPI implementation introduced in subsequent commits will allow asynchronous jobs processing push buffers and emitting fences. If a job times out, we need a way to recover from this situation. For now, simply kill the channel to unblock all hung up jobs and signal userspace that th

[PATCH drm-next v5 10/14] drm/nouveau: fence: fail to emit when fence context is killed

2023-06-19 Thread Danilo Krummrich
The new VM_BIND UAPI implementation introduced in subsequent commits will allow asynchronous jobs processing push buffers and emitting fences. If a fence context is killed, e.g. due to a channel fault, jobs which are already queued for execution might still emit new fences. In such a case a job wo

[PATCH drm-next v5 09/14] drm/nouveau: fence: separate fence alloc and emit

2023-06-19 Thread Danilo Krummrich
The new (VM_BIND) UAPI exports DMA fences through DRM syncobjs. Hence, in order to emit fences within DMA fence signalling critical sections (e.g. as typically done in the DRM GPU schedulers run_job() callback) we need to separate fence allocation and fence emitting. Signed-off-by: Danilo Krummric

[PATCH drm-next v5 08/14] drm/nouveau: move usercopy helpers to nouveau_drv.h

2023-06-19 Thread Danilo Krummrich
Move the usercopy helpers to a common driver header file to make it usable for the new API added in subsequent commits. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_drv.h | 26 ++ drivers/gpu/drm/nouveau/nouveau_gem.c | 26 --

[PATCH drm-next v5 07/14] drm/nouveau: bo: initialize GEM GPU VA interface

2023-06-19 Thread Danilo Krummrich
Initialize the GEM's DRM GPU VA manager interface in preparation for the (u)vmm implementation, provided by subsequent commits, to make use of it. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_bo.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/nouve

[PATCH drm-next v5 06/14] drm/nouveau: get vmm via nouveau_cli_vmm()

2023-06-19 Thread Danilo Krummrich
Provide a getter function for the client's current vmm context. Since we'll add a new (u)vmm context for UMD bindings in subsequent commits, this will keep the code clean. Signed-off-by: Danilo Krummrich --- drivers/gpu/drm/nouveau/nouveau_bo.c | 2 +- drivers/gpu/drm/nouveau/nouveau_chan.c |

[PATCH drm-next v5 05/14] drm/nouveau: new VM_BIND uapi interfaces

2023-06-19 Thread Danilo Krummrich
This commit provides the interfaces for the new UAPI motivated by the Vulkan API. It allows user mode drivers (UMDs) to: 1) Initialize a GPU virtual address (VA) space via the new DRM_IOCTL_NOUVEAU_VM_INIT ioctl. UMDs can provide a kernel reserved VA area. 2) Bind and unbind GPU VA space ma

[PATCH drm-next v5 04/14] drm: debugfs: provide infrastructure to dump a DRM GPU VA space

2023-06-19 Thread Danilo Krummrich
This commit adds a function to dump a DRM GPU VA space and a macro for drivers to register the struct drm_info_list 'gpuvas' entry. Most likely, most drivers might maintain one DRM GPU VA space per struct drm_file, but there might also be drivers not having a fixed relation between DRM GPU VA spac

[PATCH drm-next v5 03/14] drm: manager to keep track of GPUs VA mappings

2023-06-19 Thread Danilo Krummrich
Add infrastructure to keep track of GPU virtual address (VA) mappings with a decicated VA space manager implementation. New UAPIs, motivated by Vulkan sparse memory bindings graphics drivers start implementing, allow userspace applications to request multiple and arbitrary GPU VA mappings of buffe

[PATCH drm-next v5 02/14] maple_tree: split up MA_STATE() macro

2023-06-19 Thread Danilo Krummrich
Split up the MA_STATE() macro such that components using the maple tree can easily inherit from struct ma_state and build custom tree walk macros to hide their internals from users. Example: struct sample_iterator { struct ma_state mas; struct sample_mgr *mgr; }; \#define SAMPLE_

[PATCH drm-next v5 01/14] drm: execution context for GEM buffers v4

2023-06-19 Thread Danilo Krummrich
From: Christian König This adds the infrastructure for an execution context for GEM buffers which is similar to the existing TTMs execbuf util and intended to replace it in the long term. The basic functionality is that we abstracts the necessary loop to lock many different GEM buffers with auto

[PATCH drm-next v5 00/14] [RFC] DRM GPUVA Manager & Nouveau VM_BIND UAPI

2023-06-19 Thread Danilo Krummrich
This patch series provides a new UAPI for the Nouveau driver in order to support Vulkan features, such as sparse bindings and sparse residency. Furthermore, with the DRM GPUVA manager it provides a new DRM core feature to keep track of GPU virtual address (VA) mappings in a more generic way. The

[PATCH 5/8] drm/msm/dpu: drop the dpu_core_perf_crtc_update()'s stop_req param

2023-06-19 Thread Dmitry Baryshkov
The stop_req is true only in the dpu_crtc_disable() case, when crtc->enable has already been set to false. This renders the stop_req argument useless. Remove it completely. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 12 ++-- drivers/gpu/drm/msm/di

[PATCH 7/8] drm/msm/dpu: drop dpu_core_perf_destroy()

2023-06-19 Thread Dmitry Baryshkov
This function does nothing, just clears several data pointers. Drop it now. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 12 drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 6 -- drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 1 - 3 file

[PATCH 8/8] drm/msm/dpu: remove unused fields from struct dpu_core_perf

2023-06-19 Thread Dmitry Baryshkov
Remove dpu_core_perf::dev and dpu_core_perf::debugfs_root fields, they are not used by the code. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 2 -- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 4 drivers/gpu/drm/msm/disp/dpu1/dpu_kms.c | 2 +-

[PATCH 2/8] drm/msm/dpu: drop performance tuning modes

2023-06-19 Thread Dmitry Baryshkov
DPU performance module contains code to change performance state calculations. In addition to normal (sum plane and CRTC requirements), it can work in 'minimal' or 'fixed' modes. Both modes are impractical, since they can easily end up with the display underruns. Userspace also should not depend on

[PATCH 4/8] drm/msm/dpu: rework indentation in dpu_core_perf

2023-06-19 Thread Dmitry Baryshkov
dpu_core_perf.c contains several multi-line conditions which are hard to comprehent because of the indentation. Rework the identation of these conditions to make it easier to understand them. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 13 + 1

[PATCH 6/8] drm/msm/dpu: use dpu_perf_cfg in DPU core_perf code

2023-06-19 Thread Dmitry Baryshkov
Simplify dpu_core_perf code by using only dpu_perf_cfg instead of using full-featured catalog data. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 52 --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 8 +-- drivers/gpu/drm/msm/disp/dpu1/dp

[PATCH 1/8] drm/msm/dpu: drop enum dpu_core_perf_data_bus_id

2023-06-19 Thread Dmitry Baryshkov
Drop the leftover of bus-client -> interconnect conversion, the enum dpu_core_perf_data_bus_id. Fixes: cb88482e2570 ("drm/msm/dpu: clean up references of DPU custom bus scaling") Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.h | 13 - 1 file changed

[PATCH 3/8] drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib

2023-06-19 Thread Dmitry Baryshkov
The max_per_pipe_ib is a constant across all CRTCs and is read from the catalog. Drop corresponding calculations and read the value directly at icc_set_bw() time. Suggested-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/dpu_core_perf.c | 17 +

[PATCH 0/8] drm/msm/dpu: cleanup dpu_core_perf module

2023-06-19 Thread Dmitry Baryshkov
Apply several cleanups to the DPU's core_perf module. Dmitry Baryshkov (8): drm/msm/dpu: drop enum dpu_core_perf_data_bus_id drm/msm/dpu: drop performance tuning modes drm/msm/dpu: drop dpu_core_perf_params::max_per_pipe_ib drm/msm/dpu: rework indentation in dpu_core_perf drm/msm/dpu: dr

Re: [PATCH v4 4/6] dt-bindings: display: stm32-ltdc: add optional st,fb-bpp property

2023-06-19 Thread Rob Herring
On Mon, Jun 19, 2023 at 09:18:25PM +0100, Conor Dooley wrote: > Hey, > > On Mon, Jun 19, 2023 at 06:55:23PM +0200, Dario Binacchi wrote: > > Boards that use the STM32F{4,7} series have limited amounts of RAM. The > > added property allows to size, within certain limits, the memory footprint > > re

Re: [PATCH] drm/virtio: conditionally allocate virtio_gpu_fence

2023-06-19 Thread Dmitry Osipenko
On 6/13/23 20:43, Gurchetan Singh wrote: > We don't want to create a fence for every command submission. It's > only necessary when userspace provides a waitable token for submission. > This could be: > > 1) bo_handles, to be used with VIRTGPU_WAIT > 2) out_fence_fd, to be used with dma_fence api

Re: [PATCH] drm/msm: Fix typo in comment

2023-06-19 Thread Dmitry Baryshkov
On 18/06/2023 17:54, zhumao...@208suo.com wrote: Fix typo in comment of msm_gem.c. Signed-off-by: Zhu Mao ---  drivers/gpu/drm/msm/msm_gem.c | 4 ++--  1 file changed, 2 insertions(+), 2 deletions(-) This patch doesn't apply. Please use git send-email to send patches. -- With best wishes Dm

Re: [PATCH v3 2/2] drm/msm/dpu: remove struct drm_dsc_config from struct msm_display_info

2023-06-19 Thread Dmitry Baryshkov
On 14/06/2023 01:19, Kuogee Hsieh wrote: ince struct drm_dsc_config is stored at atomic_enable() instead of display setup time during boot up, saving struct drm_dsc_config at struct msm_display_info is not necessary. Lets drop the dsc member from struct msm_display_info. With the 'S' in 'Since'

Re: [PATCH v3 1/2] drm/msm/dpu: retrieve DSI DSC struct through priv->dsi[0]

2023-06-19 Thread Dmitry Baryshkov
On 14/06/2023 01:19, Kuogee Hsieh wrote: Currently struct drm_dsc_config for DSI is populated at display setup during system boot up. This mechanism works fine with embedded display but not for pluggable displays as the struct drm_dsc_config will become stale once external display is unplugged.

[PATCH v4 19/19] drm/msm/dpu: drop empty features mask INTF_SDM845_MASK

2023-06-19 Thread Dmitry Baryshkov
The INTF_SDM845_MASK features mask is zero. Drop it completely. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 4 drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 4 drivers/

[PATCH v4 17/19] drm/msm/dpu: inline INTF_BLK and INTF_BLK_DSI_TE macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 52 ++--

[PATCH v4 14/19] drm/msm/dpu: inline MERGE_3D_BLK macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_5_0_sm8150.h| 16 +

[PATCH v4 16/19] drm/msm/dpu: inline WB_BLK macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 14

[PATCH v4 12/19] drm/msm/dpu: inline LM_BLK macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 55 +

[PATCH v4 15/19] drm/msm/dpu: inline various PP_BLK_* macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 41 ++---

[PATCH v4 06/19] drm/msm/dpu: expand .clk_ctrls definitions

2023-06-19 Thread Dmitry Baryshkov
Use more standard initialisation for .clk_ctrls definitions. Define a single .clk_ctrls field and use array init inside. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 22 + .../msm/disp/

[PATCH v4 13/19] drm/msm/dpu: inline DSC_BLK and DSC_BLK_1_2 macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 9 - ..

[PATCH v4 18/19] drm/msm/dpu: drop empty features mask MERGE_3D_SM8150_MASK

2023-06-19 Thread Dmitry Baryshkov
The MERGE_3D_SM8150_MASK features mask is zero. Drop it completely. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_0_sm8150.h | 3 --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_5_1_sc8180x.h | 3 --- driv

[PATCH v4 09/19] drm/msm/dpu: correct indentation for CTL definitions

2023-06-19 Thread Dmitry Baryshkov
Shift dpu_ctl_cfg contents to correct the indentation of CTL blocks. This is done in preparation to expanding the rest of hardware block defines, so that all blocks have similar indentation. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/

[PATCH v4 07/19] drm/msm/dpu: drop zero features from dpu_mdp_cfg data

2023-06-19 Thread Dmitry Baryshkov
Drop useless zero assignments to the dpu_mdp_cfg::features field. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_0_sm8250.h | 1 - drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_6_2_sc7180.h | 1 - drivers/gpu/

[PATCH v4 11/19] drm/msm/dpu: inline DSPP_BLK macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 15 +++--

[PATCH v4 08/19] drm/msm/dpu: drop zero features from dpu_ctl_cfg data

2023-06-19 Thread Dmitry Baryshkov
Drop useless zero assignments to the dpu_ctl_cfg::features field. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 3 --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_4_0_sdm845.h | 3 --- 2 files

[PATCH v4 10/19] drm/msm/dpu: inline SSPP_BLK macros

2023-06-19 Thread Dmitry Baryshkov
To simplify making changes to the hardware block definitions, expand corresponding macros. This way making all the changes are more obvious and visible in the source files. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 81

[PATCH v4 05/19] drm/msm/dpu: drop enum dpu_mdp and MDP_TOP value

2023-06-19 Thread Dmitry Baryshkov
Since there is always just a single MDP_TOP instance, drop the enum dpu_mdp and corresponding index value. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 2 +- drivers/gpu/drm/msm/disp/dpu1/ca

[PATCH v4 03/19] drm/msm/dpu: simplify peer LM handling

2023-06-19 Thread Dmitry Baryshkov
For each LM there is at max 1 peer LM which can be driven by the same CTL, so there no need to have a mask instead of just an ID of the peer LM. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../gpu/drm/msm/disp/dpu1/dpu_hw_catalog.c| 2 +- .../

[PATCH v4 04/19] drm/msm/dpu: drop dpu_mdss_cfg::mdp_count field

2023-06-19 Thread Dmitry Baryshkov
There is always a single MDP TOP block. Drop the mdp_count field and stop declaring dpu_mdp_cfg instances as arrays. Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- .../msm/disp/dpu1/catalog/dpu_3_0_msm8998.h | 7 +--- .../msm/disp/dpu1/catalog/dpu_4_0_sdm845.h| 7 +--- ..

[PATCH v4 02/19] drm/msm/dpu: always use MSM_DP/DSI_CONTROLLER_n

2023-06-19 Thread Dmitry Baryshkov
In several catalog entries we did not use existing MSM_DP_CONTROLLER_n constants. Fill them in. Also use freshly defined MSM_DSI_CONTROLLER_n for DSI interfaces. Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/disp/dpu1/catalog/dpu_

[PATCH v4 01/19] drm/msm: enumerate DSI interfaces

2023-06-19 Thread Dmitry Baryshkov
Follow the DP example and define MSM_DSI_CONTROLLER_n enumeration. Reviewed-by: Abhinav Kumar Reviewed-by: Marijn Suijten Tested-by: Marijn Suijten Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/msm_drv.h | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/driv

[PATCH v4 00/19] drm/msm/dpu: another catalog rework

2023-06-19 Thread Dmitry Baryshkov
Having a macro with 10 arguments doesn't seem like a good idea. It makes it inherently harder to compare the actual structure values. Also this leads to adding macros covering varieties of the block. As it was previously discussed, inline all foo_BLK macros in order to ease performing changes to t

[PATCH v2] drm/msm/dsi: Document DSC related pclk_rate and hdisplay calculations

2023-06-19 Thread Dmitry Baryshkov
Provide actual documentation for the pclk and hdisplay calculations in the case of DSC compression being used. Signed-off-by: Dmitry Baryshkov --- Changes since v1: - Converted dsi_adjust_pclk_for_compression() into kerneldoc (Marijn) - Added a pointer from dsi_timing_setup() docs to dsi_adjus

Re: [PATCH] drm/msm/dsi: Document DSC related pclk_rate and hdisplay calculations

2023-06-19 Thread Dmitry Baryshkov
On 16/06/2023 15:25, Marijn Suijten wrote: On 2023-06-16 12:41:52, Dmitry Baryshkov wrote: Provide actual documentation for the pclk and hdisplay calculations in the case of DSC compression being used. Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dsi/dsi_host.c | 35 ++

Re: [PATCH] drm/bridge_connector: Handle drm_connector_init_with_ddc() failures

2023-06-19 Thread Laurent Pinchart
Hi Geert, Thank you for the patch. On Mon, Jun 19, 2023 at 02:24:21PM +0200, Geert Uytterhoeven wrote: > drm_connector_init_with_ddc() can fail, but the call in > drm_bridge_connector_init() does not check that. Fix this by adding > the missing error handling. > > Signed-off-by: Geert Uytterhoe

[PATCH] drm/panel: simple: Add connector_type for innolux_at043tn24

2023-06-19 Thread Fabio Estevam
From: Fabio Estevam The innolux at043tn24 display is a parallel LCD. Pass the 'connector_type' information to avoid the following warning: panel-simple panel: Specify missing connector_type Signed-off-by: Fabio Estevam --- drivers/gpu/drm/panel/panel-simple.c | 1 + 1 file changed, 1 insertio

Re: [PATCH v4 4/6] dt-bindings: display: stm32-ltdc: add optional st,fb-bpp property

2023-06-19 Thread Conor Dooley
Hey, On Mon, Jun 19, 2023 at 06:55:23PM +0200, Dario Binacchi wrote: > Boards that use the STM32F{4,7} series have limited amounts of RAM. The > added property allows to size, within certain limits, the memory footprint > required by the framebuffer. Hmm, this sounds quite a lot like "software po

Re: [PATCH v6 2/8] PCI/VGA: Deal only with VGA class devices

2023-06-19 Thread Limonciello, Mario
On 6/12/2023 2:25 PM, Sui Jingfeng wrote: From: Sui Jingfeng Deal only with the VGA devcie(pdev->class == 0x0300), so replace the pci_get_subsys() function with pci_get_class(). Filter the non-PCI display device(pdev->class != 0x0300) out. There no need to process the non-display PCI device.

Re: [PATCH v4 4/6] dt-bindings: display: stm32-ltdc: add optional st,fb-bpp property

2023-06-19 Thread Rob Herring
On Mon, 19 Jun 2023 18:55:23 +0200, Dario Binacchi wrote: > Boards that use the STM32F{4,7} series have limited amounts of RAM. The > added property allows to size, within certain limits, the memory footprint > required by the framebuffer. > > Signed-off-by: Dario Binacchi > --- > > (no change

[PATCH v4 6/6] drm/stm: set framebuffer bit depth through DTS property

2023-06-19 Thread Dario Binacchi
The patch, which is backwards compatible, sets the bit depth of the framebuffer using the optional property 'st,fb-bpp' in the DTS. Signed-off-by: Dario Binacchi --- Changes in v4: - Use DTS property instead of module parameter to set the framebuffer bit depth. Changes in v3: - drop [4/6] dt-b

[PATCH v4 4/6] dt-bindings: display: stm32-ltdc: add optional st, fb-bpp property

2023-06-19 Thread Dario Binacchi
Boards that use the STM32F{4,7} series have limited amounts of RAM. The added property allows to size, within certain limits, the memory footprint required by the framebuffer. Signed-off-by: Dario Binacchi --- (no changes since v1) .../devicetree/bindings/display/st,stm32-ltdc.yaml |

[PATCH v4 0/6] Add display support on the stm32f746-disco board

2023-06-19 Thread Dario Binacchi
The series adds support for the display on the stm32f746-disco board, along with a generic patch that adds the "bpp" parameter to the stm-drm module. The intention is to allow users to size, within certain limits, the memory footprint required by the framebuffer. Changes in v4: - Use DTS property

[PATCH v3 6/6] drm/msm/a6xx: Fix up GMU region reservations

2023-06-19 Thread Konrad Dybcio
Change the order of region allocations to make the addresses match downstream. This shouldn't matter very much, but helps eliminate one more difference when comparing register accesses. Also, make the log region 16K long. That's what it is, unconditionally on A6xx and A7xx. Signed-off-by: Konrad

[PATCH v3 5/6] drm/msm/a6xx: Improve GMU force shutdown sequence

2023-06-19 Thread Konrad Dybcio
The GMU force shutdown sequence involves some additional register cleanup which was not implemented previously. Do so. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/driver

[PATCH v3 0/6] Adreno QoL changes

2023-06-19 Thread Konrad Dybcio
This series brings some niceties in preparation for A7xx introduction. It should be fully independent of the GMU wrapper series. Signed-off-by: Konrad Dybcio --- Changes in v3: - Pull more definitions from mesa - Decode CP_PROTECT_CNTL bitfields - Rebase on next-20230619 - Link to v2: https

[PATCH v3 3/6] drm/msm/a6xx: Skip empty protection ranges entries

2023-06-19 Thread Konrad Dybcio
Some specific SKUs leave certain protection range registers empty. Allow for that behavior. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/m

[PATCH v3 4/6] drm/msm/a6xx: Ensure clean GMU state in a6xx_gmu_fw_start

2023-06-19 Thread Konrad Dybcio
While it's not very well understood, there is some sort of a fault handler implemented in the GMU firmware which triggers when a certain bit is set, resulting in the M3 core not booting up the way we expect it to. Write a magic value to a magic register to hopefully prevent that from happening. S

[PATCH v3 2/6] drm/msm/a6xx: Use descriptive bitfield names for CP_PROTECT_CNTL

2023-06-19 Thread Konrad Dybcio
We have the necessary information, so explain which bit does what. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gpu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gpu.c b/drivers/gpu/drm/msm/adreno/a6xx_gpu.c index b

[PATCH v3 1/6] drm/msm/a6xx: Add some missing header definitions

2023-06-19 Thread Konrad Dybcio
Add a definition of the GMU_AHB_FENCE_STATUS_CLR reg and CP_PROTECT_CNTL bitfields. This may be substituted with a mesa header sync. Signed-off-by: Konrad Dybcio --- drivers/gpu/drm/msm/adreno/a6xx_gmu.xml.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/msm/adreno/a6xx_g

[PATCH v3 6/6] drm/panel: sitronix-st7789v: Check display ID

2023-06-19 Thread Miquel Raynal
A very basic debugging rule when a device is connected for the first time is to access a read-only register which contains known data in order to ensure the communication protocol is properly working. This driver lacked any read helper which is often a critical piece for speeding-up bring-ups. Add

[PATCH v3 4/6] drm/panel: sitronix-st7789v: Clarify a definition

2023-06-19 Thread Miquel Raynal
The Sitronix datasheet explains BIT(1) of the RGBCTRL register as the DOTCLK/PCLK edge used to sample the data lines: “0” The data is input on the positive edge of DOTCLK “1” The data is input on the negative edge of DOTCLK IOW, this bit implies a falling edge and not a high state. Correc

[PATCH v3 5/6] drm/panel: sitronix-st7789v: Add EDT ET028013DMA panel support

2023-06-19 Thread Miquel Raynal
This panel from Emerging Display Technologies Corporation features an ST7789V2 LCD controller panel inside which is almost identical to what the Sitronix panel driver supports. In practice, the module physical size is specific, and experiments show that the display will malfunction if any of the f

[PATCH v3 3/6] drm/panel: sitronix-st7789v: Use 9 bits per spi word by default

2023-06-19 Thread Miquel Raynal
The Sitronix controller expects 9-bit words, provide this as default at probe time rather than specifying this in each and every access. Signed-off-by: Miquel Raynal Reviewed-by: Sam Ravnborg Acked-by: Maxime Ripard --- drivers/gpu/drm/panel/panel-sitronix-st7789v.c | 6 +- 1 file changed,

[PATCH v3 2/6] dt-bindings: display: st7789v: bound the number of Rx data lines

2023-06-19 Thread Miquel Raynal
The ST7789V LCD controller supports regular SPI wiring, as well as no Rx data line at all. The operating system needs to know whether it can read registers from the device or not. Let's detail this specific design possibility by bounding the spi-rx-bus-width property. Signed-off-by: Miquel Raynal

[PATCH v3 0/6] drm/panel: sitronix-st7789v: Support ET028013DMA panel

2023-06-19 Thread Miquel Raynal
Hello, The aim of this series is to add support for the EDT ET028013DMA panel. This panel features a Sitronix ST7789V2 LCD controller, which is already supported mainline (or very close to the ST7789V for which Maxime added support years ago). The EDT panel is slightly different on the geometry a

[PATCH v3 1/6] dt-bindings: display: st7789v: Add the edt, et028013dma panel compatible

2023-06-19 Thread Miquel Raynal
The ST7789V LCD controller is also embedded in the ET028013DMA panel. Add a compatible string to describe this other panel. Signed-off-by: Miquel Raynal Acked-by: Krzysztof Kozlowski Acked-by: Maxime Ripard --- .../devicetree/bindings/display/panel/sitronix,st7789v.yaml | 1 + 1 file chan

Re: [PATCH v2] drm/i915: Replace kmap() with kmap_local_page()

2023-06-19 Thread Sumitra Sharma
On Sun, Jun 18, 2023 at 11:11:08AM -0700, Ira Weiny wrote: > Sumitra Sharma wrote: > > kmap() has been deprecated in favor of the kmap_local_page() > > due to high cost, restricted mapping space, the overhead of a > > global lock for synchronization, and making the process sleep > > in the absence

[PATCH v2 6/6] drm/ttm: Don't shadow the operation context

2023-06-19 Thread Thomas Hellström
ttm_bo_swapout() shadows the ttm operation context which may cause major confusion in driver callbacks when swapping out !TTM_PL_SYSTEM memory. Fix this by reusing the operation context argument to ttm_bo_swapout(). Cc: "Christian König" Cc: Cc: Signed-off-by: Thomas Hellström Acked-by: Matthe

Re: [PATCH v2, 3/3] drm/mediatek: dsi: Add dsi cmdq_ctl to send panel initial code

2023-06-19 Thread Matthias Brugger
On 16/06/2023 09:36, Shuijing Li wrote: For mt8188, add dsi cmdq reg control to send long packets to panel initialization. Signed-off-by: Shuijing Li Signed-off-by: Jitao Shi Reviewed-by: Matthias Brugger --- Changes in v2: use mtk_dsi_mask(dsi, DSI_CMDQ_SIZE, CMDQ_SIZE_SEL, CMDQ_SIZE_

  1   2   >