summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-01-13 18:41:36 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2016-03-03 17:36:43 +0200
commitb7536d674575248fb8a7b09992496cf7110a875b (patch)
treefbc478d9f1a87ded12c4c20491743e5dae444af4 /drivers
parentb2af809241ac60a8728f76817bfa7a7e4d83c401 (diff)
drm/omap: DISPC: Fix field order for HDMI
Interlace field order is different between VENC and HDMI. The driver currently sets the field order for VENC. This patch adds the code to set the field order for HDMI. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index 1e7f26985bda..a4274dca384a 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -106,6 +106,13 @@ struct dispc_features {
bool has_writeback:1;
bool supports_double_pixel:1;
+
+ /*
+ * Field order for VENC is different than HDMI. We should handle this in
+ * some intelligent manner, but as the SoCs have either HDMI or VENC,
+ * never both, we can just use this flag for now.
+ */
+ bool reverse_ilace_field_order:1;
};
#define DISPC_MAX_NR_FIFOS 5
@@ -2749,6 +2756,9 @@ static int dispc_ovl_setup_common(enum omap_plane plane,
dispc_ovl_configure_burst_type(plane, rotation_type);
+ if (dispc.feat->reverse_ilace_field_order)
+ swap(offset0, offset1);
+
dispc_ovl_set_ba0(plane, paddr + offset0);
dispc_ovl_set_ba1(plane, paddr + offset1);
@@ -3958,6 +3968,7 @@ static const struct dispc_features omap44xx_dispc_feats = {
.supports_sync_align = true,
.has_writeback = true,
.supports_double_pixel = true,
+ .reverse_ilace_field_order = true,
};
static const struct dispc_features omap54xx_dispc_feats = {
@@ -3982,6 +3993,7 @@ static const struct dispc_features omap54xx_dispc_feats = {
.supports_sync_align = true,
.has_writeback = true,
.supports_double_pixel = true,
+ .reverse_ilace_field_order = true,
};
static int dispc_init_features(struct platform_device *pdev)