From patchwork Thu Sep 13 03:49:49 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Clark X-Patchwork-Id: 11374 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 F0C6C23E29 for ; Thu, 13 Sep 2012 03:50:47 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id EB1A834B8D45 for ; Thu, 13 Sep 2012 03:50:46 +0000 (UTC) Received: by mail-iy0-f180.google.com with SMTP id j25so1819859iaf.11 for ; Wed, 12 Sep 2012 20:50:46 -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=qAbO/bUoam5BWCgNf4DnvdiPyVWyWy4C/Q5s1lh7SWU=; b=C5HnI6UrZX2BxzHpQ3601W1YJlfM2OQvgBZBF3kUtcsRNp8RY3bKk7MqJeb4RYEjNa VQuGZj7deSsKEuADM+XDFSSy34bp9LzSanecyFhy//72fKNuQ2yHv96n3CGyovHO6RiO OKcH3+cRx1UKxnZBZ6hDvpv4L1edz4+fdHZSZS4FjdoeG5HTCBysO/dIYqfvSo/Qus35 uHLMBPiNOKyXfVQXxsaR7lhIY/Ifrx28Bi44R5C0PphVOO2Zdlh6MTj/SQw3N+Fx60IA nHqgSrf96KqLszFkvogvD088TAVouG/t8IWun2/HWE8Meh6M5UrfuCp1kwEPNJG2vRw3 JcsQ== Received: by 10.50.7.212 with SMTP id l20mr579898iga.43.1347508246732; Wed, 12 Sep 2012 20:50:46 -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.184.232 with SMTP id ex8csp111061igc; Wed, 12 Sep 2012 20:50:46 -0700 (PDT) Received: by 10.60.30.229 with SMTP id v5mr442764oeh.130.1347508246222; Wed, 12 Sep 2012 20:50:46 -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 rp7si28188597obc.5.2012.09.12.20.50.46 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 20:50:46 -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 wd20so4595268obb.37 for ; Wed, 12 Sep 2012 20:50:46 -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=qAbO/bUoam5BWCgNf4DnvdiPyVWyWy4C/Q5s1lh7SWU=; b=T4xgMnwEClsdNNn9z25NqGlKfrBdzUDEqjpPmsWDaCprtwLq3QCYTA+BegzIlursXp OlL8TZM+az4iGolDpD1Mz+r/Non9a6nKRtoY/P7br+6Vc4HeXmRvvEO0z/tAtdSej6dj AEAvnNNEpqdv94l4GtYnakF5r5bZ67n58E3KSz05QZR4zmNL/Tu6ri1Ll6zcrcjiw3Hc 74XsMrQ6Vmr99yGa6coiB+eO7pg6RAWuD6Ft+F1UaWEWawvExH08TEKsYe1iI6PLe2Ri JvXrIag4ZYSp6G2ByfWumVwRDsNHT0tGGnsQnNdhDyCs0lV2hC+Pzecg3ERE+sKi05bb bd1Q== Received: by 10.182.78.228 with SMTP id e4mr459621obx.77.1347508246092; Wed, 12 Sep 2012 20:50:46 -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 kc5sm22528093obb.21.2012.09.12.20.50.45 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 20:50:45 -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, Rob Clark Subject: [RFC 03/11] drm: add DRM_MODE_PROP_DYNAMIC property flag Date: Wed, 12 Sep 2012 22:49:49 -0500 Message-Id: <1347508195-14939-4-git-send-email-rob.clark@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347508195-14939-1-git-send-email-rob.clark@linaro.org> References: <1347508195-14939-1-git-send-email-rob.clark@linaro.org> X-Gm-Message-State: ALoCoQkYFjVtdsX4sV6uxCr+S52Wazz59Qk3DoThkb+BwWYWEDYtJMvDWiNpIAAmbDi4ld/S12Jw 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..15689d4 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;