11dedbd3bSFrançois Tigeot /* 21dedbd3bSFrançois Tigeot * Copyright (c) 2016 Intel Corporation 31dedbd3bSFrançois Tigeot * 41dedbd3bSFrançois Tigeot * Permission to use, copy, modify, distribute, and sell this software and its 51dedbd3bSFrançois Tigeot * documentation for any purpose is hereby granted without fee, provided that 61dedbd3bSFrançois Tigeot * the above copyright notice appear in all copies and that both that copyright 71dedbd3bSFrançois Tigeot * notice and this permission notice appear in supporting documentation, and 81dedbd3bSFrançois Tigeot * that the name of the copyright holders not be used in advertising or 91dedbd3bSFrançois Tigeot * publicity pertaining to distribution of the software without specific, 101dedbd3bSFrançois Tigeot * written prior permission. The copyright holders make no representations 111dedbd3bSFrançois Tigeot * about the suitability of this software for any purpose. It is provided "as 121dedbd3bSFrançois Tigeot * is" without express or implied warranty. 131dedbd3bSFrançois Tigeot * 141dedbd3bSFrançois Tigeot * THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, 151dedbd3bSFrançois Tigeot * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO 161dedbd3bSFrançois Tigeot * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY SPECIAL, INDIRECT OR 171dedbd3bSFrançois Tigeot * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, 181dedbd3bSFrançois Tigeot * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER 191dedbd3bSFrançois Tigeot * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE 201dedbd3bSFrançois Tigeot * OF THIS SOFTWARE. 211dedbd3bSFrançois Tigeot */ 221dedbd3bSFrançois Tigeot 231dedbd3bSFrançois Tigeot #ifndef __DRM_COLOR_MGMT_H__ 241dedbd3bSFrançois Tigeot #define __DRM_COLOR_MGMT_H__ 251dedbd3bSFrançois Tigeot 261dedbd3bSFrançois Tigeot #include <linux/ctype.h> 271dedbd3bSFrançois Tigeot 28*3f2dd94aSFrançois Tigeot struct drm_crtc; 29*3f2dd94aSFrançois Tigeot 30*3f2dd94aSFrançois Tigeot uint32_t drm_color_lut_extract(uint32_t user_input, uint32_t bit_precision); 31*3f2dd94aSFrançois Tigeot 321dedbd3bSFrançois Tigeot void drm_crtc_enable_color_mgmt(struct drm_crtc *crtc, 331dedbd3bSFrançois Tigeot uint degamma_lut_size, 341dedbd3bSFrançois Tigeot bool has_ctm, 351dedbd3bSFrançois Tigeot uint gamma_lut_size); 361dedbd3bSFrançois Tigeot 371dedbd3bSFrançois Tigeot int drm_mode_crtc_set_gamma_size(struct drm_crtc *crtc, 381dedbd3bSFrançois Tigeot int gamma_size); 391dedbd3bSFrançois Tigeot 401dedbd3bSFrançois Tigeot #endif 41