[PATCH v4 01/12] drm/vc4: txp: Properly set the possible_crtcs mask

2021-05-07 Thread Maxime Ripard
The current code does a binary OR on the possible_crtcs variable of the TXP encoder, while we want to set it to that value instead. Cc: # v5.9+ Fixes: 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own") Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- d

[PATCH v4 02/12] drm/vc4: crtc: Skip the TXP

2021-05-07 Thread Maxime Ripard
# v5.9+ Fixes: 39fcb2808376 ("drm/vc4: txp: Turn the TXP into a CRTC of its own") Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_crtc.c b/drivers/gpu/drm/vc4/vc4_

[PATCH v4 03/12] drm/vc4: crtc: Pass the drm_atomic_state to config_pv

2021-05-07 Thread Maxime Ripard
The vc4_crtc_config_pv will need to access the drm_atomic_state structure and its only parent function, vc4_crtc_atomic_enable already has access to it. Let's pass it as a parameter. Fixes: 792c3132bc1b ("drm/vc4: encoder: Add finer-grained encoder callbacks") Signed-off-by

[PATCH v4 04/12] drm/vc4: crtc: Fix vc4_get_crtc_encoder logic

2021-05-07 Thread Maxime Ripard
gether with the atomic state. Fixes: 792c3132bc1b ("drm/vc4: encoder: Add finer-grained encoder callbacks") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 21 - 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_crt

[PATCH v4 05/12] drm/vc4: crtc: Lookup the encoder from the register at boot

2021-05-07 Thread Maxime Ripard
e can thus read that register, lookup the associated register through the vc4_pv_data structure, and then pass it to vc4_crtc_disable so that we can perform the proper operations. Fixes: 875a4d536842 ("drm/vc4: drv: Disable the CRTC at boot time") Signed-off-by: Maxime Ripard ---

[PATCH v4 06/12] drm/vc4: hdmi: Prevent clock unbalance

2021-05-07 Thread Maxime Ripard
v5.10+ Fixes: 09c438139b8f ("drm/vc4: hdmi: Implement finer-grained hooks") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 1fda574579af..9c91

[PATCH v4 07/12] drm/vc4: hvs: Make the HVS bind first

2021-05-07 Thread Maxime Ripard
We'll need to have the HVS binding before the HDMI controllers so that we can check whether the firmware allows to run in 4kp60. Reorder a bit the component list, and document the current constraints we're aware of. Acked-by: Dave Stevenson Acked-by: Thomas Zimmermann Signed-off-

[PATCH v4 08/12] drm/vc4: hdmi: Properly compute the BVB clock rate

2021-05-07 Thread Maxime Ripard
The BVB clock rate computation doesn't take into account a mode clock of 594MHz that we're going to need to support 4k60. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 17 + 1 file

[PATCH v4 09/12] drm/vc4: hdmi: Check and warn if we can't reach 4kp60 frequencies

2021-05-07 Thread Maxime Ripard
Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 31 +++ drivers/gpu/drm/vc4/vc4_hdmi.h | 8 2 files changed, 39 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/g

[PATCH v4 10/12] drm/vc4: hdmi: Enable the scrambler

2021-05-07 Thread Maxime Ripard
The HDMI controller on the BCM2711 includes a scrambler in order to reach the HDMI 2.0 modes that require it. Let's add the support for it. Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 64 + drivers/gpu/dr

[PATCH v4 11/12] drm/vc4: hdmi: Add a workqueue to set scrambling

2021-05-07 Thread Maxime Ripard
nd if it's not set yet try to enable it again. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 25 + drivers/gpu/drm/vc4/vc4_hdmi.h | 2 ++ 2 files changed, 27 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/v

[PATCH v4 12/12] drm/vc4: hdmi: Raise the maximum clock rate

2021-05-07 Thread Maxime Ripard
Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 4fa7ea419594..0c64de5d60ec 100644 --- a/drivers/gpu/drm/vc4

Re: [PATCH v3 1/5] drm/connector: Create a helper to attach the hdr_output_metadata property

2021-05-10 Thread Maxime Ripard
Hi, On Fri, Apr 30, 2021 at 11:44:47AM +0200, Maxime Ripard wrote: > All the drivers that implement HDR output call pretty much the same > function to initialise the hdr_output_metadata property, and while the > creation of that property is in a helper, every driver uses the same > co

Re: [PATCH] drm: Declare drm_send_event_helper static.

2021-05-10 Thread Maxime Ripard
Hi, On Sun, May 09, 2021 at 07:12:52PM +0530, Rajat Asthana wrote: > From: Rajat > > Declare drm_send_event_helper as static to fix sparse warning: > > > warning: symbol 'drm_send_event_helper' was not declared. > > Should it be static? > > Signed-off-by: Rajat Both the Author and Signed-off

Re: [PATCH 1/1] drm/vc4: Remove redundant error printing in vc4_ioremap_regs()

2021-05-11 Thread Maxime Ripard
On Tue, May 11, 2021 at 05:29:23PM +0800, Zhen Lei wrote: > When devm_ioremap_resource() fails, a clear enough error message will be > printed by its subfunction __devm_ioremap_resource(). The error > information contains the device name, failure cause, and possibly resource > information. > > The

[PATCH] Documentation: gpu: Mention the requirements for new properties

2021-05-11 Thread Maxime Ripard
New KMS properties come with a bunch of requirements to avoid each driver from running their own, inconsistent, set of properties, eventually leading to issues like property conflicts, inconsistencies between drivers and semantics, etc. Let's document what we expect. Signed-off-by: Maxime R

[PULL] drm-misc-fixes

2021-05-13 Thread Maxime Ripard
m/vc4: remove unused function Maxime Ripard (1): Merge drm/drm-fixes into drm-misc-fixes xinhui pan (1): drm/ttm: Do not add non-system domain BO into swap list .mailmap | 1 + MAINTAINERS | 10 +- drivers/gpu/drm/vc4/vc4_vec.c | 6 -- 3

Re: [PATCH v5 6/6] drm/sprd: add Unisoc's drm mipi dsi&dphy driver

2021-05-18 Thread Maxime Ripard
On Wed, May 12, 2021 at 09:53:06PM +0800, Kevin Tang wrote: > > > +struct dsi_reg { > > > + union _0x00 { > > > + u32 val; > > > + struct _DSI_VERSION { > > > + u32 dsi_version: 16; > > > + u32 reserved: 16; > > > + } bits; > > > +

Re: [PATCH v5 4/6] drm/sprd: add Unisoc's drm display controller driver

2021-05-18 Thread Maxime Ripard
On Fri, May 14, 2021 at 09:18:00PM +0800, Kevin Tang wrote: > Maxime Ripard 于2021年4月30日周五 下午5:22写道: > > > + info = drm_format_info(fb->format->format); > > > > Here fb->format is the result of drm_format_info(fb->format->format) > > info->num_

Re: [PATCH] dt-bindings: display: ssd1307fb: Convert to json-schema

2021-05-18 Thread Maxime Ripard
tion/devicetree/bindings/display/solomon,ssd1307fb.yaml > @@ -0,0 +1,166 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/display/solomon,ssd1307fb.yaml# > +$schema: http://devicetree.org/meta-schemas/core.y

[PULL] drm-misc-fixes

2021-05-20 Thread Maxime Ripard
Hi Dave, Daniel, Here's this week fix for drm-misc-fixes Maxime drm-misc-fixes-2021-05-20: Just a single fix for a dma-buf related WARN The following changes since commit c55b44c9386f3ee1b08752638559f19deaf6040d: Merge drm/drm-fixes into drm-misc-fixes (2021-05-11 13:35:52 +0200) are availab

[PATCH v2] Documentation: gpu: Mention the requirements for new properties

2021-05-20 Thread Maxime Ripard
Cc: Martin Blumenstingl Cc: Matthias Brugger Cc: Maxime Coquelin Cc: Maxime Ripard Cc: Melissa Wen Cc: Neil Armstrong Cc: Nicolas Ferre Cc: "Noralf Trønnes" Cc: NXP Linux Team Cc: Oleksandr Andrushchenko Cc: Patrik Jakobsson Cc: Paul Cercueil Cc: Pengutronix Kernel Team Cc

[PATCH 0/4] drm/vc4: Add support for the BCM2711 VEC

2021-05-20 Thread Maxime Ripard
Hi, The composite output in the BCM2711 is dealt using the VEC. While the earlier SoCs were properly supported, it wasn't functional on the BCM2711. Add the needed support from the RPi downstream kernel. Maxime Mateusz Kwiatkowski (4): drm/vc4: Fix clock source for VEC PixelValve on BCM2711

[PATCH 3/4] drm/vc4: Separate VEC compatible variants

2021-05-20 Thread Maxime Ripard
atible variants in devicetrees and the DRM driver was therefore necessary. The configurations used for both variants have been borrowed from Raspberry Pi (model 3B for BCM283x, 4B for BCM2711) firmware defaults. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- drivers/gpu/dr

[PATCH 4/4] ARM: boot: dts: bcm2711: Add BCM2711 VEC compatible

2021-05-20 Thread Maxime Ripard
From: Mateusz Kwiatkowski The BCM2711 has a slightly different VEC than the one found in the older SoCs. Now that we support the new variant, add its compatible to the device tree. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/bcm2711.dtsi | 1 + 1

[PATCH 1/4] drm/vc4: Fix clock source for VEC PixelValve on BCM2711

2021-05-20 Thread Maxime Ripard
From: Mateusz Kwiatkowski On the BCM2711 (Raspberry Pi 4), the VEC is actually connected to output 2 of pixelvalve3. NOTE: This contradicts the Broadcom docs, but has been empirically tested and confirmed by Raspberry Pi firmware devs. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime

[PATCH 2/4] dt-bindings: display: bcm2835-vec: Add BCM2711 compatible

2021-05-20 Thread Maxime Ripard
From: Mateusz Kwiatkowski The BCM2711 VEC uses a slightly different, incompatible, setup than the one used for the earlier SoC. Add a new compatible for it. Signed-off-by: Mateusz Kwiatkowski Signed-off-by: Maxime Ripard --- .../devicetree/bindings/display/brcm,bcm2835-vec.yaml | 4

Re: [PATCH 0/2] drm/cma-helper: Move mmap to object functions

2020-11-24 Thread Maxime Ripard
For both patches, Acked-by: Maxime Ripard Maxime signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

Re: [PATCH v4 2/2] drm/vc4: kms: Don't disable the muxing of an active CRTC

2020-11-24 Thread Maxime Ripard
On Mon, Nov 23, 2020 at 08:50:49AM +0100, Thomas Zimmermann wrote: > > > Am 20.11.20 um 15:42 schrieb Maxime Ripard: > > The current HVS muxing code will consider the CRTCs in a given state to > > setup their muxing in the HVS, and disable the other CRTCs muxes. > >

Re: [PATCH v2 00/10] drm/fb-helper: Various fixes and cleanups

2020-11-24 Thread Maxime Ripard
Acquiring the fb-helper lock during the flush operation prevents > concurrent modesets from taking place. > > The code has been tested with SHMEM and TTM BOs; with atomic and non- > atomic modesetting. For the whole series Acked-by: Maxime Ripard Maxime ___

Re: [PATCH v3 0/2] Default to cachable mappings for GEM SHMEM

2020-11-24 Thread Maxime Ripard
es, which are always mapped > using writecombine mode. For the whole series: Acked-by: Maxime Ripard Maxime signature.asc Description: PGP signature ___ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel

[PULL] drm-misc-fixes

2020-11-27 Thread Maxime Ripard
fix for nouveau Matti Hamalainen (1): drm/nouveau: fix relocations applying logic and a double-free Maxime Ripard (11): drm/vc4: hdmi: Make sure our clock rate is within limits drm/vc4: hdmi: Block odd horizontal timings drm/vc4: kms: Switch to drmm_add_action_or_rese

[PATCH v3 1/7] drm/vc4: hvs: Align the HVS atomic hooks to the new API

2020-12-02 Thread Maxime Ripard
Since the CRTC setup in vc4 is split between the PixelValves/TXP and the HVS, only the PV/TXP atomic hooks were updated in the previous commits, but it makes sense to update the HVS ones too. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4 +--- drivers/gpu/drm/vc4/vc4_drv.h

[PATCH v3 6/7] drm/vc4: hdmi: Limit the BCM2711 to the max without scrambling

2020-12-02 Thread Maxime Ripard
Unlike the previous generations, the HSM clock limitation is way above what we can reach without scrambling, so let's move the maximum frequency we support to the maximum clock frequency without scrambling. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 -- 1

[PATCH v3 0/7] drm/vc4: hdmi: Support the 10/12 bit output

2020-12-02 Thread Maxime Ripard
d the coccinelle script to the first patch - Fixed the pixel_rate ramp up Maxime Ripard (7): drm/vc4: hvs: Align the HVS atomic hooks to the new API drm/vc4: Pass the atomic state to encoder hooks drm/vc4: hdmi: Create a custom connector state drm/vc4: hdmi: Store pixel frequency i

Re: [PATCH 6/8] drm/vc4: kms: Wait on previous FIFO users before a commit

2020-12-02 Thread Maxime Ripard
Hi Thomas, On Fri, Nov 20, 2020 at 02:19:45PM +0100, Thomas Zimmermann wrote: > Am 13.11.20 um 16:29 schrieb Maxime Ripard: > > If we're having two subsequent, non-blocking, commits on two different > > CRTCs that share no resources, there's no guarantee on the order

[PATCH v3 5/7] drm/vc4: hdmi: Use the connector state pixel rate for the PHY

2020-12-02 Thread Maxime Ripard
x27;s reuse it from there instead of computing it again. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 9 - drivers/gpu/drm/vc4/vc4_hdmi_phy.c | 8 +--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dr

[PATCH v3 2/7] drm/vc4: Pass the atomic state to encoder hooks

2020-12-02 Thread Maxime Ripard
We'll need to access the connector state in our encoder setup, so let's just pass the whole DRM state to our private encoder hooks. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 18 ++ drivers/gpu/drm/vc4/vc4_drv.h | 10 +- drivers/g

[PATCH v3 7/7] drm/vc4: hdmi: Enable 10/12 bpc output

2020-12-02 Thread Maxime Ripard
The BCM2711 supports higher bpc count than just 8, so let's support it in our driver. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 71 - drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 9 3

[PATCH v3 4/7] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-12-02 Thread Maxime Ripard
ff-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 9fb7a77c86e8..61baf3c39d43 100644

[PATCH v3 3/7] drm/vc4: hdmi: Create a custom connector state

2020-12-02 Thread Maxime Ripard
When run with a higher bpc than 8, the clock of the HDMI controller needs to be adjusted. Let's create a connector state that will be used at atomic_check and atomic_enable to compute and store the clock rate associated to the state. Signed-off-by: Maxime Ripard --- drivers/gpu/dr

[PATCH v2] drm/vc4: hdmi: Don't poll for the infoframes status on setup

2020-12-03 Thread Maxime Ripard
dd a boolean flag to tell whether we want to poll or not to support both cases. Suggested-by: Dave Stevenson Signed-off-by: Maxime Ripard --- Changes from v1: - Inverted when to poll --- drivers/gpu/drm/vc4/vc4_hdmi.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --

[PATCH 0/8] drm/vc4: DSI improvements and BCM2711 support

2020-12-04 Thread Maxime Ripard
e for BCM2711 DSI1 drm/vc4: dsi: Add configuration for BCM2711 DSI1 ARM: dts: bcm2711: Use compatible string for BCM2711 DSI1 Maxime Ripard (3): drm/vc4: drv: Remove the DSI pointer in vc4_drv drm/vc4: dsi: Use snprintf for the PHY clocks instead of an array drm/vc4: dsi: Introduce a va

[PATCH 6/8] dt-bindings: Add compatible for BCM2711 DSI1

2020-12-04 Thread Maxime Ripard
From: Dave Stevenson DSI1 on BCM2711 doesn't require the DMA workaround that is used on BCM2835/6/7, therefore it needs a new compatible string. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- Documentation/devicetree/bindings/display/brcm,bcm2835-dsi0.yaml | 1 + 1

[PATCH 7/8] drm/vc4: dsi: Add configuration for BCM2711 DSI1

2020-12-04 Thread Maxime Ripard
From: Dave Stevenson BCM2711 DSI1 doesn't have the issue with the ARM not being able to write to the registers, therefore remove the DMA workaround for that compatible string. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dsi.c | 12 ++

[PATCH 8/8] ARM: dts: bcm2711: Use compatible string for BCM2711 DSI1

2020-12-04 Thread Maxime Ripard
From: Dave Stevenson Updates the compatible string for DSI1 on BCM2711 to differentiate it from BCM2835. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- arch/arm/boot/dts/bcm2711.dtsi | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/boot/dts/bcm2711.dtsi b/arch/arm

[PULL] drm-misc-fixes

2020-12-04 Thread Maxime Ripard
Hi Daniel, Dave, Here's this week round of fixes for drm-misc Thanks! Maxime drm-misc-fixes-2020-12-03: One bridge fix for OMAP, one for a race condition in a panel, two for uninitialized variables in rockchip and nouveau, and two fixes for mxsfb to fix a regression with modifiers and a fix for

[PATCH 2/8] drm/vc4: dsi: Correct DSI register definition

2020-12-04 Thread Maxime Ripard
definitions. Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index b1d8765795f1..bb316e6cc12b 100644 --- a/drivers/gpu/drm

[PATCH 4/8] drm/vc4: dsi: Introduce a variant structure

2020-12-04 Thread Maxime Ripard
tween those three controllers. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_dsi.c | 63 --- 1 file changed, 37 insertions(+), 26 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_dsi.c b/drivers/gpu/drm/vc4/vc4_dsi.c index f704d959e65b..601020c10053 1

[PATCH 5/8] drm/vc4: dsi: Add support for DSI0

2020-12-04 Thread Maxime Ripard
From: Dave Stevenson DSI0 was partially supported, but didn't register with the main driver, and the code was inconsistent as to whether it checked port == 0 or port == 1. Add compatible string and other support to make it consistent. Signed-off-by: Dave Stevenson Signed-off-by: Maxime R

[PATCH 3/8] drm/vc4: dsi: Use snprintf for the PHY clocks instead of an array

2020-12-04 Thread Maxime Ripard
The DSI clocks setup function has been using an array to store the clock name of either the DSI0 or DSI1 blocks, using the port ID to choose the proper one. Let's switch to an snprintf call to do the same thing and simplify the array a bit. Signed-off-by: Maxime Ripard --- drivers/gpu/dr

[PATCH 1/8] drm/vc4: drv: Remove the DSI pointer in vc4_drv

2020-12-04 Thread Maxime Ripard
That pointer isn't used anywhere, so there's no point in keeping it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.h | 1 - drivers/gpu/drm/vc4/vc4_dsi.c | 9 - 2 files changed, 10 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.h b/drivers/gpu/drm/vc4

[PATCH v2 5/7] drm/vc4: kms: Remove unassigned_channels from the HVS state

2020-12-07 Thread Maxime Ripard
properly track the commits, so let's get rid of unassigned_channels. Suggested-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 14 +++--- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/dr

[PATCH v2 7/7] drm/vc4: kms: Convert to atomic helpers

2020-12-07 Thread Maxime Ripard
switch to using drm_atomic_helper_commit. Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 110 +- 1 file changed, 3 insertions(+), 107 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_k

[PATCH v2 6/7] drm/vc4: kms: Remove async modeset semaphore

2020-12-07 Thread Maxime Ripard
Now that we have proper ordering guaranteed by the previous patch, the semaphore is redundant and can be removed. Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 13 - drivers/gpu/drm/vc4/vc4_drv.h | 2 -- drivers/gpu/drm/vc4

[PATCH v2 3/7] drm/vc4: Simplify a bit the global atomic_check

2020-12-07 Thread Maxime Ripard
When we can't allocate a new channel, we can simply return instead of having to handle both cases, and that simplifies a bit the code. Reviewed-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 13 ++--- 1 file changed, 6 insertions(+), 7 dele

[PATCH v2 4/7] drm/vc4: kms: Wait on previous FIFO users before a commit

2020-12-07 Thread Maxime Ripard
we wait for all the previous FIFO users to finish their commit before going with our own. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 123 +- 1 file changed, 122 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/g

[PATCH v2 1/7] drm: Introduce an atomic_commit_setup function

2020-12-07 Thread Maxime Ripard
by: Daniel Vetter Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic_helper.c | 9 + include/drm/drm_modeset_helper_vtables.h | 21 + 2 files changed, 30 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_help

[PATCH v2 2/7] drm: Document use-after-free gotcha with private objects

2020-12-07 Thread Maxime Ripard
The private objects have a gotcha that could result in a use-after-free, make sure it's properly documented. Reviewed-by: Daniel Vetter Signed-off-by: Maxime Ripard --- include/drm/drm_atomic.h | 20 1 file changed, 20 insertions(+) diff --git a/include/drm/drm_atomi

[PATCH v2 0/7] vc4: Convert to drm_atomic_helper_commit

2020-12-07 Thread Maxime Ripard
iable redundant with the in_use variable Maxime Ripard (7): drm: Introduce an atomic_commit_setup function drm: Document use-after-free gotcha with private objects drm/vc4: Simplify a bit the global atomic_check drm/vc4: kms: Wait on previous FIFO users before a commit drm/vc4: kms: R

[PATCH v5 0/9] drm/vc4: hdmi: Support the 10/12 bit output

2020-12-08 Thread Maxime Ripard
he pixel_rate ramp up Maxime Ripard (9): drm/vc4: hvs: Align the HVS atomic hooks to the new API drm/vc4: Pass the atomic state to encoder hooks drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check drm/vc4: hdmi: Don't access the connector state in reset if kmall

Re: [PATCH 0/8] drm/vc4: DSI improvements and BCM2711 support

2020-12-08 Thread Maxime Ripard
On Thu, Dec 03, 2020 at 03:19:15PM +, Dave Stevenson wrote: > Hi Maxime > > On Thu, 3 Dec 2020 at 13:25, Maxime Ripard wrote: > > > > Hi, > > > > Here's a series adding support for the DSI0 controller in the BCM2835 and > > the > > DSI1 co

Re: [PATCH v7 2/3] drm: Add support for the LogiCVC display controller

2020-12-08 Thread Maxime Ripard
On Wed, Dec 02, 2020 at 05:06:40PM +0100, Paul Kocialkowski wrote: > > > +static void logicvc_crtc_atomic_begin(struct drm_crtc *drm_crtc, > > > + struct drm_atomic_state *state) > > > +{ > > > + struct logicvc_crtc *crtc = logicvc_crtc(drm_crtc); > > > + struct drm_cr

[PATCH v4 4/8] drm/vc4: hdmi: Create a custom connector state

2020-12-08 Thread Maxime Ripard
When run with a higher bpc than 8, the clock of the HDMI controller needs to be adjusted. Let's create a connector state that will be used at atomic_check and atomic_enable to compute and store the clock rate associated to the state. Signed-off-by: Maxime Ripard --- drivers/gpu/dr

[PATCH v4 6/8] drm/vc4: hdmi: Use the connector state pixel rate for the PHY

2020-12-08 Thread Maxime Ripard
x27;s reuse it from there instead of computing it again. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 9 - drivers/gpu/drm/vc4/vc4_hdmi_phy.c | 8 +--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/dr

[PATCH v4 5/8] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-12-08 Thread Maxime Ripard
ff-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 862c93708e9a..c1667cfe37db 100644

[PATCH v5 1/9] drm/vc4: hvs: Align the HVS atomic hooks to the new API

2020-12-08 Thread Maxime Ripard
Since the CRTC setup in vc4 is split between the PixelValves/TXP and the HVS, only the PV/TXP atomic hooks were updated in the previous commits, but it makes sense to update the HVS ones too. Reviewed-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4

[PATCH v5 9/9] drm/vc4: hdmi: Enable 10/12 bpc output

2020-12-08 Thread Maxime Ripard
The BCM2711 supports higher bpc count than just 8, so let's support it in our driver. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 71 - drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 9 3

[PATCH v4 8/8] drm/vc4: hdmi: Enable 10/12 bpc output

2020-12-08 Thread Maxime Ripard
The BCM2711 supports higher bpc count than just 8, so let's support it in our driver. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 71 - drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 9 3

[PATCH v5 5/9] drm/vc4: hdmi: Create a custom connector state

2020-12-08 Thread Maxime Ripard
When run with a higher bpc than 8, the clock of the HDMI controller needs to be adjusted. Let's create a connector state that will be used at atomic_check and atomic_enable to compute and store the clock rate associated to the state. Acked-by: Thomas Zimmermann Signed-off-by: Maxime R

[PATCH v4 7/8] drm/vc4: hdmi: Limit the BCM2711 to the max without scrambling

2020-12-08 Thread Maxime Ripard
Unlike the previous generations, the HSM clock limitation is way above what we can reach without scrambling, so let's move the maximum frequency we support to the maximum clock frequency without scrambling. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 -- 1

Re: [PATCH v4 5/8] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-12-08 Thread Maxime Ripard
Hi Thomas, On Mon, Dec 07, 2020 at 03:14:49PM +0100, Thomas Zimmermann wrote: > Am 07.12.20 um 14:39 schrieb Maxime Ripard: > > The pixel rate is for now quite simple to compute, but with more features > > (30 and 36 bits output, YUV output, etc.) will depend on a bunch of

[PATCH v4 0/8] drm/vc4: hdmi: Support the 10/12 bit output

2020-12-08 Thread Maxime Ripard
was dropping the refresh rate when the bpc count was increased Changes from v1: - Added the coccinelle script to the first patch - Fixed the pixel_rate ramp up Maxime Ripard (8): drm/vc4: hvs: Align the HVS atomic hooks to the new API drm/vc4: Pass the atomic state to encoder hooks

Re: [PATCH v4 2/8] drm/vc4: Pass the atomic state to encoder hooks

2020-12-08 Thread Maxime Ripard
On Mon, Dec 07, 2020 at 03:16:40PM +0100, Thomas Zimmermann wrote: > > > Am 07.12.20 um 14:39 schrieb Maxime Ripard: > > We'll need to access the connector state in our encoder setup, so let's > > just pass the whole DRM state to our private encoder hooks. > &

[PATCH v5 7/9] drm/vc4: hdmi: Use the connector state pixel rate for the PHY

2020-12-08 Thread Maxime Ripard
x27;s reuse it from there instead of computing it again. Acked-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 11 +-- drivers/gpu/drm/vc4/vc4_hdmi_phy.c | 8 +--- 3 files changed, 11 insertions(+

[PATCH v4 2/8] drm/vc4: Pass the atomic state to encoder hooks

2020-12-08 Thread Maxime Ripard
We'll need to access the connector state in our encoder setup, so let's just pass the whole DRM state to our private encoder hooks. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 18 ++ drivers/gpu/drm/vc4/vc4_drv.h | 10 +- drivers/g

[PATCH v5 6/9] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-12-08 Thread Maxime Ripard
ff-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 744396c8dcb9..83699105c7a5 100644

[PATCH v4 1/8] drm/vc4: hvs: Align the HVS atomic hooks to the new API

2020-12-08 Thread Maxime Ripard
Since the CRTC setup in vc4 is split between the PixelValves/TXP and the HVS, only the PV/TXP atomic hooks were updated in the previous commits, but it makes sense to update the HVS ones too. Reviewed-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4

Re: [PATCH v2] drm/vc4: hdmi: Don't poll for the infoframes status on setup

2020-12-08 Thread Maxime Ripard
On Fri, Dec 04, 2020 at 03:36:11PM +, Dave Stevenson wrote: > Hi Maxime > > On Thu, 3 Dec 2020 at 07:46, Maxime Ripard wrote: > > > > The infoframes are sent at a regular interval as a data island packet, > > so we don't need to wait for them to be

[PATCH v5 8/9] drm/vc4: hdmi: Limit the BCM2711 to the max without scrambling

2020-12-08 Thread Maxime Ripard
Unlike the previous generations, the HSM clock limitation is way above what we can reach without scrambling, so let's move the maximum frequency we support to the maximum clock frequency without scrambling. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 -- 1

[PATCH v5 3/9] drm/vc4: hdmi: Take into account the clock doubling flag in atomic_check

2020-12-08 Thread Maxime Ripard
Reported-by: Thomas Zimmermann Fixes: 63495f6b4aed ("drm/vc4: hdmi: Make sure our clock rate is within limits") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/

[PATCH v4 3/8] drm/vc4: hdmi: Don't access the connector state in reset if kmalloc fails

2020-12-08 Thread Maxime Ripard
Make sure we don't end up accessing a NULL pointer. Suggested-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c in

[PATCH v5 2/9] drm/vc4: Pass the atomic state to encoder hooks

2020-12-08 Thread Maxime Ripard
We'll need to access the connector state in our encoder setup, so let's just pass the whole DRM state to our private encoder hooks. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 18 ++ drivers/gpu/drm/vc4/vc4_drv.h | 10 +- drivers/g

[PATCH v5 4/9] drm/vc4: hdmi: Don't access the connector state in reset if kmalloc fails

2020-12-08 Thread Maxime Ripard
Make sure we don't end up accessing a NULL pointer. Acked-by: Thomas Zimmermann Suggested-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/dri

[PATCH 11/15] drm/vc4: hdmi: Remove cec_available flag

2020-12-10 Thread Maxime Ripard
From: Dom Cobley Now that our HDMI controller supports CEC for the BCM2711, let's remove that flag. Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 4 drivers/gpu/drm/vc4/vc4_hdmi.h | 3 --- 2 files changed, 7 deletions(-) diff --

[PATCH 12/15] drm/vc4: hdmi: Don't register the CEC adapter if there's no interrupts

2020-12-10 Thread Maxime Ripard
ff-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 327638d93032..69217c68d3a4 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c @@ -1

[PATCH 00/15] drm/vc4: hdmi: Add CEC support for the BCM2711

2020-12-10 Thread Maxime Ripard
longer CEC messages drm/vc4: hdmi: Fix up CEC registers drm/vc4: hdmi: Restore cec physical address on reconnect drm/vc4: hdmi: Remove cec_available flag Maxime Ripard (10): irqchip: Allow to compile bcmstb on other platforms drm/vc4: hdmi: Compute the CEC clock divider from the clock rat

[PATCH 03/15] drm/vc4: hdmi: Fix register offset with longer CEC messages

2020-12-10 Thread Maxime Ripard
READ macro is now taking an enum, and the offset doesn't increment by 4 but 1 now. Divide the index by 4 to fix this. Fixes: 311e305fdb4e ("drm/vc4: hdmi: Implement a register layout abstraction") Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard --- drivers/gp

Re: [PATCH v6 5/9] drm/vc4: hdmi: Create a custom connector state

2020-12-10 Thread Maxime Ripard
On Thu, Dec 10, 2020 at 03:23:25PM +0100, Maxime Ripard wrote: > When run with a higher bpc than 8, the clock of the HDMI controller needs > to be adjusted. Let's create a connector state that will be used at > atomic_check and atomic_enable to compute and store the clock rate >

[PATCH 13/15] dt-binding: display: bcm2711-hdmi: Add CEC and hotplug interrupts

2020-12-10 Thread Maxime Ripard
The CEC and hotplug interrupts were missing when that binding was introduced, let's add them in now that we've figured out how it works. Signed-off-by: Maxime Ripard --- .../bindings/display/brcm,bcm2711-hdmi.yaml | 20 ++- 1 file changed, 19 insertions(+), 1 deletio

[PATCH 04/15] drm/vc4: hdmi: Fix up CEC registers

2020-12-10 Thread Maxime Ripard
) Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi_regs.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi_regs.h b/drivers/gpu/drm/vc4/vc4_hdmi_regs.h index 013fd57febd8..20a1438a72cb 100644 --- a

[PATCH v6 0/9] drm/vc4: hdmi: Support the 10/12 bit output

2020-12-10 Thread Maxime Ripard
sh rate when the bpc count was increased Changes from v1: - Added the coccinelle script to the first patch - Fixed the pixel_rate ramp up Maxime Ripard (9): drm/vc4: hvs: Align the HVS atomic hooks to the new API drm/vc4: Pass the atomic state to encoder hooks drm/vc4: hdmi: Take

Re: [PATCH v5 9/9] drm/vc4: hdmi: Enable 10/12 bpc output

2020-12-10 Thread Maxime Ripard
Hi Dave, On Wed, Dec 09, 2020 at 03:27:05PM +, Dave Stevenson wrote: > Hi Maxime > > On Mon, 7 Dec 2020 at 15:57, Maxime Ripard wrote: > > > > The BCM2711 supports higher bpc count than just 8, so let's support it in > > our driver. > > > > Signed

[PATCH v6 7/9] drm/vc4: hdmi: Use the connector state pixel rate for the PHY

2020-12-10 Thread Maxime Ripard
x27;s reuse it from there instead of computing it again. Acked-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 2 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 11 +-- drivers/gpu/drm/vc4/vc4_hdmi_phy.c | 8 +--- 3

[PATCH v6 1/9] drm/vc4: hvs: Align the HVS atomic hooks to the new API

2020-12-10 Thread Maxime Ripard
Since the CRTC setup in vc4 is split between the PixelValves/TXP and the HVS, only the PV/TXP atomic hooks were updated in the previous commits, but it makes sense to update the HVS ones too. Reviewed-by: Thomas Zimmermann Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 4

[PATCH 02/15] drm/vc4: hdmi: Move hdmi reset to bind

2020-12-10 Thread Maxime Ripard
registers are in a separate block Fixes: 9045e91a476b ("drm/vc4: hdmi: Add reset callback") Signed-off-by: Dom Cobley Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b

[PATCH v6 6/9] drm/vc4: hdmi: Store pixel frequency in the connector state

2020-12-10 Thread Maxime Ripard
ed-by: Thomas Zimmermann Reviewed-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 +- drivers/gpu/drm/vc4/vc4_hdmi.h | 1 + 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/dr

[PATCH v6 5/9] drm/vc4: hdmi: Create a custom connector state

2020-12-10 Thread Maxime Ripard
enson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 33 ++--- drivers/gpu/drm/vc4/vc4_hdmi.h | 10 ++ 2 files changed, 40 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_hdmi.c index 61039cc

[PATCH 10/15] drm/vc4: hdmi: Support BCM2711 CEC interrupt setup

2020-12-10 Thread Maxime Ripard
on an external irqchip. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 42 ++ drivers/gpu/drm/vc4/vc4_hdmi.h | 7 ++ 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gpu/drm/vc4/vc4_h

[PATCH 01/15] irqchip: Allow to compile bcmstb on other platforms

2020-12-10 Thread Maxime Ripard
The BCM2711 uses a number of instances of the bcmstb-l2 controller in its display engine. Let's allow the driver to be enabled through KConfig. Signed-off-by: Maxime Ripard --- drivers/irqchip/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/irqchip/Kcon

<    1   2   3   4   5   6   7   8   9   10   >