exynos5: libhwc: support the directFB for RGB565.
authorSanghee Kim <haya93@samsung.com>
Sat, 15 Sep 2012 06:58:28 +0000 (23:58 -0700)
committerThe Android Automerger <android-build@android.com>
Fri, 21 Sep 2012 01:01:42 +0000 (18:01 -0700)
Gaia display controller supports RGB order each window.
Even if differet order of several formats are mixed,
can control RGB order each window.

Change-Id: Id4117d56f548af40579580632e83c140257d2d5d
Signed-off-by: Sanghee Kim <haya93@samsung.com>
include/s3c-fb.h
libhwc/hwc.cpp

index b1b57b576c5769ea8e6cfbc84453e1d5ff26927c..1f8901a6996426addc1e8ccda741c660427ab739 100644 (file)
@@ -48,7 +48,8 @@ enum s3c_fb_pixel_format {
 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
  S3C_FB_PIXEL_FORMAT_RGBX_8888 = 1,
  S3C_FB_PIXEL_FORMAT_RGBA_5551 = 2,
- S3C_FB_PIXEL_FORMAT_MAX = 3,
+ S3C_FB_PIXEL_FORMAT_RGB_565 = 3,
+ S3C_FB_PIXEL_FORMAT_MAX = 4,
 };
 /* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
 enum s3c_fb_blending {
index 6c080c1c81f9427d6e99288051ef92cd6a715954..5bf1c06e89fefbe72d709d724873b3d78dfc622e 100644 (file)
@@ -223,7 +223,8 @@ static enum s3c_fb_pixel_format exynos5_format_to_s3c_format(int format)
         return S3C_FB_PIXEL_FORMAT_RGBX_8888;
     case HAL_PIXEL_FORMAT_RGBA_5551:
         return S3C_FB_PIXEL_FORMAT_RGBA_5551;
-
+    case HAL_PIXEL_FORMAT_RGB_565:
+        return S3C_FB_PIXEL_FORMAT_RGB_565;
     default:
         return S3C_FB_PIXEL_FORMAT_MAX;
     }
@@ -273,8 +274,8 @@ static bool exynos5_format_is_ycrcb(int format)
 
 static bool exynos5_format_requires_gscaler(int format)
 {
-    return exynos5_format_is_supported_by_gscaler(format) &&
-            format != HAL_PIXEL_FORMAT_RGBX_8888;
+    return (exynos5_format_is_supported_by_gscaler(format) &&
+           (format != HAL_PIXEL_FORMAT_RGBX_8888) && (format != HAL_PIXEL_FORMAT_RGB_565));
 }
 
 static uint8_t exynos5_format_to_bpp(int format)
@@ -286,6 +287,7 @@ static uint8_t exynos5_format_to_bpp(int format)
 
     case HAL_PIXEL_FORMAT_RGBA_5551:
     case HAL_PIXEL_FORMAT_RGBA_4444:
+    case HAL_PIXEL_FORMAT_RGB_565:
         return 16;
 
     default: