From patchwork Sun Oct 6 00:45:41 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 2992091 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id CC1AB9F169 for ; Sun, 6 Oct 2013 00:50:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 124A320259 for ; Sun, 6 Oct 2013 00:50:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 18FBD20254 for ; Sun, 6 Oct 2013 00:50:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2D08E632C for ; Sat, 5 Oct 2013 17:50:14 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f176.google.com (mail-qc0-f176.google.com [209.85.216.176]) by gabe.freedesktop.org (Postfix) with ESMTP id 2BD50E5C64 for ; Sat, 5 Oct 2013 17:46:12 -0700 (PDT) Received: by mail-qc0-f176.google.com with SMTP id t7so3877045qcv.35 for ; Sat, 05 Oct 2013 17:46:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=esYvnyvV4fFxrCNFlyM1be4dbfHBEWd9OYjmRfINNzc=; b=CH5UOcPo4shHxoa/G94c+izASnYjjoKgfuZNLc8DJKXru/gEKtDVE/VLXn2U0wxLoo zns61DCnKdTy51girKEwgknKIjpf7dabLDk0ZQppGvyMvIl4/mKr41gORvu6R/rCI6+a wDWsyOy2lOzZR9f2e46pxLDzNvjUQjNQ5M8gLmHdGRQgD79JuboJfqDDohiPl7+b9Qr3 qphS3ZdCctY0V5rbgI51BE+tgo46rgR6fz7AfHmOJa/cbJ8E0p2eM8p3FcgmfcJypUSW V2fCi+tyE65x7lbA4TPFH/0Ml4tQxvr8kgpigsmIkYAPfk1qM7Utd7L8q3IDXd6Ey9ws iXEg== X-Received: by 10.224.10.202 with SMTP id q10mr28260859qaq.8.1381020371762; Sat, 05 Oct 2013 17:46:11 -0700 (PDT) Received: from localhost (pool-108-20-247-120.bstnma.east.verizon.net. [108.20.247.120]) by mx.google.com with ESMTPSA id h6sm39297262qej.4.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Sat, 05 Oct 2013 17:46:11 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFCv1 03/12] drm: add DRM_MODE_PROP_DYNAMIC property flag Date: Sat, 5 Oct 2013 20:45:41 -0400 Message-Id: <1381020350-1125-4-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1381020350-1125-1-git-send-email-robdclark@gmail.com> References: <1381020350-1125-1-git-send-email-robdclark@gmail.com> X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This indicates to userspace that the property is something that can be set dynamically without requiring a "test" step to check if the hw is capable. This allows a userspace compositor, such as weston, to avoid an extra ioctl to check whether it needs to fall-back to GPU to composite some surface prior to submission of GPU render commands. --- include/uapi/drm/drm_mode.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/uapi/drm/drm_mode.h b/include/uapi/drm/drm_mode.h index 35921ba..15db837 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -232,6 +232,15 @@ struct drm_mode_get_connector { #define DRM_MODE_PROP_BLOB (1<<4) #define DRM_MODE_PROP_BITMASK (1<<5) /* bitmask of enumerated types */ #define DRM_MODE_PROP_OBJECT (1<<6) /* drm mode object */ +/* Properties that are not dynamic cannot safely be changed without a + * atomic-modeset / atomic-pageflip test step. But if userspace is + * only changing dynamic properties, it is guaranteed that the change + * will not exceed hw limits, so no test step is required. + * + * Note that fb_id properties are a bit ambiguous.. they of course can + * be changed dynamically, assuming the pixel format does not change. + */ +#define DRM_MODE_PROP_DYNAMIC (1<<24) struct drm_mode_property_enum { __u64 value;