]> git.ipfire.org Git - thirdparty/kernel/stable.git/blame - drivers/gpu/drm/i915/intel_panel.h
Merge tag 'pwm/for-5.2-rc1' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git...
[thirdparty/kernel/stable.git] / drivers / gpu / drm / i915 / intel_panel.h
CommitLineData
44c1220a
JN
1/* SPDX-License-Identifier: MIT */
2/*
3 * Copyright © 2019 Intel Corporation
4 */
5
6#ifndef __INTEL_PANEL_H__
7#define __INTEL_PANEL_H__
8
9#include <linux/types.h>
10
11#include "intel_display.h"
12
13struct drm_connector;
14struct drm_connector_state;
15struct drm_display_mode;
16struct intel_connector;
17struct intel_crtc;
18struct intel_crtc_state;
19struct intel_encoder;
20struct intel_panel;
21
22int intel_panel_init(struct intel_panel *panel,
23 struct drm_display_mode *fixed_mode,
24 struct drm_display_mode *downclock_mode);
25void intel_panel_fini(struct intel_panel *panel);
26void intel_fixed_panel_mode(const struct drm_display_mode *fixed_mode,
27 struct drm_display_mode *adjusted_mode);
28void intel_pch_panel_fitting(struct intel_crtc *crtc,
29 struct intel_crtc_state *pipe_config,
30 int fitting_mode);
31void intel_gmch_panel_fitting(struct intel_crtc *crtc,
32 struct intel_crtc_state *pipe_config,
33 int fitting_mode);
34void intel_panel_set_backlight_acpi(const struct drm_connector_state *conn_state,
35 u32 level, u32 max);
36int intel_panel_setup_backlight(struct drm_connector *connector,
37 enum pipe pipe);
38void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state,
39 const struct drm_connector_state *conn_state);
40void intel_panel_update_backlight(struct intel_encoder *encoder,
41 const struct intel_crtc_state *crtc_state,
42 const struct drm_connector_state *conn_state);
43void intel_panel_disable_backlight(const struct drm_connector_state *old_conn_state);
44struct drm_display_mode *
45intel_panel_edid_downclock_mode(struct intel_connector *connector,
46 const struct drm_display_mode *fixed_mode);
47struct drm_display_mode *
48intel_panel_edid_fixed_mode(struct intel_connector *connector);
49struct drm_display_mode *
50intel_panel_vbt_fixed_mode(struct intel_connector *connector);
51
52#if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE)
53int intel_backlight_device_register(struct intel_connector *connector);
54void intel_backlight_device_unregister(struct intel_connector *connector);
55#else /* CONFIG_BACKLIGHT_CLASS_DEVICE */
56static inline int intel_backlight_device_register(struct intel_connector *connector)
57{
58 return 0;
59}
60static inline void intel_backlight_device_unregister(struct intel_connector *connector)
61{
62}
63#endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */
64
65#endif /* __INTEL_PANEL_H__ */