~ubuntu-branches/ubuntu/quantal/linux-linaro-mx51/quantal

« back to all changes in this revision

Viewing changes to drivers/media/video/omap1_camera.c

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-3o58a3c1bj7x00rs
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
990
990
}
991
991
 
992
992
/* Duplicate standard formats based on host capability of byte swapping */
993
 
static const struct soc_mbus_pixelfmt omap1_cam_formats[] = {
994
 
        [V4L2_MBUS_FMT_UYVY8_2X8] = {
 
993
static const struct soc_mbus_lookup omap1_cam_formats[] = {
 
994
{
 
995
        .code = V4L2_MBUS_FMT_UYVY8_2X8,
 
996
        .fmt = {
995
997
                .fourcc                 = V4L2_PIX_FMT_YUYV,
996
998
                .name                   = "YUYV",
997
999
                .bits_per_sample        = 8,
998
1000
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
999
1001
                .order                  = SOC_MBUS_ORDER_BE,
1000
1002
        },
1001
 
        [V4L2_MBUS_FMT_VYUY8_2X8] = {
 
1003
}, {
 
1004
        .code = V4L2_MBUS_FMT_VYUY8_2X8,
 
1005
        .fmt = {
1002
1006
                .fourcc                 = V4L2_PIX_FMT_YVYU,
1003
1007
                .name                   = "YVYU",
1004
1008
                .bits_per_sample        = 8,
1005
1009
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1006
1010
                .order                  = SOC_MBUS_ORDER_BE,
1007
1011
        },
1008
 
        [V4L2_MBUS_FMT_YUYV8_2X8] = {
 
1012
}, {
 
1013
        .code = V4L2_MBUS_FMT_YUYV8_2X8,
 
1014
        .fmt = {
1009
1015
                .fourcc                 = V4L2_PIX_FMT_UYVY,
1010
1016
                .name                   = "UYVY",
1011
1017
                .bits_per_sample        = 8,
1012
1018
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1013
1019
                .order                  = SOC_MBUS_ORDER_BE,
1014
1020
        },
1015
 
        [V4L2_MBUS_FMT_YVYU8_2X8] = {
 
1021
}, {
 
1022
        .code = V4L2_MBUS_FMT_YVYU8_2X8,
 
1023
        .fmt = {
1016
1024
                .fourcc                 = V4L2_PIX_FMT_VYUY,
1017
1025
                .name                   = "VYUY",
1018
1026
                .bits_per_sample        = 8,
1019
1027
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1020
1028
                .order                  = SOC_MBUS_ORDER_BE,
1021
1029
        },
1022
 
        [V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE] = {
 
1030
}, {
 
1031
        .code = V4L2_MBUS_FMT_RGB555_2X8_PADHI_BE,
 
1032
        .fmt = {
1023
1033
                .fourcc                 = V4L2_PIX_FMT_RGB555,
1024
1034
                .name                   = "RGB555",
1025
1035
                .bits_per_sample        = 8,
1026
1036
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1027
1037
                .order                  = SOC_MBUS_ORDER_BE,
1028
1038
        },
1029
 
        [V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE] = {
 
1039
}, {
 
1040
        .code = V4L2_MBUS_FMT_RGB555_2X8_PADHI_LE,
 
1041
        .fmt = {
1030
1042
                .fourcc                 = V4L2_PIX_FMT_RGB555X,
1031
1043
                .name                   = "RGB555X",
1032
1044
                .bits_per_sample        = 8,
1033
1045
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1034
1046
                .order                  = SOC_MBUS_ORDER_BE,
1035
1047
        },
1036
 
        [V4L2_MBUS_FMT_RGB565_2X8_BE] = {
 
1048
}, {
 
1049
        .code = V4L2_MBUS_FMT_RGB565_2X8_BE,
 
1050
        .fmt = {
1037
1051
                .fourcc                 = V4L2_PIX_FMT_RGB565,
1038
1052
                .name                   = "RGB565",
1039
1053
                .bits_per_sample        = 8,
1040
1054
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1041
1055
                .order                  = SOC_MBUS_ORDER_BE,
1042
1056
        },
1043
 
        [V4L2_MBUS_FMT_RGB565_2X8_LE] = {
 
1057
}, {
 
1058
        .code = V4L2_MBUS_FMT_RGB565_2X8_LE,
 
1059
        .fmt = {
1044
1060
                .fourcc                 = V4L2_PIX_FMT_RGB565X,
1045
1061
                .name                   = "RGB565X",
1046
1062
                .bits_per_sample        = 8,
1047
1063
                .packing                = SOC_MBUS_PACKING_2X8_PADHI,
1048
1064
                .order                  = SOC_MBUS_ORDER_BE,
1049
1065
        },
 
1066
},
1050
1067
};
1051
1068
 
1052
1069
static int omap1_cam_get_formats(struct soc_camera_device *icd,
1065
1082
 
1066
1083
        fmt = soc_mbus_get_fmtdesc(code);
1067
1084
        if (!fmt) {
1068
 
                dev_err(dev, "%s: invalid format code #%d: %d\n", __func__,
 
1085
                dev_warn(dev, "%s: unsupported format code #%d: %d\n", __func__,
1069
1086
                                idx, code);
1070
1087
                return 0;
1071
1088
        }
1085
1102
        case V4L2_MBUS_FMT_RGB565_2X8_LE:
1086
1103
                formats++;
1087
1104
                if (xlate) {
1088
 
                        xlate->host_fmt = &omap1_cam_formats[code];
 
1105
                        xlate->host_fmt = soc_mbus_find_fmtdesc(code,
 
1106
                                                omap1_cam_formats,
 
1107
                                                ARRAY_SIZE(omap1_cam_formats));
1089
1108
                        xlate->code     = code;
1090
1109
                        xlate++;
1091
1110
                        dev_dbg(dev,
1092
1111
                                "%s: providing format %s as byte swapped code #%d\n",
1093
 
                                __func__, omap1_cam_formats[code].name, code);
 
1112
                                __func__, xlate->host_fmt->name, code);
1094
1113
                }
1095
1114
        default:
1096
1115
                if (xlate)