summaryrefslogtreecommitdiffstats
path: root/gralloc_drm_priv.h
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2012-10-04 16:01:27 +0300
committerTapani Pälli <tapani.palli@intel.com>2012-10-18 10:52:38 +0300
commit2d2758bca0f962ef21673dbe29df4c042d7f3254 (patch)
treed17d46beb9ccac2406215922182cf8919eeaaac0 /gralloc_drm_priv.h
parentc878105aa842f6a7fbec5414d50cbf93892b3a1b (diff)
downloadexternal_drm_gralloc-2d2758bca0f962ef21673dbe29df4c042d7f3254.zip
external_drm_gralloc-2d2758bca0f962ef21673dbe29df4c042d7f3254.tar.gz
external_drm_gralloc-2d2758bca0f962ef21673dbe29df4c042d7f3254.tar.bz2
gralloc: hdmi cloned mode support
Patch implements simple support for cloned mode hdmi by introducing primary and hdmi outputs that are updated respectively. Current implementation is rather naive and assumes hdmi can drive same mode as the local lvds. Only cloned mode is supported but can be extended later to support extended mode when hwcomposer is available for controlling this behaviour. HDMI hotplug is implemented as a separate observer thread that listens to uevents and reads hdmi connection state from there, this requires switch support from the kernel hdmi driver. Change-Id: I1d5873214d672563789f4953a892de60539eca88 Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Signed-off-by: Matt Gumbel <matthew.k.gumbel@linux.intel.com>
Diffstat (limited to 'gralloc_drm_priv.h')
-rw-r--r--gralloc_drm_priv.h29
1 files changed, 24 insertions, 5 deletions
diff --git a/gralloc_drm_priv.h b/gralloc_drm_priv.h
index d22fea0..a6dad10 100644
--- a/gralloc_drm_priv.h
+++ b/gralloc_drm_priv.h
@@ -37,10 +37,26 @@ enum drm_swap_mode {
DRM_SWAP_SETCRTC,
};
+enum hdmi_output_mode {
+ HDMI_CLONED,
+ HDMI_EXTENDED,
+};
+
struct gralloc_drm_plane_t {
drmModePlane *drm_plane;
};
+struct gralloc_drm_output
+{
+ uint32_t crtc_id;
+ uint32_t connector_id;
+ drmModeModeInfo mode;
+ int xdpi, ydpi;
+ int fb_format;
+ int bpp;
+ uint32_t active;
+};
+
struct gralloc_drm_t {
/* initialized by gralloc_drm_create */
int fd;
@@ -48,16 +64,19 @@ struct gralloc_drm_t {
/* initialized by gralloc_drm_init_kms */
drmModeResPtr resources;
- uint32_t crtc_id;
- uint32_t connector_id;
- drmModeModeInfo mode;
- int xdpi, ydpi;
+ struct gralloc_drm_output primary;
+ struct gralloc_drm_output hdmi;
+ enum hdmi_output_mode hdmi_mode;
+
+ /* hdmi hotplug */
+ pthread_mutex_t hdmi_mutex;
+ pthread_t hdmi_hotplug_thread;
+
#ifdef DRM_MODE_FEATURE_DIRTYFB
drmModeClip clip;
#endif
/* initialized by drv->init_kms_features */
- int fb_format;
enum drm_swap_mode swap_mode;
int swap_interval;
int mode_quirk_vmwgfx;