From patchwork Mon Oct 28 10:25:28 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853254 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 035FAD13570 for ; Mon, 28 Oct 2024 10:26:29 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6D5D610E45F; Mon, 28 Oct 2024 10:26:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="WE44lu1l"; dkim-atps=neutral Received: from mail-ej1-f44.google.com (mail-ej1-f44.google.com [209.85.218.44]) by gabe.freedesktop.org (Postfix) with ESMTPS id 3ABF410E45F for ; Mon, 28 Oct 2024 10:26:19 +0000 (UTC) Received: by mail-ej1-f44.google.com with SMTP id a640c23a62f3a-a99f646ff1bso523970566b.2 for ; Mon, 28 Oct 2024 03:26:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111177; x=1730715977; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=pgo/k+HOa5AvPj9A+1CCmgMfc+PmvaON+Q6yQ1cAi7o=; b=WE44lu1l2nuVwerGYfEc7WvGWmPTsV3b25MUQOeKvRJxduQh9z9X2DiTl53YEUao+O tz3AWwSJD7pt2QkP8Fcahg0o4TCeD8q0SE87bRwlgYVcRnLp1q5o0zDHV2AwzoLqHoH1 uD+1LC6ISqlh1V2uWaMb+V+LxkDRcpPDiuUjU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111177; x=1730715977; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=pgo/k+HOa5AvPj9A+1CCmgMfc+PmvaON+Q6yQ1cAi7o=; b=fx5a4WumUUqCxn18b2Y4Ggz+xU81N5RSEdvbNf8JFZx8sVib9eSEG8J/bgiKMDj6zR DppP9r4+4P5JG4mDi3IL4kjJ7QegjWjld/ZaybYWIeOwpVVhylVrcSPmcEYEzp4JbOUM kO9SqFYCHj9bOOZ4igB0kSVsX2thljej8lT6KCsmsbQiKeOIdZIKEeRMhGvFZtlg/9AW XYdhdLzrgk5dqSjxGnuWCoZgP1t4as6zPWIjZljexGDhr1wn53nLTE7wyxWhqSGGiYnr h2Pk/WH7kCl2IYfrSexEsWJ5J8VSyfxasmu+8MU9WIdjouRVzhBy5VTx7NuWHByUdHqB m4Lg== X-Forwarded-Encrypted: i=1; AJvYcCV8E4vPSgefHE7HAv1n+NIhiV3TVHrFlRCrEP9Witfpgof0H5Q3v/iOplxBRH3Sy+5KL21tV6Dba0c=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyU09iqrcCD4rFSbBn/Ieh3v1MoOyMRBCcBNXkToy+IyLiKLdgg iN4Z8qBwFPJApirbWszhX5RIVcRNDYms0rd2bzDnHtZUGo3lGAPsM3a4/k0EdEM= X-Google-Smtp-Source: AGHT+IE1qExZyTeDCcsOPLbzeTHr0FDTO0+eG+29GGN1U5BkMPni1pRPTaIjSGyhvowARpdu2dlhRg== X-Received: by 2002:a17:907:7292:b0:a9a:d23:f8ca with SMTP id a640c23a62f3a-a9de5c92bfcmr611522566b.13.1730111177428; Mon, 28 Oct 2024 03:26:17 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:17 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , David Airlie , Jessica Zhang , Krzysztof Kozlowski , Maarten Lankhorst , Maxime Ripard , Michael Trimarchi , Neil Armstrong , Rob Herring , Simona Vetter , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 05/10] dt-bindings: display: panel: add 'syna, boot-on' property Date: Mon, 28 Oct 2024 11:25:28 +0100 Message-ID: <20241028102559.1451383-6-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The property states that the panel display has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- .../devicetree/bindings/display/panel/synaptics,r63353.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml index 2fd6e0ec3682..987fd6f8b866 100644 --- a/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml +++ b/Documentation/devicetree/bindings/display/panel/synaptics,r63353.yaml @@ -25,6 +25,11 @@ properties: avdd-supply: true dvdd-supply: true + syna,boot-on: + description: | + The display has been initialized and left on by the bootloader/firmware. + type: boolean + required: - compatible - reg From patchwork Mon Oct 28 10:25:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853256 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id B5EBED13588 for ; Mon, 28 Oct 2024 10:26:34 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DAFE010E469; Mon, 28 Oct 2024 10:26:31 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="PQ+0u2/I"; dkim-atps=neutral Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7B11510E460 for ; Mon, 28 Oct 2024 10:26:21 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9a4031f69fso559617666b.0 for ; Mon, 28 Oct 2024 03:26:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111180; x=1730715980; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=OXDPpN57LGyZzaHcm0JxAGhhGbbwxVltmDt3enjDY8Q=; b=PQ+0u2/Ige7ylU5hOq5QL+t11C71JCmKQ1vWQZM/xkDWJT2CXp4I563c9T5sG+QmlZ FczO8Jz7eQaF9+u0AJW64CiS1aZKhr/bcz7JDm2hcSSZjo4H0ZuncDR03iE73S5kRQgu bpQZYmde46j768ZoFL88O2omUiecxeZJ0Dd9U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111180; x=1730715980; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OXDPpN57LGyZzaHcm0JxAGhhGbbwxVltmDt3enjDY8Q=; b=Qqicpj/w9Gd9ArfH46FRrzbi+q+Vwz6kJN9zLLctiVBmFv+NfZdq8bCRGfZDvW1nJv cTpYq0mGPSgA9xEpTIm++09gIi6fwv4OS7nSyFjRh5nUz+0NSpaysDf2xJrREA4OG6o/ y0lGqn0LtdY80KErs8rPapUsGRKCSernrkh2O5ijOLDagn6M/QIGqH/PQXfUeQmiQa/T 0uG9HkoaXAMrzqC8nhRiClnTPvbTTrizpsZgHA+ehN4Wl2dLE7TWptUBXb2pB8Yx0NXu Eh0uncQY8zS22h2sMKncibviKjx50dUwtiMhES6oGvWGZaWeF5VJuSOoO7IHBhYfiarv NByg== X-Forwarded-Encrypted: i=1; AJvYcCUDVd86oR0UfSoEhy4tjoaGa497IoyuxvLvQVjmziJQrFKm5yRIXsCaiKPcx71xjYCTrcuEy0ViGx0=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzDqh4kuO4wg7MNA/WdGqVw5zV0skRJ0+UW68Qme3r2/QC1E0NT MA2C7KZxkH4VOt3kYuiUvxwsCHIPtk5yxDe4ZKD4nFYXtThQIUNQKck9JY52UxA= X-Google-Smtp-Source: AGHT+IGIIRLGq3ogNM31hjyoqOVoY34pnS1OMJQTrH1F7+5cPe+gR2UOhwfrIkMj1DdEZZ5m3Q3jug== X-Received: by 2002:a17:907:72c2:b0:a99:f67c:2314 with SMTP id a640c23a62f3a-a9de5ee34d7mr848368866b.35.1730111178897; Mon, 28 Oct 2024 03:26:18 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:18 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Neil Armstrong , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [RFC PATCH 06/10] drm/panel: synaptics-r63353: don't re-activate the panel if already setup Date: Mon, 28 Oct 2024 11:25:29 +0100 Message-ID: <20241028102559.1451383-7-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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: 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) { From patchwork Mon Oct 28 10:25:30 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 0EE6FD13588 for ; Mon, 28 Oct 2024 10:26:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6C75810E136; Mon, 28 Oct 2024 10:26:26 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="j3MwMwmz"; dkim-atps=neutral Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90C1210E460 for ; Mon, 28 Oct 2024 10:26:22 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id 4fb4d7f45d1cf-5c96b2a10e1so6472036a12.2 for ; Mon, 28 Oct 2024 03:26:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111181; x=1730715981; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Ub+YOxTaEj8h3/OEhQEBYuD58+vmy3bTawAxFBvQf9I=; b=j3MwMwmzZXI/N8orcxQYcoMGfQpXvRe6hlCAYq92mNT8bZaV/CNHfKLi+T4vJtP5m0 6jWYhxgHDMvYJnkzIJbiP1/X0XEbCh9bM2dO1ExsT8s36JHM4buTU0FrT8pGGpul0zag JsIqwk5oIEJMfu9FtOK0L5O5uzNbng+PwkP5M= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111181; x=1730715981; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Ub+YOxTaEj8h3/OEhQEBYuD58+vmy3bTawAxFBvQf9I=; b=Q0MEnnOR79neE1P0AwRLXtDDixcmJAP32PUrfcHD0P2Z+q7XqEJqb0L//jiXaWC/jK iQJLdSQqaN73kp2n6M3jV/3vAJevkkyiXLqc59HuydxZBVnzjWhSGJu2HRFZ9gnmJtyV HvjIeYYe47DOxP1heHj7AAA002Fm+ovOSd81/WpnUzAX/oe1PSUap+ucleRW+sH/xNT2 0ne9harOjFi1qNbZQQkA1CwMveyncQnhO94TYu3XyOHd/u88QzGCgA4vDLpsT2TLvdS1 L/OsVnYiEw7eNiqVP1tqYG7iqXG+Vu1myThOU8sgRPH0CTBLsk3+xRIYuINcQfzENcFV GAKw== X-Forwarded-Encrypted: i=1; AJvYcCXKuYyKlL5JjeV3/QKGKDuKVXgKKQqqOGpZqxU0MhNxKzgYrK7C1IW19rPukhbGWK8jsUBfuaD2NzE=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzmbDAjJeZb1sCiByCdELgfSn1V1V7uCWtQNloPXhaQZU5sTsjr bZzo5iTDy0dhCWB6R900rFiIs48Jqtu2JBtU2yJ27JsMcNE/x5tiLCEeJnrt/+s= X-Google-Smtp-Source: AGHT+IFjWfGueG7DeWkg63IGIF3kssQUY3V3Yt1YYtp6Z+uW3KJqsSXoNAzX7zrD1vHGbOebgF05zQ== X-Received: by 2002:a17:907:3f9d:b0:a9a:1160:993 with SMTP id a640c23a62f3a-a9de5c91c9dmr860387966b.8.1730111180788; Mon, 28 Oct 2024 03:26:20 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:20 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Andrzej Hajda , Conor Dooley , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Krzysztof Kozlowski , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Rob Herring , Robert Foss , Simona Vetter , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 07/10] dt-bindings: bridge: samsung-dsim: add 'samsung, boot-on' property Date: Mon, 28 Oct 2024 11:25:30 +0100 Message-ID: <20241028102559.1451383-8-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The property states that the bridge controller has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- .../bindings/display/bridge/samsung,mipi-dsim.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml b/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml index 4ed7a799ba26..34cd93bc41f9 100644 --- a/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml +++ b/Documentation/devicetree/bindings/display/bridge/samsung,mipi-dsim.yaml @@ -132,6 +132,11 @@ properties: dependencies: lane-polarities: [data-lanes] + samsung,boot-on: + description: + The bridge has been initialized and left on by the bootloader/firmware. + type: boolean + required: - clock-names - clocks From patchwork Mon Oct 28 10:25:31 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853257 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C8857D13570 for ; Mon, 28 Oct 2024 10:26:35 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1E39910E46D; Mon, 28 Oct 2024 10:26:32 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="gSGrYXuy"; dkim-atps=neutral Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7102B10E45C for ; Mon, 28 Oct 2024 10:26:24 +0000 (UTC) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a9a0cee600aso535993266b.1 for ; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111183; x=1730715983; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=v0ceU2N4ZWu/FtoiewhZfxk5s76R6vPhrLuwGN01j9U=; b=gSGrYXuymmgJ+nYw2ZcI1XBkKcUwaMv+4CHkRlDhwV9ntgVKaahjBWpNmWkjyvDrWy pwGO9Jhw48Qdw2OJyOwFZ0jePRrijmclw+w/tvCAs5Qve+aGN55qvRyph1bftvOx11yV g5OyjQY/XFPNMxPvmCvM9QVvVHZKp1vHIRhXo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111183; x=1730715983; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v0ceU2N4ZWu/FtoiewhZfxk5s76R6vPhrLuwGN01j9U=; b=AZ6HcVMlaEp3o9zm0gGmxoxW/d9uU2XlsGT+3TvXM/ImcCerPBJm0mVfigKAzt3+o6 y/FGClxMF61cAfnpklsyq4oJMLJwzkVkMx9H74rVhJjTezCTUEH6vE6S3YglFZw9RWIx FVlllrfHeztlFafYhz8kRT6qP/aEO6cZRjxvXviy4m1MWZqeM/P9v8Mu1cbh/y8pzQAu ihQt9YhA4mH1AWM+Iy+AFQcxJXgKhehRfknKDqSCHdFj7nPpb5EdYrhtNSYvddgGUBg/ 2i808bfe7rKE6r9NkURSfkerVvEivrBYtzRcoJBJ8nhYqaLu2HYT2rvJdntMFbe2gO0c 5G8Q== X-Forwarded-Encrypted: i=1; AJvYcCUP6u76MpB0im185fWZvh22nWCJN/jPKOlkKWFWKENAFaVBVLTNXNwZsKa7XgHshlTIqGmDTtOEFQo=@lists.freedesktop.org X-Gm-Message-State: AOJu0YzPyMUIoXqhv/zUUXb42G7MN8UllRnxT1OOQZNinSypeIBj49jU wm8MH/r1mjpo1MuzncioPshfH50UqrkteH2B5ZSvUe8HOG8S6I8Gj70O1f8n/Q4= X-Google-Smtp-Source: AGHT+IGk1NWuOLicniG16PKOif/FXsp+NvuIf9J+Hupxj0+7LKo6e8MDUzZowWTysAuCxxUypwbw8A== X-Received: by 2002:a17:906:c105:b0:a9a:10c9:f4b8 with SMTP id a640c23a62f3a-a9de62eaf3dmr759573966b.61.1730111182612; Mon, 28 Oct 2024 03:26:22 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:22 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Michael Trimarchi , Andrzej Hajda , David Airlie , Inki Dae , Jagan Teki , Jernej Skrabec , Jonas Karlman , Laurent Pinchart , Maarten Lankhorst , Marek Szyprowski , Maxime Ripard , Neil Armstrong , Robert Foss , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [RFC PATCH 08/10] drm: bridge: samsung-dsim: don't re-activate the bridge if already setup Date: Mon, 28 Oct 2024 11:25:31 +0100 Message-ID: <20241028102559.1451383-9-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The patch does not re-execute the hardware initialization/activation procedure for the bridge 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: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/gpu/drm/bridge/samsung-dsim.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/samsung-dsim.c b/drivers/gpu/drm/bridge/samsung-dsim.c index 430f8adebf9c..7c03215bb004 100644 --- a/drivers/gpu/drm/bridge/samsung-dsim.c +++ b/drivers/gpu/drm/bridge/samsung-dsim.c @@ -1933,6 +1933,7 @@ int samsung_dsim_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; struct samsung_dsim *dsi; + bool initialized; int ret, i; dsi = devm_kzalloc(dev, sizeof(*dsi), GFP_KERNEL); @@ -2010,6 +2011,13 @@ int samsung_dsim_probe(struct platform_device *pdev) dsi->bridge.funcs = &samsung_dsim_bridge_funcs; dsi->bridge.of_node = dev->of_node; dsi->bridge.type = DRM_MODE_CONNECTOR_DSI; + initialized = of_property_read_bool(dev->of_node, "samsung,boot-on"); + if (initialized) { + dsi->state = DSIM_STATE_INITIALIZED | DSIM_STATE_ENABLED; + ret = pm_runtime_resume_and_get(dev); + if (ret) + goto err_disable_runtime; + } /* DE_LOW: i.MX8M Mini/Nano LCDIF-DSIM glue logic inverts HS/VS/DE */ if (dsi->plat_data->hw_type == DSIM_TYPE_IMX8MM) @@ -2020,11 +2028,14 @@ int samsung_dsim_probe(struct platform_device *pdev) if (dsi->plat_data->host_ops && dsi->plat_data->host_ops->register_host) { ret = dsi->plat_data->host_ops->register_host(dsi); if (ret) - goto err_disable_runtime; + goto err_put_runtime; } return 0; +err_put_runtime: + if (initialized) + pm_runtime_put_sync(dev); err_disable_runtime: pm_runtime_disable(dev); From patchwork Mon Oct 28 10:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853258 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F3951D13593 for ; Mon, 28 Oct 2024 10:26:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 02F4410E462; Mon, 28 Oct 2024 10:26:33 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="gsPuGcXp"; dkim-atps=neutral Received: from mail-ej1-f50.google.com (mail-ej1-f50.google.com [209.85.218.50]) by gabe.freedesktop.org (Postfix) with ESMTPS id DFF8410E136 for ; Mon, 28 Oct 2024 10:26:25 +0000 (UTC) Received: by mail-ej1-f50.google.com with SMTP id a640c23a62f3a-a9a1b71d7ffso625957166b.1 for ; Mon, 28 Oct 2024 03:26:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111184; x=1730715984; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=rR+lzb/We4vJpOJMhvb0fzb6ziPa4r87OMQDrQMxLAc=; b=gsPuGcXp6kPfV8iWmjrNWodlkfPg95DeLqz+CbkTXuwFxgboAedx6Smb44lRrOyyMt Ve2wC/63P2AvIzDmGhuiRa0GzEte3i8pufEJ66mkbtQhGyOQ5fcBXZuRdQU0RDvRwW8f RW0Hu8PsgIXtfoxQolTtQqolhKtPR05kNoIHw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111184; x=1730715984; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rR+lzb/We4vJpOJMhvb0fzb6ziPa4r87OMQDrQMxLAc=; b=j6Y23GDti4FN88aji1KnFy7S6/B+SodSSr7BGdav+2ulUYhg8M0IwLuSMfXQ2DY6ON EO/cQ0M4RtTLw9TW5n3WECqqE2vdWuORq09G/I296hlwP3jN5+yTv51OscXeX9lcNJTp 00CLeOrrAjHLN0f72sYU1GDjxxzFvPZj9WREFphkVaVSnFXhdw2AzQ+bzlXxY4m20uNv kI8RL7jtLlGrdIHhsFFCct9ckL2/vji68VIlBzXdgUgAeomM3TwdElH7QFv4qfKzgzJz cwuvhlAEnOHdsgNxojQw3dG+pofap7lHeFlikhtwtrwmuo+WicNt7XBqwArRf2UjLpla 4kkA== X-Forwarded-Encrypted: i=1; AJvYcCVuw3Agtzgxk0LAbFrQhL1nkgYKbLHsfyCFwW06rLSInAczUzdnGrSHCcSHvACwuZEqQz+ag0Kv47Q=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyfknnIth/DEGIBJe1L0LzRaAOvj5VmC6trDPfMAmyEP15ZzoVk N/YSiAJ7/vCMaVBEEib1GhFQ8lWKuRmHrwQFLBy1eruO5pTQVSwYaPZ4NjBtclk= X-Google-Smtp-Source: AGHT+IHAVYFMAgB+KAyZO87/7sx3tp0rbXix+BIz1smt6N19gM+Y6+v1PukMzpc/m5GRKmJHBaYyMg== X-Received: by 2002:a17:907:7e91:b0:a99:403e:2578 with SMTP id a640c23a62f3a-a9de5c91d04mr907125266b.5.1730111184145; Mon, 28 Oct 2024 03:26:24 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:23 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Conor Dooley , David Airlie , Krzysztof Kozlowski , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Rob Herring , Simona Vetter , Stefan Agner , Thomas Zimmermann , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: [RFC PATCH 09/10] dt-bindings: lcdif: add 'fsl,boot-on' property Date: Mon, 28 Oct 2024 11:25:32 +0100 Message-ID: <20241028102559.1451383-10-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The property states that the (e)LCDIF display controller has been initialized and left on by the bootloader. This information becomes relevant in the case of supporting the simple framebuffer. Signed-off-by: Dario Binacchi --- Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml index 8e3a98aeec32..937f108daacb 100644 --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml @@ -71,6 +71,11 @@ properties: $ref: /schemas/graph.yaml#/properties/port description: The LCDIF output port + fsl,boot-on: + description: | + The controller has been initialized and left on by the bootloader/firmware. + type: boolean + required: - compatible - reg From patchwork Mon Oct 28 10:25:33 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 13853259 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 947ABD13588 for ; Mon, 28 Oct 2024 10:26:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 412D810E459; Mon, 28 Oct 2024 10:26:48 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; unprotected) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="d87JvhaI"; dkim-atps=neutral Received: from mail-ej1-f54.google.com (mail-ej1-f54.google.com [209.85.218.54]) by gabe.freedesktop.org (Postfix) with ESMTPS id A1D6410E45C for ; Mon, 28 Oct 2024 10:26:27 +0000 (UTC) Received: by mail-ej1-f54.google.com with SMTP id a640c23a62f3a-a9a2cdc6f0cso558805166b.2 for ; Mon, 28 Oct 2024 03:26:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1730111186; x=1730715986; darn=lists.freedesktop.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aIDm7KBT1s0AbOc3yV3TQ9ohvs8sUqIvua5HhBI5V8A=; b=d87JvhaIK4ycF9Ro+0G5wQInl+JP3NMIbKmwFygiv2m2raSHdDyLlCIX/g6ZFOwT+X AWf81v8uYgH4qagmUQ/l9Kt13BmBBgPoZDW/SRPVfXWYPRJOpDLVzPHporu6Qjmw2b0C tMt/8a8x+x4U12LQClcf0Yz5FVKGd/kOBVpFA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730111186; x=1730715986; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=aIDm7KBT1s0AbOc3yV3TQ9ohvs8sUqIvua5HhBI5V8A=; b=iSG9Uj+dC43Lp+QtP5W4HQnRvd/4Rx4IOlMovVl9vXyLiHj7dUdce2VacQVLG+Y35N p38H22TzypTBGToDQKha/h0nZGpEdJZCu5WQArU2u6z96l8WzbYAsFwFLHwQOID6nfsw Xm0KcidWD7sSdNmyoHJFAy0rIqVY0879bG+3fYYD/rnKamaXTIo3Xu+yvJiu4HLAB516 voc74UPcenBY9qBULhIwJCJYz2WATHMc56faaq04qBV7E7naJcEsQZ4Mh49byoWHKSCh RwzA/XrNoPzOxheS0D9kKoCSDp6fJ4+MV8CWTidMWqnW9ZCaSnghbTUs+a5avxCDfD1T XQxA== X-Forwarded-Encrypted: i=1; AJvYcCVG7Zz1kp20uYXo5s7Er6l499r86D38aHs0OJLhWPTQEDBTtgiadz41/xh93CK5DBQN3Day5I4Z/ok=@lists.freedesktop.org X-Gm-Message-State: AOJu0YyF0KfF29NiTkbNW7QJrwuOT5f6quckM1k952cbHLRWbN+tffkA 588eebybCdcKpL8F9jm4mnbpbogtXtemdLKAjeGWHihmwY739NO18OgXkZ1XipA= X-Google-Smtp-Source: AGHT+IEA5nCg2j7DVomJoAqNLW+z2Nbv9V6XM3cl17RychbK0FRUPkeqVCDGC4TH9y5e5TfNamZx8g== X-Received: by 2002:a17:906:da8a:b0:a99:425c:c653 with SMTP id a640c23a62f3a-a9de5ce24f6mr866426966b.22.1730111185881; Mon, 28 Oct 2024 03:26:25 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.121]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9b1f297b04sm363613966b.134.2024.10.28.03.26.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 03:26:25 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , David Airlie , Fabio Estevam , Maarten Lankhorst , Marek Vasut , Maxime Ripard , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Simona Vetter , Stefan Agner , Thomas Zimmermann , dri-devel@lists.freedesktop.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Subject: [RFC PATCH 10/10] drm/mxsfb: stop controller and drain FIFOs if already initialized Date: Mon, 28 Oct 2024 11:25:33 +0100 Message-ID: <20241028102559.1451383-11-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> References: <20241028102559.1451383-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" You can't re-program the controller if it is still running. This may lead to shifted pictures, so stop the controller and drain its FIFOs in case it's already properly setup. This patch is crucial when supporting the simple framebuffer, as the controller has already been initialized by the bootloader. Signed-off-by: Dario Binacchi --- drivers/gpu/drm/mxsfb/mxsfb_drv.c | 3 +++ drivers/gpu/drm/mxsfb/mxsfb_drv.h | 1 + drivers/gpu/drm/mxsfb/mxsfb_kms.c | 14 +++++++++++++- 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c index cb5ce4e81fc7..38c94cdc8f6c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c @@ -10,6 +10,7 @@ #include #include +#include #include #include #include @@ -221,6 +222,8 @@ static int mxsfb_load(struct drm_device *drm, if (!mxsfb) return -ENOMEM; + mxsfb->enabled = + of_property_read_bool(drm->dev->of_node, "fsl,boot-on"); mxsfb->drm = drm; drm->dev_private = mxsfb; mxsfb->devdata = devdata; diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.h b/drivers/gpu/drm/mxsfb/mxsfb_drv.h index d160d921b25f..0f9ae4ce450c 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_drv.h +++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.h @@ -47,6 +47,7 @@ struct mxsfb_drm_private { struct drm_bridge *bridge; bool crc_active; + bool enabled; }; static inline struct mxsfb_drm_private * diff --git a/drivers/gpu/drm/mxsfb/mxsfb_kms.c b/drivers/gpu/drm/mxsfb/mxsfb_kms.c index 7ed2516b6de0..d064a2bb65df 100644 --- a/drivers/gpu/drm/mxsfb/mxsfb_kms.c +++ b/drivers/gpu/drm/mxsfb/mxsfb_kms.c @@ -202,9 +202,11 @@ static void mxsfb_enable_controller(struct mxsfb_drm_private *mxsfb) writel(reg, mxsfb->base + LCDC_CTRL1); writel(CTRL_RUN, mxsfb->base + LCDC_CTRL + REG_SET); + + mxsfb->enabled = true; } -static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +static void _mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) { u32 reg; @@ -221,6 +223,13 @@ static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) reg &= ~VDCTRL4_SYNC_SIGNALS_ON; writel(reg, mxsfb->base + LCDC_VDCTRL4); + mxsfb->enabled = false; +} + +static void mxsfb_disable_controller(struct mxsfb_drm_private *mxsfb) +{ + _mxsfb_disable_controller(mxsfb); + clk_disable_unprepare(mxsfb->clk); if (mxsfb->clk_disp_axi) clk_disable_unprepare(mxsfb->clk_disp_axi); @@ -354,6 +363,9 @@ static void mxsfb_crtc_atomic_enable(struct drm_crtc *crtc, u32 bus_format = 0; dma_addr_t dma_addr; + if (mxsfb->enabled) + _mxsfb_disable_controller(mxsfb); + pm_runtime_get_sync(drm->dev); mxsfb_enable_axi_clk(mxsfb);