Re: [PATCH v4,0/3] Add compatible to increase MT8188 audio control

2023-08-16 Thread 胡俊光

Re: [PATCH v4, 2/3] drm/mediatek: dp: Add the audio packet flag to mtk_dp_data struct

2023-08-16 Thread 胡俊光

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

2023-08-16 Thread Dmitry Baryshkov
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. > > > > Signed-off-by: Dmitry Baryshkov

Re: [PATCH v4 12/48] gfs2: dynamically allocate the gfs2-qd shrinker

2023-08-16 Thread Muchun Song
> On Aug 7, 2023, at 19:09, Qi Zheng wrote: > > Use new APIs to dynamically allocate the gfs2-qd shrinker. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

[PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP

2023-08-16 Thread David Michael
Encountered on an ARM Mali-T760 MP4, attempting to read the nvmem variable can also return EOPNOTSUPP instead of ENOENT when speed binning is unsupported. Cc: Fixes: 7d690f936e9b ("drm/panfrost: Add basic support for speed binning") Signed-off-by: David Michael --- Hi, I upgraded an old Chrome

Re: [PATCH] drm/i915: Fix Kconfig error for CONFIG_DRM_I915

2023-08-16 Thread Wang Jinchao
On Mon, Aug 14, 2023 at 03:13:32PM +0300, Jani Nikula wrote: > On Mon, 14 Aug 2023, Wang Jinchao wrote: > > On Mon, Aug 14, 2023 at 10:26:45AM +0300, Jani Nikula wrote: > >> On Sat, 12 Aug 2023, Wang Jinchao wrote: > >> > When CONFIG_DRM_I915 is set to 'y' and CONFIG_BACKLIGHT_CLASS_DEVICE > >> >

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Maxim Schwalm
On 14.08.23 08:34, Tomi Valkeinen wrote: > On 13/08/2023 03:23, Maxim Schwalm wrote: >> Hi, >> >> On 11.08.23 19:02, Tomi Valkeinen wrote: >>> On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: > The driver has a few places where it does: >

Re: [PATCH v4 02/48] mm: vmscan: move shrinker-related code into a separate file

2023-08-16 Thread Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote: > > The mm/vmscan.c file is too large, so separate the shrinker-related > code from it into a separate file. No functional changes. > > Signed-off-by: Qi Zheng Reviewed-by: Muchun Song

Re: [RFC PATCH v2 00/11] Device Memory TCP

2023-08-16 Thread Willem de Bruijn
On Tue, Aug 15, 2023 at 9:38 AM David Laight wrote: > > From: Mina Almasry > > Sent: 10 August 2023 02:58 > ... > > * TL;DR: > > > > Device memory TCP (devmem TCP) is a proposal for transferring data to and/or > > from device memory efficiently, without bouncing the data to a host memory > > buffe

Re: [PATCH 11/11] drm/bridge: tc358768: Add DRM_BRIDGE_ATTACH_NO_CONNECTOR support

2023-08-16 Thread Maxim Schwalm
On 14.08.23 12:04, Tomi Valkeinen wrote: > On 13/08/2023 20:11, Maxim Schwalm wrote: >> On 04.08.23 12:44, Tomi Valkeinen wrote: >>> Signed-off-by: Tomi Valkeinen >>> --- >>> drivers/gpu/drm/bridge/tc358768.c | 64 >>> +++ >>> 1 file changed, 45 insertions(+

Re: [PATCH v4 01/48] mm: move some shrinker-related function declarations to mm/internal.h

2023-08-16 Thread Muchun Song
> On Aug 7, 2023, at 19:08, Qi Zheng wrote: > > The following functions are only used inside the mm subsystem, so it's > better to move their declarations to the mm/internal.h file. > > 1. shrinker_debugfs_add() > 2. shrinker_debugfs_detach() > 3. shrinker_debugfs_remove() > > Signed-off-by:

Re: [PATCH] drm/panel: Add prepare_prev_first flag to Visionox VTDR6130

2023-08-16 Thread neil . armstrong
Hi Abhinav, On 14/08/2023 20:02, Abhinav Kumar wrote: Hi Neil On 8/14/2023 1:01 AM, neil.armstr...@linaro.org wrote: Hi Abhinav, On 10/08/2023 18:26, Abhinav Kumar wrote: Hi Neil On 8/3/2023 10:19 AM, Jessica Zhang wrote: On 7/31/2023 6:00 AM, Neil Armstrong wrote: Hi, On 26/07/2023 00

Re: [PATCH] drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE

2023-08-16 Thread Simon Ser
On Tuesday, August 15th, 2023 at 20:19, Erik Kurzinger wrote: > If DRM_IOCTL_SYNCOBJ_TIMELINE_WAIT is invoked with the > DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE flag set but no fence has yet been > submitted for the given timeline point the call will fail immediately > with EINVAL. This does not m

Re: [PATCH] drm/syncobj: fix DRM_SYNCOBJ_WAIT_FLAGS_WAIT_AVAILABLE

2023-08-16 Thread Simon Ser
Maybe a Fixes tag can be added, so that this propagates into the stable trees? https://www.kernel.org/doc/html/latest/process/submitting-patches.html#using-reported-by-tested-by-reviewed-by-suggested-by-and-fixes

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Tomi Valkeinen
On 15/08/2023 20:21, Maxim Schwalm wrote: On 14.08.23 08:34, Tomi Valkeinen wrote: On 13/08/2023 03:23, Maxim Schwalm wrote: Hi, On 11.08.23 19:02, Tomi Valkeinen wrote: On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places where

Re: [PATCH 02/11] drm/bridge: tc358768: Fix bit updates

2023-08-16 Thread Tomi Valkeinen
On 15/08/2023 20:21, Maxim Schwalm wrote: On 14.08.23 08:34, Tomi Valkeinen wrote: On 13/08/2023 03:23, Maxim Schwalm wrote: Hi, On 11.08.23 19:02, Tomi Valkeinen wrote: On 11/08/2023 19:23, Péter Ujfalusi wrote: On 04/08/2023 13:44, Tomi Valkeinen wrote: The driver has a few places where

[PATCH v5 01/17] sizes.h: Add entries between 32G and 64T

2023-08-16 Thread Sarah Walker
From: Matt Coster Signed-off-by: Matt Coster Reviewed-by: Linus Walleij --- include/linux/sizes.h | 9 + 1 file changed, 9 insertions(+) diff --git a/include/linux/sizes.h b/include/linux/sizes.h index 84aa448d8bb3..c3a00b967d18 100644 --- a/include/linux/sizes.h +++ b/include/linux/s

[PATCH v5 00/17] Imagination Technologies PowerVR DRM driver

2023-08-16 Thread Sarah Walker
This patch series adds the initial DRM driver for Imagination Technologies PowerVR GPUs, starting with those based on our Rogue architecture. It's worth pointing out that this is a new driver, written from the ground up, rather than a refactored version of our existing downstream driver (pvrsrvkm)

[PATCH v5 02/17] dt-bindings: gpu: Add Imagination Technologies PowerVR GPU

2023-08-16 Thread Sarah Walker
Add the device tree binding documentation for the Series AXE GPU used in TI AM62 SoCs. Co-developed-by: Frank Binns Signed-off-by: Frank Binns Signed-off-by: Sarah Walker --- Changes since v4: - Add clocks constraint for ti,am62-gpu - Remove excess address and size cells in example - Remove int

[PATCH v5 03/17] drm/imagination/uapi: Add PowerVR driver UAPI

2023-08-16 Thread Sarah Walker
Add the UAPI implementation for the PowerVR driver. Changes from v4 : - Remove CREATE_ZEROED flag for BO creation (all buffers are now zeroed) Co-developed-by: Frank Binns Signed-off-by: Frank Binns Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Co-developed-by: Matt Coster

[PATCH v5 09/17] drm/imagination: Implement power management

2023-08-16 Thread Sarah Walker
Add power management to the driver, using runtime pm. The power off sequence depends on firmware commands which are not implemented in this patch. Changes since v4: - Suspend runtime PM before unplugging device on rmmod Changes since v3: - Don't power device when calling pvr_device_gpu_fini() - D

[PATCH v5 04/17] drm/imagination: Add skeleton PowerVR driver

2023-08-16 Thread Sarah Walker
This adds the basic skeleton of the driver. The driver registers itself with DRM on probe. Ioctl handlers are currently implemented as stubs. Changes since v3: - Clarify supported GPU generations in driver description - Use drm_dev_unplug() when removing device - Change from_* and to_* functions t

[PATCH v5 17/17] arm64: dts: ti: k3-am62-main: Add GPU device node [DO NOT MERGE]

2023-08-16 Thread Sarah Walker
Add the Series AXE GPU node to the AM62 device tree. Changes since v4: - Remove interrupt name - Make property order consistent across dts and bindings doc - Fixed formatting (replaced spaces with tabs) Signed-off-by: Sarah Walker --- arch/arm64/boot/dts/ti/k3-am62-main.dtsi | 9 + 1 fi

[PATCH v5 11/17] drm/imagination: Implement MIPS firmware processor and MMU support

2023-08-16 Thread Sarah Walker
Add support for the MIPS firmware processor, used in the Series AXE GPU. The MIPS firmware processor uses a separate MMU to the rest of the GPU, so this patch adds support for that as well. Changes since v3: - Get regs resource (removed from GPU resources commit) Signed-off-by: Sarah Walker ---

[PATCH v5 16/17] drm/imagination: Add driver documentation

2023-08-16 Thread Sarah Walker
Add documentation for the UAPI and for the virtual memory design. Co-developed-by: Matt Coster Signed-off-by: Matt Coster Co-developed-by: Donald Robson Signed-off-by: Donald Robson Signed-off-by: Sarah Walker Reviewed-by: Maxime Ripard --- Documentation/gpu/drivers.rst |

[PATCH v5 12/17] drm/imagination: Implement free list and HWRT create and destroy ioctls

2023-08-16 Thread Sarah Walker
Implement ioctls to create and destroy free lists and HWRT datasets. Free lists are used for GPU-side memory allocation during geometry processing. HWRT datasets are the FW-side structures representing render targets. Changes since v4: - Remove use of drm_gem_shmem_get_pages() Changes since v3: -

[PATCH v5 07/17] drm/imagination: Add GPU ID parsing and firmware loading

2023-08-16 Thread Sarah Walker
Read the GPU ID register at probe time and select the correct features/quirks/enhancements. Use the GPU ID to form the firmware file name and load the firmware. The features/quirks/enhancements arrays are currently hardcoded in the driver for the supported GPUs. We are looking at moving this infor

[PATCH v5 14/17] drm/imagination: Implement job submission and scheduling

2023-08-16 Thread Sarah Walker
Implement job submission ioctl. Job scheduling is implemented using drm_sched. Jobs are submitted in a stream format. This is intended to allow the UAPI data format to be independent of the actual FWIF structures in use, which vary depending on the GPU in use. The stream formats are documented at

[PATCH v5 13/17] drm/imagination: Implement context creation/destruction ioctls

2023-08-16 Thread Sarah Walker
Implement ioctls for the creation and destruction of contexts. Contexts are used for job submission and each is associated with a particular job type. Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Boris Brezillon Signed-off-by: Boris Brezillon Signed-off-by: Sarah Walker --- d

[PATCH v5 05/17] drm/imagination: Get GPU resources

2023-08-16 Thread Sarah Walker
Acquire clock and register resources, and enable/map as appropriate. Changes since v3: - Remove regulator resource (not used on supported platform) - Use devm helpers - Use devm_clk_get_optional() for optional clocks - Don't prepare clocks on resource acquisition - Drop pvr_device_clk_core_get_fre

[PATCH v5 10/17] drm/imagination: Implement firmware infrastructure and META FW support

2023-08-16 Thread Sarah Walker
The infrastructure includes parsing of the firmware image, initialising FW-side structures, handling the kernel and firmware command ringbuffers and starting & stopping the firmware processor. This patch also adds the necessary support code for the META firmware processor. Changes since v4: - Rem

[PATCH v5 15/17] drm/imagination: Add firmware trace to debugfs

2023-08-16 Thread Sarah Walker
Firmware trace is exposed at /sys/debug/dri//pvr_fw/trace_0. Trace is enabled via the group mask at /sys/debug/dri//pvr_params/fw_trace_mask. Changes since v3: - Use drm_dev_{enter,exit} Co-developed-by: Matt Coster Signed-off-by: Matt Coster Signed-off-by: Sarah Walker --- drivers/gpu/drm/im

[PATCH 0/5] use refcount+RCU method to implement lockless slab shrink (part 1)

2023-08-16 Thread Qi Zheng
Hi all, To make reviewing and updating easier, I've chosen to split the previous patchset[1] into the following three parts: part 1: some cleanups and preparations part 2: introduce new APIs and convert all shrinnkers to use these part 3: implement lockless slab shrink This series is the part 1.

[PATCH 1/5] mm: move some shrinker-related function declarations to mm/internal.h

2023-08-16 Thread Qi Zheng
The following functions are only used inside the mm subsystem, so it's better to move their declarations to the mm/internal.h file. 1. shrinker_debugfs_add() 2. shrinker_debugfs_detach() 3. shrinker_debugfs_remove() Signed-off-by: Qi Zheng Reviewed-by: Muchun Song --- include/linux/shrinker.h

[PATCH 2/5] mm: vmscan: move shrinker-related code into a separate file

2023-08-16 Thread Qi Zheng
The mm/vmscan.c file is too large, so separate the shrinker-related code from it into a separate file. No functional changes. Signed-off-by: Qi Zheng Reviewed-by: Muchun Song --- mm/Makefile | 4 +- mm/internal.h | 2 + mm/shrinker.c | 709 +

[PATCH 3/5] mm: shrinker: remove redundant shrinker_rwsem in debugfs operations

2023-08-16 Thread Qi Zheng
The debugfs_remove_recursive() will wait for debugfs_file_put() to return, so the shrinker will not be freed when doing debugfs operations (such as shrinker_debugfs_count_show() and shrinker_debugfs_scan_write()), so there is no need to hold shrinker_rwsem during debugfs operations. Signed-off-by:

[PATCH 4/5] drm/ttm: introduce pool_shrink_rwsem

2023-08-16 Thread Qi Zheng
Currently, the synchronize_shrinkers() is only used by TTM pool. It only requires that no shrinkers run in parallel. After we use RCU+refcount method to implement the lockless slab shrink, we can not use shrinker_rwsem or synchronize_rcu() to guarantee that all shrinker invocations have seen an up

[PATCH 5/5] mm: shrinker: add a secondary array for shrinker_info::{map, nr_deferred}

2023-08-16 Thread Qi Zheng
Currently, we maintain two linear arrays per node per memcg, which are shrinker_info::map and shrinker_info::nr_deferred. And we need to resize them when the shrinker_nr_max is exceeded, that is, allocate a new array, and then copy the old array to the new array, and finally free the old array by R

Re: [PATCH RFC 00/13] drm/connector: Create HDMI Connector infrastructure

2023-08-16 Thread Hans Verkuil
On 14/08/2023 15:56, Maxime Ripard wrote: > Hi, > > Here's a series that creates a subclass of drm_connector specifically > targeted at HDMI controllers. > > The idea behind this series came from a recent discussion on IRC during > which we discussed infoframes generation of i915 vs everything el

Re: [PATCH v3] drm/i915/display/lspcon: Increase LSPCON mode settle timeout

2023-08-16 Thread Jani Nikula
On Wed, 16 Aug 2023, Pablo Ceballos wrote: > This is to eliminate all cases of "*ERROR* LSPCON mode hasn't settled", > followed by link training errors. Intel engineers recommended increasing > this timeout and that does resolve the issue. > > On some CometLake-based device designs the Parade PS17

Re: [PATCH] drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()

2023-08-16 Thread Lukasz Majczak
czw., 3 sie 2023 o 11:23 Lukasz Majczak napisał(a): > > Check mgr->mst_primary, before passing it to > the get_mst_branch_device_by_guid_helper(), otherwise NULL dereference > may occur in the call to memcpy() and cause: > > [12579.365869] BUG: kernel NULL pointer dereference, address: 000

Re: [PATCH 4/5] drm/ttm: introduce pool_shrink_rwsem

2023-08-16 Thread Christian König
Am 16.08.23 um 10:34 schrieb Qi Zheng: Currently, the synchronize_shrinkers() is only used by TTM pool. It only requires that no shrinkers run in parallel. After we use RCU+refcount method to implement the lockless slab shrink, we can not use shrinker_rwsem or synchronize_rcu() to guarantee that

[PATCH v2] Documentation/gpu: VM_BIND locking document

2023-08-16 Thread Thomas Hellström
Add the first version of the VM_BIND locking document which is intended to be part of the xe driver upstreaming agreement. The document describes and discuss the locking used during exec- functions, evicton and for userptr gpu-vmas. Intention is to be using the same nomenclature as the drm-vm-bind

Re: [PATCH 4/5] drm/ttm: introduce pool_shrink_rwsem

2023-08-16 Thread Qi Zheng
Hi Christian, On 2023/8/16 17:14, Christian König wrote: Am 16.08.23 um 10:34 schrieb Qi Zheng: Currently, the synchronize_shrinkers() is only used by TTM pool. It only requires that no shrinkers run in parallel. After we use RCU+refcount method to implement the lockless slab shrink, we can no

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Mon, Aug 14, 2023 at 04:49:32PM +0200, Karol Herbst wrote: > We can't simply free the connector after calling drm_connector_init on it. > We need to clean up the drm side first. > > It might not fix all regressions from 2b5d1c29f6c4 ("drm/nouveau/disp: > PIOR DP uses GPIO for HPD, not PMGR AUX

Re: [PATCH] drm/amdgpu/gmc6: fix in case the PCI BAR is larger than the actual amount of vram

2023-08-16 Thread Christian König
Wait a second. This is unnecessary because we have this check in amdgpu_gmc_vram_location():     if (mc->real_vram_size < mc->visible_vram_size)     mc->visible_vram_size = mc->real_vram_size; Which makes sure that the visible VRAM size is never larger than the actual size f

Re: [PATCH] drm/panfrost: Skip speed binning on EOPNOTSUPP

2023-08-16 Thread Steven Price
On 16/08/2023 02:42, David Michael wrote: > Encountered on an ARM Mali-T760 MP4, attempting to read the nvmem > variable can also return EOPNOTSUPP instead of ENOENT when speed > binning is unsupported. > > Cc: > Fixes: 7d690f936e9b ("drm/panfrost: Add basic support for speed binning") > Signed-o

Re: [PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-16 Thread Christian König
Am 15.08.23 um 21:50 schrieb André Almeida: Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Signed-off-by: André Almeida Shashank can you t

Re: [PATCH v4 4/4] drm/amdgpu: Create version number for coredumps

2023-08-16 Thread Christian König
Am 15.08.23 um 21:51 schrieb André Almeida: Even if there's nothing currently parsing amdgpu's coredump files, if we eventually have such tools they will be glad to find a version field to properly read the file. Create a version number to be displayed on top of coredump file, to be incremented

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Karol Herbst
On Wed, Aug 16, 2023 at 11:30 AM Borislav Petkov wrote: > > On Mon, Aug 14, 2023 at 04:49:32PM +0200, Karol Herbst wrote: > > We can't simply free the connector after calling drm_connector_init on it. > > We need to clean up the drm side first. > > > > It might not fix all regressions from 2b5d1c2

Re: [PATCH v4 3/4] drm/amdgpu: Move coredump code to amdgpu_reset file

2023-08-16 Thread Christian König
Am 15.08.23 um 21:50 schrieb André Almeida: Giving that we use codedump just for device resets, move it's functions and structs to a more semantic file, the amdgpu_reset.{c, h}. Signed-off-by: André Almeida Acked-by: Christian König for this patch here. I'm going to push patch #1 from this

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 11:51:50AM +0200, Karol Herbst wrote: > Mind sharing your kernel logs with that patch applied? I suspect your > system boots up but you might just not have the connector available or > something? It could be that you have one of those GPUs affected by the > original change a

Re: [PATCH v4 2/4] drm/amdgpu: Rework coredump to use memory dynamically

2023-08-16 Thread Shashank Sharma
On 16/08/2023 11:48, Christian König wrote: Am 15.08.23 um 21:50 schrieb André Almeida: Instead of storing coredump information inside amdgpu_device struct, move if to a proper separated struct and allocate it dynamically. This will make it easier to further expand the logged information. Sig

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 12:03:44PM +0200, Borislav Petkov wrote: > On Wed, Aug 16, 2023 at 11:51:50AM +0200, Karol Herbst wrote: > > Mind sharing your kernel logs with that patch applied? I suspect your > > system boots up but you might just not have the connector available or > > something? It cou

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Borislav Petkov
On Wed, Aug 16, 2023 at 12:11:57PM +0200, Borislav Petkov wrote: > Does that help? Btw, note that this is *plain* -rc5, without your patch. -- Regards/Gruss, Boris. https://people.kernel.org/tglx/notes-about-netiquette

Re: [PATCH] drm/nouveau/disp: fix use-after-free in error handling of nouveau_connector_create

2023-08-16 Thread Takashi Iwai
On Wed, 16 Aug 2023 12:14:24 +0200, Borislav Petkov wrote: > > On Wed, Aug 16, 2023 at 12:11:57PM +0200, Borislav Petkov wrote: > > Does that help? > > Btw, note that this is *plain* -rc5, without your patch. The UAF looks very same as I had and that's the bug Karol's patch should address. So m

[PATCH v3 37/41] drm: renesas: shmobile: Atomic conversion part 2

2023-08-16 Thread Geert Uytterhoeven
Implement atomic mode setting for the CRTC, using the existing dpms callback. Signed-off-by: Geert Uytterhoeven --- This works, but I had expected that crtc_helper_funcs.atomic_check should point to drm_crtc_helper_atomic_check() instead, as the primary plane cannot be disabled. However in doing

[PATCH v3 41/41] drm: renesas: shmobile: Add DT support

2023-08-16 Thread Geert Uytterhoeven
Add DT support, by: 1. Creating a panel bridge from DT, and attaching it to the encoder, 2. Replacing the custom connector with a bridge connector, 3. Obtaining clock configuration based on the compatible value. Note that for now the driver uses a fixed clock configuration selecting the bus

[PATCH v3 36/41] drm: renesas: shmobile: Atomic conversion part 1

2023-08-16 Thread Geert Uytterhoeven
Implement atomic mode setting for both the primary and overlay planes. This involves: - Moving the primary plane handling code from CRTC mode setting to plane handling shared by primary and overlay planes, - Adding basic CRTC and mode config atomic mode setting ops, which don't do much

[PATCH v3 35/41] drm: renesas: shmobile: Cleanup encoder

2023-08-16 Thread Geert Uytterhoeven
Most unused callbacks can be NULL pointers these days. Drop a bunch of empty encoder callbacks. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 26 --- 1 file ch

[PATCH v3 30/41] drm: renesas: shmobile: Use drm_crtc_handle_vblank()

2023-08-16 Thread Geert Uytterhoeven
Replace the call to the legacy drm_handle_vblank() function with a call to the new drm_crtc_handle_vblank() helper. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Sui Jingfeng --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/s

[PATCH v3 32/41] drm: renesas: shmobile: Wait for page flip when turning CRTC off

2023-08-16 Thread Geert Uytterhoeven
Turning a CRTC off will prevent a queued page flip from ever completing, potentially confusing userspace. Wait for queued page flips to complete before turning the CRTC off to avoid this. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Review

[PATCH v3 20/41] drm: renesas: shmobile: Embed drm_device in shmob_drm_device

2023-08-16 Thread Geert Uytterhoeven
Embedding drm_device in shmob_drm_device allows us to use the DRM managed API to allocate both structures in one go, simplifying error handling. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- .../gpu/drm/renesas/shmobile/shm

[PATCH v3 40/41] drm: renesas: shmobile: Atomic conversion part 3

2023-08-16 Thread Geert Uytterhoeven
Complete the conversion to atomic mode setting by converting the connector, and setting the DRIVER_ATOMIC flag. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 5 + driv

[PATCH v3 25/41] drm: renesas: shmobile: Move interface handling to connector setup

2023-08-16 Thread Geert Uytterhoeven
Move legacy interface handling to the connector setup code. Set up bus_flags and bus_formats in display_info according to the bus format and panel information from platform data, to make it more similar with DT-based connector/bridge/panel setup. This will allow us to use the same LCD interface set

[PATCH v3 15/41] drm: renesas: shmobile: Remove support for SYS panels

2023-08-16 Thread Geert Uytterhoeven
From: Laurent Pinchart SYS panels are not used, and have no defined DT bindings. Remove their support to avoid impeding DT support. It can always be added back later. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven --- v3: - No changes, v2: - No changes. Changes compa

[PATCH v3 22/41] drm: renesas: shmobile: Replace .dev_private with container_of()

2023-08-16 Thread Geert Uytterhoeven
Now that drm_device is embedded in shmob_drm_device, we can use a container_of()-based helper to get the shmob_drm_device pointer from the drm_device, instead of using the deprecated drm_device.dev_private field. While at it, restore reverse Xmas tree ordering of local variable declarations. Sign

[PATCH v3 31/41] drm: renesas: shmobile: Move shmob_drm_crtc_finish_page_flip()

2023-08-16 Thread Geert Uytterhoeven
Move the shmob_drm_crtc_finish_page_flip() function up, to avoid having to move it during the modification in the next change. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by, - Move further up. --- .../gpu/drm/renesas/shmobile/

[PATCH v3 08/41] drm: renesas: shmobile: Restore indentation of shmob_drm_setup_clocks()

2023-08-16 Thread Geert Uytterhoeven
Commit 56550d94cbaeaa19 ("Drivers: gpu: remove __dev* attributes.") forgot to realign the continuation of the parameter section of shmob_drm_setup_clocks(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/rene

[PATCH v3 39/41] drm: renesas: shmobile: Remove internal CRTC state tracking

2023-08-16 Thread Geert Uytterhoeven
Now the suspend/resume methods no longer need to look at internal driver state, the dpms and started fields in the shmob_drm_crtc structure can be removed, as well as the shmob_drm_crtc_dpms() wrapper. After this, shmob_drm_crtc_atomic_{en,dis}able() became just wrappers around shmob_drm_crtc_st{a

[PATCH v3 24/41] drm: renesas: shmobile: Use media bus formats in platform data

2023-08-16 Thread Geert Uytterhoeven
Replace the custom shmob_drm_interface enumeration values with standard media bus formats. This simplifies driver handling of bus formats and prepares for DT support. Signed-off-by: Geert Uytterhoeven --- v3: - No changes, v2: - Keep table instead of replacing it by a switch() statement,

[PATCH v3 01/41] MAINTAINER: Create entry for Renesas SH-Mobile DRM drivers

2023-08-16 Thread Geert Uytterhoeven
Split off DRM drivers for Renesas SH-Mobile into its own entry, and add Geert Uytterhoeven as a maintainer. Signed-off-by: Geert Uytterhoeven --- Kieran: do you want to join the club, too? ;-) v3: - No changes, v2: - New. --- MAINTAINERS | 12 ++-- 1 file changed, 10 insertions(+),

[PATCH v3 10/41] drm: renesas: shmobile: Add missing YCbCr formats

2023-08-16 Thread Geert Uytterhoeven
The primary plane supports various YCbCr formats, and the CRTC code already knows how to handle them. Enable support for the missing formats by adding them to the table of supported modes. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Revie

[PATCH v3 38/41] drm: renesas: shmobile: Use suspend/resume helpers

2023-08-16 Thread Geert Uytterhoeven
Replace the custom suspend/resume handling by calls into drm_mode_config_helper_{suspend,resume}(). Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 13 - drivers

[PATCH v3 06/41] drm: renesas: shmobile: Correct encoder/connector types

2023-08-16 Thread Geert Uytterhoeven
The first encoder output on the SH-Mobile LCD Controller is a DPI parallel bus. However, at the time of introduction of the driver, no encoder or connector types were defined yet for the DPI parallel bus, hence the driver used the ones for LVDS instead. Adjust the types accordingly. Signed-off-b

[PATCH v3 13/41] drm: renesas: shmobile: Don't set display info width and height twice

2023-08-16 Thread Geert Uytterhoeven
From: Laurent Pinchart The display info width_mm and height_mm fields are set at init time and never overwritten, don't set them a second time when getting modes. Signed-off-by: Laurent Pinchart Signed-off-by: Geert Uytterhoeven Reviewed-by: Sui Jingfeng --- v3: - No changes, v2: - Add R

[PATCH v3 11/41] drm: renesas: shmobile: Improve shmob_drm_format_info table

2023-08-16 Thread Geert Uytterhoeven
Improve the table containing hardware information related to the supported plane formats: 1. Move (part of) the overlay format register settings from multiple switch() statements spread across the code into the table, like is already done for the primary plane register settings, 2. Re

[PATCH v3 33/41] drm: renesas: shmobile: Turn vblank on/off when enabling/disabling CRTC

2023-08-16 Thread Geert Uytterhoeven
The DRM core vblank handling mechanism requires drivers to forcefully turn vblank reporting off when disabling the CRTC, and to restore the vblank reporting status when enabling the CRTC. Implement this using the drm_crtc_vblank_{on,off}() helpers. Note that drm_crtc_vblank_off() must be called at

[PATCH v3 04/41] drm: renesas: shmobile: Fix overlay plane disable

2023-08-16 Thread Geert Uytterhoeven
Merely writing zero to the CHn Source Image Format Register is not sufficient to disable a plane, as the programmed register value is not propagated immediately to the current side. This can be seen when using the -P option of modetest: the extra plane is displayed correctly, but does not disappea

[PATCH v3 09/41] drm: renesas: shmobile: Use %p4cc to print fourcc code

2023-08-16 Thread Geert Uytterhoeven
Replace the last printing of an hexadecimal fourcc format code by a pretty-printed format name, using the "%p4cc" format specifier. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_pl

[PATCH v3 21/41] drm: renesas: shmobile: Convert container helpers to static inline functions

2023-08-16 Thread Geert Uytterhoeven
Replace to conversion helper macros using container_of() by static inline functions, to improve type-safety. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 11 ---

[PATCH v3 16/41] drm: renesas: shmobile: Improve error handling

2023-08-16 Thread Geert Uytterhoeven
Prepare for DT conversion, where panel probe can be deferred, by streamlining error propagation and handling: - Use dev_err_probe() to avoid printing error messages in case of probe deferral, - Propagate errors where needed. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart

[PATCH v3 29/41] drm: renesas: shmobile: Rename shmob_drm_plane.plane

2023-08-16 Thread Geert Uytterhoeven
Rename the "plane" member of the shmob_drm_plane subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Sui Jingfeng --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_plan

[PATCH v3 14/41] drm: renesas: shmobile: Rename input clocks

2023-08-16 Thread Geert Uytterhoeven
From: Laurent Pinchart Prepare for DT bindings by using more appropriate names for the input clocks. Note that all LDDCKR_ICKSEL_* definitions but the one for the bus clock are valid only for SH7724, so the clock selection code needs to be updated when extending clock support to other SoCs. Sig

[PATCH v3 07/41] drm: renesas: shmobile: Add support for Runtime PM

2023-08-16 Thread Geert Uytterhoeven
The SH-Mobile LCD Controller is part of a PM Domain on all relevant SoCs (clock domain on all, power domain on some). Hence it may not be sufficient to manage the LCDC module clock explicitly (e.g. if the selected clock source differs from SHMOB_DRM_CLK_BUS). Fix this by using Runtime PM for all

[PATCH v3 23/41] drm: renesas: shmobile: Use struct videomode in platform data

2023-08-16 Thread Geert Uytterhoeven
From: Laurent Pinchart Replace the drm_mode_modeinfo field with videomode that includes more signal polarity flags. This simplifies driver handling of panel modes and prepares for DT support. Signed-off-by: Laurent Pinchart [geert: Simplify] Signed-off-by: Geert Uytterhoeven Reviewed-by: Laur

[PATCH v3 18/41] drm: renesas: shmobile: Remove custom plane destroy callback

2023-08-16 Thread Geert Uytterhoeven
There is no need to call drm_plane_force_disable() from the plane's .destroy() callback, as the plane should have been disabled already before. See also commit 3c858a33858baa8c ("drm/plane_helper: don't disable plane in destroy function") for the generic plane helper case. After removing this cal

[PATCH v3 02/41] dt-bindings: display: Add Renesas SH-Mobile LCDC bindings

2023-08-16 Thread Geert Uytterhoeven
Add device tree bindings for the LCD Controller (LCDC) found in Renesas SuperH SH-Mobile and ARM SH/R-Mobile SOCs. Based on a plain text prototype by Laurent Pinchart. Signed-off-by: Geert Uytterhoeven Reviewed-by: Rob Herring --- Cc: Rob Herring Cc: Krzysztof Kozlowski Cc: Conor Dooley Cc:

[PATCH v3 34/41] drm: renesas: shmobile: Shutdown the display on remove

2023-08-16 Thread Geert Uytterhoeven
When the device is unbound from the driver, the display may be active. Make sure it gets shut down. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 2 ++ 1 file changed, 2 in

[PATCH v3 26/41] drm: renesas: shmobile: Unify plane allocation

2023-08-16 Thread Geert Uytterhoeven
Unify primary and overlay plane allocation: - Enhance shmob_drm_plane_create() so it can be used to create the primary plane, too, - Move overlay plane creation next to primary plane creation. Signed-off-by: Geert Uytterhoeven --- v3: - No changes, v2: - Pass plane type to shmob_drm_

[PATCH v3 27/41] drm: renesas: shmobile: Rename shmob_drm_crtc.crtc

2023-08-16 Thread Geert Uytterhoeven
Rename the "crtc" member of the shmob_drm_crtc subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Sui Jingfeng --- v3: - No changes, v2: - Add Reviewed-by. --- .../gpu/drm/renesas/shmobile/shmob_drm_crtc.c | 2

[PATCH v3 03/41] media: uapi: Add MEDIA_BUS_FMT_RGB666_2X9_BE format

2023-08-16 Thread Geert Uytterhoeven
Add the RGB666 9:9 format MEDIA_BUS_FMT_RGB666_2X9_BE, which is supported by the SH-Mobile LCD Controller. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: linux-me...@vger.kernel.org v3: - No changes, v2: - Add Reviewed-b

[PATCH v3 05/41] drm: renesas: shmobile: Fix ARGB32 overlay format typo

2023-08-16 Thread Geert Uytterhoeven
When configuring a CHn Source Image Format Register (LDBBSIFR), one should use the corresponding LDBBSIFR_RPKF_* definition for overlay planes, not the DDFR_PKF_* definition for the primary plane. Fortunately both definitions resolve to the same value, so this bug did not cause any harm. Signed-o

[PATCH v3 19/41] drm: renesas: shmobile: Use drmm_universal_plane_alloc()

2023-08-16 Thread Geert Uytterhoeven
According to the comments for drm_universal_plane_init(), the plane structure should not be allocated with devm_kzalloc(). Fix lifetime issues by using drmm_universal_plane_alloc() instead. Signed-off-by: Geert Uytterhoeven --- v3: - No changes, v2: - Split off removal of call to drm_plane_

[PATCH v3 12/41] drm: renesas: shmobile: Remove backlight support

2023-08-16 Thread Geert Uytterhoeven
From: Laurent Pinchart Backlight support should be implemented by panels, not by the LCDC driver. As the feature is currently unused anyway, remove it. Signed-off-by: Laurent Pinchart [geert: Cleanups] Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v

[PATCH v3 17/41] drm: renesas: shmobile: Convert to use devm_request_irq()

2023-08-16 Thread Geert Uytterhoeven
Convert to managed IRQ handling, to simplify cleanup. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_drm_drv.c | 9 +++-- 1 file changed, 3 insertions(+), 6 deletions(-) diff --git

[PATCH v3 00/41] drm: renesas: shmobile: Atomic conversion + DT support

2023-08-16 Thread Geert Uytterhoeven
Hi all, It has been 3 years since the last conversion of a DRM driver to atomic modesetting, so I guess it's time for another one? ;-) Currently, there are two drivers for the LCD controller on Renesas SuperH-based and ARM-based SH-Mobile and R-Mobile SoCs: 1. sh_mobile_lcdcfb, using th

[PATCH v3 28/41] drm: renesas: shmobile: Rename shmob_drm_connector.connector

2023-08-16 Thread Geert Uytterhoeven
Rename the "connector" member of the shmob_drm_connector subclass structure to "base", to improve readability. Signed-off-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Reviewed-by: Sui Jingfeng --- v3: - No changes, v2: - Add Reviewed-by. --- drivers/gpu/drm/renesas/shmobile/shmob_

[PATCH] drm/ttm/tests: Fix type conversion in ttm_pool_test

2023-08-16 Thread Karolina Stolarek
Fix a warning about casting an integer of different size in ttm_pool_alloc_basic_dma_addr() subtest. Cast the DMA address to uintptr_t before casting it to a generic pointer. Signed-off-by: Karolina Stolarek Cc: Christian König Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-

Re: [PATCH v5 09/17] drm/imagination: Implement power management

2023-08-16 Thread Paul Cercueil
Hi Sarah, Le mercredi 16 août 2023 à 09:25 +0100, Sarah Walker a écrit : > Add power management to the driver, using runtime pm. The power off > sequence depends on firmware commands which are not implemented in > this > patch. > > Changes since v4: > - Suspend runtime PM before unplugging device

  1   2   >