summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/omapdrm/dss/dispc.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2016-08-29 11:15:49 +0300
committerTomi Valkeinen <tomi.valkeinen@ti.com>2017-06-02 10:57:20 +0300
commit6d86278c9ddb2026727a6a9ba5a4550561aea940 (patch)
tree7459142dff4da9d3c465ae66f229cdd5deef857d /drivers/gpu/drm/omapdrm/dss/dispc.c
parenteb06225244481ae0f14f5bca1cae966aa2839d7c (diff)
downloadtalos-obmc-linux-6d86278c9ddb2026727a6a9ba5a4550561aea940.tar.gz
talos-obmc-linux-6d86278c9ddb2026727a6a9ba5a4550561aea940.zip
drm/omap: fix setting & clearing DOUBLESTRIDE
The code that sets and clears DOUBLESTRIDE is only ran when using NV12. This is not correct, as we might first set the bith when using NV12, but never clear it when using other formats. Fix it so that when the bit is available (when the HW supports NV12) we always either set or clear the bit. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/dss/dispc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/dss/dispc.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index ac8ca605e314..afefdcfdde6c 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -1864,14 +1864,15 @@ static void dispc_ovl_set_rotation_attrs(enum omap_plane_id plane, u8 rotation,
REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane),
row_repeat ? 1 : 0, 18, 18);
- if (color_mode == OMAP_DSS_COLOR_NV12) {
- bool doublestride = (rotation_type == OMAP_DSS_ROT_TILER) &&
- (rotation == OMAP_DSS_ROT_0 ||
- rotation == OMAP_DSS_ROT_180);
+ if (dss_feat_color_mode_supported(plane, OMAP_DSS_COLOR_NV12)) {
+ bool doublestride =
+ color_mode == OMAP_DSS_COLOR_NV12 &&
+ rotation_type == OMAP_DSS_ROT_TILER &&
+ (rotation == OMAP_DSS_ROT_0 || rotation == OMAP_DSS_ROT_180);
+
/* DOUBLESTRIDE */
REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), doublestride, 22, 22);
}
-
}
static int color_mode_to_bpp(enum omap_color_mode color_mode)
OpenPOWER on IntegriCloud