Skip to content

Commit c1d7b06

Browse files
Kuninori MorimotoMauro Carvalho Chehab
authored andcommitted
V4L/DVB (13668): tw9910: remove cropping
Cropping is used for data input, and it is not needed now Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
1 parent 7874b90 commit c1d7b06

1 file changed

Lines changed: 0 additions & 48 deletions

File tree

‎drivers/media/video/tw9910.c‎

Lines changed: 0 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -329,13 +329,6 @@ static const struct tw9910_scale_ctrl tw9910_pal_scales[] = {
329329
},
330330
};
331331

332-
static const struct tw9910_cropping_ctrl tw9910_cropping_ctrl = {
333-
.vdelay = 0x0012,
334-
.vactive = 0x00F0,
335-
.hdelay = 0x0010,
336-
.hactive = 0x02D0,
337-
};
338-
339332
static const struct tw9910_hsync_ctrl tw9910_hsync_ctrl = {
340333
.start = 0x0260,
341334
.end = 0x0300,
@@ -385,40 +378,6 @@ static int tw9910_set_scale(struct i2c_client *client,
385378
return ret;
386379
}
387380

388-
static int tw9910_set_cropping(struct i2c_client *client,
389-
const struct tw9910_cropping_ctrl *cropping)
390-
{
391-
int ret;
392-
393-
ret = i2c_smbus_write_byte_data(client, CROP_HI,
394-
(cropping->vdelay & 0x0300) >> 2 |
395-
(cropping->vactive & 0x0300) >> 4 |
396-
(cropping->hdelay & 0x0300) >> 6 |
397-
(cropping->hactive & 0x0300) >> 8);
398-
if (ret < 0)
399-
return ret;
400-
401-
ret = i2c_smbus_write_byte_data(client, VDELAY_LO,
402-
cropping->vdelay & 0x00FF);
403-
if (ret < 0)
404-
return ret;
405-
406-
ret = i2c_smbus_write_byte_data(client, VACTIVE_LO,
407-
cropping->vactive & 0x00FF);
408-
if (ret < 0)
409-
return ret;
410-
411-
ret = i2c_smbus_write_byte_data(client, HDELAY_LO,
412-
cropping->hdelay & 0x00FF);
413-
if (ret < 0)
414-
return ret;
415-
416-
ret = i2c_smbus_write_byte_data(client, HACTIVE_LO,
417-
cropping->hactive & 0x00FF);
418-
419-
return ret;
420-
}
421-
422381
static int tw9910_set_hsync(struct i2c_client *client,
423382
const struct tw9910_hsync_ctrl *hsync)
424383
{
@@ -708,13 +667,6 @@ static int tw9910_s_crop(struct v4l2_subdev *sd, struct v4l2_crop *a)
708667
if (ret < 0)
709668
goto tw9910_set_fmt_error;
710669

711-
/*
712-
* set cropping
713-
*/
714-
ret = tw9910_set_cropping(client, &tw9910_cropping_ctrl);
715-
if (ret < 0)
716-
goto tw9910_set_fmt_error;
717-
718670
/*
719671
* set hsync
720672
*/

0 commit comments

Comments
 (0)