From patchwork Fri Jun 24 18:19:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12894998 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 53BF3C43334 for ; Fri, 24 Jun 2022 18:19:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 76A5D10E346; Fri, 24 Jun 2022 18:19:16 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4056D10E346 for ; Fri, 24 Jun 2022 18:19:15 +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 A696384392; Fri, 24 Jun 2022 20:19:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1656094753; bh=RsOIVnN+Cmq01aUAaEDEhAAHvOWnTjbmRz/BwHMDZrM=; h=From:To:Cc:Subject:Date:From; b=frjylKsVe83Li8gUbvaTxOg9PjGHbu+JN+t4PbrmdFH2/i/3li+SiEeEmwPbW8rbD yh60zFG+SF3Sn5txd7JqRIeIbLON9sDWdFrQgBfAf/PqHTioDI0VQbplwv+6kt4cqR vtpnWemmf3k4olI+MKdarKOWf02HIh80JJGH40zYXtloTfZ6VqZtoUTFpsWgMKf26g DM3Rw1eiQDbS3jnW/fTRsssXl9nhY3IpMvRe8ahy39YJBq/iRO6e5NTJBpuyYzwz+H dr7nN7SjWK07dofvdHMFbnbSZCOqZbApQ6161TLNchgwUUUPjBQuRRORIKDoHggeKj DhNo0DE2BFqEg== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/bridge: tc358767: Do not cache dsi_lanes twice Date: Fri, 24 Jun 2022 20:19:02 +0200 Message-Id: <20220624181902.151959-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.6 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 Reviewed-by: Neil Armstrong --- 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 e4dd4f05f94b3..44f32bf483c51 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; @@ -1261,7 +1260,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); @@ -1909,8 +1908,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;