Only load i965 driver on the CHT platform

BZ: 161384

The hybrid driver loading is only needed on the BYT platform, which
has both VED and GEN hardware. On the CTH platform, there is only
GEN hardware. So for VP8 decoding, we need to use i965 driver
instead of psb driver

Change-Id: I6731c7bd7c190ee9bb373ff7be4719320e02dee7
Signed-off-by: wfeng6 <wei.feng@intel.com>
diff --git a/videodecoder/Android.mk b/videodecoder/Android.mk
index 32a1851..32abd4e 100644
--- a/videodecoder/Android.mk
+++ b/videodecoder/Android.mk
@@ -34,6 +34,12 @@
     LOCAL_CFLAGS += -DUSE_AVC_SHORT_FORMAT -DUSE_GEN_HW
 endif
 
+PLATFORM_USE_HYBRID_DRIVER := \
+    baytrail
+
+ifneq ($(filter $(TARGET_BOARD_PLATFORM),$(PLATFORM_USE_HYBRID_DRIVER)),)
+    LOCAL_CFLAGS += -DUSE_HYBRID_DRIVER
+endif
 
 #LOCAL_LDLIBS += -lpthread
 
diff --git a/videodecoder/VideoDecoderBase.cpp b/videodecoder/VideoDecoderBase.cpp
index cb6a663..5424784 100644
--- a/videodecoder/VideoDecoderBase.cpp
+++ b/videodecoder/VideoDecoderBase.cpp
@@ -763,7 +763,7 @@
     }
 
     // Display is defined as "unsigned int"
-#ifndef USE_GEN_HW
+#ifndef USE_HYBRID_DRIVER
     mDisplay = new Display;
     *mDisplay = ANDROID_DISPLAY_HANDLE;
 #else
@@ -995,7 +995,7 @@
     }
 
     if (mDisplay) {
-#ifndef USE_GEN_HW
+#ifndef USE_HYBRID_DRIVER
         delete mDisplay;
 #endif
         mDisplay = NULL;