diff options
author | WuZhen <wuzhen@jidemail.com> | 2016-06-02 22:56:55 +0800 |
---|---|---|
committer | Chih-Wei Huang <cwhuang@linux.org.tw> | 2016-06-27 20:01:00 +0800 |
commit | c597559db6fa98c6b590dc00dc08c0a148c33219 (patch) | |
tree | 220f25167429eaaabb037ac47c045fb71accc996 | |
parent | 7c9a5244690da7f5ab282475a31c0dfb17aa9880 (diff) | |
download | external_drm_gralloc-c597559db6fa98c6b590dc00dc08c0a148c33219.zip external_drm_gralloc-c597559db6fa98c6b590dc00dc08c0a148c33219.tar.gz external_drm_gralloc-c597559db6fa98c6b590dc00dc08c0a148c33219.tar.bz2 |
Rename hdmi_output_mode
Rename it to drm_output_mode and move it into gralloc_drm_output
in preparation for folowing changes.
Change-Id: I488f395feede9c9a20eadb9145ebf46295ba4a71
-rw-r--r-- | gralloc_drm_kms.c | 8 | ||||
-rw-r--r-- | gralloc_drm_priv.h | 10 |
2 files changed, 10 insertions, 8 deletions
diff --git a/gralloc_drm_kms.c b/gralloc_drm_kms.c index 6cefd6f..a9095f2 100644 --- a/gralloc_drm_kms.c +++ b/gralloc_drm_kms.c @@ -439,7 +439,7 @@ int gralloc_drm_set_plane_handle(struct gralloc_drm_t *drm, static int drm_kms_blit_to_hdmi(struct gralloc_drm_t *drm, struct gralloc_drm_bo_t *bo) { int ret = 0; - if (drm->hdmi.active && drm->hdmi_mode == HDMI_CLONED && drm->hdmi.bo) { + if (drm->hdmi.active && drm->hdmi.output_mode == DRM_OUTPUT_CLONED && drm->hdmi.bo) { int dst_x1 = 0, dst_y1 = 0; @@ -606,7 +606,7 @@ int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo) } pthread_mutex_lock(&drm->hdmi_mutex); - if (drm->hdmi.active && drm->hdmi_mode == HDMI_CLONED && drm->hdmi.bo) + if (drm->hdmi.active && drm->hdmi.output_mode == DRM_OUTPUT_CLONED && drm->hdmi.bo) drm_kms_set_crtc(drm, &drm->hdmi, drm->hdmi.bo->fb_id); pthread_mutex_unlock(&drm->hdmi_mutex); @@ -647,7 +647,7 @@ int gralloc_drm_bo_post(struct gralloc_drm_bo_t *bo) ret = drm_kms_set_crtc(drm, &drm->primary, bo->fb_id); pthread_mutex_lock(&drm->hdmi_mutex); - if (drm->hdmi.active && drm->hdmi_mode == HDMI_CLONED && drm->hdmi.bo) + if (drm->hdmi.active && drm->hdmi.output_mode == DRM_OUTPUT_CLONED && drm->hdmi.bo) drm_kms_set_crtc(drm, &drm->hdmi, drm->hdmi.bo->fb_id); pthread_mutex_unlock(&drm->hdmi_mutex); @@ -1105,7 +1105,7 @@ static int init_hdmi_output(struct gralloc_drm_t *drm, return err; } - drm->hdmi_mode = HDMI_CLONED; + drm->hdmi.output_mode = DRM_OUTPUT_CLONED; drm->hdmi.active = 1; return 0; diff --git a/gralloc_drm_priv.h b/gralloc_drm_priv.h index fd3b72e..9203fba 100644 --- a/gralloc_drm_priv.h +++ b/gralloc_drm_priv.h @@ -42,9 +42,10 @@ enum drm_swap_mode { DRM_SWAP_SETCRTC, }; -enum hdmi_output_mode { - HDMI_CLONED, - HDMI_EXTENDED, +enum drm_output_mode { + DRM_OUTPUT_PRIMARY, + DRM_OUTPUT_CLONED, + DRM_OUTPUT_EXTENDED, }; struct gralloc_drm_plane_t { @@ -84,6 +85,8 @@ struct gralloc_drm_output int bpp; uint32_t active; + enum drm_output_mode output_mode; + /* 'private fb' for this output */ struct gralloc_drm_bo_t *bo; }; @@ -97,7 +100,6 @@ struct gralloc_drm_t { drmModeResPtr resources; struct gralloc_drm_output primary; struct gralloc_drm_output hdmi; - enum hdmi_output_mode hdmi_mode; /* hdmi hotplug */ pthread_mutex_t hdmi_mutex; |