From patchwork Mon Dec 18 14:57:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 122223 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp2936619qgn; Mon, 18 Dec 2017 06:58:40 -0800 (PST) X-Google-Smtp-Source: ACJfBovlfzRpxFzoLIMKWzs9f7ROlgnwxFdVS/RZkcyDCv6KKeZLAf4THHpIRxcJNKhThY/7sy1A X-Received: by 10.98.157.67 with SMTP id i64mr29360pfd.40.1513609120792; Mon, 18 Dec 2017 06:58:40 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513609120; cv=none; d=google.com; s=arc-20160816; b=K7cd5RPsnpLazhbyXqOvM9W+xhE13BhXH1wxj3moiDu8CDfwlKl4PqbQ1903sDV5rj ky1Jfg8c5obLwCptGv5O5hW2LtA4Dw/bki8q9ksKY9tISHGGkHgtmyS5eZQmaIuLWMVO oi9MYVY3sFij3iGdUGKgIM4cVs4Iacakw2gxxa7amVCAkz76OH56Zeu+VDgvd5xDJHHt eRqj1EXLN6mFjQrd5E2Knnrs3X6gjK15YdlKvl3p06ByiGw5FSHb/4WSOUC3X012caT4 PHvA4wcBiGWQrJeqnw5wDpcFGDTsGMBuODIDW7HHS+luETmLWsr1sbiYDkiJ67Y/6q0m 5b7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:cc:message-id:date:subject:to:from:delivered-to :arc-authentication-results; bh=/U1fW2tatXcwTZe1IwRckHcfmrkss2aBdljln13ksRo=; b=YsV9jI7E65r9CcPQjB8XW3fWgRy7/MTy0FyD098gm3tP4wzV3V8wx5RUJ34AutguhQ x7BHWDL+OUcUPvx8MMat+IAfOwlB3Ky4zFAhrhaQESlKU4GOL2e3SqjouXN6vV2jM8aN wz+zePk/PTdJ4LOo9neOlKUXSFj07dhousVp5q2mLEhjcMzaPsz57/gJkDlerZPyiLKo ggcmGe4K82oyvxgZBnEbkdREPN4ZmFh+0GcIUQ0JfckW/xlr4VjmAaWI2RDvsIgVpC/K 3XmxcHt+EKj/5t9qPR+WprjOqh7uTYH06TmEBhLsHfYsIrhCuHrUjMvmfCcfeaxIMTbI sTaQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id s65si1065692pgc.20.2017.12.18.06.58.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 18 Dec 2017 06:58:40 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 07BE489C03; Mon, 18 Dec 2017 14:58:06 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail.free-electrons.com (mail.free-electrons.com [62.4.15.54]) by gabe.freedesktop.org (Postfix) with ESMTP id C7AAA89B9F for ; Mon, 18 Dec 2017 14:58:04 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 110) id 6F97C203A6; Mon, 18 Dec 2017 15:58:02 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mail.free-electrons.com X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,SHORTCIRCUIT shortcircuit=ham autolearn=disabled version=3.4.0 Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.free-electrons.com (Postfix) with ESMTPSA id 46B1020378; Mon, 18 Dec 2017 15:58:02 +0100 (CET) From: Maxime Ripard To: Daniel Vetter , David Airlie , Chen-Yu Tsai , Maxime Ripard Subject: [PATCH v2 00/12] drm/sun4i: Support the Display Engine frontend Date: Mon, 18 Dec 2017 15:57:47 +0100 Message-Id: X-Mailer: git-send-email 2.14.3 Cc: Thomas Petazzoni , narmstrong@baylibre.com, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, thomas@vitsch.nl 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi, This is a first serie to enable the display engine frontend. This hardware block is found in the first generation Display Engine from Allwinner. Its role is to implement more advanced features that the associated backend, even though the backend alone can be used (and was used so far) for basic composition. Among those features, we will find hardware scaling, that is supported in this serie, colorspace conversions, or more exotic formats support such as the one output by the VPU. Let me know what you think, Maxime Changes from v1: - Fixed the unbind function to not disable the already disabled clocks, and to remove ourself from the frontend list - Changed the log level of the frontend disabled message - Added blank lines where suggested by Neil - Fixed an artifact that was happening when the plane using the frontend was disabled. This was happening because the frontend was disabled before the backend layer (that would be disabled at the next vblank). This led to a significant rework of the patches, so I didn't apply all the tags. I also had to take a few patches in. - Added engine ops documentation - Fixed a bug in our duplicate_state callback that wouldn't preserve the frontend state - Removed the hardcoded register values and used the real ones instead. - Fixed some compilation errors reported by the 0-day bot. Maxime Ripard (12): drm/sun4i: backend: Move line stride setup to buffer setup function sun4i/drm: backend: Document the engine operations drm/sun4i: backend: Add a custom plane state drm/sun4i: engine: Add a custom crtc atomic_check drm/sun4i: engine: Add a VBLANK quirk callback drm/sun4i: engine: Create an atomic_begin callback drm/sun4i: Add a driver for the display frontend drm/sun4i: backend: Wire in the frontend drm/sun4i: backend: Add a custom atomic_check for the frontend drm/sun4i: backend: Use runtime_pm variant of atomic_commit_tail drm/sun4i: backend: Make sure we don't have a commit pending ARM: dts: sun8i: a33 Enable our display frontend arch/arm/boot/dts/sun8i-a33.dtsi | 1 +- drivers/gpu/drm/sun4i/Makefile | 3 +- drivers/gpu/drm/sun4i/sun4i_backend.c | 183 ++++++++++- drivers/gpu/drm/sun4i/sun4i_backend.h | 10 +- drivers/gpu/drm/sun4i/sun4i_crtc.c | 21 +- drivers/gpu/drm/sun4i/sun4i_drv.c | 16 +- drivers/gpu/drm/sun4i/sun4i_drv.h | 1 +- drivers/gpu/drm/sun4i/sun4i_framebuffer.c | 6 +- drivers/gpu/drm/sun4i/sun4i_frontend.c | 392 +++++++++++++++++++++++- drivers/gpu/drm/sun4i/sun4i_frontend.h | 96 ++++++- drivers/gpu/drm/sun4i/sun4i_layer.c | 83 ++++- drivers/gpu/drm/sun4i/sun4i_layer.h | 11 +- drivers/gpu/drm/sun4i/sun4i_tcon.c | 4 +- drivers/gpu/drm/sun4i/sunxi_engine.h | 93 ++++- 14 files changed, 897 insertions(+), 23 deletions(-) create mode 100644 drivers/gpu/drm/sun4i/sun4i_frontend.c create mode 100644 drivers/gpu/drm/sun4i/sun4i_frontend.h base-commit: 4fbd8d194f06c8a3fd2af1ce560ddb31f7ec8323 Reviewed-by: Chen-Yu Tsai