diff mbox

[10/10] drm/rockchip: Enable 'PLANE_CTM' drm property.

Message ID 20180215053300.70482-11-dcastagna@chromium.org (mailing list archive)
State New, archived
Headers show

Commit Message

Daniele Castagna Feb. 15, 2018, 5:33 a.m. UTC
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
---
 drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 5 +++++
 1 file changed, 5 insertions(+)

Comments

Sean Paul Feb. 27, 2018, 4:10 p.m. UTC | #1
On Thu, Feb 15, 2018 at 12:33:00AM -0500, Daniele Castagna wrote:
> 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

Once you add the missing SoB,

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  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");
> -- 
> 2.16.1.291.g4437f3f132-goog
> 
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
diff mbox

Patch

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");