diff mbox

[hwc,v2,4/6] drm_hwcomposer: Add FENCE_OUT_PTR property to DrmCrtc

Message ID 20170927115841.29134-5-robert.foss@collabora.com (mailing list archive)
State New, archived
Headers show

Commit Message

Robert Foss Sept. 27, 2017, 11:58 a.m. UTC
Add support for handling the FENCE_OUT_PTR property to DrmCrtc

Signed-off-by: Robert Foss <robert.foss@collabora.com>
---
 drmcrtc.cpp | 10 ++++++++++
 drmcrtc.h   |  2 ++
 2 files changed, 12 insertions(+)

Comments

Sean Paul Sept. 27, 2017, 7:15 p.m. UTC | #1
On Wed, Sep 27, 2017 at 7:58 AM, Robert Foss <robert.foss@collabora.com> wrote:
> Add support for handling the FENCE_OUT_PTR property to DrmCrtc
>
> Signed-off-by: Robert Foss <robert.foss@collabora.com>

Reviewed-by: Sean Paul <seanpaul@chromium.org>

> ---
>  drmcrtc.cpp | 10 ++++++++++
>  drmcrtc.h   |  2 ++
>  2 files changed, 12 insertions(+)
>
> diff --git a/drmcrtc.cpp b/drmcrtc.cpp
> index 1fbdc12..c139869 100644
> --- a/drmcrtc.cpp
> +++ b/drmcrtc.cpp
> @@ -51,6 +51,12 @@ int DrmCrtc::Init() {
>      ALOGE("Failed to get MODE_ID property");
>      return ret;
>    }
> +
> +  ret = drm_->GetCrtcProperty(*this, "OUT_FENCE_PTR", &out_fence_ptr_property_);
> +  if (ret) {
> +    ALOGE("Failed to get OUT_FENCE_PTR property");
> +    return ret;
> +  }
>    return 0;
>  }
>
> @@ -81,4 +87,8 @@ const DrmProperty &DrmCrtc::active_property() const {
>  const DrmProperty &DrmCrtc::mode_property() const {
>    return mode_property_;
>  }
> +
> +const DrmProperty &DrmCrtc::out_fence_ptr_property() const {
> +  return out_fence_ptr_property_;
> +}
>  }
> diff --git a/drmcrtc.h b/drmcrtc.h
> index ad95352..2e8c811 100644
> --- a/drmcrtc.h
> +++ b/drmcrtc.h
> @@ -45,6 +45,7 @@ class DrmCrtc {
>
>    const DrmProperty &active_property() const;
>    const DrmProperty &mode_property() const;
> +  const DrmProperty &out_fence_ptr_property() const;
>
>   private:
>    DrmResources *drm_;
> @@ -63,6 +64,7 @@ class DrmCrtc {
>
>    DrmProperty active_property_;
>    DrmProperty mode_property_;
> +  DrmProperty out_fence_ptr_property_;
>  };
>  }
>
> --
> 2.11.0
>
diff mbox

Patch

diff --git a/drmcrtc.cpp b/drmcrtc.cpp
index 1fbdc12..c139869 100644
--- a/drmcrtc.cpp
+++ b/drmcrtc.cpp
@@ -51,6 +51,12 @@  int DrmCrtc::Init() {
     ALOGE("Failed to get MODE_ID property");
     return ret;
   }
+
+  ret = drm_->GetCrtcProperty(*this, "OUT_FENCE_PTR", &out_fence_ptr_property_);
+  if (ret) {
+    ALOGE("Failed to get OUT_FENCE_PTR property");
+    return ret;
+  }
   return 0;
 }
 
@@ -81,4 +87,8 @@  const DrmProperty &DrmCrtc::active_property() const {
 const DrmProperty &DrmCrtc::mode_property() const {
   return mode_property_;
 }
+
+const DrmProperty &DrmCrtc::out_fence_ptr_property() const {
+  return out_fence_ptr_property_;
+}
 }
diff --git a/drmcrtc.h b/drmcrtc.h
index ad95352..2e8c811 100644
--- a/drmcrtc.h
+++ b/drmcrtc.h
@@ -45,6 +45,7 @@  class DrmCrtc {
 
   const DrmProperty &active_property() const;
   const DrmProperty &mode_property() const;
+  const DrmProperty &out_fence_ptr_property() const;
 
  private:
   DrmResources *drm_;
@@ -63,6 +64,7 @@  class DrmCrtc {
 
   DrmProperty active_property_;
   DrmProperty mode_property_;
+  DrmProperty out_fence_ptr_property_;
 };
 }