From patchwork Tue Sep 3 19:06:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 11128621 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E694A14DE for ; Tue, 3 Sep 2019 19:06:59 +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 CE9C722D6D for ; Tue, 3 Sep 2019 19:06:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CE9C722D6D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch 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 67316897F0; Tue, 3 Sep 2019 19:06:59 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A5A7897F0 for ; Tue, 3 Sep 2019 19:06:58 +0000 (UTC) Received: by mail-ed1-x543.google.com with SMTP id z9so14308307edq.8 for ; Tue, 03 Sep 2019 12:06:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ckY/KAeiZDB3HVlWWtTrREXRk00i+gfuUAhn7BUyNQc=; b=YH2HG6B0WbcbwTQ8fCL0WbLDOYq4TELehNvdwSffnfU+Hc1fRR+di98W2vHPNKMZCT p3u3v6jl8SmJa6uiUSLcFvJgeTfh8/jvi2bT52wK5KCYDp0gO64UFCzsILUD19tBfd3z gK6cWxQyLspgJ6mO82IZmL+shBtYdPSepaMnN4hncr8yLu3kpD779gtI0DgFLqs/Iqt0 KeZoNRFIfEKTj0I2LMWWkEuyxunGZAoUpH113A+HNQWxbK9EPcB3nFzt4mZPfFuaSArz RdsRkx0uxbWZRk+nm8SqNBPjviXYufyCPbgsBMiOJi5dX5Y+FFI3jE6nOhaX4BRU/W1A 8tYA== X-Gm-Message-State: APjAAAUgu+B8IA22C5AU6dvg/K5oQBUoYWAbi1ONDMSrsCby6TMa8dqf nOCOPVvGoclbxzc1Qr9j6kc4cw== X-Google-Smtp-Source: APXvYqx1BOkLWrBFwYTyatQP2rtihPWcoLWBj195C0eN89jv+ZkAeI6xRXFztEdEdx+ijWV2lChkuQ== X-Received: by 2002:a17:906:c802:: with SMTP id cx2mr29826265ejb.114.1567537617137; Tue, 03 Sep 2019 12:06:57 -0700 (PDT) Received: from phenom.ffwll.local (212-51-149-96.fiber7.init7.net. [212.51.149.96]) by smtp.gmail.com with ESMTPSA id b12sm3655583edj.93.2019.09.03.12.06.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Sep 2019 12:06:56 -0700 (PDT) From: Daniel Vetter To: DRI Development Date: Tue, 3 Sep 2019 21:06:40 +0200 Message-Id: <20190903190642.32588-1-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ckY/KAeiZDB3HVlWWtTrREXRk00i+gfuUAhn7BUyNQc=; b=HcguDoinyhyklB70paAwAOsIanu+sNgBF0yAcpJHLx3t0bOo4u5VOKazsy/uNHnGkF doqd6Nx3eF0PJTgC8nyUow73FANyqbLGFiYOEqQBnKilYlk1pFIV3s2QTt9gQSDMSHVP BQtkWGqNHAkmHQp0BRaOIFWbPz9NwimF7mA5M= Subject: [Intel-gfx] [PATCH 1/3] drm/atomic: Take the atomic toys away from X X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.23 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 , stable@vger.kernel.org, Adam Jackson , Alex Deucher , Daniel Vetter , =?utf-8?q?Michel_D=C3=A4nzer?= Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" 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. References: https://gitlab.freedesktop.org/xorg/xserver/issues/629 References: https://gitlab.freedesktop.org/xorg/xserver/merge_requests/180 Cc: Maarten Lankhorst Cc: Michel Dänzer Cc: Alex Deucher Cc: Adam Jackson Cc: Sean Paul Cc: David Airlie Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter Reviewed-by: Maarten Lankhorst --- drivers/gpu/drm/drm_ioctl.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/drm_ioctl.c b/drivers/gpu/drm/drm_ioctl.c index 2c120c58f72d..1cb7b4c3c87c 100644 --- a/drivers/gpu/drm/drm_ioctl.c +++ b/drivers/gpu/drm/drm_ioctl.c @@ -334,6 +334,9 @@ drm_setclientcap(struct drm_device *dev, void *data, struct drm_file *file_priv) file_priv->universal_planes = req->value; break; case DRM_CLIENT_CAP_ATOMIC: + /* The modesetting DDX has a totally broken idea of atomic. */ + if (strstr(current->comm, "X")) + return -EOPNOTSUPP; if (!drm_core_check_feature(dev, DRIVER_ATOMIC)) return -EOPNOTSUPP; if (req->value > 1)