ved: Enable video decode on CLV
authorLi Zeng <li.zeng@intel.com>
Mon, 13 Feb 2012 01:49:00 +0000 (09:49 +0800)
committerbuildbot <buildbot@intel.com>
Thu, 16 Feb 2012 18:41:34 +0000 (10:41 -0800)
BZ: 23230

Video decode doesn't work on CLV

CLV ved use punit to upload firmware as MFLD D0, modify a macro IS_D0. Disable D0i3 for CLV.

Change-Id: Id817e9dd9d2ab5e27a285630b33a75b91b462bd7
Signed-off-by: Li Zeng <li.zeng@intel.com>
Reviewed-on: http://android.intel.com:8080/35014
Reviewed-by: Ding, Haitao <haitao.ding@intel.com>
Tested-by: Ding, Haitao <haitao.ding@intel.com>
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/staging/mrst/drv/psb_drv.h
drivers/staging/mrst/imgv/msvdx_power.c
drivers/staging/mrst/imgv/psb_msvdx.c

index 64a7c35..a659fd3 100644 (file)
@@ -1540,7 +1540,8 @@ do {                                                \
 #define IS_MSVDX(dev) (IS_MRST(dev) || IS_MDFLD(dev))
 #define IS_TOPAZ(dev) ((IS_MRST(dev) && (((dev)->pci_device & 0xfffc) != PCI_ID_TOPAZ_DISABLED)) || IS_MDFLD(dev))
 
-#define IS_D0(dev) ((dev)->pdev->revision >= 0xc)
+#define IS_D0(dev) (((dev)->pdev->revision >= 0xc) || \
+               (((dev)->pci_device & 0xffff) == 0x08c7))
 
 extern int drm_psb_ospm;
 extern int drm_psb_cpurelax;
index e95460c..6397014 100644 (file)
@@ -93,6 +93,9 @@ PVRSRV_ERROR MSVDXPrePowerState(IMG_HANDLE hDevHandle,
                                PVRSRV_DEV_POWER_STATE  eNewPowerState,
                                PVRSRV_DEV_POWER_STATE  eCurrentPowerState)
 {
+       /* Workaround of mid_pmu error for CTP */
+       if (IS_CTP(gpDrmDevice))
+               return PVRSRV_OK;
 #if 1
        /* ask for a change not power on*/
        if ((eNewPowerState != eCurrentPowerState) &&
index fc09c92..eaed71f 100644 (file)
@@ -1139,6 +1139,9 @@ done:
                goto loop;
        }
 
+       if (IS_CTP(gpDrmDevice))
+               drm_msvdx_pmpolicy = PSB_PMPOLICY_NOPM;
+
        /* we get a frame/slice done, try to save some power*/
        if (IS_D0(dev)) {
                if (drm_msvdx_pmpolicy == PSB_PMPOLICY_POWERDOWN)