cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

rcar_cmm.h (1250B)


      1/* SPDX-License-Identifier: GPL-2.0+ */
      2/*
      3 * rcar_cmm.h -- R-Car Display Unit Color Management Module
      4 *
      5 * Copyright (C) 2019 Jacopo Mondi <jacopo+renesas@jmondi.org>
      6 */
      7
      8#ifndef __RCAR_CMM_H__
      9#define __RCAR_CMM_H__
     10
     11#define CM2_LUT_SIZE		256
     12
     13struct drm_color_lut;
     14struct platform_device;
     15
     16/**
     17 * struct rcar_cmm_config - CMM configuration
     18 *
     19 * @lut:	1D-LUT configuration
     20 * @lut.table:	1D-LUT table entries. Disable LUT operations when NULL
     21 */
     22struct rcar_cmm_config {
     23	struct {
     24		struct drm_color_lut *table;
     25	} lut;
     26};
     27
     28#if IS_ENABLED(CONFIG_DRM_RCAR_CMM)
     29int rcar_cmm_init(struct platform_device *pdev);
     30
     31int rcar_cmm_enable(struct platform_device *pdev);
     32void rcar_cmm_disable(struct platform_device *pdev);
     33
     34int rcar_cmm_setup(struct platform_device *pdev,
     35		   const struct rcar_cmm_config *config);
     36#else
     37static inline int rcar_cmm_init(struct platform_device *pdev)
     38{
     39	return -ENODEV;
     40}
     41
     42static inline int rcar_cmm_enable(struct platform_device *pdev)
     43{
     44	return 0;
     45}
     46
     47static inline void rcar_cmm_disable(struct platform_device *pdev)
     48{
     49}
     50
     51static inline int rcar_cmm_setup(struct platform_device *pdev,
     52				 const struct rcar_cmm_config *config)
     53{
     54	return 0;
     55}
     56#endif /* IS_ENABLED(CONFIG_DRM_RCAR_CMM) */
     57
     58#endif /* __RCAR_CMM_H__ */