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

intel_backlight.h (1890B)


      1/* SPDX-License-Identifier: MIT */
      2/*
      3 * Copyright © 2021 Intel Corporation
      4 */
      5
      6#ifndef __INTEL_BACKLIGHT_H__
      7#define __INTEL_BACKLIGHT_H__
      8
      9#include <linux/types.h>
     10
     11struct drm_connector_state;
     12struct intel_atomic_state;
     13struct intel_connector;
     14struct intel_crtc_state;
     15struct intel_encoder;
     16struct intel_panel;
     17enum pipe;
     18
     19void intel_backlight_init_funcs(struct intel_panel *panel);
     20int intel_backlight_setup(struct intel_connector *connector, enum pipe pipe);
     21void intel_backlight_destroy(struct intel_panel *panel);
     22
     23void intel_backlight_enable(const struct intel_crtc_state *crtc_state,
     24			    const struct drm_connector_state *conn_state);
     25void intel_backlight_update(struct intel_atomic_state *state,
     26			    struct intel_encoder *encoder,
     27			    const struct intel_crtc_state *crtc_state,
     28			    const struct drm_connector_state *conn_state);
     29void intel_backlight_disable(const struct drm_connector_state *old_conn_state);
     30
     31void intel_backlight_set_acpi(const struct drm_connector_state *conn_state,
     32			      u32 level, u32 max);
     33void intel_backlight_set_pwm_level(const struct drm_connector_state *conn_state,
     34				   u32 level);
     35u32 intel_backlight_invert_pwm_level(struct intel_connector *connector, u32 level);
     36u32 intel_backlight_level_to_pwm(struct intel_connector *connector, u32 level);
     37u32 intel_backlight_level_from_pwm(struct intel_connector *connector, u32 val);
     38
     39#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
     40int intel_backlight_device_register(struct intel_connector *connector);
     41void intel_backlight_device_unregister(struct intel_connector *connector);
     42#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
     43static inline int intel_backlight_device_register(struct intel_connector *connector)
     44{
     45	return 0;
     46}
     47static inline void intel_backlight_device_unregister(struct intel_connector *connector)
     48{
     49}
     50#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
     51
     52#endif /* __INTEL_BACKLIGHT_H__ */