1 /* SPDX-License-Identifier: GPL-2.0+ */
3 * rcar_cmm.h -- R-Car Display Unit Color Management Module
5 * Copyright (C) 2019 Jacopo Mondi <jacopo+renesas@jmondi.org>
11 #define CM2_LUT_SIZE 256
14 struct platform_device
;
17 * struct rcar_cmm_config - CMM configuration
19 * @lut: 1D-LUT configuration
20 * @lut.table: 1D-LUT table entries. Disable LUT operations when NULL
22 struct rcar_cmm_config
{
24 struct drm_color_lut
*table
;
28 #if IS_ENABLED(CONFIG_DRM_RCAR_CMM)
29 int rcar_cmm_init(struct platform_device
*pdev
);
31 int rcar_cmm_enable(struct platform_device
*pdev
);
32 void rcar_cmm_disable(struct platform_device
*pdev
);
34 int rcar_cmm_setup(struct platform_device
*pdev
,
35 const struct rcar_cmm_config
*config
);
37 static inline int rcar_cmm_init(struct platform_device
*pdev
)
42 static inline int rcar_cmm_enable(struct platform_device
*pdev
)
47 static inline void rcar_cmm_disable(struct platform_device
*pdev
)
51 static inline int rcar_cmm_setup(struct platform_device
*pdev
,
52 const struct rcar_cmm_config
*config
)
56 #endif /* IS_ENABLED(CONFIG_DRM_RCAR_CMM) */
58 #endif /* __RCAR_CMM_H__ */