mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2025-01-15 18:34:47 +08:00
09c41a23a2
This reverts commit b6c61a6c37
.
The requested pixelformat is being propagated from the capture to the
tpg in the sensor.
This was a bad design choice, as we start having the following issues:
* We set a pixelformat in the capture;
* We set matching media bus formats in the subdevices pads;
* Link validate looks fine (sizes matches, media bus formats matches);
* Issue: if some of the subdevice doesn't know how to generate the
requested pixelformat in the capture, then stream_on fails. This is bad
because capture says it supports that pixelformat, everything looks
fine, but it is not, and there is no way to find it out through the
links.
This patch was implemented so we could request any pixelformat from the
pipeline regardeless of the media bus format configured between pads.
Not all pixelformat can be mapped into a media bus code (e.g.
multiplanar formats), so with this patch we could request those
pixelformats from the tpg.
Solution: map pixelformats to media bus codes as before, and implement
conversions to other pixelformats in the capture to support multiplanar.
So first step to this solution is to revert this patch.
Signed-off-by: Helen Koike <helen.koike@collabora.com>
Signed-off-by: Lucas A. M. Magalhaes <lucmaga@gmail.com>
Tested-by: André Almeida <andrealmeid@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
45 lines
1.3 KiB
C
45 lines
1.3 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* vimc-streamer.h Virtual Media Controller Driver
|
|
*
|
|
* Copyright (C) 2018 Lucas A. M. Magalhães <lucmaga@gmail.com>
|
|
*
|
|
*/
|
|
|
|
#ifndef _VIMC_STREAMER_H_
|
|
#define _VIMC_STREAMER_H_
|
|
|
|
#include <media/media-device.h>
|
|
|
|
#include "vimc-common.h"
|
|
|
|
#define VIMC_STREAMER_PIPELINE_MAX_SIZE 16
|
|
|
|
/**
|
|
* struct vimc_stream - struct that represents a stream in the pipeline
|
|
*
|
|
* @pipe: the media pipeline object associated with this stream
|
|
* @ved_pipeline: array containing all the entities participating in the
|
|
* stream. The order is from a video device (usually a capture device) where
|
|
* stream_on was called, to the entity generating the first base image to be
|
|
* processed in the pipeline.
|
|
* @pipe_size: size of @ved_pipeline
|
|
* @kthread: thread that generates the frames of the stream.
|
|
*
|
|
* When the user call stream_on in a video device, struct vimc_stream is
|
|
* used to keep track of all entities and subdevices that generates and
|
|
* process frames for the stream.
|
|
*/
|
|
struct vimc_stream {
|
|
struct media_pipeline pipe;
|
|
struct vimc_ent_device *ved_pipeline[VIMC_STREAMER_PIPELINE_MAX_SIZE];
|
|
unsigned int pipe_size;
|
|
struct task_struct *kthread;
|
|
};
|
|
|
|
int vimc_streamer_s_stream(struct vimc_stream *stream,
|
|
struct vimc_ent_device *ved,
|
|
int enable);
|
|
|
|
#endif //_VIMC_STREAMER_H_
|