Received: by 2002:ab2:6309:0:b0:1fb:d597:ff75 with SMTP id s9csp1033897lqt; Fri, 7 Jun 2024 06:23:57 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUmDibxZVE8mdC9QEug6M7qu9IBUsO3gpU5cuYyLw2BxCp2eWoaWfD5PCjyqdtESNRiVaVjngU4DAyFEwfzt031h2YF6FChs7ymH7DegA== X-Google-Smtp-Source: AGHT+IExUPMQzHEwnLHHGZfb0gnuDc8DkZF8n94mRwpKFkjTHKWGQWYnvwLLZsLGKcKAf2921dPw X-Received: by 2002:a50:d602:0:b0:57c:4200:a958 with SMTP id 4fb4d7f45d1cf-57c509bac86mr1973832a12.35.1717766637481; Fri, 07 Jun 2024 06:23:57 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717766637; cv=pass; d=google.com; s=arc-20160816; b=nboOumfzwodEj6aK5VbSmQy7FeNKX6Z6wGO366fG8I3Dngysc6l86I8JxjSDO6CZk7 92bwAadoJagLDJ+nucxLafQnESOBwWjTATuvWUEo6WVLAXLZBrmV4Z3qI/BNELEl9e1B DZilRXV+AKiqSuxa/rXt/Qg0U2z+aJdzDBLSTCqs28GOI5s0ue2hrbHE8fOtpE5DHSg/ UqohZ4AGVflHLJP23rACCBAxGcXejvxWHy4546AkOD8Zs0kKZiAZ0cUoFe3pGPJVYLCU vdEcT4Qw9A9a6lA/aj//1L2MHdwxSXFUaDgE5wli93VVjXu87yM6hjHFjDl3xbvcP2l+ 7CBA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=d6C2WBjw85TMMZ9GIIugc3NhLWza5ZaClpp5YdwIj3Y=; fh=lNjHez7KoEj/wr5SQWAI5lopgt88GZx112L5AJ0K2lk=; b=ERiYeVKKCL9FvWmPBwmlsz3fc63XY2nzyAzHATHPFyUCXczx29d5AnvSIP2lQgq0U0 Lkx/ifK+ldAmhaigRwDDxIKfIWk7r1Y9+0T7NTHDKEvMtSA5lz9vZjfAen47KobqjgL2 tXULfm6FXZ3b8fNlw/H3iebxbs9ExK696N67TJcOn3/Gu+9O8VyvAM2BvcfDRrDkxruz xdTYHtVADNYIuD/ZfkcZT0rp+Sw4eD6s1BuNtBb7PVNob9cKcYA00PKVS6LpqS2tKccB Quh/JIqt7T5SPXt2mg7f/cTMc3fe1jNdi7Nwbc6gR0/FbWri6FpEoWPBfhtBSQi+eTob KUew==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hHATsWRF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-206127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id 4fb4d7f45d1cf-57aae28e117si1885626a12.672.2024.06.07.06.23.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:23:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-206127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hHATsWRF; arc=pass (i=1 spf=pass spfdomain=linaro.org dkim=pass dkdomain=linaro.org dmarc=pass fromdomain=linaro.org); spf=pass (google.com: domain of linux-kernel+bounces-206127-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-206127-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 013141F22DDB for ; Fri, 7 Jun 2024 13:23:56 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BF0F5194C8C; Fri, 7 Jun 2024 13:23:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="hHATsWRF" Received: from mail-lf1-f50.google.com (mail-lf1-f50.google.com [209.85.167.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 EC60919415E for ; Fri, 7 Jun 2024 13:23:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.50 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717766591; cv=none; b=D6qXEhY1cJ+RObRMroSpuxtyKJa+sOcK/yISg6QT8lCtizwvJ8e/RHpWyeYH+UgJ86nDkQ+kjzzQZi/P+Z+qhPWtM9p+l/g1v9uSDXimd6j48F41TFmBH3nlmt+OCR1A6tWV+AtVRzDPJAeXbjWxjiPMdakfMV2g2bGhYOFKvh0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717766591; c=relaxed/simple; bh=ATNJtCzOXDVp1OKwxiEV9jk7WYH4jasM/bHZPYZfo4g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZMCor1ipgYZaimk+LOwUTA3a3hhuy2uymjk5fvRd7+mjOsCex/f1vL4hn9zYjkF9EtHevvbrL5UFwTGh74yc0x0BvY/DxNi0Gy6kPFwaGXCIRgjtfMH0YUs0SXiBdial53QFCQwnPWS3MozpOR/YOdswYAMYdLT+bfX0Rn3vF6s= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org; spf=pass smtp.mailfrom=linaro.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b=hHATsWRF; arc=none smtp.client-ip=209.85.167.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-lf1-f50.google.com with SMTP id 2adb3069b0e04-52bc27cfb14so422993e87.0 for ; Fri, 07 Jun 2024 06:23:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1717766588; x=1718371388; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=d6C2WBjw85TMMZ9GIIugc3NhLWza5ZaClpp5YdwIj3Y=; b=hHATsWRFSRG1upYvCZCLPrw1eVr2DYqrdUD7NKg9l6alDT0tf78GSgj/UjqjYvXwG6 BJPpV4xTTOnAvc0HA6KOEqoq+ymN1fIh2lKEagRcYEo14URkgxig2yGMKb5AhWmiaEAD ixnsPkYHma4uakQw+RyU3eJ3qd/azSbb4a9sGwfkQyqIV7E/S/PSBeV8FKxL6Ucni+s+ jIORkDdyqmH8V1oqjA9hA6lkOeBIIcpUA7fDBQPvWi74JRMdYyO4VrqJENRcGKweLdwc y6rSMyhvfyS8CetBg6+GYnsBzvyfvn65yvssl146JEsiRN8+cMIzbEThn//HXX+rvlpv icqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717766588; x=1718371388; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=d6C2WBjw85TMMZ9GIIugc3NhLWza5ZaClpp5YdwIj3Y=; b=hOQUOQkeblkMfqju/+2Wvn3UYwqrUKlCJj6MkbY3Q3ZAeUCWTB5+gUUd/v/pfnnimA djeASsCvvEf9YAqTZq+UTkdx0KhE3xDBrUUagCakN0lDIRr0gaC/stKMVgEPYZoKgrba tTwbmcmD/c0Gvt1NS5pvG2FDvKPcOQJu8sHECR4c/4tgyJgygxtcHLv6ysQJUxy2NF/k yTtd5r7wfIt0KN0pGLIeOS7tiEMCS3jj1UJUHTnQzN4vtc2RD+4xInkApakBNYBhyblA fyqJQp3CAJJCjdwOb2X0NohFqPswxII1h43PNIH+Ed5g+NdAzNiOtwPa1oVGCqTNCquL Vlqw== X-Forwarded-Encrypted: i=1; AJvYcCVEUtf/XEZZfNCvGmksh8QLcBJINFsyJlFXwVpMFPcp8tEGI4jzAuvxwsdZNsY2geSKdahFx36tnvAgcqXLa86SzIvc48crC/Gen/i5 X-Gm-Message-State: AOJu0YzU+PKdUieeMdi0IXKA784lvBrbsoYkxR/FyB8D3yuCmz8FrTyD XgJsEUu+18GyVHpWl8OSPb0WK0XYrONozfIngO//5sp2mIopc8eTIyPqqM6Lnow= X-Received: by 2002:a05:6512:5c6:b0:52b:9530:f0b9 with SMTP id 2adb3069b0e04-52bb9fd8c7fmr1765707e87.67.1717766588037; Fri, 07 Jun 2024 06:23:08 -0700 (PDT) Received: from umbar.lan ([192.130.178.91]) by smtp.gmail.com with ESMTPSA id 2adb3069b0e04-52bc27640easm80944e87.104.2024.06.07.06.23.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 07 Jun 2024 06:23:07 -0700 (PDT) From: Dmitry Baryshkov Date: Fri, 07 Jun 2024 16:23:01 +0300 Subject: [PATCH v5 4/9] drm/msm/hdmi: switch to atomic bridge callbacks Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20240607-bridge-hdmi-connector-v5-4-ab384e6021af@linaro.org> References: <20240607-bridge-hdmi-connector-v5-0-ab384e6021af@linaro.org> In-Reply-To: <20240607-bridge-hdmi-connector-v5-0-ab384e6021af@linaro.org> To: Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Daniel Vetter , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten Cc: dri-devel@lists.freedesktop.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org, Dmitry Baryshkov X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=openpgp-sha256; l=2170; i=dmitry.baryshkov@linaro.org; h=from:subject:message-id; bh=ATNJtCzOXDVp1OKwxiEV9jk7WYH4jasM/bHZPYZfo4g=; b=owEBbQGS/pANAwAKAYs8ij4CKSjVAcsmYgBmYwm2pVFRim5aY30nLbQ1ioxf5cLI53C8wh4y+ oW0k/2ldPeJATMEAAEKAB0WIQRMcISVXLJjVvC4lX+LPIo+Aiko1QUCZmMJtgAKCRCLPIo+Aiko 1dWPB/9U75hLW4yxzPnUtMrXjokMKyYjy5944uLa49im7YSrXOjsCQQzVETe9Qy1CjP6GnpqfSQ 7d+++cJ+KeMq/6OUvhVf5RpyRdmKYXupEr4ZxhV5C78apq9Q7VsE6ZP2KRGbfgH0FWNvh/Vue+C 1R8NKGXYgzHf3nJOtcQE4hvPUVt3s442NTxITBVQZoFUTGFLb6jTmc26Wi1iSdiDdUJbm5ClINP +Sp9/hRNbujhAZC+pfdh964CWKBGq07T8y8eCYrYsLmUrGD2GwPKjdwjNNM0xZmi1vj9DJTK+Qe lhEpo904/WdltMnPfxeiZwxzu/rMwO/8IxfX3ywVrS+vjzgZ X-Developer-Key: i=dmitry.baryshkov@linaro.org; a=openpgp; fpr=8F88381DD5C873E4AE487DA5199BF1243632046A Change MSM HDMI bridge to use atomic_* callbacks in preparation to enablign the HDMI connector support. Acked-by: Maxime Ripard Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c index 4a5b5112227f..d839c71091dc 100644 --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c @@ -126,7 +126,8 @@ static void msm_hdmi_config_avi_infoframe(struct hdmi *hdmi) hdmi_write(hdmi, REG_HDMI_INFOFRAME_CTRL1, val); } -static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge) +static void msm_hdmi_bridge_atomic_pre_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; @@ -152,7 +153,8 @@ static void msm_hdmi_bridge_pre_enable(struct drm_bridge *bridge) msm_hdmi_hdcp_on(hdmi->hdcp_ctrl); } -static void msm_hdmi_bridge_post_disable(struct drm_bridge *bridge) +static void msm_hdmi_bridge_atomic_post_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct hdmi_bridge *hdmi_bridge = to_hdmi_bridge(bridge); struct hdmi *hdmi = hdmi_bridge->hdmi; @@ -299,8 +301,11 @@ static enum drm_mode_status msm_hdmi_bridge_mode_valid(struct drm_bridge *bridge } static const struct drm_bridge_funcs msm_hdmi_bridge_funcs = { - .pre_enable = msm_hdmi_bridge_pre_enable, - .post_disable = msm_hdmi_bridge_post_disable, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, + .atomic_pre_enable = msm_hdmi_bridge_atomic_pre_enable, + .atomic_post_disable = msm_hdmi_bridge_atomic_post_disable, .mode_set = msm_hdmi_bridge_mode_set, .mode_valid = msm_hdmi_bridge_mode_valid, .edid_read = msm_hdmi_bridge_edid_read, -- 2.39.2