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: 8723651 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 167D79F39A for ; Fri, 1 Apr 2016 12:48:17 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 20071203B7 for ; Fri, 1 Apr 2016 12:48:16 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 3CB43203AA for ; Fri, 1 Apr 2016 12:48:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC6806E024; Fri, 1 Apr 2016 12:48:07 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf0-x22d.google.com (mail-lf0-x22d.google.com [IPv6:2a00:1450:4010:c07::22d]) by gabe.freedesktop.org (Postfix) with ESMTPS id CC0F96E024 for ; Fri, 1 Apr 2016 12:48:04 +0000 (UTC) Received: by mail-lf0-x22d.google.com with SMTP id k79so80997585lfb.2 for ; Fri, 01 Apr 2016 05:48:04 -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=lnNnnsFqp5XlS9N4yobTRbLcXHQVVsQq0l9hvcRahtIgoWy/9RyAfYtPE5nGbYLQCU wzTWsZ/aUwvIzSG0Cch1DGshcVNazqk6wCM9n4u8skKKN3AQyExsXvchq7lw6VSDeNN1 Jyd934ZcS8DKApBOK63bHncZMCda/VYC8x7vafpzVoos+SnYz+/3pvhAtsvd4ZQHl2q8 ro7o/+lpxgHLDPBVXUW/57ilxwPYyN5VVWZxpvfoHc5zg6YWyL7OlpnvICCt7cMRfnRB Fsnl8aTVvK1pIJt5Wyhjptt535O8//BJxsA/DAWgfMKEcT/4XVpQedVdtAh2N2xTzWJ0 6YOg== X-Gm-Message-State: AD7BkJJoIv767CGfUekZMpppN6k/Hs9QUxDLlImdzXuiMpHr1ctapseDnLPt1F5640MY8k0zExRdpKqdEfguwlSc 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: Krzysztof Kozlowski , linux-samsung-soc@vger.kernel.org, Bartlomiej Zolnierkiewicz , Seung-Woo Kim , "dri-devel@lists.freedesktop.org" , Andrzej Hajda , Tobias Jakobi , Fabien Dessenne , Vincent Abriou , Marek Szyprowski X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 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 _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel