From patchwork Wed Sep 11 15:15:51 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3463 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D5D133F263 for ; Wed, 11 Sep 2024 17:16:04 +0200 (CEST) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-42cb89fbb8csf23070225e9.0 for ; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067764; cv=pass; d=google.com; s=arc-20240605; b=MkUHsYvseU/nW7Nyqeoql1qwY1nIGEe6PJ5sDwgl5cqFiA68OOs43qA8A+RzRsD6LW TjTDQJ+ROaihAcYg3AMG0+178xlzeQwxsU/0JxMS46NWketvjPCTXcZV651gOL+XSBlu T/J36BEgRDw1g2IK8lBHDN3mTrZbFXbxRssLsDpIJaOBL0aM6XeXZHSf2c1H8Gq+F4gg GQlhc9L07klVpMdkaftnG77a1edS47P0VTtXK6t3dhW5z0+IcTjp3OwRsgp26NvzEQpm azAgFxWIhB1slu4wxOt7/BcEc2WFu3WLfegCugl4g/YNmz0T6YAoR2Z28i2AGijkjkIG lgIg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; fh=PFmet6+ACBZH0URET1CxlMeXKfOE5phwtd15DxPiBUE=; b=W9s7pxGUhJxcM9UK4xjoEMDUYB1vxulmvvWiVD+hi88dD6iaxKS77Dwb517+ZbfZsW H7DaQKL31sAHxyKa+5rMh81a1993U+5Iw+CIhsVzhzg0Qp4eSXB/LOAKiduHggvWWUIc udzvv+MHHI/YfAh40dMWwa/kWZXvJq1QH8qmfQrWHw/+L7p9WpxC0f+o+sKouxIxw0Ux wGqy5VCo2SVhftPvQpgHT6d0YKWuP0IAo/zENQdSp7tWcwXf4VDxiE3Fid38p+IBYcaJ dAwJBzLHUM66DqJi4OZoizxRnQQ55GoMT7vnCaqz23BJ6wyKYNzcgyvab6XzPkiNUwb6 DR6w==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARHacWVG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1726067764; x=1726672564; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; b=hAy3vtF00ZsU7oeghSQNzp516Up51AeETFm+CeQ7ypq+tvxTTbfQJ/DImb8hbaSw5I Y3muBiMobG129me8WsXf09CaDCVoF0dmEOVHMbchuuhrMAosDG7u682bvJSy/eYbjwUf +IWQjsGFWCuUubk9DBbK1oax+/IWOvLjp5ld0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067764; x=1726672564; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:to:from:x-beenthere :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IALQ0sBBnDCChC3p8U4CWOLf9EnTU9B6KmIspbG4Azw=; b=fy2BbSrYUApzQTiUiyviWWzGIvY9KK01+w8CwOXFlR2bo2v7ekovGq8+QIdJdtz0v/ VHaGFWY9w6PDPvqCH7JPddnvRfNcb0sufODlassuLZ31BykByhNR7Fm9pJqoFRd9tSuV K3QdVtpB6EXhD12f7QA4z8olGPoJTYEoqrDJ4HgFv4lqhBQ5CylXXGw2K9s6v9hivJko d+3hc9RyGyFbryN3XNdFuyiqYUUs5oTw34RwOf170LzUdiUhQevOSipnQKz12RodZkql VZ5g4x4HPNiHJjhDo05rxZrjC2Ab3iY4C6gP7FWzxA7cIiL5JxqZZxypVHLAJYL07IfI BXJw== X-Forwarded-Encrypted: i=2; AJvYcCXUoTagcGY8LHIEgd+VPyK5NLZ82zbk+KTDRrhn+rquJ1G20J44wO7QBAIKoZLzVi0klYNhtpf0nx71Jsgm@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YyLT1E/A+NZuB6SYCNkoAWYEk8e+up0x94NH6e6SSrDLUZW92il qkGRm0vcektsDd+OIylaen+bLe1jKD8YcqazOiXVKFklA19FvNQneVGc25UNPb5HOA== X-Google-Smtp-Source: AGHT+IEMHgfkQERTQRGlOpb+BBEFJbws3nTs5cg/vVMHqGw3l1oU4V9I4UiqHIdb6xos0AIFQi3guA== X-Received: by 2002:a05:600c:4e4e:b0:42c:a580:71cf with SMTP id 5b1f17b1804b1-42cad87eed8mr115519115e9.30.1726067764479; Wed, 11 Sep 2024 08:16:04 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:adf:f001:0:b0:371:7960:15b8 with SMTP id ffacd0b85a97d-378883bbc08ls1759339f8f.1.-pod-prod-08-eu; Wed, 11 Sep 2024 08:16:03 -0700 (PDT) X-Received: by 2002:adf:f285:0:b0:374:ba7a:7d46 with SMTP id ffacd0b85a97d-37892704085mr8800317f8f.43.1726067762901; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067762; cv=none; d=google.com; s=arc-20160816; b=SdfEuKPqeOPZDIHMAQNRlF+cQoS6qsu0im9lAyF1sJHuQMox789/GEXUXvomCwPKHR pZjgiD2KUfxWv9WE4IRPBRpVGkibHKJjtsKRzUqef5GE8AguvKcoSxsTVnIOANhpbIWC +VglNYDfByfluOv85xmoMzLXP09epwtoKiMb2eDFHs7OylpJGN416yTwOOU0Uyrjos+V KMwLiafpK7vMbEC3End9eL96xL0jfNtb06UCMQS7EDPm89X8KgLRlP15/7h9Yl42y6Yu G6XeBKJuSxxrxX3xdeuySuvdmUDm6BIeJ8wGAHgt/NHn740pLGD25oHarqmYdFSXBSZL xr0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:dkim-signature; bh=L0OD9jL8YR+KiYTpNEU29Kv4SUYLBAcHzNdkWwMN8Q8=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=tu33TDWyFYnCc7LgMbWqrZQQYNQvPGyVVYRoKDNeNzlbsfXqfbqKuU3urwNBsHeRgY Vktt3QOY7dE4uWSJZ4gzLoUJdDe58c+PuSnLk534decbU9WO+BdvQcONEhohrj2fMya+ O8yxl8Xr1EZ/OI8YQV48NfAdc2xSH3ijDaxywR0MFHI+6t4JBzo9ub0Vx+99/mIJw98M 6o6qfhMqwToG6VSWLVoOZDSjChA16cWdFf04JcLZNLXwYIJDPFY1QFZtCHB3vAWbyULY jpxNvwE/zj9Jev4ikrNm1J4hME3/VVjC+4L9u+VDsVZn8bBgWiM0V+vWTsCXqJL2/ykk EBiw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARHacWVG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-42caf155f34sor31656325e9.0.2024.09.11.08.16.02 for (Google Transport Security); Wed, 11 Sep 2024 08:16:02 -0700 (PDT) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:600c:354a:b0:428:1e8c:ff75 with SMTP id 5b1f17b1804b1-42cadb6a47cmr98704315e9.35.1726067762208; Wed, 11 Sep 2024 08:16:02 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-378956d37a1sm11797177f8f.77.2024.09.11.08.16.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:16:01 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup Date: Wed, 11 Sep 2024 17:15:51 +0200 Message-ID: <20240911151555.2915258-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> References: <20240911151555.2915258-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=ARHacWVG; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=pass header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The patch does not re-execute the hardware initialization/activation procedure for the panel if it is already operational. This feature is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Co-Developed-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/panel/panel-synaptics-r63353.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/panel/panel-synaptics-r63353.c b/drivers/gpu/drm/panel/panel-synaptics-r63353.c index 169c629746c7..93e3ed545b34 100644 --- a/drivers/gpu/drm/panel/panel-synaptics-r63353.c +++ b/drivers/gpu/drm/panel/panel-synaptics-r63353.c @@ -258,6 +258,8 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) int ret = 0; struct device *dev = &dsi->dev; struct r63353_panel *panel; + bool initialized; + enum gpiod_flags rflags; panel = devm_kzalloc(&dsi->dev, sizeof(*panel), GFP_KERNEL); if (!panel) @@ -282,7 +284,9 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) if (IS_ERR(panel->avdd)) return PTR_ERR(panel->avdd); - panel->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_LOW); + initialized = of_property_read_bool(dev->of_node, "syna,boot-on"); + rflags = initialized ? GPIOD_ASIS : GPIOD_OUT_LOW; + panel->reset_gpio = devm_gpiod_get(dev, "reset", rflags); if (IS_ERR(panel->reset_gpio)) { dev_err(dev, "failed to get RESET GPIO\n"); return PTR_ERR(panel->reset_gpio); @@ -297,6 +301,10 @@ static int r63353_panel_probe(struct mipi_dsi_device *dsi) return ret; drm_panel_add(&panel->base); + if (initialized) { + r63353_panel_power_on(panel); + panel->base.prepared = true; + } ret = mipi_dsi_attach(dsi); if (ret < 0) {