|
@@ -916,6 +916,21 @@ static int vpbe_display_s_fmt(struct file *file, void *priv,
|
|
|
other video window */
|
|
|
|
|
|
layer->pix_fmt = *pixfmt;
|
|
|
+ if (pixfmt->pixelformat == V4L2_PIX_FMT_NV12) {
|
|
|
+ struct vpbe_layer *otherlayer;
|
|
|
+
|
|
|
+ otherlayer = _vpbe_display_get_other_win_layer(disp_dev, layer);
|
|
|
+ /* if other layer is available, only
|
|
|
+ * claim it, do not configure it
|
|
|
+ */
|
|
|
+ ret = osd_device->ops.request_layer(osd_device,
|
|
|
+ otherlayer->layer_info.id);
|
|
|
+ if (ret < 0) {
|
|
|
+ v4l2_err(&vpbe_dev->v4l2_dev,
|
|
|
+ "Display Manager failed to allocate layer\n");
|
|
|
+ return -EBUSY;
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
/* Get osd layer config */
|
|
|
osd_device->ops.get_layer_config(osd_device,
|