summaryrefslogtreecommitdiff
path: root/drivers/media/pci/bt8xx/bttv-driver.c
diff options
context:
space:
mode:
authorDeborah Brouwer <deborah.brouwer@collabora.com>2023-07-14 19:16:01 -0700
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-14 20:27:59 +0200
commitfaebe84ebc7524928ed1e5d2fed02a30ea8f3ec1 (patch)
treef19b3b3afaee27521aa05b033dfc06099f6ace4f /drivers/media/pci/bt8xx/bttv-driver.c
parent79bbd3510ddb709f3d5c4a8488711e7903fa7f8a (diff)
media: bttv: copy vbi_fmt from bttv_fh
In preparation for the vb2 conversion, copy the vbi format from struct bttv_fh and add it to the main struct bttv. Use vbi format from struct bttv wherever it will be needed after the vb2 conversion which stops using separate bttv file handles altogether. To avoid changing more code than necessary, just leave the vbi format in separate file handles wherever it will be subsequently removed by vb2. Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers/media/pci/bt8xx/bttv-driver.c')
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 7e7658a7ed40..f9a6f671277f 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -672,12 +672,12 @@ int check_alloc_btres_lock(struct bttv *btv, struct bttv_fh *fh, int bit)
Claim scan lines crop[].rect.top to bottom. */
btv->crop_start = top;
} else if (bit & VBI_RESOURCES) {
- __s32 end = fh->vbi_fmt.end;
+ __s32 end = btv->vbi_fmt.end;
if (end > btv->crop_start)
goto fail;
- /* Claim scan lines above fh->vbi_fmt.end. */
+ /* Claim scan lines above btv->vbi_fmt.end. */
btv->vbi_end = end;
}
@@ -3637,6 +3637,8 @@ static int bttv_probe(struct pci_dev *dev, const struct pci_device_id *pci_id)
btv->width = 320;
btv->height = 240;
btv->input = 0;
+ btv->tvnorm = 0; /* Index into bttv_tvnorms[] i.e. PAL. */
+ bttv_vbi_fmt_reset(&btv->vbi_fmt, btv->tvnorm);
v4l2_ctrl_new_std(hdl, &bttv_ctrl_ops,
V4L2_CID_BRIGHTNESS, 0, 0xff00, 0x100, 32768);