struct intel_display *display = to_intel_display(crtc_state);
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);
- if (!display->funcs.display->get_pipe_config(crtc, crtc_state))
+ if (!display->modeset.funcs->get_pipe_config(crtc, crtc_state))
return false;
crtc_state->hw.active = true;
intel_psr_notify_pipe_change(state, crtc, true);
- display->funcs.display->crtc_enable(state, crtc);
+ display->modeset.funcs->crtc_enable(state, crtc);
intel_crtc_wait_for_next_vblank(crtc);
intel_psr_notify_pipe_change(state, crtc, false);
- display->funcs.display->crtc_disable(state, crtc);
+ display->modeset.funcs->crtc_disable(state, crtc);
for_each_intel_crtc_in_pipe_mask(display->drm, pipe_crtc,
intel_crtc_joined_pipe_mask(old_crtc_state)) {
}
/* Now enable the clocks, plane, pipe, and connectors that we set up. */
- display->funcs.display->commit_modeset_enables(state);
+ display->modeset.funcs->commit_modeset_enables(state);
/* FIXME probably need to sequence this properly */
intel_program_dpkgc_latency(state);
return MODE_OK;
}
-static const struct intel_display_funcs skl_display_funcs = {
+static const struct intel_modeset_funcs skl_display_funcs = {
.get_pipe_config = hsw_get_pipe_config,
.crtc_enable = hsw_crtc_enable,
.crtc_disable = hsw_crtc_disable,
.fixup_initial_plane_config = skl_fixup_initial_plane_config,
};
-static const struct intel_display_funcs ddi_display_funcs = {
+static const struct intel_modeset_funcs ddi_display_funcs = {
.get_pipe_config = hsw_get_pipe_config,
.crtc_enable = hsw_crtc_enable,
.crtc_disable = hsw_crtc_disable,
.fixup_initial_plane_config = i9xx_fixup_initial_plane_config,
};
-static const struct intel_display_funcs pch_split_display_funcs = {
+static const struct intel_modeset_funcs pch_split_display_funcs = {
.get_pipe_config = ilk_get_pipe_config,
.crtc_enable = ilk_crtc_enable,
.crtc_disable = ilk_crtc_disable,
.fixup_initial_plane_config = i9xx_fixup_initial_plane_config,
};
-static const struct intel_display_funcs vlv_display_funcs = {
+static const struct intel_modeset_funcs vlv_display_funcs = {
.get_pipe_config = i9xx_get_pipe_config,
.crtc_enable = valleyview_crtc_enable,
.crtc_disable = i9xx_crtc_disable,
.fixup_initial_plane_config = i9xx_fixup_initial_plane_config,
};
-static const struct intel_display_funcs i9xx_display_funcs = {
+static const struct intel_modeset_funcs i9xx_display_funcs = {
.get_pipe_config = i9xx_get_pipe_config,
.crtc_enable = i9xx_crtc_enable,
.crtc_disable = i9xx_crtc_disable,
void intel_init_display_hooks(struct intel_display *display)
{
if (DISPLAY_VER(display) >= 9) {
- display->funcs.display = &skl_display_funcs;
+ display->modeset.funcs = &skl_display_funcs;
} else if (HAS_DDI(display)) {
- display->funcs.display = &ddi_display_funcs;
+ display->modeset.funcs = &ddi_display_funcs;
} else if (HAS_PCH_SPLIT(display)) {
- display->funcs.display = &pch_split_display_funcs;
+ display->modeset.funcs = &pch_split_display_funcs;
} else if (display->platform.cherryview ||
display->platform.valleyview) {
- display->funcs.display = &vlv_display_funcs;
+ display->modeset.funcs = &vlv_display_funcs;
} else {
- display->funcs.display = &i9xx_display_funcs;
+ display->modeset.funcs = &i9xx_display_funcs;
}
}
/* Amount of PSF GV points, BSpec precisely defines this */
#define I915_NUM_PSF_GV_POINTS 3
-struct intel_display_funcs {
+struct intel_modeset_funcs {
/*
* Returns the active state of the crtc, and if the crtc is active,
* fills out the pipe-config with the hw state.
/* list of all intel_crtcs sorted by pipe */
struct list_head pipe_list;
- /* Display functions */
- struct {
- /* Top level crtc-ish functions */
- const struct intel_display_funcs *display;
- } funcs;
-
struct {
bool any_task_allowed;
struct task_struct *allowed_task;
u32 pipestat_irq_mask[I915_MAX_PIPES];
} irq;
+ struct {
+ /* Top level crtc-ish functions */
+ const struct intel_modeset_funcs *funcs;
+ } modeset;
+
struct {
/* protected by wm.wm_mutex */
u16 linetime[I915_MAX_PIPES];