tc358746/48 RGB888 parallel to MIPI

Hi support team and everyone,

I use TC358746 chip set put parallel RGB888 data to tx1 by MIPI. And I can capture sensor data use command line “v4l2-ctl -d /dev/video0 -w --verbose --set-fmt-video=width=1077,height=788,pixelformat=RGB --set-ctrl bypass_mode=0 --stream-mmap --stream-count=1 --stream-to=test”. But when I use gst-launch-1.0 tool, I got some error.

When use “gst-launch-1.0 v4l2src device=”/dev/video0" ! ‘video/x-raw, width=(int)1077, height=(int)788, format=(string)RGBx, framerate=(fraction)30/1’ ! fakesink" ", I got “WARNING: erroneous pipeline: could not link v4l2src0 to fakesink0”

When use " gst-launch-1.0 v4l2src device=/dev/video0 ! ‘video/x-raw,format=RGB’ ! videoconvert ! xvimagesink",I got "
Setting pipeline to PAUSED …
No protocol specified
ERROR: Pipeline doesn’t want to pause.
ERROR: from element /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0: Could not initialise Xv output
Additional debug info:
xvimagesink.c(1760): gst_xv_image_sink_open (): /GstPipeline:pipeline0/GstXvImageSink:xvimagesink0:
Could not open display (null)
Setting pipeline to NULL …
Freeing pipeline …"

Could anyone help me?

which tools should I use to capture RGB888 sensor camera? yavta?

I add this to platform/tegra/camera/camera_common.c in order to support RGB888.
static const struct camera_common_colorfmt camera_common_color_fmts = {
{
V4L2_MBUS_FMT_SRGGB12_1X12,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB12,
},
{
V4L2_MBUS_FMT_SRGGB10_1X10,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB10,
},
{
V4L2_MBUS_FMT_SRGGB8_1X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_SRGGB8,
},
{
V4L2_MBUS_FMT_UYVY8_2X8,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_UYVY,
},
{
V4L2_MBUS_FMT_RGB888_1X24,
V4L2_COLORSPACE_SRGB,
V4L2_PIX_FMT_ABGR32,
},
};
if (mf->code != V4L2_MBUS_FMT_RGB888_1X24 &&
mf->code != V4L2_MBUS_FMT_SRGGB10_1X10 &&
mf->code != V4L2_MBUS_FMT_SRGGB8_1X8 &&
mf->code != V4L2_MBUS_FMT_UYVY8_2X8) {
mf->code = V4L2_MBUS_FMT_SRGGB8_1X8;
err = -EINVAL;
}

And did not change anything in “platform/tegra/camera/core.c” Here are driver code and dts.

#define OV5693_MAX_COARSE_DIFF 6

#define OV5693_GAIN_SHIFT 8
#define OV5693_REAL_GAIN_SHIFT 4
#define OV5693_MIN_GAIN (1 << OV5693_GAIN_SHIFT)
#define OV5693_MAX_GAIN (16 << OV5693_GAIN_SHIFT)
#define OV5693_MAX_UNREAL_GAIN (0x0F80)
#define OV5693_MIN_FRAME_LENGTH (0x0)
#define OV5693_MAX_FRAME_LENGTH (0x7fff)
#define OV5693_MIN_EXPOSURE_COARSE (0x0002)
#define OV5693_MAX_EXPOSURE_COARSE
(OV5693_MAX_FRAME_LENGTH-OV5693_MAX_COARSE_DIFF)

#define OV5693_DEFAULT_GAIN OV5693_MIN_GAIN
#define OV5693_DEFAULT_FRAME_LENGTH (0x07C0)
#define OV5693_DEFAULT_EXPOSURE_COARSE
(OV5693_DEFAULT_FRAME_LENGTH-OV5693_MAX_COARSE_DIFF)

#define OV5693_DEFAULT_MODE OV5693_MODE_2592X1944
#define OV5693_DEFAULT_HDR_MODE OV5693_MODE_2592X1944_HDR
#define OV5693_DEFAULT_WIDTH 1077
#define OV5693_DEFAULT_HEIGHT 788
#define OV5693_DEFAULT_DATAFMT V4L2_MBUS_FMT_RGB888_1X24
#define OV5693_DEFAULT_CLK_FREQ 24000000

mode0 { // OV5693_MODE_2592X1944
mclk_khz = “24000”;
num_lanes = “4”;
tegra_sinterface = “serial_a”;
discontinuous_clk = “no”;
dpcm_enable = “false”;
cil_settletime = “0”;

                                    active_w = "1077";
                                    active_h = "788";
                                    //pixel_t = "bayer_bggr";
                                  [u]  pixel_t = "rgb888";[/u][b][/b]
                                    readout_orientation = "180";
                                    line_length = "2688";
                                    inherent_gain = "1";
                                    mclk_multiplier = "17.0";
                                    pix_clk_hz = "160000000";

                                    min_gain_val = "1.0";
                                    max_gain_val = "16";
                                    min_hdr_ratio = "1";
                                    max_hdr_ratio = "64";
                                    min_framerate = "1.816577";
                                    max_framerate = "30";
                                    min_exp_time = "34";
                                    max_exp_time = "550385";
                                    embedded_metadata_height = "0";
                            };

@Le0Nard0
You need a gstreamer element can process RGB888, maybe you can try glimagesink.