Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp451364lqp; Tue, 11 Jun 2024 09:04:05 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVhEIiMXrcMvumZ7OmrCZeXJb0atXRsTkJwoqv4mOdGjoepD3RoLjoznl6to3rezw3dTrxsYGQNHiyqo8inmkUCvHRAZxVfPOsHFeQuHw== X-Google-Smtp-Source: AGHT+IFxJwKwP4sbe8UlgYAZORIdeqj2wWqt4yaRDmTRqLS2rkztv3Hdh+q40V6lxn1Pq8che3GC X-Received: by 2002:a50:9ea5:0:b0:57c:7396:4b48 with SMTP id 4fb4d7f45d1cf-57c73964b91mr5326150a12.24.1718121845331; Tue, 11 Jun 2024 09:04:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718121845; cv=pass; d=google.com; s=arc-20160816; b=rF+C9Fz7d1BmwlKgXE4qvm7PzRyNZvT8Ygi+LJnyKVsQNabDJ/BkevFGE9nhtIZM3T b8pp2MvNvjWl6sDeOFmvCW4845//EMCRn5GKwWP6O5Webm6AUxcs8Almoru1MBDT7OGw bdHBPWZvpzn9e9eSOVgDvGRrzlfRRGtcUSm403kckKrNipVJ/vJp6v5BnJgt9FiilArb gk+hossGkvRB5iLynCbGKTf1yeNaunmXCywaI2cK3HlE490PTknk1Kd0xht1x/EAhO0n NHLVjwhaexy8eLWCGXErChvR2H9LSwc0o4lbbzEEVGcYXU1G08PIxXqUq8aHLwyubuj8 i0Vw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=gBdN7nfT2KsJNoQBTFhnZ2+II985vPoMN7WbKf8ej/Y=; fh=RlYB0Y2md8rdYnrKVoTlrEmdiF5i9yjfnLS+nw4nIUU=; b=DwKfe6BEhVwetCzNZuoIIg2ixw0VmXUWWs+sKxojvC/c4tK9JRN58Ny3QOsVBeYztQ BJIX7iLJR5K4kJ3W6hA7udTxB9UqBOGOdE5MceOXgpSBdqWZIi3dsri8azEsJXwu6HQM RjpDV7Mn9M+2kYf/+wOZGk9XOWGoOVlZrpfwie9hwdCPi+da4I4Ttopdlt6UdfYI00Xt mRzBryBWcaVB4aevt5uZ8iyzhDw4JPYSNAMcxXQafc3Rqt7QfZWrb4PVs+/FVDQMwYti U76TZlzjiJbPjEUQUcurJNg/3WaJehhs3QLYIgOfwE5F03kmyUWpPHGKiGlGgHQtXyTp qhog==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=xxHZlJeP; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-210201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210201-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57c868d06b3si1803070a12.201.2024.06.11.09.04.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 09:04:05 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=xxHZlJeP; arc=pass (i=1 spf=pass spfdomain=fe-bounces.kwiboo.se dkim=pass dkdomain=kwiboo.se dmarc=pass fromdomain=kwiboo.se); spf=pass (google.com: domain of linux-kernel+bounces-210201-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210201-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C07AD1F24F65 for ; Tue, 11 Jun 2024 16:03:54 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4F47B4AEE0; Tue, 11 Jun 2024 16:02:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="xxHZlJeP" Received: from smtp.forwardemail.net (smtp.forwardemail.net [149.28.215.223]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id C6908446AE for ; Tue, 11 Jun 2024 16:02:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=149.28.215.223 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718121758; cv=none; b=hRzqqN6TQissBjSzcUsDlge/k5Rri76QG0ysNvF0rEJHvO/VWBjkKDvfElzuApTIIfeSIO96EQvpOm8HXwwTKOaxHvOWkkBQhF/0U5gV1e62uSJ/xnWvcHQeHKIhCsKsEKdk7vXpWNF1lVE5gCUDrOAJ9trAyQUC4lLOeZcM9Fk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718121758; c=relaxed/simple; bh=lC5OVFU9Qi7ZW5AqBnT0dzLkcAnr3s4trXkUyYPSO6E=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=f2q2Zug8FxPRdzxx7PQc7gnVXYA3w4p+dNC4mHIcWGY6Yal3f90jVKNyUsRPe0TIshXpbd3K54Hh3uwgxlyVO9c9Bx0NfamWU0zzmCHULdbkRFRtY3L5ZApTjSMdkCC0DyHbck0A6grRz6t5ZZioadRfOBTDzSFjzareE6iZ6ag= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b=xxHZlJeP; arc=none smtp.client-ip=149.28.215.223 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=kwiboo.se Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=fe-bounces.kwiboo.se DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=Content-Transfer-Encoding: MIME-Version: References: In-Reply-To: Message-ID: Date: Subject: Cc: To: From; q=dns/txt; s=fe-e1b5cab7be; t=1718121749; bh=gBdN7nfT2KsJNoQBTFhnZ2+II985vPoMN7WbKf8ej/Y=; b=xxHZlJePZplB5OxOX0uLso2Q1b1vlgAnzccnyGpL9tm8QWAyGwgPgnilqV6d7v9WPmp+IpnxB eP5a9L+XVykjqwXmWRYt59PN1Ie4iU2BklHsX2ZMuUoEmBNnb/6f/D+EKSbsg+XPbq+sy2AxBiT Y/begZNJO7eQwGVRjigGq8ExH+fglEfhecumCuFcfxYJoGyMDlH2j71fe56b+MvrFdhVXaF5YmD UWiu85pzfVRzu41gaRePo64juwaZlbjglnNaa2NzJgA8yzgKgiHcFwoFHAv1NUmPW/fChjQE29G h7o32HI9SglHs2H94FkxF7r9WgbvvHLga5PdnK9urKXw== From: Jonas Karlman To: Andrzej Hajda , Neil Armstrong , Robert Foss , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/8] drm: bridge: dw_hdmi: Use passed mode instead of stored previous_mode Date: Tue, 11 Jun 2024 15:50:54 +0000 Message-ID: <20240611155108.1436502-3-jonas@kwiboo.se> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240611155108.1436502-1-jonas@kwiboo.se> References: <20240611155108.1436502-1-jonas@kwiboo.se> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Report-Abuse-To: abuse@forwardemail.net X-Report-Abuse: abuse@forwardemail.net X-Complaints-To: abuse@forwardemail.net X-ForwardEmail-Version: 0.4.40 X-ForwardEmail-Sender: rfc822; jonas@kwiboo.se, smtp.forwardemail.net, 149.28.215.223 X-ForwardEmail-ID: 6668727cb913b04293b6dc42 Use the passed mode instead of mixing use of passed mode and the stored previous_mode. The passed mode is currenly always the previous_mode. Also fix a small type and add a variable to help shorten a code line. Signed-off-by: Jonas Karlman --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 34bc6f4754b8..ce4d4d06f758 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -2241,6 +2241,7 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, const struct drm_connector *connector, const struct drm_display_mode *mode) { + const struct drm_display_info *display = &connector->display_info; int ret; hdmi_disable_overflow_interrupts(hdmi); @@ -2286,12 +2287,10 @@ static int dw_hdmi_setup(struct dw_hdmi *hdmi, hdmi->hdmi_data.video_mode.mdataenablepolarity = true; /* HDMI Initialization Step B.1 */ - hdmi_av_composer(hdmi, &connector->display_info, mode); + hdmi_av_composer(hdmi, display, mode); - /* HDMI Initializateion Step B.2 */ - ret = hdmi->phy.ops->init(hdmi, hdmi->phy.data, - &connector->display_info, - &hdmi->previous_mode); + /* HDMI Initialization Step B.2 */ + ret = hdmi->phy.ops->init(hdmi, hdmi->phy.data, display, mode); if (ret) return ret; hdmi->phy.enabled = true; -- 2.45.2