From patchwork Wed Sep 11 15:10:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3454 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 7AC814354D for ; Wed, 11 Sep 2024 17:11:06 +0200 (CEST) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-42cb0b0514bsf36709435e9.1 for ; Wed, 11 Sep 2024 08:11:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1726067466; cv=pass; d=google.com; s=arc-20240605; b=glN15aZgZEtnGtb3EkSeEvvDNEHBag90iPNF6YLrV0Rwxt+z7pFIhkDZ2PWpdLptca OZOBZa/DWsoxCnMFbPv5uk7wagYNa0nTnblngFfcHTMDkb75IOtn3brddzzGjdJicM9O sz+BXqVyq4xrFsuMt86h6rwGZUJhJjPG+xClbSf4R6eq+waYp+Kdb4lD8yE4Z2pJOltx QTaCvjpg69vgWC+MwR3xNNgrZpy+/pLJ6lm3WOPinkKMbMH9sMly7jtT8x06GJmsRxsX Dz4azxjQOKqfig0ES30XlSxw6vTdhdzlkn38YkDiFhAYyHntxVHA3PemXu87qXkf8+2p HMJw== 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=DjOKZ9vyLpv5X/MDfj5W4v4VrilDVZDK5DqqEBkpcPk=; fh=044EVVmxQN2hd8Uw1bloaPxcoEjxUqjOyJBhV/y1p0c=; b=iT5xEAiUoauN+PD46B5a1PAsbvLNshZ0pLxbXM1Xclj/7AlhKRv/nqhnO/Ckvb+KuF qlVwFc+kJZYeDQpcZYRud7SaU3RYlo0oSk/ZNduLGsfeBVFKa2zRV5dLGWS0jJc0o1zs vKzQlkKXXTwj5veC9xHYQFQqNgKnb0/GU81FW6RgKxQ+XF2QLy8K+YSnd8FldC88y83x WgpT9yBGGXjyrl94eGDIDanOg6/DDiplH+/7j47OBctrpeBGr7C9XI2VbLWWkfmrCMlO Ityt4ZlkeS1oi0OuDlo+QFrcNe4rume4jx8a9FEbusSL/ChFnJ1NIraetcQGo86GHDJX hRGQ==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NfaJot5g; 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=1726067466; x=1726672266; 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=DjOKZ9vyLpv5X/MDfj5W4v4VrilDVZDK5DqqEBkpcPk=; b=CFlL+kp0Jjsg5Fw+aUhp8J0XtsS4VayqlCjWKDsmbQsaG/GpfUy0vaPpeLfMIX7Ywq tp56iuiOQaAh963q3Z5sz6Uz8EmDRXLJyHM+OX3EXpA3GtYIDfiz4U2nsidabYjEXquI LZhr89rqC8SLPleiGHwx72uCQCtgXLm4bzKxc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726067466; x=1726672266; 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=DjOKZ9vyLpv5X/MDfj5W4v4VrilDVZDK5DqqEBkpcPk=; b=dWlOakL5u52u9jEoHN3JzHyMa31sEh70g4LvbBv0CJjb11baFXu+GIvEkuo1RclIpD 7TzvLDH05zBZNSUfAEJKg5dkWkPPJESzdqKshY9qTYWzeD29pCifJLTgOY8k+78pb2K4 /wp2+i3Whjct+v2FXDvgtQosqwGeg8i/eTOm6/K+O7G9fhYTnsNW/A+FoxUevXZGXrfv GtcIzcPuYGa03UElt80zbamD70cp4lbiQfpdnENLC4LjgyYcVj3cpvwSr/FfwDDka11g QDbf/AhIplJsAMVGv1IPULA7AnGvcgOl9fDsP+MniOkfZHffunqpk11jRuXHzutb9qDu FCKQ== X-Forwarded-Encrypted: i=2; AJvYcCUnsF7VgGKw+zrcfQnigL2wmsVVJZL/Rm6Km9bnvLOWLYzw9y2/z7FrOxD3MKUXnNJ6EIRWiNmCWsN/Q8HB@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YxnQT3W1WQIk7/ErhpFbQXyyevWWa6gb4GLIQL6t7V1wBbESN14 os596TdfaCrmCORJt3dEeHqfFncM9qgAO3mRdFoHivDz3goN8a6MeVgwLGQxRgEbHw== X-Google-Smtp-Source: AGHT+IE9+PkTZF1bmUyLZ94pWB1EinpxZLzd38H0MZuwZC8E1n2i05UEoB9XKIIjPSnZ2Ssi74T31Q== X-Received: by 2002:a05:600c:4ec9:b0:42c:af06:703 with SMTP id 5b1f17b1804b1-42caf060a7cmr115995275e9.31.1726067466057; Wed, 11 Sep 2024 08:11:06 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a05:600c:2d03:b0:42c:ad31:3854 with SMTP id 5b1f17b1804b1-42cad313adcls18241605e9.0.-pod-prod-09-eu; Wed, 11 Sep 2024 08:11:04 -0700 (PDT) X-Received: by 2002:a05:600c:4f8a:b0:42c:cd88:d0f4 with SMTP id 5b1f17b1804b1-42ccd88d30emr29889265e9.22.1726067464548; Wed, 11 Sep 2024 08:11:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1726067464; cv=none; d=google.com; s=arc-20160816; b=K9qefLylxAQU7ttRUSmDawMuVFkDNpCm+kwqY7QNWAd6kKqSbIrAd5t4smn8hTxgrs 5HcYILrQErd0IdhFCxgrLCGHojdlv2YdlG/J6tQFLEhTroHfMYa9CMEe41UVoU8aK7To IH5qoMEphe14T9w6B8swiN3B3ks6OoGeHFxH0zDI2utH0WYP3B9esLUqIlTWkDYuw3ZS JLdNjNlbHMyFdPNjbcgt4ri4b5YWwutKRRCFNRariKzDomT8jemzDVCulejIENJd/Wm9 MSO+X49LYayBJk6zAVQIrnwNzs0zZwkxqGrWqZwYJO3RnNkERe+B59egCpHopmNwkpPE 67XQ== 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=K3ZlEaLv20JF4KYXi9FV/6iNqYvymJIuA7pyrzR+jKE=; fh=FtQepR0uNoeKT2PVdKfTKOkvEYfwbRmoVE9BmlYw3tk=; b=eJfLFLK3tQbRZvb9fjRI2QEu+xVcrAjD8ksGWAbnqnKyq8pnx3zQKDhS3x+kjvXliI HYkt9zN6RGOJtoxNvvkLTXMpMZmZ+lJyNSR7hddTH7LudFCC/dRUJPWRaSg+RObVLDs1 v56u7fbPOENtQsH8dhDWXC1U+L/IwFRcyoi21B1lpC7/9xBF+c9HGx3aZeDjQft+JO7q +86b25+Ctk3tjzm2ogFdWrOl2ERaM7+dnYqSuh7dOh4/2O3MufZ7lk3ISx7YVNv30zR/ xEyO8Kb+o+9QwE0QPVKlx/KWQjqobKZMlPCz77jkGcU2G/++pg+wcntf9YhmYrZdp/W0 zruw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=NfaJot5g; 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-42caf2ab4d6sor39548335e9.2.2024.09.11.08.11.04 for (Google Transport Security); Wed, 11 Sep 2024 08:11:04 -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:1ca0:b0:42c:b995:2100 with SMTP id 5b1f17b1804b1-42cb99524bcmr72507865e9.6.1726067463827; Wed, 11 Sep 2024 08:11:03 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.amarulasolutions.com ([2.196.41.3]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-42cb116f44esm137688375e9.45.2024.09.11.08.11.03 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 11 Sep 2024 08:11:03 -0700 (PDT) From: Dario Binacchi To: linux-amarula@amarulasolutions.com Subject: [PATCH v2 24/27] video: bridge: samsung: support simple frame-buffer Date: Wed, 11 Sep 2024 17:10:36 +0200 Message-ID: <20240911151039.2914886-24-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240911151039.2914886-1-dario.binacchi@amarulasolutions.com> References: <20240911151039.2914886-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=NfaJot5g; 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: , If you want to pass the frame-buffer to the kernel, the video output is initialized by U-Boot, and kept by the kernel. The patch does not turn off the power domains or disable the peripheral if you want to support such feature. Co-Developed-by: Michael Trimarchi Signed-off-by: Michael Trimarchi Signed-off-by: Dario Binacchi --- drivers/video/bridge/samsung-dsi-host.c | 9 +++++++++ drivers/video/bridge/samsung-dsim.c | 3 +++ 2 files changed, 12 insertions(+) diff --git a/drivers/video/bridge/samsung-dsi-host.c b/drivers/video/bridge/samsung-dsi-host.c index dd3e33c4edc7..2d0e8f71a756 100644 --- a/drivers/video/bridge/samsung-dsi-host.c +++ b/drivers/video/bridge/samsung-dsi-host.c @@ -1281,6 +1281,7 @@ static void samsung_dsi_set_standby(struct samsung_dsi *dsim, bool standby) samsung_dsim_write(dsim, DSIM_MDRESOL_REG, mdresol); } +#if (!IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB)) static void samsung_dsi_disable_clock(struct samsung_dsi *dsim) { u32 reg; @@ -1294,6 +1295,7 @@ static void samsung_dsi_disable_clock(struct samsung_dsi *dsim) reg &= ~DSIM_PLL_EN; samsung_dsim_write(dsim, DSIM_PLLCTRL_REG, reg); } +#endif static inline struct samsung_dsi *host_to_dsi(struct mipi_dsi_host *host) { @@ -1515,6 +1517,12 @@ static int samsung_dsi_enable(struct udevice *dev) return 0; } +#if IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB) +static int samsung_dsi_disable(struct udevice *dev) +{ + return 0; +} +#else static int samsung_dsi_disable(struct udevice *dev) { u32 intsrc; @@ -1532,6 +1540,7 @@ static int samsung_dsi_disable(struct udevice *dev) return 0; } +#endif struct dsi_host_ops samsung_dsi_ops = { .init = samsung_dsi_init, diff --git a/drivers/video/bridge/samsung-dsim.c b/drivers/video/bridge/samsung-dsim.c index 986f1d830844..6e5a12218315 100644 --- a/drivers/video/bridge/samsung-dsim.c +++ b/drivers/video/bridge/samsung-dsim.c @@ -144,5 +144,8 @@ U_BOOT_DRIVER(samsung_dsim) = { .remove = samsung_dsim_remove, .probe = samsung_dsim_probe, .ops = &samsung_dsim_ops, +#if IS_ENABLED(CONFIG_VIDEO_DT_SIMPLEFB) + .flags = DM_FLAG_LEAVE_PD_ON, +#endif .priv_auto = sizeof(struct samsung_dsim_priv), };