From: Benjamin Gaignard Subject: [PATCH v2 08/19] drm: sti: add sti layer interface definition Date: Tue, 13 May 2014 20:26:17 +0200 Message-ID: <1400005588-3974-9-git-send-email-benjamin.gaignard@linaro.org> References: <1400005588-3974-1-git-send-email-benjamin.gaignard@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mail-we0-f169.google.com (mail-we0-f169.google.com [74.125.82.169]) by gabe.freedesktop.org (Postfix) with ESMTP id C16596EBA8 for ; Tue, 13 May 2014 11:27:08 -0700 (PDT) Received: by mail-we0-f169.google.com with SMTP id u56so820321wes.0 for ; Tue, 13 May 2014 11:27:08 -0700 (PDT) In-Reply-To: <1400005588-3974-1-git-send-email-benjamin.gaignard@linaro.org> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org Cc: Fabien Dessenne , Benjamin Gaignard List-Id: dri-devel@lists.freedesktop.org STI hardware have various input sub-devices before mixing block. Each type of sub-device have different capabilities for scaling, filtering or accepted pixel format. This layer interface abstract those differences and make the interaction with compositor more simple. Signed-off-by: Benjamin Gaignard Signed-off-by: Vincent Abriou Signed-off-by: Fabien Dessenne --- drivers/gpu/drm/sti/sti_layer.h | 104 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 104 insertions(+) create mode 100644 drivers/gpu/drm/sti/sti_layer.h diff --git a/drivers/gpu/drm/sti/sti_layer.h b/drivers/gpu/drm/sti/sti_layer.h new file mode 100644 index 0000000..ed8386a --- /dev/null +++ b/drivers/gpu/drm/sti/sti_layer.h @@ -0,0 +1,104 @@ +/* + * Copyright (C) STMicroelectronics SA 2013 + * Authors: Benjamin Gaignard + * Fabien Dessenne + * for STMicroelectronics. + * License terms: GNU General Public License (GPL), version 2 + */ + +#ifndef _STI_LAYER_H_ +#define _STI_LAYER_H_ + +#include + +#define to_sti_layer(x) container_of(x, struct sti_layer, plane) + +#define STI_LAYER_TYPE_SHIFT 8 +#define STI_LAYER_TYPE_MASK (~((1<