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=-0.7 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 9D33CC33CB2 for ; Fri, 31 Jan 2020 07:34:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 55BE120CC7 for ; Fri, 31 Jan 2020 07:34:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=fooishbar-org.20150623.gappssmtp.com header.i=@fooishbar-org.20150623.gappssmtp.com header.b="W5QRTWPq" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728071AbgAaHeW (ORCPT ); Fri, 31 Jan 2020 02:34:22 -0500 Received: from mail-wr1-f65.google.com ([209.85.221.65]:46797 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728035AbgAaHeW (ORCPT ); Fri, 31 Jan 2020 02:34:22 -0500 Received: by mail-wr1-f65.google.com with SMTP id z7so7330715wrl.13 for ; Thu, 30 Jan 2020 23:34:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=W5QRTWPq5V1gfy2LTbkoaVWqpWIoew8i2DeZXV+kuXCdSPClSdS8DrQsRlQaLiqrn7 SabGhJ0iUS/0C9J+n+RaDAKKMwWFY6K5vb6OVMjFSFlUUU9UYeC80j6CVbXtvdWem14s IsH/Hjq9Oa5D0p7TSXPBQTztEm1Mcdgik97M1ALqmknH/s18LhzHAHlhoyE14iXhsW3W GiTb0w9nkasDAUls/iGZp+RyZP+T8wiYazTdY1DAVB4e7F6+Zeit+HobTIrVOuZbNaNp tbtcHlWhTEqviWnCbABW5hHpVC3tN9c40PnMngS1eOjUo5SqMFNmth405QeznNdb925G VSgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=AjgNTlEu83neftFbVWYdwP+NeCEFygPh0mjVBUKuh24N4Gjl3Cbz6jwSwdyUhyPlu1 8zkz+WJpOkg05zsERazRH52riAsac7IGGOUwN9lPVCUYhOVXH0iCWUGbODpZDCQkeA5o Mh+nY1LjjN/F0BZReUa1UKVyweIOuu+7vNnhKYZFowWzrYgQYdnBd3h4Oo/Ce0QXG6FC R+8kgOVopF1tNDa7sr5Hxjdp36xgvLIIGb5L+sbLXzbue3Eb8ShuGtSzcvKOYM1AjrGu BwYy8y7ufUk+WhpBnfRENeNlmgAywz0Fm3Dze7pyAg8owcVwsgIStIUD3E7iYGqVVEHx XW3A== X-Gm-Message-State: APjAAAXLQN0k3xTmQNXjb96X+IPLU45UmX36jgZ2VRgYkpA0hWHe0Aig Nb9oiwNDbucg0aOl63+YhD9lPwVg7PtQoUlTSFHkqJ6B X-Google-Smtp-Source: APXvYqxE2D1GUZqbFQ7juYd6KtGB0wWZIYc2Q/xIq23fGh/WL0GBK5zKH9bzu3lOwV9+kWP54Y3iKcuDHp21ot8TOJQ= X-Received: by 2002:a5d:6445:: with SMTP id d5mr8923297wrw.244.1580456059067; Thu, 30 Jan 2020 23:34:19 -0800 (PST) MIME-Version: 1.0 References: <20180705101043.4883-1-daniel.vetter@ffwll.ch> <20180705102121.5091-1-daniel.vetter@ffwll.ch> In-Reply-To: <20180705102121.5091-1-daniel.vetter@ffwll.ch> From: Daniel Stone Date: Fri, 31 Jan 2020 07:34:00 +0000 Message-ID: Subject: Re: [PATCH] drm: avoid spurious EBUSY due to nonblocking atomic modesets To: Daniel Vetter Cc: DRI Development , Intel Graphics Development , Pekka Paalanen , stable@vger.kernel.org, Daniel Vetter Content-Type: text/plain; charset="UTF-8" Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org On Thu, 5 Jul 2018 at 11:21, Daniel Vetter wrote: > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > pull in arbitrary other resources, including CRTCs (e.g. when > reconfiguring global resources). > > But in nonblocking mode userspace has then no idea this happened, > which can lead to spurious EBUSY calls, both: > - when that other CRTC is currently busy doing a page_flip the > ALLOW_MODESET commit can fail with an EBUSY > - on the other CRTC a normal atomic flip can fail with EBUSY because > of the additional commit inserted by the kernel without userspace's > knowledge > > For blocking commits this isn't a problem, because everyone else will > just block until all the CRTC are reconfigured. Only thing userspace > can notice is the dropped frames without any reason for why frames got > dropped. > > Consensus is that we need new uapi to handle this properly, but no one > has any idea what exactly the new uapi should look like. As a stop-gap > plug this problem by demoting nonblocking commits which might cause > issues by including CRTCs not in the original request to blocking > commits. Thanks for writing this up Daniel, and for reminding me about it some time later as well ... Reviewed-by: Daniel Stone Cheers, Daniel 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=-0.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED autolearn=no 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 9EE79C3F68F for ; Fri, 31 Jan 2020 07:34:23 +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 2C4402082E for ; Fri, 31 Jan 2020 07:34:23 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fooishbar-org.20150623.gappssmtp.com header.i=@fooishbar-org.20150623.gappssmtp.com header.b="W5QRTWPq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2C4402082E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org 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 D50AB6E94D; Fri, 31 Jan 2020 07:34:21 +0000 (UTC) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 90C626E94D for ; Fri, 31 Jan 2020 07:34:20 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id g17so7450243wro.2 for ; Thu, 30 Jan 2020 23:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=W5QRTWPq5V1gfy2LTbkoaVWqpWIoew8i2DeZXV+kuXCdSPClSdS8DrQsRlQaLiqrn7 SabGhJ0iUS/0C9J+n+RaDAKKMwWFY6K5vb6OVMjFSFlUUU9UYeC80j6CVbXtvdWem14s IsH/Hjq9Oa5D0p7TSXPBQTztEm1Mcdgik97M1ALqmknH/s18LhzHAHlhoyE14iXhsW3W GiTb0w9nkasDAUls/iGZp+RyZP+T8wiYazTdY1DAVB4e7F6+Zeit+HobTIrVOuZbNaNp tbtcHlWhTEqviWnCbABW5hHpVC3tN9c40PnMngS1eOjUo5SqMFNmth405QeznNdb925G VSgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=CwdSD4Z0JB/D7GjS60bct88afixXCdPHfzy1cr+HOFtyd9ZRsAb0qQB5LWBRCteV5Q gcfoU5amof9QNP5aYKUmb7ejjXj1E9l0b0nnGJ24Ce0yppIpAjf5xqbunpVMH7x0kgo3 afdg5n/N8YJ0A8vEWRIK5VZ/JnFmPcHitqW400gibBziAIdaEY1CU6DnNEpikelBRss6 0I5xf5jFtKziDm6pxHOOV6cxiUlLXL+2Yoz4D0E/12RoxhTG8LHufA+fyppIIPXfbK/G IqOBTUaciK3XH0USFhynPzdHmgHT1yJAmgUiT3cqL5ptAmbcZe5lgc/KCJX7TpVQTKVd rXxg== X-Gm-Message-State: APjAAAU0OTNUr3tJ3Jk+5X/Fr4IRtnoh/GKs+EUPc6QPJF+ZScM65Uau Att/dwchadR7SIxRcJrz+I9vvnFoE2vUL6KC8k1wgQ== X-Google-Smtp-Source: APXvYqxE2D1GUZqbFQ7juYd6KtGB0wWZIYc2Q/xIq23fGh/WL0GBK5zKH9bzu3lOwV9+kWP54Y3iKcuDHp21ot8TOJQ= X-Received: by 2002:a5d:6445:: with SMTP id d5mr8923297wrw.244.1580456059067; Thu, 30 Jan 2020 23:34:19 -0800 (PST) MIME-Version: 1.0 References: <20180705101043.4883-1-daniel.vetter@ffwll.ch> <20180705102121.5091-1-daniel.vetter@ffwll.ch> In-Reply-To: <20180705102121.5091-1-daniel.vetter@ffwll.ch> From: Daniel Stone Date: Fri, 31 Jan 2020 07:34:00 +0000 Message-ID: Subject: Re: [PATCH] drm: avoid spurious EBUSY due to nonblocking atomic modesets To: Daniel Vetter 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: Pekka Paalanen , Intel Graphics Development , stable@vger.kernel.org, DRI Development , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, 5 Jul 2018 at 11:21, Daniel Vetter wrote: > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > pull in arbitrary other resources, including CRTCs (e.g. when > reconfiguring global resources). > > But in nonblocking mode userspace has then no idea this happened, > which can lead to spurious EBUSY calls, both: > - when that other CRTC is currently busy doing a page_flip the > ALLOW_MODESET commit can fail with an EBUSY > - on the other CRTC a normal atomic flip can fail with EBUSY because > of the additional commit inserted by the kernel without userspace's > knowledge > > For blocking commits this isn't a problem, because everyone else will > just block until all the CRTC are reconfigured. Only thing userspace > can notice is the dropped frames without any reason for why frames got > dropped. > > Consensus is that we need new uapi to handle this properly, but no one > has any idea what exactly the new uapi should look like. As a stop-gap > plug this problem by demoting nonblocking commits which might cause > issues by including CRTCs not in the original request to blocking > commits. Thanks for writing this up Daniel, and for reminding me about it some time later as well ... Reviewed-by: Daniel Stone Cheers, Daniel _______________________________________________ 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=-0.6 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no 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 857AFC33CB2 for ; Fri, 31 Jan 2020 07:34: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 557212082E for ; Fri, 31 Jan 2020 07:34:27 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=fooishbar-org.20150623.gappssmtp.com header.i=@fooishbar-org.20150623.gappssmtp.com header.b="W5QRTWPq" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 557212082E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org 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 291AA6E94F; Fri, 31 Jan 2020 07:34:22 +0000 (UTC) Received: from mail-wr1-x441.google.com (mail-wr1-x441.google.com [IPv6:2a00:1450:4864:20::441]) by gabe.freedesktop.org (Postfix) with ESMTPS id 98D196E94F for ; Fri, 31 Jan 2020 07:34:20 +0000 (UTC) Received: by mail-wr1-x441.google.com with SMTP id z3so7432832wru.3 for ; Thu, 30 Jan 2020 23:34:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=W5QRTWPq5V1gfy2LTbkoaVWqpWIoew8i2DeZXV+kuXCdSPClSdS8DrQsRlQaLiqrn7 SabGhJ0iUS/0C9J+n+RaDAKKMwWFY6K5vb6OVMjFSFlUUU9UYeC80j6CVbXtvdWem14s IsH/Hjq9Oa5D0p7TSXPBQTztEm1Mcdgik97M1ALqmknH/s18LhzHAHlhoyE14iXhsW3W GiTb0w9nkasDAUls/iGZp+RyZP+T8wiYazTdY1DAVB4e7F6+Zeit+HobTIrVOuZbNaNp tbtcHlWhTEqviWnCbABW5hHpVC3tN9c40PnMngS1eOjUo5SqMFNmth405QeznNdb925G VSgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=owDgY2hN74svhwO6V6vESJaP7KSYIDvwh0UpgYJP8tc=; b=B0L9o4c5s804rAO+oQ6QyG+m1iDZ1HwJcuXqRh/x0MnBGccVIZ21RacUWER8YklChk I/EWveT9icxwoCXSZk81J4KvDjoHk2EjFXtgmtNzzWi1lQyD1mmdex+GaZPbeabes0lb 94/uxsRMt1dKgGbCMK5k+dDkPWUSil4uCFvgkJl+aDt+s8fjuqNuBD5npRY1e79rTMCV NZdSdoY5yzVXfE1XvF9465zGGznPawO5YbqcqBebAl2D5R9tBvptLBeWCbbk9ONNt5eJ uMhZmW0cnARMGbHilTDMQS6xD1EvcCZiSRvSa1xMg9FWnmfUgxEIgP0Nf4pek0pQY5hI j01w== X-Gm-Message-State: APjAAAVcSkk1McN7TL7uQ7HcEPRw/+T6T5C0BLdpWZCiNLqm2ILQzo9o AG6babOd1jEg/Bg/IwGZP6ATsrZWz92IVd9PITKrLA== X-Google-Smtp-Source: APXvYqxE2D1GUZqbFQ7juYd6KtGB0wWZIYc2Q/xIq23fGh/WL0GBK5zKH9bzu3lOwV9+kWP54Y3iKcuDHp21ot8TOJQ= X-Received: by 2002:a5d:6445:: with SMTP id d5mr8923297wrw.244.1580456059067; Thu, 30 Jan 2020 23:34:19 -0800 (PST) MIME-Version: 1.0 References: <20180705101043.4883-1-daniel.vetter@ffwll.ch> <20180705102121.5091-1-daniel.vetter@ffwll.ch> In-Reply-To: <20180705102121.5091-1-daniel.vetter@ffwll.ch> From: Daniel Stone Date: Fri, 31 Jan 2020 07:34:00 +0000 Message-ID: To: Daniel Vetter Subject: Re: [Intel-gfx] [PATCH] drm: avoid spurious EBUSY due to nonblocking atomic modesets 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: Pekka Paalanen , Intel Graphics Development , stable@vger.kernel.org, DRI Development , Daniel Vetter Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" On Thu, 5 Jul 2018 at 11:21, Daniel Vetter wrote: > When doing an atomic modeset with ALLOW_MODESET drivers are allowed to > pull in arbitrary other resources, including CRTCs (e.g. when > reconfiguring global resources). > > But in nonblocking mode userspace has then no idea this happened, > which can lead to spurious EBUSY calls, both: > - when that other CRTC is currently busy doing a page_flip the > ALLOW_MODESET commit can fail with an EBUSY > - on the other CRTC a normal atomic flip can fail with EBUSY because > of the additional commit inserted by the kernel without userspace's > knowledge > > For blocking commits this isn't a problem, because everyone else will > just block until all the CRTC are reconfigured. Only thing userspace > can notice is the dropped frames without any reason for why frames got > dropped. > > Consensus is that we need new uapi to handle this properly, but no one > has any idea what exactly the new uapi should look like. As a stop-gap > plug this problem by demoting nonblocking commits which might cause > issues by including CRTCs not in the original request to blocking > commits. Thanks for writing this up Daniel, and for reminding me about it some time later as well ... Reviewed-by: Daniel Stone Cheers, Daniel _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx