[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1547639306-19151-6-git-send-email-robert.chiras@nxp.com>
Date: Wed, 16 Jan 2019 11:48:43 +0000
From: Robert Chiras <robert.chiras@....com>
To: Daniel Vetter <daniel.vetter@...ll.ch>,
Philipp Zabel <p.zabel@...gutronix.de>,
Marek Vasut <marex@...x.de>
CC: Robert Chiras <robert.chiras@....com>,
Stefan Agner <stefan@...er.ch>,
Shawn Guo <shawnguo@...nel.org>,
Fabio Estevam <fabio.estevam@....com>,
David Airlie <airlied@...ux.ie>,
Anson Huang <anson.huang@....com>,
"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>,
dl-linux-imx <linux-imx@....com>,
"kernel@...gutronix.de" <kernel@...gutronix.de>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: [PATCH 05/11] drm/mxsfb: Fix the vblank events
Currently, the vblank support is not correctly implemented in MXSFB_DRM
driver. The call to drm_vblank_init is made with mode_config.num_crtc
which at that time is 0. Because of this, vblank is not activated, so
there won't be any vblank event submitted.
Signed-off-by: Robert Chiras <robert.chiras@....com>
---
drivers/gpu/drm/mxsfb/mxsfb_drv.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/mxsfb/mxsfb_drv.c b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
index bc1b750..d292192 100644
--- a/drivers/gpu/drm/mxsfb/mxsfb_drv.c
+++ b/drivers/gpu/drm/mxsfb/mxsfb_drv.c
@@ -43,6 +43,9 @@
#include "mxsfb_drv.h"
#include "mxsfb_regs.h"
+/* The eLCDIF max possible CRTCs */
+#define MAX_CRTCS 1
+
enum mxsfb_devtype {
MXSFB_V3,
MXSFB_V4,
@@ -138,6 +141,8 @@ static void mxsfb_pipe_enable(struct drm_simple_display_pipe *pipe,
mxsfb->connector = &mxsfb->panel_connector;
}
+ drm_crtc_vblank_on(&mxsfb->pipe.crtc);
+
pm_runtime_get_sync(drm->dev);
drm_panel_prepare(mxsfb->panel);
mxsfb_crtc_enable(mxsfb);
@@ -247,7 +252,7 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
pm_runtime_enable(drm->dev);
- ret = drm_vblank_init(drm, drm->mode_config.num_crtc);
+ ret = drm_vblank_init(drm, MAX_CRTCS);
if (ret < 0) {
dev_err(drm->dev, "Failed to initialise vblank\n");
goto err_vblank;
@@ -270,6 +275,8 @@ static int mxsfb_load(struct drm_device *drm, unsigned long flags)
goto err_vblank;
}
+ drm_crtc_vblank_off(&mxsfb->pipe.crtc);
+
/*
* Attach panel only if there is one.
* If there is no panel attach, it must be a bridge. In this case, we
--
2.7.4
Powered by blists - more mailing lists