Re: (subset) [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread Neil Armstrong
On 28/11/2023 11:12, Neil Armstrong wrote: Hi, On Tue, 28 Nov 2023 00:10:18 +0100, Linus Walleij wrote: This series reverts the attempts to fix the bug that went into v6.7-rc1 in commit 199cf07ebd2b "drm/bridge: panel: Add a device link between drm device and panel device" and then it reverts

[PATCH v4 17/45] drm/connector: hdmi: Add Infoframes generation

2023-11-28 Thread Maxime Ripard
Infoframes in KMS is usually handled by a bunch of low-level helpers that require quite some boilerplate for drivers. This leads to discrepancies with how drivers generate them, and which are actually sent. Now that we have everything needed to generate them in the HDMI connector state, we can

[PATCH v4 13/45] drm/connector: hdmi: Add HDMI compute clock helper

2023-11-28 Thread Maxime Ripard
A lot of HDMI drivers have some variation of the formula to calculate the TMDS character rate from a mode, but few of them actually take all parameters into account. Let's create a helper to provide that rate taking all parameters into account. Signed-off-by: Maxime Ripard ---

[PATCH v4 14/45] drm/connector: hdmi: Calculate TMDS character rate

2023-11-28 Thread Maxime Ripard
Most HDMI drivers have some code to calculate the TMDS character rate, usually to adjust an internal clock to match what the mode requires. Since the TMDS character rates mostly depends on the resolution, whether we need to repeat pixels or not, the bpc count and the format, we can now derive it

[PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments

2023-11-28 Thread Maxime Ripard
All the drm_connector_init variants take at least a pointer to the device, connector and hooks implementation. However, none of them check their value before dereferencing those pointers which can lead to a NULL-pointer dereference if the author isn't careful. Let's test those pointers instead

[PATCH v4 08/45] drm/connector: hdmi: Create an HDMI sub-state

2023-11-28 Thread Maxime Ripard
The next features we will need to share across drivers will need to store some parameters for drivers to use, such as the selected output format. Let's create a new connector sub-state dedicated to HDMI controllers, that will eventually store everything we need. Signed-off-by: Maxime Ripard ---

[PATCH v4 07/45] drm/connector: Introduce an HDMI connector initialization function

2023-11-28 Thread Maxime Ripard
A lot of the various HDMI drivers duplicate some logic that depends on the HDMI spec itself and not really a particular hardware implementation. Output BPC or format selection, infoframe generation are good examples of such areas. This creates a lot of boilerplate, with a lot of variations,

[PATCH v4 18/45] drm/connector: hdmi: Create Infoframe DebugFS entries

2023-11-28 Thread Maxime Ripard
There has been some discussions recently about the infoframes sent by drivers and if they were properly generated. In parallel, there's been some interest in creating an infoframe-decode tool similar to edid-decode. Both would be much easier if we were to expose the infoframes programmed in the

[PATCH v4 21/45] drm/vc4: tests: Remove vc4_dummy_plane structure

2023-11-28 Thread Maxime Ripard
The vc4_dummy_plane structure is an exact equivalent to vc4_plane, so we don't need it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/tests/vc4_mock.c | 6 ++ drivers/gpu/drm/vc4/tests/vc4_mock.h | 9 ++--- drivers/gpu/drm/vc4/tests/vc4_mock_plane.c | 14

[PATCH v4 24/45] drm/rockchip: inno_hdmi: Remove useless copy of drm_display_mode

2023-11-28 Thread Maxime Ripard
The driver maintains a copy of the adjusted mode but doesn't use it anywhere. Remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 4 1 file changed, 4 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c

[PATCH v4 15/45] drm/connector: hdmi: Add custom hook to filter TMDS character rate

2023-11-28 Thread Maxime Ripard
Most of the HDMI controllers have an upper TMDS character rate limit they can't exceed. On "embedded"-grade display controllers, it will typically be lower than what high-grade monitors can provide these days, so drivers will filter the TMDS character rate based on the controller capabilities. To

[PATCH v4 33/45] drm/rockchip: inno_hdmi: Remove tmds rate from structure

2023-11-28 Thread Maxime Ripard
The tmds_rate field in the inno_hdmi structure is used mostly to configure the internal i2c controller divider through a call to the inno_hdmi_i2c_init() function. We can simply make that rate an argument to that function, which also removes a workaround to initialize the divider at probe time

[PATCH v4 26/45] drm/rockchip: inno_hdmi: Get rid of mode_set

2023-11-28 Thread Maxime Ripard
We're not doing anything special in atomic_mode_set so we can simply merge it into atomic_enable. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[PATCH v4 28/45] drm/rockchip: inno_hdmi: Remove unneeded has audio flag

2023-11-28 Thread Maxime Ripard
The sink_has_audio flag is not used anywhere in the driver so let's get rid of it. It's redundant with drm_display_info.has_audio anyway. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git

[PATCH v4 22/45] drm/vc4: tests: Convert to plane creation helper

2023-11-28 Thread Maxime Ripard
Now that we have a plane create helper for kunit mocked drivers, let's convert to it in vc4. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/tests/vc4_mock_plane.c | 34 +++--- 1 file changed, 8 insertions(+), 26 deletions(-) diff --git

Re: [PATCH v4 00/45] drm/connector: Create HDMI Connector infrastructure

2023-11-28 Thread Hans Verkuil
On 28/11/2023 11:24, Maxime Ripard wrote: > Hi, > > Here's a series that creates some extra infrastructure 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

Re: [PATCH] PCI: qcom: Fix compile error

2023-11-28 Thread Manivannan Sadhasivam
On Tue, Nov 28, 2023 at 12:39:02PM +0200, Jani Nikula wrote: > On Tue, 28 Nov 2023, Manivannan Sadhasivam > wrote: > > On Tue, Nov 28, 2023 at 11:44:26AM +0530, Vignesh Raman wrote: > >> Hi Mani, > >> > >> On 28/11/23 10:44, Manivannan Sadhasivam wrote: > >> > On Tue, Nov 28, 2023 at 09:50:26AM

[PATCH v15 3/5] drm: renesas: Add RZ/G2L DU Support

2023-11-28 Thread Biju Das
The LCD controller is composed of Frame Compression Processor (FCPVD), Video Signal Processor (VSPD), and Display Unit (DU). It has DPI/DSI interfaces and supports a maximum resolution of 1080p along with 2 RPFs to support the blending of two picture layers and raster operations (ROPs). The DU

[PATCH v15 4/5] MAINTAINERS: Update entries for Renesas DRM drivers

2023-11-28 Thread Biju Das
The rcar-du has never been maintained in drm-misc. So exclude only this driver from drm-misc. Also, add the tree entry for sh_mobile. Signed-off-by: Biju Das --- v15: * New patch --- MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS

[PATCH v15 0/5] Add RZ/{G2L,G2LC} and RZ/V2L Display Unit support

2023-11-28 Thread Biju Das
This path series aims to add support for RZ/G2L DU DRM driver. RZ/G2L LCD controller composed of Frame compression Processor(FCPVD), Video signal processor (VSPD) and Display unit(DU). The output of LCDC is connected to Display parallel interface and MIPI link video interface. The output from

[PATCH v15 1/5] dt-bindings: display: Document Renesas RZ/G2L DU bindings

2023-11-28 Thread Biju Das
The RZ/G2L LCD controller is composed of Frame Compression Processor (FCPVD), Video Signal Processor (VSPD), and Display Unit (DU). The DU module supports the following hardware features − Display Parallel Interface (DPI) and MIPI LINK Video Interface − Display timing master − Generates video

[PATCH v15 5/5] MAINTAINERS: Create entry for Renesas RZ DRM drivers

2023-11-28 Thread Biju Das
Create entry for Renesas RZ DRM drivers and add my self as a maintainer. Signed-off-by: Biju Das Reviewed-by: Laurent Pinchart --- v14->v15: * Added drm-misc tree entry. * Sorted the entry(Placed before SHMOBILE) v13->v14: * Now SHMOBILE has maintainer entries. So dropped updating DRM

[PATCH v15 2/5] dt-bindings: display: renesas, rzg2l-du: Document RZ/V2L DU bindings

2023-11-28 Thread Biju Das
Document DU found in RZ/V2L SoC. The DU block is identical to RZ/G2L SoC and therefore use RZ/G2L fallback to avoid any driver changes. Signed-off-by: Biju Das Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Reviewed-by: Geert Uytterhoeven --- v14->v15: * No change. v13->v14: * No

Re: [Intel-gfx] [PATCH] drm/i915/display: Fix phys_base to be relative not absolute

2023-11-28 Thread Andrzej Hajda
On 28.11.2023 04:47, Paz Zcharya wrote: On Mon, Nov 27, 2023 at 8:20 PM Paz Zcharya wrote: On 21.11.2023 13:06, Andrzej Hajda wrote: On 18.11.2023 00:01, Paz Zcharya wrote: On Tue, Nov 14, 2023 at 10:13:59PM -0500, Rodrigo Vivi wrote: On Sun, Nov 05, 2023 at 05:27:03PM +, Paz Zcharya

Re: [PATCH 4/8] drm/shmobile: Do not include

2023-11-28 Thread Geert Uytterhoeven
On Tue, Nov 28, 2023 at 11:47 AM Thomas Zimmermann wrote: > Remove unnecessary include statements for . > The file contains helpers for non-atomic code and should not be > required by most drivers. No functional changes. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Geert Uytterhoeven

Re: [PATCH v2 08/12] arm64: dts: qcom: qcm2290: Add display nodes

2023-11-28 Thread Dmitry Baryshkov
On 27/11/2023 17:28, Konrad Dybcio wrote: Add the required nodes to support display on QCM2290. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 214 ++ 1 file changed, 214 insertions(+) Reviewed-by: Dmitry Baryshkov -- With best

Re: [PATCH v2 09/12] arm64: dts: qcom: qcm2290: Hook up interconnects

2023-11-28 Thread Dmitry Baryshkov
On 27/11/2023 17:28, Konrad Dybcio wrote: Add interconnect provider nodes and hook up interconnects to consumer devices, including bwmon. Signed-off-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/qcm2290.dtsi | 248 ++ 1 file changed, 248 insertions(+)

Re: [PATCH 1/2] drm/scheduler: improve GPU scheduler documentation v2

2023-11-28 Thread Christian König
Am 16.11.23 um 23:23 schrieb Danilo Krummrich: [SNIP] + * + * The lifetime of the scheduler is managed by the driver using it. Before + * destroying the scheduler the driver must ensure that all hardware processing + * involving this scheduler object has finished by calling for example + *

Re: [PATCH v2 3/3] drm/panfrost: Synchronize and disable interrupts before powering off

2023-11-28 Thread Boris Brezillon
On Tue, 28 Nov 2023 13:45:10 +0100 AngeloGioacchino Del Regno wrote: > To make sure that we don't unintentionally perform any unclocked and/or > unpowered R/W operation on GPU registers, before turning off clocks and > regulators we must make sure that no GPU, JOB or MMU ISR execution is >

Re: [v4,43/45] drm/sun4i: hdmi: Switch to container_of_const

2023-11-28 Thread Sui Jingfeng
Hi, On 2023/11/28 18:24, Maxime Ripard wrote: container_of_const() allows to preserve the pointer constness and is thus more flexible than inline functions. Let's switch all our instances of container_of() to container_of_const(). Signed-off-by: Maxime Ripard LGTM, Reviewed-by: Sui

Re: [PATCH 8/8] drm/xlnx: Do not include

2023-11-28 Thread Thomas Zimmermann
Hi Am 28.11.23 um 12:02 schrieb Laurent Pinchart: Hi Thomas, Thank you for the patch. On Tue, Nov 28, 2023 at 11:45:24AM +0100, Thomas Zimmermann wrote: Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No

Re: [PATCH v2 10/12] drm/rockchip: vop2: Add support for rk3588

2023-11-28 Thread Andy Yan
Hi Heiko: On 11/28/23 17:44, Heiko Stübner wrote: Hi Andy, Am Dienstag, 28. November 2023, 10:32:55 CET schrieb Andy Yan: On 11/27/23 23:29, Heiko Stübner wrote: Am Mittwoch, 22. November 2023, 13:55:44 CET schrieb Andy Yan: From: Andy Yan VOP2 on rk3588: Four video ports: VP0 Max

Re: [EXTERNAL] Re: [PATCH v9 00/20] Imagination Technologies PowerVR DRM driver

2023-11-28 Thread Donald Robson
Hi Nikolaus, I can't say it won't happen, but for commercial reasons we need to concentrate our efforts on current and next generation product lines. We just don't have the resources to look back at the moment. Thanks, Donald On Thu, 2023-11-23 at 10:04 +0100, H. Nikolaus Schaller wrote: > ***

Re: [7/8] drm/simpledrm: Do not include

2023-11-28 Thread Sui Jingfeng
Hi, On 2023/11/28 18:45, Thomas Zimmermann wrote: Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui Jingfeng ---

Re: [PATCH] driver core: make device_is_dependent() static

2023-11-28 Thread Rafael J. Wysocki
On Tue, Nov 28, 2023 at 11:28 AM Greg Kroah-Hartman wrote: > > The function device_is_dependent() is only called by the driver core > internally and should not, at this time, be called by anyone else > outside of it, so mark it as static so as not to give driver authors the > wrong idea. > > Cc:

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

2023-11-28 Thread Christian König
Am 28.11.23 um 13:50 schrieb Weixi Zhu: The problem: Accelerator driver developers are forced to reinvent external MM subsystems case by case, because Linux core MM only considers host memory resources. These reinvented MM subsystems have similar orders of magnitude of LoC as Linux MM (80K),

Re: [PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments

2023-11-28 Thread Ville Syrjälä
On Tue, Nov 28, 2023 at 02:29:40PM +0100, Maxime Ripard wrote: > Hi Jani, > > On Tue, Nov 28, 2023 at 02:54:02PM +0200, Jani Nikula wrote: > > On Tue, 28 Nov 2023, Maxime Ripard wrote: > > > All the drm_connector_init variants take at least a pointer to the > > > device, connector and hooks

Re: [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread Linus Walleij
On Tue, Nov 28, 2023 at 9:30 AM Neil Armstrong wrote: > You can apply them now, or tell me if you want me to apply them. Please apply them Neil (to drm-misc-fixes) order 2, 1, 3 for bisectability. Yours, Linus Walleij

Re: linux-next: manual merge of the drm tree with the drm-misc-fixes tree

2023-11-28 Thread Geert Uytterhoeven
Hi Stephen, On Wed, Nov 22, 2023 at 1:29 AM Stephen Rothwell wrote: > Today's linux-next merge of the drm tree got a conflict in: > > drivers/accel/ivpu/ivpu_hw_37xx.c > > between commit: > > 3f7c0634926d ("accel/ivpu/37xx: Fix hangs related to MMIO reset") > > from the drm-misc-fixes tree

Re: [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread neil . armstrong
On 28/11/2023 10:34, Linus Walleij wrote: On Tue, Nov 28, 2023 at 9:30 AM Neil Armstrong wrote: You can apply them now, or tell me if you want me to apply them. Please apply them Neil (to drm-misc-fixes) order 2, 1, 3 for bisectability. Sure, doing it right now. Neil Yours, Linus

Re: [PATCH] PCI: qcom: Fix compile error

2023-11-28 Thread Jani Nikula
On Tue, 28 Nov 2023, Manivannan Sadhasivam wrote: > On Tue, Nov 28, 2023 at 11:44:26AM +0530, Vignesh Raman wrote: >> Hi Mani, >> >> On 28/11/23 10:44, Manivannan Sadhasivam wrote: >> > On Tue, Nov 28, 2023 at 09:50:26AM +0530, Vignesh Raman wrote: >> > > Commit a2458d8f618a ("PCI/ASPM:

Re: [Intel-gfx] [PATCH v2] drm/i915/irq: Improve error logging for unexpected DE Misc interrupts

2023-11-28 Thread Jani Nikula
On Sun, 26 Nov 2023, Rahul Rameshbabu wrote: > Dump the iir value in hex when the interrupt is unexpected. > > Link: https://gitlab.freedesktop.org/drm/intel/-/issues/9652#note_2178501 > Cc: Jani Nikula > Signed-off-by: Rahul Rameshbabu > Reviewed-by: Chaitanya Kumar Borah Pushed to

Re: [PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments

2023-11-28 Thread Jani Nikula
On Tue, 28 Nov 2023, Maxime Ripard wrote: > All the drm_connector_init variants take at least a pointer to the > device, connector and hooks implementation. > > However, none of them check their value before dereferencing those > pointers which can lead to a NULL-pointer dereference if the author

Re: (subset) [PATCH drm-misc-next 3/5] drm/imagination: vm: fix drm_gpuvm reference count

2023-11-28 Thread Maxime Ripard
On Sat, 25 Nov 2023 00:36:38 +0100, Danilo Krummrich wrote: > The driver specific reference count indicates whether the VM should be > teared down, whereas GPUVM's reference count indicates whether the VM > structure can finally be freed. > > Hence, free the VM structure in pvr_gpuvm_free() and

Re: (subset) [PATCH drm-misc-next 2/5] drm/imagination: vm: check for drm_gpuvm_range_valid()

2023-11-28 Thread Maxime Ripard
On Sat, 25 Nov 2023 00:36:37 +0100, Danilo Krummrich wrote: > Extend pvr_device_addr_and_size_are_valid() by the corresponding GPUVM > sanity checks. This includes a, previously missing, overflow check for > the base address and size of the requested mapping. > > Applied to drm/drm-misc

Re: (subset) [PATCH][next] drm/imagination: Fix a couple of spelling mistakes in literal strings

2023-11-28 Thread Maxime Ripard
On Fri, 24 Nov 2023 16:39:17 +, Colin Ian King wrote: > There are a couple of spelling mistakes in literal strings in the > stid_fmts array. Fix these. > > Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime

Re: (subset) [PATCH -next] drm/imagination: Remove unneeded semicolon

2023-11-28 Thread Maxime Ripard
On Mon, 27 Nov 2023 09:04:30 +0800, Yang Li wrote: > ./drivers/gpu/drm/imagination/pvr_free_list.c:258:2-3: Unneeded semicolon > > Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime

Re: (subset) [PATCH drm-misc-next 1/5] drm/imagination: vm: prevent duplicate drm_gpuvm_bo instances

2023-11-28 Thread Maxime Ripard
On Sat, 25 Nov 2023 00:36:36 +0100, Danilo Krummrich wrote: > Use drm_gpuvm_bo_obtain() instead of drm_gpuvm_bo_create(). The latter > should only be used in conjunction with drm_gpuvm_bo_obtain_prealloc(). > > drm_gpuvm_bo_obtain() re-uses existing instances of a given VM and BO > combination,

Re: [PATCH v2 05/12] iommu/arm-smmu-qcom: Add QCM2290 DPU compatible

2023-11-28 Thread Dmitry Baryshkov
On 27/11/2023 17:28, Konrad Dybcio wrote: Add the QCM2290 DPU compatible to clients compatible list, as it also needs the workarounds. Nit: MDSS, not DPU compatible With that fixed: Reviewed-by: Dmitry Baryshkov Signed-off-by: Konrad Dybcio ---

Re: [PATCH v2 2/3] drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

2023-11-28 Thread Boris Brezillon
On Tue, 28 Nov 2023 13:45:09 +0100 AngeloGioacchino Del Regno wrote: > In preparation for adding a IRQ synchronization mechanism for PM suspend > add gpu_irq and mmu_irq variables to struct panfrost_device and change > functions panfrost_gpu_init() and panfrost_mmu_init() to use those. > >

Re: [PATCH v4] drm/test: add a test suite for GEM objects backed by shmem

2023-11-28 Thread Maxime Ripard
On Fri, Nov 24, 2023 at 11:15:12AM +0100, Marco Pagani wrote: > > > On 2023-11-24 09:49, Maxime Ripard wrote: > > Hi, > > > > On Thu, Nov 23, 2023 at 11:01:46AM +0100, Marco Pagani wrote: > >> +static int drm_gem_shmem_test_init(struct kunit *test) > >> +{ > >> + struct device *dev; > >> +

Re: [PATCH v9 03/20] dt-bindings: gpu: Add Imagination Technologies PowerVR/IMG GPU

2023-11-28 Thread Donald Robson
Hi Geert, On Mon, 2023-11-27 at 09:39 +0100, Geert Uytterhoeven wrote: > Hi Donald, > > On Wed, Nov 22, 2023 at 5:36 PM Donald Robson > wrote: > > From: Sarah Walker > > > > Add the device tree binding documentation for the IMG AXE GPU used in > > TI AM62 SoCs. > > > > Co-developed-by:

Re: [PATCH v2 10/12] drm/rockchip: vop2: Add support for rk3588

2023-11-28 Thread Heiko Stübner
Hi Andy, Am Dienstag, 28. November 2023, 10:32:55 CET schrieb Andy Yan: > On 11/27/23 23:29, Heiko Stübner wrote: > > Am Mittwoch, 22. November 2023, 13:55:44 CET schrieb Andy Yan: > >> From: Andy Yan > >> > >> VOP2 on rk3588: > >> > >> Four video ports: > >> VP0 Max 4096x2160 > >> VP1 Max

Re: [PATCH v2 04/12] drm/rockchip: vop2: clear afbc en and transform bit for cluster window at linear mode

2023-11-28 Thread Andy Yan
Hi Heiko: On 11/28/23 16:30, Heiko Stübner wrote: Am Dienstag, 28. November 2023, 09:03:46 CET schrieb Andy Yan: Hi Heiko: On 11/27/23 23:02, Heiko Stübner wrote: Am Mittwoch, 22. November 2023, 13:54:25 CET schrieb Andy Yan: From: Andy Yan The enable bit and transform offset of cluster

Re: (subset) [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread Neil Armstrong
Hi, On Tue, 28 Nov 2023 00:10:18 +0100, Linus Walleij wrote: > This series reverts the attempts to fix the bug that went > into v6.7-rc1 in commit 199cf07ebd2b > "drm/bridge: panel: Add a device link between drm device and panel device" > and then it reverts that patch as well. > > Thanks,

[PATCH v4 09/45] drm/connector: hdmi: Add Broadcast RGB property

2023-11-28 Thread Maxime Ripard
The i915 driver has a property to force the RGB range of an HDMI output. The vc4 driver then implemented the same property with the same semantics. KWin has support for it, and a PR for mutter is also there to support it. Both drivers implementing the same property with the same semantics, plus

[PATCH v4 11/45] drm/connector: hdmi: Add output BPC to the connector state

2023-11-28 Thread Maxime Ripard
We'll add automatic selection of the output BPC in a following patch, but let's add it to the HDMI connector state already. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic.c | 1 + drivers/gpu/drm/drm_atomic_state_helper.c | 7 +-

[PATCH v4 10/45] drm/connector: hdmi: Add RGB Quantization Range to the connector state

2023-11-28 Thread Maxime Ripard
HDMI controller drivers will need to figure out the RGB range they need to configure based on a mode and property values. Let's expose that in the HDMI connector state so drivers can just use that value. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic.c | 4

[PATCH v4 04/45] drm/tests: Add helper to create mock crtc

2023-11-28 Thread Maxime Ripard
We're going to need a full-blown, functional, KMS device to test more components of the atomic modesetting infrastructure. Let's add a new helper to create a dumb, mocked, CRTC. By default it will create a CRTC relying only on the default helpers, but drivers are free to deviate from that.

[PATCH v4 06/45] drm/tests: connector: Add tests for drmm_connector_init

2023-11-28 Thread Maxime Ripard
drmm_connector_init is the preferred function to initialize a drm_connector structure. Let's add a bunch of unit tests for it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tests/drm_connector_test.c | 219 - 1 file changed, 218 insertions(+), 1 deletion(-) diff

[PATCH v4 00/45] drm/connector: Create HDMI Connector infrastructure

2023-11-28 Thread Maxime Ripard
Hi, Here's a series that creates some extra infrastructure 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 else. Infoframes generation code still requires some

[PATCH v4 02/45] drm/tests: helpers: Add atomic helpers

2023-11-28 Thread Maxime Ripard
The mock device we were creating was missing any of the driver-wide helpers. That was fine before since we weren't testing the atomic state path, but we're going to start, so let's use the default implementations. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tests/drm_kunit_helpers.c | 3

[PATCH v4 03/45] drm/tests: Add helper to create mock plane

2023-11-28 Thread Maxime Ripard
We're going to need a full-blown, functional, KMS device to test more components of the atomic modesetting infrastructure. Let's add a new helper to create a dumb, mocked, primary plane. By default, it will create a linear XRGB plane, using the default helpers. Signed-off-by: Maxime Ripard

[PATCH v4 01/45] drm/tests: helpers: Include missing drm_drv header

2023-11-28 Thread Maxime Ripard
We have a few functions declared in our kunit helpers header, some of them dereferencing the struct drm_driver. However, we don't include the drm_drv.h header file defining that structure, leading to compilation errors if we don't include both headers. Fixes: d98780310719 ("drm/tests: helpers:

Re: [PATCH v15 4/5] MAINTAINERS: Update entries for Renesas DRM drivers

2023-11-28 Thread Geert Uytterhoeven
On Tue, Nov 28, 2023 at 11:52 AM Biju Das wrote: > The rcar-du has never been maintained in drm-misc. So exclude only > this driver from drm-misc. Also, add the tree entry for sh_mobile. > > Signed-off-by: Biju Das Reviewed-by: Geert Uytterhoeven Acked-by: Geert Uytterhoeven # shmob_drm

Re: [PATCH v18 04/26] drm/shmem-helper: Refactor locked/unlocked functions

2023-11-28 Thread Maxime Ripard
Hi, On Fri, Nov 24, 2023 at 11:59:11AM +0100, Boris Brezillon wrote: > On Fri, 24 Nov 2023 11:40:06 +0100 > Maxime Ripard wrote: > > > On Mon, Oct 30, 2023 at 02:01:43AM +0300, Dmitry Osipenko wrote: > > > Add locked and remove unlocked postfixes from drm-shmem function names, > > > making

Re: [3/8] drm/loongson: Do not include

2023-11-28 Thread Sui Jingfeng
Hi, Thank you for the patch. On 2023/11/28 18:45, Thomas Zimmermann wrote: Remove unnecessary include statements for . The file contains helpers for non-atomic code and should not be required by most drivers. No functional changes. Signed-off-by: Thomas Zimmermann Reviewed-by: Sui

[PATCH v2 0/3] drm/panfrost: Fix poweroff and sync IRQs for suspend

2023-11-28 Thread AngeloGioacchino Del Regno
This series contains a fast fix for the basic GPU poweroff functionality and goes further by implementing interrupt masking and synchronization before suspend. For more information, please look at the conversation at [1], which explains the regression seen with the poweroff commit and the initial

[PATCH v2 1/3] drm/panfrost: Ignore core_mask for poweroff and disable PWRTRANS irq

2023-11-28 Thread AngeloGioacchino Del Regno
Some SoCs may be equipped with a GPU containing two core groups and this is exactly the case of Samsung's Exynos 5422 featuring an ARM Mali-T628 MP6 GPU: the support for this GPU in Panfrost is partial, as this driver currently supports using only one core group and that's reflected on all parts

[PATCH v2 2/3] drm/panfrost: Add gpu_irq, mmu_irq to struct panfrost_device

2023-11-28 Thread AngeloGioacchino Del Regno
In preparation for adding a IRQ synchronization mechanism for PM suspend add gpu_irq and mmu_irq variables to struct panfrost_device and change functions panfrost_gpu_init() and panfrost_mmu_init() to use those. Signed-off-by: AngeloGioacchino Del Regno ---

Re: [PATCH v4 05/45] drm/connector: Check drm_connector_init pointers arguments

2023-11-28 Thread Maxime Ripard
Hi Jani, On Tue, Nov 28, 2023 at 02:54:02PM +0200, Jani Nikula wrote: > On Tue, 28 Nov 2023, Maxime Ripard wrote: > > All the drm_connector_init variants take at least a pointer to the > > device, connector and hooks implementation. > > > > However, none of them check their value before

Re: [PATCH v2] drm/mxsfb: Switch to drmm_mode_config_init

2023-11-28 Thread Thomas Zimmermann
Hi Am 28.11.23 um 09:27 schrieb Maxime Ripard: Hi, On Mon, Nov 27, 2023 at 10:25:38PM +0100, Marek Vasut wrote: Switch from deprecated unmanaged drm_mode_config_init() to managed drmm_mode_config_init(). No functional change. Signed-off-by: Marek Vasut --- Cc: Daniel Vetter Cc: David

Re: [PATCH v2 10/12] drm/rockchip: vop2: Add support for rk3588

2023-11-28 Thread Andy Yan
Hi Heiko: Thanks for you review. On 11/27/23 23:29, Heiko Stübner wrote: Hi Andy, Am Mittwoch, 22. November 2023, 13:55:44 CET schrieb Andy Yan: From: Andy Yan VOP2 on rk3588: Four video ports: VP0 Max 4096x2160 VP1 Max 4096x2160 VP2 Max 4096x2160 VP3 Max 2048x1080 4 4K Cluster windows

[PATCH v4 37/45] drm/rockchip: inno_hdmi: Create mask retrieval functions

2023-11-28 Thread Maxime Ripard
The register mask and bits to enable or disable a given infoframe depends on its type. This is currently passed as an argument to the function that writes an infoframe, but let's create a helper function to retrieve them based on the type to make further reworks easier. Signed-off-by: Maxime

[PATCH v4 42/45] drm/sun4i: hdmi: Move mode_set into enable

2023-11-28 Thread Maxime Ripard
We're not doing anything special in atomic_mode_set so we can simply merge it into atomic_enable. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 38 +- 1 file changed, 14 insertions(+), 24 deletions(-) diff --git

[PATCH v4 39/45] drm/rockchip: inno_hdmi: Remove unused drm device pointer

2023-11-28 Thread Maxime Ripard
The drm_dev field in the inno_hdmi struct stores a pointer to the DRM device but is never used anywhere in the driver. Let's remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c

[PATCH v4 45/45] drm/sun4i: hdmi: Switch to HDMI connector

2023-11-28 Thread Maxime Ripard
The new HDMI connector infrastructure allows to remove some boilerplate, especially to generate infoframes. Let's switch to it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 80 ++ 1 file changed, 51 insertions(+), 29 deletions(-)

[PATCH v4 44/45] drm/sun4i: hdmi: Consolidate atomic_check and mode_valid

2023-11-28 Thread Maxime Ripard
atomic_check and mode_valid do not check for the same things which can lead to surprising result if the userspace commits a mode that didn't go through mode_valid. Let's merge the two implementations into a function called by both. Signed-off-by: Maxime Ripard ---

Re: [EXTERNAL] [PATCH drm-misc-next 1/5] drm/imagination: vm: prevent duplicate drm_gpuvm_bo instances

2023-11-28 Thread Donald Robson
Hi Danilo, Thanks for reviewing this file again and thanks for clarifying the use of these functions. Reviewed-by: Donald Robson On Sat, 2023-11-25 at 00:36 +0100, Danilo Krummrich wrote: > *** CAUTION: This email originates from a source not known to Imagination > Technologies. Think before

Re: [EXTERNAL] [PATCH drm-misc-next 2/5] drm/imagination: vm: check for drm_gpuvm_range_valid()

2023-11-28 Thread Donald Robson
Thanks Danilo. Reviewed-by: Donald Robson On Sat, 2023-11-25 at 00:36 +0100, Danilo Krummrich wrote: > *** CAUTION: This email originates from a source not known to Imagination > Technologies. Think before you click a link or open an attachment *** > > Extend

Re: [PATCH v18 04/26] drm/shmem-helper: Refactor locked/unlocked functions

2023-11-28 Thread Boris Brezillon
On Tue, 28 Nov 2023 12:14:42 +0100 Maxime Ripard wrote: > Hi, > > On Fri, Nov 24, 2023 at 11:59:11AM +0100, Boris Brezillon wrote: > > On Fri, 24 Nov 2023 11:40:06 +0100 > > Maxime Ripard wrote: > > > > > On Mon, Oct 30, 2023 at 02:01:43AM +0300, Dmitry Osipenko wrote: > > > > Add locked

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

2023-11-28 Thread Christian König
Adding a few missing important people to the explicit to list. Am 28.11.23 um 13:50 schrieb Weixi Zhu: The problem: Accelerator driver developers are forced to reinvent external MM subsystems case by case, because Linux core MM only considers host memory resources. These reinvented MM

[PATCH v2 2/7] drm/bridge: tc358767: Fix order of register defines

2023-11-28 Thread Alexander Stein
0x0510 is bigger than 0x50c, order them accordingly. No functional change intended. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c

[PATCH v2 0/7] Improve tc358767 regmap usage

2023-11-28 Thread Alexander Stein
Hi, this series improves the regmap usage by cleaning up current usage as well as adding more registers to the list of volatile registers. SYSSTAT is added to the list of precious registers as it is cleared upon read. This series is based on [1]. Changes in v2: * Patch 3: Use more symbolic names

Re: (subset) [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread Linus Walleij
On Tue, Nov 28, 2023 at 11:13 AM Neil Armstrong wrote: > On 28/11/2023 11:12, Neil Armstrong wrote: > > Hi, > > > > On Tue, 28 Nov 2023 00:10:18 +0100, Linus Walleij wrote: > >> This series reverts the attempts to fix the bug that went > >> into v6.7-rc1 in commit 199cf07ebd2b > >> "drm/bridge:

Re: [PATCH drm-misc-next 3/5] drm/imagination: vm: fix drm_gpuvm reference count

2023-11-28 Thread Donald Robson
Thanks Danilo. It's obvious now you've pointed it out! Reviewed-by: Donald Robson On Sat, 2023-11-25 at 00:36 +0100, Danilo Krummrich wrote: > *** CAUTION: This email originates from a source not known to Imagination > Technologies. Think before you click a link or open an attachment *** > >

Re: [PATCH 8/8] drm/xlnx: Do not include

2023-11-28 Thread Laurent Pinchart
Hi Thomas, Thank you for the patch. On Tue, Nov 28, 2023 at 11:45:24AM +0100, Thomas Zimmermann wrote: > Remove unnecessary include statements for . > The file contains helpers for non-atomic code and should not be > required by most drivers. No functional changes. > > Signed-off-by: Thomas

Re: [PATCH v4 38/45] drm/rockchip: inno_hdmi: Switch to infoframe type

2023-11-28 Thread Johan Jonker
Hi, Maximum for inno_hdmi is: 1920x1080. Do we still need INFOFRAME_VSI? >From Rockchip RK3036 TRM V1.0 20150907-Part2 Peripheral and Interface.pdf: - HDMI 1.4a/b/1.3/1.2/1.1, HDCP 1.2 and DVI 1.0 standard compliant transmitter - Supports all DTV resolutions including 480p/576p/720p/1080p

Re: (subset) [PATCH 0/3] Revert panel fixes and original buggy patch

2023-11-28 Thread Maxime Ripard
On Tue, Nov 28, 2023 at 11:16:23AM +0100, Linus Walleij wrote: > On Tue, Nov 28, 2023 at 11:13 AM Neil Armstrong > wrote: > > On 28/11/2023 11:12, Neil Armstrong wrote: > > > Hi, > > > > > > On Tue, 28 Nov 2023 00:10:18 +0100, Linus Walleij wrote: > > >> This series reverts the attempts to fix

[PATCH v2 4/7] drm/bridge: tc358767: Sort volatile registers according to address

2023-11-28 Thread Alexander Stein
Sort the list by the starting address to ease adding new entries. No functional change intended. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c

[PATCH v2 3/7] drm/bridge: tc358767: Add more registers to non-writeable range

2023-11-28 Thread Alexander Stein
While at it, also add missing register definitions. HDCP registers are skipped as they are not named, range 0x0980 - 0x09ac. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 87 --- 1 file changed, 81 insertions(+), 6 deletions(-) diff --git

[PATCH v2 7/7] drm/bridge: tc358767: Add descriptions to register definitions

2023-11-28 Thread Alexander Stein
Use the register names from the datasheet. No functional change intended. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c

[PATCH v2 5/7] drm/bridge: tc358767: Add more volatile registers

2023-11-28 Thread Alexander Stein
These registers might change their value without any host write operation. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index

[PATCH v2 1/7] drm/bridge: tc358767: Use regmap_access_table for writeable registers

2023-11-28 Thread Alexander Stein
Using ranges it is easier to add more register where writing is not allowed, especially for sequences of registers. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH v2 6/7] drm/bridge: tc358767: Add precious register SYSSTAT

2023-11-28 Thread Alexander Stein
This is the single register which clears its value upon read operation. Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 10 ++ 1 file changed, 10 insertions(+) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index

[PATCH 1/1] drm/bridge: tc358767: respect (e)DP output resolution limits

2023-11-28 Thread Alexander Stein
From: Markus Niebel Modes S21/P21, (e)DP output, support only resolutions up to 1920x1200. Filter out modes from EDID larger than this limit. This especially important for 4k monitors. Signed-off-by: Markus Niebel Signed-off-by: Alexander Stein --- drivers/gpu/drm/bridge/tc358767.c | 10

[PATCH v4 36/45] drm/rockchip: inno_hdmi: Move infoframe disable to separate function

2023-11-28 Thread Maxime Ripard
The code to upload infoframes to the controller uses a weird construct which, based on the previous function call return code, will either disable or enable that infoframe. In order to get rid of that argument, let's split the function to disable the infoframe into a separate function and make it

[PATCH v4 41/45] drm/sun4i: hdmi: Convert encoder to atomic

2023-11-28 Thread Maxime Ripard
The sun4i_hdmi driver still uses the non-atomic variants of the encoder hooks, so let's convert to their atomic equivalents. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_hdmi_enc.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git

[PATCH v4 20/45] drm/vc4: hdmi: Switch to HDMI connector

2023-11-28 Thread Maxime Ripard
The new HDMI connector infrastructure allows us to remove a lot of boilerplate, so let's switch to it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 636 + drivers/gpu/drm/vc4/vc4_hdmi.h | 44 +--

[PATCH v4 32/45] drm/rockchip: inno_hdmi: Remove useless enum

2023-11-28 Thread Maxime Ripard
The CSC_* enum has no users left, so let's remove it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rockchip/inno_hdmi.c | 9 - 1 file changed, 9 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index c342bc8b3a23..f05417c6b637

  1   2   3   >