drm/i915/skl: Avoid using un-initialized bits_per_pixel
authorKumar, Mahesh <mahesh1.kumar@intel.com>
Thu, 3 Sep 2015 10:47:08 +0000 (16:17 +0530)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 4 Sep 2015 07:38:16 +0000 (09:38 +0200)
commit395ab7541a0e141ffbde127b534e44f28d39a050
tree0a7889587ccd83d6241a211215565fc6b14cdb38
parent58f2cf241fb98414e2e35fc3d4d0494eb30b3245
drm/i915/skl: Avoid using un-initialized bits_per_pixel

Don't rely on fb->bits_per_pixel as intel_framebuffer_init is not
filling bits_per_pixel field of fb-struct for YUV pixel format.
This leads to divide by zero error during watermark calculation.

Signed-off-by: Kumar, Mahesh <mahesh1.kumar@intel.com>
Cc: Konduru, Chandra <chandra.konduru@intel.com>
Reviewed-by: Sonika Jindal <sonika.jindal@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_pm.c