drm/i915: Fix plane allocation/free functions
authorMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Tue, 13 Nov 2018 09:28:04 +0000 (10:28 +0100)
committerMaarten Lankhorst <maarten.lankhorst@linux.intel.com>
Thu, 15 Nov 2018 11:16:33 +0000 (12:16 +0100)
commit87b94026ff31b90a382d368123d31b2c4888069b
treed2d36936f5c1f4a8fa1a7ecf19612e1f12be1669
parentfa96ed1f564c6310ac51eef2a2c330986526d3c2
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
drivers/gpu/drm/i915/intel_atomic_plane.c
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_sprite.c