From patchwork Tue Nov 24 12:44:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomi Valkeinen X-Patchwork-Id: 11928429 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.0 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_CR_TRAILER,INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3F18EC64E7B for ; Tue, 24 Nov 2020 12:47:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D259F2073C for ; Tue, 24 Nov 2020 12:47:02 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=ti.com header.i=@ti.com header.b="nVxjbbcO" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387650AbgKXMqh (ORCPT ); Tue, 24 Nov 2020 07:46:37 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:39576 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732512AbgKXMqg (ORCPT ); Tue, 24 Nov 2020 07:46:36 -0500 Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 0AOCkSbE032237; Tue, 24 Nov 2020 06:46:28 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1606221988; bh=97cgO+BtwIXSBur+Geqwge83JKNBJQRUKKBPWnX0XFk=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=nVxjbbcO5V9mVZsRTFpPRxsbuTj6CLgoXWzdW4il5nSjuHrM16/1YPc2bSbQ0xNrS Q3O4R7eAHQcRLYY7nEjxYrrXQSXRzM6ptOVs39n7Bifrw83EdkXoUQwS1ByfgCtMrP gZZADODcSNXTCxuE2bckHLSqFM/592U6tnvS83q0= Received: from DFLE103.ent.ti.com (dfle103.ent.ti.com [10.64.6.24]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 0AOCkSNs045026 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 24 Nov 2020 06:46:28 -0600 Received: from DFLE108.ent.ti.com (10.64.6.29) by DFLE103.ent.ti.com (10.64.6.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Tue, 24 Nov 2020 06:46:28 -0600 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE108.ent.ti.com (10.64.6.29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Tue, 24 Nov 2020 06:46:28 -0600 Received: from deskari.lan (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 0AOCjmp4040922; Tue, 24 Nov 2020 06:46:26 -0600 From: Tomi Valkeinen To: Sebastian Reichel , Laurent Pinchart , Nikhil Devshatwar , , CC: Sekhar Nori , Tony Lindgren , , Sebastian Reichel , Tomi Valkeinen Subject: [PATCH v4 15/80] drm/omap: panel-dsi-cm: drop hardcoded VC Date: Tue, 24 Nov 2020 14:44:33 +0200 Message-ID: <20201124124538.660710-16-tomi.valkeinen@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20201124124538.660710-1-tomi.valkeinen@ti.com> References: <20201124124538.660710-1-tomi.valkeinen@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From: Sebastian Reichel Use dsi->channel everywhere, which originates from DT. Signed-off-by: Sebastian Reichel Signed-off-by: Tomi Valkeinen Reviewed-by: Laurent Pinchart --- .../gpu/drm/omapdrm/displays/panel-dsi-cm.c | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c index 0a8f289176ab..d7d27757b9ae 100644 --- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c +++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c @@ -27,9 +27,6 @@ #include "../dss/omapdss.h" -/* DSI Virtual channel. Hardcoded for now. */ -#define TCH 0 - #define DCS_READ_NUM_ERRORS 0x05 #define DCS_BRIGHTNESS 0x51 #define DCS_CTRL_DISPLAY 0x53 @@ -73,7 +70,6 @@ struct panel_drv_data { bool te_enabled; atomic_t do_update; - int channel; struct delayed_work te_timeout_work; @@ -274,7 +270,7 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata) return 0; src->ops->enable(src); - src->ops->dsi.enable_hs(src, ddata->channel, true); + src->ops->dsi.enable_hs(src, ddata->dsi->channel, true); r = _dsicm_enable_te(ddata, true); if (r) { @@ -591,7 +587,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) dsicm_hw_reset(ddata); - src->ops->dsi.enable_hs(src, ddata->channel, false); + src->ops->dsi.enable_hs(src, ddata->dsi->channel, false); r = dsicm_sleep_out(ddata); if (r) @@ -622,7 +618,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) if (r) goto err; - r = src->ops->dsi.enable_video_output(src, ddata->channel); + r = src->ops->dsi.enable_video_output(src, ddata->dsi->channel); if (r) goto err; @@ -634,7 +630,7 @@ static int dsicm_power_on(struct panel_drv_data *ddata) ddata->intro_printed = true; } - src->ops->dsi.enable_hs(src, ddata->channel, true); + src->ops->dsi.enable_hs(src, ddata->dsi->channel, true); return 0; err: @@ -658,7 +654,7 @@ static void dsicm_power_off(struct panel_drv_data *ddata) struct omap_dss_device *src = ddata->src; int r; - src->ops->dsi.disable_video_output(src, ddata->channel); + src->ops->dsi.disable_video_output(src, ddata->dsi->channel); r = mipi_dsi_dcs_set_display_off(ddata->dsi); if (!r) @@ -777,7 +773,7 @@ static irqreturn_t dsicm_te_isr(int irq, void *data) if (old) { cancel_delayed_work(&ddata->te_timeout_work); - r = src->ops->dsi.update(src, ddata->channel, dsicm_framedone_cb, + r = src->ops->dsi.update(src, ddata->dsi->channel, dsicm_framedone_cb, ddata); if (r) goto err; @@ -834,7 +830,7 @@ static int dsicm_update(struct omap_dss_device *dssdev, msecs_to_jiffies(250)); atomic_set(&ddata->do_update, 1); } else { - r = src->ops->dsi.update(src, ddata->channel, dsicm_framedone_cb, + r = src->ops->dsi.update(src, ddata->dsi->channel, dsicm_framedone_cb, ddata); if (r) goto err; @@ -1110,8 +1106,6 @@ static int dsicm_probe_of(struct mipi_dsi_device *dsi) struct display_timing timing; int err; - ddata->channel = TCH; - ddata->reset_gpio = devm_gpiod_get(&dsi->dev, "reset", GPIOD_OUT_LOW); if (IS_ERR(ddata->reset_gpio)) { err = PTR_ERR(ddata->reset_gpio);