summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorDeborah Brouwer <deborah.brouwer@collabora.com>2023-07-15 05:16:04 +0300
committerMauro Carvalho Chehab <mchehab@kernel.org>2023-08-14 21:27:59 +0300
commit87df33be05487a9b4cfab75c7e9818f3c391b5f7 (patch)
treea19272051c53f78038f762a9bbee2300736c4e37 /drivers
parent9764252d4bdb4314604169876cacb6ca82affbf1 (diff)
downloadlinux-87df33be05487a9b4cfab75c7e9818f3c391b5f7.tar.xz
media: bttv: remove tvnorm field from bttv_buffer
Instead of storing the tvnorm in each bttv buffer separately, just use the global bttv tvnorm because the tvnorm does not change per buffer. Signed-off-by: Deborah Brouwer <deborah.brouwer@collabora.com> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/pci/bt8xx/bttv-driver.c4
-rw-r--r--drivers/media/pci/bt8xx/bttv-risc.c2
-rw-r--r--drivers/media/pci/bt8xx/bttvp.h1
3 files changed, 3 insertions, 4 deletions
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c
index 0032e1436111..f32050849691 100644
--- a/drivers/media/pci/bt8xx/bttv-driver.c
+++ b/drivers/media/pci/bt8xx/bttv-driver.c
@@ -1553,7 +1553,7 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
/* alloc + fill struct bttv_buffer (if changed) */
if (buf->vb.width != width || buf->vb.height != height ||
buf->vb.field != field ||
- buf->tvnorm != norm || btv->fmt != fmt ||
+ btv->tvnorm != norm || btv->fmt != fmt ||
buf->crop.top != c.rect.top ||
buf->crop.left != c.rect.left ||
buf->crop.width != c.rect.width ||
@@ -1561,7 +1561,7 @@ static int bttv_prepare_buffer(struct videobuf_queue *q,struct bttv *btv,
buf->vb.width = width;
buf->vb.height = height;
buf->vb.field = field;
- buf->tvnorm = norm;
+ btv->tvnorm = norm;
buf->crop = c.rect;
redo_dma_risc = 1;
}
diff --git a/drivers/media/pci/bt8xx/bttv-risc.c b/drivers/media/pci/bt8xx/bttv-risc.c
index 67ea7ed42623..0a296dc1a7a5 100644
--- a/drivers/media/pci/bt8xx/bttv-risc.c
+++ b/drivers/media/pci/bt8xx/bttv-risc.c
@@ -606,7 +606,7 @@ bttv_buffer_activate_video(struct bttv *btv,
int
bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf)
{
- const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm;
+ const struct bttv_tvnorm *tvnorm = bttv_tvnorms + btv->tvnorm;
struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb);
dprintk("%d: buffer field: %s format: 0x%08x size: %dx%d\n",
diff --git a/drivers/media/pci/bt8xx/bttvp.h b/drivers/media/pci/bt8xx/bttvp.h
index 402fe1f1846e..bbb5fc060fad 100644
--- a/drivers/media/pci/bt8xx/bttvp.h
+++ b/drivers/media/pci/bt8xx/bttvp.h
@@ -145,7 +145,6 @@ struct bttv_buffer {
struct videobuf_buffer vb;
/* bttv specific */
- unsigned int tvnorm;
int btformat;
int btswap;
struct bttv_geometry geo;