1 1.3 riastrad /* $NetBSD: intel_psr.h,v 1.3 2022/02/27 21:23:39 riastradh Exp $ */ 2 1.1 riastrad 3 1.1 riastrad /* SPDX-License-Identifier: MIT */ 4 1.1 riastrad /* 5 1.1 riastrad * Copyright 2019 Intel Corporation 6 1.1 riastrad */ 7 1.1 riastrad 8 1.1 riastrad #ifndef __INTEL_PSR_H__ 9 1.1 riastrad #define __INTEL_PSR_H__ 10 1.1 riastrad 11 1.1 riastrad #include "intel_frontbuffer.h" 12 1.1 riastrad 13 1.1 riastrad struct drm_connector; 14 1.1 riastrad struct drm_connector_state; 15 1.1 riastrad struct drm_i915_private; 16 1.1 riastrad struct intel_crtc_state; 17 1.1 riastrad struct intel_dp; 18 1.1 riastrad 19 1.3 riastrad /* PSR is disabled on NetBSD for now until we find what's wrong with it */ 20 1.3 riastrad #define CAN_PSR(dev_priv) 0//(HAS_PSR(dev_priv) && dev_priv->psr.sink_support) 21 1.1 riastrad void intel_psr_init_dpcd(struct intel_dp *intel_dp); 22 1.1 riastrad void intel_psr_enable(struct intel_dp *intel_dp, 23 1.1 riastrad const struct intel_crtc_state *crtc_state); 24 1.1 riastrad void intel_psr_disable(struct intel_dp *intel_dp, 25 1.1 riastrad const struct intel_crtc_state *old_crtc_state); 26 1.1 riastrad void intel_psr_update(struct intel_dp *intel_dp, 27 1.1 riastrad const struct intel_crtc_state *crtc_state); 28 1.1 riastrad int intel_psr_debug_set(struct drm_i915_private *dev_priv, u64 value); 29 1.1 riastrad void intel_psr_invalidate(struct drm_i915_private *dev_priv, 30 1.1 riastrad unsigned frontbuffer_bits, 31 1.1 riastrad enum fb_op_origin origin); 32 1.1 riastrad void intel_psr_flush(struct drm_i915_private *dev_priv, 33 1.1 riastrad unsigned frontbuffer_bits, 34 1.1 riastrad enum fb_op_origin origin); 35 1.1 riastrad void intel_psr_init(struct drm_i915_private *dev_priv); 36 1.1 riastrad void intel_psr_compute_config(struct intel_dp *intel_dp, 37 1.1 riastrad struct intel_crtc_state *crtc_state); 38 1.1 riastrad void intel_psr_irq_handler(struct drm_i915_private *dev_priv, u32 psr_iir); 39 1.1 riastrad void intel_psr_short_pulse(struct intel_dp *intel_dp); 40 1.1 riastrad int intel_psr_wait_for_idle(const struct intel_crtc_state *new_crtc_state, 41 1.1 riastrad u32 *out_value); 42 1.1 riastrad bool intel_psr_enabled(struct intel_dp *intel_dp); 43 1.1 riastrad void intel_psr_atomic_check(struct drm_connector *connector, 44 1.1 riastrad struct drm_connector_state *old_state, 45 1.1 riastrad struct drm_connector_state *new_state); 46 1.1 riastrad 47 1.1 riastrad #endif /* __INTEL_PSR_H__ */ 48