Commit 304ebaeb authored by Jani Nikula's avatar Jani Nikula

drm/i915: move overlay to display.overlay

Move display overlay related members under drm_i915_private display
sub-struct.
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarLucas De Marchi <lucas.demarchi@intel.com>
Reviewed-by: default avatarArun R Murthy <arun.r.murthy@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/e019fb538536d36bab28feaafe049e0b1726f2d9.1661346845.git.jani.nikula@intel.com
parent 5a4dd6f0
...@@ -31,6 +31,7 @@ struct intel_fbdev; ...@@ -31,6 +31,7 @@ struct intel_fbdev;
struct intel_fdi_funcs; struct intel_fdi_funcs;
struct intel_hotplug_funcs; struct intel_hotplug_funcs;
struct intel_initial_plane_config; struct intel_initial_plane_config;
struct intel_overlay;
struct intel_display_funcs { struct intel_display_funcs {
/* /*
...@@ -242,6 +243,7 @@ struct intel_display { ...@@ -242,6 +243,7 @@ struct intel_display {
struct intel_dmc dmc; struct intel_dmc dmc;
struct intel_dpll dpll; struct intel_dpll dpll;
struct intel_hotplug hotplug; struct intel_hotplug hotplug;
struct intel_overlay *overlay;
struct intel_wm wm; struct intel_wm wm;
}; };
......
...@@ -487,7 +487,7 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay) ...@@ -487,7 +487,7 @@ static int intel_overlay_release_old_vid(struct intel_overlay *overlay)
void intel_overlay_reset(struct drm_i915_private *dev_priv) void intel_overlay_reset(struct drm_i915_private *dev_priv)
{ {
struct intel_overlay *overlay = dev_priv->overlay; struct intel_overlay *overlay = dev_priv->display.overlay;
if (!overlay) if (!overlay)
return; return;
...@@ -1113,7 +1113,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data, ...@@ -1113,7 +1113,7 @@ int intel_overlay_put_image_ioctl(struct drm_device *dev, void *data,
struct drm_i915_gem_object *new_bo; struct drm_i915_gem_object *new_bo;
int ret; int ret;
overlay = dev_priv->overlay; overlay = dev_priv->display.overlay;
if (!overlay) { if (!overlay) {
drm_dbg(&dev_priv->drm, "userspace bug: no overlay\n"); drm_dbg(&dev_priv->drm, "userspace bug: no overlay\n");
return -ENODEV; return -ENODEV;
...@@ -1273,7 +1273,7 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data, ...@@ -1273,7 +1273,7 @@ int intel_overlay_attrs_ioctl(struct drm_device *dev, void *data,
struct intel_overlay *overlay; struct intel_overlay *overlay;
int ret; int ret;
overlay = dev_priv->overlay; overlay = dev_priv->display.overlay;
if (!overlay) { if (!overlay) {
drm_dbg(&dev_priv->drm, "userspace bug: no overlay\n"); drm_dbg(&dev_priv->drm, "userspace bug: no overlay\n");
return -ENODEV; return -ENODEV;
...@@ -1416,7 +1416,7 @@ void intel_overlay_setup(struct drm_i915_private *dev_priv) ...@@ -1416,7 +1416,7 @@ void intel_overlay_setup(struct drm_i915_private *dev_priv)
update_polyphase_filter(overlay->regs); update_polyphase_filter(overlay->regs);
update_reg_attrs(overlay, overlay->regs); update_reg_attrs(overlay, overlay->regs);
dev_priv->overlay = overlay; dev_priv->display.overlay = overlay;
drm_info(&dev_priv->drm, "Initialized overlay support.\n"); drm_info(&dev_priv->drm, "Initialized overlay support.\n");
return; return;
...@@ -1428,7 +1428,7 @@ void intel_overlay_cleanup(struct drm_i915_private *dev_priv) ...@@ -1428,7 +1428,7 @@ void intel_overlay_cleanup(struct drm_i915_private *dev_priv)
{ {
struct intel_overlay *overlay; struct intel_overlay *overlay;
overlay = fetch_and_zero(&dev_priv->overlay); overlay = fetch_and_zero(&dev_priv->display.overlay);
if (!overlay) if (!overlay)
return; return;
...@@ -1457,7 +1457,7 @@ struct intel_overlay_error_state { ...@@ -1457,7 +1457,7 @@ struct intel_overlay_error_state {
struct intel_overlay_error_state * struct intel_overlay_error_state *
intel_overlay_capture_error_state(struct drm_i915_private *dev_priv) intel_overlay_capture_error_state(struct drm_i915_private *dev_priv)
{ {
struct intel_overlay *overlay = dev_priv->overlay; struct intel_overlay *overlay = dev_priv->display.overlay;
struct intel_overlay_error_state *error; struct intel_overlay_error_state *error;
if (!overlay || !overlay->active) if (!overlay || !overlay->active)
......
...@@ -83,7 +83,6 @@ struct intel_connector; ...@@ -83,7 +83,6 @@ struct intel_connector;
struct intel_dp; struct intel_dp;
struct intel_encoder; struct intel_encoder;
struct intel_limit; struct intel_limit;
struct intel_overlay;
struct intel_overlay_error_state; struct intel_overlay_error_state;
struct vlv_s0ix_state; struct vlv_s0ix_state;
...@@ -343,9 +342,6 @@ struct drm_i915_private { ...@@ -343,9 +342,6 @@ struct drm_i915_private {
bool preserve_bios_swizzle; bool preserve_bios_swizzle;
/* overlay */
struct intel_overlay *overlay;
/* backlight registers and fields in struct intel_panel */ /* backlight registers and fields in struct intel_panel */
struct mutex backlight_lock; struct mutex backlight_lock;
......
...@@ -36,7 +36,7 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data, ...@@ -36,7 +36,7 @@ int i915_getparam_ioctl(struct drm_device *dev, void *data,
value = to_gt(i915)->ggtt->num_fences; value = to_gt(i915)->ggtt->num_fences;
break; break;
case I915_PARAM_HAS_OVERLAY: case I915_PARAM_HAS_OVERLAY:
value = !!i915->overlay; value = !!i915->display.overlay;
break; break;
case I915_PARAM_HAS_BSD: case I915_PARAM_HAS_BSD:
value = !!intel_engine_lookup_user(i915, value = !!intel_engine_lookup_user(i915,
......
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