drm/i915: Push clear_intel_crtc_state() onto the heap
authorChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Feb 2019 09:27:59 +0000 (09:27 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Tue, 5 Feb 2019 19:23:36 +0000 (19:23 +0000)
commitf81b845f72c31e7cbba4e8a91dc30252bc1589d0
treeb920d6f8c3ea1f0fea0037cdbdfc78249df3488e
parent39806c3f11e206d03e76521c808a96aedfcc58d9
drm/i915: Push clear_intel_crtc_state() onto the heap

clear_intel_crtc_state() uses the stack for saving a temporary copy of
certain bits of the inherited crtc_state before clearing the unwanted
bits. This pushes it over the stack limit for my little 32b Pineview,
so move the temporary allocation to the heap instead. As we now use a
zeroed struct, we can copy the whole extended state back to both
preserve what bits need to be preserved and zero the rest.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190205092759.16018-1-chris@chris-wilson.co.uk
drivers/gpu/drm/i915/intel_display.c