From patchwork Sat Dec 16 16:26:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 179880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp315418dyi; Sat, 16 Dec 2023 08:33:11 -0800 (PST) X-Google-Smtp-Source: AGHT+IG1MNXnsDP9bsKxaWrJRdTtvVofLrXt+LfRGNeeA4lJ5/tpFdtXpoMJhHQ5eXcpElKg3LcX X-Received: by 2002:a17:90a:6e05:b0:28b:24fb:8333 with SMTP id b5-20020a17090a6e0500b0028b24fb8333mr1862327pjk.38.1702744391279; Sat, 16 Dec 2023 08:33:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702744391; cv=none; d=google.com; s=arc-20160816; b=lt4d9wxP8BRxQhaCgZur277qLOCW6OV/1uYmDcHPHuGOzpQSMuXjYskc99Z6brmzPU XpZ65hrQz0TMSQGhzKEETlyL4opdSF/PI5Kuw57DeCLzc3+gTxI32HIfvYikGsWQIDYB ODbA6ng+RCLFPyTVGvV1dBEOIBbBYP9fLRD1Y7hiibbZFAW2q+iwYZ8VHI/n4QByPd2q YCHMVx2f6Lu5I3nYni8MS09KAEgOpsstwkcA/4GsJSCzF+xkC22JzmRnDgN1LWWxHeqV FyRY51fVjdGmjTOm8/BmidhniZFMG4t9xubcX3j2hbD26JqHPpPsBRVhkUIegcrCSj34 I0aQ== 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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2255-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. [2604:1380:40f1:3f00::1]) by mx.google.com with ESMTPS id ci5-20020a17090afc8500b00286a2b05cb6si4824346pjb.145.2023.12.16.08.33.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 16 Dec 2023 08:33:11 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-2255-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) client-ip=2604:1380:40f1:3f00::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-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:40f1:3f00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-2255-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 8AB80B240F2 for ; Sat, 16 Dec 2023 16:30:17 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 3825934CFD; Sat, 16 Dec 2023 16:27:17 +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_St=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 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785456902760360542 X-GMAIL-MSGID: 1785456902760360542 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