diff options
| -rw-r--r-- | Documentation/video4linux/vivid.txt | 12 | ||||
| -rw-r--r-- | drivers/media/platform/vivid/vivid-core.c | 11 |
2 files changed, 8 insertions, 15 deletions
diff --git a/Documentation/video4linux/vivid.txt b/Documentation/video4linux/vivid.txt index eeb11a28e4fc..e5a940e3d304 100644 --- a/Documentation/video4linux/vivid.txt +++ b/Documentation/video4linux/vivid.txt | |||
| @@ -221,12 +221,11 @@ ccs_out_mode: specify the allowed video output crop/compose/scaling combination | |||
| 221 | key, not quality. | 221 | key, not quality. |
| 222 | 222 | ||
| 223 | multiplanar: select whether each device instance supports multi-planar formats, | 223 | multiplanar: select whether each device instance supports multi-planar formats, |
| 224 | and thus the V4L2 multi-planar API. By default the first device instance | 224 | and thus the V4L2 multi-planar API. By default device instances are |
| 225 | is single-planar, the second multi-planar, and it keeps alternating. | 225 | single-planar. |
| 226 | 226 | ||
| 227 | This module option can override that for each instance. Values are: | 227 | This module option can override that for each instance. Values are: |
| 228 | 228 | ||
| 229 | 0: use alternating single and multi-planar devices. | ||
| 230 | 1: this is a single-planar instance. | 229 | 1: this is a single-planar instance. |
| 231 | 2: this is a multi-planar instance. | 230 | 2: this is a multi-planar instance. |
| 232 | 231 | ||
| @@ -975,9 +974,8 @@ is set, then the alpha component is only used for the color red and set to | |||
| 975 | 0 otherwise. | 974 | 0 otherwise. |
| 976 | 975 | ||
| 977 | The driver has to be configured to support the multiplanar formats. By default | 976 | The driver has to be configured to support the multiplanar formats. By default |
| 978 | the first driver instance is single-planar, the second is multi-planar, and it | 977 | the driver instances are single-planar. This can be changed by setting the |
| 979 | keeps alternating. This can be changed by setting the multiplanar module option, | 978 | multiplanar module option, see section 1 for more details on that option. |
| 980 | see section 1 for more details on that option. | ||
| 981 | 979 | ||
| 982 | If the driver instance is using the multiplanar formats/API, then the first | 980 | If the driver instance is using the multiplanar formats/API, then the first |
| 983 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the | 981 | single planar format (YUYV) and the multiplanar NV16M and NV61M formats the |
| @@ -1021,7 +1019,7 @@ the output overlay for the video output, turn on video looping and capture | |||
| 1021 | to see the blended framebuffer overlay that's being written to by the second | 1019 | to see the blended framebuffer overlay that's being written to by the second |
| 1022 | instance. This setup would require the following commands: | 1020 | instance. This setup would require the following commands: |
| 1023 | 1021 | ||
| 1024 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 multiplanar=1,1 | 1022 | $ sudo modprobe vivid n_devs=2 node_types=0x10101,0x1 |
| 1025 | $ v4l2-ctl -d1 --find-fb | 1023 | $ v4l2-ctl -d1 --find-fb |
| 1026 | /dev/fb1 is the framebuffer associated with base address 0x12800000 | 1024 | /dev/fb1 is the framebuffer associated with base address 0x12800000 |
| 1027 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 | 1025 | $ sudo v4l2-ctl -d2 --set-fbuf fb=1 |
diff --git a/drivers/media/platform/vivid/vivid-core.c b/drivers/media/platform/vivid/vivid-core.c index 2c61a62ab48b..686c3c2ad05b 100644 --- a/drivers/media/platform/vivid/vivid-core.c +++ b/drivers/media/platform/vivid/vivid-core.c | |||
| @@ -100,11 +100,9 @@ MODULE_PARM_DESC(ccs_out_mode, " output crop/compose/scale mode:\n" | |||
| 100 | "\t\t bit 0=crop, 1=compose, 2=scale,\n" | 100 | "\t\t bit 0=crop, 1=compose, 2=scale,\n" |
| 101 | "\t\t -1=user-controlled (default)"); | 101 | "\t\t -1=user-controlled (default)"); |
| 102 | 102 | ||
| 103 | static unsigned multiplanar[VIVID_MAX_DEVS]; | 103 | static unsigned multiplanar[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 1 }; |
| 104 | module_param_array(multiplanar, uint, NULL, 0444); | 104 | module_param_array(multiplanar, uint, NULL, 0444); |
| 105 | MODULE_PARM_DESC(multiplanar, " 0 (default) is alternating single and multiplanar devices,\n" | 105 | MODULE_PARM_DESC(multiplanar, " 1 (default) creates a single planar device, 2 creates a multiplanar device."); |
| 106 | "\t\t 1 is single planar devices,\n" | ||
| 107 | "\t\t 2 is multiplanar devices"); | ||
| 108 | 106 | ||
| 109 | /* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */ | 107 | /* Default: video + vbi-cap (raw and sliced) + radio rx + radio tx + sdr + vbi-out + vid-out */ |
| 110 | static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d }; | 108 | static unsigned node_types[VIVID_MAX_DEVS] = { [0 ... (VIVID_MAX_DEVS - 1)] = 0x1d3d }; |
| @@ -669,10 +667,7 @@ static int __init vivid_create_instance(int inst) | |||
| 669 | /* start detecting feature set */ | 667 | /* start detecting feature set */ |
| 670 | 668 | ||
| 671 | /* do we use single- or multi-planar? */ | 669 | /* do we use single- or multi-planar? */ |
| 672 | if (multiplanar[inst] == 0) | 670 | dev->multiplanar = multiplanar[inst] > 1; |
| 673 | dev->multiplanar = inst & 1; | ||
| 674 | else | ||
| 675 | dev->multiplanar = multiplanar[inst] > 1; | ||
| 676 | v4l2_info(&dev->v4l2_dev, "using %splanar format API\n", | 671 | v4l2_info(&dev->v4l2_dev, "using %splanar format API\n", |
| 677 | dev->multiplanar ? "multi" : "single "); | 672 | dev->multiplanar ? "multi" : "single "); |
| 678 | 673 | ||
