Re: (subset) [PATCH] drm/vc4: add tracepoints for CL submissions

2022-03-17 Thread Maxime Ripard
On Tue, 1 Feb 2022 20:26:51 -0100, Melissa Wen wrote: > Trace submit_cl_ioctl and related IRQs for CL submission and bin/render > jobs execution. It might be helpful to get a rendering timeline and > track job throttling. > > Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime

Re: [PATCH] drm/vc4: add tracepoints for CL submissions

2022-03-17 Thread Maxime Ripard
On Thu, Mar 10, 2022 at 12:54:32PM +0100, Chema Casanova wrote: > El 10/3/22 a las 12:12, Maxime Ripard escribió: > > On Tue, Mar 01, 2022 at 01:58:26PM -0100, Melissa Wen wrote: > > > On 02/25, Maxime Ripard wrote: > > > > Hi Melissa, > > > > > &

Re: [PATCH v2 0/5] drm: Fix monochrome conversion for sdd130x

2022-03-18 Thread Maxime Ripard
see any issue on Gitlab to request commit access, so I'm not sure what you did exactly but it's not surprising you didn't get any answer. Maxime signature.asc Description: PGP signature

Re: [PATCH] drm: of: Properly try all possible cases for bridge/panel detection

2022-03-18 Thread Maxime Ripard
On Wed, Mar 16, 2022 at 04:40:49PM +0100, Paul Kocialkowski wrote: > Hi Maxime, > > Thanks for the review! > > On Thu 10 Mar 22, 15:54, Maxime Ripard wrote: > > Hi Paul, > > > > On Wed, Mar 09, 2022 at 03:32:00PM +0100, Paul Kocialkowski wrote: > > >

Re: [PATCH v2] drm: of: Properly try all possible cases for bridge/panel detection

2022-03-18 Thread Maxime Ripard
if (panel) { > + *panel = of_drm_find_panel(node); > + if (!IS_ERR(*panel)) > + return 0; > + else > + *panel = NULL; You don't need the else branch here, we already cleared panel in drm_of_find_panel_or_bridge Looks good otherwise, thanks! Maxime signature.asc Description: PGP signature

Re: [RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format

2022-03-18 Thread Maxime Ripard
On Mon, Mar 07, 2022 at 04:26:56PM +0100, Max Krummenacher wrote: > On Wed, Mar 2, 2022 at 5:22 PM Marek Vasut wrote: > > > > On 3/2/22 15:21, Maxime Ripard wrote: > > > Hi, > > > > Hi, > > > > > Please try to avoid top posting > Sorry. >

Re: [RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format

2022-03-18 Thread Maxime Ripard
On Fri, Mar 18, 2022 at 05:05:11PM +, Dave Stevenson wrote: > Hi Maxime > > On Fri, 18 Mar 2022 at 16:35, Maxime Ripard wrote: > > > > On Mon, Mar 07, 2022 at 04:26:56PM +0100, Max Krummenacher wrote: > > > On Wed, Mar 2, 2022 at 5:22 PM Marek Vasut wrote: &

Re: [PATCH v2] drm: of: Properly try all possible cases for bridge/panel detection

2022-03-21 Thread Maxime Ripard
On Fri, Mar 18, 2022 at 05:22:46PM +0100, Paul Kocialkowski wrote: > On Fri 18 Mar 22, 17:18, Maxime Ripard wrote: > > On Fri, Mar 18, 2022 at 05:02:49PM +0100, Paul Kocialkowski wrote: > > > While bridge/panel detection was initially relying on the usual > > > port/por

Re: (subset) [PATCH] drm/selftest: plane_helper: Put test structures in static storage

2022-03-21 Thread Maxime Ripard
rame-larger-than] > int igt_check_plane_state(void *ignored) > ^ > 1 warning generated. > > [...] Applied to drm/drm-misc (drm-misc-next-fixes). Thanks! Maxime

Re: [PATCH v7 06/12] clk: Always set the rate on clk_set_range_rate

2022-03-23 Thread Maxime Ripard
Hi, On Tue, Mar 22, 2022 at 10:05:56PM +0300, Dmitry Osipenko wrote: > On 2/25/22 17:35, Maxime Ripard wrote: > > When we change a clock minimum or maximum using clk_set_rate_range(), > > clk_set_min_rate() or clk_set_max_rate(), the current code will only > > trigger a n

Re: [PATCH v5 09/11] drm: bridge: icn6211: Add I2C configuration support

2022-03-23 Thread Maxime Ripard
able only on chips which have additional MCU on > the panel/bridge board which preconfigures the ICN6211, while the > I2C configuration mode added by this patch does not require any > such MCU. > > Signed-off-by: Marek Vasut > Cc: Jagan Teki > Cc: Maxime Ripard > Cc: R

[PATCH] dt-bindings: display: bridge: Drop requirement on input port for DSI devices

2022-03-23 Thread Maxime Ripard
x27;s drop that requirement. Signed-off-by: Maxime Ripard --- .../devicetree/bindings/display/bridge/chipone,icn6211.yaml | 1 - .../devicetree/bindings/display/bridge/toshiba,tc358762.yaml | 1 - 2 files changed, 2 deletions(-) diff --git a/Documentation/devicetree/bindings/display/bridge/

Re: [RFC PATCH] drm/panel: simple: panel-dpi: use bus-format to set bpc and bus_format

2022-03-23 Thread Maxime Ripard
On Wed, Mar 23, 2022 at 09:42:11AM +0100, Max Krummenacher wrote: > Am Freitag, den 18.03.2022, 17:53 + schrieb Dave Stevenson: > > On Fri, 18 Mar 2022 at 17:16, Maxime Ripard wrote: > > > On Fri, Mar 18, 2022 at 05:05:11PM +, Dave Stevenson wrote: > > > >

Re: [PATCH] dt-bindings: display: bridge: Drop requirement on input port for DSI devices

2022-03-24 Thread Maxime Ripard
On Wed, Mar 23, 2022 at 10:38:19PM +0200, Laurent Pinchart wrote: > Hi Maxime, > > (CC'ing Sakari) > > Thank you for the patch. > > On Wed, Mar 23, 2022 at 04:48:23PM +0100, Maxime Ripard wrote: > > MIPI-DSI devices, if they are controlled through the bus itsel

Re: [PATCH v6 0/7] drm/vc4: hdmi: Yet Another Approach to HDMI YUV output

2022-03-24 Thread Maxime Ripard
On Tue, 22 Feb 2022 17:40:35 +0100, Maxime Ripard wrote: > This is another attempt at supporting the HDMI YUV output in the vc4 HDMI > driver. > > This is a follow-up of > https://lore.kernel.org/dri-devel/20210317154352.732095-1-max...@cerno.tech/ > > And the discussions

Re: [PATCH -next] drm/vc4: Fix build error when CONFIG_DRM_VC4=y && CONFIG_RASPBERRYPI_FIRMWARE=m

2022-03-24 Thread Maxime Ripard
_SOC > depends on COMMON_CLK Wouldn't it make more sense to add it as an additional depends on there? It doesn't look related to the architecture, and we'll still have that dependency for COMPILE_TEST. Maxime signature.asc Description: PGP signature

Re: [PATCH] dt-bindings: display: bridge: Drop requirement on input port for DSI devices

2022-03-24 Thread Maxime Ripard
On Thu, Mar 24, 2022 at 03:43:42PM +0200, Laurent Pinchart wrote: > On Thu, Mar 24, 2022 at 09:18:19AM +0100, Maxime Ripard wrote: > > On Wed, Mar 23, 2022 at 10:38:19PM +0200, Laurent Pinchart wrote: > > > Hi Maxime, > > > > > > (CC'ing Sak

[PATCH 0/4] drm/atomic: Atomic Private State debugging

2022-03-24 Thread Maxime Ripard
Hi, This series adds an atomic_print_state hook for drm_private_obj to ease the debugging of driver-specific sub-classes, and adds one for vc4. It also changes the call site of drm_atomic_print_new_state to make it more consistent. Let me know what you think, Maxime Maxime Ripard (4): drm

[PATCH 1/4] drm/atomic: Print the state every commit

2022-03-24 Thread Maxime Ripard
ic_commit() and drm_atomic_nonblocking_commit() to make sure we don't miss any. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic.c | 8 drivers/gpu/drm/drm_atomic_uapi.c | 3 --- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/

[PATCH 3/4] drm/vc4: Constify private state accessors

2022-03-24 Thread Maxime Ripard
None of those helpers modify the pointed data, let's make them const. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_kms.c index 24de29b

[PATCH 2/4] drm/atomic: Add atomic_print_state to private objects

2022-03-24 Thread Maxime Ripard
A number of drivers (amdgpu, komeda, vc4, etc.) leverage the drm_private_state structure, but we don't have any infrastructure to provide debugging like we do for the other components state. Let's add an atomic_print_state hook to be consistent. Signed-off-by: Maxime Ripard --- drive

[PATCH 4/4] drm/vc4: Implement atomic_print_state for HVS channel state

2022-03-24 Thread Maxime Ripard
The HVS state configuration is useful when debugging what's going on in the vc4 hardware pipeline. Add an implementation of .atomic_print_state. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 17 + 1 file changed, 17 insertions(+) diff --git a/drivers/gp

[PATCH v2 0/4] drm/atomic: Atomic Private State debugging

2022-03-25 Thread Maxime Ripard
Hi, This series adds an atomic_print_state hook for drm_private_obj to ease the debugging of driver-specific sub-classes, and adds one for vc4. It also changes the call site of drm_atomic_print_new_state to make it more consistent. Let me know what you think, Maxime Changes from v1: - Added

[PATCH v2 4/4] drm/vc4: Implement atomic_print_state for HVS channel state

2022-03-25 Thread Maxime Ripard
The HVS state configuration is useful when debugging what's going on in the vc4 hardware pipeline. Add an implementation of .atomic_print_state. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 17 + 1 file changed, 17 insertions(+)

[PATCH v2 3/4] drm/vc4: Constify private state accessors

2022-03-25 Thread Maxime Ripard
None of those helpers modify the pointed data, let's make them const. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_

[PATCH v2 2/4] drm/atomic: Add atomic_print_state to private objects

2022-03-25 Thread Maxime Ripard
A number of drivers (amdgpu, komeda, vc4, etc.) leverage the drm_private_state structure, but we don't have any infrastructure to provide debugging like we do for the other components state. Let's add an atomic_print_state hook to be consistent. Reviewed-by: Daniel Vetter Signed-off-

Re: [PATCH v2 -next] drm/vc4: Fix build error when CONFIG_DRM_VC4=y && CONFIG_RASPBERRYPI_FIRMWARE=m

2022-03-25 Thread Maxime Ripard
t; @@ -2,6 +2,7 @@ > config DRM_VC4 > tristate "Broadcom VC4 Graphics" > depends on ARCH_BCM || ARCH_BCM2835 || COMPILE_TEST > + depends on RASPBERRYPI_FIRMWARE || COMPILE_TEST Why do we need the || COMPILE_TEST here? The rpi_firmware_get, _property and _pu

Re: Parallel modesets and private state objects broken, where to go with MST?

2022-03-25 Thread Maxime Ripard
r your commit start you would wait for the drm_crtc_commit to be completed, forcing the ordering. This requires some code in atomic_commit path though, so it might be difficult to integrate properly in the drivers that would use MST. It would be an interesting discussion, I have a similar issue with HDMI scrambling support: I'd like to have most of the logic generic, but making sure all the HDMI drivers (but only them) use that generic code properly is challenging. Maxime signature.asc Description: PGP signature

[PATCH v2 1/4] drm/atomic: Print the state every commit

2022-03-25 Thread Maxime Ripard
to make sure we don't miss any. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic.c | 4 drivers/gpu/drm/drm_atomic_uapi.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 88cd99

Re: [PATCH v6 02/12] clk: Introduce Kunit Tests for the framework

2022-03-28 Thread Maxime Ripard
Hi, On Fri, Mar 25, 2022 at 05:36:25PM -0500, Daniel Latypov wrote: > On Mon, Feb 28, 2022 at 4:47 AM Maxime Ripard wrote: > > > > On Fri, Feb 25, 2022 at 01:29:03PM -0800, Daniel Latypov wrote: > > > On Fri, Feb 25, 2022 at 5:23 AM Maxime Ripard wrote: &

[PATCH v3 0/4] drm/atomic: Atomic Private State debugging

2022-03-28 Thread Maxime Ripard
Hi, This series adds an atomic_print_state hook for drm_private_obj to ease the debugging of driver-specific sub-classes, and adds one for vc4. It also changes the call site of drm_atomic_print_new_state to make it more consistent. Let me know what you think, Maxime Changes from v2

[PATCH v3 1/4] drm/atomic: Print the state every non-blocking commit

2022-03-28 Thread Maxime Ripard
re never logged though, and it would create too much churn in the logs to do so, so leave them out for now. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic.c | 4 drivers/gpu/drm/drm_atomic_uapi.c | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/

[PATCH v3 2/4] drm/atomic: Add atomic_print_state to private objects

2022-03-28 Thread Maxime Ripard
A number of drivers (amdgpu, komeda, vc4, etc.) leverage the drm_private_state structure, but we don't have any infrastructure to provide debugging like we do for the other components state. Let's add an atomic_print_state hook to be consistent. Reviewed-by: Daniel Vetter Signed-off-

[PATCH v3 3/4] drm/vc4: Constify private state accessors

2022-03-28 Thread Maxime Ripard
None of those helpers modify the pointed data, let's make them const. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/gpu/drm/vc4/vc4_

[PATCH v3 4/4] drm/vc4: Implement atomic_print_state for HVS channel state

2022-03-28 Thread Maxime Ripard
The HVS state configuration is useful when debugging what's going on in the vc4 hardware pipeline. Add an implementation of .atomic_print_state. Acked-by: Daniel Vetter Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 17 + 1 file changed, 17 insertions(+)

[PATCH 0/6] drm/vc4: Fixes for the writeback

2022-03-28 Thread Maxime Ripard
Hi, This series address multiple issues with the transposer support, and thus the writeback support. Let me know what you think, Maxime Maxime Ripard (6): drm/vc4: hvs: Reset muxes at probe time drm/vc4: txp: Don't set TXP_VSTART_AT_EOF drm/vc4: txp: Force alpha to be 0xff if

[PATCH 1/6] drm/vc4: hvs: Reset muxes at probe time

2022-03-28 Thread Maxime Ripard
utput 2 and 3 feeding from the same channel, which is explicitly discouraged in the documentation. In order to avoid this, let's reset all the output muxes to their reset value. Fixes: 87ebcd42fb7b ("drm/vc4: crtc: Assign output to channel automatically") Signed-off-by: Maxime Ripa

[PATCH 2/6] drm/vc4: txp: Don't set TXP_VSTART_AT_EOF

2022-03-28 Thread Maxime Ripard
beginning of the next frames. Since one VSTART is enough, let's get rid of it. Fixes: 008095e065a8 ("drm/vc4: Add support for the transposer block") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_txp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/

[PATCH 4/6] drm/vc4: kms: Store channel in local variable

2022-03-28 Thread Maxime Ripard
We use the channel from our vc4_crtc_state structure in multiple places, let's store it in a local variable to make it cleaner. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 15 --- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/dr

[PATCH 6/6] drm/vc4: kms: Improve logging

2022-03-28 Thread Maxime Ripard
When debugging, finding out what muxing decisions were made and what the actual core clock rate is is always useful, so let's add some more messages. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-)

[PATCH 5/6] drm/vc4: kms: Warn if we have an incompatible muxing setup

2022-03-28 Thread Maxime Ripard
The documentation explicitly states we must prevent the output 2 and 3 from feeding from the same HVS channel. Let's add a warning to make some noise if we ever find ourselves in such a case. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 3 +++ 1 file changed, 3 inser

[PATCH 3/6] drm/vc4: txp: Force alpha to be 0xff if it's disabled

2022-03-28 Thread Maxime Ripard
the CRC of the two frames which will thus fail. Another nice side effect is that it is now possible to just use the buffer as ARGB. Fixes: 008095e065a8 ("drm/vc4: Add support for the transposer block") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_txp.c | 2 ++ 1 file

Re: [PATCH v6 02/12] clk: Introduce Kunit Tests for the framework

2022-03-30 Thread Maxime Ripard
Hi Daniel, On Mon, Mar 28, 2022 at 02:36:25PM -0500, Daniel Latypov wrote: > On Mon, Mar 28, 2022 at 2:57 AM Maxime Ripard wrote: > > On Fri, Mar 25, 2022 at 05:36:25PM -0500, Daniel Latypov wrote: > > > On Mon, Feb 28, 2022 at 4:47 AM Maxime Ripard wrote: > > > >

Re: (subset) [PATCH v3] drm: of: Properly try all possible cases for bridge/panel detection

2022-03-30 Thread Maxime Ripard
is available, with no fallback on the > usual way. > > This results in breaking detection when a child node is present > but does not contain any panel or bridge node, even when the > usual port/ports-based of graph is there. > > [...] Applied to drm/drm-misc (drm-misc-next-fixes). Thanks! Maxime

Re: DSI Bridge switching

2022-03-30 Thread Maxime Ripard
On Tue, Mar 29, 2022 at 07:39:21PM +0530, Jagan Teki wrote: > On Thu, Mar 10, 2022 at 4:05 PM Maxime Ripard wrote: > > > > On Wed, Mar 09, 2022 at 06:45:10PM -0600, Adam Ford wrote: > > > On Wed, Mar 9, 2022 at 1:11 PM Jagan Teki > > > wrote: > > > >

Re: DRM Master ignoring hotplug event during display switching (QT)

2022-03-30 Thread Maxime Ripard
sion with pretty much the same content, but you can't rely on userspace handling the hotplug event. You'll have to deal with the case where it just doesn't. Maxime signature.asc Description: PGP signature

Re: BUG: KASAN: use-after-free in drm_atomic_helper_wait_for_vblanks()

2022-03-30 Thread Maxime Ripard
On Tue, Mar 15, 2022 at 12:53:30AM +0300, Dmitry Osipenko wrote: > On 3/11/22 17:22, Maxime Ripard wrote: > > On Thu, Mar 10, 2022 at 03:33:07AM +0300, Dmitry Osipenko wrote: > >> I was playing/testing SuperTuxKart using VirtIO-GPU driver and spotted

Re: [PATCH] dt-bindings: display: bridge: Drop requirement on input port for DSI devices

2022-03-30 Thread Maxime Ripard
On Thu, Mar 24, 2022 at 04:50:04PM +0200, Laurent Pinchart wrote: > Hi Maxime, > > On Thu, Mar 24, 2022 at 03:23:24PM +0100, Maxime Ripard wrote: > > On Thu, Mar 24, 2022 at 03:43:42PM +0200, Laurent Pinchart wrote: > > > On Thu, Mar 24, 2022 at 09:18:19AM +0100, Maxime

Re: [PATCH] dt-bindings: display: bridge: Drop requirement on input port for DSI devices

2022-03-30 Thread Maxime Ripard
Hi Tomi, On Fri, Mar 25, 2022 at 12:42:15PM +0200, Tomi Valkeinen wrote: > On 24/03/2022 16:23, Maxime Ripard wrote: > > On Thu, Mar 24, 2022 at 03:43:42PM +0200, Laurent Pinchart wrote: > > > On Thu, Mar 24, 2022 at 09:18:19AM +0100, Maxime Ripard wrote: > > > >

Re: [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge

2022-02-21 Thread Maxime Ripard
On Mon, Feb 21, 2022 at 08:28:35AM +0100, José Expósito wrote: > The function "drm_of_find_panel_or_bridge" has been deprecated in > favor of "devm_drm_of_get_bridge". > > Switch to the new function and reduce boilerplate. > > Signed-off-by: José Expósito

Re: [PATCH] drm/msm/dp: switch to devm_drm_of_get_bridge

2022-02-21 Thread Maxime Ripard
On Mon, Feb 21, 2022 at 08:33:39AM +0100, José Expósito wrote: > The function "drm_of_find_panel_or_bridge" has been deprecated in > favor of "devm_drm_of_get_bridge". > > Switch to the new function and reduce boilerplate. > > Signed-off-by: José Expósito

Re: [PATCH] drm: rcar-du: switch to devm_drm_of_get_bridge

2022-02-21 Thread Maxime Ripard
&lvds->panel, &lvds->next_bridge); I guess lvds->panel can be removed from the rcar_lvds struct as well? Maxime signature.asc Description: PGP signature

Re: [PATCH] drm/bridge: chipone-icn6211: switch to devm_drm_of_get_bridge

2022-02-21 Thread Maxime Ripard
On Mon, Feb 21, 2022 at 08:42:24AM +0100, José Expósito wrote: > The function "drm_of_find_panel_or_bridge" has been deprecated in > favor of "devm_drm_of_get_bridge". > > Switch to the new function and reduce boilerplate. > > Signed-off-by: José Expósito

Re: [PATCH V2 04/11] drm/bridge: tc358767: Implement atomic_check callback

2022-02-21 Thread Maxime Ripard
state->adjusted_mode); > > > + > > > + if (crtc_state->adjusted_mode.clock > max_khz) > > > + crtc_state->adjusted_mode.clock = max_khz; > > > > I don't think this is correct. The adjusted most is just for minor > > adjustments

Re: [PATCH v4 3/3] drm/tiny: Add MIPI DBI compatible SPI driver

2022-02-21 Thread Maxime Ripard
> > Later I found another post that in clear words stated that setting > > random registers from DT was not acceptable. > > Understood and thanks for the explanation. > It is a shame that the users loose here :-( From a user point-of-view, nothing prevents the overlays and the firmware to be in the same package, provided by whatever distro or build-system they would use. The only case where it's a bit less efficient is for a panel that isn't supported already, but it's just a documentation and tooling issue, and Noralf has an awesome track record for both. And the DT syntax throw so much people off that I'm not sure it's such a benefit :) Maxime signature.asc Description: PGP signature

Re: [PATCH v8 13/19] drm/mediatek: dpi: Add dpintf support

2022-02-21 Thread Maxime Ripard
lk, dpi->pclk_src[2]); You get a reference to these clocks using: > > + dpi->pclk_src[1] = devm_clk_get(dev, "TVDPLL_D2"); > + dpi->pclk_src[2] = devm_clk_get(dev, "TVDPLL_D4"); > + dpi->pclk_src[3] = devm_clk_get(dev, "TVDPLL_D8"); > + dpi->pclk_src[4] = devm_clk_get(dev, "TVDPLL_D16"); > + So if the clock isn't there, you'll get an error pointer, won't check it, but will dereference it. If the clock is optional, you should use clk_get_optional, otherwise you should check the error returned. That clock setup is weird though. I don't have any knowledge about your platform, but either the clock should be a single one if it has multiple dividers, or the pixel_clk clock should behave as a mux and just pick the best parent for the rate it's given. Maxime signature.asc Description: PGP signature

[PATCH v2 00/22] drm: Fill in default values for plane properties

2022-02-21 Thread Maxime Ripard
reset time. Others work fine by luck, or have entirely ignored the issue. This series aims at making sure the default value set by the call to the function isn't ignored, and then making sure all drivers behave consistently. Let me know what you think, Maxime Changes from v1: - Coll

[PATCH v2 01/22] drm/komeda: plane: switch to plane reset helper

2022-02-21 Thread Maxime Ripard
komeda_plane_reset() does the state initialisation by copying a lot of the code found in the __drm_atomic_helper_plane_reset(). Let's switch to that helper and reduce the boilerplate. Cc: Brian Starkey Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Signed-off-by

[PATCH v2 02/22] drm/tegra: plane: switch to plane reset helper

2022-02-21 Thread Maxime Ripard
tegra_plane_reset() does the state initialisation by copying a lot of the code found in the __drm_atomic_helper_plane_reset(). Let's switch to that helper and reduce the boilerplate. Cc: linux-te...@vger.kernel.org Cc: Jonathan Hunter Cc: Thierry Reding Signed-off-by: Maxime R

[PATCH v2 05/22] drm/amd/display: Fix color encoding mismatch

2022-02-21 Thread Maxime Ripard
value of BT601 in drm_plane_create_color_properties(). Cc: amd-...@lists.freedesktop.org Cc: Alex Deucher Cc: "Christian König" Cc: Harry Wentland Cc: Leo Li Cc: "Pan, Xinhui" Cc: Rodrigo Siqueira Signed-off-by: Maxime Ripard --- drivers/gpu/drm/amd/display/amdgpu_dm/a

[PATCH v2 03/22] drm/tegra: hub: Fix zpos initial value mismatch

2022-02-21 Thread Maxime Ripard
Cc: Jonathan Hunter Cc: Thierry Reding Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tegra/hub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/tegra/hub.c b/drivers/gpu/drm/tegra/hub.c index b910155f80c4..7f68a142d922 100644 --- a/drivers/gpu/drm/tegra

[PATCH v2 10/22] drm/exynos: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
ly at reset, so this is not needed anymore. Cc: linux-arm-ker...@lists.infradead.org Cc: linux-samsung-...@vger.kernel.org Cc: Alim Akhtar Cc: Inki Dae Cc: Joonyoung Shim Cc: Krzysztof Kozlowski Cc: Kyungmin Park Cc: Seung-Woo Kim Signed-off-by: Maxime Ripard --- drivers/gpu/drm/e

[PATCH v2 08/22] drm/tegra: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
is is not needed anymore. Cc: linux-te...@vger.kernel.org Cc: Jonathan Hunter Cc: Thierry Reding Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tegra/plane.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index ec0822c

[PATCH v2 04/22] drm/omap: plane: Fix zpos initial value mismatch

2022-02-21 Thread Maxime Ripard
() call. Reviewed-by: Tomi Valkeinen Signed-off-by: Maxime Ripard --- drivers/gpu/drm/omapdrm/omap_plane.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index b35205c4e979..e67baf9a942c

[PATCH v2 12/22] drm/msm/mdp5: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
t, so this is not needed anymore. Cc: freedr...@lists.freedesktop.org Cc: linux-arm-...@vger.kernel.org Cc: Abhinav Kumar Cc: Rob Clark Cc: Sean Paul Reviewed-by: Dmitry Baryshkov Signed-off-by: Maxime Ripard --- drivers/gpu/drm/msm/disp/mdp5/mdp5_plane.c | 16 1 file chang

[PATCH v2 07/22] drm/object: Add default zpos value at reset

2022-02-21 Thread Maxime Ripard
en attached in order to fix this. Reviewed-by: Harry Wentland Reviewed-by: Laurent Pinchart Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic_state_helper.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/drm_atomic_state

[PATCH v2 15/22] drm/rcar: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-renesas-...@vger.kernel.org Reviewed-by: Kieran Bingham Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/rcar-du/rcar_du_plane.c | 1 - drivers/gpu/drm/rcar-du/rcar_du_vsp.c | 1 - 2

[PATCH v2 14/22] drm/omap: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
ly at reset, so this is not needed anymore. Reviewed-by: Tomi Valkeinen Signed-off-by: Maxime Ripard --- drivers/gpu/drm/omapdrm/omap_plane.c | 7 --- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c index e67baf9

[PATCH v2 09/22] drm/komeda: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
is is not needed anymore. Cc: Brian Starkey Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Signed-off-by: Maxime Ripard --- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/arm/display/komeda/ko

[PATCH v2 17/22] drm/sun4i: layer: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
ly at reset, so this is not needed anymore. Cc: linux-arm-ker...@lists.infradead.org Cc: linux-su...@lists.linux.dev Cc: Chen-Yu Tsai Reviewed-by: Jernej Skrabec Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sun4i/sun4i_layer.c | 16 +++- 1 file changed, 7 insertions(+), 9 dele

[PATCH v2 16/22] drm/sti: plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
this is not needed anymore. Reviewed-by: Alain Volmat Reviewed-by: Philippe Cornu Signed-off-by: Maxime Ripard --- drivers/gpu/drm/sti/sti_cursor.c | 2 +- drivers/gpu/drm/sti/sti_gdp.c| 2 +- drivers/gpu/drm/sti/sti_hqvdp.c | 2 +- drivers/gpu/drm/sti/sti_plane.c | 6 -- drivers/gp

[PATCH v2 06/22] drm/object: Add drm_object_property_get_default_value() function

2022-02-21 Thread Maxime Ripard
de an helper to access this property. Reviewed-by: Laurent Pinchart Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_mode_object.c | 53 +-- include/drm/drm_mode_object.h | 7 2 files changed, 50 insertions(+), 10 deletions(-)

[PATCH v2 20/22] drm/armada: overlay: Remove redundant color encoding and range initialisation

2022-02-21 Thread Maxime Ripard
been adjusted to set it properly at reset, so this is not needed anymore. Cc: Russell King Signed-off-by: Maxime Ripard --- drivers/gpu/drm/armada/armada_overlay.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_overlay.c b/drivers/gpu/drm/armada/armada_over

[PATCH v2 18/22] drm/object: Add default color encoding and range value at reset

2022-02-21 Thread Maxime Ripard
7;s add some code in __drm_atomic_helper_plane_state_reset() to get the initial encoding and range value if the property has been attached in order to fix this. Reviewed-by: Harry Wentland Signed-off-by: Dave Stevenson Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic_state_helper.c |

[PATCH v2 13/22] drm/nouveau/kms: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
reset, so this is not needed anymore. Cc: nouv...@lists.freedesktop.org Cc: Ben Skeggs Cc: Karol Herbst Cc: Lyude Paul Signed-off-by: Maxime Ripard --- drivers/gpu/drm/nouveau/dispnv50/wndw.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/nouveau/dispnv50/wndw.c b/driver

[PATCH v2 11/22] drm/imx: ipuv3-plane: Remove redundant zpos initialisation

2022-02-21 Thread Maxime Ripard
reset, so this is not needed anymore. Cc: linux-arm-ker...@lists.infradead.org Cc: NXP Linux Team Cc: Fabio Estevam Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo Signed-off-by: Maxime Ripard --- drivers/gpu/drm/imx/ipuv3-plane.c | 3 --- 1 file changed, 3 dele

[PATCH v2 19/22] drm/komeda: plane: Remove redundant color encoding and range initialisation

2022-02-21 Thread Maxime Ripard
been adjusted to set it properly at reset, so this is not needed anymore. Cc: Brian Starkey Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Signed-off-by: Maxime Ripard --- drivers/gpu/drm/arm/display/komeda/komeda_plane.c | 5 + 1 file changed, 1 insertion(+), 4 del

[PATCH v2 22/22] drm/omap: plane: Remove redundant color encoding and range initialisation

2022-02-21 Thread Maxime Ripard
usted to set it properly at reset, so this is not needed anymore. Reviewed-by: Tomi Valkeinen Signed-off-by: Maxime Ripard --- drivers/gpu/drm/omapdrm/omap_plane.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/omap_plane.c b/drivers/gpu/drm/omapdrm/omap_plane.c

[PATCH v2 21/22] drm/imx: ipuv3-plane: Remove redundant color encoding and range initialisation

2022-02-21 Thread Maxime Ripard
been adjusted to set it properly at reset, so this is not needed anymore. Cc: linux-arm-ker...@lists.infradead.org Cc: NXP Linux Team Cc: Fabio Estevam Cc: Pengutronix Kernel Team Cc: Philipp Zabel Cc: Sascha Hauer Cc: Shawn Guo Signed-off-by: Maxime Ripard --- drivers/gpu/drm/imx/ipuv3-pl

Re: (subset) [Intel-gfx] [PATCH 17/22] drm/vc4: Use drm_mode_copy()

2022-02-21 Thread Maxime Ripard
d which explicitly preserves the list head of > the destination mode. > > [...] Applied to drm/drm-misc (drm-misc-next). Thanks! Maxime

[PATCH 0/8] drm/vc4: Fix frame corruption when moving the cursor

2022-02-21 Thread Maxime Ripard
lutions, but the one that seem to work without any cons is to defer the deallocation of RAM entries to the next vblank after the CRTC state has been freed. Let me know what you think, Maxime Maxime Ripard (8): drm/vc4: kms: Take old state core clock rate into account drm/vc4: hvs: Fix fra

[PATCH 1/8] drm/vc4: kms: Take old state core clock rate into account

2022-02-21 Thread Maxime Ripard
state also needs to be taken into account if it requires a core clock higher that the new one and our 500MHz limit, since it's still live in hardware at the beginning of our commit. Fixes: 16e101051f32 ("drm/vc4: Increase the core clock based on HVS load") Signed-off-by: Maxime Ripard -

[PATCH 4/8] drm/vc4: hvs: Remove dlist setup duplication

2022-02-21 Thread Maxime Ripard
Setting the DISPLISTx register needs to occur in every case, and we don't need to protect the register using the event_lock, so we can just move it after the if branches and simplify a bit the function. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hvs.c | 9 +++-- 1 file ch

[PATCH 3/8] drm/vc4: hvs: Store channel in variable

2022-02-21 Thread Maxime Ripard
The assigned_channel field of our vc4_crtc_state structure is accessed multiple times in vc4_hvs_atomic_flush, so let's move it to a variable that can be used in all those places. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hvs.c | 9 + 1 file changed, 5 insertions(

[PATCH 2/8] drm/vc4: hvs: Fix frame count register readout

2022-02-21 Thread Maxime Ripard
DISPSTAT1 register, at the offset 18. Fixes: e538092cb15c ("drm/vc4: Enable precise vblank timestamping for interlaced modes.") Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 2 +- drivers/gpu/drm/vc4/vc4_drv.h | 1 + drivers/gpu/drm/vc4/vc4_h

[PATCH 5/8] drm/vc4: hvs: Move the dlist setup to its own function

2022-02-21 Thread Maxime Ripard
The vc4_hvs_update_dlist function mostly deals with setting up the vblank events and setting up the dlist entry pointer to our current active one. We'll want to do the former separately from the vblank handling in later patches, so let's move it to a function of its own. Signed-off-

[PATCH 6/8] drm/vc4: hvs: Ignore atomic_flush if we're disabled

2022-02-21 Thread Maxime Ripard
atomic_flush will be called for each CRTC even if they aren't enabled. The whole code we have there will thus run without a properly affected channel, which can then result in all sorts of weird behaviour. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hvs.c | 3 +++ 1 file ch

[PATCH 7/8] drm/vc4: hvs: Use pointer to HVS in HVS_READ and HVS_WRITE macros

2022-02-21 Thread Maxime Ripard
Those macros are really about the HVS itself, and thus its associated structure vc4_hvs, rather than the entire (virtual) vc4 device. Let's change those macros to use the hvs pointer directly, and change the calling sites accordingly. Signed-off-by: Maxime Ripard --- drivers/gpu/dr

[PATCH 8/8] drm/vc4: hvs: Defer dlist slots deallocation

2022-02-21 Thread Maxime Ripard
o the allocation, and then only deallocate buffers that have a counter below or equal to the one we see when the deallocation code should prevent the above race from occuring. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_crtc.c | 10 +- drivers/gpu/drm/vc4/vc4

Re: [PATCH v4 01/10] clk: Introduce Kunit Tests for the framework

2022-02-21 Thread Maxime Ripard
he failure scenario you're experiencing > and mark it as expecting to fail. Then the patch that fixes it in the > core could mark the test as expecting to pass, which may help us > understand more easily what exactly changed instead of having to > figure that out after the fact b

Re: [PATCH v4 02/10] clk: Always clamp the rounded rate

2022-02-21 Thread Maxime Ripard
Hi, On Fri, Feb 18, 2022 at 03:15:06PM -0800, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-01-25 06:15:41) > > The current core while setting the min and max rate properly in the > > clk_request structure will not make sure that the requested rate is > > within these b

Re: [PATCH v4 03/10] clk: Use clamp instead of open-coding our own

2022-02-21 Thread Maxime Ripard
On Fri, Feb 18, 2022 at 02:34:20PM -0800, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-01-25 06:15:42) > > The code in clk_set_rate_range() will, if the current rate is outside of > > the new range, will force it to the minimum or maximum. This is > > equivalent to usi

Re: [PATCH v4 02/10] clk: Always clamp the rounded rate

2022-02-21 Thread Maxime Ripard
Hi again, On Mon, Feb 21, 2022 at 05:18:21PM +0100, Maxime Ripard wrote: > On Fri, Feb 18, 2022 at 03:15:06PM -0800, Stephen Boyd wrote: > > Quoting Maxime Ripard (2022-01-25 06:15:41) > > > +/* > > > + * Test that if our clock has some boundaries and we try to round

Re: [PATCH v10 3/4] drm/lsdc: add drm driver for loongson display controller

2022-02-22 Thread Maxime Ripard
Hi, On Sun, Feb 20, 2022 at 10:55:53PM +0800, Sui Jingfeng wrote: > +/* lsdc_get_display_timings_from_dtb - Get display timings from the device > tree > + * > + * @np: point to the device node contain the display timings > + * @pptim: point to where the pointer of struct display_timings is store

[PATCH v5 00/11] clk: Improve clock range handling

2022-02-22 Thread Maxime Ripard
tests, first to test a few rate related functions in the CCF, and then extends it to make sure that behaviour has some test coverage. Let me know what you think Maxime Changes from v4: - Rename the test file - Move all the tests to the first patch, and fix them up as fixes are done - Improve

[PATCH v5 01/11] clk: Introduce Kunit Tests for the framework

2022-02-22 Thread Maxime Ripard
Let's test various parts of the rate-related clock API with the kunit testing framework. Cc: kunit-...@googlegroups.com Suggested-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/.kunitconfig | 1 + drivers/clk/Kconfig | 7 + drivers/clk/Makefile | 1 + driver

[PATCH v5 03/11] clk: Always clamp the rounded rate

2022-02-22 Thread Maxime Ripard
ork will always clamp the rate to the current range found on the clock, which will fix both these inconsistencies. Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 2 ++ drivers/clk/clk_test.c | 46 +- 2 files changed, 30 insertions(+), 18 deletions(-

[PATCH v5 04/11] clk: Use clamp instead of open-coding our own

2022-02-22 Thread Maxime Ripard
less readable. Let's switch to using clamp instead. Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 6 +- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 9725bdc996b3..fd3daa11bfa4 100644 --- a/drivers/clk/clk.c +++ b/drivers

[PATCH v5 05/11] clk: Always set the rate on clk_set_range_rate

2022-02-22 Thread Maxime Ripard
-by: Stephen Boyd Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 45 drivers/clk/clk_test.c | 58 +++--- 2 files changed, 49 insertions(+), 54 deletions(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index f

[PATCH v5 06/11] clk: Add clk_drop_range

2022-02-22 Thread Maxime Ripard
In order to reset the range on a clock, we need to call clk_set_rate_range with a minimum of 0 and a maximum of ULONG_MAX. Since it's fairly inconvenient, let's introduce a clk_drop_range() function that will do just this. Suggested-by: Stephen Boyd Signed-off-by: Maxime Ripard --- d

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