Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp23159513rwd; Fri, 30 Jun 2023 19:38:03 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5ZD0lkAlnOKdAq82/f034VNF7K8LKC+wQ/LZVT+7U4qV9D+wlTzIo3IvCpG1bHQ/14m2ER X-Received: by 2002:a05:6808:1827:b0:3a1:d763:40a6 with SMTP id bh39-20020a056808182700b003a1d76340a6mr5395956oib.38.1688179083387; Fri, 30 Jun 2023 19:38:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688179083; cv=none; d=google.com; s=arc-20160816; b=yJ839SfG0p5xZyQK/grMwTwXCf9YLuzBtimmoctzNlFwdP+lQlnKzDC77wHCdwUSNx JCJw0HR+PnvXhjVGOmKbpw5ryZgQ49TQ5OyXgblZ4fnrGtGitgHPU0H2JUG5VOslo98Q cfB2WgaGV42lKbohuhXUdoczFpq++5zAdQrL8NfVmFNABSLnTTTC8rv+fEyJj8pdIOuT LdzV6yzppROcsYl7Ek5vZJnGh9FRYlx7ZE5EIGjLU2YNEGru8lVFpyK1T8+X40QDUfA8 kWoORPgf8iEN9cjxtNTANMYRMkgLbObSZsuEdPETdwbQ7/+RusQl164SJ7ttF8CUJWpt 6dRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=DTlH1QZL9ONljiaNmWd/MfYuknpYQs+KwTmRxFWAUtk=; fh=yJKnCMONMPDb5DcRuNlFPqebkFeNCW1ydpZFk0usg5k=; b=MFZ8GdPdz3bz1jIS0HmddGM7Feji2JewVaICiBnMJEAywfgKYRNCV2jGnYV2sKDooB c0LAogug2F4BKfqGxGzlcW+memk3hc4yR3j0NzgAP6YiS2qMFBJ7iZTkSp8V3ISDeYz6 ChqCUsTyNgjKPz+qRxSsRAvIc++PL9sBA7AHBTQvoi/Rj1Bwj8ny0utsEk1S3r9DQPKI PhU93S3vzCNb0NBtLAggaR5tC/zut6GW2mBYBecdrBl5P/+XFkpcWWsb3DHNgbC5kESr FZ6YwYe70s5QGlg9jemCGKvFXO6ZgtCeAiAC53KDCaWLgLSmdcbQekmfQbsfjD06bY9B cbCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b="E/uEgJcG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x37-20020a056a000be500b00659af029c39si10257373pfu.90.2023.06.30.19.37.41; Fri, 30 Jun 2023 19:38:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=fail header.i=@igalia.com header.s=20170329 header.b="E/uEgJcG"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229757AbjGACJh (ORCPT + 99 others); Fri, 30 Jun 2023 22:09:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229447AbjGACJg (ORCPT ); Fri, 30 Jun 2023 22:09:36 -0400 Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CB711997 for ; Fri, 30 Jun 2023 19:09:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-ID: Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=DTlH1QZL9ONljiaNmWd/MfYuknpYQs+KwTmRxFWAUtk=; b=E/uEgJcGxY/pqHuXM6OYTeki3A aH2BZhcYQC+waPuCwq8HsR2t6fr9QaPiveu/LOYGgnSZZgasCvu/FOTDzCCGn6o07yklZ89L9Fxwv 2tKFg3eC2UJlbfkuJ00GiLIKpLGWYqgm2XkkWXlX6Q+XHODzgvh3XLl3cukWq0igXytdDrxktj/pi ALHch9yKcpUiG1Qc2JnWDdG2q5b/6BmQhqDMS9nIaenLIWbfV/ZBz4rV7HzRnRuIN5AXPxI1O+gRG 2vlMIIPtJ2AjjXE6LhNLg38ykSZKzTbKQQXknUTQGG+1ABmqWkOQxxE7jy0pJf3TT1kMKiMKq7PwZ sTjf6ZkQ==; Received: from [187.74.70.209] (helo=steammachine.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1qFQ3B-006abr-Ka; Sat, 01 Jul 2023 04:09:26 +0200 From: =?UTF-8?q?Andr=C3=A9=20Almeida?= To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, wayland-devel@lists.freedesktop.org Cc: kernel-dev@igalia.com, alexander.deucher@amd.com, christian.koenig@amd.com, pierre-eric.pelloux-prayer@amd.com, Simon Ser , Rob Clark , Pekka Paalanen , Daniel Vetter , Daniel Stone , =?UTF-8?q?=27Marek=20Ol=C5=A1=C3=A1k=27?= , Dave Airlie , =?UTF-8?q?Michel=20D=C3=A4nzer?= , Italo Nicola , Randy Dunlap , hwentlan@amd.com, joshua@froggi.es, ville.syrjala@linux.intel.com, =?UTF-8?q?Andr=C3=A9=20Almeida?= Subject: [PATCH v4 0/6] drm: Add support for atomic async page-flip Date: Fri, 30 Jun 2023 23:09:11 -0300 Message-ID: <20230701020917.143394-1-andrealmeid@igalia.com> X-Mailer: git-send-email 2.41.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, This work from me and Simon adds support for DRM_MODE_PAGE_FLIP_ASYNC through the atomic API. This feature is already available via the legacy API. The use case is to be able to present a new frame immediately (or as soon as possible), even if after missing a vblank. This might result in tearing, but it's useful when a high framerate is desired, such as for gaming. Differently from earlier versions, this one refuses to flip if any prop changes for async flips. The idea is that the fast path of immediate page flips doesn't play well with modeset changes, so only the fb_id can be changed. The exception is for mode_id changes, that might be referring to an identical mode (which would skip a modeset). This is done to make the async API more similar to the normal API. Thanks, André Changes from v3: - Add new patch to reject prop changes - Add a documentation clarifying the KMS atomic state set v3: https://lore.kernel.org/dri-devel/20220929184307.258331-1-contact@emersion.fr/ - User-space patch: https://github.com/Plagman/gamescope/pull/595 - IGT tests: https://gitlab.freedesktop.org/andrealmeid/igt-gpu-tools/-/tree/atomic_async_page_flip André Almeida (2): drm: Refuse to async flip with atomic prop changes drm/doc: Define KMS atomic state set Simon Ser (4): drm: allow DRM_MODE_PAGE_FLIP_ASYNC for atomic commits drm: introduce DRM_CAP_ATOMIC_ASYNC_PAGE_FLIP drm: introduce drm_mode_config.atomic_async_page_flip_not_supported amd/display: indicate support for atomic async page-flips on DC Documentation/gpu/drm-uapi.rst | 19 +++++ drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.c | 1 + drivers/gpu/drm/drm_atomic_helper.c | 5 ++ drivers/gpu/drm/drm_atomic_uapi.c | 80 ++++++++++++++++++-- drivers/gpu/drm/drm_crtc_internal.h | 2 +- drivers/gpu/drm/drm_ioctl.c | 5 ++ drivers/gpu/drm/drm_mode_object.c | 2 +- drivers/gpu/drm/i915/display/intel_display.c | 1 + drivers/gpu/drm/nouveau/nouveau_display.c | 1 + include/drm/drm_mode_config.h | 11 +++ include/uapi/drm/drm.h | 10 ++- include/uapi/drm/drm_mode.h | 9 +++ 12 files changed, 137 insertions(+), 9 deletions(-) -- 2.41.0