From patchwork Thu Feb 15 05:33:00 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniele Castagna X-Patchwork-Id: 10220579 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 828706055C for ; Thu, 15 Feb 2018 08:37:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6EB2E287A8 for ; Thu, 15 Feb 2018 08:37:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63AB32887F; Thu, 15 Feb 2018 08:37:37 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 13A2C287A8 for ; Thu, 15 Feb 2018 08:37:37 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDCCD6E062; Thu, 15 Feb 2018 08:36:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-qt0-f174.google.com (mail-qt0-f174.google.com [209.85.216.174]) by gabe.freedesktop.org (Postfix) with ESMTPS id A739A6E0B6 for ; Thu, 15 Feb 2018 05:33:21 +0000 (UTC) Received: by mail-qt0-f174.google.com with SMTP id d26so10569353qtk.10 for ; Wed, 14 Feb 2018 21:33:21 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=BOpR645e98+97C8wHoYaTDg/qM2RCeuiXxHA9EPurMo=; b=mSXoaXUaM2r8lwDrcCONxCcDWO43/PLF3+RVeKp+Lkm2c6X6lDtAy8+/+zqYy7FlW2 mowLWcVTuIvx1nVgX94p9IrinsAgz+lUy03zIZofkyJy5DwNvK1ome5ytVFv0fZ3081i obzjq1mw5hX6AXmmyLOLFrLeBPjiTyyn9a8vDgGbnWJV0BCWpiptstHMZqHAK5HxBM24 pypf/HY1MwIdkkjhz2X2xPSzkYgniVTFA296cJq2vYTjDTuXNPjC0zfHDl40zsasgrEc 6vZpEEDIDCtimqRF4AQABKoZsamPBH//6HT6NXPTDfqQ+TXlNVg6d+0PJRRkWopZlB/e qG6w== X-Gm-Message-State: APf1xPCKlzAjvjTilLPbnwL2sjC9jGenQIn/Wr9K5TpF13QFIJAtTyhT kv4uGRbHHHhhAXbRzJUHNesU8s2Cvyw= X-Google-Smtp-Source: AH8x225xJxeSupa1B8sDnme3f06SDbkhxxyeCK8yoy3+9WpHjDCXhMcr5dl9L+5GL7KNmVMXnvgb0A== X-Received: by 10.237.51.199 with SMTP id v65mr2535258qtd.184.1518672799996; Wed, 14 Feb 2018 21:33:19 -0800 (PST) Received: from dcastagna1.nyc.corp.google.com ([2620:0:1003:101a:749d:49f2:f0b1:dd83]) by smtp.gmail.com with ESMTPSA id l62sm13808198qkl.23.2018.02.14.21.33.19 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Feb 2018 21:33:19 -0800 (PST) From: Daniele Castagna To: dri-devel@lists.freedesktop.org Subject: [PATCH 10/10] drm/rockchip: Enable 'PLANE_CTM' drm property. Date: Thu, 15 Feb 2018 00:33:00 -0500 Message-Id: <20180215053300.70482-11-dcastagna@chromium.org> X-Mailer: git-send-email 2.16.1.291.g4437f3f132-goog In-Reply-To: <20180215053300.70482-1-dcastagna@chromium.org> References: <20180215053300.70482-1-dcastagna@chromium.org> X-Mailman-Approved-At: Thu, 15 Feb 2018 08:36:05 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 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" X-Virus-Scanned: ClamAV using ClamSMTP Enable and expose 'PLANE_CTM' matrix on primary and overaly planes. The property can be use to set a RGB to RGB 3X3 color conversion matrix that will be applied to planes at scanout. Change-Id: Ifb7a680ab84c17557b8b3c5aaba1aa3b4eecfcaa Reviewed-by: Sean Paul --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 8c8118c3db308..4148e2b025b31 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -1352,6 +1352,9 @@ static int vop_create_crtc(struct vop *vop) ret = drm_crtc_init_with_planes(drm_dev, crtc, primary, cursor, &vop_crtc_funcs, NULL); + + drm_plane_enable_color_mgmt(primary, 0, true, 0); + if (ret) goto err_cleanup_planes; @@ -1381,6 +1384,8 @@ static int vop_create_crtc(struct vop *vop) goto err_cleanup_crtc; } drm_plane_helper_add(&vop_win->base, &plane_helper_funcs); + + drm_plane_enable_color_mgmt(&vop_win->base, 0, true, 0); } port = of_get_child_by_name(dev->of_node, "port");