OSDN Git Service

drm/i915: Introduce intel_crtc_state_alloc()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 19 Dec 2019 11:14:30 +0000 (13:14 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 20 Dec 2019 21:41:21 +0000 (23:41 +0200)
commit216383e920e85f3c1d9772030a69c4dab7455f47
tree59bbb18ed2080b2281a967767508d0b7f630ae98
parenta5e93b42f462fc87f884f12f5176b10dca5a3bf1
drm/i915: Introduce intel_crtc_state_alloc()

We have several places where we want to allocate a pristine
crtc state. Some of those currently call intel_crtc_state_reset()
to properly initialize all the non-zero defaults in the state, but
some places do not. Let's add intel_crtc_state_alloc() to do both
the alloc and the reset, and call that everywhere we need a fresh
crtc state.

v2: s/kzalloc/kmalloc/ since we memset() anyway (José)

Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20191219111430.17527-1-ville.syrjala@linux.intel.com
Reviewed-by: José Roberto de Souza <jose.souza@intel.com>
drivers/gpu/drm/i915/display/intel_display.c