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 X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 00E5AC38A2A for ; Fri, 8 May 2020 12:24:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BF6E8207DD for ; Fri, 8 May 2020 12:24:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="bJBsN1zy"; dkim=pass (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="M2G3UVLq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726811AbgEHMYX (ORCPT ); Fri, 8 May 2020 08:24:23 -0400 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:57039 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726712AbgEHMYW (ORCPT ); Fri, 8 May 2020 08:24:22 -0400 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 58CEC5800C7; Fri, 8 May 2020 08:24:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 08 May 2020 08:24:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=B lIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E7k=; b=bJBsN1zyTF5L2u4YQ wdiIrOWRm3rSGJnFBgh771GQtIwh09ZhPVNl4yIbKhVIqORlJgQ6fr4K9xTrYmrA mXWfKa8w5CjBu//+MNbXA90Ow1/obJsAqCNexzelZqNPL1GOGsg0DeSSKMLuRoZM 0hvTaojp2/oTzmIXLnee3uknaeTlr63oXqjWo1OwTK2qd9oQ9adWFqAvmA2YieIH JneIRRx4h3efAXKe0ZaO1eTph7OVTM7wNdIGbTi0v+59+veiM4uOubqB4r9W9B3K dDhGikKJqp6o1kJL0jhAI1V0kT6wzB1MCoIEWNRMMFOKb8b4k0qu+jWnjVJYHEYD cJthA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=BlIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E 7k=; b=M2G3UVLq/tw9h4fO/w2o38F6sW//kCALR03GMjnERs4d3EbdCY2gGVD/f Ur7wNlQ9VVBllvKvMpxCmILYSrqU/vAfurM2U4SlM6OJUfaCWEPyQsOEFvplNdEh Z04r3hfNva7Keam2EE+m1sDiJmQn+z8NxGJj7y+E8ImDEBRknoIH7VwsIIoDZ9SO onp8AZopRzitZMLPrA2ceKoCFX1GOFrpXsqLhpjfxUwOdz+midxdY5woUofIRizh PfHySEbyzfQoC/W6Wor3XFBUNMFKJK8YpfF58BpAHTjcqFtT2nfgxFIGDcRBd325 jNCnBC86u0m4cMle16YHJUxGNX63A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkedvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttddunecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeefieffje fhhfeiueelueekfeehtedutdegteetleelteeggeetfeeffefhfeekvdenucffohhmrghi nhepfhhrvggvuggvshhkthhophdrohhrghenucfkphepkeefrdekiedrkeelrddutdejne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghg sehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id D429D30661F4; Fri, 8 May 2020 08:24:18 -0400 (EDT) Date: Fri, 8 May 2020 14:24:15 +0200 From: Greg KH To: Yves-Alexis Perez Cc: Daniel Vetter , DRI Development , Intel Graphics Development , Ilia Mirkin , Maarten Lankhorst , Nicholas Kazlauskas , Michel =?iso-8859-1?Q?D=E4nzer?= , Alex Deucher , Adam Jackson , Sean Paul , David Airlie , Rob Clark , stable@vger.kernel.org, Daniel Vetter Subject: Re: [PATCH] drm/atomic: Take the atomic toys away from X Message-ID: <20200508122415.GA27371@kroah.com> References: <20190903190642.32588-1-daniel.vetter@ffwll.ch> <20190905185318.31363-1-daniel.vetter@ffwll.ch> <2a05f4c4362d386d298a06a67f2f528ef603a734.camel@debian.org> <20200508095426.GA3778290@kroah.com> <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Fri, May 08, 2020 at 01:59:17PM +0200, Yves-Alexis Perez wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > > On Fri, 2020-05-08 at 11:54 +0200, Greg KH wrote: > > > Hi Daniel and Greg (especially). It seems that this patch was never > > > applied to > > > stable, maybe it fell through the cracks? > > > > What patch is "this patch"? > > Sorry, the patch was in the mail I was replying to: > > commit 26b1d3b527e7bf3e24b814d617866ac5199ce68d > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > > drm/atomic: Take the atomic toys away from X > > > > > > It doesn't apply as-is in 4.19 branch but a small change in the context > > > makes > > > it apply. I'm experiencing issues with lightdm and vt-switch in Debian > > > Buster > > > (which has a 4.19 kernel) so I'd appreciate if the patch was included in > > > at > > > least that release. > > > > What is the git commit id of the patch in Linus's tree? If you have a > > working backport, that makes it much easier than hoping I can fix it > > up... > > The commit id is in Linus tree is 26b1d3b527e7bf3e24b814d617866ac5199ce68d. To > apply properly 69fdf4206a8ba91a277b3d50a3a05b71247635b2 would need to be > cherry-picked as well but it wasn't marked for stable so I didn't bother and > only fixed the context. Here's the backport to 4.19, compile and runtime > tested. It does fix the issue for me (like it did on mainline). > > So I guess > Tested-By: Yves-Alexis Perez > > commit 8a99914f7b539542622dc571c82d6cd203bddf64 > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > > drm/atomic: Take the atomic toys away from X > > The -modesetting ddx has a totally broken idea of how atomic works: > - doesn't disable old connectors, assuming they get auto-disable like > with the legacy setcrtc > - assumes ASYNC_FLIP is wired through for the atomic ioctl > - not a single call to TEST_ONLY > > Iow the implementation is a 1:1 translation of legacy ioctls to > atomic, which is a) broken b) pointless. > > We already have bugs in both i915 and amdgpu-DC where this prevents us > from enabling neat features. > > If anyone ever cares about atomic in X we can easily add a new atomic > level (req->value == 2) for X to get back the shiny toys. > > Since these broken versions of -modesetting have been shipping, > there's really no other way to get out of this bind. > > v2: > - add an informational dmesg output (Rob, Ajax) > - reorder after the DRIVER_ATOMIC check to avoid useless noise (Ilia) > - allow req->value > 2 so that X can do another attempt at atomic in > the future > > v3: Go with paranoid, insist that the X should be first (suggested by > Rob) > > Cc: Ilia Mirkin > References: https://gitlab.freedesktop.org/xorg/xserver/issues/629 > References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/180 > References: abbc0697d5fb ("drm/fb: revert the i915 Actually configure > untiled displays from master") > Cc: Maarten Lankhorst > Reviewed-by: Maarten Lankhorst (v1) > Reviewed-by: Nicholas Kazlauskas (v1) > Cc: Michel Dänzer > Cc: Alex Deucher > Cc: Adam Jackson > Acked-by: Adam Jackson > Cc: Sean Paul > Cc: David Airlie > Cc: Rob Clark > Acked-by: Rob Clark > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Vetter > Link: > https://patchwork.freedesktop.org/patch/msgid/20190905185318.31363-1-daniel.vetter@ffwll.ch > > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index ba129b64b61f..b92682f037b2 100644 > - --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -321,7 +321,12 @@ drm_setclientcap(struct drm_device *dev, void *data, > struct drm_file *file_priv) > case DRM_CLIENT_CAP_ATOMIC: > if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) > return -EINVAL; > - - if (req->value > 1) > + /* The modesetting DDX has a totally broken idea of atomic. */ > + if (current->comm[0] == 'X' && req->value == 1) { > + pr_info("broken atomic modeset userspace detected, > disabling atomic\n"); > + return -EOPNOTSUPP; > + } > + if (req->value > 2) > return -EINVAL; > file_priv->atomic = req->value; > file_priv->universal_planes = req->value; > This is line-wrapped and can not be applied :( Ugh, let me see if I can do this by hand... greg k-h 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 X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A83D1C38A2A for ; Fri, 8 May 2020 12:24:29 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 78249207DD for ; Fri, 8 May 2020 12:24:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="bJBsN1zy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="M2G3UVLq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 78249207DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B3F196E1F4; Fri, 8 May 2020 12:24:26 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AD016E1D8; Fri, 8 May 2020 12:24:25 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 58CEC5800C7; Fri, 8 May 2020 08:24:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 08 May 2020 08:24:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=B lIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E7k=; b=bJBsN1zyTF5L2u4YQ wdiIrOWRm3rSGJnFBgh771GQtIwh09ZhPVNl4yIbKhVIqORlJgQ6fr4K9xTrYmrA mXWfKa8w5CjBu//+MNbXA90Ow1/obJsAqCNexzelZqNPL1GOGsg0DeSSKMLuRoZM 0hvTaojp2/oTzmIXLnee3uknaeTlr63oXqjWo1OwTK2qd9oQ9adWFqAvmA2YieIH JneIRRx4h3efAXKe0ZaO1eTph7OVTM7wNdIGbTi0v+59+veiM4uOubqB4r9W9B3K dDhGikKJqp6o1kJL0jhAI1V0kT6wzB1MCoIEWNRMMFOKb8b4k0qu+jWnjVJYHEYD cJthA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=BlIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E 7k=; b=M2G3UVLq/tw9h4fO/w2o38F6sW//kCALR03GMjnERs4d3EbdCY2gGVD/f Ur7wNlQ9VVBllvKvMpxCmILYSrqU/vAfurM2U4SlM6OJUfaCWEPyQsOEFvplNdEh Z04r3hfNva7Keam2EE+m1sDiJmQn+z8NxGJj7y+E8ImDEBRknoIH7VwsIIoDZ9SO onp8AZopRzitZMLPrA2ceKoCFX1GOFrpXsqLhpjfxUwOdz+midxdY5woUofIRizh PfHySEbyzfQoC/W6Wor3XFBUNMFKJK8YpfF58BpAHTjcqFtT2nfgxFIGDcRBd325 jNCnBC86u0m4cMle16YHJUxGNX63A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkedvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttddunecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeefieffje fhhfeiueelueekfeehtedutdegteetleelteeggeetfeeffefhfeekvdenucffohhmrghi nhepfhhrvggvuggvshhkthhophdrohhrghenucfkphepkeefrdekiedrkeelrddutdejne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghg sehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id D429D30661F4; Fri, 8 May 2020 08:24:18 -0400 (EDT) Date: Fri, 8 May 2020 14:24:15 +0200 From: Greg KH To: Yves-Alexis Perez Subject: Re: [PATCH] drm/atomic: Take the atomic toys away from X Message-ID: <20200508122415.GA27371@kroah.com> References: <20190903190642.32588-1-daniel.vetter@ffwll.ch> <20190905185318.31363-1-daniel.vetter@ffwll.ch> <2a05f4c4362d386d298a06a67f2f528ef603a734.camel@debian.org> <20200508095426.GA3778290@kroah.com> <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , Intel Graphics Development , DRI Development , Michel =?iso-8859-1?Q?D=E4nzer?= , stable@vger.kernel.org, Daniel Vetter , Sean Paul , Nicholas Kazlauskas Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Fri, May 08, 2020 at 01:59:17PM +0200, Yves-Alexis Perez wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > = > On Fri, 2020-05-08 at 11:54 +0200, Greg KH wrote: > > > Hi Daniel and Greg (especially). It seems that this patch was never > > > applied to > > > stable, maybe it fell through the cracks? > > = > > What patch is "this patch"? > = > Sorry, the patch was in the mail I was replying to: > = > commit 26b1d3b527e7bf3e24b814d617866ac5199ce68d > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > = > drm/atomic: Take the atomic toys away from X > = > > = > > > It doesn't apply as-is in 4.19 branch but a small change in the conte= xt > > > makes > > > it apply. I'm experiencing issues with lightdm and vt-switch in Debian > > > Buster > > > (which has a 4.19 kernel) so I'd appreciate if the patch was included= in > > > at > > > least that release. > > = > > What is the git commit id of the patch in Linus's tree? If you have a > > working backport, that makes it much easier than hoping I can fix it > > up... > = > The commit id is in Linus tree is 26b1d3b527e7bf3e24b814d617866ac5199ce68= d. To > apply properly 69fdf4206a8ba91a277b3d50a3a05b71247635b2 would need to be > cherry-picked as well but it wasn't marked for stable so I didn't bother = and > only fixed the context. Here's the backport to 4.19, compile and runtime > tested. It does fix the issue for me (like it did on mainline). > = > So I guess > Tested-By: Yves-Alexis Perez > = > commit 8a99914f7b539542622dc571c82d6cd203bddf64 > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > = > drm/atomic: Take the atomic toys away from X > = > The -modesetting ddx has a totally broken idea of how atomic works: > - doesn't disable old connectors, assuming they get auto-disable like > with the legacy setcrtc > - assumes ASYNC_FLIP is wired through for the atomic ioctl > - not a single call to TEST_ONLY > = > Iow the implementation is a 1:1 translation of legacy ioctls to > atomic, which is a) broken b) pointless. > = > We already have bugs in both i915 and amdgpu-DC where this prevents us > from enabling neat features. > = > If anyone ever cares about atomic in X we can easily add a new atomic > level (req->value =3D=3D 2) for X to get back the shiny toys. > = > Since these broken versions of -modesetting have been shipping, > there's really no other way to get out of this bind. > = > v2: > - add an informational dmesg output (Rob, Ajax) > - reorder after the DRIVER_ATOMIC check to avoid useless noise (Ilia) > - allow req->value > 2 so that X can do another attempt at atomic in > the future > = > v3: Go with paranoid, insist that the X should be first (suggested by > Rob) > = > Cc: Ilia Mirkin > References: https://gitlab.freedesktop.org/xorg/xserver/issues/629 > References: https://gitlab.freedesktop.org/xorg/xserver/merge_request= s/180 > References: abbc0697d5fb ("drm/fb: revert the i915 Actually configure > untiled displays from master") > Cc: Maarten Lankhorst > Reviewed-by: Maarten Lankhorst (v= 1) > Reviewed-by: Nicholas Kazlauskas (v1) > Cc: Michel D=E4nzer > Cc: Alex Deucher > Cc: Adam Jackson > Acked-by: Adam Jackson > Cc: Sean Paul > Cc: David Airlie > Cc: Rob Clark > Acked-by: Rob Clark > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Vetter > Link: = > https://patchwork.freedesktop.org/patch/msgid/20190905185318.31363-1-dani= el.vetter@ffwll.ch > = > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index ba129b64b61f..b92682f037b2 100644 > - --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -321,7 +321,12 @@ drm_setclientcap(struct drm_device *dev, void *data, > struct drm_file *file_priv) > case DRM_CLIENT_CAP_ATOMIC: > if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) > return -EINVAL; > - - if (req->value > 1) > + /* The modesetting DDX has a totally broken idea of atomic. */ > + if (current->comm[0] =3D=3D 'X' && req->value =3D=3D 1) { > + pr_info("broken atomic modeset userspace detected, > disabling atomic\n"); > + return -EOPNOTSUPP; > + } > + if (req->value > 2) > return -EINVAL; > file_priv->atomic =3D req->value; > file_priv->universal_planes =3D req->value; > = This is line-wrapped and can not be applied :( Ugh, let me see if I can do this by hand... greg k-h _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel 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 X-Spam-Level: X-Spam-Status: No, score=-6.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 17C93C47247 for ; Fri, 8 May 2020 12:24:27 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E2811207DD for ; Fri, 8 May 2020 12:24:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kroah.com header.i=@kroah.com header.b="bJBsN1zy"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=messagingengine.com header.i=@messagingengine.com header.b="M2G3UVLq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E2811207DD Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6FE876E19B; Fri, 8 May 2020 12:24:26 +0000 (UTC) Received: from new1-smtp.messagingengine.com (new1-smtp.messagingengine.com [66.111.4.221]) by gabe.freedesktop.org (Postfix) with ESMTPS id 5AD016E1D8; Fri, 8 May 2020 12:24:25 +0000 (UTC) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailnew.nyi.internal (Postfix) with ESMTP id 58CEC5800C7; Fri, 8 May 2020 08:24:21 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Fri, 08 May 2020 08:24:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:content-transfer-encoding:in-reply-to; s=fm3; bh=B lIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E7k=; b=bJBsN1zyTF5L2u4YQ wdiIrOWRm3rSGJnFBgh771GQtIwh09ZhPVNl4yIbKhVIqORlJgQ6fr4K9xTrYmrA mXWfKa8w5CjBu//+MNbXA90Ow1/obJsAqCNexzelZqNPL1GOGsg0DeSSKMLuRoZM 0hvTaojp2/oTzmIXLnee3uknaeTlr63oXqjWo1OwTK2qd9oQ9adWFqAvmA2YieIH JneIRRx4h3efAXKe0ZaO1eTph7OVTM7wNdIGbTi0v+59+veiM4uOubqB4r9W9B3K dDhGikKJqp6o1kJL0jhAI1V0kT6wzB1MCoIEWNRMMFOKb8b4k0qu+jWnjVJYHEYD cJthA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; bh=BlIPUWSMF61h4hKE0RpIdoM6DZF7DIUr3CtwDb11E 7k=; b=M2G3UVLq/tw9h4fO/w2o38F6sW//kCALR03GMjnERs4d3EbdCY2gGVD/f Ur7wNlQ9VVBllvKvMpxCmILYSrqU/vAfurM2U4SlM6OJUfaCWEPyQsOEFvplNdEh Z04r3hfNva7Keam2EE+m1sDiJmQn+z8NxGJj7y+E8ImDEBRknoIH7VwsIIoDZ9SO onp8AZopRzitZMLPrA2ceKoCFX1GOFrpXsqLhpjfxUwOdz+midxdY5woUofIRizh PfHySEbyzfQoC/W6Wor3XFBUNMFKJK8YpfF58BpAHTjcqFtT2nfgxFIGDcRBd325 jNCnBC86u0m4cMle16YHJUxGNX63A== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduhedrkedvgdehudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggugfgjsehtkeertddttddunecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeefieffje fhhfeiueelueekfeehtedutdegteetleelteeggeetfeeffefhfeekvdenucffohhmrghi nhepfhhrvggvuggvshhkthhophdrohhrghenucfkphepkeefrdekiedrkeelrddutdejne cuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepghhrvghg sehkrhhorghhrdgtohhm X-ME-Proxy: Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) by mail.messagingengine.com (Postfix) with ESMTPA id D429D30661F4; Fri, 8 May 2020 08:24:18 -0400 (EDT) Date: Fri, 8 May 2020 14:24:15 +0200 From: Greg KH To: Yves-Alexis Perez Message-ID: <20200508122415.GA27371@kroah.com> References: <20190903190642.32588-1-daniel.vetter@ffwll.ch> <20190905185318.31363-1-daniel.vetter@ffwll.ch> <2a05f4c4362d386d298a06a67f2f528ef603a734.camel@debian.org> <20200508095426.GA3778290@kroah.com> <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <177a9ed3375957e40b295e20bb6b42663a784a74.camel@debian.org> Subject: Re: [Intel-gfx] [PATCH] drm/atomic: Take the atomic toys away from X X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , Intel Graphics Development , DRI Development , Michel =?iso-8859-1?Q?D=E4nzer?= , Adam Jackson , stable@vger.kernel.org, Alex Deucher , Daniel Vetter , Nicholas Kazlauskas , Ilia Mirkin Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Fri, May 08, 2020 at 01:59:17PM +0200, Yves-Alexis Perez wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA256 > = > On Fri, 2020-05-08 at 11:54 +0200, Greg KH wrote: > > > Hi Daniel and Greg (especially). It seems that this patch was never > > > applied to > > > stable, maybe it fell through the cracks? > > = > > What patch is "this patch"? > = > Sorry, the patch was in the mail I was replying to: > = > commit 26b1d3b527e7bf3e24b814d617866ac5199ce68d > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > = > drm/atomic: Take the atomic toys away from X > = > > = > > > It doesn't apply as-is in 4.19 branch but a small change in the conte= xt > > > makes > > > it apply. I'm experiencing issues with lightdm and vt-switch in Debian > > > Buster > > > (which has a 4.19 kernel) so I'd appreciate if the patch was included= in > > > at > > > least that release. > > = > > What is the git commit id of the patch in Linus's tree? If you have a > > working backport, that makes it much easier than hoping I can fix it > > up... > = > The commit id is in Linus tree is 26b1d3b527e7bf3e24b814d617866ac5199ce68= d. To > apply properly 69fdf4206a8ba91a277b3d50a3a05b71247635b2 would need to be > cherry-picked as well but it wasn't marked for stable so I didn't bother = and > only fixed the context. Here's the backport to 4.19, compile and runtime > tested. It does fix the issue for me (like it did on mainline). > = > So I guess > Tested-By: Yves-Alexis Perez > = > commit 8a99914f7b539542622dc571c82d6cd203bddf64 > Author: Daniel Vetter > Date: Thu Sep 5 20:53:18 2019 +0200 > = > drm/atomic: Take the atomic toys away from X > = > The -modesetting ddx has a totally broken idea of how atomic works: > - doesn't disable old connectors, assuming they get auto-disable like > with the legacy setcrtc > - assumes ASYNC_FLIP is wired through for the atomic ioctl > - not a single call to TEST_ONLY > = > Iow the implementation is a 1:1 translation of legacy ioctls to > atomic, which is a) broken b) pointless. > = > We already have bugs in both i915 and amdgpu-DC where this prevents us > from enabling neat features. > = > If anyone ever cares about atomic in X we can easily add a new atomic > level (req->value =3D=3D 2) for X to get back the shiny toys. > = > Since these broken versions of -modesetting have been shipping, > there's really no other way to get out of this bind. > = > v2: > - add an informational dmesg output (Rob, Ajax) > - reorder after the DRIVER_ATOMIC check to avoid useless noise (Ilia) > - allow req->value > 2 so that X can do another attempt at atomic in > the future > = > v3: Go with paranoid, insist that the X should be first (suggested by > Rob) > = > Cc: Ilia Mirkin > References: https://gitlab.freedesktop.org/xorg/xserver/issues/629 > References: https://gitlab.freedesktop.org/xorg/xserver/merge_request= s/180 > References: abbc0697d5fb ("drm/fb: revert the i915 Actually configure > untiled displays from master") > Cc: Maarten Lankhorst > Reviewed-by: Maarten Lankhorst (v= 1) > Reviewed-by: Nicholas Kazlauskas (v1) > Cc: Michel D=E4nzer > Cc: Alex Deucher > Cc: Adam Jackson > Acked-by: Adam Jackson > Cc: Sean Paul > Cc: David Airlie > Cc: Rob Clark > Acked-by: Rob Clark > Cc: stable@vger.kernel.org > Signed-off-by: Daniel Vetter > Link: = > https://patchwork.freedesktop.org/patch/msgid/20190905185318.31363-1-dani= el.vetter@ffwll.ch > = > diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c > index ba129b64b61f..b92682f037b2 100644 > - --- a/drivers/gpu/drm/drm_ioctl.c > +++ b/drivers/gpu/drm/drm_ioctl.c > @@ -321,7 +321,12 @@ drm_setclientcap(struct drm_device *dev, void *data, > struct drm_file *file_priv) > case DRM_CLIENT_CAP_ATOMIC: > if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) > return -EINVAL; > - - if (req->value > 1) > + /* The modesetting DDX has a totally broken idea of atomic. */ > + if (current->comm[0] =3D=3D 'X' && req->value =3D=3D 1) { > + pr_info("broken atomic modeset userspace detected, > disabling atomic\n"); > + return -EOPNOTSUPP; > + } > + if (req->value > 2) > return -EINVAL; > file_priv->atomic =3D req->value; > file_priv->universal_planes =3D req->value; > = This is line-wrapped and can not be applied :( Ugh, let me see if I can do this by hand... greg k-h _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx