From patchwork Tue Dec 19 17:00:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 181109 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2081400dyi; Tue, 19 Dec 2023 09:05:12 -0800 (PST) X-Google-Smtp-Source: AGHT+IEmacROXEwMG6/AtFaxArUdysL3FAcfxFstgV7/cf3ZeInb25bK20xAyWtGr7KEgzsytqWE X-Received: by 2002:a05:6358:c12f:b0:170:79b1:bda0 with SMTP id fh47-20020a056358c12f00b0017079b1bda0mr9203862rwb.56.1703005511359; Tue, 19 Dec 2023 09:05:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005511; cv=none; d=google.com; s=arc-20160816; b=k7NI+hUHN9yK/9oRpntgcCk/QcPx0uEL+5EKHf1jbCDiSu+O53cR/fSFxHAd9TV4e6 pxCPvBpulpA9+EmIga9C7gh12fGsiUlEE+ZEIomsiPUrI4cvC2zcd2hFjiXEH/UGX1V8 TXNBwyixMCsawPdI8Emy3NjPIGejjXR60LJ+uWSFRlZyn1J30oY3Jh6CJQ3+q+KBZvf5 dt/OfCA71xk4ahuUSJZDiqIpJws0/nPCrFzah/dBqXzdAvgqwjhhCWVDpiy91KJti4em HzVPRQjzkKsVtNIgEICU/5pZ2kCztBsGD0SpYvxY7kSYvFSJfYnkUHWT1juc8UkvcerX 9YGA== ARC-Message-Signature: i=1; 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=15Kg5P/kPo3OprJxF+EVJ+2okgIdyNf3FbH+CrQD8yI=; fh=k7ZhfSDxugAUNAX9PFQjqQnTRGZ+rgCl5CN8/TdzbyU=; b=1BiPcpECxX3VSvfYEJN4TmKixMKqi2uvREUo/J/GOJkrDsh++c49xtyJ3ihsQHFRu3 G/v67e1P4RhZg4QsZGKV4OpJ6tsmcmpPmA0Inp7lpO+tMgh+d/cvgyrZGvJXePMgQ/W2 NNYAaeMxG1sKVcdcTkI1cbroW2AhjKpKpQIvXfAILz4M7BIYk7i/P/sWr5ozkz/DwCnw ++MZ4y+RmkmnDaM2ljgcPTiiqJGZGV+z+foN5DwUBI28aPp/iRieomidTpWGOVl2FC0/ EsoV5PFgGqWyayNFPLPS8hmttmV9PvwKIKw2IExh0e7Dk5djrlRivvOjLdWJsxrcigxC CIhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FRUDjZDE; spf=pass (google.com: domain of linux-kernel+bounces-5625-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5625-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id u17-20020a631411000000b00585999a38a6si19382768pgl.793.2023.12.19.09.05.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:05:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5625-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=FRUDjZDE; spf=pass (google.com: domain of linux-kernel+bounces-5625-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5625-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com 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 sy.mirrors.kernel.org (Postfix) with ESMTPS id 87D04B213D8 for ; Tue, 19 Dec 2023 17:03:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C18DB381B2; Tue, 19 Dec 2023 17:01:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="FRUDjZDE" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 447FF2EB12; Tue, 19 Dec 2023 17:01:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-40c48d7a7a7so45243185e9.3; Tue, 19 Dec 2023 09:01:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703005273; x=1703610073; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=15Kg5P/kPo3OprJxF+EVJ+2okgIdyNf3FbH+CrQD8yI=; b=FRUDjZDEjovrt1xIwCkp1lRhmHoMSPGZU//xVVN1+F6q6/7pAAeI7hrSnm02XyBrK0 Z36CquvYkTyWVkss8GI4rGm0s0eppPZlxGfj0PBGBG8cp9MmFgL2UlS+WpJHeML2i75E cNQHEMAqQ/DoJ1t6LOFzGej1tG9Hyml2+YsYpb10vupiSbauB+P57Ryn6H5QpFS9tw+1 uMa6oAsZVPVq23YceEg5wBCVH+asJp9xDFCutCUTTEfE4VRzg9ciIE9GZzS/Qm9m2g5v RAHJd9jN5MGCXU8ua4LuKkwet2IGuFrsbp43zCLGSS99RkwauaMbMIbV9VyB9zhqxQl5 PpPQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703005273; x=1703610073; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=15Kg5P/kPo3OprJxF+EVJ+2okgIdyNf3FbH+CrQD8yI=; b=h9hT6dJso3UJ22WEtvdVcqYvVcAdDfPD44zgcZ5RBZBwsGXnAhcFGM8nEGApF56S9V PLyxD4W0RtZJBvBV33fA3UXI6GQcnjyhEAGh25yUEE6CY9NKS8ZU3ez6DsWaw6GL+znJ nEynQ+JKrQvFHJnJ2faddLtOeCZ8QB9BQh2/g6sUaV9oYfS/bS4MRsj8tB9yrmCWzApn Iky68eYuy3IAXDv+0RIyhY2WifVs+x6VwyyblqCjB0Z1zlGKyn+R/+Q4expTgy0x/vVw BLZyCnZjneBQmZFk7DxcahMYwtJtdnylgcIl0HInb696u3QGCVoQkwthpvqeEVVfrCcF hcYw== X-Gm-Message-State: AOJu0YzaifUs/iBr9K8wzpX/1rOU5sN+yGxqPBvN3wzDDPFNfkpFI3u4 ZfGO6t+6ymuiTiS1pLKr/g== X-Received: by 2002:a05:600c:4595:b0:40d:129f:d59c with SMTP id r21-20020a05600c459500b0040d129fd59cmr3033478wmo.79.1703005273480; Tue, 19 Dec 2023 09:01:13 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:7ae5:3e:d1c6:a138]) by smtp.gmail.com with ESMTPSA id i7-20020a05600c354700b0040d2805d158sm3225878wmq.48.2023.12.19.09.01.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:01:13 -0800 (PST) From: Alex Bee To: Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [PATCH v3 07/29] drm/rockchip: inno_hdmi: Get rid of mode_set Date: Tue, 19 Dec 2023 18:00:37 +0100 Message-ID: <20231219170100.188800-8-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231219170100.188800-1-knaerzche@gmail.com> References: <20231219170100.188800-1-knaerzche@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785730707341836703 X-GMAIL-MSGID: 1785730707341836703 From: Maxime Ripard We're not doing anything special in atomic_mode_set so we can simply merge it into atomic_enable. Signed-off-by: Maxime Ripard Tested-by: Alex Bee Signed-off-by: Alex Bee --- changes in v2: - imported patch changes in v3: - added my SoB drivers/gpu/drm/rockchip/inno_hdmi.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 48c4f010b260..299770e481b7 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -490,21 +490,22 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi, return 0; } -static void inno_hdmi_encoder_mode_set(struct drm_encoder *encoder, - struct drm_crtc_state *crtc_state, - struct drm_connector_state *conn_state) -{ - struct drm_display_mode *adj_mode = &crtc_state->adjusted_mode; - struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); - - inno_hdmi_setup(hdmi, adj_mode); -} - static void inno_hdmi_encoder_enable(struct drm_encoder *encoder, struct drm_atomic_state *state) { struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); + struct drm_connector_state *conn_state; + struct drm_crtc_state *crtc_state; + + conn_state = drm_atomic_get_new_connector_state(state, &hdmi->connector); + if (WARN_ON(!conn_state)) + return; + + crtc_state = drm_atomic_get_new_crtc_state(state, conn_state->crtc); + if (WARN_ON(!crtc_state)) + return; + inno_hdmi_setup(hdmi, &crtc_state->adjusted_mode); inno_hdmi_set_pwr_mode(hdmi, NORMAL); } @@ -533,7 +534,6 @@ static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = { .atomic_check = inno_hdmi_encoder_atomic_check, .atomic_enable = inno_hdmi_encoder_enable, .atomic_disable = inno_hdmi_encoder_disable, - .atomic_mode_set = inno_hdmi_encoder_mode_set, }; static enum drm_connector_status