IMG_VIDEO_GET_HDMI_STATE,
IMG_VIDEO_SET_HDMI_STATE,
PNW_VIDEO_QUERY_ENTRY,
- IMG_DISPLAY_SET_WIDI_EXT_STATE
+ IMG_DISPLAY_SET_WIDI_EXT_STATE,
+ IMG_VIDEO_IED_STATE
} lnc_getparam_key_t;
struct drm_lnc_video_getparam_arg {
#define MRST_MSVDX_OFFSET 0x90000 /*MSVDX Base offset */
#define PSB_MSVDX_OFFSET 0x50000 /*MSVDX Base offset */
+
+#define PSB_IED_DRM_CNTL_STATUS 0x2208
+#define IED_DRM_VLD (1<<0)
+
/* MSVDX MMIO region is 0x50000 - 0x57fff ==> 32KB */
#define PSB_MSVDX_SIZE 0x10000
FW_VA_HW_PANIC_FIRST_MB_NUM);
last_mb = MEMIO_READ_FIELD(buf,
FW_VA_HW_PANIC_FAULT_MB_NUM);
- printk("jiangfei debug: fence in panic message is %d.\n", fence);
PSB_DEBUG_MSVDX("MSVDX_DEBUG: PANIC MESSAGE fence is %d.\n", MEMIO_READ_FIELD(buf, FW_VA_HW_PANIC_FENCE_VALUE));
PSB_DEBUG_MSVDX("MSVDX_DEBUG: PANIC MESSAGE first mb num is %d.\n", MEMIO_READ_FIELD(buf, FW_VA_HW_PANIC_FIRST_MB_NUM));
PSB_DEBUG_MSVDX("MSVDX_DEBUG: PANIC MESSAGE fault mb num is %d.\n", MEMIO_READ_FIELD(buf, FW_VA_HW_PANIC_FAULT_MB_NUM));
((unsigned long)arg->value),
&i, sizeof(i));
break;
+ case IMG_VIDEO_IED_STATE:
+ if (IS_MDFLD(dev)) {
+ int ied_enable;
+ /* VXD must be power on during query IED register */
+ if (!ospm_power_using_hw_begin(OSPM_VIDEO_DEC_ISLAND,
+ OSPM_UHB_FORCE_POWER_ON))
+ return -EBUSY;
+ /* wrong spec, IED should be located in pci device 2 */
+ if (REG_READ(PSB_IED_DRM_CNTL_STATUS) & IED_DRM_VLD)
+ ied_enable = 1;
+ else
+ ied_enable = 0;
+ PSB_DEBUG_GENERAL("ied_enable is %d.\n", ied_enable);
+ ospm_power_using_hw_end(OSPM_VIDEO_DEC_ISLAND);
+
+ ret = copy_to_user((void __user *)
+ ((unsigned long)arg->value),
+ &ied_enable, sizeof(ied_enable));
+ } else { /* Moorestown should not call it */
+ DRM_ERROR("IMG_VIDEO_IED_EANBLE error.\n");
+ return -EFAULT;
+ }
+ break;
default:
ret = -EFAULT;
return 0;
}
+