mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Heidelberg <david@ixit.cz>
To: "Yedaya Katsman" <yedaya.ka@gmail.com>,
	"Neil Armstrong" <neil.armstrong@linaro.org>,
	"Jessica Zhang" <jesszhan0024@gmail.com>,
	"David Airlie" <airlied@gmail.com>,
	"Simona Vetter" <simona@ffwll.ch>,
	"Maarten Lankhorst" <maarten.lankhorst@linux.intel.com>,
	"Maxime Ripard" <mripard@kernel.org>,
	"Thomas Zimmermann" <tzimmermann@suse.de>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Kamil Gołda" <kamil.golda@protonmail.com>,
	"Bjorn Andersson" <andersson@kernel.org>,
	"Konrad Dybcio" <konradybcio@kernel.org>,
	"Kaustabh Chakraborty" <kauschluss@disroot.org>
Cc: phone-devel@vger.kernel.org, dri-devel@lists.freedesktop.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v5 2/3] drm: panel: Add Samsung S6E8FC0 DSI controller for M1906F9 panel
Date: Wed, 18 Mar 2026 11:30:44 +0100	[thread overview]
Message-ID: <7e31ff87-3350-4a6a-9517-e0ad02d36040@ixit.cz> (raw)
In-Reply-To: <20260317-panel-patches-v5-2-ef99f7b280da@gmail.com>

On 17/03/2026 19:50, Yedaya Katsman wrote:
> Add driver for Samsung S6E8FC0 DSI controller for M1906F9 video mode panel,
> found in Xiaomi Mi A3 mobile phone.
> 
> Co-developed-by: Kamil Gołda <kamil.golda@protonmail.com>
> Signed-off-by: Kamil Gołda <kamil.golda@protonmail.com>
> Signed-off-by: Yedaya Katsman <yedaya.ka@gmail.com>
> 
> ---
> 
> The downstream dts claims a max brightness of 2047, but seems to ignore the
> MSB.
> ---

[...]
> +
> +static const struct regulator_bulk_data s6e8fc0_m1906f9_supplies[] = {
> +	{ .supply = "vdd" },
> +	{ .supply = "vci" },
> +};

these power supplies should be only DDIC related

> +
> +static inline
> +struct s6e8fc0_ctx *to_s6e8fc0_ctx(struct drm_panel *panel)
> +{
> +	return container_of_const(panel, struct s6e8fc0_ctx, panel);
> +}
> +
> +static void s6e8fc0_m1906f9_reset(struct s6e8fc0_ctx *ctx)
> +{
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> +	usleep_range(12000, 13000);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 1);
> +	usleep_range(2000, 3000);
> +	gpiod_set_value_cansleep(ctx->reset_gpio, 0);
> +	usleep_range(10000, 11000);
> +}
> +
> +#define s6e8fc0_m1906f9_test_key_on_lvl2(ctx) \
> +	mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0x5a, 0x5a)
> +#define s6e8fc0_m1906f9_test_key_off_lvl2(ctx) \
> +	mipi_dsi_dcs_write_seq_multi(ctx, 0xf0, 0xa5, 0xa5)
> +#define s6e8fc0_m1906f9_test_key_on_lvl3(ctx) \
> +	mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0x5a, 0x5a)
> +#define s6e8fc0_m1906f9_test_key_off_lvl3(ctx) \
> +	mipi_dsi_dcs_write_seq_multi(ctx, 0xfc, 0xa5, 0xa5)
> +

macros are definitely DDIC only (not panel related, thus s6e8fc0 only)

> +static int s6e8fc0_m1906f9_on(struct s6e8fc0_ctx *ctx)
> +{
> +	struct mipi_dsi_multi_context dsi_ctx = { .dsi = ctx->dsi };
> +
> +	s6e8fc0_m1906f9_test_key_on_lvl3(&dsi_ctx);
> +
> +	mipi_dsi_dcs_set_display_brightness_multi(&dsi_ctx, 0x0000);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, MIPI_DCS_WRITE_CONTROL_DISPLAY,
> +				     0x20);
> +	mipi_dsi_dcs_exit_sleep_mode_multi(&dsi_ctx);
> +	mipi_dsi_msleep(&dsi_ctx, 50);
> +	mipi_dsi_dcs_set_display_on_multi(&dsi_ctx);
> +
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x04, 0xed);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xed,
> +				     0xe4, 0x08, 0x96, 0xa4, 0x2a, 0x72, 0xe2,
> +				     0xca, 0x00);
> +	s6e8fc0_m1906f9_test_key_off_lvl3(&dsi_ctx);
> +	s6e8fc0_m1906f9_test_key_on_lvl2(&dsi_ctx);
> +	s6e8fc0_m1906f9_test_key_on_lvl3(&dsi_ctx);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xe1, 0x93);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xb0, 0x05, 0xf4);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xf4, 0x03);
> +	mipi_dsi_dcs_write_seq_multi(&dsi_ctx, 0xed, 0x01, 0x81, 0x04);
> +	s6e8fc0_m1906f9_test_key_off_lvl2(&dsi_ctx);
> +	s6e8fc0_m1906f9_test_key_off_lvl3(&dsi_ctx);
> +
> +	return dsi_ctx.accum_err;
> +}
> +

[...]

> +
> +static const struct of_device_id samsung_s6e8fc0_m1906f9_of_match[] = {

this struct is only DDIC related, the content of it below is panel related

> +	{ .compatible = "samsung,s6e8fc0-m1906f9" },
> +	{ /* sentinel */ }
> +};
> +MODULE_DEVICE_TABLE(of, samsung_s6e8fc0_m1906f9_of_match);
> +
> +static struct mipi_dsi_driver s6e8fc0_m1906f9_driver = {
> +	.probe = s6e8fc0_m1906f9_probe,
> +	.remove = s6e8fc0_remove,
> +	.driver = {
> +		.name = "panel-samsung-s6e8fc0-m1906f9",
> +		.of_match_table = samsung_s6e8fc0_m1906f9_of_match,
> +	},
> +};
> +module_mipi_dsi_driver(s6e8fc0_m1906f9_driver);

mipi_dsi_driver is DDIC related, not panel.


Otherwise LGTM, with requested changes

Reviewed-by: David Heidelberg <david@ixit.cz>

Thank you!
David

> +
> +MODULE_AUTHOR("Kamil Gołda <kamil.golda@protonmail.com>");
> +MODULE_DESCRIPTION("DRM driver for Samsung s6e8fc0 DSI controller");
> +MODULE_LICENSE("GPL");
> 

-- 
David Heidelberg


  parent reply	other threads:[~2026-03-18 10:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17 18:50 [PATCH v5 0/3] Add support for the Samsung S6E8FC0 DSI and M1906F9 display panel Yedaya Katsman
2026-03-17 18:50 ` [PATCH v5 1/3] dt-bindings: display: panel: Add Samsung S6E8FC0-M1906F9 Yedaya Katsman
2026-03-18  7:08   ` Krzysztof Kozlowski
2026-03-17 18:50 ` [PATCH v5 2/3] drm: panel: Add Samsung S6E8FC0 DSI controller for M1906F9 panel Yedaya Katsman
2026-03-18  7:07   ` Dmitry Baryshkov
2026-03-18 10:30   ` David Heidelberg [this message]
2026-03-17 18:50 ` [PATCH v5 3/3] arm64: dts: qcom: sm6125-xiaomi-laurel-sprout: Enable MDSS and add panel Yedaya Katsman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=7e31ff87-3350-4a6a-9517-e0ad02d36040@ixit.cz \
    --to=david@ixit.cz \
    --cc=airlied@gmail.com \
    --cc=andersson@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jesszhan0024@gmail.com \
    --cc=kamil.golda@protonmail.com \
    --cc=kauschluss@disroot.org \
    --cc=konradybcio@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tzimmermann@suse.de \
    --cc=yedaya.ka@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®