From patchwork Mon Sep 10 03:03:16 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 1429171 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id D91D7E00A6 for ; Mon, 10 Sep 2012 03:06:42 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CF61A9EB00 for ; Sun, 9 Sep 2012 20:06:42 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ob0-f177.google.com (mail-ob0-f177.google.com [209.85.214.177]) by gabe.freedesktop.org (Postfix) with ESMTP id 630F39E8C9 for ; Sun, 9 Sep 2012 20:04:43 -0700 (PDT) Received: by mail-ob0-f177.google.com with SMTP id ta17so2422593obb.36 for ; Sun, 09 Sep 2012 20:04:43 -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=RcbQp4WI6KiKe67ToGF0QKBDGJu5FTQO0ujN9aj+T7Y=; b=goKvV24B8GuCrgSuziYrUSKgJS/qP3Os7howJ+Nmh7uBO0qraZ6fCJ0frbceE07Xvv NKokWVuTZ2stscThu8pHZqcF/QWCehbD76KfzJZ70N0jFhbKUn92/cuks24laRTdZahv j5jBy5rQprzue+fDP+yIGlc7rF/NbHCfnNZjhf1AkdyqMYOyQuSKcM7K/sqt9BD3NIi+ TrxZ1m4dNa7OgNmEpozwuapfvlUrPT6OW9Elkk9RkcWCOOnd1uh+Lrbs65LrUeXyQxq5 RjQF6QlKWSoIOFmQ0rFYKIe4Dxp5CP2PTXzhn4up03t6l1CmjzS7RkKhAo5eJF1QY1SI s9kg== Received: by 10.60.19.195 with SMTP id h3mr12445107oee.102.1347246283103; Sun, 09 Sep 2012 20:04:43 -0700 (PDT) Received: from localhost (ppp-70-129-131-42.dsl.rcsntx.swbell.net. [70.129.131.42]) by mx.google.com with ESMTPS id a3sm9651882oeb.6.2012.09.09.20.04.42 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 09 Sep 2012 20:04:42 -0700 (PDT) From: Rob Clark To: dri-devel@lists.freedesktop.org Subject: [RFC 3/9] drm: add DRM_MODE_PROP_DYNAMIC property flag Date: Sun, 9 Sep 2012 22:03:16 -0500 Message-Id: <1347246202-24249-4-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347246202-24249-1-git-send-email-rob.clark@linaro.org> References: <1347246202-24249-1-git-send-email-rob.clark@linaro.org> Cc: daniel.vetter@ffwll.ch, Rob Clark , patches@linaro.org 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 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 cee4c53..8cec2cf 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 / nuclear-pageflip test step. But if userspace is + * only changing dynamic properties, it is garanteed 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;