worker.cpp
LOCAL_MODULE := libdrmhwc_utils
+LOCAL_VENDOR_MODULE := true
include $(BUILD_STATIC_LIBRARY)
LOCAL_STATIC_LIBRARIES := libdrmhwc_utils
LOCAL_C_INCLUDES := \
- external/gbm_gralloc \
system/core/libsync
LOCAL_SRC_FILES := \
LOCAL_SRC_FILES += hwcomposer.cpp
endif
+
+ifeq ($(TARGET_PRODUCT),hikey960)
+LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER
+LOCAL_SRC_FILES += platformhisi.cpp
+LOCAL_C_INCLUDES += device/linaro/hikey/gralloc960/
+else ifeq ($(TARGET_PRODUCT),hikey)
+LOCAL_CPPFLAGS += -DUSE_HISI_IMPORTER
+LOCAL_SRC_FILES += platformhisi.cpp
+LOCAL_C_INCLUDES += device/linaro/hikey/gralloc/
+else ifeq ($(strip $(BOARD_DRM_HWCOMPOSER_BUFFER_IMPORTER)),minigbm)
+LOCAL_SRC_FILES += platformminigbm.cpp
+LOCAL_C_INCLUDES += external/minigbm/cros_gralloc/
+else
LOCAL_CPPFLAGS += -DUSE_DRM_GENERIC_IMPORTER
+endif
LOCAL_MODULE := hwcomposer.drm
LOCAL_MODULE_TAGS := optional
+++ /dev/null
-Patches to drm_hwcomposer are very much welcome, we really want this to be the
-universal HW composer implementation for Android and similar platforms
-So please bring on porting patches, bugfixes, improvements for documentation
-and new features.
-
-A short list of contribution guidelines:
-
-- Please submit patches formatted with git send-email/git format-patch or
- equivalent to
-
- dri-devel <dri-devel@lists.freedesktop.org>
-
- Please use --subject-prefix="PATCH hwc" so that drm_hwcomposer patches are easily
- identified in the massive amount mails on dri-devel. To ensure this is always
- done, run:
-
- git config format.subjectprefix "PATCH hwc"
-
-- drm_hwcomposer is Apache 2.0 Licensed and we require contributions to follow the
- developer's certificate of origin: http://developercertificate.org/
-
-- When submitting new code please follow the naming conventions documented
- in the generated documentation. Also please make full use of all the helpers and
- convenience macros provided by drm_hwcomposer. The below command can help you
- with formatting of your patches:
- git diff | clang-format-diff-3.5 -p 1 -style=file
-
-- Hardware specific changes should get tested on relevant platforms
- before committing.
-
-Happy hacking!
#include <errno.h>
#include <pthread.h>
-#include <cutils/log.h>
+#include <log/log.h>
namespace android {
#include <stdlib.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <hardware/hardware.h>
namespace android {
#include <errno.h>
#include <stdint.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <cutils/properties.h>
#include <xf86drmMode.h>
#include <stdint.h>
#include <xf86drmMode.h>
-#include <cutils/log.h>
+#include <log/log.h>
namespace android {
#include <algorithm>
#include <unordered_set>
-#include <cutils/log.h>
+#include <log/log.h>
#include <sw_sync.h>
#include <sync/sync.h>
#include <xf86drmMode.h>
#include <sstream>
#include <vector>
-#include <cutils/log.h>
+#include <log/log.h>
#include <drm/drm_mode.h>
#include <sync/sync.h>
#include <utils/Trace.h>
return ret;
}
+ pre_compositor_.reset(new GLWorkerCompositor());
+ ret = pre_compositor_->Init();
+ if (ret) {
+ ALOGE("Failed to initialize OpenGL compositor %d", ret);
+ pre_compositor_.reset();
+ }
+
initialized_ = true;
return 0;
}
}
std::vector<DrmCompositionRegion> ®ions = display_comp->squash_regions();
- ret = pre_compositor_->Composite(display_comp->layers().data(),
+ if (pre_compositor_) {
+ ret = pre_compositor_->Composite(display_comp->layers().data(),
regions.data(), regions.size(), fb.buffer(),
display_comp->importer());
- pre_compositor_->Finish();
+ pre_compositor_->Finish();
- if (ret) {
- ALOGE("Failed to squash layers");
- return ret;
+ if (ret) {
+ ALOGE("Failed to squash layers");
+ return ret;
+ }
}
ret = display_comp->CreateNextTimelineFence();
}
std::vector<DrmCompositionRegion> ®ions = display_comp->pre_comp_regions();
- ret = pre_compositor_->Composite(display_comp->layers().data(),
+ if (pre_compositor_) {
+ ret = pre_compositor_->Composite(display_comp->layers().data(),
regions.data(), regions.size(), fb.buffer(),
display_comp->importer());
- pre_compositor_->Finish();
+ pre_compositor_->Finish();
- if (ret) {
- ALOGE("Failed to pre-composite layers");
- return ret;
+ if (ret) {
+ ALOGE("Failed to pre-composite layers");
+ return ret;
+ }
}
ret = display_comp->CreateNextTimelineFence();
return &squash_state_;
}
+ bool uses_GL() {
+ return !!pre_compositor_;
+ }
private:
struct FrameState {
std::unique_ptr<DrmDisplayComposition> composition;
#include <linux/netlink.h>
#include <sys/socket.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <xf86drm.h>
#include <assert.h>
struct sockaddr_nl addr;
memset(&addr, 0, sizeof(addr));
addr.nl_family = AF_NETLINK;
- addr.nl_pid = getpid();
+ addr.nl_pid = 0;
addr.nl_groups = 0xFFFFFFFF;
int ret = bind(uevent_fd_.get(), (struct sockaddr *)&addr, sizeof(addr));
#include <inttypes.h>
#include <string>
-#include <cutils/log.h>
+#include <log/log.h>
#include <cutils/properties.h>
#include <hardware/hardware.h>
#include <hardware/hwcomposer2.h>
layer.set_validated_type(HWC2::Composition::Client);
++*num_types;
break;
+ case HWC2::Composition::Device:
+ if (!compositor_.uses_GL()) {
+ layer.set_validated_type(HWC2::Composition::Client);
+ ++*num_types;
+ break;
+ }
+ /* fall through */
default:
layer.set_validated_type(layer.sf_type());
break;
#include <errno.h>
#include <stdint.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <xf86drmMode.h>
namespace android {
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <cutils/properties.h>
namespace android {
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <cutils/properties.h>
#include <hardware/hardware.h>
#include <hardware/hwcomposer.h>
#include "drmhwcomposer.h"
#include "platform.h"
-#include <cutils/log.h>
+#include <log/log.h>
namespace android {
#include "drmresources.h"
#include "platform.h"
-#include <cutils/log.h>
+#include <log/log.h>
namespace android {
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <cutils/log.h>
-#include <gralloc_drm_handle.h>
+#include <log/log.h>
+#include <gralloc_handle.h>
#include <hardware/gralloc.h>
#include <EGL/eglext.h>
}
EGLImageKHR DrmGenericImporter::ImportImage(EGLDisplay egl_display, buffer_handle_t handle) {
- gralloc_drm_handle_t *gr_handle = gralloc_drm_handle(handle);
+ gralloc_handle_t *gr_handle = gralloc_handle(handle);
if (!gr_handle)
return NULL;
EGLint attr[] = {
- EGL_WIDTH, gr_handle->width,
- EGL_HEIGHT, gr_handle->height,
+ EGL_WIDTH, (EGLint)gr_handle->width,
+ EGL_HEIGHT, (EGLint)gr_handle->height,
EGL_LINUX_DRM_FOURCC_EXT, (EGLint)ConvertHalFormatToDrm(gr_handle->format),
EGL_DMA_BUF_PLANE0_FD_EXT, gr_handle->prime_fd,
EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,
- EGL_DMA_BUF_PLANE0_PITCH_EXT, gr_handle->stride,
+ EGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)gr_handle->stride,
EGL_NONE,
};
return eglCreateImageKHR(egl_display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attr);
}
int DrmGenericImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) {
- gralloc_drm_handle_t *gr_handle = gralloc_drm_handle(handle);
+ gralloc_handle_t *gr_handle = gralloc_handle(handle);
if (!gr_handle)
return -EINVAL;
int ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
int ReleaseBuffer(hwc_drm_bo_t *bo) override;
- private:
uint32_t ConvertHalFormatToDrm(uint32_t hal_format);
+ private:
DrmResources *drm_;
--- /dev/null
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "hwc-platform-hisi"
+
+#include "drmresources.h"
+#include "platform.h"
+#include "platformhisi.h"
+
+
+#include <drm/drm_fourcc.h>
+#include <cinttypes>
+#include <stdatomic.h>
+#include <xf86drm.h>
+#include <xf86drmMode.h>
+
+#include <log/log.h>
+#include <hardware/gralloc.h>
+#include "gralloc_priv.h"
+
+
+namespace android {
+
+Importer *Importer::CreateInstance(DrmResources *drm) {
+ HisiImporter *importer = new HisiImporter(drm);
+ if (!importer)
+ return NULL;
+
+ int ret = importer->Init();
+ if (ret) {
+ ALOGE("Failed to initialize the hisi importer %d", ret);
+ delete importer;
+ return NULL;
+ }
+ return importer;
+}
+
+HisiImporter::HisiImporter(DrmResources *drm) : DrmGenericImporter(drm), drm_(drm) {
+}
+
+HisiImporter::~HisiImporter() {
+}
+
+int HisiImporter::Init() {
+ int ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID,
+ (const hw_module_t **)&gralloc_);
+ if (ret) {
+ ALOGE("Failed to open gralloc module %d", ret);
+ return ret;
+ }
+
+ if (strcasecmp(gralloc_->common.author, "ARM Ltd."))
+ ALOGW("Using non-ARM gralloc module: %s/%s\n", gralloc_->common.name,
+ gralloc_->common.author);
+
+ return 0;
+}
+
+EGLImageKHR HisiImporter::ImportImage(EGLDisplay egl_display, buffer_handle_t handle) {
+ private_handle_t const *hnd = reinterpret_cast < private_handle_t const *>(handle);
+ if (!hnd)
+ return NULL;
+
+ EGLint fmt = ConvertHalFormatToDrm(hnd->req_format);
+ if (fmt < 0)
+ return NULL;
+
+ EGLint attr[] = {
+ EGL_WIDTH, hnd->width,
+ EGL_HEIGHT, hnd->height,
+ EGL_LINUX_DRM_FOURCC_EXT, fmt,
+ EGL_DMA_BUF_PLANE0_FD_EXT, hnd->share_fd,
+ EGL_DMA_BUF_PLANE0_OFFSET_EXT, 0,
+ EGL_DMA_BUF_PLANE0_PITCH_EXT, hnd->byte_stride,
+ EGL_NONE,
+ };
+ return eglCreateImageKHR(egl_display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attr);
+}
+
+int HisiImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) {
+ private_handle_t const *hnd = reinterpret_cast < private_handle_t const *>(handle);
+ if (!hnd)
+ return -EINVAL;
+
+ uint32_t gem_handle;
+ int ret = drmPrimeFDToHandle(drm_->fd(), hnd->share_fd, &gem_handle);
+ if (ret) {
+ ALOGE("failed to import prime fd %d ret=%d", hnd->share_fd, ret);
+ return ret;
+ }
+
+ EGLint fmt = ConvertHalFormatToDrm(hnd->req_format);
+ if (fmt < 0)
+ return fmt;
+
+ memset(bo, 0, sizeof(hwc_drm_bo_t));
+ bo->width = hnd->width;
+ bo->height = hnd->height;
+ bo->format = fmt;
+ bo->usage = hnd->usage;
+ bo->pitches[0] = hnd->byte_stride;
+ bo->gem_handles[0] = gem_handle;
+ bo->offsets[0] = 0;
+
+ ret = drmModeAddFB2(drm_->fd(), bo->width, bo->height, bo->format,
+ bo->gem_handles, bo->pitches, bo->offsets, &bo->fb_id, 0);
+ if (ret) {
+ ALOGE("could not create drm fb %d", ret);
+ return ret;
+ }
+
+ return ret;
+}
+
+std::unique_ptr<Planner> Planner::CreateInstance(DrmResources *) {
+ std::unique_ptr<Planner> planner(new Planner);
+ planner->AddStage<PlanStageGreedy>();
+ return planner;
+}
+}
+
+
--- /dev/null
+/*
+ * Copyright (C) 2015 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_PLATFORM_HISI_H_
+#define ANDROID_PLATFORM_HISI_H_
+
+#include "drmresources.h"
+#include "platform.h"
+#include "platformdrmgeneric.h"
+
+#include <stdatomic.h>
+
+#include <hardware/gralloc.h>
+
+namespace android {
+
+class HisiImporter : public DrmGenericImporter {
+ public:
+ HisiImporter(DrmResources *drm);
+ ~HisiImporter() override;
+
+ int Init();
+
+ EGLImageKHR ImportImage(EGLDisplay egl_display, buffer_handle_t handle) override;
+ int ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
+
+ private:
+
+ DrmResources *drm_;
+
+ const gralloc_module_t *gralloc_;
+};
+}
+
+#endif
--- /dev/null
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#define LOG_TAG "hwc-platform-drm-minigbm"
+
+#include "drmresources.h"
+#include "platform.h"
+#include "platformminigbm.h"
+
+#include <drm/drm_fourcc.h>
+#include <xf86drm.h>
+#include <xf86drmMode.h>
+
+#include <log/log.h>
+#include <hardware/gralloc.h>
+
+#include "cros_gralloc_handle.h"
+
+namespace android {
+
+Importer *Importer::CreateInstance(DrmResources *drm) {
+ DrmMinigbmImporter *importer = new DrmMinigbmImporter(drm);
+ if (!importer)
+ return NULL;
+
+ int ret = importer->Init();
+ if (ret) {
+ ALOGE("Failed to initialize the minigbm importer %d", ret);
+ delete importer;
+ return NULL;
+ }
+ return importer;
+}
+
+DrmMinigbmImporter::DrmMinigbmImporter(DrmResources *drm) : DrmGenericImporter(drm), drm_(drm) {
+}
+
+DrmMinigbmImporter::~DrmMinigbmImporter() {
+}
+
+int DrmMinigbmImporter::Init() {
+ int ret = hw_get_module(GRALLOC_HARDWARE_MODULE_ID,
+ (const hw_module_t **)&gralloc_);
+ if (ret) {
+ ALOGE("Failed to open gralloc module %d", ret);
+ return ret;
+ }
+
+ if (strcasecmp(gralloc_->common.author, "Chrome OS"))
+ ALOGW("Using non-minigbm gralloc module: %s/%s\n", gralloc_->common.name,
+ gralloc_->common.author);
+
+ return 0;
+}
+
+EGLImageKHR DrmMinigbmImporter::ImportImage(EGLDisplay egl_display, buffer_handle_t handle) {
+ cros_gralloc_handle *gr_handle = (cros_gralloc_handle *)handle;
+ if (!gr_handle)
+ return NULL;
+ EGLint attr[] = {
+ EGL_WIDTH, (EGLint)gr_handle->width,
+ EGL_HEIGHT, (EGLint)gr_handle->height,
+ EGL_LINUX_DRM_FOURCC_EXT, (EGLint)gr_handle->format,
+ EGL_DMA_BUF_PLANE0_FD_EXT, gr_handle->fds[0],
+ EGL_DMA_BUF_PLANE0_PITCH_EXT, (EGLint)gr_handle->strides[0],
+ EGL_DMA_BUF_PLANE0_OFFSET_EXT, (EGLint)gr_handle->offsets[0],
+ EGL_NONE,
+ };
+ return eglCreateImageKHR(egl_display, EGL_NO_CONTEXT, EGL_LINUX_DMA_BUF_EXT, NULL, attr);
+}
+
+int DrmMinigbmImporter::ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) {
+ cros_gralloc_handle *gr_handle = (cros_gralloc_handle *)handle;
+ if (!gr_handle)
+ return -EINVAL;
+
+ uint32_t gem_handle;
+ int ret = drmPrimeFDToHandle(drm_->fd(), gr_handle->fds[0], &gem_handle);
+ if (ret) {
+ ALOGE("failed to import prime fd %d ret=%d", gr_handle->fds[0], ret);
+ return ret;
+ }
+
+ memset(bo, 0, sizeof(hwc_drm_bo_t));
+ bo->width = gr_handle->width;
+ bo->height = gr_handle->height;
+ bo->format = gr_handle->format;
+ bo->usage = gr_handle->usage;
+ bo->pitches[0] = gr_handle->strides[0];
+ bo->offsets[0] = gr_handle->offsets[0];
+ bo->gem_handles[0] = gem_handle;
+
+ ret = drmModeAddFB2(drm_->fd(), bo->width, bo->height, bo->format,
+ bo->gem_handles, bo->pitches, bo->offsets, &bo->fb_id, 0);
+ if (ret) {
+ ALOGE("could not create drm fb %d", ret);
+ return ret;
+ }
+
+ return ret;
+}
+
+std::unique_ptr<Planner> Planner::CreateInstance(DrmResources *) {
+ std::unique_ptr<Planner> planner(new Planner);
+ planner->AddStage<PlanStageGreedy>();
+ return planner;
+}
+
+}
--- /dev/null
+/*
+ * Copyright (C) 2018 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#ifndef ANDROID_PLATFORM_DRM_MINIGBM_H_
+#define ANDROID_PLATFORM_DRM_MINIGBM_H_
+
+#include "drmresources.h"
+#include "platform.h"
+#include "platformdrmgeneric.h"
+
+#include <hardware/gralloc.h>
+
+namespace android {
+
+class DrmMinigbmImporter : public DrmGenericImporter {
+ public:
+ DrmMinigbmImporter(DrmResources *drm);
+ ~DrmMinigbmImporter() override;
+
+ int Init();
+
+ EGLImageKHR ImportImage(EGLDisplay egl_display, buffer_handle_t handle) override;
+ int ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
+
+ private:
+ DrmResources *drm_;
+
+ const gralloc_module_t *gralloc_;
+};
+
+}
+
+#endif
+++ /dev/null
-/*
- * Copyright (C) 2015 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#ifndef ANDROID_PLATFORM_NV_H_
-#define ANDROID_PLATFORM_NV_H_
-
-#include "drmresources.h"
-#include "platform.h"
-#include "platformdrmgeneric.h"
-
-#include <stdatomic.h>
-
-#include <hardware/gralloc.h>
-
-namespace android {
-
-class NvImporter : public Importer {
- public:
- NvImporter(DrmResources *drm);
- ~NvImporter() override;
-
- int Init();
-
- EGLImageKHR ImportImage(EGLDisplay egl_display, buffer_handle_t handle) override;
- int ImportBuffer(buffer_handle_t handle, hwc_drm_bo_t *bo) override;
- int ReleaseBuffer(hwc_drm_bo_t *bo) override;
-
- private:
- typedef struct NvBuffer {
- NvImporter *importer;
- hwc_drm_bo_t bo;
- atomic_int ref;
- } NvBuffer_t;
-
- static void NvGrallocRelease(void *nv_buffer);
- void ReleaseBufferImpl(hwc_drm_bo_t *bo);
-
- NvBuffer_t *GrallocGetNvBuffer(buffer_handle_t handle);
- int GrallocSetNvBuffer(buffer_handle_t handle, NvBuffer_t *buf);
-
- DrmResources *drm_;
-
- const gralloc_module_t *gralloc_;
-};
-
-// This stage looks for any layers that contain transformed protected content
-// and puts it in the primary plane since Tegra doesn't support planar rotation
-// on the overlay planes.
-//
-// There are two caveats to this approach: 1- Protected content isn't
-// necessarily planar, but it's usually a safe bet, and 2- This doesn't catch
-// non-protected planar content. If we wanted to fix this, we'd need to import
-// the buffer in this stage and peek at it's format. The overhead of doing this
-// doesn't seem worth it since we'll end up displaying the right thing in both
-// cases anyways.
-class PlanStageProtectedRotated : public Planner::PlanStage {
- public:
- int ProvisionPlanes(std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
- std::vector<DrmPlane *> *planes);
-};
-
-// This stage looks for layers that would not be supported by Tegra driver due
-// to limitations such as downscaling. If the layer is unprotected it will be
-// punted for precomp to handle, other wise if protected it will be dropped as
-// it cannot be supported by any means.
-class PlanStageNvLimits : public Planner::PlanStage {
- public:
- int ProvisionPlanes(std::vector<DrmCompositionPlane> *composition,
- std::map<size_t, DrmHwcLayer *> &layers, DrmCrtc *crtc,
- std::vector<DrmPlane *> *planes);
- protected:
- bool CheckLayer(size_t zorder, DrmHwcLayer *layer);
-};
-}
-
-#endif
worker_test.cpp
LOCAL_MODULE := hwc-drm-tests
+LOCAL_VENDOR_MODULE := true
+LOCAL_HEADER_LIBRARIES := libhardware_headers
LOCAL_STATIC_LIBRARIES := libdrmhwc_utils
LOCAL_SHARED_LIBRARIES := hwcomposer.drm
LOCAL_C_INCLUDES := external/drm_hwcomposer
#include <errno.h>
#include <stdlib.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <hardware/hardware.h>
#include <hardware/hwcomposer.h>
#include <sched.h>
#include <xf86drm.h>
#include <xf86drmMode.h>
-#include <cutils/log.h>
+#include <log/log.h>
#include <hardware/hardware.h>
namespace android {
: Worker("vsync", HAL_PRIORITY_URGENT_DISPLAY),
drm_(NULL),
display_(-1),
+ enabled_(false),
last_timestamp_(-1) {
}