From 2d2758bca0f962ef21673dbe29df4c042d7f3254 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tapani=20P=C3=A4lli?= Date: Thu, 4 Oct 2012 16:01:27 +0300 Subject: gralloc: hdmi cloned mode support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Matt Gumbel --- gralloc_drm_intel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'gralloc_drm_intel.c') diff --git a/gralloc_drm_intel.c b/gralloc_drm_intel.c index 519827f..6a0d7e0 100644 --- a/gralloc_drm_intel.c +++ b/gralloc_drm_intel.c @@ -497,12 +497,12 @@ static void intel_init_kms_features(struct gralloc_drm_drv_t *drv, struct drm_i915_getparam gp; int pageflipping, id; - switch (drm->fb_format) { + switch (drm->primary.fb_format) { case HAL_PIXEL_FORMAT_BGRA_8888: case HAL_PIXEL_FORMAT_RGB_565: break; default: - drm->fb_format = HAL_PIXEL_FORMAT_BGRA_8888; + drm->primary.fb_format = HAL_PIXEL_FORMAT_BGRA_8888; break; } @@ -545,7 +545,7 @@ static void intel_init_kms_features(struct gralloc_drm_drv_t *drv, int pipe; pipe = drm_intel_get_pipe_from_crtc_id(info->bufmgr, - drm->crtc_id); + drm->primary.crtc_id); drm->swap_interval = (pipe >= 0) ? 1 : 0; drm->vblank_secondary = (pipe > 0); } -- cgit v1.1