summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2016-03-11 03:38:14 -0800
committerSteve Kondik <steve@cyngn.com>2016-03-11 03:38:14 -0800
commitdc7207b232031ccc8e9c5c4e7ff3689835fdab75 (patch)
treeaf164b5b6dfd239a1d99e39d92b712fda16e4e9a
parentf8bb82a7848a7a0844ed961eb314818a1afbc568 (diff)
parent3c2ba8a3abc4d074858649a663b441733933e771 (diff)
downloadandroid_hardware_intel_img_hwcomposer-dc7207b232031ccc8e9c5c4e7ff3689835fdab75.tar.gz
android_hardware_intel_img_hwcomposer-dc7207b232031ccc8e9c5c4e7ff3689835fdab75.tar.bz2
android_hardware_intel_img_hwcomposer-dc7207b232031ccc8e9c5c4e7ff3689835fdab75.zip
Merge tag 'android-6.0.1_r22' of https://android.googlesource.com/platform/hardware/intel/img/hwcomposer into cm-13.0staging/cm-13.0+r22
Android 6.0.1 release 22 Change-Id: I70129e3d6e384284617d8d45fcf783f350e0c54d
-rw-r--r--merrifield/common/devices/PhysicalDevice.cpp24
-rw-r--r--merrifield/common/utils/HwcTrace.h4
-rw-r--r--merrifield/ips/common/WsbmWrapper.c1
-rwxr-xr-xmerrifield/ips/tangier/TngDisplayContext.h8
-rw-r--r--merrifield/platforms/merrifield/Android.mk4
-rw-r--r--merrifield/platforms/merrifield/PlatfBufferManager.cpp11
-rw-r--r--merrifield/platforms/merrifield_plus/Android.mk4
-rwxr-xr-xmerrifield/platforms/merrifield_plus/PlatfBufferManager.cpp1
8 files changed, 35 insertions, 22 deletions
diff --git a/merrifield/common/devices/PhysicalDevice.cpp b/merrifield/common/devices/PhysicalDevice.cpp
index a7e52cd..601b63e 100644
--- a/merrifield/common/devices/PhysicalDevice.cpp
+++ b/merrifield/common/devices/PhysicalDevice.cpp
@@ -511,18 +511,20 @@ void PhysicalDevice::dump(Dump& d)
bool PhysicalDevice::setPowerMode(int mode)
{
- // TODO: set proper blanking modes for HWC 1.4 modes
- switch (mode) {
- case HWC_POWER_MODE_OFF:
- case HWC_POWER_MODE_DOZE:
- return blank(true);
- case HWC_POWER_MODE_NORMAL:
- case HWC_POWER_MODE_DOZE_SUSPEND:
- return blank(false);
- default:
- return false;
+ // TODO: set proper power modes for HWC 1.4
+ ATRACE("mode = %d", mode);
+
+ bool ret;
+ int arg = mode;
+
+ Drm *drm = Hwcomposer::getInstance().getDrm();
+ ret = drm->writeIoctl(DRM_PSB_PM_SET, &arg, sizeof(arg));
+ if (ret == false) {
+ ETRACE("psb power mode set fail");
+ return false;
}
- return false;
+
+ return true;
}
int PhysicalDevice::getActiveConfig()
diff --git a/merrifield/common/utils/HwcTrace.h b/merrifield/common/utils/HwcTrace.h
index 4cba819..2eb47a2 100644
--- a/merrifield/common/utils/HwcTrace.h
+++ b/merrifield/common/utils/HwcTrace.h
@@ -29,8 +29,8 @@ extern "C" {
#define VTRACE(fmt,...) ALOGV("%s: " fmt, __func__, ##__VA_ARGS__)
#define DTRACE(fmt,...) ALOGD("%s: " fmt, __func__, ##__VA_ARGS__)
#define ITRACE(fmt,...) ALOGI("%s: " fmt, __func__, ##__VA_ARGS__)
-#define WTRACE(fmt,...) ALOGW("%s: " fmt, __func__, ##__VA_ARGS__)
-#define ETRACE(fmt,...) ALOGE("%s: " fmt, __func__, ##__VA_ARGS__)
+#define WTRACE(fmt,...) ALOGW("%s: " fmt, __func__, ##__VA_ARGS__)
+#define ETRACE(fmt,...) ALOGE("%s: " fmt, __func__, ##__VA_ARGS__)
// Function call tracing
diff --git a/merrifield/ips/common/WsbmWrapper.c b/merrifield/ips/common/WsbmWrapper.c
index 81b1f2a..98d8557 100644
--- a/merrifield/ips/common/WsbmWrapper.c
+++ b/merrifield/ips/common/WsbmWrapper.c
@@ -14,6 +14,7 @@
// limitations under the License.
*/
+#include <string.h>
#include <wsbm_pool.h>
#include <wsbm_driver.h>
#include <wsbm_manager.h>
diff --git a/merrifield/ips/tangier/TngDisplayContext.h b/merrifield/ips/tangier/TngDisplayContext.h
index 00bef17..6a2b1cb 100755
--- a/merrifield/ips/tangier/TngDisplayContext.h
+++ b/merrifield/ips/tangier/TngDisplayContext.h
@@ -21,15 +21,15 @@
typedef struct
{
- hwc_layer_1_t *psLayer;
- uint32_t custom;
+ hwc_layer_1_t *psLayer;
+ uint32_t custom;
}
IMG_hwc_layer_t;
typedef struct IMG_display_device_public
{
- int (*post)(struct IMG_display_device_public *dev,
- IMG_hwc_layer_t *layers, int num_layers, int *releaseFenceFd);
+ int (*post)(struct IMG_display_device_public *dev,
+ IMG_hwc_layer_t *layers, int num_layers, int *releaseFenceFd);
}
IMG_display_device_public_t;
diff --git a/merrifield/platforms/merrifield/Android.mk b/merrifield/platforms/merrifield/Android.mk
index 1b737bb..f671d82 100644
--- a/merrifield/platforms/merrifield/Android.mk
+++ b/merrifield/platforms/merrifield/Android.mk
@@ -127,8 +127,8 @@ ifeq ($(TARGET_HAS_MULTIPLE_DISPLAY),true)
endif
LOCAL_COPY_HEADERS := \
- ../../include/pvr/hal/hal_public.h \
- ../../include/pvr/hal/img_gralloc_public.h
+ ../../include/pvr/hal/hal_public.h \
+ ../../include/pvr/hal/img_gralloc_public.h
LOCAL_COPY_HEADERS_TO := pvr/hal
ifneq ($(TARGET_BUILD_VARIANT),user)
diff --git a/merrifield/platforms/merrifield/PlatfBufferManager.cpp b/merrifield/platforms/merrifield/PlatfBufferManager.cpp
index eff917b..1c15cde 100644
--- a/merrifield/platforms/merrifield/PlatfBufferManager.cpp
+++ b/merrifield/platforms/merrifield/PlatfBufferManager.cpp
@@ -17,6 +17,7 @@
#include <PlatfBufferManager.h>
#include <tangier/TngGrallocBuffer.h>
#include <tangier/TngGrallocBufferMapper.h>
+#include <sync/sync.h>
namespace android {
namespace intel {
@@ -63,13 +64,21 @@ bool PlatfBufferManager::blit(buffer_handle_t srcHandle, buffer_handle_t destHan
{
IMG_gralloc_module_public_t *imgGrallocModule = (IMG_gralloc_module_public_t *) mGrallocModule;
+ int fenceFd;
+
if (imgGrallocModule->Blit(imgGrallocModule, srcHandle,
destHandle,
destRect.w, destRect.h, destRect.x,
- destRect.y, 0, async)) {
+ destRect.y, 0, -1, &fenceFd)) {
ETRACE("Blit failed");
return false;
}
+
+ if (!async) {
+ sync_wait(fenceFd, -1);
+ }
+ close(fenceFd);
+
return true;
}
diff --git a/merrifield/platforms/merrifield_plus/Android.mk b/merrifield/platforms/merrifield_plus/Android.mk
index 4b65e3f..3f8b886 100644
--- a/merrifield/platforms/merrifield_plus/Android.mk
+++ b/merrifield/platforms/merrifield_plus/Android.mk
@@ -130,8 +130,8 @@ ifeq ($(TARGET_HAS_MULTIPLE_DISPLAY),true)
endif
LOCAL_COPY_HEADERS := \
- ../../include/pvr/hal/hal_public.h \
- ../../include/pvr/hal/img_gralloc_public.h
+ ../../include/pvr/hal/hal_public.h \
+ ../../include/pvr/hal/img_gralloc_public.h
LOCAL_COPY_HEADERS_TO := pvr/hal
ifneq ($(TARGET_BUILD_VARIANT),user)
diff --git a/merrifield/platforms/merrifield_plus/PlatfBufferManager.cpp b/merrifield/platforms/merrifield_plus/PlatfBufferManager.cpp
index 714addf..67368ab 100755
--- a/merrifield/platforms/merrifield_plus/PlatfBufferManager.cpp
+++ b/merrifield/platforms/merrifield_plus/PlatfBufferManager.cpp
@@ -88,6 +88,7 @@ bool PlatfBufferManager::blit(buffer_handle_t srcHandle, buffer_handle_t destHan
}
close(fenceFd);
#endif
+
return true;
}