From patchwork Sat Oct 13 00:49:04 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 12198 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 17F4A23EFB for ; Sat, 13 Oct 2012 00:49:29 +0000 (UTC) Received: from mail-ia0-f180.google.com (mail-ia0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id C1B6DA180EC for ; Sat, 13 Oct 2012 00:49:28 +0000 (UTC) Received: by mail-ia0-f180.google.com with SMTP id f6so2398032iag.11 for ; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :dkim-signature:sender:from:to:cc:subject:date:message-id:x-mailer :in-reply-to:references:x-gm-message-state; bh=DAe+t8tKruYfcWHb4AyQQ9GJBoq7PGs3xBVIEWaCZME=; b=c7CCa82rVCgYKq8YZ0wysOFm1kODXLjVHR8q6b/EEBji6Cuy9dg5ccm7M4YuMrioav MDv96g7HkEtVQ7XZsDpNni+Nf6pD2qLaWAQaot5DKumys4nLmiCmjiVg4xmmAooltEFm Tu09bFuZqJE65ntJH9F111Im2ZxypNvBvvu5F8sTjOK8klrvVhko+pxWMU2IUxKBvb6j uWr4H1C2Sz2ZfBbhH68rrwMckq0vqyRUt/bjnmNmVFGm15VxQ1b1VVRHGNnGR6ncOYtY 01iv5avQky/G/Cw9Aw7lWzNs2LQczpWzjUxwoG7ehhHq0tGkTAk8ip6xHYk+YqkJhMvD +6OQ== Received: by 10.50.46.226 with SMTP id y2mr3589945igm.62.1350089368584; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.50.67.148 with SMTP id n20csp274614igt; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) Received: by 10.182.45.42 with SMTP id j10mr4750396obm.60.1350089368192; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) Received: from mail-ob0-f178.google.com (mail-ob0-f178.google.com [209.85.214.178]) by mx.google.com with ESMTPS id d7si101858oea.37.2012.10.12.17.49.28 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 17:49:28 -0700 (PDT) Received-SPF: pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) client-ip=209.85.214.178; Authentication-Results: mx.google.com; spf=pass (google.com: domain of robdclark@gmail.com designates 209.85.214.178 as permitted sender) smtp.mail=robdclark@gmail.com; dkim=pass header.i=@gmail.com Received: by mail-ob0-f178.google.com with SMTP id tb18so4158660obb.37 for ; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:x-mailer:in-reply-to :references; bh=DAe+t8tKruYfcWHb4AyQQ9GJBoq7PGs3xBVIEWaCZME=; b=LzG7hFSX3Xj66+WGIjHyxGAWY0nwsUqJM8OF961IVtIhdpxx734IORy7EbO/0qn7fA Zx3rdRhomayD+runxhG+j3yOq7eqhwhAqyBtX+C2hkWi4xNmqCvXAmRvybQxLgX19vPU j137Q50bI+vKjJnoM91uEJS9dcARO5zbVEIoBlXcd0EwUCgsoM/7cS3WyyLiMeK1aLV6 Qq3mwTWQ4rgia6OpOjEs4fwtYJgsPLhe4FBv/66PDx9Rj9bYvaNQTOHicryPBoQ9L0+l qjfVwUMC/Tdkltj6xu/f67rNJs6GjXcxlCRKDtpE4ktKhNuJFlvW7xYzoJ8iD5cKgjKA DqTg== Received: by 10.60.7.225 with SMTP id m1mr4899937oea.122.1350089368018; Fri, 12 Oct 2012 17:49:28 -0700 (PDT) Received: from localhost (ppp-70-129-143-201.dsl.rcsntx.swbell.net. [70.129.143.201]) by mx.google.com with ESMTPS id nd14sm8242475obb.14.2012.10.12.17.49.24 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 12 Oct 2012 17:49:27 -0700 (PDT) Sender: Rob Clark From: Rob Clark To: dri-devel@lists.freedesktop.org Cc: patches@linaro.org, ville.syrjala@linux.intel.com, jbarnes@virtuousgeek.org, daniel.vetter@ffwll.ch, krh@bitplanet.net, Rob Clark Subject: [RFC 03/11] drm: add DRM_MODE_PROP_DYNAMIC property flag Date: Fri, 12 Oct 2012 19:49:04 -0500 Message-Id: <1350089352-18162-4-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1350089352-18162-1-git-send-email-rob.clark@linaro.org> References: <1350089352-18162-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQl+zNZCZgTDb0mG0gthqiF5WKOSXAwHkxCdbUCILn3AJ8hQ/3BPS2ZlAKgvmC6pRCVrBOXt From: Rob Clark 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/drm/drm_mode.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h index dff792f..e03ece6 100644 --- a/include/drm/drm_mode.h +++ b/include/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;