Received: by 2002:a05:7412:8d23:b0:f7:29d7:fb05 with SMTP id bj35csp293747rdb; Sat, 16 Dec 2023 08:29:16 -0800 (PST) X-Google-Smtp-Source: AGHT+IH6wE6BkCcN8j+I/MM1O6M8qvhu3DzLa4uAhgTxQV510SjN+ru2pnrkptsrUDdVaHGV09OP X-Received: by 2002:ac8:57c9:0:b0:423:b622:6dd7 with SMTP id w9-20020ac857c9000000b00423b6226dd7mr17228843qta.6.1702744155752; Sat, 16 Dec 2023 08:29:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702744155; cv=none; d=google.com; s=arc-20160816; b=FmO4W9PyzJzFCo5Rz7N3rRRBx9bjZla9SG47FLzQ0SKHZ/efje87LZnx/lPUnBxg+V xcN8dwok+5moBNhbchQOeIkteDSmb5R1RLzT8G0tP8wz0z4KK6wStN0jUPJe5nLCDpss SMrjNU7lS8Udk2iaf9WNvknNhwyzfVRCBUv9sDL2Mg5GDDrcJjarEOJnm/tnrnZzkIGJ BqtPscKFOsfpTnzx7S61C4/qdvVsATx92HkAs7l5G6RbKr+3ByuSm8mAbsa12PR955e9 migv4yv5E3OiQBPHHb0KmMMlxCUrllrdgTKy9A/fnXciXgRU5sp+jBbwoPaVvtD2CxJZ jMBQ== 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=Hqi83IjE0rGQjBdIOPd+5QjMZSA3M3R/UCn49KPkLl0=; fh=nzMX5Jolb3GculGR3f1Z1ReHOqdNjcdazDY5R3X+7M0=; b=RqP7LmYNQQik6hU433CafMzWaLq/IlaosCIOyb0G7K5IirPnGb+Fe0WGIGeidEQW1J +rqZe0fuQqoQGG8YHX5SwRHwxz1am1BMOBkbAL8aW/WWVDTdp7cMYvDOejb63iVi4hQY re12uzUlN1vnPZiFMOEUYmUh+rgTBGKV6MQBQfjNjfkLP4ETAqOqzdoOlqYTZWqQWtgl aEKXlJjxECslhHcAUk/EtPf8KiGDFhdq/Rez8yPi9pv9EeP2qp4jeAKmEvJMm0sE3Zcl 1HK86NNclfNWMRIwSGzf5YN/0DmJdhI6nWqM3eJe1zSDPc7Mh20pWaSYKqTN9mBTDDht OWjw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=hOAzxrEq; spf=pass (google.com: domain of linux-kernel+bounces-2255-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2255-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 f36-20020a05622a1a2400b004254341a858si10120260qtb.643.2023.12.16.08.29.15 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 08:29:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2255-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=hOAzxrEq; spf=pass (google.com: domain of linux-kernel+bounces-2255-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2255-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 60E651C2182C for ; Sat, 16 Dec 2023 16:29:15 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 334BA33CE1; Sat, 16 Dec 2023 16:27:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="hOAzxrEq" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-ej1-f41.google.com (mail-ej1-f41.google.com [209.85.218.41]) (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 CD95A315A0; Sat, 16 Dec 2023 16:27:11 +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-ej1-f41.google.com with SMTP id a640c23a62f3a-a233a60f8feso5643166b.0; Sat, 16 Dec 2023 08:27:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702744030; x=1703348830; 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=Hqi83IjE0rGQjBdIOPd+5QjMZSA3M3R/UCn49KPkLl0=; b=hOAzxrEqOoacTmD5j+we/J3dDRZJUGN0NX9nQWXkenW6TNgsnyjeK7sR6pg6/dB/yU EYBWboLCZ/bSSfbGUZ3zKWB9+lCkvHVFM//qswj4KFFtY4XTKe3BIS2oE9kIeLm5P9rh MmMB3T+of09V92+b/qIqDBexhIToWoZ0/5jx+EGseEuK+vFERYICnqwXwWKWRH0Y0MFG EcKm/sUuas9sulsY6gzus+wWAjmIJ4ZtF/QStb8nB6nQJIiGDK/dBZJdedQrQGRfvsxl YxXYcfYrbOaEusO2Q4gSIX37vYOGPWAuOEUYUH88DG2TwkXV5sglpOysCbHJgu1yeBbl fXZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702744030; x=1703348830; 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=Hqi83IjE0rGQjBdIOPd+5QjMZSA3M3R/UCn49KPkLl0=; b=uglRtmk5vQNcpn6kO8Mwd8ChHlmsldN/jiGXJeUNl5rFGvFtJk9GjJ6FhwEERCyLKo e63EuC1zq+0rvjgNSkWnxO5TcBC9fMYm3RzMlkKdBPVxqWblEyXZF0fLR90dQzIt14n2 buDU+w1Sg3WR5tNZJIW/94mO274cH88CzaLzs49Z0gRTlqQ+eB+aEo/KhmjX5siZIvaG 3jl62P3qHqlXkwqZKmurGdxYRIg7wvmZujfsf3/Qr6xQgAkVM67+Qeq2E4bMGiIahL5f DOzzTR38P0E/Pqvx1y8snDo2/p79l49EVzPBlu7s8nmVrYIiAD7xdOZYNirVv9P9sjra GhCw== X-Gm-Message-State: AOJu0YwDEfPac6YGR/SL0xyEV4KkjPe1a6KqXId39mZkJvsp0iE14IzF ay6xThSk7hHDVcDYALGLTg== X-Received: by 2002:a17:906:5352:b0:a1f:9617:99a with SMTP id j18-20020a170906535200b00a1f9617099amr4768328ejo.94.1702744029988; Sat, 16 Dec 2023 08:27:09 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:e807:d345:6f47:1db9]) by smtp.gmail.com with ESMTPSA id st10-20020a170907c08a00b00a1cd0794696sm11990362ejc.53.2023.12.16.08.27.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 08:27:09 -0800 (PST) From: Alex Bee To: Sandy Huang , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Andy Yan , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann Cc: David Airlie , Daniel Vetter , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, Alex Bee Subject: [PATCH v2 06/27] drm/rockchip: inno_hdmi: Switch encoder hooks to atomic Date: Sat, 16 Dec 2023 17:26:17 +0100 Message-ID: <20231216162639.125215-7-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231216162639.125215-1-knaerzche@gmail.com> References: <20231216162639.125215-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 --- changes in v2: - imported patch 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