Received: by 2002:ab2:69cc:0:b0:1fd:c486:4f03 with SMTP id n12csp535589lqp; Tue, 11 Jun 2024 11:28:17 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCXmvU9Uf739u3U2LIkf4cCV61hxMQOYg62ymkC0SHQR8Cy9GehEARNP73p8zpmJc31z7kx+mvksIIdwSp9hud6ggyJ1l/tXTxCTffGxVw== X-Google-Smtp-Source: AGHT+IH16ufxhhNRQK9DkUM4QSMzjTBoTlJdXGOpEdVcvjlRm1zJUTFrN3fjz9hPwCMBE6WXQ5fj X-Received: by 2002:a17:902:b197:b0:1f6:a606:539e with SMTP id d9443c01a7336-1f6d03c8933mr105378865ad.61.1718130497280; Tue, 11 Jun 2024 11:28:17 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718130497; cv=pass; d=google.com; s=arc-20160816; b=aTTbRz3xZ4bEOnkDih/0wcHiEUGwQZKBc+z/h7eTyxUJA4BLB8GG3VxX5VPI2VgXtk magkYUgV1Zb2bfXmqWx4XfZz5oFq1Do4z4WBtw9gtOk/SsARJswOsLh25XszKOicyR3u /n/KoglwfMGzdy5lCHzp8WGWPUdqW2aF2S+qFgeq3Ft38XKRAqgirN9TmJBiO6Me4ZhT EfnQOCsu+IgKJLCJZ7HgBeT44Gv6n+fwlPLNXQ4zpGFozZ6l9uE3WY0P377JdfEdx/z6 EYYLzU7HmAV7oz7q+ZPbP8hJVBSdc1ZW/rLX4VRHtMnrunlMmnGh7KkwWRMl1BaxRue6 MeNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id:dkim-signature; bh=4YJ8Lhmst0xeBjIowrNmTmfZV+TnLyVmo1as+S8SgFY=; fh=uMVMzA90YS+HimnbIlFeSYL+pOmhxzmT74V2Khioqio=; b=lC0FCeONRJH5IFIhqu71aNn6WgPT+a8yvx8dskViK6Hbh6drIakVsLMOv8oml4dtWu EGSlrBX2cDWG6YTsqOGxmdeHTGI/XH7YJmHmjxTPemBWAQACsui5FfO4utvw4DYOUXam xZP6eBU1GXRQHLGInxgwiGgaBefLTOJp/mVmWZaSZPOS3B8dM76M/1UXDa2VNWPSriZU 7Bahi4K02v4kgtFVP0vkdnBqemYi9sPFLYDDbcsInh8CPbx0OvVcJGVsgCrv+4BKTeZI bcO0C94c4YkdG3gZZguZuG9jkaeggRmdA9/a3kNQ9sBVb27GHYQmx12f2bNLSIBlHEv+ MFSQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=C+svuxMk; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-210415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id d9443c01a7336-1f742e6b032si4315495ad.281.2024.06.11.11.28.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 11 Jun 2024 11:28:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-210415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcppdkim1 header.b=C+svuxMk; arc=pass (i=1 spf=pass spfdomain=quicinc.com dkim=pass dkdomain=quicinc.com dmarc=pass fromdomain=quicinc.com); spf=pass (google.com: domain of linux-kernel+bounces-210415-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-210415-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.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 126F2B25DB5 for ; Tue, 11 Jun 2024 18:18:02 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 1A80C6D1D7; Tue, 11 Jun 2024 18:17:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b="C+svuxMk" Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D2B64249E5; Tue, 11 Jun 2024 18:17:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=205.220.168.131 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718129873; cv=none; b=Qd0TEVJ7tDJ2zLmIIbIbGR6Ak+YbWXy4RSf1fwkaOy1oq2MnISKUjOHZ10Rl/bMpDI5rO8V6nBUBfPGWx2EQx3J7Mmaq/LmvIWll+njbMvirBM6V4uB4aBfi3QtHPMJh6WaAabFQMfLNp5sAJTgx+eNg4UCNbVSuHjGsnCDYbAw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718129873; c=relaxed/simple; bh=V5fJccGY35et0mUYl+GhicFanbbKht8a+d+z4VF4jDI=; h=Message-ID:Date:MIME-Version:Subject:To:CC:References:From: In-Reply-To:Content-Type; b=P2mlIiH7YKdCwWm0uRchtD9AiYKoN5VA9IwlLiYBFD2EbJFZ8TYiiII0h58pLwINeiBTp7B6R/8P5BP5DVM8MzRKfGMAOUqJ6MHgq11cfYIfpHm/6vwsqLOVAy3DR4J1/p00y9vrBVlo+/jAdc0hluIvmbQAFITsiBp7V4BZw00= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com; spf=pass smtp.mailfrom=quicinc.com; dkim=pass (2048-bit key) header.d=quicinc.com header.i=@quicinc.com header.b=C+svuxMk; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=quicinc.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=quicinc.com Received: from pps.filterd (m0279862.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 45BHHro0001180; Tue, 11 Jun 2024 18:17:41 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= 4YJ8Lhmst0xeBjIowrNmTmfZV+TnLyVmo1as+S8SgFY=; b=C+svuxMkIqhB8zZ3 183Rlp9fuUZ6I7kdtURu6bfJS4WEfNOw/Hu1Rl//5uzHFBH5bUpvfgdCMUZFTzOm yMSLO+X0r12z4mTnk3zk9y9Yul7uqlyVMIGWLr0QCr2SJFoS0HBLDIyn/YNQhRpr czS23QHR/5ykEiA4iVCq6F9ET7bHMJwbJAg9B2jip6pK26pu6zdXmOdVB/XtoddF hRl8v0WCAOu+lL2ImHHj+fnDMfBTYBER4gcEK/7BMGmwC8rthNUmEoIb7EEBjmx5 BTJMNTMvzgMwv/IO9QY/kKGdddNiM3vlhy2G3e4/BH30Yyz1mQ7CCjjfgtXRbDQQ zJdVKQ== Received: from nasanppmta04.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3yptuy04dn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jun 2024 18:17:41 +0000 (GMT) Received: from nasanex01b.na.qualcomm.com (nasanex01b.na.qualcomm.com [10.46.141.250]) by NASANPPMTA04.qualcomm.com (8.17.1.19/8.17.1.19) with ESMTPS id 45BIHe84007704 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 11 Jun 2024 18:17:40 GMT Received: from [10.71.108.229] (10.80.80.8) by nasanex01b.na.qualcomm.com (10.46.141.250) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.9; Tue, 11 Jun 2024 11:17:39 -0700 Message-ID: Date: Tue, 11 Jun 2024 11:17:39 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 03/14] drm/msm/hdmi: switch to atomic_pre_enable/post_disable Content-Language: en-US To: Dmitry Baryshkov , Rob Clark , Abhinav Kumar , Sean Paul , Marijn Suijten , "David Airlie" , Daniel Vetter CC: , , , References: <20240522-fd-hdmi-hpd-v2-0-c30bdb7c5c7e@linaro.org> <20240522-fd-hdmi-hpd-v2-3-c30bdb7c5c7e@linaro.org> From: Jessica Zhang In-Reply-To: <20240522-fd-hdmi-hpd-v2-3-c30bdb7c5c7e@linaro.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: nasanex01a.na.qualcomm.com (10.52.223.231) To nasanex01b.na.qualcomm.com (10.46.141.250) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-GUID: VPH_2qNgrISS_e7enANlTEWbXDd9PAbD X-Proofpoint-ORIG-GUID: VPH_2qNgrISS_e7enANlTEWbXDd9PAbD X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.28.16 definitions=2024-06-11_09,2024-06-11_01,2024-05-17_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 impostorscore=0 mlxscore=0 priorityscore=1501 lowpriorityscore=0 suspectscore=0 clxscore=1015 mlxlogscore=999 phishscore=0 spamscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.19.0-2405170001 definitions=main-2406110125 On 5/22/2024 3:50 AM, Dmitry Baryshkov wrote: > In preparation of reworking the HDMI mode setting, switch pre_enable and > post_disable callbacks to their atomic variants. > > Signed-off-by: Dmitry Baryshkov Reviewed-by: Jessica Zhang > --- > drivers/gpu/drm/msm/hdmi/hdmi_bridge.c | 15 +++++++++++---- > 1 file changed, 11 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c > index 9eb4d06bdc0e..3c6121c57b01 100644 > --- a/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c > +++ b/drivers/gpu/drm/msm/hdmi/hdmi_bridge.c > @@ -120,7 +120,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; > @@ -146,7 +147,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; > @@ -292,8 +294,13 @@ 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 >