1 // SPDX-License-Identifier: MIT
3 * Copyright © 2022 Intel Corporation
8 #include "intel_display.h"
10 #include "intel_hti_regs.h"
12 void intel_hti_init(struct intel_display *display)
15 * If the platform has HTI, we need to find out whether it has reserved
16 * any display resources before we create our display outputs.
18 if (DISPLAY_INFO(display)->has_hti)
19 display->hti.state = intel_de_read(display, HDPORT_STATE);
22 bool intel_hti_uses_phy(struct intel_display *display, enum phy phy)
24 if (drm_WARN_ON(display->drm, phy == PHY_NONE))
27 return display->hti.state & HDPORT_ENABLED &&
28 display->hti.state & HDPORT_DDI_USED(phy);
31 u32 intel_hti_dpll_mask(struct intel_display *display)
33 if (!(display->hti.state & HDPORT_ENABLED))
37 * Note: This is subtle. The values must coincide with what's defined
40 return REG_FIELD_GET(HDPORT_DPLL_USED_MASK, display->hti.state);