]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-4.20/drm-omap-dsi-hack-fix-dsi-bus-flags.patch
Linux 4.14.106
[thirdparty/kernel/stable-queue.git] / queue-4.20 / drm-omap-dsi-hack-fix-dsi-bus-flags.patch
1 From ce71f14bae32f0a9112e6602a7bb48f953f7f626 Mon Sep 17 00:00:00 2001
2 From: Tomi Valkeinen <tomi.valkeinen@ti.com>
3 Date: Fri, 11 Jan 2019 05:50:35 +0200
4 Subject: drm/omap: dsi: Hack-fix DSI bus flags
5
6 [ Upstream commit 6297388e1eddd2f1345cea5892156223995bcf2d ]
7
8 Since commit b4935e3a3cfa ("drm/omap: Store bus flags in the
9 omap_dss_device structure") video mode flags are managed by the omapdss
10 (and later omapdrm) core based on bus flags stored in omap_dss_device.
11 This works fine for all devices whose video modes are set by the omapdss
12 and omapdrm core, but breaks DSI operation as the DSI still uses legacy
13 code paths and sets the DISPC timings manually.
14
15 To fix the problem properly we should move the DSI encoder to the new
16 encoder model. This will however require a considerable amount of work.
17 Restore DSI operation by adding back video mode flags handling in the
18 DSI encoder driver as a hack in the meantime.
19
20 Fixes: b4935e3a3cfa ("drm/omap: Store bus flags in the omap_dss_device structure")
21 Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
22 Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
23 Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
24 Link: https://patchwork.freedesktop.org/patch/msgid/20190111035120.20668-5-laurent.pinchart@ideasonboard.com
25 Signed-off-by: Sasha Levin <sashal@kernel.org>
26 ---
27 drivers/gpu/drm/omapdrm/dss/dsi.c | 11 +++++++++++
28 1 file changed, 11 insertions(+)
29
30 diff --git a/drivers/gpu/drm/omapdrm/dss/dsi.c b/drivers/gpu/drm/omapdrm/dss/dsi.c
31 index b5685018d830..64fb788b6647 100644
32 --- a/drivers/gpu/drm/omapdrm/dss/dsi.c
33 +++ b/drivers/gpu/drm/omapdrm/dss/dsi.c
34 @@ -4751,6 +4751,17 @@ static int dsi_set_config(struct omap_dss_device *dssdev,
35 dsi->vm.flags |= DISPLAY_FLAGS_HSYNC_HIGH;
36 dsi->vm.flags &= ~DISPLAY_FLAGS_VSYNC_LOW;
37 dsi->vm.flags |= DISPLAY_FLAGS_VSYNC_HIGH;
38 + /*
39 + * HACK: These flags should be handled through the omap_dss_device bus
40 + * flags, but this will only be possible when the DSI encoder will be
41 + * converted to the omapdrm-managed encoder model.
42 + */
43 + dsi->vm.flags &= ~DISPLAY_FLAGS_PIXDATA_NEGEDGE;
44 + dsi->vm.flags |= DISPLAY_FLAGS_PIXDATA_POSEDGE;
45 + dsi->vm.flags &= ~DISPLAY_FLAGS_DE_LOW;
46 + dsi->vm.flags |= DISPLAY_FLAGS_DE_HIGH;
47 + dsi->vm.flags &= ~DISPLAY_FLAGS_SYNC_POSEDGE;
48 + dsi->vm.flags |= DISPLAY_FLAGS_SYNC_NEGEDGE;
49
50 dss_mgr_set_timings(&dsi->output, &dsi->vm);
51
52 --
53 2.19.1
54