From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm2-f13.google.com (mail-wm2-f13.google.com [74.125.225.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40BF7489FD6 for ; Thu, 24 Sep 2026 13:27:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.225.141 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790256424; cv=none; b=nf/N2p8nxv5qz7dEBxnA7L9lstIoSc4wkPbLNKUGz3F7fu1QD9Z5teltjtah0P31xj/OuRnzdAmExxSbh5nbZphRbIMl1xD2rCiLsyXst8loheprSI1Y9zoIyMVI8p2Ffa8Mpl6tsAuzk4iqtwTG3cUkXSKp8snedhdhzUj4yBM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790256424; c=relaxed/simple; bh=NrTUc2Ujr6zR78Ms94ZBr3uoJ6uW4y4swNxgYb4M0ls=; h=Message-ID:Date:MIME-Version:From:Subject:To:Cc:References: In-Reply-To:Content-Type; b=BYdq0xQ2xNB2UfLb4z7v/hh6n4Jd45l3zZCJjUGmcHXo2C7kKQGgD2arOKggwx+zPlmQnc2L8MfhqEmjYRkn+lJgPYHk2F4g8G+LmFDNLa26HOSj8PMT0tUBoFjAtLt6BC36JouwuP11T8f4F1iTpskb4RIyeubzZ0UzpLmsLOI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=SOvdmxi1; arc=none smtp.client-ip=74.125.225.141 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="SOvdmxi1" Received: by mail-wm2-f13.google.com with SMTP id 5b1f17b1804b1-49cd38e0e5dso26097525e9.2 for ; Thu, 24 Sep 2026 06:27:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1790256419; x=1790861219; darn=vger.kernel.org; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:from:to:cc:subject:date :message-id:reply-to:content-type; bh=bR8KLVmfkqlUwLeA5NPAg5mdoYKwiz6mqVtLy5sMUQI=; b=SOvdmxi1Lb4DkYXczUnYSs/mmUhqZ/VhRHbx73u1InDj+mPdU8aICfTlA/zA/EaW6K FtGOB9Frn5DBOfGs2tfb+S1px9GKCP7sD1OJaEahg+QCkJ6ElXCMIBMY1YROb/uhvqq/ QBlrM1Hx373urPNhl2NdbcrDiBzd8zsZ403ziZT+gv3ACDoTeexcnmNdgn26cOEbe7aj dQbwsqW7MPf5B4RomRkFvrvd86PulIuGIcw41OlOVjJbNoNmgIbLzX8agCjD3BNmXm7F Ls3etXcVBVXeFRPqbGiSEZrKoZH+9F8mni5bvfejO4bS1/J0Co0Ez4kfObPZBVbsLzh4 hvgA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1790256419; x=1790861219; h=content-transfer-encoding:content-type:in-reply-to:organization :autocrypt:content-language:references:cc:to:subject:reply-to:from :user-agent:mime-version:date:message-id:x-gm-gg:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to:content-type; bh=bR8KLVmfkqlUwLeA5NPAg5mdoYKwiz6mqVtLy5sMUQI=; b=VAV8sli09GZH1F8gLZrvVwQdqj+K40g/AFQrXeTSesrAi+eiPaQdjBLmPx2yzWuBPD y8aw3LF5ppno5G9HpimZiqLhG2z2/gZ8Vgv5Mt+fGTw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vZubauocRp0XTQ== X-Received: by 2002:a05:600c:1c08:b0:49f:e0f4:1aac with SMTP id 5b1f17b1804b1-49fe66fd431mr48391305e9.25.1790256418908; Thu, 24 Sep 2026 06:26:58 -0700 (PDT) Received: from ?IPV6:2a01:e0a:106d:1080:336e:a1a0:8f96:9f7a? ([2a01:e0a:106d:1080:336e:a1a0:8f96:9f7a]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-49fdf99df60sm108015625e9.1.2026.09.24.06.26.58 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 24 Sep 2026 06:26:58 -0700 (PDT) Message-ID: Date: Thu, 24 Sep 2026 15:26:57 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird From: Neil Armstrong Reply-To: Neil Armstrong Subject: Re: [PATCH 06/11] drm/panel: s6e3ha8: Correct the polarity logic within To: david@ixit.cz, Dzmitry Sankouski , Jessica Zhang , David Airlie , Simona Vetter , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Bjorn Andersson , Konrad Dybcio , Abel Vesa Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, phone-devel@vger.kernel.org References: <20260920-crosshatch-panel-v1-0-de6e9512da96@ixit.cz> <20260920-crosshatch-panel-v1-6-de6e9512da96@ixit.cz> Content-Language: en-US, fr Autocrypt: addr=neil.armstrong@linaro.org; keydata= xsBNBE1ZBs8BCAD78xVLsXPwV/2qQx2FaO/7mhWL0Qodw8UcQJnkrWmgTFRobtTWxuRx8WWP GTjuhvbleoQ5Cxjr+v+1ARGCH46MxFP5DwauzPekwJUD5QKZlaw/bURTLmS2id5wWi3lqVH4 BVF2WzvGyyeV1o4RTCYDnZ9VLLylJ9bneEaIs/7cjCEbipGGFlfIML3sf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iB/sGbkQ6itMrAIfn M7IbRuiSZS1unlySUVYu3SD6YBYnNi3G5EpbwfBNuT3H8//rVvtOFK4OD8cRYkxXRQmTvqa3 3eDIHu/zr1HMKErm+2SD6PO9umRef8V82o2oaCLvf4WeIssFjwB0b6a12opuRP7yo3E3gTCS KmbUuLv1CtxKQF+fUV1cVaTPMyT25Od+RC1K+iOR0F54oUJvJeq7fUzbn/KdlhA8XPGzwGRy 4zcsPWvwnXgfe5tk680fEKZVwOZKIEuJC3v+/yZpQzDvGYJvbyix0lHnrCzq43WefRHI5XTT QbM0WUIBIcGmq38+OgUsMYu4NzLu7uZFAcmp6h8g Organization: Linaro In-Reply-To: <20260920-crosshatch-panel-v1-6-de6e9512da96@ixit.cz> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 9/20/26 13:05, David Heidelberg via B4 Relay wrote: > From: David Heidelberg > > The reset was introduced with wrong polarity. Correct for the future > compatibles and keep current with reverted logic. > > Old DTs keep GPIO_ACTIVE_HIGH and are fixed up via > gpiod_toggle_active_low() on the deprecated compatible. > > Assisted-by: LLM > Signed-off-by: David Heidelberg > --- > drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c | 23 +++++++++++++++++++---- > 1 file changed, 19 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c > index 5e1e997b83b36..99290913de69a 100644 > --- a/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c > +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3ha8.c > @@ -20,16 +20,17 @@ > #include "panel-samsung-dsi.h" > > struct s6e3ha8_desc { > const struct drm_panel_funcs *funcs; > const struct drm_display_mode *mode; > unsigned long mode_flags; > const struct regulator_bulk_data *supplies; > unsigned int num_supplies; > + bool broken_reset_polarity; > }; > > struct s6e3ha8 { > struct drm_panel panel; > struct mipi_dsi_device *dsi; > const struct s6e3ha8_desc *desc; > struct drm_dsc_config dsc; > struct gpio_desc *reset_gpio; > @@ -62,22 +63,22 @@ static int s6e3ha8_unprepare(struct drm_panel *panel) > { > struct s6e3ha8 *priv = to_s6e3ha8(panel); > > return regulator_bulk_disable(priv->desc->num_supplies, priv->supplies); > } > > static void s6e3ha8_amb577px01_wqhd_reset(struct s6e3ha8 *priv) > { > - gpiod_set_value_cansleep(priv->reset_gpio, 1); > - usleep_range(5000, 6000); > gpiod_set_value_cansleep(priv->reset_gpio, 0); > usleep_range(5000, 6000); > gpiod_set_value_cansleep(priv->reset_gpio, 1); > usleep_range(5000, 6000); > + gpiod_set_value_cansleep(priv->reset_gpio, 0); > + usleep_range(5000, 6000); > } > > static int s6e3ha8_amb577px01_wqhd_on(struct s6e3ha8 *priv) > { > struct mipi_dsi_device *dsi = priv->dsi; > struct mipi_dsi_multi_context ctx = { .dsi = dsi }; > > dsi->mode_flags |= MIPI_DSI_MODE_LPM; > @@ -203,17 +204,17 @@ static int s6e3ha8_amb577px01_wqhd_prepare(struct drm_panel *panel) > ret = regulator_bulk_enable(priv->desc->num_supplies, priv->supplies); > if (ret < 0) > return ret; > mipi_dsi_msleep(&ctx, 120); > s6e3ha8_amb577px01_wqhd_reset(priv); > > ret = s6e3ha8_amb577px01_wqhd_on(priv); > if (ret < 0) { > - gpiod_set_value_cansleep(priv->reset_gpio, 0); > + gpiod_set_value_cansleep(priv->reset_gpio, 1); > goto err; > } > > drm_dsc_pps_payload_pack(&pps, &priv->dsc); > > samsung_dsi_test_key_on_lvl1(&ctx); > mipi_dsi_picture_parameter_set_multi(&ctx, &pps); > samsung_dsi_test_key_off_lvl1(&ctx); > @@ -243,16 +244,27 @@ static const struct drm_display_mode s6e3ha8_amb577px01_wqhd_mode = { > static const struct drm_panel_funcs s6e3ha8_amb577px01_wqhd_panel_funcs = { > .prepare = s6e3ha8_amb577px01_wqhd_prepare, > .unprepare = s6e3ha8_unprepare, > .get_modes = s6e3ha8_get_modes, > .enable = s6e3ha8_amb577px01_wqhd_enable, > .disable = s6e3ha8_amb577px01_wqhd_disable, > }; > > +static const struct s6e3ha8_desc s6e3ha8_amb577px01_wqhd_desc_legacy = { > + .funcs = &s6e3ha8_amb577px01_wqhd_panel_funcs, > + .mode = &s6e3ha8_amb577px01_wqhd_mode, > + .mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS | > + MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP | > + MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET, > + .supplies = s6e3ha8_vddr_supplies, > + .num_supplies = ARRAY_SIZE(s6e3ha8_vddr_supplies), > + .broken_reset_polarity = true, > +}; > + > static const struct s6e3ha8_desc s6e3ha8_amb577px01_wqhd_desc = { > .funcs = &s6e3ha8_amb577px01_wqhd_panel_funcs, > .mode = &s6e3ha8_amb577px01_wqhd_mode, > .mode_flags = MIPI_DSI_CLOCK_NON_CONTINUOUS | > MIPI_DSI_MODE_VIDEO_NO_HFP | MIPI_DSI_MODE_VIDEO_NO_HBP | > MIPI_DSI_MODE_VIDEO_NO_HSA | MIPI_DSI_MODE_NO_EOT_PACKET, > .supplies = s6e3ha8_vddr_supplies, > .num_supplies = ARRAY_SIZE(s6e3ha8_vddr_supplies), > @@ -283,16 +295,19 @@ static int s6e3ha8_probe(struct mipi_dsi_device *dsi) > return ret; > } > > priv->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH); > if (IS_ERR(priv->reset_gpio)) > return dev_err_probe(dev, PTR_ERR(priv->reset_gpio), > "Failed to get reset-gpios\n"); > > + if (priv->desc->broken_reset_polarity) > + gpiod_toggle_active_low(priv->reset_gpio); > + > priv->dsi = dsi; > mipi_dsi_set_drvdata(dsi, priv); > > dsi->lanes = 4; > dsi->format = MIPI_DSI_FMT_RGB888; > dsi->mode_flags = priv->desc->mode_flags; > > priv->panel.prepare_prev_first = true; > @@ -323,17 +338,17 @@ static int s6e3ha8_probe(struct mipi_dsi_device *dsi) > > return 0; > } > > static const struct of_device_id s6e3ha8_of_match[] = { > { > /* deprecated */ > .compatible = "samsung,s6e3ha8", > - .data = &s6e3ha8_amb577px01_wqhd_desc, > + .data = &s6e3ha8_amb577px01_wqhd_desc_legacy, > }, { > .compatible = "samsung,s6e3ha8-amb577px01", > .data = &s6e3ha8_amb577px01_wqhd_desc, > }, > { /* sentinel */ } > }; > MODULE_DEVICE_TABLE(of, s6e3ha8_of_match); > > Reviewed-by: Neil Armstrong Thanks, Neil