SQUASHME! [VPG]: calculate the aspect ratio for pfit

When a pfit enable request comes, calculate the aspect ratio,
determine the mode in which pfit can be enabled and verify with
the requested mode, if not same use the calculated mode to enable
panel fitter.
panel resolution 1920 x 1080, aspect ratio = 1920/1080 = 1.77
image to be scaled 1024 x 768, aspect ratio = 1024 / 756 = 1.33
    1920 / h = 1024 / 768
    h = 1440, which is greater then the panel height
    w / 1080 = 1024 / 768
    w = 1440
    hence panel fitter can be enabled in pillar box mode.

SQUASHME: This patch is to be squashed with the below patch
    commit 32ebc82f175e8ddad7a2a2d6aa0b7b13fa9cb15d
    Author: Arun R Murthy <arun.r.murthy@intel.com>
    Date:   Tue Mar 3 14:27:59 2015 +0530

    SQUASHME! [VPG]: drm/i915: Enable panel fitter only on HWC request

Change-Id: Ib233536cb0fc89521efd976e0fa7556d2725b679
Tracked-On: https://vthsd.fm.intel.com/hsd/pcgsw/default.aspx#bug/default.aspx?bug_id=8158848
Signed-off-by: Arun R Murthy <arun.r.murthy@intel.com>
1 file changed