From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gloria.sntech.de (gloria.sntech.de [185.11.138.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DEFC812CDA5 for ; Sun, 7 Jun 2026 10:59:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.11.138.130 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780829970; cv=none; b=L0QXtY0QUvb8FbdIZKybvffJv3hFtHXjhMsmwLC9fK25C6lXe1rHlNqyJuezeCWjdKZ6Q4YaT9gBKLPpz847bKAW4ph5P6hCfi/zyNGcijFoo5GTRVnY2sqfSnqLwmfsKlfCJtsiqsgwHOUbxoIyBGey67UAJPYAcjKuqo+DC/A= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780829970; c=relaxed/simple; bh=ZJEhR83/DaENsX0dRq5jBClE/hqZgiyNrgxo6WRvTdI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Z3x5SoTG7lGgVFENIHftgm3YjS/YQcpxbcSQvpZqgx1LNpBzfT/NltlTM0DYsHD5x/mLaXkQF4l4s70TEZb2eSpKotVoq450f3LAxjB6ueQZsEJbGvdhqfj61nSLsoQPJNKZws4s4JZ0yB/HjByrRIQtfAgzD4Ac+zGur0puTo0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de; spf=pass smtp.mailfrom=sntech.de; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b=gmiN5pvj; arc=none smtp.client-ip=185.11.138.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=sntech.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=sntech.de Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=sntech.de header.i=@sntech.de header.b="gmiN5pvj" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sntech.de; s=gloria202408; h=Content-Type:Content-Transfer-Encoding:MIME-Version: References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Reply-To; bh=97NZlk873g/D280FN02tm4Cwk27MbU4WZEUElaU0aQM=; b=gmiN5pvjvSslkFeya7EuNki80z Qv3sH3Vh16k9AXWcagQLxnhxoDd7f3QtMAvEyrA6paLlnLN0/6ayEGeuifHytKkoxXhFdw8XiKrDh T9130QoSZa0s2glYzMT2/e/bgrOd9PynunSBzAW7XIvhvyzXa90BSEyzko4omuBcHEY22T2pbb5IV G+lE+ZaEXoUOse9OZTRVJTQQmEM2+I2ffXf/HWOUcUwug/lbNm695Cl8qRJGbFvyjLAfcuKxB7glf DmiY11iAM9YRkxRV2u0XE88uTgbvharrnzIXPXNRWtq7u/f8GX50f1b0wYPZJxR4PwH4FSYRSGuuV 2aALXJDA==; From: Heiko Stuebner To: Sandy Huang , Andy Yan , Diogo Silva Cc: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Diogo Silva Subject: Re: [PATCH] drm/rockchip: dsi: Open-code drm_simple_encoder_init() Date: Sun, 07 Jun 2026 12:59:00 +0200 Message-ID: <5277524.h16uAIiOU7@phil> In-Reply-To: <20260604123224.192543-2-diogompaissilva@gmail.com> References: <20260604123224.192543-2-diogompaissilva@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Hi Diego, Am Donnerstag, 4. Juni 2026, 14:32:25 Mitteleurop=C3=A4ische Sommerzeit sch= rieb Diogo Silva: > Remove the dependency on drm_simple_kms_helper by open-coding the > drm_simple_encoder_init call. this description is missing a rationale. Looking at the drm git history, I guess here you could add a second paragraph, with something like: =2D---------- 8< ----------- The helpers have been deprecated for years as they only add an an intermediate layer between atomic modesetting and the DRM driver. =2D---------- 8< ----------- Shamelessly stolen from the Todo item ;-) > Signed-off-by: Diogo Silva > --- > drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c | 9 +++++++-- Any reason for only changing the DSI driver? Looking at [0] a number of the Rockchip drivers use the same pattern: =2D drivers/gpu/drm/rockchip/analogix_dp-rockchip.c =2D drivers/gpu/drm/rockchip/cdn-dp-core.c =2D drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c =2D drivers/gpu/drm/rockchip/dw-mipi-dsi2-rockchip.c =2D drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c =2D drivers/gpu/drm/rockchip/dw_hdmi_qp-rockchip.c =2D drivers/gpu/drm/rockchip/rk3066_hdmi.c =2D drivers/gpu/drm/rockchip/rockchip_lvds.c =2D drivers/gpu/drm/rockchip/rockchip_rgb.c You can just do all Rockchip ones - even in one patch I think :-) . Thanks Heiko [0] https://elixir.bootlin.com/linux/v7.1-rc6/A/ident/drm_simple_encoder_in= it > 1 file changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c b/drivers/gp= u/drm/rockchip/dw-mipi-dsi-rockchip.c > index 3547d91b25d3..a09b382d208e 100644 > --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c > +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi-rockchip.c > @@ -25,7 +25,6 @@ > #include > #include > #include > -#include > =20 > #include "rockchip_drm_drv.h" > =20 > @@ -825,6 +824,10 @@ static void dw_mipi_dsi_encoder_enable(struct drm_en= coder *encoder) > clk_disable_unprepare(dsi->grf_clk); > } > =20 > +static const struct drm_encoder_funcs dw_mipi_dsi_encoder_funcs =3D { > + .destroy =3D drm_encoder_cleanup, > +}; > + > static const struct drm_encoder_helper_funcs > dw_mipi_dsi_encoder_helper_funcs =3D { > .atomic_check =3D dw_mipi_dsi_encoder_atomic_check, > @@ -840,7 +843,9 @@ static int rockchip_dsi_drm_create_encoder(struct dw_= mipi_dsi_rockchip *dsi, > encoder->possible_crtcs =3D drm_of_find_possible_crtcs(drm_dev, > dsi->dev->of_node); > =20 > - ret =3D drm_simple_encoder_init(drm_dev, encoder, DRM_MODE_ENCODER_DSI); > + ret =3D drm_encoder_init(drm_dev, encoder, > + &dw_mipi_dsi_encoder_funcs, > + DRM_MODE_ENCODER_DSI, NULL); > if (ret) { > DRM_ERROR("Failed to initialize encoder with drm\n"); > return ret; >=20