Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1353214 > unrolled thread
| Started by | Sebastian Reichel <sre@kernel.org> |
|---|---|
| First post | 2016-03-08 18:00 +0100 |
| Last post | 2016-03-08 18:00 +0100 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
[PATCH 23/23] drm: omapdrm: panel-dsi-cm: provide timings methods for omapdrm Sebastian Reichel <sre@kernel.org> - 2016-03-08 18:00 +0100
| From | Sebastian Reichel <sre@kernel.org> |
|---|---|
| Date | 2016-03-08 18:00 +0100 |
| Subject | [PATCH 23/23] drm: omapdrm: panel-dsi-cm: provide timings methods for omapdrm |
| Message-ID | <rat9g-3s9-21@gated-at.bofh.it> |
Provide omapdrm with methods to acquire timings
and check them later, so that it can properly
initialize the display.
Signed-off-by: Sebastian Reichel <sre@kernel.org>
---
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 38 +++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 196fe8d18ff4..edd1298b3a71 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -1163,6 +1163,41 @@ static void dsicm_ulps_work(struct work_struct *work)
mutex_unlock(&ddata->lock);
}
+static void dsicm_get_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ struct panel_drv_data *ddata = to_panel_data(dssdev);
+
+ *timings = ddata->timings;
+}
+
+static int dsicm_check_timings(struct omap_dss_device *dssdev,
+ struct omap_video_timings *timings)
+{
+ struct panel_drv_data *ddata = to_panel_data(dssdev);
+ int ret = 0;
+
+ if (timings->x_res != ddata->timings.x_res)
+ ret = -EINVAL;
+ else if (timings->y_res != ddata->timings.y_res)
+ ret = -EINVAL;
+
+ /* pixelclock is modified by dsi, so not easily checkable */
+
+ /* vfp, vbp, hfp, hbp are (re-)configured automatically by dsi */
+
+ if (ret) {
+ dev_warn(dssdev->dev, "wrong resolution: %d x %d",
+ timings->x_res, timings->y_res);
+ dev_warn(dssdev->dev, "panel resolution: %d x %d",
+ ddata->timings.x_res, ddata->timings.y_res);
+ } else {
+ dev_dbg(dssdev->dev, "mode check: ok");
+ }
+
+ return ret;
+}
+
static struct omap_dss_driver dsicm_ops = {
.connect = dsicm_connect,
.disconnect = dsicm_disconnect,
@@ -1180,6 +1215,9 @@ static struct omap_dss_driver dsicm_ops = {
.get_te = dsicm_get_te,
.memory_read = dsicm_memory_read,
+
+ .get_timings = dsicm_get_timings,
+ .check_timings = dsicm_check_timings,
};
static int dsicm_probe_pdata(struct platform_device *pdev)
--
2.7.0
Back to top | Article view | linux.kernel
csiph-web