drm/i915: Extract skl_watermark.c
Pull all the skl+ watermark code (and the dbuf/sagv/ipc code since it's all sort of intertwined and I'm too lazy to think of a finer grained split right now) into its own file from the catch-all intel_pm.c. Also sneak in the s/dev_priv/i915/ rename while at it. Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20220908191646.20239-3-ville.syrjala@linux.intel.com Reviewed-by: Jani Nikula <jani.nikula@intel.com>
This commit is contained in:
parent
55544b2811
commit
42a0d25649
@ -257,7 +257,8 @@ i915-y += \
|
||||
display/intel_vga.o \
|
||||
display/i9xx_plane.o \
|
||||
display/skl_scaler.o \
|
||||
display/skl_universal_plane.o
|
||||
display/skl_universal_plane.o \
|
||||
display/skl_watermark.o
|
||||
i915-$(CONFIG_ACPI) += \
|
||||
display/intel_acpi.o \
|
||||
display/intel_opregion.o
|
||||
|
@ -43,9 +43,9 @@
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_fb.h"
|
||||
#include "intel_fb_pin.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_sprite.h"
|
||||
#include "skl_scaler.h"
|
||||
#include "skl_watermark.h"
|
||||
|
||||
static void intel_plane_state_reset(struct intel_plane_state *plane_state,
|
||||
struct intel_plane *plane)
|
||||
|
@ -5,15 +5,17 @@
|
||||
|
||||
#include <drm/drm_atomic_state_helper.h>
|
||||
|
||||
#include "i915_drv.h"
|
||||
#include "i915_reg.h"
|
||||
#include "i915_utils.h"
|
||||
#include "intel_atomic.h"
|
||||
#include "intel_bw.h"
|
||||
#include "intel_cdclk.h"
|
||||
#include "intel_display_core.h"
|
||||
#include "intel_display_types.h"
|
||||
#include "skl_watermark.h"
|
||||
#include "intel_mchbar_regs.h"
|
||||
#include "intel_pcode.h"
|
||||
#include "intel_pm.h"
|
||||
|
||||
/* Parameters for Qclk Geyserville (QGV) */
|
||||
struct intel_qgv_point {
|
||||
|
@ -20,9 +20,9 @@
|
||||
#include "intel_fb.h"
|
||||
#include "intel_fb_pin.h"
|
||||
#include "intel_frontbuffer.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_psr.h"
|
||||
#include "intel_sprite.h"
|
||||
#include "skl_watermark.h"
|
||||
|
||||
/* Cursor formats */
|
||||
static const u32 intel_cursor_formats[] = {
|
||||
|
@ -119,6 +119,7 @@
|
||||
#include "i9xx_plane.h"
|
||||
#include "skl_scaler.h"
|
||||
#include "skl_universal_plane.h"
|
||||
#include "skl_watermark.h"
|
||||
#include "vlv_dsi.h"
|
||||
#include "vlv_dsi_pll.h"
|
||||
#include "vlv_dsi_regs.h"
|
||||
|
@ -26,6 +26,7 @@
|
||||
#include "intel_pm.h"
|
||||
#include "intel_psr.h"
|
||||
#include "intel_sprite.h"
|
||||
#include "skl_watermark.h"
|
||||
|
||||
static inline struct drm_i915_private *node_to_i915(struct drm_info_node *node)
|
||||
{
|
||||
|
@ -19,8 +19,8 @@
|
||||
#include "intel_mchbar_regs.h"
|
||||
#include "intel_pch_refclk.h"
|
||||
#include "intel_pcode.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_snps_phy.h"
|
||||
#include "skl_watermark.h"
|
||||
#include "vlv_sideband.h"
|
||||
|
||||
#define for_each_power_domain_well(__dev_priv, __power_well, __domain) \
|
||||
|
@ -17,10 +17,10 @@
|
||||
#include "intel_dpll.h"
|
||||
#include "intel_hotplug.h"
|
||||
#include "intel_pcode.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_pps.h"
|
||||
#include "intel_tc.h"
|
||||
#include "intel_vga.h"
|
||||
#include "skl_watermark.h"
|
||||
#include "vlv_sideband.h"
|
||||
#include "vlv_sideband_reg.h"
|
||||
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "intel_modeset_setup.h"
|
||||
#include "intel_pch_display.h"
|
||||
#include "intel_pm.h"
|
||||
#include "skl_watermark.h"
|
||||
|
||||
static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
|
||||
struct drm_modeset_acquire_ctx *ctx)
|
||||
|
@ -15,8 +15,8 @@
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_fdi.h"
|
||||
#include "intel_modeset_verify.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_snps_phy.h"
|
||||
#include "skl_watermark.h"
|
||||
|
||||
/*
|
||||
* Cross check the actual hw state with our own modeset state tracking (and its
|
||||
|
@ -15,11 +15,11 @@
|
||||
#include "intel_display_types.h"
|
||||
#include "intel_fb.h"
|
||||
#include "intel_fbc.h"
|
||||
#include "intel_pm.h"
|
||||
#include "intel_psr.h"
|
||||
#include "intel_sprite.h"
|
||||
#include "skl_scaler.h"
|
||||
#include "skl_universal_plane.h"
|
||||
#include "skl_watermark.h"
|
||||
#include "pxp/intel_pxp.h"
|
||||
|
||||
static const u32 skl_plane_formats[] = {
|
||||
|
3470
drivers/gpu/drm/i915/display/skl_watermark.c
Normal file
3470
drivers/gpu/drm/i915/display/skl_watermark.c
Normal file
File diff suppressed because it is too large
Load Diff
78
drivers/gpu/drm/i915/display/skl_watermark.h
Normal file
78
drivers/gpu/drm/i915/display/skl_watermark.h
Normal file
@ -0,0 +1,78 @@
|
||||
/* SPDX-License-Identifier: MIT */
|
||||
/*
|
||||
* Copyright © 2022 Intel Corporation
|
||||
*/
|
||||
|
||||
#ifndef __SKL_WATERMARK_H__
|
||||
#define __SKL_WATERMARK_H__
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "intel_display.h"
|
||||
#include "intel_global_state.h"
|
||||
#include "intel_pm_types.h"
|
||||
|
||||
struct drm_i915_private;
|
||||
struct intel_atomic_state;
|
||||
struct intel_bw_state;
|
||||
struct intel_crtc;
|
||||
struct intel_crtc_state;
|
||||
struct intel_plane;
|
||||
|
||||
u8 intel_enabled_dbuf_slices_mask(struct drm_i915_private *i915);
|
||||
|
||||
void intel_sagv_pre_plane_update(struct intel_atomic_state *state);
|
||||
void intel_sagv_post_plane_update(struct intel_atomic_state *state);
|
||||
bool intel_can_enable_sagv(struct drm_i915_private *i915,
|
||||
const struct intel_bw_state *bw_state);
|
||||
|
||||
u32 skl_ddb_dbuf_slice_mask(struct drm_i915_private *i915,
|
||||
const struct skl_ddb_entry *entry);
|
||||
|
||||
void skl_write_plane_wm(struct intel_plane *plane,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
void skl_write_cursor_wm(struct intel_plane *plane,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
|
||||
bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry *ddb,
|
||||
const struct skl_ddb_entry *entries,
|
||||
int num_entries, int ignore_idx);
|
||||
|
||||
void skl_wm_get_hw_state(struct drm_i915_private *i915);
|
||||
void skl_wm_sanitize(struct drm_i915_private *i915);
|
||||
|
||||
void intel_wm_state_verify(struct intel_crtc *crtc,
|
||||
struct intel_crtc_state *new_crtc_state);
|
||||
|
||||
void intel_enable_ipc(struct drm_i915_private *i915);
|
||||
void intel_init_ipc(struct drm_i915_private *i915);
|
||||
|
||||
void skl_wm_init(struct drm_i915_private *i915);
|
||||
|
||||
struct intel_dbuf_state {
|
||||
struct intel_global_state base;
|
||||
|
||||
struct skl_ddb_entry ddb[I915_MAX_PIPES];
|
||||
unsigned int weight[I915_MAX_PIPES];
|
||||
u8 slices[I915_MAX_PIPES];
|
||||
u8 enabled_slices;
|
||||
u8 active_pipes;
|
||||
bool joined_mbus;
|
||||
};
|
||||
|
||||
struct intel_dbuf_state *
|
||||
intel_atomic_get_dbuf_state(struct intel_atomic_state *state);
|
||||
|
||||
#define to_intel_dbuf_state(x) container_of((x), struct intel_dbuf_state, base)
|
||||
#define intel_atomic_get_old_dbuf_state(state) \
|
||||
to_intel_dbuf_state(intel_atomic_get_old_global_obj_state(state, &to_i915(state->base.dev)->display.dbuf.obj))
|
||||
#define intel_atomic_get_new_dbuf_state(state) \
|
||||
to_intel_dbuf_state(intel_atomic_get_new_global_obj_state(state, &to_i915(state->base.dev)->display.dbuf.obj))
|
||||
|
||||
int intel_dbuf_init(struct drm_i915_private *i915);
|
||||
void intel_dbuf_pre_plane_update(struct intel_atomic_state *state);
|
||||
void intel_dbuf_post_plane_update(struct intel_atomic_state *state);
|
||||
void intel_mbus_dbox_update(struct intel_atomic_state *state);
|
||||
|
||||
#endif /* __SKL_WATERMARK_H__ */
|
||||
|
@ -61,6 +61,7 @@
|
||||
#include "display/intel_pps.h"
|
||||
#include "display/intel_sprite.h"
|
||||
#include "display/intel_vga.h"
|
||||
#include "display/skl_watermark.h"
|
||||
|
||||
#include "gem/i915_gem_context.h"
|
||||
#include "gem/i915_gem_create.h"
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -8,22 +8,9 @@
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
#include "display/intel_display.h"
|
||||
#include "display/intel_global_state.h"
|
||||
|
||||
#include "i915_drv.h"
|
||||
|
||||
struct drm_device;
|
||||
struct drm_i915_private;
|
||||
struct i915_request;
|
||||
struct intel_atomic_state;
|
||||
struct intel_bw_state;
|
||||
struct intel_crtc;
|
||||
struct intel_crtc_state;
|
||||
struct intel_plane;
|
||||
struct skl_ddb_entry;
|
||||
struct skl_pipe_wm;
|
||||
struct skl_wm_level;
|
||||
struct intel_plane_state;
|
||||
|
||||
void intel_init_clock_gating(struct drm_i915_private *dev_priv);
|
||||
void intel_suspend_hw(struct drm_i915_private *dev_priv);
|
||||
@ -34,56 +21,14 @@ void intel_pm_setup(struct drm_i915_private *dev_priv);
|
||||
void g4x_wm_get_hw_state(struct drm_i915_private *dev_priv);
|
||||
void vlv_wm_get_hw_state(struct drm_i915_private *dev_priv);
|
||||
void ilk_wm_get_hw_state(struct drm_i915_private *dev_priv);
|
||||
void skl_wm_get_hw_state(struct drm_i915_private *dev_priv);
|
||||
void intel_wm_state_verify(struct intel_crtc *crtc,
|
||||
struct intel_crtc_state *new_crtc_state);
|
||||
u8 intel_enabled_dbuf_slices_mask(struct drm_i915_private *dev_priv);
|
||||
void skl_ddb_get_hw_state(struct drm_i915_private *dev_priv);
|
||||
u32 skl_ddb_dbuf_slice_mask(struct drm_i915_private *dev_priv,
|
||||
const struct skl_ddb_entry *entry);
|
||||
void g4x_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
void vlv_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
void skl_wm_sanitize(struct drm_i915_private *dev_priv);
|
||||
bool intel_can_enable_sagv(struct drm_i915_private *dev_priv,
|
||||
const struct intel_bw_state *bw_state);
|
||||
void intel_sagv_pre_plane_update(struct intel_atomic_state *state);
|
||||
void intel_sagv_post_plane_update(struct intel_atomic_state *state);
|
||||
bool skl_ddb_allocation_overlaps(const struct skl_ddb_entry *ddb,
|
||||
const struct skl_ddb_entry *entries,
|
||||
int num_entries, int ignore_idx);
|
||||
void skl_write_plane_wm(struct intel_plane *plane,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
void skl_write_cursor_wm(struct intel_plane *plane,
|
||||
const struct intel_crtc_state *crtc_state);
|
||||
bool ilk_disable_lp_wm(struct drm_i915_private *dev_priv);
|
||||
void intel_init_ipc(struct drm_i915_private *dev_priv);
|
||||
void intel_enable_ipc(struct drm_i915_private *dev_priv);
|
||||
bool intel_wm_plane_visible(const struct intel_crtc_state *crtc_state,
|
||||
const struct intel_plane_state *plane_state);
|
||||
void intel_print_wm_latency(struct drm_i915_private *dev_priv,
|
||||
const char *name, const u16 wm[]);
|
||||
|
||||
bool intel_set_memory_cxsr(struct drm_i915_private *dev_priv, bool enable);
|
||||
|
||||
struct intel_dbuf_state {
|
||||
struct intel_global_state base;
|
||||
|
||||
struct skl_ddb_entry ddb[I915_MAX_PIPES];
|
||||
unsigned int weight[I915_MAX_PIPES];
|
||||
u8 slices[I915_MAX_PIPES];
|
||||
u8 enabled_slices;
|
||||
u8 active_pipes;
|
||||
bool joined_mbus;
|
||||
};
|
||||
|
||||
struct intel_dbuf_state *
|
||||
intel_atomic_get_dbuf_state(struct intel_atomic_state *state);
|
||||
|
||||
#define to_intel_dbuf_state(x) container_of((x), struct intel_dbuf_state, base)
|
||||
#define intel_atomic_get_old_dbuf_state(state) \
|
||||
to_intel_dbuf_state(intel_atomic_get_old_global_obj_state(state, &to_i915(state->base.dev)->display.dbuf.obj))
|
||||
#define intel_atomic_get_new_dbuf_state(state) \
|
||||
to_intel_dbuf_state(intel_atomic_get_new_global_obj_state(state, &to_i915(state->base.dev)->display.dbuf.obj))
|
||||
|
||||
int intel_dbuf_init(struct drm_i915_private *dev_priv);
|
||||
void intel_dbuf_pre_plane_update(struct intel_atomic_state *state);
|
||||
void intel_dbuf_post_plane_update(struct intel_atomic_state *state);
|
||||
void intel_mbus_dbox_update(struct intel_atomic_state *state);
|
||||
|
||||
#endif /* __INTEL_PM_H__ */
|
||||
|
Loading…
x
Reference in New Issue
Block a user