1 // SPDX-License-Identifier: MIT 2 /* 3 * Copyright © 2023 Intel Corporation 4 */ 5 6 #include "i915_drv.h" 7 #include "i915_reg.h" 8 #include "intel_de.h" 9 #include "intel_display_types.h" 10 #include "intel_dpt_common.h" 11 #include "skl_universal_plane_regs.h" 12 intel_dpt_configure(struct intel_crtc * crtc)13void intel_dpt_configure(struct intel_crtc *crtc) 14 { 15 struct drm_i915_private *i915 = to_i915(crtc->base.dev); 16 17 if (DISPLAY_VER(i915) == 14) { 18 enum pipe pipe = crtc->pipe; 19 enum plane_id plane_id; 20 21 for_each_plane_id_on_crtc(crtc, plane_id) { 22 if (plane_id == PLANE_CURSOR) 23 continue; 24 25 intel_de_rmw(i915, PLANE_CHICKEN(pipe, plane_id), 26 PLANE_CHICKEN_DISABLE_DPT, 27 i915->display.params.enable_dpt ? 0 : 28 PLANE_CHICKEN_DISABLE_DPT); 29 } 30 } else if (DISPLAY_VER(i915) == 13) { 31 intel_de_rmw(i915, CHICKEN_MISC_2, 32 CHICKEN_MISC_DISABLE_DPT, 33 i915->display.params.enable_dpt ? 0 : 34 CHICKEN_MISC_DISABLE_DPT); 35 } 36 } 37