From patchwork Fri Apr 1 12:48:02 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 64849 Delivered-To: patch@linaro.org Received: by 10.112.199.169 with SMTP id jl9csp714968lbc; Fri, 1 Apr 2016 05:48:07 -0700 (PDT) X-Received: by 10.66.141.103 with SMTP id rn7mr30335542pab.70.1459514887194; Fri, 01 Apr 2016 05:48:07 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 79si21170303pfo.227.2016.04.01.05.48.06; Fri, 01 Apr 2016 05:48:07 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-samsung-soc-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-samsung-soc-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753069AbcDAMsG (ORCPT + 4 others); Fri, 1 Apr 2016 08:48:06 -0400 Received: from mail-lf0-f46.google.com ([209.85.215.46]:33715 "EHLO mail-lf0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752102AbcDAMsF (ORCPT ); Fri, 1 Apr 2016 08:48:05 -0400 Received: by mail-lf0-f46.google.com with SMTP id p188so53769052lfd.0 for ; Fri, 01 Apr 2016 05:48:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=e9mG37bFHD/Wc5DjyEa1I1KZjxEfuguNbMXNFGbb14o=; b=PdA0DXqSraaGozhwl6MBDqLBqzzj6MH+uqfIWjnwsYKDqvZL8AAWkKv0KL/CwF1w8c Sr8QEuM1uE83tKRMuQe6dcypM+jph3/ow4oaoTiLMrafYvS7USDxGwgLkskvK/ixpKW/ ZivvolcVzvAp/oGXmewab26+zZ8jIDZvJnyOg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=e9mG37bFHD/Wc5DjyEa1I1KZjxEfuguNbMXNFGbb14o=; b=JTzLYCoKx/SewZqdcV52dxrfwLyjlWZPT+QFvcvNLWpsV+C08J7O6goKdOS7UC50Cz w9F+Vi/P3rRFtYxPp128s968WKw4oTppnHNW+yiT61SB3JTILH1XTL9rj9Qx0mbih1Ut vTiPz/WQ0g85jxQTatDwB7Klj/III2j/fPRtq4pGw3Ibnl3+9PiozuoXszNI+kkbTjHw VzPCtynO4YdCBxNJ12gxFWfKp2vqmYVi+Os5atN5uWLQjR3drbidpVQrYCTxKTqqFQeH fGOum2EPbalFuxBVxeoDiZfiCvGGToiHXa4hpT5SzlXngI71mHoBgsHyCFTjSuEmY89F Kfcw== X-Gm-Message-State: AD7BkJIsquFlkMSyD8sAIwXFFxzYVe6YmgOuLBUsDtxqBF+KC7WwL+CZr9XpLs2AJ1RA2LiF4ilqvMeswNCNfHEZ MIME-Version: 1.0 X-Received: by 10.25.39.142 with SMTP id n136mr1871481lfn.50.1459514882593; Fri, 01 Apr 2016 05:48:02 -0700 (PDT) Received: by 10.25.153.210 with HTTP; Fri, 1 Apr 2016 05:48:02 -0700 (PDT) In-Reply-To: <20160229151219.GW15993@intel.com> References: <1453905883-6807-1-git-send-email-m.szyprowski@samsung.com> <1453905883-6807-2-git-send-email-m.szyprowski@samsung.com> <20160229151219.GW15993@intel.com> Date: Fri, 1 Apr 2016 14:48:02 +0200 Message-ID: Subject: Re: [PATCH v5 1/5] drm: add generic zpos property From: Benjamin Gaignard To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: Marek Szyprowski , "dri-devel@lists.freedesktop.org" , linux-samsung-soc@vger.kernel.org, Inki Dae , Daniel Vetter , Joonyoung Shim , Seung-Woo Kim , Andrzej Hajda , Krzysztof Kozlowski , Bartlomiej Zolnierkiewicz , Tobias Jakobi , Gustavo Padovan , Vincent Abriou , Fabien Dessenne Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org This patch adds support for generic plane's zpos property property with well-defined semantics: - added zpos properties to plane and plane state structures - added helpers for normalizing zpos properties of given set of planes - well defined semantics: planes are sorted by zpos values and then plane id value if zpos equals Normalized zpos values are calculated automatically when generic muttable zpos property has been initialized. Drivers can simply use plane_state->normalized_zpos in their atomic_check and/or plane_update callbacks without any additional calls to DRM core. Signed-off-by: Marek Szyprowski Compare to Marek's original patch zpos property is now specific to each plane and no more to the core. Normalize function take care of the range of per plane defined range before set normalized_zpos. Signed-off-by: Benjamin Gaignard --- Documentation/DocBook/gpu.tmpl | 10 ++ drivers/gpu/drm/Makefile | 2 +- drivers/gpu/drm/drm_atomic_helper.c | 6 + drivers/gpu/drm/drm_blend.c | 283 ++++++++++++++++++++++++++++++++++++ drivers/gpu/drm/drm_crtc_internal.h | 3 + include/drm/drm_crtc.h | 25 ++++ 6 files changed, 328 insertions(+), 1 deletion(-) create mode 100644 drivers/gpu/drm/drm_blend.c diff --git a/Documentation/DocBook/gpu.tmpl b/Documentation/DocBook/gpu.tmpl index 1692c4d..b7a5161 100644 --- a/Documentation/DocBook/gpu.tmpl +++ b/Documentation/DocBook/gpu.tmpl @@ -2147,6 +2147,16 @@ void intel_crt_init(struct drm_device *dev) the underlying hardware). + "zpos" + RANGE + Min= driver dependent, Max= driver dependent + Plane + Plane's 'z' position during blending operation (0 for background, highest for frontmost). + If two planes assigned to same CRTC have equal zpos values, the plane with higher plane + id is treated as closer to front. Can be IMMUTABLE if driver doesn't support changing + planes' order. Exact value range is driver dependent. + + i915 Generic "Broadcast RGB" diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile index 6eb94fc..18dc563 100644 --- a/drivers/gpu/drm/Makefile +++ b/drivers/gpu/drm/Makefile @@ -2,7 +2,7 @@ # Makefile for the drm device driver. This driver provides support for the -- To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html