video: tegra: dc: Fix support for YUV422R
Francis Hart [Mon, 12 Dec 2011 10:33:39 +0000 (12:33 +0200)]
The tegra display controller supports the YUV422R planar surface format, but
this was not handled by the dc driver.

This change also fixes the YUV422RA planar format variation.

Bug 914375

Change-Id: I73ffd2f7434c71d8353c7e16ada5ac6b13fee86b
Reviewed-on: http://git-master/r/69446
Reviewed-by: Varun Colbert <vcolbert@nvidia.com>
Tested-by: Varun Colbert <vcolbert@nvidia.com>
(cherry picked from commit a085ef1eeb332116f102d82af25f7a6451eb6329)
Reviewed-on: http://git-master/r/73950
Reviewed-by: Varun Wadekar <vwadekar@nvidia.com>
Tested-by: Varun Wadekar <vwadekar@nvidia.com>

drivers/video/tegra/dc/dc.c

index 1ae7633..e9bbf11 100644 (file)
@@ -131,14 +131,14 @@ static inline int tegra_dc_fmt_bpp(int fmt)
        case TEGRA_WIN_FMT_YUV420P:
        case TEGRA_WIN_FMT_YCbCr422P:
        case TEGRA_WIN_FMT_YUV422P:
-               return 8;
-
-       case TEGRA_WIN_FMT_YCbCr422:
-       case TEGRA_WIN_FMT_YUV422:
        case TEGRA_WIN_FMT_YCbCr422R:
        case TEGRA_WIN_FMT_YUV422R:
        case TEGRA_WIN_FMT_YCbCr422RA:
        case TEGRA_WIN_FMT_YUV422RA:
+               return 8;
+
+       case TEGRA_WIN_FMT_YCbCr422:
+       case TEGRA_WIN_FMT_YUV422:
                /* FIXME: need to know the bpp of these formats */
                return 0;
        }
@@ -152,6 +152,10 @@ static inline bool tegra_dc_is_yuv_planar(int fmt)
        case TEGRA_WIN_FMT_YCbCr420P:
        case TEGRA_WIN_FMT_YCbCr422P:
        case TEGRA_WIN_FMT_YUV422P:
+       case TEGRA_WIN_FMT_YCbCr422R:
+       case TEGRA_WIN_FMT_YUV422R:
+       case TEGRA_WIN_FMT_YCbCr422RA:
+       case TEGRA_WIN_FMT_YUV422RA:
                return true;
        }
        return false;