From patchwork Tue Dec 19 17:00:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 181105 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2079830dyi; Tue, 19 Dec 2023 09:03:33 -0800 (PST) X-Google-Smtp-Source: AGHT+IH/1oYiG6Ekt8SLzuhXYEWd2llZrXN3+V17PCzsE+zzGGsloIq1ZwMKqt0S+Kbq69tj5IlV X-Received: by 2002:aa7:87d7:0:b0:6d6:d7f7:d016 with SMTP id i23-20020aa787d7000000b006d6d7f7d016mr2328034pfo.4.1703005413343; Tue, 19 Dec 2023 09:03:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703005413; cv=none; d=google.com; s=arc-20160816; b=srKHX//UkIY0QslksKDqRqjSf8TXQx4KP9SpwSxtaTtUOLUv6vSLtzCiL7gWrbVyyh IKh/duKDQAzYLdlyWJ7HqxOfUVpsCSxjJs/baL1P212Z6JePJcl7y608+DLSPp32Cx7i NFaIsspkuE++ogl14f1cFxnzlqoESiPz820/Dv8jrEmpzak6n3e8Vk3zIkrzM3K1xNn6 r9DkY43v5P+BG3VFsHNJfBcUUTYH5AFvd1M2dRVJGlmNpopNWm57iLVGLt8yjvmeeKER EBCS+uSCo+BHYcKePf8qq1EYEOIRQQy4KINaKEXKczkjx+pnXV95J/lizBGPOvseNiVQ u4dA== 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5624-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id h5-20020a62b405000000b00690f9e835d8si19682099pfn.132.2023.12.19.09.03.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 09:03:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-5624-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; 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-ouuuleilei=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-5624-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 sv.mirrors.kernel.org (Postfix) with ESMTPS id D807B283EA7 for ; Tue, 19 Dec 2023 17:03:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EE58D37D2A; Tue, 19 Dec 2023 17:01:18 +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_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 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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785730604220011533 X-GMAIL-MSGID: 1785730604220011533 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