diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-11-13 12:28:04 +0300 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2018-11-15 14:16:33 +0300 |
commit | 87b94026ff31b90a382d368123d31b2c4888069b (patch) | |
tree | d2d36936f5c1f4a8fa1a7ecf19612e1f12be1669 /drivers/gpu/drm/i915/intel_sprite.c | |
parent | fa96ed1f564c6310ac51eef2a2c330986526d3c2 (diff) | |
download | linux-87b94026ff31b90a382d368123d31b2c4888069b.tar.xz |
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.c | 29 |
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) |