Received: by 2002:a05:7412:d008:b0:f9:6acb:47ec with SMTP id bd8csp48862rdb; Tue, 19 Dec 2023 09:02:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IGE0u9VWE3G0181kCcE8B7UCGkm9nQzs7HoqZUtOTKTb77JqxbaoWVnLDHfMwCh2znmjdWN X-Received: by 2002:a05:6830:143:b0:6d9:bc86:d02 with SMTP id j3-20020a056830014300b006d9bc860d02mr17194800otp.23.1703005367312; Tue, 19 Dec 2023 09:02:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005367; cv=none; d=google.com; s=arc-20160816; b=yYF/CGHzeVlp0rpFLw1oE+YhH8xZRBQx6ShsBnHyXPeyvT30bu813WeobCZn0BMFXV Qyv+dCp1ooRvzDpeWSxPbFDAlBF1DyBPlrcAZrE9MLyiaNhgA4qoGz9FVahPubLo1mud rLOaoZpqt/5mFFHeY7nSwOO3c0DtFasGwi8idVdNt79rmR7vJxyWC0dcOdQRDzvLdIyt TUb3QxJ0dnw8raHzBlgBpSIHUCz1yAItZIACG8QqMGyWcBBpdg8+kUDLwopjL8Tj3SBX Mh2TaYVNFJN3kaEU/OsJXMwJISsH8E5Zagw6UfLKDndS6/PoU5+Fv1iE9t374strTMWF hKZw== 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=RIgfmp308cBqMuCcRmTUeRZ4zCPkbcPIGR4mbqru0jg=; fh=k7ZhfSDxugAUNAX9PFQjqQnTRGZ+rgCl5CN8/TdzbyU=; b=r/Ego/YBLtZIyFkQ65lcXREwS0U/T4s6htlbvxJxKSVWCKggHom1q6kOjsjf+bK3/T 0C+Mbhwxj+fX0YkgkEoEYqgnPppRsCFPAgVuOZeziAE8KvBy1oUbr6n8Mrm0NDtL/rnp GCqn4IkAEIG628pGcAlzXx993Ex8mMd5aqAiLnXkql4C2JdTH21gTBUgxWxOZfoEogwR sHuKwvqPHnUdjp27kalGG6vSs+eEwKkjhixJR074qag4YbhHJ9oREr16327DOd11ovPY WKcf6PPpyt08zIyRhdY0HBIJVQKi36hJ1AglRY7XQs34kqdoc1uyLXd2eRAMs/tynRUo CPdg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=HPQJhtNY; spf=pass (google.com: domain of linux-kernel+bounces-5624-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5624-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g1-20020ab02441000000b007cb9b41a419si1423321uan.208.2023.12.19.09.02.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:02:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5624-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=@gmail.com header.s=20230601 header.b=HPQJhtNY; spf=pass (google.com: domain of linux-kernel+bounces-5624-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5624-linux.lists.archive=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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 0E8C41C246C0 for ; Tue, 19 Dec 2023 17:02:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D4D8337151; Tue, 19 Dec 2023 17:01:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="HPQJhtNY" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) (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 5DE8D23761; Tue, 19 Dec 2023 17:01:14 +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-f46.google.com with SMTP id 5b1f17b1804b1-40c3f68b69aso45412815e9.1; Tue, 19 Dec 2023 09:01:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703005272; x=1703610072; 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=RIgfmp308cBqMuCcRmTUeRZ4zCPkbcPIGR4mbqru0jg=; b=HPQJhtNYrcGFiWNPTnSDajoC0fLio4HfJH+Kgtq+sxm5amV0Cu2TdFGLw/pie9tDQt lC+gUSrkzA/EbqfhFYqkcH/9fclCnGp0cip4h6nn5VDnwASZ/BK5ItKZZ+Rh3PUQ0sGi Unu5VzXKOcIMHno7TcfJjSCdliEmrCtDui23JCkR8YTzpiyhtb0IYWLtxuuQYkFVnyT3 ja4wO+F94HTidSVZ7B4xGzc9KDv7aZ5Ro3/eOM0E4YkQTKpb5e6qXO8T6n/k6dK7PYqj wXLeRfY3uvKQfs4Am9GLaAv5S1+Zdbf0hzRQZYDPTsjsFZ7k9dm8eewR+psXaP2CISve WLxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703005272; x=1703610072; 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=RIgfmp308cBqMuCcRmTUeRZ4zCPkbcPIGR4mbqru0jg=; b=gpp9zw/s6jiFbFlIwec5UzlaZ+PEL00LUGAzwl/uWMj138La2LCQXiAKGfzI1nZ4iC DKDO/JS2MfZLjAbZDyOekLJqn/AnGxMd8ycFx3T065HZOoFp6oH09A3DWYtoqt3WjBGU EM8qUvKE9Pkmshysy4XZ9oDm0BLNNAPkaqgIAjhUIVNN+REJXgDSzpn9goCJFRycMqKl cvOSjUuZdeAVxbudC6UNdd3Jx2/9A/4kBNaM1HDmg1nu937Xelno3T65F4+YnYt32cwo o5HnEhQQXZxUuJKzPk146CEE83L4eoB7Oobm9JJPwF5hXUCiLPo2BVZc2Ms+oc6aDjZz 1uCw== X-Gm-Message-State: AOJu0YxGlBBwFZAswu/RFxhXX9y7VkdMedISh8bK3yQH/IS5z/qTfXZe Jb/P8ssRUJ7jNtbp8SRWrg== X-Received: by 2002:a7b:c7ca:0:b0:40b:5e1b:54ac with SMTP id z10-20020a7bc7ca000000b0040b5e1b54acmr11372528wmk.56.1703005272560; Tue, 19 Dec 2023 09:01:12 -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.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:01:12 -0800 (PST) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=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 06/29] drm/rockchip: inno_hdmi: Switch encoder hooks to atomic Date: Tue, 19 Dec 2023 18:00:36 +0100 Message-ID: <20231219170100.188800-7-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 Content-Transfer-Encoding: 8bit From: Maxime Ripard The inno_hdmi encoder still uses the !atomic variants of enable, disable and modeset. Convert to their atomic equivalents. 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 | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/rockchip/inno_hdmi.c b/drivers/gpu/drm/rockchip/inno_hdmi.c index 14d2ba92a606..48c4f010b260 100644 --- a/drivers/gpu/drm/rockchip/inno_hdmi.c +++ b/drivers/gpu/drm/rockchip/inno_hdmi.c @@ -491,22 +491,25 @@ static int inno_hdmi_setup(struct inno_hdmi *hdmi, } static void inno_hdmi_encoder_mode_set(struct drm_encoder *encoder, - struct drm_display_mode *mode, - struct drm_display_mode *adj_mode) + 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) +static void inno_hdmi_encoder_enable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); inno_hdmi_set_pwr_mode(hdmi, NORMAL); } -static void inno_hdmi_encoder_disable(struct drm_encoder *encoder) +static void inno_hdmi_encoder_disable(struct drm_encoder *encoder, + struct drm_atomic_state *state) { struct inno_hdmi *hdmi = encoder_to_inno_hdmi(encoder); @@ -527,10 +530,10 @@ inno_hdmi_encoder_atomic_check(struct drm_encoder *encoder, } static struct drm_encoder_helper_funcs inno_hdmi_encoder_helper_funcs = { - .enable = inno_hdmi_encoder_enable, - .disable = inno_hdmi_encoder_disable, - .mode_set = inno_hdmi_encoder_mode_set, - .atomic_check = inno_hdmi_encoder_atomic_check, + .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 -- 2.43.0