aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/hdmi.c
diff options
context:
space:
mode:
authorLespiau, Damien <damien.lespiau@intel.com>2013-08-19 11:58:57 -0400
committerDave Airlie <airlied@gmail.com>2013-08-29 18:40:35 -0400
commit974e0701c5251de879624d166890fbd0ee9fc429 (patch)
tree8a7a610ff4a91aecb04ef622932b52d8f3aacb46 /drivers/video/hdmi.c
parenta5ad3dcf358475dfc5ccf11e28d3822fc3c8e5fe (diff)
video/hdmi: Derive the bar data valid bit from the bar data fields
Just like: Author: Damien Lespiau <damien.lespiau@intel.com> Date: Mon Aug 12 11:53:24 2013 +0100 video/hdmi: Don't let the user of this API create invalid infoframes But this time for the horizontal/vertical bar data present bits. Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Dave Airlie <airlied@gmail.com>
Diffstat (limited to 'drivers/video/hdmi.c')
-rw-r--r--drivers/video/hdmi.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/video/hdmi.c b/drivers/video/hdmi.c
index 7ccc118fefed..1201357f3e3c 100644
--- a/drivers/video/hdmi.c
+++ b/drivers/video/hdmi.c
@@ -103,10 +103,11 @@ ssize_t hdmi_avi_infoframe_pack(struct hdmi_avi_infoframe *frame, void *buffer,
103 if (frame->active_aspect & 0xf) 103 if (frame->active_aspect & 0xf)
104 ptr[0] |= BIT(4); 104 ptr[0] |= BIT(4);
105 105
106 if (frame->horizontal_bar_valid) 106 /* Bit 3 and 2 indicate if we transmit horizontal/vertical bar data */
107 if (frame->top_bar || frame->bottom_bar)
107 ptr[0] |= BIT(3); 108 ptr[0] |= BIT(3);
108 109
109 if (frame->vertical_bar_valid) 110 if (frame->left_bar || frame->right_bar)
110 ptr[0] |= BIT(2); 111 ptr[0] |= BIT(2);
111 112
112 ptr[1] = ((frame->colorimetry & 0x3) << 6) | 113 ptr[1] = ((frame->colorimetry & 0x3) << 6) |