summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTapani Pälli <tapani.palli@intel.com>2013-05-21 07:50:18 +0300
committerTapani Pälli <tapani.palli@intel.com>2013-05-21 09:45:46 +0300
commit04978c8f3086255bc0b83c407a1d605c19527253 (patch)
tree8c8f220f53a882267fd9fa6cc084e316ddf88f3c
parenta872ecf380bfb33a1e17878d7d7ac16d1730dc09 (diff)
downloadexternal_drm_gralloc-04978c8f3086255bc0b83c407a1d605c19527253.zip
external_drm_gralloc-04978c8f3086255bc0b83c407a1d605c19527253.tar.gz
external_drm_gralloc-04978c8f3086255bc0b83c407a1d605c19527253.tar.bz2
gralloc: map HAL format RGBX_8888 to drm format XBGR8888
currently we end up creating framebuffers with wrong format for RGBX users and set_plane with these would show wrong colors, one example is the menu screen of the glb27 application. Change-Id: Ifa051a4c5e9f39a6427ae2864ac06955cb48ad2b Signed-off-by: Tapani Pälli <tapani.palli@intel.com> Reviewed-by: Topi Pohjolainen <topi.pohjolainen@intel.com>
-rw-r--r--gralloc_drm_kms.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/gralloc_drm_kms.c b/gralloc_drm_kms.c
index 952998a..907f8e5 100644
--- a/gralloc_drm_kms.c
+++ b/gralloc_drm_kms.c
@@ -50,9 +50,10 @@ static unsigned int drm_format_from_hal(int hal_format)
{
switch(hal_format) {
case HAL_PIXEL_FORMAT_RGB_888:
- case HAL_PIXEL_FORMAT_RGBX_8888:
case HAL_PIXEL_FORMAT_BGRA_8888:
return DRM_FORMAT_XRGB8888;
+ case HAL_PIXEL_FORMAT_RGBX_8888:
+ return DRM_FORMAT_XBGR8888;
case HAL_PIXEL_FORMAT_RGBA_8888:
return DRM_FORMAT_RGBA8888;
case HAL_PIXEL_FORMAT_RGB_565: