Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp443580lqp; Tue, 11 Jun 2024 08:52:00 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWaAakyXr+JxbjAnZd5po3v56hv74Si9Gb3G4KKzTbb6Olcg3kjawc+DFZRCGkREiXqaak6d+URAb4WlWlGUCaHOrAaTQPvXRRovDoW5Q== X-Google-Smtp-Source: AGHT+IEKNryOSHrLuxgd7ZNOfi7vogvPO9TsjyVAHfCZxwYIJZNuA+v3gPfVKH8VeaImtl6Ql3lO X-Received: by 2002:a25:8044:0:b0:dfa:ac81:38e8 with SMTP id 3f1490d57ef6-dfaf655331cmr11734569276.6.1718121120110; Tue, 11 Jun 2024 08:52:00 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718121120; cv=pass; d=google.com; s=arc-20160816; b=nchZ/zM4H7GEduxqvcG9P3394iQuDoTIDr3P6vAl16pqCJrWcw/Mpm1tCTqHGgTIUZ qodYSBFpRxTJA4RnH8iOfpg7+lyuZchu0uxZySDRex0vqRzoq/D/avUuVNZNVrbwlUmS bhZwRss5bhmP6Hkm03Gp0OvQCCaySLi8waioGjLH5EXlxc0IqafwbgKaoY4rw/XAkuQR nS12TZ0Fz+OtJaIRmSnG2W/uyaFw5eYloBrgnpulxa7T3lqtF3B35InguFDp4+JXNSl0 eLIde9lDFlmw138SQgli1d4JIjjLwO+GLcBDrGtZWUzvlhptblDFO2gZHYlUwAiPhlG6 wROg== 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=jp6QnjORNUnb+kYtVjyvzeeY+7er+nxl30wpAzBC1Yo=; fh=RlYB0Y2md8rdYnrKVoTlrEmdiF5i9yjfnLS+nw4nIUU=; b=z1XQbA0C501Cng6Cfv6cwxus0FkZxVvLlthx2FxUYfjTlXRSSTV2QPhh89tSkN63zQ Cu+eEPpzcxrOnNiJptncypQum2RDfkFmET06FvFnZLc/DkUAVEXxDw+LHgXHhCIC/zzO VkRNiJuZLCgy2do71t4m5b1IxmQSZwEcFVRxDoTX4dYmtJAriKaOTRl+pOuwzJKs0g11 wjQSUMvCD/tkAnMjx4fCXNFa0F4cjeNj7NqtBPOhAdh+ZRS9s87Y++Bw/ToKR8RqnZSQ o61SakUWUhDNOGTfYYZ4aY2jZjXf31H6MKmqJrCwUjbiMTzPcqvvTJNoTIRxqneTsy0r rOTQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=JhV59uOa; 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-210180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210180-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kwiboo.se Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id d75a77b69052e-440547b25f0si88008711cf.147.2024.06.11.08.51.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 08:52:00 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kwiboo.se header.s=fe-e1b5cab7be header.b=JhV59uOa; 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-210180-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210180-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id CE6AF1C2338A for ; Tue, 11 Jun 2024 15:51:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 38B5539FE4; Tue, 11 Jun 2024 15:51:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kwiboo.se header.i=@kwiboo.se header.b="JhV59uOa" 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 97489381D1 for ; Tue, 11 Jun 2024 15:51:41 +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=1718121106; cv=none; b=menW//hJLml+170XhfhK42C5s83j4hoC1tEOU3fRpdSQPowNTWQH+G64zHi+F4TxQIrcfiCSxfCYfdeIsi3DW9mf5rC1lt3DueeiI7/yL4rCwbVbVoA38oYvI+VwSkUN7fXD63dsBqvmvu2U71Akv5mOK2J5Fau1cXlt649tLEM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718121106; c=relaxed/simple; bh=Dd5D3QgnITJ2MQp+d5Qg8fdGjvry8Cbr+aPoA/xGNh4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UBeuXaM7XPIVELi6IX4vfC96H9qpYq9Yn0wjW+2ZKr+bFXFYPEf8ncBLO+xVthr0qiBVSQtwiqZHl1K2nufCKm45KRzbdquKrvZU8gMfm1Y8/N4FgcE6MsbUnKc8k3KO/ZP5UPWD0caDkgf4sqkPkEmBGUKAkaQqy9y2GDc1Vck= 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=JhV59uOa; 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=1718121097; bh=jp6QnjORNUnb+kYtVjyvzeeY+7er+nxl30wpAzBC1Yo=; b=JhV59uOayCh60chJ0OY3As0zjnKEjbQd0z9pw2hXsbwhtPvcgv/9wqSjlPH35XJ8NoWOsm2am 45tSNN7eiXUh0D3mDrZ/82yf1076fMY8lP4KOEagU7KG6VBYOuADcY7v7LtUdxt5LJir5tTBy4I 6skv+R3PV29GxTsMT6chgZ5QYJ548P+jfKYDZ17fO/hifocCWNSC99agMR0FbDaAmGliKmGW/hc Hu+IdJUochqG/UL5jluGOYS9QsuuQ7bwmtqUvEgrAiKcBeKIZVj3C3t1apl7/2fJquwN3HI140Z sFl9zk3wGgVVWjfuyQ0WATHwc6tw2X22dfRwHcOt7s7g== 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 4/8] drm: bridge: dw_hdmi: Remove previous_mode and mode_set Date: Tue, 11 Jun 2024 15:50:56 +0000 Message-ID: <20240611155108.1436502-5-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: 66687285b913b04293b6dc66 With the use of adjusted_mode directly from the crtc_state there is no longer a need to store a copy in previous_mode, remove it and the now unneeded mode_set ops. Signed-off-by: Jonas Karlman --- drivers/gpu/drm/bridge/synopsys/dw-hdmi.c | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c index 76048fc9fd14..9ecf038f551e 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-hdmi.c @@ -157,8 +157,6 @@ struct dw_hdmi { bool enabled; } phy; - struct drm_display_mode previous_mode; - struct i2c_adapter *ddc; void __iomem *regs; bool sink_is_hdmi; @@ -168,7 +166,7 @@ struct dw_hdmi { struct pinctrl_state *default_state; struct pinctrl_state *unwedge_state; - struct mutex mutex; /* for state below and previous_mode */ + struct mutex mutex; /* for state below */ enum drm_connector_force force; /* mutex-protected force state */ struct drm_connector *curr_conn;/* current connector (only valid when !disabled) */ bool disabled; /* DRM has disabled our bridge */ @@ -2895,20 +2893,6 @@ dw_hdmi_bridge_mode_valid(struct drm_bridge *bridge, return mode_status; } -static void dw_hdmi_bridge_mode_set(struct drm_bridge *bridge, - const struct drm_display_mode *orig_mode, - const struct drm_display_mode *mode) -{ - struct dw_hdmi *hdmi = bridge->driver_private; - - mutex_lock(&hdmi->mutex); - - /* Store the display mode for plugin/DKMS poweron events */ - drm_mode_copy(&hdmi->previous_mode, mode); - - mutex_unlock(&hdmi->mutex); -} - static void dw_hdmi_bridge_atomic_disable(struct drm_bridge *bridge, struct drm_bridge_state *old_state) { @@ -2972,7 +2956,6 @@ static const struct drm_bridge_funcs dw_hdmi_bridge_funcs = { .atomic_get_input_bus_fmts = dw_hdmi_bridge_atomic_get_input_bus_fmts, .atomic_enable = dw_hdmi_bridge_atomic_enable, .atomic_disable = dw_hdmi_bridge_atomic_disable, - .mode_set = dw_hdmi_bridge_mode_set, .mode_valid = dw_hdmi_bridge_mode_valid, .detect = dw_hdmi_bridge_detect, .edid_read = dw_hdmi_bridge_edid_read, -- 2.45.2