[PATCH v4 5/7] drm/omapdrm: Use drm_crtc_enable_color_mgmt() to enable gamma properties

Tomi Valkeinen tomi.valkeinen at ti.com
Thu May 26 06:33:18 UTC 2016


On 25/05/16 23:43, Jyri Sarha wrote:
> Use new drm_crtc_enable_color_mgmt() to enable gamma lut properties.

You could move the color-mgmt patches to the beginning of the series,
and add the omapdrm ones on top of those.

> Signed-off-by: Jyri Sarha <jsarha at ti.com>
> ---
>  drivers/gpu/drm/omapdrm/omap_crtc.c | 12 +++---------
>  1 file changed, 3 insertions(+), 9 deletions(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
> index 5b7f6f5..e03b349 100644
> --- a/drivers/gpu/drm/omapdrm/omap_crtc.c
> +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
> @@ -556,16 +556,10 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
>  	 * gamma table is not supprted.
>  	 */
>  	if (dispc_mgr_gamma_size(channel)) {
> -		struct drm_mode_config *config = &dev->mode_config;
> -		uint gamma_size = 256;
> +		uint gamma_lut_size = 256;
>  
> -		drm_mode_crtc_set_gamma_size(crtc, gamma_size);
> -
> -		drm_object_attach_property(&crtc->base,
> -					   config->gamma_lut_property, 0);
> -		drm_object_attach_property(&crtc->base,
> -					   config->gamma_lut_size_property,
> -					   gamma_size);
> +		drm_crtc_enable_color_mgmt(crtc, 0, false, gamma_lut_size);
> +		drm_mode_crtc_set_gamma_size(crtc, gamma_lut_size);

Any reason drm_crtc_enable_color_mgmt() couldn't also call
drm_mode_crtc_set_gamma_size()?

 Tomi

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20160526/90d395d9/attachment.sig>


More information about the dri-devel mailing list