From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 75C2ACCFA18 for ; Wed, 12 Nov 2025 02:44:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:References:Content-Type: Content-Transfer-Encoding:MIME-Version:Message-ID:Date:Subject:In-Reply-To:Cc :To:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yOWODANQDIHMfLu0rwnPfEXOOr2ZhK5K8qrgiyRk9cg=; b=PTy42BTQyg+9y3bQHqlWWi//Dg +/TM6ojPKe2Y9ys6YZV9NbW6AaBQ2YzusoJxavr8iCm6ARynRJ2dK95PvlGpSmb/tvxpOfZ3BHrPZ KcNZv0grBYQ27XECwPze4zq17KFHcepbR0htGHZuOcrIV6ciYabmoKK/XxXzzIY1AQhBvnQ4gnoED kft6L+2l+GSDGgXRYrJNhJkKPiLq+5QHvPR9ro72ByJJIX9SG6XndWJEwYkPRKVE7zzbn/xwcUTmV 1MKgIcKvcUx8s6yjrS8v326uAuqYg5/Jh0v6ew52fzamYGw+7m9pYm0A6Z6WObEH/5NfTGt/6RlW/ hA5qrMMA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJ0qe-000000082Ch-1pSz; Wed, 12 Nov 2025 02:44:40 +0000 Received: from [203.254.224.25] (helo=mailout2.samsung.com) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1vJ0qb-000000082C8-0RlC for linux-arm-kernel@lists.infradead.org; Wed, 12 Nov 2025 02:44:39 +0000 Received: from epcas2p1.samsung.com (unknown [182.195.41.53]) by mailout2.samsung.com (KnoxPortal) with ESMTP id 20251112024427epoutp02e1b5abc7725b44c357a5fb3b80ec502f~3IkceQQBu2645726457epoutp02W for ; Wed, 12 Nov 2025 02:44:27 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout2.samsung.com 20251112024427epoutp02e1b5abc7725b44c357a5fb3b80ec502f~3IkceQQBu2645726457epoutp02W DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1762915468; bh=yOWODANQDIHMfLu0rwnPfEXOOr2ZhK5K8qrgiyRk9cg=; h=From:To:Cc:In-Reply-To:Subject:Date:References:From; b=YJHmufgYEvlLJz8obeav2XLl0nrq0QEfnxZEdKeqZIY4LHV+FL7GX/ewKbD7/Sfb3 H9F+NkSutI5fO/rMsObe12B+GP0RnrALpmpcfCa9GOZE1ppDK/LSGHL8aMAIhm0+j2 Gsn7TEjg4Qhd48TBf9LZD/VeTF7WQKge99VK5TdE= Received: from epsnrtp03.localdomain (unknown [182.195.42.155]) by epcas2p1.samsung.com (KnoxPortal) with ESMTPS id 20251112024427epcas2p170cb0b4b978d81daff8bc7c88295d370~3IkcB9zdH1160111601epcas2p1q; Wed, 12 Nov 2025 02:44:27 +0000 (GMT) Received: from epcas2p2.samsung.com (unknown [182.195.38.208]) by epsnrtp03.localdomain (Postfix) with ESMTP id 4d5nmW0sB7z3hhT7; Wed, 12 Nov 2025 02:44:27 +0000 (GMT) Received: from epsmtip1.samsung.com (unknown [182.195.34.30]) by epcas2p2.samsung.com (KnoxPortal) with ESMTPA id 20251112024426epcas2p2aca7746bef270abaec0ae578405f48a7~3IkbGjLlV2914629146epcas2p2Q; Wed, 12 Nov 2025 02:44:26 +0000 (GMT) Received: from KORCO180968 (unknown [12.80.207.170]) by epsmtip1.samsung.com (KnoxPortal) with ESMTPA id 20251112024426epsmtip1b3344ef6680e6abf662312475b3240e3~3IkbBjKhd2474724747epsmtip1j; Wed, 12 Nov 2025 02:44:26 +0000 (GMT) From: To: "'Inki Dae'" Cc: "'Seung-Woo Kim'" , "'Kyungmin Park'" , "'David Airlie'" , "'Simona Vetter'" , "'Krzysztof Kozlowski'" , "'Alim Akhtar'" , , , , In-Reply-To: Subject: RE: [PATCH 1/3] drm/exynos: plane: Disable fully off-screen planes instead of zero-sized update Date: Wed, 12 Nov 2025 11:44:26 +0900 Message-ID: <000001dc537e$42b8bc20$c82a3460$@samsung.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: Microsoft Outlook 16.0 Thread-Index: AQKrEiEoxOdjyVP8b+iXtap5zLOX/ADk05gtAXiteQICvjd5q7MlRQUg Content-Language: ko X-CMS-MailID: 20251112024426epcas2p2aca7746bef270abaec0ae578405f48a7 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-Sendblock-Type: AUTO_CONFIDENTIAL CMS-TYPE: 102P cpgsPolicy: CPGSC10-234,Y X-CFilter-Loop: Reflected X-CMS-RootMailID: 20250929042917epcas2p4c8f375cc2355b3a48141cdddb04a01c4 References: <20250929043110.3631025-1-hy_fifty.lee@samsung.com> <20250929043110.3631025-2-hy_fifty.lee@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20251111_184437_779415_18F84BBB X-CRM114-Status: GOOD ( 10.09 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org > -----Original Message----- > From: Inki Dae > Sent: Monday, November 10, 2025 11:24 AM > To: Hoyoung Lee > Cc: Seung-Woo Kim ; Kyungmin Park > ; David Airlie ; Simona > Vetter ; Krzysztof Kozlowski ; Alim > Akhtar ; dri-devel=40lists.freedesktop.org; li= nux- > arm-kernel=40lists.infradead.org; linux-samsung-soc=40vger.kernel.org; li= nux- > kernel=40vger.kernel.org > Subject: Re: =5BPATCH 1/3=5D drm/exynos: plane: Disable fully off-screen > planes instead of zero-sized update >=20 > Thanks for contribution, >=20 > 2025=EB=85=84=209=EC=9B=94=2029=EC=9D=BC=20(=EC=9B=94)=20=EC=98=A4=ED=9B= =84=201:29,=20Hoyoung=20Lee=20=EB=8B=98=EC=9D= =B4=20=EC=9E=91=0D=0A>=20=EC=84=B1:=0D=0A>=20>=0D=0A>=20>=20Some=20configur= ations=20require=20additional=20actions=20when=20all=20windows=20are=0D=0A>= =20>=20disabled=20to=20keep=20DECON=20operating=20correctly.=20Programming= =20a=20zero-sized=0D=0A>=20>=20window=20in=20->atomic_update()=20leaves=20t= he=20plane=20logically=20enabled=20and=20can=0D=0A>=20>=20bypass=20those=20= disable=20semantics.=0D=0A>=20>=0D=0A>=20>=20Treat=20a=20fully=20off-screen= =20plane=20as=20not=20visible=20and=20take=20the=20explicit=0D=0A>=20>=20di= sable=20path.=0D=0A>=20>=0D=0A>=20>=20Implementation=20details:=0D=0A>=20>= =20-=20exynos_plane_mode_set():=20if=20computed=20actual_w/actual_h=20is=20= zero,=20mark=0D=0A>=20>=20=20=20state->visible=20=3D=20false=20and=20return= =20early.=0D=0A>=20>=20-=20exynos_plane_atomic_check():=20if=20=21visible,= =20skip=20further=20checks=20and=0D=0A>=20>=20=20=20return=200.=0D=0A>=20>= =20-=20exynos_plane_atomic_update():=20if=20=21visible,=20call=20->disable_= plane();=0D=0A>=20>=20=20=20otherwise=20call=20->update_plane().=0D=0A>=20>= =0D=0A>=20>=20No=20functional=20change=20for=20visible=20planes;=20off-scre= en=20planes=20are=20now=0D=0A>=20>=20cleanly=20disabled,=20ensuring=20the= =20disable=20hooks=20run=20consistently.=0D=0A>=20>=0D=0A>=20>=20Signed-off= -by:=20Hoyoung=20Lee=20=0D=0A>=20>=20---=0D=0A>= =20>=20=20drivers/gpu/drm/exynos/exynos_drm_plane.c=20=7C=2012=20++++++++++= +-=0D=0A>=20>=20=201=20file=20changed,=2011=20insertions(+),=201=20deletion= (-)=0D=0A>=20>=0D=0A>=20>=20diff=20--git=20a/drivers/gpu/drm/exynos/exynos_= drm_plane.c=0D=0A>=20>=20b/drivers/gpu/drm/exynos/exynos_drm_plane.c=0D=0A>= =20>=20index=207c3aa77186d3..842974154d79=20100644=0D=0A>=20>=20---=20a/dri= vers/gpu/drm/exynos/exynos_drm_plane.c=0D=0A>=20>=20+++=20b/drivers/gpu/drm= /exynos/exynos_drm_plane.c=0D=0A>=20>=20=40=40=20-91,6=20+91,11=20=40=40=20= static=20void=20exynos_plane_mode_set(struct=0D=0A>=20exynos_drm_plane_stat= e=20*exynos_state)=0D=0A>=20>=20=20=20=20=20=20=20=20=20actual_w=20=3D=20ex= ynos_plane_get_size(crtc_x,=20crtc_w,=20mode->hdisplay);=0D=0A>=20>=20=20= =20=20=20=20=20=20=20actual_h=20=3D=20exynos_plane_get_size(crtc_y,=20crtc_= h,=0D=0A>=20>=20mode->vdisplay);=0D=0A>=20>=0D=0A>=20>=20+=20=20=20=20=20= =20=20if=20(=21actual_w=20=7C=7C=20=21actual_h)=20=7B=0D=0A>=20>=20+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20state->visible=20=3D=20false;=0D=0A>= =20=0D=0A>=20The=20state->visible=20field=20in=20the=20DRM=20atomic=20frame= work=20is=20set=20to=20true=20only=0D=0A>=20when=20the=20following=20condit= ions=20are=20met:=0D=0A>=20-=20Both=20state->crtc=20and=20state->fb=20are= =20present=20(having=20only=20one=20of=20them=0D=0A>=20results=20in=20an=20= error).=0D=0A>=20-=20src_w/src_h=20and=20crtc_w/crtc_h=20are=20non-zero.=0D= =0A>=20-=20The=20source=20rectangle=20does=20not=20exceed=20the=20framebuff= er=20bounds=20(e.g.,=20src_x=0D=0A>=20+=20src_w=20<=3D=20fb->width).=0D=0A>= =20-=20Rotation=20and=20clipping=20checks=20pass=20successfully.=0D=0A>=20= =0D=0A>=20However,=20this=20patch=20modifies=20the=20state->visible=20value= =20within=20vendor-=0D=0A>=20specific=20code.=20Doing=20so=20can=20be=20pro= blematic=20because=20it=20overrides=20a=20field=0D=0A>=20that=20is=20manage= d=20by=20the=20DRM=20atomic=20framework.=20Even=20if=20it=20currently=20wor= ks,=0D=0A>=20it=20may=20lead=20to=20unexpected=20behavior=20in=20the=20futu= re.=0D=0A>=20=0D=0A>=20For=20example,=20if=20the=20DRM=20atomic=20framework= =20sets=20visible=20=3D=20true=20after=0D=0A>=20validating=20the=20above=20= conditions=20and=20begins=20processing=20certain=20logic,=20but=0D=0A>=20th= e=20vendor=20driver=20later=20changes=20it=20to=20false,=20the=20framework= =20may=20still=0D=0A>=20assume=20the=20variable=20remains=20true,=20resulti= ng=20in=20inconsistent=20states.=0D=0A>=20=0D=0A>=20Turning=20off=20a=20pla= ne=20when=20it=20doesn=E2=80=99t=20need=20to=20be=20displayed=20is=20a=20go= od=20idea=20I=0D=0A>=20think.=20You=20might=20consider=20contributing=20thi= s=20behavior=20upstream=20so=20it=20can=20be=0D=0A>=20properly=20handled=20= within=20the=20DRM=20atomic=20framework=20itself.=0D=0A>=20=0D=0A>=20Thanks= ,=0D=0A>=20Inki=20Dae=0D=0A>=20=0D=0A>=20>=20+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20return;=0D=0A>=20>=20+=20=20=20=20=20=20=20=7D=0D=0A>=20>= =20+=0D=0A>=20>=20=20=20=20=20=20=20=20=20if=20(crtc_x=20<=200)=20=7B=0D=0A= >=20>=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20if=20(actual_w)=0D= =0A>=20>=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20src_x=20+=3D=20((-crtc_x)=20*=20exynos_state->h_ratio)=0D=0A>=20>= =20>>=2016;=20=40=40=20-244,6=20+249,9=20=40=40=20static=20int=20exynos_pla= ne_atomic_check(struct=0D=0A>=20drm_plane=20*plane,=0D=0A>=20>=20=20=20=20= =20=20=20=20=20/*=20translate=20state=20into=20exynos_state=20*/=0D=0A>=20>= =20=20=20=20=20=20=20=20=20exynos_plane_mode_set(exynos_state);=0D=0A>=20>= =0D=0A>=20>=20+=20=20=20=20=20=20=20if=20(=21new_plane_state->visible)=0D= =0A>=20>=20+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20return=200;=0D=0A>= =20>=20+=0D=0A>=20>=20=20=20=20=20=20=20=20=20ret=20=3D=20exynos_drm_plane_= check_format(exynos_plane->config,=0D=0A>=20exynos_state);=0D=0A>=20>=20=20= =20=20=20=20=20=20=20if=20(ret)=0D=0A>=20>=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20return=20ret;=0D=0A>=20>=20=40=40=20-263,8=20+271,10=20= =40=40=20static=20void=20exynos_plane_atomic_update(struct=0D=0A>=20drm_pla= ne=20*plane,=0D=0A>=20>=20=20=20=20=20=20=20=20=20if=20(=21new_state->crtc)= =0D=0A>=20>=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20return;=0D=0A= >=20>=0D=0A>=20>=20-=20=20=20=20=20=20=20if=20(exynos_crtc->ops->update_pla= ne)=0D=0A>=20>=20+=20=20=20=20=20=20=20if=20(new_state->visible=20&&=20exyn= os_crtc->ops->update_plane)=0D=0A>=20>=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20exynos_crtc->ops->update_plane(exynos_crtc,=0D=0A>=20>=20exy= nos_plane);=0D=0A>=20>=20+=20=20=20=20=20=20=20else=20if=20(exynos_crtc->op= s->disable_plane)=0D=0A>=20>=20+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20exynos_crtc->ops->disable_plane(exynos_crtc,=0D=0A>=20>=20+=20exynos_pla= ne);=0D=0A>=20>=20=20=7D=0D=0A>=20>=0D=0A>=20>=20=20static=20void=20exynos_= plane_atomic_disable(struct=20drm_plane=20*plane,=0D=0A>=20>=20--=0D=0A>=20= >=202.34.1=0D=0A>=20>=0D=0A>=20>=0D=0A=0D=0AHi=20Inki,=0D=0AThanks=20for=20= the=20review.=0D=0A=0D=0AI=20agree=20that=20mutating=20state->visible=20val= ue=20in=20vendor=20code=20is=20risky.=0D=0ARather=20than=20touching=20the= =20DRM=20atomic=20framework=20or=20that=20field,=20how=20about=20we=20add= =20a=20driver-private=20flag=20in=20Exynos(e.g.=20exynos_drm_plane_state->v= isible)=20and=20use=20that=20instead?=0D=0AIf=20this=20approach=20sounds=20= reasonable=20to=20you,=20I=E2=80=99ll=20spin=20a=20v2=20along=20these=20lin= es.=0D=0A=0D=0ABRs,=0D=0AHoyoung=20Lee=0D=0A=0D=0A=0D=0A