diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_drv.h')
| -rw-r--r-- | drivers/gpu/drm/i915/intel_drv.h | 242 |
1 files changed, 146 insertions, 96 deletions
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h index a28b4aac1e02..089a42577ea3 100644 --- a/drivers/gpu/drm/i915/intel_drv.h +++ b/drivers/gpu/drm/i915/intel_drv.h | |||
| @@ -242,14 +242,6 @@ struct intel_connector { | |||
| 242 | * and active (i.e. dpms ON state). */ | 242 | * and active (i.e. dpms ON state). */ |
| 243 | bool (*get_hw_state)(struct intel_connector *); | 243 | bool (*get_hw_state)(struct intel_connector *); |
| 244 | 244 | ||
| 245 | /* | ||
| 246 | * Removes all interfaces through which the connector is accessible | ||
| 247 | * - like sysfs, debugfs entries -, so that no new operations can be | ||
| 248 | * started on the connector. Also makes sure all currently pending | ||
| 249 | * operations finish before returing. | ||
| 250 | */ | ||
| 251 | void (*unregister)(struct intel_connector *); | ||
| 252 | |||
| 253 | /* Panel info for eDP and LVDS */ | 245 | /* Panel info for eDP and LVDS */ |
| 254 | struct intel_panel panel; | 246 | struct intel_panel panel; |
| 255 | 247 | ||
| @@ -266,7 +258,7 @@ struct intel_connector { | |||
| 266 | struct intel_dp *mst_port; | 258 | struct intel_dp *mst_port; |
| 267 | }; | 259 | }; |
| 268 | 260 | ||
| 269 | typedef struct dpll { | 261 | struct dpll { |
| 270 | /* given values */ | 262 | /* given values */ |
| 271 | int n; | 263 | int n; |
| 272 | int m1, m2; | 264 | int m1, m2; |
| @@ -276,7 +268,7 @@ typedef struct dpll { | |||
| 276 | int vco; | 268 | int vco; |
| 277 | int m; | 269 | int m; |
| 278 | int p; | 270 | int p; |
| 279 | } intel_clock_t; | 271 | }; |
| 280 | 272 | ||
| 281 | struct intel_atomic_state { | 273 | struct intel_atomic_state { |
| 282 | struct drm_atomic_state base; | 274 | struct drm_atomic_state base; |
| @@ -291,17 +283,32 @@ struct intel_atomic_state { | |||
| 291 | 283 | ||
| 292 | bool dpll_set, modeset; | 284 | bool dpll_set, modeset; |
| 293 | 285 | ||
| 286 | /* | ||
| 287 | * Does this transaction change the pipes that are active? This mask | ||
| 288 | * tracks which CRTC's have changed their active state at the end of | ||
| 289 | * the transaction (not counting the temporary disable during modesets). | ||
| 290 | * This mask should only be non-zero when intel_state->modeset is true, | ||
| 291 | * but the converse is not necessarily true; simply changing a mode may | ||
| 292 | * not flip the final active status of any CRTC's | ||
| 293 | */ | ||
| 294 | unsigned int active_pipe_changes; | ||
| 295 | |||
| 294 | unsigned int active_crtcs; | 296 | unsigned int active_crtcs; |
| 295 | unsigned int min_pixclk[I915_MAX_PIPES]; | 297 | unsigned int min_pixclk[I915_MAX_PIPES]; |
| 296 | 298 | ||
| 299 | /* SKL/KBL Only */ | ||
| 300 | unsigned int cdclk_pll_vco; | ||
| 301 | |||
| 297 | struct intel_shared_dpll_config shared_dpll[I915_NUM_PLLS]; | 302 | struct intel_shared_dpll_config shared_dpll[I915_NUM_PLLS]; |
| 298 | struct intel_wm_config wm_config; | ||
| 299 | 303 | ||
| 300 | /* | 304 | /* |
| 301 | * Current watermarks can't be trusted during hardware readout, so | 305 | * Current watermarks can't be trusted during hardware readout, so |
| 302 | * don't bother calculating intermediate watermarks. | 306 | * don't bother calculating intermediate watermarks. |
| 303 | */ | 307 | */ |
| 304 | bool skip_intermediate_wm; | 308 | bool skip_intermediate_wm; |
| 309 | |||
| 310 | /* Gen9+ only */ | ||
| 311 | struct skl_wm_values wm_results; | ||
| 305 | }; | 312 | }; |
| 306 | 313 | ||
| 307 | struct intel_plane_state { | 314 | struct intel_plane_state { |
| @@ -405,6 +412,48 @@ struct skl_pipe_wm { | |||
| 405 | uint32_t linetime; | 412 | uint32_t linetime; |
| 406 | }; | 413 | }; |
| 407 | 414 | ||
| 415 | struct intel_crtc_wm_state { | ||
| 416 | union { | ||
| 417 | struct { | ||
| 418 | /* | ||
| 419 | * Intermediate watermarks; these can be | ||
| 420 | * programmed immediately since they satisfy | ||
| 421 | * both the current configuration we're | ||
| 422 | * switching away from and the new | ||
| 423 | * configuration we're switching to. | ||
| 424 | */ | ||
| 425 | struct intel_pipe_wm intermediate; | ||
| 426 | |||
| 427 | /* | ||
| 428 | * Optimal watermarks, programmed post-vblank | ||
| 429 | * when this state is committed. | ||
| 430 | */ | ||
| 431 | struct intel_pipe_wm optimal; | ||
| 432 | } ilk; | ||
| 433 | |||
| 434 | struct { | ||
| 435 | /* gen9+ only needs 1-step wm programming */ | ||
| 436 | struct skl_pipe_wm optimal; | ||
| 437 | |||
| 438 | /* cached plane data rate */ | ||
| 439 | unsigned plane_data_rate[I915_MAX_PLANES]; | ||
| 440 | unsigned plane_y_data_rate[I915_MAX_PLANES]; | ||
| 441 | |||
| 442 | /* minimum block allocation */ | ||
| 443 | uint16_t minimum_blocks[I915_MAX_PLANES]; | ||
| 444 | uint16_t minimum_y_blocks[I915_MAX_PLANES]; | ||
| 445 | } skl; | ||
| 446 | }; | ||
| 447 | |||
| 448 | /* | ||
| 449 | * Platforms with two-step watermark programming will need to | ||
| 450 | * update watermark programming post-vblank to switch from the | ||
| 451 | * safe intermediate watermarks to the optimal final | ||
| 452 | * watermarks. | ||
| 453 | */ | ||
| 454 | bool need_postvbl_update; | ||
| 455 | }; | ||
| 456 | |||
| 408 | struct intel_crtc_state { | 457 | struct intel_crtc_state { |
| 409 | struct drm_crtc_state base; | 458 | struct drm_crtc_state base; |
| 410 | 459 | ||
| @@ -522,6 +571,12 @@ struct intel_crtc_state { | |||
| 522 | 571 | ||
| 523 | uint8_t lane_count; | 572 | uint8_t lane_count; |
| 524 | 573 | ||
| 574 | /* | ||
| 575 | * Used by platforms having DP/HDMI PHY with programmable lane | ||
| 576 | * latency optimization. | ||
| 577 | */ | ||
| 578 | uint8_t lane_lat_optim_mask; | ||
| 579 | |||
| 525 | /* Panel fitter controls for gen2-gen4 + VLV */ | 580 | /* Panel fitter controls for gen2-gen4 + VLV */ |
| 526 | struct { | 581 | struct { |
| 527 | u32 control; | 582 | u32 control; |
| @@ -558,32 +613,7 @@ struct intel_crtc_state { | |||
| 558 | /* IVB sprite scaling w/a (WaCxSRDisabledForSpriteScaling:ivb) */ | 613 | /* IVB sprite scaling w/a (WaCxSRDisabledForSpriteScaling:ivb) */ |
| 559 | bool disable_lp_wm; | 614 | bool disable_lp_wm; |
| 560 | 615 | ||
| 561 | struct { | 616 | struct intel_crtc_wm_state wm; |
| 562 | /* | ||
| 563 | * Optimal watermarks, programmed post-vblank when this state | ||
| 564 | * is committed. | ||
| 565 | */ | ||
| 566 | union { | ||
| 567 | struct intel_pipe_wm ilk; | ||
| 568 | struct skl_pipe_wm skl; | ||
| 569 | } optimal; | ||
| 570 | |||
| 571 | /* | ||
| 572 | * Intermediate watermarks; these can be programmed immediately | ||
| 573 | * since they satisfy both the current configuration we're | ||
| 574 | * switching away from and the new configuration we're switching | ||
| 575 | * to. | ||
| 576 | */ | ||
| 577 | struct intel_pipe_wm intermediate; | ||
| 578 | |||
| 579 | /* | ||
| 580 | * Platforms with two-step watermark programming will need to | ||
| 581 | * update watermark programming post-vblank to switch from the | ||
| 582 | * safe intermediate watermarks to the optimal final | ||
| 583 | * watermarks. | ||
| 584 | */ | ||
| 585 | bool need_postvbl_update; | ||
| 586 | } wm; | ||
| 587 | 617 | ||
| 588 | /* Gamma mode programmed on the pipe */ | 618 | /* Gamma mode programmed on the pipe */ |
| 589 | uint32_t gamma_mode; | 619 | uint32_t gamma_mode; |
| @@ -598,14 +628,6 @@ struct vlv_wm_state { | |||
| 598 | bool cxsr; | 628 | bool cxsr; |
| 599 | }; | 629 | }; |
| 600 | 630 | ||
| 601 | struct intel_mmio_flip { | ||
| 602 | struct work_struct work; | ||
| 603 | struct drm_i915_private *i915; | ||
| 604 | struct drm_i915_gem_request *req; | ||
| 605 | struct intel_crtc *crtc; | ||
| 606 | unsigned int rotation; | ||
| 607 | }; | ||
| 608 | |||
| 609 | struct intel_crtc { | 631 | struct intel_crtc { |
| 610 | struct drm_crtc base; | 632 | struct drm_crtc base; |
| 611 | enum pipe pipe; | 633 | enum pipe pipe; |
| @@ -620,7 +642,7 @@ struct intel_crtc { | |||
| 620 | unsigned long enabled_power_domains; | 642 | unsigned long enabled_power_domains; |
| 621 | bool lowfreq_avail; | 643 | bool lowfreq_avail; |
| 622 | struct intel_overlay *overlay; | 644 | struct intel_overlay *overlay; |
| 623 | struct intel_unpin_work *unpin_work; | 645 | struct intel_flip_work *flip_work; |
| 624 | 646 | ||
| 625 | atomic_t unpin_work_count; | 647 | atomic_t unpin_work_count; |
| 626 | 648 | ||
| @@ -815,6 +837,7 @@ struct intel_dp { | |||
| 815 | uint8_t dpcd[DP_RECEIVER_CAP_SIZE]; | 837 | uint8_t dpcd[DP_RECEIVER_CAP_SIZE]; |
| 816 | uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; | 838 | uint8_t psr_dpcd[EDP_PSR_RECEIVER_CAP_SIZE]; |
| 817 | uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS]; | 839 | uint8_t downstream_ports[DP_MAX_DOWNSTREAM_PORTS]; |
| 840 | uint8_t edp_dpcd[EDP_DISPLAY_CTL_CAP_SIZE]; | ||
| 818 | /* sink rates as reported by DP_SUPPORTED_LINK_RATES */ | 841 | /* sink rates as reported by DP_SUPPORTED_LINK_RATES */ |
| 819 | uint8_t num_sink_rates; | 842 | uint8_t num_sink_rates; |
| 820 | int sink_rates[DP_MAX_SUPPORTED_RATES]; | 843 | int sink_rates[DP_MAX_SUPPORTED_RATES]; |
| @@ -863,8 +886,6 @@ struct intel_dp { | |||
| 863 | /* This is called before a link training is starterd */ | 886 | /* This is called before a link training is starterd */ |
| 864 | void (*prepare_link_retrain)(struct intel_dp *intel_dp); | 887 | void (*prepare_link_retrain)(struct intel_dp *intel_dp); |
| 865 | 888 | ||
| 866 | bool train_set_valid; | ||
| 867 | |||
| 868 | /* Displayport compliance testing */ | 889 | /* Displayport compliance testing */ |
| 869 | unsigned long compliance_test_type; | 890 | unsigned long compliance_test_type; |
| 870 | unsigned long compliance_test_data; | 891 | unsigned long compliance_test_data; |
| @@ -947,22 +968,21 @@ intel_get_crtc_for_plane(struct drm_device *dev, int plane) | |||
| 947 | return dev_priv->plane_to_crtc_mapping[plane]; | 968 | return dev_priv->plane_to_crtc_mapping[plane]; |
| 948 | } | 969 | } |
| 949 | 970 | ||
| 950 | struct intel_unpin_work { | 971 | struct intel_flip_work { |
| 951 | struct work_struct work; | 972 | struct work_struct unpin_work; |
| 973 | struct work_struct mmio_work; | ||
| 974 | |||
| 952 | struct drm_crtc *crtc; | 975 | struct drm_crtc *crtc; |
| 953 | struct drm_framebuffer *old_fb; | 976 | struct drm_framebuffer *old_fb; |
| 954 | struct drm_i915_gem_object *pending_flip_obj; | 977 | struct drm_i915_gem_object *pending_flip_obj; |
| 955 | struct drm_pending_vblank_event *event; | 978 | struct drm_pending_vblank_event *event; |
| 956 | atomic_t pending; | 979 | atomic_t pending; |
| 957 | #define INTEL_FLIP_INACTIVE 0 | ||
| 958 | #define INTEL_FLIP_PENDING 1 | ||
| 959 | #define INTEL_FLIP_COMPLETE 2 | ||
| 960 | u32 flip_count; | 980 | u32 flip_count; |
| 961 | u32 gtt_offset; | 981 | u32 gtt_offset; |
| 962 | struct drm_i915_gem_request *flip_queued_req; | 982 | struct drm_i915_gem_request *flip_queued_req; |
| 963 | u32 flip_queued_vblank; | 983 | u32 flip_queued_vblank; |
| 964 | u32 flip_ready_vblank; | 984 | u32 flip_ready_vblank; |
| 965 | bool enable_stall_check; | 985 | unsigned int rotation; |
| 966 | }; | 986 | }; |
| 967 | 987 | ||
| 968 | struct intel_load_detect_pipe { | 988 | struct intel_load_detect_pipe { |
| @@ -1031,9 +1051,9 @@ void gen5_enable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask); | |||
| 1031 | void gen5_disable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask); | 1051 | void gen5_disable_gt_irq(struct drm_i915_private *dev_priv, uint32_t mask); |
| 1032 | void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); | 1052 | void gen6_enable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); |
| 1033 | void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); | 1053 | void gen6_disable_pm_irq(struct drm_i915_private *dev_priv, uint32_t mask); |
| 1034 | void gen6_reset_rps_interrupts(struct drm_device *dev); | 1054 | void gen6_reset_rps_interrupts(struct drm_i915_private *dev_priv); |
| 1035 | void gen6_enable_rps_interrupts(struct drm_device *dev); | 1055 | void gen6_enable_rps_interrupts(struct drm_i915_private *dev_priv); |
| 1036 | void gen6_disable_rps_interrupts(struct drm_device *dev); | 1056 | void gen6_disable_rps_interrupts(struct drm_i915_private *dev_priv); |
| 1037 | u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask); | 1057 | u32 gen6_sanitize_rps_pm_mask(struct drm_i915_private *dev_priv, u32 mask); |
| 1038 | void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv); | 1058 | void intel_runtime_pm_disable_interrupts(struct drm_i915_private *dev_priv); |
| 1039 | void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv); | 1059 | void intel_runtime_pm_enable_interrupts(struct drm_i915_private *dev_priv); |
| @@ -1112,14 +1132,16 @@ void i915_audio_component_init(struct drm_i915_private *dev_priv); | |||
| 1112 | void i915_audio_component_cleanup(struct drm_i915_private *dev_priv); | 1132 | void i915_audio_component_cleanup(struct drm_i915_private *dev_priv); |
| 1113 | 1133 | ||
| 1114 | /* intel_display.c */ | 1134 | /* intel_display.c */ |
| 1135 | void skl_set_preferred_cdclk_vco(struct drm_i915_private *dev_priv, int vco); | ||
| 1136 | void intel_update_rawclk(struct drm_i915_private *dev_priv); | ||
| 1115 | int vlv_get_cck_clock(struct drm_i915_private *dev_priv, | 1137 | int vlv_get_cck_clock(struct drm_i915_private *dev_priv, |
| 1116 | const char *name, u32 reg, int ref_freq); | 1138 | const char *name, u32 reg, int ref_freq); |
| 1117 | extern const struct drm_plane_funcs intel_plane_funcs; | 1139 | extern const struct drm_plane_funcs intel_plane_funcs; |
| 1118 | void intel_init_display_hooks(struct drm_i915_private *dev_priv); | 1140 | void intel_init_display_hooks(struct drm_i915_private *dev_priv); |
| 1119 | unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info); | 1141 | unsigned int intel_rotation_info_size(const struct intel_rotation_info *rot_info); |
| 1120 | bool intel_has_pending_fb_unpin(struct drm_device *dev); | 1142 | bool intel_has_pending_fb_unpin(struct drm_device *dev); |
| 1121 | void intel_mark_busy(struct drm_device *dev); | 1143 | void intel_mark_busy(struct drm_i915_private *dev_priv); |
| 1122 | void intel_mark_idle(struct drm_device *dev); | 1144 | void intel_mark_idle(struct drm_i915_private *dev_priv); |
| 1123 | void intel_crtc_restore_mode(struct drm_crtc *crtc); | 1145 | void intel_crtc_restore_mode(struct drm_crtc *crtc); |
| 1124 | int intel_display_suspend(struct drm_device *dev); | 1146 | int intel_display_suspend(struct drm_device *dev); |
| 1125 | void intel_encoder_destroy(struct drm_encoder *encoder); | 1147 | void intel_encoder_destroy(struct drm_encoder *encoder); |
| @@ -1128,7 +1150,6 @@ struct intel_connector *intel_connector_alloc(void); | |||
| 1128 | bool intel_connector_get_hw_state(struct intel_connector *connector); | 1150 | bool intel_connector_get_hw_state(struct intel_connector *connector); |
| 1129 | void intel_connector_attach_encoder(struct intel_connector *connector, | 1151 | void intel_connector_attach_encoder(struct intel_connector *connector, |
| 1130 | struct intel_encoder *encoder); | 1152 | struct intel_encoder *encoder); |
| 1131 | struct drm_encoder *intel_best_encoder(struct drm_connector *connector); | ||
| 1132 | struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, | 1153 | struct drm_display_mode *intel_crtc_mode_get(struct drm_device *dev, |
| 1133 | struct drm_crtc *crtc); | 1154 | struct drm_crtc *crtc); |
| 1134 | enum pipe intel_get_pipe_from_connector(struct intel_connector *connector); | 1155 | enum pipe intel_get_pipe_from_connector(struct intel_connector *connector); |
| @@ -1151,6 +1172,9 @@ intel_wait_for_vblank_if_active(struct drm_device *dev, int pipe) | |||
| 1151 | if (crtc->active) | 1172 | if (crtc->active) |
| 1152 | intel_wait_for_vblank(dev, pipe); | 1173 | intel_wait_for_vblank(dev, pipe); |
| 1153 | } | 1174 | } |
| 1175 | |||
| 1176 | u32 intel_crtc_get_vblank_counter(struct intel_crtc *crtc); | ||
| 1177 | |||
| 1154 | int ironlake_get_lanes_required(int target_clock, int link_bw, int bpp); | 1178 | int ironlake_get_lanes_required(int target_clock, int link_bw, int bpp); |
| 1155 | void vlv_wait_port_ready(struct drm_i915_private *dev_priv, | 1179 | void vlv_wait_port_ready(struct drm_i915_private *dev_priv, |
| 1156 | struct intel_digital_port *dport, | 1180 | struct intel_digital_port *dport, |
| @@ -1164,14 +1188,14 @@ void intel_release_load_detect_pipe(struct drm_connector *connector, | |||
| 1164 | struct drm_modeset_acquire_ctx *ctx); | 1188 | struct drm_modeset_acquire_ctx *ctx); |
| 1165 | int intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb, | 1189 | int intel_pin_and_fence_fb_obj(struct drm_framebuffer *fb, |
| 1166 | unsigned int rotation); | 1190 | unsigned int rotation); |
| 1191 | void intel_unpin_fb_obj(struct drm_framebuffer *fb, unsigned int rotation); | ||
| 1167 | struct drm_framebuffer * | 1192 | struct drm_framebuffer * |
| 1168 | __intel_framebuffer_create(struct drm_device *dev, | 1193 | __intel_framebuffer_create(struct drm_device *dev, |
| 1169 | struct drm_mode_fb_cmd2 *mode_cmd, | 1194 | struct drm_mode_fb_cmd2 *mode_cmd, |
| 1170 | struct drm_i915_gem_object *obj); | 1195 | struct drm_i915_gem_object *obj); |
| 1171 | void intel_prepare_page_flip(struct drm_device *dev, int plane); | 1196 | void intel_finish_page_flip_cs(struct drm_i915_private *dev_priv, int pipe); |
| 1172 | void intel_finish_page_flip(struct drm_device *dev, int pipe); | 1197 | void intel_finish_page_flip_mmio(struct drm_i915_private *dev_priv, int pipe); |
| 1173 | void intel_finish_page_flip_plane(struct drm_device *dev, int plane); | 1198 | void intel_check_page_flip(struct drm_i915_private *dev_priv, int pipe); |
| 1174 | void intel_check_page_flip(struct drm_device *dev, int pipe); | ||
| 1175 | int intel_prepare_plane_fb(struct drm_plane *plane, | 1199 | int intel_prepare_plane_fb(struct drm_plane *plane, |
| 1176 | const struct drm_plane_state *new_state); | 1200 | const struct drm_plane_state *new_state); |
| 1177 | void intel_cleanup_plane_fb(struct drm_plane *plane, | 1201 | void intel_cleanup_plane_fb(struct drm_plane *plane, |
| @@ -1228,23 +1252,25 @@ u32 intel_compute_tile_offset(int *x, int *y, | |||
| 1228 | const struct drm_framebuffer *fb, int plane, | 1252 | const struct drm_framebuffer *fb, int plane, |
| 1229 | unsigned int pitch, | 1253 | unsigned int pitch, |
| 1230 | unsigned int rotation); | 1254 | unsigned int rotation); |
| 1231 | void intel_prepare_reset(struct drm_device *dev); | 1255 | void intel_prepare_reset(struct drm_i915_private *dev_priv); |
| 1232 | void intel_finish_reset(struct drm_device *dev); | 1256 | void intel_finish_reset(struct drm_i915_private *dev_priv); |
| 1233 | void hsw_enable_pc8(struct drm_i915_private *dev_priv); | 1257 | void hsw_enable_pc8(struct drm_i915_private *dev_priv); |
| 1234 | void hsw_disable_pc8(struct drm_i915_private *dev_priv); | 1258 | void hsw_disable_pc8(struct drm_i915_private *dev_priv); |
| 1235 | void broxton_init_cdclk(struct drm_i915_private *dev_priv); | 1259 | void bxt_init_cdclk(struct drm_i915_private *dev_priv); |
| 1236 | void broxton_uninit_cdclk(struct drm_i915_private *dev_priv); | 1260 | void bxt_uninit_cdclk(struct drm_i915_private *dev_priv); |
| 1237 | bool broxton_cdclk_verify_state(struct drm_i915_private *dev_priv); | 1261 | void bxt_ddi_phy_init(struct drm_i915_private *dev_priv, enum dpio_phy phy); |
| 1238 | void broxton_ddi_phy_init(struct drm_i915_private *dev_priv); | 1262 | void bxt_ddi_phy_uninit(struct drm_i915_private *dev_priv, enum dpio_phy phy); |
| 1239 | void broxton_ddi_phy_uninit(struct drm_i915_private *dev_priv); | 1263 | bool bxt_ddi_phy_is_enabled(struct drm_i915_private *dev_priv, |
| 1240 | void broxton_ddi_phy_verify_state(struct drm_i915_private *dev_priv); | 1264 | enum dpio_phy phy); |
| 1265 | bool bxt_ddi_phy_verify_state(struct drm_i915_private *dev_priv, | ||
| 1266 | enum dpio_phy phy); | ||
| 1241 | void gen9_sanitize_dc_state(struct drm_i915_private *dev_priv); | 1267 | void gen9_sanitize_dc_state(struct drm_i915_private *dev_priv); |
| 1242 | void bxt_enable_dc9(struct drm_i915_private *dev_priv); | 1268 | void bxt_enable_dc9(struct drm_i915_private *dev_priv); |
| 1243 | void bxt_disable_dc9(struct drm_i915_private *dev_priv); | 1269 | void bxt_disable_dc9(struct drm_i915_private *dev_priv); |
| 1244 | void gen9_enable_dc5(struct drm_i915_private *dev_priv); | 1270 | void gen9_enable_dc5(struct drm_i915_private *dev_priv); |
| 1245 | void skl_init_cdclk(struct drm_i915_private *dev_priv); | 1271 | void skl_init_cdclk(struct drm_i915_private *dev_priv); |
| 1246 | int skl_sanitize_cdclk(struct drm_i915_private *dev_priv); | ||
| 1247 | void skl_uninit_cdclk(struct drm_i915_private *dev_priv); | 1272 | void skl_uninit_cdclk(struct drm_i915_private *dev_priv); |
| 1273 | unsigned int skl_cdclk_get_vco(unsigned int freq); | ||
| 1248 | void skl_enable_dc6(struct drm_i915_private *dev_priv); | 1274 | void skl_enable_dc6(struct drm_i915_private *dev_priv); |
| 1249 | void skl_disable_dc6(struct drm_i915_private *dev_priv); | 1275 | void skl_disable_dc6(struct drm_i915_private *dev_priv); |
| 1250 | void intel_dp_get_m_n(struct intel_crtc *crtc, | 1276 | void intel_dp_get_m_n(struct intel_crtc *crtc, |
| @@ -1252,8 +1278,8 @@ void intel_dp_get_m_n(struct intel_crtc *crtc, | |||
| 1252 | void intel_dp_set_m_n(struct intel_crtc *crtc, enum link_m_n_set m_n); | 1278 | void intel_dp_set_m_n(struct intel_crtc *crtc, enum link_m_n_set m_n); |
| 1253 | int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n); | 1279 | int intel_dotclock_calculate(int link_freq, const struct intel_link_m_n *m_n); |
| 1254 | bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state, int target_clock, | 1280 | bool bxt_find_best_dpll(struct intel_crtc_state *crtc_state, int target_clock, |
| 1255 | intel_clock_t *best_clock); | 1281 | struct dpll *best_clock); |
| 1256 | int chv_calc_dpll_params(int refclk, intel_clock_t *pll_clock); | 1282 | int chv_calc_dpll_params(int refclk, struct dpll *pll_clock); |
| 1257 | 1283 | ||
| 1258 | bool intel_crtc_active(struct drm_crtc *crtc); | 1284 | bool intel_crtc_active(struct drm_crtc *crtc); |
| 1259 | void hsw_enable_ips(struct intel_crtc *crtc); | 1285 | void hsw_enable_ips(struct intel_crtc *crtc); |
| @@ -1284,7 +1310,7 @@ void intel_csr_ucode_suspend(struct drm_i915_private *); | |||
| 1284 | void intel_csr_ucode_resume(struct drm_i915_private *); | 1310 | void intel_csr_ucode_resume(struct drm_i915_private *); |
| 1285 | 1311 | ||
| 1286 | /* intel_dp.c */ | 1312 | /* intel_dp.c */ |
| 1287 | void intel_dp_init(struct drm_device *dev, i915_reg_t output_reg, enum port port); | 1313 | bool intel_dp_init(struct drm_device *dev, i915_reg_t output_reg, enum port port); |
| 1288 | bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port, | 1314 | bool intel_dp_init_connector(struct intel_digital_port *intel_dig_port, |
| 1289 | struct intel_connector *intel_connector); | 1315 | struct intel_connector *intel_connector); |
| 1290 | void intel_dp_set_link_params(struct intel_dp *intel_dp, | 1316 | void intel_dp_set_link_params(struct intel_dp *intel_dp, |
| @@ -1339,12 +1365,22 @@ bool intel_dp_source_supports_hbr2(struct intel_dp *intel_dp); | |||
| 1339 | bool | 1365 | bool |
| 1340 | intel_dp_get_link_status(struct intel_dp *intel_dp, uint8_t link_status[DP_LINK_STATUS_SIZE]); | 1366 | intel_dp_get_link_status(struct intel_dp *intel_dp, uint8_t link_status[DP_LINK_STATUS_SIZE]); |
| 1341 | 1367 | ||
| 1368 | static inline unsigned int intel_dp_unused_lane_mask(int lane_count) | ||
| 1369 | { | ||
| 1370 | return ~((1 << lane_count) - 1) & 0xf; | ||
| 1371 | } | ||
| 1372 | |||
| 1373 | /* intel_dp_aux_backlight.c */ | ||
| 1374 | int intel_dp_aux_init_backlight_funcs(struct intel_connector *intel_connector); | ||
| 1375 | |||
| 1342 | /* intel_dp_mst.c */ | 1376 | /* intel_dp_mst.c */ |
| 1343 | int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); | 1377 | int intel_dp_mst_encoder_init(struct intel_digital_port *intel_dig_port, int conn_id); |
| 1344 | void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port); | 1378 | void intel_dp_mst_encoder_cleanup(struct intel_digital_port *intel_dig_port); |
| 1345 | /* intel_dsi.c */ | 1379 | /* intel_dsi.c */ |
| 1346 | void intel_dsi_init(struct drm_device *dev); | 1380 | void intel_dsi_init(struct drm_device *dev); |
| 1347 | 1381 | ||
| 1382 | /* intel_dsi_dcs_backlight.c */ | ||
| 1383 | int intel_dsi_dcs_init_backlight_funcs(struct intel_connector *intel_connector); | ||
| 1348 | 1384 | ||
| 1349 | /* intel_dvo.c */ | 1385 | /* intel_dvo.c */ |
| 1350 | void intel_dvo_init(struct drm_device *dev); | 1386 | void intel_dvo_init(struct drm_device *dev); |
| @@ -1385,11 +1421,15 @@ static inline void intel_fbdev_restore_mode(struct drm_device *dev) | |||
| 1385 | void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv, | 1421 | void intel_fbc_choose_crtc(struct drm_i915_private *dev_priv, |
| 1386 | struct drm_atomic_state *state); | 1422 | struct drm_atomic_state *state); |
| 1387 | bool intel_fbc_is_active(struct drm_i915_private *dev_priv); | 1423 | bool intel_fbc_is_active(struct drm_i915_private *dev_priv); |
| 1388 | void intel_fbc_pre_update(struct intel_crtc *crtc); | 1424 | void intel_fbc_pre_update(struct intel_crtc *crtc, |
| 1425 | struct intel_crtc_state *crtc_state, | ||
| 1426 | struct intel_plane_state *plane_state); | ||
| 1389 | void intel_fbc_post_update(struct intel_crtc *crtc); | 1427 | void intel_fbc_post_update(struct intel_crtc *crtc); |
| 1390 | void intel_fbc_init(struct drm_i915_private *dev_priv); | 1428 | void intel_fbc_init(struct drm_i915_private *dev_priv); |
| 1391 | void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv); | 1429 | void intel_fbc_init_pipe_state(struct drm_i915_private *dev_priv); |
| 1392 | void intel_fbc_enable(struct intel_crtc *crtc); | 1430 | void intel_fbc_enable(struct intel_crtc *crtc, |
| 1431 | struct intel_crtc_state *crtc_state, | ||
| 1432 | struct intel_plane_state *plane_state); | ||
| 1393 | void intel_fbc_disable(struct intel_crtc *crtc); | 1433 | void intel_fbc_disable(struct intel_crtc *crtc); |
| 1394 | void intel_fbc_global_disable(struct drm_i915_private *dev_priv); | 1434 | void intel_fbc_global_disable(struct drm_i915_private *dev_priv); |
| 1395 | void intel_fbc_invalidate(struct drm_i915_private *dev_priv, | 1435 | void intel_fbc_invalidate(struct drm_i915_private *dev_priv, |
| @@ -1424,13 +1464,13 @@ void intel_attach_aspect_ratio_property(struct drm_connector *connector); | |||
| 1424 | 1464 | ||
| 1425 | 1465 | ||
| 1426 | /* intel_overlay.c */ | 1466 | /* intel_overlay.c */ |
| 1427 | void intel_setup_overlay(struct drm_device *dev); | 1467 | void intel_setup_overlay(struct drm_i915_private *dev_priv); |
| 1428 | void intel_cleanup_overlay(struct drm_device *dev); | 1468 | void intel_cleanup_overlay(struct drm_i915_private *dev_priv); |
| 1429 | int intel_overlay_switch_off(struct intel_overlay *overlay); | 1469 | int intel_overlay_switch_off(struct intel_overlay *overlay); |
| 1430 | int intel_overlay_put_image(struct drm_device *dev, void *data, | 1470 | int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, |
| 1431 | struct drm_file *file_priv); | 1471 | struct drm_file *file_priv); |
| 1432 | int intel_overlay_attrs(struct drm_device *dev, void *data, | 1472 | int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data, |
| 1433 | struct drm_file *file_priv); | 1473 | struct drm_file *file_priv); |
| 1434 | void intel_overlay_reset(struct drm_i915_private *dev_priv); | 1474 | void intel_overlay_reset(struct drm_i915_private *dev_priv); |
| 1435 | 1475 | ||
| 1436 | 1476 | ||
| @@ -1459,7 +1499,14 @@ extern struct drm_display_mode *intel_find_panel_downclock( | |||
| 1459 | struct drm_display_mode *fixed_mode, | 1499 | struct drm_display_mode *fixed_mode, |
| 1460 | struct drm_connector *connector); | 1500 | struct drm_connector *connector); |
| 1461 | void intel_backlight_register(struct drm_device *dev); | 1501 | void intel_backlight_register(struct drm_device *dev); |
| 1462 | void intel_backlight_unregister(struct drm_device *dev); | 1502 | |
| 1503 | #if IS_ENABLED(CONFIG_BACKLIGHT_CLASS_DEVICE) | ||
| 1504 | void intel_backlight_device_unregister(struct intel_connector *connector); | ||
| 1505 | #else /* CONFIG_BACKLIGHT_CLASS_DEVICE */ | ||
| 1506 | static inline void intel_backlight_device_unregister(struct intel_connector *connector) | ||
| 1507 | { | ||
| 1508 | } | ||
| 1509 | #endif /* CONFIG_BACKLIGHT_CLASS_DEVICE */ | ||
| 1463 | 1510 | ||
| 1464 | 1511 | ||
| 1465 | /* intel_psr.c */ | 1512 | /* intel_psr.c */ |
| @@ -1601,21 +1648,20 @@ void intel_init_clock_gating_hooks(struct drm_i915_private *dev_priv); | |||
| 1601 | void intel_pm_setup(struct drm_device *dev); | 1648 | void intel_pm_setup(struct drm_device *dev); |
| 1602 | void intel_gpu_ips_init(struct drm_i915_private *dev_priv); | 1649 | void intel_gpu_ips_init(struct drm_i915_private *dev_priv); |
| 1603 | void intel_gpu_ips_teardown(void); | 1650 | void intel_gpu_ips_teardown(void); |
| 1604 | void intel_init_gt_powersave(struct drm_device *dev); | 1651 | void intel_init_gt_powersave(struct drm_i915_private *dev_priv); |
| 1605 | void intel_cleanup_gt_powersave(struct drm_device *dev); | 1652 | void intel_cleanup_gt_powersave(struct drm_i915_private *dev_priv); |
| 1606 | void intel_enable_gt_powersave(struct drm_device *dev); | 1653 | void intel_enable_gt_powersave(struct drm_i915_private *dev_priv); |
| 1607 | void intel_disable_gt_powersave(struct drm_device *dev); | 1654 | void intel_disable_gt_powersave(struct drm_i915_private *dev_priv); |
| 1608 | void intel_suspend_gt_powersave(struct drm_device *dev); | 1655 | void intel_suspend_gt_powersave(struct drm_i915_private *dev_priv); |
| 1609 | void intel_reset_gt_powersave(struct drm_device *dev); | 1656 | void intel_reset_gt_powersave(struct drm_i915_private *dev_priv); |
| 1610 | void gen6_update_ring_freq(struct drm_device *dev); | 1657 | void gen6_update_ring_freq(struct drm_i915_private *dev_priv); |
| 1611 | void gen6_rps_busy(struct drm_i915_private *dev_priv); | 1658 | void gen6_rps_busy(struct drm_i915_private *dev_priv); |
| 1612 | void gen6_rps_reset_ei(struct drm_i915_private *dev_priv); | 1659 | void gen6_rps_reset_ei(struct drm_i915_private *dev_priv); |
| 1613 | void gen6_rps_idle(struct drm_i915_private *dev_priv); | 1660 | void gen6_rps_idle(struct drm_i915_private *dev_priv); |
| 1614 | void gen6_rps_boost(struct drm_i915_private *dev_priv, | 1661 | void gen6_rps_boost(struct drm_i915_private *dev_priv, |
| 1615 | struct intel_rps_client *rps, | 1662 | struct intel_rps_client *rps, |
| 1616 | unsigned long submitted); | 1663 | unsigned long submitted); |
| 1617 | void intel_queue_rps_boost_for_request(struct drm_device *dev, | 1664 | void intel_queue_rps_boost_for_request(struct drm_i915_gem_request *req); |
| 1618 | struct drm_i915_gem_request *req); | ||
| 1619 | void vlv_wm_get_hw_state(struct drm_device *dev); | 1665 | void vlv_wm_get_hw_state(struct drm_device *dev); |
| 1620 | void ilk_wm_get_hw_state(struct drm_device *dev); | 1666 | void ilk_wm_get_hw_state(struct drm_device *dev); |
| 1621 | void skl_wm_get_hw_state(struct drm_device *dev); | 1667 | void skl_wm_get_hw_state(struct drm_device *dev); |
| @@ -1623,7 +1669,11 @@ void skl_ddb_get_hw_state(struct drm_i915_private *dev_priv, | |||
| 1623 | struct skl_ddb_allocation *ddb /* out */); | 1669 | struct skl_ddb_allocation *ddb /* out */); |
| 1624 | uint32_t ilk_pipe_pixel_rate(const struct intel_crtc_state *pipe_config); | 1670 | uint32_t ilk_pipe_pixel_rate(const struct intel_crtc_state *pipe_config); |
| 1625 | bool ilk_disable_lp_wm(struct drm_device *dev); | 1671 | bool ilk_disable_lp_wm(struct drm_device *dev); |
| 1626 | int sanitize_rc6_option(const struct drm_device *dev, int enable_rc6); | 1672 | int sanitize_rc6_option(struct drm_i915_private *dev_priv, int enable_rc6); |
| 1673 | static inline int intel_enable_rc6(void) | ||
| 1674 | { | ||
| 1675 | return i915.enable_rc6; | ||
| 1676 | } | ||
| 1627 | 1677 | ||
| 1628 | /* intel_sdvo.c */ | 1678 | /* intel_sdvo.c */ |
| 1629 | bool intel_sdvo_init(struct drm_device *dev, | 1679 | bool intel_sdvo_init(struct drm_device *dev, |
| @@ -1635,7 +1685,7 @@ int intel_plane_init(struct drm_device *dev, enum pipe pipe, int plane); | |||
| 1635 | int intel_sprite_set_colorkey(struct drm_device *dev, void *data, | 1685 | int intel_sprite_set_colorkey(struct drm_device *dev, void *data, |
| 1636 | struct drm_file *file_priv); | 1686 | struct drm_file *file_priv); |
| 1637 | void intel_pipe_update_start(struct intel_crtc *crtc); | 1687 | void intel_pipe_update_start(struct intel_crtc *crtc); |
| 1638 | void intel_pipe_update_end(struct intel_crtc *crtc); | 1688 | void intel_pipe_update_end(struct intel_crtc *crtc, struct intel_flip_work *work); |
| 1639 | 1689 | ||
| 1640 | /* intel_tv.c */ | 1690 | /* intel_tv.c */ |
| 1641 | void intel_tv_init(struct drm_device *dev); | 1691 | void intel_tv_init(struct drm_device *dev); |
