From patchwork Tue Jun 18 21:34:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ezequiel Garcia X-Patchwork-Id: 11002909 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A4C7B14DB for ; Tue, 18 Jun 2019 21:36:54 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 942151FFB7 for ; Tue, 18 Jun 2019 21:36:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 87AFD288D0; Tue, 18 Jun 2019 21:36:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3B40028807 for ; Tue, 18 Jun 2019 21:36:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=Q0EMgPDvAlNE4kp/zJm+WDq6v+FKNd07cpO8g9hoFTI=; b=D0P/Y0Bjp/6AHt QYyqXvb6Stp72buBbS08PvrR9VcQJBF1do+gge5XN5H1EBI4RKkA444SG7hXMbhOIpDnneGXN05kT 7ZaXN/4YIJ8sN3oDEv2FhapPStas6gn02T2cFeyvREZfA2cnhLgBYa0coSV3RIfqgLzIfoI6Yio4J hwJkmg1Ui+A5QU6GiUCd+bSdd587/tvSj50dsHPsG5LFyc3AuuXSaMukqLY5xXQH9ZowskV5Ccgmu bRZOrlg/fmT3ul92UYbAUY4kML1oymyg3TUe/QdjS0WHhkJXqjzzoIhsTNIyS8+ughg0NySAmsf7U eJtylSfKHqorfHPZ4IHw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92 #3 (Red Hat Linux)) id 1hdLmd-0006RM-G1; Tue, 18 Jun 2019 21:36:51 +0000 Received: from bhuna.collabora.co.uk ([46.235.227.227]) by bombadil.infradead.org with esmtps (Exim 4.92 #3 (Red Hat Linux)) id 1hdLmb-0006Qx-3X for linux-rockchip@lists.infradead.org; Tue, 18 Jun 2019 21:36:50 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: ezequiel) with ESMTPSA id BB3BF2610BE From: Ezequiel Garcia To: dri-devel@lists.freedesktop.org Subject: [PATCH 0/3] RK3288 Gamma LUT Date: Tue, 18 Jun 2019 18:34:03 -0300 Message-Id: <20190618213406.7667-1-ezequiel@collabora.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190618_143649_280743_615C7959 X-CRM114-Status: UNSURE ( 8.87 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Jacopo Mondi , =?utf-8?q?Heiko_St=C3=BCbner?= , linux-kernel@vger.kernel.org, Sandy Huang , Rob Herring , Douglas Anderson , linux-rockchip@lists.infradead.org, Boris Brezillon , Sean Paul , kernel@collabora.com, Ezequiel Garcia , Ilia Mirkin Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Let's support Gamma LUT configuration on RK3288 SoCs. In order to do so, this series adds a new and optional address resource. A separate address resource is required because on this RK3288, the LUT address is after the MMU address, which is requested by the iommu driver. This prevents the DRM driver from requesting an entire register space. The current implementation works for RGB 10-bit tables, as that is what seems to work on RK3288. This has been tested on Rock2 Square board, using a hacked 'modetest' tool, with legacy and atomic APIs. Thanks, Eze Changes from RFC: * Request (an optional) address resource for the LUT. * Add devicetree changes. * Drop support for RK3399, which doesn't seem to work out of the box and needs more research. * Support pass-thru setting when GAMMA_LUT is NULL. * Add a check for the gamma size, as suggested by Ilia. * Move gamma setting to atomic_commit_tail, as pointed out by Jacopo/Laurent, is the correct way. Ezequiel Garcia (3): dt-bindings: display: rockchip: document VOP gamma LUT address drm/rockchip: Add optional support for CRTC gamma LUT ARM: dts: rockchip: Add RK3288 VOP gamma LUT address .../display/rockchip/rockchip-vop.txt | 10 +- arch/arm/boot/dts/rk3288.dtsi | 6 +- drivers/gpu/drm/rockchip/rockchip_drm_fb.c | 3 + drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 106 ++++++++++++++++++ drivers/gpu/drm/rockchip/rockchip_drm_vop.h | 7 ++ drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 2 + 6 files changed, 131 insertions(+), 3 deletions(-)