Commit 87df33be authored by Deborah Brouwer's avatar Deborah Brouwer Committed by Mauro Carvalho Chehab

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: default avatarDeborah Brouwer <deborah.brouwer@collabora.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
parent 9764252d
......@@ -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;
}
......
......@@ -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",
......
......@@ -145,7 +145,6 @@ struct bttv_buffer {
struct videobuf_buffer vb;
/* bttv specific */
unsigned int tvnorm;
int btformat;
int btswap;
struct bttv_geometry geo;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment