From patchwork Thu May 19 11:24:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12854804 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 33F53C433EF for ; Thu, 19 May 2022 11:24:26 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4D209113DF3; Thu, 19 May 2022 11:24:25 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id 47966113DF3 for ; Thu, 19 May 2022 11:24:23 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 4100083C01; Thu, 19 May 2022 13:24:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1652959461; bh=uaNvpC8BHid5eFjZpAYzgbiNezSp7mj8t+rTmIOLrLU=; h=From:To:Cc:Subject:Date:From; b=u41mgby9EH8DQdb3daqhyXzAE6bN2OscM+0w6RqggK67JUIuRc60R/iDz2sEep5sF USNolD6nLhwQofw9DvLNuz+mv2f8I0SRcKTZuL1IheGl/c8wtq+LablB7VlaJEr5Wl /HtSPCmOFf7eviPXuAjGVn0E/l9usV2E4WbgpbfmIDnjGBpJBGcUJaArVmvaWZ1uVO w5n60NwCP11uILZFbeIDCiMrEMMPPQZ5gKA2MD/Luga3C0kyWAQVlD2BNESvsNLrAD 3ddVpOoniOLI9cHiXyvDGZdEY+ZMrzxuGdckRL5VuiYnd2lEV1v+54H2BEcv/5QclG DzVTA1br6jW1A== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/bridge: tc358767: Do not cache dsi_lanes twice Date: Thu, 19 May 2022 13:24:09 +0200 Message-Id: <20220519112409.62223-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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: , Cc: Marek Vasut , Laurent Pinchart , robert.foss@linaro.org, Maxime Ripard , Andrzej Hajda , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The DSI lane count can be accessed via the dsi device pointer, make use of that. No functional change. Signed-off-by: Marek Vasut Cc: Andrzej Hajda Cc: Laurent Pinchart Cc: Lucas Stach Cc: Maxime Ripard Cc: Robert Foss Cc: Sam Ravnborg --- drivers/gpu/drm/bridge/tc358767.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 5e0de9974143c..8e210b1176906 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -288,7 +288,6 @@ struct tc_data { struct drm_connector connector; struct mipi_dsi_device *dsi; - u8 dsi_lanes; /* link settings */ struct tc_edp_link link; @@ -1264,7 +1263,7 @@ static int tc_dsi_rx_enable(struct tc_data *tc) regmap_write(tc->regmap, PPI_TX_RX_TA, TTA_GET | TTA_SURE); regmap_write(tc->regmap, PPI_LPTXTIMECNT, LPX_PERIOD); - value = ((LANEENABLE_L0EN << tc->dsi_lanes) - LANEENABLE_L0EN) | + value = ((LANEENABLE_L0EN << tc->dsi->lanes) - LANEENABLE_L0EN) | LANEENABLE_CLEN; regmap_write(tc->regmap, PPI_LANEENABLE, value); regmap_write(tc->regmap, DSI_LANEENABLE, value); @@ -1912,8 +1911,7 @@ static int tc_mipi_dsi_host_attach(struct tc_data *tc) tc->dsi = dsi; - tc->dsi_lanes = dsi_lanes; - dsi->lanes = tc->dsi_lanes; + dsi->lanes = dsi_lanes; dsi->format = MIPI_DSI_FMT_RGB888; dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE;