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
On Mon, Feb 21, 2022 at 08:37:57AM +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 > --- > drivers/gpu/drm/rcar-du/rcar_lv

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
On Sat, Feb 19, 2022 at 03:26:40AM +0100, Marek Vasut wrote: > On 2/18/22 18:34, Lucas Stach wrote: > > Hi > > [...] > > > > drivers/gpu/drm/bridge/tc358767.c | 26 ++ > > > 1 file changed, 26 insertions(+) > > > > > > diff --git a/drivers/gpu/drm/bridge/tc358767.c >

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

2022-02-21 Thread Maxime Ripard
On Sun, Feb 20, 2022 at 10:32:25PM +0100, Sam Ravnborg wrote: > Hi Noralf, > > On Sun, Feb 20, 2022 at 04:59:34PM +0100, Noralf Trønnes wrote: > > > > > > Den 19.02.2022 23.10, skrev Sam Ravnborg: > > > Hi Noralf, > > > On Fri, Feb 18, 2022 at 04:11:10PM +0100, Noralf Trønnes wrote: > > >> Add a

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

2022-02-21 Thread Maxime Ripard
Hi (Now I remember your series ;) On Fri, Feb 18, 2022 at 03:54:31PM +0100, Guillaume Ranquet wrote: > dpintf is the displayport interface hardware unit. This unit is similar > to dpi and can reuse most of the code. > > This patch adds support for mt8195-dpintf to this dpi driver. Main > differe

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

2022-02-21 Thread Maxime Ripard
ected tags - Squashed some patches Dave Stevenson (3): drm/object: Add drm_object_property_get_default_value() function drm/object: Add default zpos value at reset drm/object: Add default color encoding and range value at reset Maxime Ripard (19): drm/komeda: plane: switch to plane reset helper

[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
On Fri, 18 Feb 2022 12:03:58 +0200, Ville Syrjala wrote: > From: Ville Syrjälä > > struct drm_display_mode embeds a list head, so overwriting > the full struct with another one will corrupt the list > (if the destination mode is on a list). Use drm_mode_copy() > instead which explicitly preserves

[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
Hi Stephen, Thanks for your review On Fri, Feb 18, 2022 at 06:20:46PM -0800, Stephen Boyd wrote: > It would also be good to add a test that tries to set the clk rate with > clk_set_rate() after a range has been set that is outside the acceptable > range and verify that it fails, and one that trie

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
kunit tests Changes from v1: - Return NULL in clk_request_start if clk pointer is NULL - Test for clk_req pointer in clk_request_done - Add another user in vc4 - Rebased on top of v5.15-rc1 Maxime Ripard (11): clk: Introduce Kunit Tests for the framework clk: Enforce that disjoints l

[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

[PATCH v5 02/11] clk: Enforce that disjoints limits are invalid

2022-02-22 Thread Maxime Ripard
ll drivers, and most importantly we'll break that assumption in a later patch. It can also be argued that we shouldn't even reach the point where we're calling clk_core_set_rate_nolock(). Let's make an explicit check for disjoints range before we're doing anything. Signed

[PATCH v5 08/11] clk: bcm: rpi: Set a default minimum rate

2022-02-22 Thread Maxime Ripard
controller to deal with this before, but it makes more sense to have it in the clock driver. Move it there. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b

[PATCH v5 07/11] clk: bcm: rpi: Add variant structure

2022-02-22 Thread Maxime Ripard
x27;s switch to a variant structure that defines the behaviour we need to have for a given clock. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 62 +++ 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/drivers/clk/bcm/clk-raspberry

[PATCH v5 09/11] clk: bcm: rpi: Run some clocks at the minimum rate allowed

2022-02-22 Thread Maxime Ripard
t the clk_request minimum (which is the aggregated minimum of all the clock users) is what we want at all times. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi

[PATCH v5 10/11] drm/vc4: Add logging and comments

2022-02-22 Thread Maxime Ripard
The HVS core clock isn't really obvious, so let's add a bunch more comments and some logging for easier debugging. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/g

[PATCH v5 11/11] drm/vc4: hdmi: Remove clock rate initialization

2022-02-22 Thread Maxime Ripard
Now that the clock driver makes sure we never end up with a rate of 0, the HDMI driver doesn't need to care anymore. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gp

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

2022-02-22 Thread Maxime Ripard
Hi, On Mon, Feb 21, 2022 at 05:42:36PM +0100, Karol Herbst wrote: > On Mon, Feb 21, 2022 at 11:00 AM Maxime Ripard wrote: > > > > The nouveau KMS driver will call drm_plane_create_zpos_property() with > > an init value depending on the plane purpose. > > > &g

[PATCH v6 1/7] drm/vc4: hdmi: Rename pixel_rate variable

2022-02-22 Thread Maxime Ripard
The pixel_rate field in the vc4_hdmi_connector_state struct actually stores the TMDS character rate, let's rename it for consistency. Suggested-by: Ville Syrjälä Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 40 +++--- drivers/gpu/dr

[PATCH v6 2/7] drm/vc4: hdmi: Move clock validation to its own function

2022-02-22 Thread Maxime Ripard
Our code is doing the same clock rate validation in multiple instances. Let's create a helper to share the rate validation. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 26 +++--- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/dr

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

2022-02-22 Thread Maxime Ripard
- Fixed an EDID parsing error for YUV422 - Fixed the scrambling setup when using a bpc > 8 - Added some logging - Fixed some build-bot warnings - Fixed a number of HDMI specifications and EDID issues - Try to max out the bpc every time Maxime Ripard (7): drm/vc4: hdmi: Rename pixel_rate

[PATCH v6 3/7] drm/vc4: hdmi: Move clock calculation into its own function

2022-02-22 Thread Maxime Ripard
The code to compute our clock rate for a given setup will be called in multiple places in the next patches, so let's create a separate function for it. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 52 -- 1 file changed, 37 insertions(+

[PATCH v6 5/7] drm/vc4: hdmi: Take bpp into account for the scrambler

2022-02-22 Thread Maxime Ripard
The current code only base its decision for whether the scrambler must be enabled or not on the pixel clock of the mode, but doesn't take the bits per color into account. Let's leverage the new function to compute the clock rate in the scrambler setup code. Signed-off-by: Max

[PATCH v6 4/7] drm/vc4: hdmi: Take the sink maximum TMDS clock into account

2022-02-22 Thread Maxime Ripard
e check it. Signed-off-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 e5d9d54ce20a..e8e70727b5f3 100644 --- a/drivers/gpu/drm/vc4/vc4_hdmi.c +++ b/drivers/gpu/drm/vc4/

[PATCH v6 6/7] drm/vc4: hdmi: Always try to have the highest bpc

2022-02-22 Thread Maxime Ripard
if not decrease the bpc and try again. Let's use the same logic. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 44 ++ drivers/gpu/drm/vc4/vc4_hdmi.h | 4 +++- 2 files changed, 43 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/dr

[PATCH v6 7/7] drm/vc4: hdmi: Support HDMI YUV output

2022-02-22 Thread Maxime Ripard
In addition to the RGB444 output, the BCM2711 HDMI controller supports the YUV444 and YUV422 output formats. Let's add support for them in the driver, but still use RGB as the preferred format. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c

[PATCH v6 00/12] clk: Improve clock range handling

2022-02-23 Thread Maxime Ripard
dd another user in vc4 - Rebased on top of v5.15-rc1 Maxime Ripard (12): clk: Fix clk_hw_get_clk() when dev is NULL clk: Introduce Kunit Tests for the framework clk: Enforce that disjoints limits are invalid clk: Always clamp the rounded rate clk: Use clamp instead of open-coding our

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

2022-02-23 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 v6 01/12] clk: Fix clk_hw_get_clk() when dev is NULL

2022-02-23 Thread Maxime Ripard
pi to get clk consumer from clk_hw") Signed-off-by: Maxime Ripard --- drivers/clk/clk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 8de6a22498e7..fff5edb89d6d 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -3773

[PATCH v6 03/12] clk: Enforce that disjoints limits are invalid

2022-02-23 Thread Maxime Ripard
ll drivers, and most importantly we'll break that assumption in a later patch. It can also be argued that we shouldn't even reach the point where we're calling clk_core_set_rate_nolock(). Let's make an explicit check for disjoints range before we're doing anything. Signed

[PATCH v6 05/12] clk: Use clamp instead of open-coding our own

2022-02-23 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 6c4e10209568..c15ee5070f52 100644 --- a/drivers/clk/clk.c +++ b/drivers

[PATCH v6 04/12] clk: Always clamp the rounded rate

2022-02-23 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 v6 07/12] clk: Add clk_drop_range

2022-02-23 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

[PATCH v6 10/12] clk: bcm: rpi: Run some clocks at the minimum rate allowed

2022-02-23 Thread Maxime Ripard
t the clk_request minimum (which is the aggregated minimum of all the clock users) is what we want at all times. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 37 +++ 1 file changed, 37 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi

[PATCH v6 11/12] drm/vc4: Add logging and comments

2022-02-23 Thread Maxime Ripard
The HVS core clock isn't really obvious, so let's add a bunch more comments and some logging for easier debugging. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_kms.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/gpu/drm/vc4/vc4_kms.c b/drivers/g

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

2022-02-23 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 c

[PATCH v6 12/12] drm/vc4: hdmi: Remove clock rate initialization

2022-02-23 Thread Maxime Ripard
Now that the clock driver makes sure we never end up with a rate of 0, the HDMI driver doesn't need to care anymore. Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_hdmi.c | 13 - 1 file changed, 13 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_hdmi.c b/drivers/gp

[PATCH v6 09/12] clk: bcm: rpi: Set a default minimum rate

2022-02-23 Thread Maxime Ripard
controller to deal with this before, but it makes more sense to have it in the clock driver. Move it there. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 26 ++ 1 file changed, 26 insertions(+) diff --git a/drivers/clk/bcm/clk-raspberrypi.c b

[PATCH v6 08/12] clk: bcm: rpi: Add variant structure

2022-02-23 Thread Maxime Ripard
x27;s switch to a variant structure that defines the behaviour we need to have for a given clock. Signed-off-by: Maxime Ripard --- drivers/clk/bcm/clk-raspberrypi.c | 62 +++ 1 file changed, 46 insertions(+), 16 deletions(-) diff --git a/drivers/clk/bcm/clk-raspberry

Re: (subset) [PATCH] drm/edid: Always set RGB444

2022-02-23 Thread Maxime Ripard
On Thu, 3 Feb 2022 12:54:16 +0100, Maxime Ripard wrote: > In order to fill the drm_display_info structure each time an EDID is > read, the code currently will call drm_add_display_info with the parsed > EDID. > > drm_add_display_info will then call drm_reset_display_info to reset a

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

2022-02-23 Thread Maxime Ripard
Hi, On Tue, Feb 22, 2022 at 09:47:23AM +0100, Max Krummenacher wrote: > Use the new property bus-format to set the enum bus_format and bpc. > Completes: commit 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support") > > Signed-off-by: Max Krummenacher > > --- > > drivers/gpu/drm/panel/panel

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

2022-02-23 Thread Maxime Ripard
On Wed, Feb 23, 2022 at 02:45:30PM +0100, Marek Vasut wrote: > On 2/23/22 14:41, Maxime Ripard wrote: > > Hi, > > > > On Tue, Feb 22, 2022 at 09:47:23AM +0100, Max Krummenacher wrote: > > > Use the new property bus-format to set the enum bus_format and bpc. > &

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

2022-02-23 Thread Maxime Ripard
On Wed, Feb 23, 2022 at 03:09:08PM +0100, Marek Vasut wrote: > On 2/23/22 14:47, Maxime Ripard wrote: > > On Wed, Feb 23, 2022 at 02:45:30PM +0100, Marek Vasut wrote: > > > On 2/23/22 14:41, Maxime Ripard wrote: > > > > Hi, > > > > > > &

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

2022-02-23 Thread Maxime Ripard
On Tue, Feb 22, 2022 at 10:46:35PM +0800, Sui Jingfeng wrote: > > On 2022/2/22 16:27, Maxime Ripard wrote: > > > + if (!of_device_is_available(output)) { > > > + of_node_put(output); > > > + drm_info(ddev, "connector%d is not available\n

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

2022-02-23 Thread Maxime Ripard
On Wed, Feb 23, 2022 at 11:14:12PM +0800, Sui Jingfeng wrote: > > On 2022/2/23 22:39, Maxime Ripard wrote: > > On Tue, Feb 22, 2022 at 10:46:35PM +0800, Sui Jingfeng wrote: > > > On 2022/2/22 16:27, Maxime Ripard wrote: > > > > > +

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

2022-02-23 Thread Maxime Ripard
On Wed, Feb 23, 2022 at 03:38:20PM +0100, Marek Vasut wrote: > On 2/23/22 15:37, Maxime Ripard wrote: > > On Wed, Feb 23, 2022 at 03:09:08PM +0100, Marek Vasut wrote: > > > On 2/23/22 14:47, Maxime Ripard wrote: > > > > On Wed, Feb 23, 2022 at 02:45:30PM +0100, Marek

Re: [PATCH 3/7] drm/bridge: Extend struct drm_bus_cfg with clock field

2022-02-24 Thread Maxime Ripard
Hi, On Sat, Feb 19, 2022 at 01:28:40AM +0100, Marek Vasut wrote: > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > index 1701c2128a5cb..32455cf28f0bc 100644 > --- a/include/drm/drm_atomic.h > +++ b/include/drm/drm_atomic.h > @@ -1077,6 +1077,11 @@ struct drm_bus_cfg { >*

Re: [RFC][PATCH 0/7] drm/bridge: Add support for selecting DSI host HS clock from DSI bridge

2022-02-24 Thread Maxime Ripard
Hi, On Sat, Feb 19, 2022 at 01:28:37AM +0100, Marek Vasut wrote: > This patch series attempts to address a problem of missing support for DSI > bridge-to-bridge or panel-to-bridge clock frequency negotiation. The problem > has two variants. > > First, a DSI->to->x bridge derives its own internal

Re: [RFC][PATCH 0/7] drm/bridge: Add support for selecting DSI host HS clock from DSI bridge

2022-02-25 Thread Maxime Ripard
On Thu, Feb 24, 2022 at 09:24:57PM +0100, Marek Vasut wrote: > On 2/24/22 16:40, Maxime Ripard wrote: > > Hi, > > Hi, > > > On Sat, Feb 19, 2022 at 01:28:37AM +0100, Marek Vasut wrote: > > > This patch series attempts to address a problem of missing support

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

2022-02-25 Thread Maxime Ripard
Hi, On Thu, Feb 24, 2022 at 02:39:20PM -0800, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-02-21 08:43:23) > > 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:

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

2022-02-25 Thread Maxime Ripard
On Thu, Feb 24, 2022 at 02:44:20PM -0800, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-02-21 08:30:01) > > 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(

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

2022-02-25 Thread Maxime Ripard
Hi, On Thu, Feb 24, 2022 at 02:32:37PM -0800, Stephen Boyd wrote: > Quoting Maxime Ripard (2022-02-21 08:18:21) > > Hi, > > > > On Fri, Feb 18, 2022 at 03:15:06PM -0800, Stephen Boyd wrote: > > > Quoting Maxime Ripard (2022-01-25 06:15:41) > > > > The

Re: [PATCH 3/7] drm/bridge: Extend struct drm_bus_cfg with clock field

2022-02-25 Thread Maxime Ripard
On Thu, Feb 24, 2022 at 09:07:19PM +0100, Marek Vasut wrote: > On 2/24/22 16:19, Maxime Ripard wrote: > > On Sat, Feb 19, 2022 at 01:28:40AM +0100, Marek Vasut wrote: > > > diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h > > > index 1701c2128a5cb..32455

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

2022-02-25 Thread Maxime Ripard
Hi Daniel, On Wed, Feb 23, 2022 at 02:50:59PM -0800, Daniel Latypov wrote: > On Wed, Feb 23, 2022 at 2:56 AM Maxime Ripard wrote: > > > > Let's test various parts of the rate-related clock API with the kunit > > testing framework. > > > > Cc: kunit-...@goog

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

2022-02-25 Thread Maxime Ripard
Hi Stephen, On Thu, Feb 24, 2022 at 02:54:20PM -0800, Stephen Boyd wrote: > Quoting Daniel Latypov (2022-02-23 14:50:59) > > On Wed, Feb 23, 2022 at 2:56 AM Maxime Ripard wrote: > > Incremental coverage for 3/9 files in --diff_file > > Total incremental: 99.29% co

[PATCH v7 00/12] clk: Improve clock range handling

2022-02-25 Thread Maxime Ripard
s Changes from v1: - Return NULL in clk_request_start if clk pointer is NULL - Test for clk_req pointer in clk_request_done - Add another user in vc4 - Rebased on top of v5.15-rc1 Maxime Ripard (12): clk: Fix clk_hw_get_clk() when dev is NULL clk: Introduce Kunit Tests for the frame

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

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

[PATCH v7 05/12] clk: Use clamp instead of open-coding our own

2022-02-25 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 6c4e10209568..c15ee5070f52 100644 --- a/drivers/clk/clk.c +++ b/drivers

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