From mboxrd@z Thu Jan 1 00:00:00 1970 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 06C573DBD6F for ; Sat, 18 Jul 2026 15:42:26 +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=1784389353; cv=none; b=LGF5zqcp5lz4/MXSR9HBc5tZ0Q7HHhMcZzlY7oIKN1eugzODUg73NKdG3zURlqTeeYWsmbEUh1LDjTrIyBfdrdUjgbcKE1tt6GX+YFD8zJvuTR+zznR9sWIVzrlNPakrGD3qedh2OOJNeculSnTYDsm05KgRYrVHZyl900yEJi0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784389353; c=relaxed/simple; bh=eAsLMecAnxHiwSrqw+SWBNcXmYoYosvxye5mdDucG+4=; h=Mime-Version:Content-Type:Date:Message-Id:Cc:Subject:From:To: References:In-Reply-To; b=PDzSCWW+15TshfCaxdKozHLOrswux+X7xRokNmODyyeuYKyvcKjwYPJfMoB07+O5jl+E5cxQ1ZgoIzjJU2GnIM0wkE/1DKaUteHGvpGht0en4XGBbXCGalT8zj8O4/lGNptqtl/5e+Xv6r8Ui4iwHgrSzj7fvprQMkNzDGDsXbs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com; spf=pass smtp.mailfrom=oss.qualcomm.com; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b=l9F6S0Gn; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b=Odq0IRSq; arc=none smtp.client-ip=205.220.168.131 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.qualcomm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=qualcomm.com header.i=@qualcomm.com header.b="l9F6S0Gn"; dkim=pass (2048-bit key) header.d=oss.qualcomm.com header.i=@oss.qualcomm.com header.b="Odq0IRSq" Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 66IDD9Mj947820 for ; Sat, 18 Jul 2026 15:42:20 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=qualcomm.com; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to; s=qcppdkim1; bh= B3Tozc6XvAyXDRXhNm08ssVPc4HklhucZjeYpfFjPmA=; b=l9F6S0Gnb2vjgD6a NBQfReSJBOyCIXwIUgjQE9ha1CjdNnqVi17UErZCTYSlBRo/TxMbCbjqKp2d0Yy8 2grbSegaeCpYWBsCtdZz1Mn3v8FEv1j5UcVICfCZoIiXa6CDvpkRuAbnTODcJZ/U B2BcXlqo9x1yKCfP3m63lMsLAwNF6umECQ3O2BYkakRH9Y3pltrWALui4/z2ZZDB Oohi70BkTEVI9LYX4Az4ZXFHWOAsSgFmcQVj/yBR+bc/KWRawPM7IARiYuzeczGl 2Z7prJm/hdBFhaSSwCdQjPyC6p/fQJ948P1wqkX9Tl6bHTlDilZ5bfpKV/jZ9sV8 GzU+Jw== Received: from mail-pg1-f197.google.com (mail-pg1-f197.google.com [209.85.215.197]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 4fg2d9120u-1 (version=TLSv1.3 cipher=TLS_AES_128_GCM_SHA256 bits=128 verify=NOT) for ; Sat, 18 Jul 2026 15:42:20 +0000 (GMT) Received: by mail-pg1-f197.google.com with SMTP id 41be03b00d2f7-cab3e9cd922so4296953a12.0 for ; Sat, 18 Jul 2026 08:42:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oss.qualcomm.com; s=google; t=1784389339; x=1784994139; darn=vger.kernel.org; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:from:to:cc :subject:date:message-id:reply-to:content-type; bh=B3Tozc6XvAyXDRXhNm08ssVPc4HklhucZjeYpfFjPmA=; b=Odq0IRSqNKLnSy+ETSuzBUYrd18Sm/lbRyUaBTgW5qrxomYPbf1E9+bG0RkHHMTa7N IwOY1tiJI2xbx2AR7tX6zEsqeRrIgvdPGJMuD34Wu9D14uwJjut5LPc4daLTkGMcNzLH GZjoPoRko1xBFZSX0d4F0ncSc+1fQRDMT4dEEJDjWIs4ie2FOchnEHwpgO2ENumAyYXJ 9q13eetOG50hXqETZwNf7vhOPhmV+ZeJh+iqPgX2KmcXCLyctoBGVqfxGyfhDpSByFNu Hzl0EesIxLVVdDemBppLXgigdhZWEZRt+3dXKNRFUIxWnLdstGQOcxm2yIAB5gB05IJX W6Eg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784389339; x=1784994139; h=in-reply-to:references:to:from:subject:cc:message-id:date :content-type:content-transfer-encoding:mime-version:x-gm-gg :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to :content-type; bh=B3Tozc6XvAyXDRXhNm08ssVPc4HklhucZjeYpfFjPmA=; b=p6p7dXgqeZ7ZXXTuF2gz+8fjjK5xStCbBq9ex4Qozaqu874gFyDU+F6RLVSwe+nvIX U2APVAVbwcbveqrd7Qcuhj0DyjXBSVgsIiyAQoA08oNWtUiZzQ+T+EQU/DjNnlqHmJzS nmCobyvST0IJixldcL12i2XRr/N6IEzHlMlZPlaM8kM0Fvq2k2kH2DNYuRi/yKL4WetE UvRo/z6ZB0tKcgfLVDMgbkK06BCF7jyseBfy+q8KiUicdhQIs/x/M9xWNKtk4FC6iWQ4 i12g2WP5sItk945IErshOhnfodeHMCD2KQYyUtHr/Ss4BmkkljOEweeB+fmtraP4aBbS EzQw== X-Forwarded-Encrypted: i=1; AHgh+RrYStJqxKguITwKDPQj53CcJwMBbw1xK/azNjKCMSt30ZkkEPBiYpBxljCNj+OzsyqfAfzwQjBWxdB4Y+U=@vger.kernel.org X-Gm-Message-State: AOJu0Yx3vj0//on13WoH9313QDCEL7vtTt/uU6COy7db9/gor8J0WupC gPggjFt4WNmPpPDHolLSsFIEI+gxtWvHrvR0Fpl3lwl9TDDOIfwM0GH68Ic1m/1CY503IChTcMd UJaN1CPP06BGoEPVNQQXzYfCGBceSwkRqMBVwcMEiYQ5rDTwN/66/tFoIAhcJBmxYgYhkjqm3V4 HVynLT X-Gm-Gg: AfdE7cnrI/UkeoCPBjSCQz7CfyCXu/9a94ATli1BtOhBl97p119C3ZrGFyWS8S+b1dh 0q85/BvjbdxEKADJINlIrbVvhLpq9+iCl3MbaqGkmoUAysYZQIAlxka4a/k/xTpwhS1PbTNu1rQ riXKxrwoNqKYdQp9mTVLiDP3QuBN4c3rhiPsAQ+FWwQk6gPnDtlMe46EpFkBf07RGe3Fej1ILPO StR3SD9/NYYrhqeFp7c7+bcGwDf2iNhX3rC2egnJRnAvfF2aHjY733kY/jepjGlZenX9Gc6Ep5D eZwhMovr3b6ddQvfcCGUxcEkt1X30yUMZ8ina+sphjbvH+cpY/9A4G/kLhVkDJY4V53kgiLVvzO ZI3syeQ== X-Received: by 2002:a05:6300:95:b0:3bf:e2f1:1b08 with SMTP id adf61e73a8af0-3c3ad9717d4mr7925885637.40.1784389339433; Sat, 18 Jul 2026 08:42:19 -0700 (PDT) X-Received: by 2002:a05:6300:95:b0:3bf:e2f1:1b08 with SMTP id adf61e73a8af0-3c3ad9717d4mr7925851637.40.1784389338852; Sat, 18 Jul 2026 08:42:18 -0700 (PDT) Received: from localhost ([188.253.117.185]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-31429f9d439sm22974922eec.5.2026.07.18.08.42.13 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 18 Jul 2026 08:42:18 -0700 (PDT) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=UTF-8 Date: Sat, 18 Jul 2026 23:42:10 +0800 Message-Id: Cc: , , , , , Subject: Re: [PATCH v2 5/8] drm/gm12u320: replace struct drm_simple_display_pipe with regular atomic helpers From: "Ze Huang" To: "Thomas Zimmermann" , "Ze Huang" , "Alexey Brodkin" , "Maarten Lankhorst" , "Maxime Ripard" , "David Airlie" , "Simona Vetter" , "Joel Stanley" , "Andrew Jeffery" , "Frank Li" , "Sascha Hauer" , "Pengutronix Kernel Team" , "Fabio Estevam" , "Linus Walleij" , "Hans de Goede" , "Alex Lanzano" , "Oleksandr Andrushchenko" X-Mailer: aerc 0.21.0-0-g5549850facc2 References: <20260716-drm-simple-kms-removal-v2-0-1133a8fc3785@oss.qualcomm.com> <20260716-drm-simple-kms-removal-v2-5-1133a8fc3785@oss.qualcomm.com> <26981ae1-4aef-4965-8600-f5e30a1b564a@suse.de> In-Reply-To: <26981ae1-4aef-4965-8600-f5e30a1b564a@suse.de> X-Authority-Analysis: v=2.4 cv=HpxG3UTS c=1 sm=1 tr=0 ts=6a5b9edc cx=c_pps a=rz3CxIlbcmazkYymdCej/Q==:117 a=RQ3dwY0XcLBFaqRX7rIGyg==:17 a=IkcTkHD0fZMA:10 a=RAioF0-LDSMA:10 a=s4-Qcg_JpJYA:10 a=VkNPw1HP01LnGYTKEx00:22 a=u7WPNUs3qKkmUXheDGA7:22 a=Um2Pa8k9VHT-vaBCBUpS:22 a=EUspDBNiAAAA:8 a=ZBS7nKAnUslcPLfxFb0A:9 a=QEXdDO2ut3YA:10 a=bFCP_H2QrGi7Okbo017w:22 X-Proofpoint-GUID: -ZX-Ydmqeh5w8evJEXEE3wUYK9vG9xXH X-Proofpoint-ORIG-GUID: -ZX-Ydmqeh5w8evJEXEE3wUYK9vG9xXH X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYwNzE4MDE2MyBTYWx0ZWRfXyGjNfNJt6/+G BKklnuE3AqAnJjxXVCp3bMRWxCsEqbECrAI5xyuAXBWFUfJ5kzY+jlDi5G90eFSJ6HsHJj0DaUp R97Yf4kDohdiewAJEvTrB+szDI2MN8APc0B9IVUxM4xPqSYI1sCHwtOttxVLWaDZAcGmsPn2RfM k4jA+Myd3Hp34GFLJpGThl9p7OeuOvHSvO0Ofng0bwz5QZRwprdfHVBW4qi7I7qGvrQBBVyuOGL p8LwF7BG/bsNkQ3nfLNoTVpM6XLzNPW+gbR5+LuBtNxpGKZqi4LsxyZrFSSzpRhQaUbtToyplQW 3fQnu+CxshpYbM1WWlcc7+GgsdsHLkNB3JuZ5Z9wLIfHUW2nyxREr0qGz42XbfikDTppneUdC8e oD7vGr3T5EI9R2fLuogQrC0TWVCK5XMAzKUaD1M6wN8GUfUz2SNBV4rd9X2BQhD4J24/XrCpzbX aPlXwpSgGGZ6PIvSJFw== X-Proofpoint-Spam-Info: AW1haW4tMjYwNzE4MDE2MyBTYWx0ZWRfX/3TfoNIJ60nT elr5K3sUSXcCnOZHAym631tYFxoo/EfdqZsgwN4P2a4WbGx9Vihl9etv+QO6IdFCIgiA7Bg/bwM VS5BCRNXX48bs0ZEGuA8XMsmsfavipk= X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1143,Hydra:6.1.134,FMLib:17.12.100.49 definitions=2026-07-18_04,2026-07-17_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 impostorscore=0 malwarescore=0 clxscore=1015 priorityscore=1501 adultscore=0 spamscore=0 suspectscore=0 lowpriorityscore=0 bulkscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2606150000 definitions=main-2607180163 On Fri Jul 17, 2026 at 3:18 PM CST, Thomas Zimmermann wrote: > Hi > > Am 16.07.26 um 11:01 schrieb Ze Huang: >> Convert gm12u320 to direct primary plane, CRTC and encoder setup. >> >> Keep shadow-plane helper state, framebuffer access helpers and >> no-scaling plane-state check from simple-KMS path. >> >> Reviewed-by: Thomas Zimmermann >> Tested-by: Thomas Zimmermann >> Signed-off-by: Ze Huang >> --- >> drivers/gpu/drm/tiny/gm12u320.c | 132 ++++++++++++++++++++++++++++++++= -------- >> 1 file changed, 107 insertions(+), 25 deletions(-) >> > [...] >> =20 >> -static void gm12u320_pipe_enable(struct drm_simple_display_pipe *pipe, >> - struct drm_crtc_state *crtc_state, >> - struct drm_plane_state *plane_state) >> +static void gm12u320_crtc_helper_atomic_enable(struct drm_crtc *crtc, >> + struct drm_atomic_commit *commit) >> { >> struct drm_rect rect =3D { 0, 0, GM12U320_USER_WIDTH, GM12U320_HEIGHT= }; >> - struct gm12u320_device *gm12u320 =3D to_gm12u320(pipe->crtc.dev); >> + struct gm12u320_device *gm12u320 =3D to_gm12u320(crtc->dev); >> + struct drm_plane_state *plane_state =3D gm12u320->plane.state; > > Did you see the reply from the Sashiko bot? > > What happens is that user space can apply multiple atomic commits in a=20 > row, but they are applied to hardware asynchronously. So if you take the= =20 > plane state here directly from the plane, it could have been replaced by= =20 > a later atomic commit already.=C2=A0 Rather get the correct plane state w= ith=20 > the helper drm_atomic_get_new_plane_state(). > I think I misunderstood this point. I had assumed that drm_atomic_get_*_state() was only needed for the state object directly matching the helper callback, for example crtc_state in *_crtc_helper_atomic_enable() and plane_state in *_plane_helper_atomic_update(), while other state could be accessed via the device-private structure. >From your explanation, I see that this is wrong. In the atomic commit path, any state associated with the current commit should be obtained through drm_atomic_get_*_state(), because the object=E2=80=99s ->state may already refer to a later commit. > I did not look at all of the series' patches for this problem, but the ru= le > applies to all of the mode-setting code. > > Best regards > Thomas This affects other patches in the series as well, and some drivers may need additional fixes in internal helpers too, e.g. arc_pgu_set_pxl_fmt() in arcpgu.c [1]. I will audit the full series and fix such cases in the next version. Best regards Ze