Skip to content

Commit

Permalink
[media] v4l2-tpg: Init hv_enc field with a valid value
Browse files Browse the repository at this point in the history
Zero is not a valid value for hsv_enc. Set the field to a valid
initial value.

This is not a problem for vivid, because it sets the field to 180 via
tpg_s_hsv_enc() on the control initialization, but it might be a source
of errors for other drivers that use this code.

Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
ribalda authored and mchehab committed Nov 29, 2016
1 parent f51e808 commit 94868d6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/common/v4l2-tpg/v4l2-tpg-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ void tpg_init(struct tpg_data *tpg, unsigned w, unsigned h)
tpg_s_fourcc(tpg, V4L2_PIX_FMT_RGB24);
tpg->colorspace = V4L2_COLORSPACE_SRGB;
tpg->perc_fill = 100;
tpg->hsv_enc = V4L2_HSV_ENC_180;
}
EXPORT_SYMBOL_GPL(tpg_init);

Expand Down

0 comments on commit 94868d6

Please sign in to comment.