Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 70028fe6 authored by Mats Randgaard's avatar Mats Randgaard Committed by Mauro Carvalho Chehab
Browse files

[media] adv7604: print flags and standards in timing information

parent 76eb2d30
Loading
Loading
Loading
Loading
+28 −13
Original line number Original line Diff line number Diff line
@@ -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,
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;
	struct v4l2_bt_timings *bt = &timings->bt;
	u32 htot, vtot;
	u32 htot, vtot;
@@ -1069,7 +1070,9 @@ static void adv7604_print_timings(struct v4l2_subdev *sd,
				(htot * vtot)) : 0,
				(htot * vtot)) : 0,
			htot, vtot);
			htot, vtot);


	if (detailed) {
	if (!detailed)
		return;

	v4l2_info(sd, "    horizontal: fp = %d, %ssync = %d, bp = %d\n",
	v4l2_info(sd, "    horizontal: fp = %d, %ssync = %d, bp = %d\n",
			bt->hfrontporch,
			bt->hfrontporch,
			(bt->polarities & V4L2_DV_HSYNC_POS_POL) ? "+" : "-",
			(bt->polarities & V4L2_DV_HSYNC_POS_POL) ? "+" : "-",
@@ -1078,9 +1081,21 @@ static void adv7604_print_timings(struct v4l2_subdev *sd,
			bt->vfrontporch,
			bt->vfrontporch,
			(bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-",
			(bt->polarities & V4L2_DV_VSYNC_POS_POL) ? "+" : "-",
			bt->vsync, bt->vbackporch);
			bt->vsync, bt->vbackporch);
		v4l2_info(sd, "    pixelclock: %lld, flags: 0x%x, standards: 0x%x\n",
	v4l2_info(sd, "    pixelclock: %lld\n", bt->pixelclock);
				bt->pixelclock, bt->flags, bt->standards);
	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 {
struct stdi_readback {