From patchwork Wed Nov 20 20:48:03 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 3215441 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id E28DAC045B for ; Wed, 20 Nov 2013 20:48:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E917E20752 for ; Wed, 20 Nov 2013 20:48:54 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DDE312074B for ; Wed, 20 Nov 2013 20:48:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4FA6F1059D9; Wed, 20 Nov 2013 12:48:50 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qc0-f180.google.com (mail-qc0-f180.google.com [209.85.216.180]) by gabe.freedesktop.org (Postfix) with ESMTP id F24201059C6 for ; Wed, 20 Nov 2013 12:48:33 -0800 (PST) Received: by mail-qc0-f180.google.com with SMTP id e16so4293154qcx.39 for ; Wed, 20 Nov 2013 12:48:33 -0800 (PST) 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=oxColzBjt1shyMHr11/poqu2iqSLTMW6qebm5qM+uoo=; b=w4FUS1ohL8JDUrJ23hUBh2JNSlfj4FhAdt059rsBJ0oe0m64/HnD++gOLdyBVM2/0x mjuGfMaNDOpFMODhS0oiKnYsJPz+KLvdG03zPN5YvcH8Y+o6IJJMEdiFSHPq9h4MYndp MIZl6fPG0t9OkChxkJ1u1pmxHnwOZ3dGqdCfYJIk0hgbUgVXe7nb+GD1PYq3Gfq57SLG kKbKuDZccM2Yo9MGdr7pEr3Ydu+/uo6GhrBsixZHjEPSldo9yQ8zdznuj4gVrUaHURwB cAcbU6VT+7K2Td2rb2nsm8kShl+MXRVWZez5qSrTyXa4BLy8L3gjpWmKNPqgR3bF0Tac IHPw== X-Received: by 10.49.49.104 with SMTP id t8mr5004798qen.45.1384980513417; Wed, 20 Nov 2013 12:48:33 -0800 (PST) Received: from localhost (pool-108-20-250-166.bstnma.east.verizon.net. [108.20.250.166]) by mx.google.com with ESMTPSA id 4sm25442681qak.11.2013.11.20.12.48.32 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 20 Nov 2013 12:48:32 -0800 (PST) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFCv3 04/14] drm: add DRM_MODE_PROP_DYNAMIC property flag Date: Wed, 20 Nov 2013 15:48:03 -0500 Message-Id: <1384980493-25499-5-git-send-email-robdclark@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1384980493-25499-1-git-send-email-robdclark@gmail.com> References: <1384980493-25499-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@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org X-Spam-Status: No, score=-4.6 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 73cfd1e..536897a 100644 --- a/include/uapi/drm/drm_mode.h +++ b/include/uapi/drm/drm_mode.h @@ -251,6 +251,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;