summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_sprite.c
diff options
context:
space:
mode:
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-13 10:28:04 +0100
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>2018-11-15 12:16:33 +0100
commit87b94026ff31b90a382d368123d31b2c4888069b (patch)
treed2d36936f5c1f4a8fa1a7ecf19612e1f12be1669 /drivers/gpu/drm/i915/intel_sprite.c
parentfa96ed1f564c6310ac51eef2a2c330986526d3c2 (diff)
downloadlinux-87b94026ff31b90a382d368123d31b2c4888069b.tar.bz2
drm/i915: Fix plane allocation/free functions
Use intel_plane_destroy_state in intel_plane_free to free the state. Also fix intel_plane_alloc() to use __drm_atomic_helper_plane_reset(), to get sane defaults from the atomic core. This is needed to get the correct alpha value and blend mode from the core, and any new default values added from new properties. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> Fixes: b20815255693 ("drm/i915: Add plane alpha blending support, v2.") [mlankhorst: Update commit description to mention alpha blend support] Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20181113092804.13304-1-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_sprite.c')
-rw-r--r--drivers/gpu/drm/i915/intel_sprite.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/drivers/gpu/drm/i915/intel_sprite.c b/drivers/gpu/drm/i915/intel_sprite.c
index 5e0f7b575a50..abe193815ccc 100644
--- a/drivers/gpu/drm/i915/intel_sprite.c
+++ b/drivers/gpu/drm/i915/intel_sprite.c
@@ -1983,35 +1983,6 @@ static bool skl_plane_has_ccs(struct drm_i915_private *dev_priv,
plane_id == PLANE_SPRITE0);
}
-struct intel_plane *intel_plane_alloc(void)
-{
- struct intel_plane_state *plane_state;
- struct intel_plane *plane;
-
- plane = kzalloc(sizeof(*plane), GFP_KERNEL);
- if (!plane)
- return ERR_PTR(-ENOMEM);
-
- plane_state = intel_create_plane_state(&plane->base);
- if (!plane_state) {
- kfree(plane);
- return ERR_PTR(-ENOMEM);
- }
-
- plane->base.state = &plane_state->base;
-
- return plane;
-}
-
-void intel_plane_free(struct intel_plane *plane)
-{
- struct intel_plane_state *plane_state =
- to_intel_plane_state(plane->base.state);
-
- kfree(plane_state);
- kfree(plane);
-}
-
struct intel_plane *
skl_universal_plane_create(struct drm_i915_private *dev_priv,
enum pipe pipe, enum plane_id plane_id)