From patchwork Fri Dec 22 17:41:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alex Bee X-Patchwork-Id: 182737 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2483:b0:fb:cd0c:d3e with SMTP id q3csp1223309dyi; Fri, 22 Dec 2023 09:44:48 -0800 (PST) X-Google-Smtp-Source: AGHT+IFltDSJsjTYojcill7QtkjOF3Du0Yygte98tOeiQA3JQaZ9hAEF+is47eOg1fgreeYQ50Qv X-Received: by 2002:a05:620a:4083:b0:77f:9b4:a0e1 with SMTP id f3-20020a05620a408300b0077f09b4a0e1mr3115534qko.38.1703267087800; Fri, 22 Dec 2023 09:44:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703267087; cv=none; d=google.com; s=arc-20160816; b=psq+Y+dgeefI8r4/s6ejM9aTEuHiR1cePiUVxfkKKdATHjEDflpfXJeYKKLTRl73b8 ecCs1WmDfvjPD4WWjNyzqvU5fGXTbcdq8Z7cDhuEfTdI+f6oQIKzTVrnKPBfhhtCTAyH 9Fm/HrwNFO722f5fVYFH6siPJoAw291fUz7JENivodmW1/xvwgMYJLUeUe5JJ7bnXwnY Lg7wpfIfT3QIlYoAMZYK3GTjAR75F2R/stI2tlz2nP9D/gBqOeO2fCC/hWd1K+2ouTq+ EDqNkb+jvgJNjNMfauYn483mnAmHMWLTONYUAWL4UElx4WFT3i4ISqWoqn2sOcxHjUzr /LdQ== 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=oTMG9bpN8fCN8EPMeR+JAUJcfO1Vw55kh4J57dK4YOA=; fh=k7ZhfSDxugAUNAX9PFQjqQnTRGZ+rgCl5CN8/TdzbyU=; b=P5vZNHnxWzO5UFJxKz5yomGlP0gMiKfdGONYWyKDO85zjZPFstB+Tjyb5JwTwnvSOw b40OfWH/tAfNCVtwu3cLWSr1MIpfkVPKFSHB1nbhLfMTAxMkvOs88VMXJ6WcySF95b6w 50mTOMnOwY0BhVmquG/Yd5mzSthr4it2NG0uBYngF197tiCezwH+SJglWeItWSRsIkbA xHioQ3287huHd3KQhHuaMNZctdm92A4dL7BV3cXKdbqTn0IZsWhmyaHKSBPvrTcK/IhU dMWQTCm8CX+HN6im22AxfK22PV85diuga2m8L9yMBMcxb089/5nSVFoDtc88WsvMAzo3 zI6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20230601 header.b=cXa9anQf; spf=pass (google.com: domain of linux-kernel+bounces-9955-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9955-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id j12-20020a05620a146c00b0077dbbb75232si4537217qkl.567.2023.12.22.09.44.47 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:44:47 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-9955-ouuuleilei=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=cXa9anQf; spf=pass (google.com: domain of linux-kernel+bounces-9955-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-9955-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 291921C20881 for ; Fri, 22 Dec 2023 17:44:43 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A3E8A3159A; Fri, 22 Dec 2023 17:42:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="cXa9anQf" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) (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 7DE282E636; Fri, 22 Dec 2023 17:42:28 +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-wr1-f50.google.com with SMTP id ffacd0b85a97d-3368b9bbeb4so1508525f8f.2; Fri, 22 Dec 2023 09:42:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1703266947; x=1703871747; 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=oTMG9bpN8fCN8EPMeR+JAUJcfO1Vw55kh4J57dK4YOA=; b=cXa9anQfKgRisLavyIIrZwnuhzDbmeqZQh/10O0tH5mdrpJFKIjW0/c+0MYFILBZf3 NrluJOTGe+OvC8vuUAFWJQIi072y/E1ciK9PHpLISSz0U2LtiAKoZ40InfuaZfcAnSeI aU107C87PdxCzCONdn68AoeMZEMGNZOdpvb4SeO8iViyM96mtzNv9tEzjeaDha2ppZZw a6yUd9k/VW4KA3kXlJb2t5VDCFC800ApgqHaoscMFVIQCV2XBOGPBIN9tMiMbf6ZRrqb mbPWDXbiqmSCkTaQcENDI/6+OanjQGLgI9Kg4a/0qzLJxluxxPaPPGA2VKDZtcP7G1ZL tvJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703266947; x=1703871747; 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=oTMG9bpN8fCN8EPMeR+JAUJcfO1Vw55kh4J57dK4YOA=; b=Kz/mCFLu1swk9d4b2FKB+nj08QFBsGED0KyJONyA0cQhowM2Ul6pNNcheGIWzkdA/r +X2Ls2GuPr2CB85GpIQuvLbLOVsPYaHQdBkB3m4bdLu6PDEWzbjgE0nB/DVCj91xMAmX iae3pAylnukaUiYaQoT2yaLDke0ITqctzCx+Ug3+yLJEbat5ElJvhNAwjVbXXGP/UEV8 0uy4p/iDkijtKivNg0zxciXnl988XTluP5YbLgEUwFN/5s6E2Are6Am+/CN300/WkGEq VtMEL2sRCBZUp26WjRRSIebylDss5bjfamkTiRnFY2nrPJFBTapKJhWl+Nac1EKJtvNS I+bA== X-Gm-Message-State: AOJu0YxLrd2/rSRqX+kSYEQBGJVNxeizz9j4TDluYOM2F8tlsEg2OWQN FOskup/x37903G1FQ4yRgw== X-Received: by 2002:adf:e5c7:0:b0:336:607f:4bab with SMTP id a7-20020adfe5c7000000b00336607f4babmr607801wrn.187.1703266946623; Fri, 22 Dec 2023 09:42:26 -0800 (PST) Received: from U4.lan ([2a02:810b:f40:4300:f3ae:2788:7e03:f44]) by smtp.gmail.com with ESMTPSA id w10-20020adfec4a000000b00336670abdcasm4777116wrn.40.2023.12.22.09.42.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 09:42:26 -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 v4 06/29] drm/rockchip: inno_hdmi: Switch encoder hooks to atomic Date: Fri, 22 Dec 2023 18:41:57 +0100 Message-ID: <20231222174220.55249-7-knaerzche@gmail.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231222174220.55249-1-knaerzche@gmail.com> References: <20231222174220.55249-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: 1786004989555431837 X-GMAIL-MSGID: 1786004989555431837 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 changes in v4: - none 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