Commit 34dc3cc5 authored by Jani Nikula's avatar Jani Nikula

drm/i915: move color_funcs to display.funcs

Move display color functions under drm_i915_private display sub-struct.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/36d6e9327582c94c1962c10ebd1581c3d15a5743.1661346845.git.jani.nikula@intel.com
parent 06a50913
......@@ -1167,22 +1167,22 @@ void intel_color_load_luts(const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
dev_priv->color_funcs->load_luts(crtc_state);
dev_priv->display.funcs.color->load_luts(crtc_state);
}
void intel_color_commit_noarm(const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
if (dev_priv->color_funcs->color_commit_noarm)
dev_priv->color_funcs->color_commit_noarm(crtc_state);
if (dev_priv->display.funcs.color->color_commit_noarm)
dev_priv->display.funcs.color->color_commit_noarm(crtc_state);
}
void intel_color_commit_arm(const struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
dev_priv->color_funcs->color_commit_arm(crtc_state);
dev_priv->display.funcs.color->color_commit_arm(crtc_state);
}
static bool intel_can_preload_luts(const struct intel_crtc_state *new_crtc_state)
......@@ -1238,15 +1238,15 @@ int intel_color_check(struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
return dev_priv->color_funcs->color_check(crtc_state);
return dev_priv->display.funcs.color->color_check(crtc_state);
}
void intel_color_get_config(struct intel_crtc_state *crtc_state)
{
struct drm_i915_private *dev_priv = to_i915(crtc_state->uapi.crtc->dev);
if (dev_priv->color_funcs->read_luts)
dev_priv->color_funcs->read_luts(crtc_state);
if (dev_priv->display.funcs.color->read_luts)
dev_priv->display.funcs.color->read_luts(crtc_state);
}
static bool need_plane_update(struct intel_plane *plane,
......@@ -2225,28 +2225,28 @@ void intel_color_init(struct intel_crtc *crtc)
if (HAS_GMCH(dev_priv)) {
if (IS_CHERRYVIEW(dev_priv)) {
dev_priv->color_funcs = &chv_color_funcs;
dev_priv->display.funcs.color = &chv_color_funcs;
} else if (DISPLAY_VER(dev_priv) >= 4) {
dev_priv->color_funcs = &i965_color_funcs;
dev_priv->display.funcs.color = &i965_color_funcs;
} else {
dev_priv->color_funcs = &i9xx_color_funcs;
dev_priv->display.funcs.color = &i9xx_color_funcs;
}
} else {
if (DISPLAY_VER(dev_priv) >= 11)
dev_priv->color_funcs = &icl_color_funcs;
dev_priv->display.funcs.color = &icl_color_funcs;
else if (DISPLAY_VER(dev_priv) == 10)
dev_priv->color_funcs = &glk_color_funcs;
dev_priv->display.funcs.color = &glk_color_funcs;
else if (DISPLAY_VER(dev_priv) == 9)
dev_priv->color_funcs = &skl_color_funcs;
dev_priv->display.funcs.color = &skl_color_funcs;
else if (DISPLAY_VER(dev_priv) == 8)
dev_priv->color_funcs = &bdw_color_funcs;
dev_priv->display.funcs.color = &bdw_color_funcs;
else if (DISPLAY_VER(dev_priv) == 7) {
if (IS_HASWELL(dev_priv))
dev_priv->color_funcs = &hsw_color_funcs;
dev_priv->display.funcs.color = &hsw_color_funcs;
else
dev_priv->color_funcs = &ivb_color_funcs;
dev_priv->display.funcs.color = &ivb_color_funcs;
} else
dev_priv->color_funcs = &ilk_color_funcs;
dev_priv->display.funcs.color = &ilk_color_funcs;
}
drm_crtc_enable_color_mgmt(&crtc->base,
......
......@@ -11,6 +11,7 @@
struct drm_i915_private;
struct intel_atomic_state;
struct intel_cdclk_funcs;
struct intel_color_funcs;
struct intel_crtc;
struct intel_crtc_state;
struct intel_dpll_funcs;
......@@ -71,6 +72,9 @@ struct intel_display {
/* fdi display functions */
const struct intel_fdi_funcs *fdi;
/* Display internal color functions */
const struct intel_color_funcs *color;
} funcs;
};
......
......@@ -85,7 +85,6 @@ struct intel_audio_funcs;
struct intel_cdclk_config;
struct intel_cdclk_state;
struct intel_cdclk_vals;
struct intel_color_funcs;
struct intel_connector;
struct intel_dp;
struct intel_encoder;
......@@ -485,9 +484,6 @@ struct drm_i915_private {
/* pm private clock gating functions */
const struct drm_i915_clock_gating_funcs *clock_gating_funcs;
/* Display internal color functions */
const struct intel_color_funcs *color_funcs;
/* PCH chipset type */
enum intel_pch pch_type;
unsigned short pch_id;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment