mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-23 09:19:51 +00:00
drm/i915/plane: add intel_plane_helper_add() helper
Add a small helper to keep intel_plane_helper_funcs static. Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20210518132426.7567-1-jani.nikula@intel.com
This commit is contained in:
parent
cd5606aa39
commit
d372ba4243
6 changed files with 11 additions and 7 deletions
|
@ -912,7 +912,7 @@ intel_primary_plane_create(struct drm_i915_private *dev_priv, enum pipe pipe)
|
|||
zpos = 0;
|
||||
drm_plane_create_zpos_immutable_property(&plane->base, zpos);
|
||||
|
||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||
intel_plane_helper_add(plane);
|
||||
|
||||
return plane;
|
||||
|
||||
|
|
|
@ -601,7 +601,12 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
|
|||
return 0;
|
||||
}
|
||||
|
||||
const struct drm_plane_helper_funcs intel_plane_helper_funcs = {
|
||||
static const struct drm_plane_helper_funcs intel_plane_helper_funcs = {
|
||||
.prepare_fb = intel_prepare_plane_fb,
|
||||
.cleanup_fb = intel_cleanup_plane_fb,
|
||||
};
|
||||
|
||||
void intel_plane_helper_add(struct intel_plane *plane)
|
||||
{
|
||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||
}
|
||||
|
|
|
@ -17,8 +17,6 @@ struct intel_crtc_state;
|
|||
struct intel_plane;
|
||||
struct intel_plane_state;
|
||||
|
||||
extern const struct drm_plane_helper_funcs intel_plane_helper_funcs;
|
||||
|
||||
unsigned int intel_adjusted_rate(const struct drm_rect *src,
|
||||
const struct drm_rect *dst,
|
||||
unsigned int rate);
|
||||
|
@ -65,5 +63,6 @@ int intel_atomic_plane_check_clipping(struct intel_plane_state *plane_state,
|
|||
bool can_position);
|
||||
void intel_plane_set_invisible(struct intel_crtc_state *crtc_state,
|
||||
struct intel_plane_state *plane_state);
|
||||
void intel_plane_helper_add(struct intel_plane *plane);
|
||||
|
||||
#endif /* __INTEL_ATOMIC_PLANE_H__ */
|
||||
|
|
|
@ -801,7 +801,7 @@ intel_cursor_plane_create(struct drm_i915_private *dev_priv,
|
|||
if (DISPLAY_VER(dev_priv) >= 12)
|
||||
drm_plane_enable_fb_damage_clips(&cursor->base);
|
||||
|
||||
drm_plane_helper_add(&cursor->base, &intel_plane_helper_funcs);
|
||||
intel_plane_helper_add(cursor);
|
||||
|
||||
return cursor;
|
||||
|
||||
|
|
|
@ -1856,7 +1856,7 @@ intel_sprite_plane_create(struct drm_i915_private *dev_priv,
|
|||
zpos = sprite + 1;
|
||||
drm_plane_create_zpos_immutable_property(&plane->base, zpos);
|
||||
|
||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||
intel_plane_helper_add(plane);
|
||||
|
||||
return plane;
|
||||
|
||||
|
|
|
@ -2179,7 +2179,7 @@ skl_universal_plane_create(struct drm_i915_private *dev_priv,
|
|||
BIT(DRM_SCALING_FILTER_DEFAULT) |
|
||||
BIT(DRM_SCALING_FILTER_NEAREST_NEIGHBOR));
|
||||
|
||||
drm_plane_helper_add(&plane->base, &intel_plane_helper_funcs);
|
||||
intel_plane_helper_add(plane);
|
||||
|
||||
return plane;
|
||||
|
||||
|
|
Loading…
Reference in a new issue