Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2149098rwb; Sat, 19 Nov 2022 09:47:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf6ZceuI5N5mcXG/hvkCNIj7ZjSwsLlWzWfjdLI9r12I6Xe3Qsr1DBe4fmadabCB5FHkLLO3 X-Received: by 2002:a63:5b54:0:b0:476:c490:67e2 with SMTP id l20-20020a635b54000000b00476c49067e2mr1707171pgm.552.1668880029828; Sat, 19 Nov 2022 09:47:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668880029; cv=none; d=google.com; s=arc-20160816; b=Mz60hx0TMp25s5XXH2si9Ilc+N42cNiB4MRMbMfDNJ5fAazCpSfAeg1laLbNcutH5p GOV2nw0pqfvRQYA0xik8dbxIHOVRc8fiHycO6RsZZ3MFek4tSV4Tki6Kjak95fK4MBpN 0dDfftolj+LezDC1N4sQgQ+Mv8IPX53/FucKSBPA9c+n775EEuchpd/mDb7S0PMhcdRm fkuHz7mTYzQGfEOk954Zhx0Z04Z/zh6XVTA5k/QZtudeJKkZrTltTwbrl/JK4aGalbaS RKL1mtTELXq6bb8hRi0dQXxnD/TauuJjye3FkNNjwZjw4KvJtfdWmQAeU/wUVF2QFKle nOnw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=vVyXYYrGImgHeS2T8n3G25Um5AWctifrL3oyuh/mSDc=; b=gA+XY8w1euH7pN1lCUMFiLEy89WBlV6mYbeps+j/vlIeN3L0GPbR3c8PCWQfPTs5o0 uAX3f+pr+9PI3pNpMu8QTI4kSV+W+DSKQqx/aOU57aNxQNZyfmQLOQhaUUIXHrPcKHQY BDXo4XMUZ0UAcBdpg+AwAjedQSWjByk0HdxGyJSaSUjkaWi1Xu4jpBw8jBmWhz/zns6b 6qh70WLYHHmkWaXfkixjRXf1GFumERjAjr86HIAD3U1730kqkOiOhVF6mHZ/SsTKYtZ6 TF1RpGj7fyaWBMTvjUjmCsW7H0TaucvNJxa1jE4BgQhntonwUvp1YwtvukSjfPZCdZjr sRLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GJ+wrrwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a170902b58b00b001871dab2d85si6175146pls.392.2022.11.19.09.46.58; Sat, 19 Nov 2022 09:47:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=GJ+wrrwe; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234789AbiKSRbT (ORCPT + 90 others); Sat, 19 Nov 2022 12:31:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44848 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234808AbiKSRbH (ORCPT ); Sat, 19 Nov 2022 12:31:07 -0500 Received: from fllv0015.ext.ti.com (fllv0015.ext.ti.com [198.47.19.141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53EF117418; Sat, 19 Nov 2022 09:30:52 -0800 (PST) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 2AJHUTve061516; Sat, 19 Nov 2022 11:30:29 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1668879029; bh=vVyXYYrGImgHeS2T8n3G25Um5AWctifrL3oyuh/mSDc=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=GJ+wrrwetsff4R+KTE0HJL2jdG7gnA0nVglka44gRUv7X7F6/DdACyOTHLs+zHTtQ C6TO1Z+QcXFEEenLLbTuwywpv8v7YYJvx+iszoXQT3HROcQri4+aWUTCR1bbbC53XT hbOXnYbQjWhJx/oEWri+IrwMAKXv+QOHA5B4RawU= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 2AJHUSXg011392 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Sat, 19 Nov 2022 11:30:29 -0600 Received: from DLEE102.ent.ti.com (157.170.170.32) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16; Sat, 19 Nov 2022 11:30:28 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE102.ent.ti.com (157.170.170.32) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.16 via Frontend Transport; Sat, 19 Nov 2022 11:30:28 -0600 Received: from localhost (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id 2AJHUROB055715; Sat, 19 Nov 2022 11:30:28 -0600 From: Aradhya Bhatia To: Tomi Valkeinen , Jyri Sarha , Rob Herring , David Airlie , Daniel Vetter , Krzysztof Kozlowski CC: DRI Development List , Devicetree List , Linux Kernel List , Nishanth Menon , Vignesh Raghavendra , Rahul T R , Devarsh Thakkar , Jayesh Choudhary , Aradhya Bhatia Subject: [PATCH v6 5/5] drm/tidss: Enable Dual and Duplicate Modes for OLDI Date: Sat, 19 Nov 2022 23:00:19 +0530 Message-ID: <20221119173019.15643-6-a-bhatia1@ti.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221119173019.15643-1-a-bhatia1@ti.com> References: <20221119173019.15643-1-a-bhatia1@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The AM625 DSS IP contains 2 OLDI TXes which can work together to enable 2 cloned displays of or even a single dual-link display with higher resolutions like WUXGA (1920x1200@60fps) with a reduced OLDI clock frequency. Configure the necessary register to enable and disable the OLDI TXes with required modes configurations. Signed-off-by: Aradhya Bhatia --- drivers/gpu/drm/tidss/tidss_dispc.c | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tidss/tidss_dispc.c b/drivers/gpu/drm/tidss/tidss_dispc.c index f26129fb1d8f..cf43de6216a5 100644 --- a/drivers/gpu/drm/tidss/tidss_dispc.c +++ b/drivers/gpu/drm/tidss/tidss_dispc.c @@ -1012,8 +1012,8 @@ static void dispc_enable_oldi(struct dispc_device *dispc, u32 hw_videoport, int count = 0; /* - * For the moment DUALMODESYNC, MASTERSLAVE, MODE, and SRC - * bits of DISPC_VP_DSS_OLDI_CFG are set statically to 0. + * For the moment MASTERSLAVE, and SRC bits of DISPC_VP_DSS_OLDI_CFG are + * always set to 0. */ if (fmt->data_width == 24) @@ -1030,6 +1030,26 @@ static void dispc_enable_oldi(struct dispc_device *dispc, u32 hw_videoport, oldi_cfg |= BIT(0); /* ENABLE */ + switch (dispc->oldi_mode) { + case OLDI_SINGLE_LINK_SINGLE_MODE: + /* All configuration is done for this mode. */ + break; + + case OLDI_SINGLE_LINK_CLONE_MODE: + oldi_cfg |= BIT(5); /* CLONE MODE */ + break; + + case OLDI_DUAL_LINK_MODE: + oldi_cfg |= BIT(11); /* DUALMODESYNC */ + oldi_cfg |= BIT(3); /* data-mapping field also indicates dual-link mode */ + break; + + default: + dev_warn(dispc->dev, "%s: Incorrect oldi mode. Returning.\n", + __func__); + return; + } + dispc_vp_write(dispc, hw_videoport, DISPC_VP_DSS_OLDI_CFG, oldi_cfg); while (!(oldi_reset_bit & dispc_read(dispc, DSS_SYSSTATUS)) && -- 2.38.1