diff options
author | Sean Paul <seanpaul@chromium.org> | 2015-06-03 14:08:27 -0400 |
---|---|---|
committer | Sean Paul <seanpaul@chromium.org> | 2015-06-15 16:30:48 -0400 |
commit | 877be974a2d4fc518700be8ffe803a50cb716ead (patch) | |
tree | fd3bb735012580ddaf2edf31ffd31b1083bb6117 /drmcrtc.h | |
parent | 1f4ff5aec7bec305558228adb65ba56bd0b9f366 (diff) |
drm_hwcomposer: Use atomic modeset to set crtc timing
Use the new drm blob ioctl and atomic modeset properties to
do atomic modesetting, as opposed to the old setCrtc call.
This allows us to set timing as soon as the system layer requests
a new active config, as opposed to delaying it until we have
an fb. Aside from reducing complexity, this should help with
event control requests as we'll be able to service them with
hw vblanks instead of synthesized sleeps.
Change-Id: I9c80d44f52f52881a3a25b2ae518973d468bc110
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Diffstat (limited to 'drmcrtc.h')
-rw-r--r-- | drmcrtc.h | 20 |
1 files changed, 14 insertions, 6 deletions
@@ -18,37 +18,42 @@ #define ANDROID_DRM_CRTC_H_ #include "drmmode.h" +#include "drmproperty.h" #include <stdint.h> #include <xf86drmMode.h> namespace android { +class DrmResources; + class DrmCrtc { public: - DrmCrtc(drmModeCrtcPtr c, unsigned pipe); + DrmCrtc(DrmResources *drm, drmModeCrtcPtr c, unsigned pipe); ~DrmCrtc(); + int Init(); + uint32_t id() const; unsigned pipe() const; - bool requires_modeset() const; - void set_requires_modeset(bool requires_modeset); - int display() const; void set_display(int display); bool can_bind(int display) const; + const DrmProperty &active_property() const; + const DrmProperty &mode_property() const; + private: DrmCrtc(const DrmCrtc &); + DrmResources *drm_; + uint32_t id_; unsigned pipe_; int display_; - bool requires_modeset_; - uint32_t x_; uint32_t y_; uint32_t width_; @@ -56,6 +61,9 @@ class DrmCrtc { DrmMode mode_; bool mode_valid_; + + DrmProperty active_property_; + DrmProperty mode_property_; }; } |