summaryrefslogtreecommitdiff
path: root/drivers/media/i2c
diff options
context:
space:
mode:
authorMats Randgaard <matrandg@cisco.com>2013-08-14 15:59:44 +0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2013-08-24 11:24:41 +0400
commit70028fe646e63dd01070d1aaf304bbbc80e4a90a (patch)
tree556ea191870a6685f7ca3ea98a33ba8c037b97cf /drivers/media/i2c
parent76eb2d30140d6a7072b7faf33b109c5a4e82ee4a (diff)
downloadlinux-70028fe646e63dd01070d1aaf304bbbc80e4a90a.tar.xz
[media] adv7604: print flags and standards in timing information
Signed-off-by: Mats Randgaard <matrandg@cisco.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/i2c')
-rw-r--r--drivers/media/i2c/adv7604.c41
1 files changed, 28 insertions, 13 deletions
diff --git a/drivers/media/i2c/adv7604.c b/drivers/media/i2c/adv7604.c
index 34fcdf3c52e0..e732c9bcf0e0 100644
--- a/drivers/media/i2c/adv7604.c
+++ b/drivers/media/i2c/adv7604.c
@@ -1052,7 +1052,8 @@ static int adv7604_g_input_status(struct v4l2_subdev *sd, u32 *status)
/* ----------------------------------------------------------------------- */
static void adv7604_print_timings(struct v4l2_subdev *sd,
- struct v4l2_dv_timings *timings, const char *txt, bool detailed)
+ struct v4l2_dv_timings *timings,
+ const char *txt, bool detailed)
{
struct v4l2_bt_timings *bt = &timings->bt;
u32 htot, vtot;
@@ -1069,18 +1070,32 @@ static void adv7604_print_timings(struct v4l2_subdev *sd,
(htot * vtot)) : 0,
htot, vtot);
- if (detailed) {
- v4l2_info(sd, " horizontal: fp = %d, %ssync = %d, bp = %d\n",
- bt->hfrontporch,
- (bt->polarities & V4L2_DV_HSYNC_POS_POL) ? "+" : "-",
- bt->hsync, bt->hbackporch);
- v4l2_info(sd, " vertical: fp = %d, %ssync = %d, bp = %d\n",
- bt->vfrontporch,
- (bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-",
- bt->vsync, bt->vbackporch);
- v4l2_info(sd, " pixelclock: %lld, flags: 0x%x, standards: 0x%x\n",
- bt->pixelclock, bt->flags, bt->standards);
- }
+ if (!detailed)
+ return;
+
+ v4l2_info(sd, " horizontal: fp = %d, %ssync = %d, bp = %d\n",
+ bt->hfrontporch,
+ (bt->polarities & V4L2_DV_HSYNC_POS_POL) ? "+" : "-",
+ bt->hsync, bt->hbackporch);
+ v4l2_info(sd, " vertical: fp = %d, %ssync = %d, bp = %d\n",
+ bt->vfrontporch,
+ (bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-",
+ bt->vsync, bt->vbackporch);
+ v4l2_info(sd, " pixelclock: %lld\n", bt->pixelclock);
+ v4l2_info(sd, " flags (0x%x):%s%s%s%s\n", bt->flags,
+ (bt->flags & V4L2_DV_FL_REDUCED_BLANKING) ?
+ " Reduced blanking," : "",
+ (bt->flags & V4L2_DV_FL_CAN_REDUCE_FPS) ?
+ " Can reduce FPS," : "",
+ (bt->flags & V4L2_DV_FL_REDUCED_FPS) ?
+ " Reduced FPS," : "",
+ (bt->flags & V4L2_DV_FL_HALF_LINE) ?
+ " Half line," : "");
+ v4l2_info(sd, " standards (0x%x):%s%s%s%s\n", bt->standards,
+ (bt->standards & V4L2_DV_BT_STD_CEA861) ? " CEA," : "",
+ (bt->standards & V4L2_DV_BT_STD_DMT) ? " DMT," : "",
+ (bt->standards & V4L2_DV_BT_STD_CVT) ? " CVT" : "",
+ (bt->standards & V4L2_DV_BT_STD_GTF) ? " GTF" : "");
}
struct stdi_readback {