From patchwork Wed Mar 29 13:16:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jagan Teki X-Patchwork-Id: 13192414 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 3CD73C74A5B for ; Wed, 29 Mar 2023 13:19:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=fNxCUDJvCaxnFpGckwzeyaa7S0enpG196Frjht8qL54=; b=V8VlT6Meckmf8Z SkQgCsAwhsGZj83DIs1rdwkQ/0/7zB92o2An4Bzxyl84mDg831pWYoQHTOqihCFVPcpb4IodbpSHO orEyok3bbVObtA1W0imVSlqoe1v5J+v5ezVL1gA8TI0ICeHNHPM0OHigVmGqO9eMlMmv5swkRuCvn qXoFKEEMqhXmr5+bRnnGKBfcCtWF2rDBebod4y5iVATtM3s+0QelrXt7IyhXIxdaigirTrQPVhy/T CCEK4fMrijnD/3A4TjpwdwEbzNkiJXXt6SyKGuSNH0LG+JP/iST5NaCl6a8d4ezzL7yoYVizTMuCE V8ub6Qm6fD6+2lKXLxMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1phVh9-000Jqh-0Y; Wed, 29 Mar 2023 13:18:31 +0000 Received: from mail-pl1-x62f.google.com ([2607:f8b0:4864:20::62f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1phVgr-000JbB-2n for linux-arm-kernel@lists.infradead.org; Wed, 29 Mar 2023 13:18:15 +0000 Received: by mail-pl1-x62f.google.com with SMTP id ja10so14880025plb.5 for ; Wed, 29 Mar 2023 06:18:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1680095892; 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=d+PX9J3U7p5qZlBeWmtYaZVahtk7x+bKgv0zxDQ5NKg=; b=pNuu1Gkcpj7ou0/NxyX2OGB7HOgjlkfVVree1zpId6rRDygggKC/Odx+8t6UQxJCSH 3K+nqLT4ETFZW5uFx2XJALuvcQQIRVGsHyk4MfHSsUCru8tigfcYVsv3aZkd0DLlIYg3 n2HCEBT3mtN4hni20h9YKd5wzUcRPY5DNSsVU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680095892; 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=d+PX9J3U7p5qZlBeWmtYaZVahtk7x+bKgv0zxDQ5NKg=; b=2TnFZaFafMRIDGFJbaZDsS56ZKjbIxixD5lEpVriPq09i51o6XffNDHSxyQnkLnr0C 7xctjJkiTDkLGpJVNpgLLPUBgX1FNA8vXtH/FjLI2TkW+bisHPMcGYj4MLpL0fCFiaGo RChbHHU+LmYkFIUZO9oc9esMJdIA1Z2UJyLltF1h47t0aZwvn4b7LT76yrjQXMcA8/5W APhjDghtktejZ9I4iaDv6FB3fvEFnRsMphuEBlzZbg6UqeVtAYu/iX+cYPOeaYYZ0zqt IX4DA4NwTFISPGwqIYesdlMlCJb9ACGcD6TM9f2VAukW1AqIpgbigAGMeyX8tD6yr52D kO/A== X-Gm-Message-State: AAQBX9dSK87jlRogLPFyBJsGTq+/4OehHUTQ37L0ilqE/ywdnf37rho5 YNQJonpN5gFww/e0nIhgeO2VhA== X-Google-Smtp-Source: AKy350bokE1By8nbjH4J86bI+d67CKIP38qBgLKevOIo/+cgjC0kVbu1W/gnjsNm0Xt8H7dXZUIQzg== X-Received: by 2002:a17:90b:3b44:b0:23b:50ff:59ba with SMTP id ot4-20020a17090b3b4400b0023b50ff59bamr19952654pjb.21.1680095892216; Wed, 29 Mar 2023 06:18:12 -0700 (PDT) Received: from localhost.localdomain ([2405:201:c00a:a047:206d:4722:c4fa:e845]) by smtp.gmail.com with ESMTPSA id s16-20020a17090b071000b0023f5c867f82sm1400192pjz.41.2023.03.29.06.18.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 06:18:11 -0700 (PDT) From: Jagan Teki To: Dave Stevenson , Maxime Ripard , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter , Andrzej Hajda , Neil Armstrong , Robert Foss , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Sam Ravnborg , Rob Herring , Krzysztof Kozlowski Cc: linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Marek Vasut , linux-amarula , Jagan Teki Subject: [PATCH v7 04/12] drm: panel: sitronix-st7701: Enable prepare_prev_first for ts8550b Date: Wed, 29 Mar 2023 18:46:10 +0530 Message-Id: <20230329131615.1328366-5-jagan@amarulasolutions.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230329131615.1328366-1-jagan@amarulasolutions.com> References: <20230329131615.1328366-1-jagan@amarulasolutions.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230329_061813_909908_91D27706 X-CRM114-Status: GOOD ( 14.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Enable the drm panel prepare_prev_first flag for ts8550b panel so-that the previous controller should be prepared first before the prepare for the panel is called.     This makes sure that the previous controller(sun6i-mipi-dsi), likely to be a DSI host controller should be initialized to LP-11 before the panel is powered up. Signed-off-by: Jagan Teki --- Changes for v7: - new patch drivers/gpu/drm/panel/panel-sitronix-st7701.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index 7eae83aa0ea1..dc7677412023 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -105,6 +105,7 @@ struct st7701_panel_desc { unsigned int lanes; enum mipi_dsi_pixel_format format; unsigned int panel_sleep_delay; + bool prepare_prev_first; /* TFT matrix driver configuration, panel specific. */ const u8 pv_gamma[16]; /* Positive voltage gamma control */ @@ -564,6 +565,7 @@ static const struct st7701_panel_desc ts8550b_desc = { .lanes = 2, .format = MIPI_DSI_FMT_RGB888, .panel_sleep_delay = 80, /* panel need extra 80ms for sleep out cmd */ + .prepare_prev_first = true, .pv_gamma = { CFIELD_PREP(DSI_CMD2_BK0_GAMCTRL_AJ_MASK, 0) | @@ -875,6 +877,7 @@ static int st7701_dsi_probe(struct mipi_dsi_device *dsi) drm_panel_init(&st7701->panel, &dsi->dev, &st7701_funcs, DRM_MODE_CONNECTOR_DSI); + st7701->panel.prepare_prev_first = desc->prepare_prev_first; /** * Once sleep out has been issued, ST7701 IC required to wait 120ms