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

source code of linux/drivers/gpu/drm/i915/display/intel_dpt_common.c