Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1694928 > unrolled thread
| Started by | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| First post | 2017-07-24 19:40 +0200 |
| Last post | 2017-07-27 14:10 +0200 |
| Articles | 16 — 3 participants |
Back to article view | Back to linux.kernel
[PATCHv1 00/14] omapdrm: DSI command mode panel support Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 12/14] drm/omap: panel-dsi-cm: switch to gpiod Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 01/14] drm/omap: remove unused function defines Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
Re: [PATCHv1 01/14] drm/omap: remove unused function defines Pavel Machek <pavel@ucw.cz> - 2017-07-26 12:50 +0200
[PATCHv1 04/14] drm/omap: add framedone interrupt support Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 05/14] drm/omap: add manual update detection helper Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 06/14] drm/omap: add support for manually updated displays Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 02/14] drm/omap: drop incorrect comment Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
Re: [PATCHv1 02/14] drm/omap: drop incorrect comment Pavel Machek <pavel@ucw.cz> - 2017-07-26 12:50 +0200
[PATCHv1 07/14] drm/omap: add support for physical size hints from display drivers Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
Re: [PATCHv1 07/14] drm/omap: add support for physical size hints from display drivers Pavel Machek <pavel@ucw.cz> - 2017-07-26 12:50 +0200
[PATCHv1 03/14] drm/omap: plane: update fifo size on ovl setup Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
[PATCHv1 14/14] ARM: dts: n950: add display support Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
Re: [PATCHv1 14/14] ARM: dts: n950: add display support Pavel Machek <pavel@ucw.cz> - 2017-07-26 12:50 +0200
[PATCHv1 13/14] ARM: dts: omap4-droid4: improve LCD description Sebastian Reichel <sebastian.reichel@collabora.co.uk> - 2017-07-24 19:40 +0200
Re: [PATCHv1 00/14] omapdrm: DSI command mode panel support Tony Lindgren <tony@atomide.com> - 2017-07-27 14:10 +0200
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 00/14] omapdrm: DSI command mode panel support |
| Message-ID | <u6PuN-83g-3@gated-at.bofh.it> |
Hi, This adds support for command mode DSI panels to omapdrm. I tested the patches on Nokia N950 (omap3) and Motorola Droid 4 (omap4). This is basically PATCHv3 of my series adding N950 display support, but I started from scratch without reverting the removal of manual display update support. Tested: * Framebuffer Console * Display blanking * kmstest * Xorg with omap and modesetting driver * No updates send when nothing needs to be sent Known issues: * Proper display rotation support * N950 (and N9) has first and last few lines covered by plastic, so we should expose a smaller screen I plan to look into these issues once basic support has been merged. -- Sebastian Sebastian Reichel (13): drm/omap: remove unused function defines drm/omap: drop incorrect comment drm/omap: plane: update fifo size on ovl setup drm/omap: add framedone interrupt support drm/omap: add manual update detection helper drm/omap: add support for manually updated displays drm/omap: add support for physical size hints from display drivers drm/omap: panel-dsi-cm: add regulator support drm/omap: panel-dsi-cm: add physical size support drm/omap: panel-dsi-cm: add external backlight support drm/omap: panel-dsi-cm: switch to gpiod ARM: dts: omap4-droid4: improve LCD description ARM: dts: n950: add display support Tony Lindgren (1): drm/omap: panel-dsi-cm: fix driver arch/arm/boot/dts/omap3-n950.dts | 88 ++++++++ arch/arm/boot/dts/omap4-droid4-xt894.dts | 6 +- drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 289 +++++++++++++++++------- drivers/gpu/drm/omapdrm/dss/dispc.c | 16 ++ drivers/gpu/drm/omapdrm/dss/omapdss.h | 5 +- drivers/gpu/drm/omapdrm/omap_connector.c | 14 ++ drivers/gpu/drm/omapdrm/omap_crtc.c | 158 ++++++++++++- drivers/gpu/drm/omapdrm/omap_drv.h | 4 + drivers/gpu/drm/omapdrm/omap_fb.c | 20 ++ drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 - drivers/gpu/drm/omapdrm/omap_irq.c | 24 ++ 11 files changed, 529 insertions(+), 98 deletions(-) -- 2.13.2
[toc] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 12/14] drm/omap: panel-dsi-cm: switch to gpiod |
| Message-ID | <u6PuP-83g-31@gated-at.bofh.it> |
| In reply to | #1694928 |
Use the new descriptor based GPIO API instead of
the legacy one, which results in cleaner code
with less lines of code.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c | 74 +++++++++----------------
1 file changed, 27 insertions(+), 47 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
index 1eeb8b0d10c2..8f7463392047 100644
--- a/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
+++ b/drivers/gpu/drm/omapdrm/displays/panel-dsi-cm.c
@@ -22,7 +22,6 @@
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/of_device.h>
-#include <linux/of_gpio.h>
#include <linux/regulator/consumer.h>
#include <video/mipi_display.h>
@@ -59,8 +58,8 @@ struct panel_drv_data {
unsigned long hw_guard_wait; /* max guard time in jiffies */
/* panel HW configuration from DT or platform data */
- int reset_gpio;
- int ext_te_gpio;
+ struct gpio_desc *reset_gpio;
+ struct gpio_desc *ext_te_gpio;
struct regulator *vpnl;
struct regulator *vddi;
@@ -288,8 +287,8 @@ static int dsicm_enter_ulps(struct panel_drv_data *ddata)
if (r)
goto err;
- if (gpio_is_valid(ddata->ext_te_gpio))
- disable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ disable_irq(gpiod_to_irq(ddata->ext_te_gpio));
in->ops.dsi->disable(in, false, true);
@@ -330,8 +329,8 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata)
goto err2;
}
- if (gpio_is_valid(ddata->ext_te_gpio))
- enable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ enable_irq(gpiod_to_irq(ddata->ext_te_gpio));
dsicm_queue_ulps_work(ddata);
@@ -344,8 +343,8 @@ static int dsicm_exit_ulps(struct panel_drv_data *ddata)
r = dsicm_panel_reset(ddata);
if (!r) {
- if (gpio_is_valid(ddata->ext_te_gpio))
- enable_irq(gpio_to_irq(ddata->ext_te_gpio));
+ if (ddata->ext_te_gpio)
+ enable_irq(gpiod_to_irq(ddata->ext_te_gpio));
ddata->ulps_enabled = false;
}
err1:
@@ -591,16 +590,13 @@ static struct attribute_group dsicm_attr_group = {
static void dsicm_hw_reset(struct panel_drv_data *ddata)
{
- if (!gpio_is_valid(ddata->reset_gpio))
- return;
-
- gpio_set_value(ddata->reset_gpio, 1);
+ gpiod_set_value(ddata->reset_gpio, 1);
udelay(10);
/* reset the panel */
- gpio_set_value(ddata->reset_gpio, 0);
+ gpiod_set_value(ddata->reset_gpio, 0);
/* assert reset */
udelay(10);
- gpio_set_value(ddata->reset_gpio, 1);
+ gpiod_set_value(ddata->reset_gpio, 1);
/* wait after releasing reset */
usleep_range(5000, 10000);
}
@@ -954,7 +950,7 @@ static int dsicm_update(struct omap_dss_device *dssdev,
if (r)
goto err;
- if (ddata->te_enabled && gpio_is_valid(ddata->ext_te_gpio)) {
+ if (ddata->te_enabled && ddata->ext_te_gpio) {
schedule_delayed_work(&ddata->te_timeout_work,
msecs_to_jiffies(250));
atomic_set(&ddata->do_update, 1);
@@ -1001,7 +997,7 @@ static int _dsicm_enable_te(struct panel_drv_data *ddata, bool enable)
else
r = dsicm_dcs_write_0(ddata, MIPI_DCS_SET_TEAR_OFF);
- if (!gpio_is_valid(ddata->ext_te_gpio))
+ if (!ddata->ext_te_gpio)
in->ops.dsi->enable_te(in, enable);
/* possible panel bug */
@@ -1229,21 +1225,21 @@ static int dsicm_probe_of(struct platform_device *pdev)
struct panel_drv_data *ddata = platform_get_drvdata(pdev);
struct omap_dss_device *in;
struct display_timing timing;
- int gpio, err;
+ int err;
- gpio = of_get_named_gpio(node, "reset-gpios", 0);
- if (!gpio_is_valid(gpio)) {
- dev_err(&pdev->dev, "failed to parse reset gpio\n");
- return gpio;
+ ddata->reset_gpio = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW);
+ if (IS_ERR(ddata->reset_gpio)) {
+ err = PTR_ERR(ddata->reset_gpio);
+ dev_err(&pdev->dev, "reset gpio request failed: %d", err);
+ return err;
}
- ddata->reset_gpio = gpio;
- gpio = of_get_named_gpio(node, "te-gpios", 0);
- if (gpio_is_valid(gpio) || gpio == -ENOENT) {
- ddata->ext_te_gpio = gpio;
- } else {
- dev_err(&pdev->dev, "failed to parse TE gpio\n");
- return gpio;
+ ddata->ext_te_gpio = devm_gpiod_get_optional(&pdev->dev, "te",
+ GPIOD_IN);
+ if (IS_ERR(ddata->ext_te_gpio)) {
+ err = PTR_ERR(ddata->ext_te_gpio);
+ dev_err(&pdev->dev, "TE gpio request failed: %d", err);
+ return err;
}
err = of_get_display_timing(node, "panel-timing", &timing);
@@ -1353,24 +1349,8 @@ static int dsicm_probe(struct platform_device *pdev)
atomic_set(&ddata->do_update, 0);
- if (gpio_is_valid(ddata->reset_gpio)) {
- r = devm_gpio_request_one(dev, ddata->reset_gpio,
- GPIOF_OUT_INIT_LOW, "taal rst");
- if (r) {
- dev_err(dev, "failed to request reset gpio\n");
- goto err_reg;
- }
- }
-
- if (gpio_is_valid(ddata->ext_te_gpio)) {
- r = devm_gpio_request_one(dev, ddata->ext_te_gpio,
- GPIOF_IN, "taal irq");
- if (r) {
- dev_err(dev, "GPIO request failed\n");
- goto err_reg;
- }
-
- r = devm_request_irq(dev, gpio_to_irq(ddata->ext_te_gpio),
+ if (ddata->ext_te_gpio) {
+ r = devm_request_irq(dev, gpiod_to_irq(ddata->ext_te_gpio),
dsicm_te_isr,
IRQF_TRIGGER_RISING,
"taal vsync", ddata);
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 01/14] drm/omap: remove unused function defines |
| Message-ID | <u6PuP-83g-33@gated-at.bofh.it> |
| In reply to | #1694928 |
Remove driver (un)register API defines. They do not even exist
anymore.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 85953a0bc7c2..4e619ff360ae 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -575,9 +575,6 @@ struct omap_dss_driver {
enum omapdss_version omapdss_get_version(void);
bool omapdss_is_initialized(void);
-int omap_dss_register_driver(struct omap_dss_driver *);
-void omap_dss_unregister_driver(struct omap_dss_driver *);
-
int omapdss_register_display(struct omap_dss_device *dssdev);
void omapdss_unregister_display(struct omap_dss_device *dssdev);
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-07-26 12:50 +0200 |
| Subject | Re: [PATCHv1 01/14] drm/omap: remove unused function defines |
| Message-ID | <u7s38-7CE-21@gated-at.bofh.it> |
| In reply to | #1694930 |
[Multipart message — attachments visible in raw view] — view raw
On Mon 2017-07-24 19:32:58, Sebastian Reichel wrote:
> Remove driver (un)register API defines. They do not even exist
> anymore.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Pavel Machek <pavel@ucw.cz>
> ---
> drivers/gpu/drm/omapdrm/dss/omapdss.h | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> index 85953a0bc7c2..4e619ff360ae 100644
> --- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
> +++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
> @@ -575,9 +575,6 @@ struct omap_dss_driver {
> enum omapdss_version omapdss_get_version(void);
> bool omapdss_is_initialized(void);
>
> -int omap_dss_register_driver(struct omap_dss_driver *);
> -void omap_dss_unregister_driver(struct omap_dss_driver *);
> -
> int omapdss_register_display(struct omap_dss_device *dssdev);
> void omapdss_unregister_display(struct omap_dss_device *dssdev);
>
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 04/14] drm/omap: add framedone interrupt support |
| Message-ID | <u6PuP-83g-35@gated-at.bofh.it> |
| In reply to | #1694928 |
This prepares framedone interrupt handling for
manual display update support.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 48 +++++++++++++++++++++++++++++++++++++
drivers/gpu/drm/omapdrm/omap_drv.h | 2 ++
drivers/gpu/drm/omapdrm/omap_irq.c | 24 +++++++++++++++++++
3 files changed, 74 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index dd0ef40ca469..404652ad8a6d 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -42,6 +42,9 @@ struct omap_crtc {
bool pending;
wait_queue_head_t pending_wait;
struct drm_pending_vblank_event *event;
+
+ void (*framedone_handler)(void *);
+ void *framedone_handler_data;
};
/* -----------------------------------------------------------------------------
@@ -238,6 +241,17 @@ static int omap_crtc_dss_register_framedone(
enum omap_channel channel,
void (*handler)(void *), void *data)
{
+ struct omap_crtc *omap_crtc = omap_crtcs[channel];
+ struct drm_device *dev = omap_crtc->base.dev;
+
+ if (omap_crtc->framedone_handler)
+ return -EBUSY;
+
+ dev_dbg(dev->dev, "register framedone %s", omap_crtc->name);
+
+ omap_crtc->framedone_handler = handler;
+ omap_crtc->framedone_handler_data = data;
+
return 0;
}
@@ -245,6 +259,16 @@ static void omap_crtc_dss_unregister_framedone(
enum omap_channel channel,
void (*handler)(void *), void *data)
{
+ struct omap_crtc *omap_crtc = omap_crtcs[channel];
+ struct drm_device *dev = omap_crtc->base.dev;
+
+ dev_dbg(dev->dev, "unregister framedone %s", omap_crtc->name);
+
+ WARN_ON(omap_crtc->framedone_handler != handler);
+ WARN_ON(omap_crtc->framedone_handler_data != data);
+
+ omap_crtc->framedone_handler = NULL;
+ omap_crtc->framedone_handler_data = NULL;
}
static const struct dss_mgr_ops mgr_ops = {
@@ -312,6 +336,30 @@ void omap_crtc_vblank_irq(struct drm_crtc *crtc)
DBG("%s: apply done", omap_crtc->name);
}
+void omap_crtc_framedone_irq(struct drm_crtc *crtc, uint32_t irqstatus)
+{
+ struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+
+ if (!omap_crtc->framedone_handler) {
+ dev_warn(omap_crtc->base.dev->dev, "no framedone handler?");
+ return;
+ }
+
+ omap_crtc->framedone_handler(omap_crtc->framedone_handler_data);
+
+ spin_lock(&crtc->dev->event_lock);
+ /* Send the vblank event if one has been requested. */
+ if (omap_crtc->event) {
+ drm_crtc_send_vblank_event(crtc, omap_crtc->event);
+ omap_crtc->event = NULL;
+ }
+ omap_crtc->pending = false;
+ spin_unlock(&crtc->dev->event_lock);
+
+ /* Wake up omap_atomic_complete. */
+ wake_up(&omap_crtc->pending_wait);
+}
+
static void omap_crtc_write_crtc_properties(struct drm_crtc *crtc)
{
struct omap_drm_private *priv = crtc->dev->dev_private;
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 4bd1e9070b31..22f3d94994d2 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -97,6 +97,7 @@ void omap_gem_describe_objects(struct list_head *list, struct seq_file *m);
int omap_gem_resume(struct device *dev);
#endif
+int omap_irq_enable_framedone(struct drm_crtc *crtc, bool enable);
int omap_irq_enable_vblank(struct drm_crtc *crtc);
void omap_irq_disable_vblank(struct drm_crtc *crtc);
void omap_drm_irq_uninstall(struct drm_device *dev);
@@ -124,6 +125,7 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
int omap_crtc_wait_pending(struct drm_crtc *crtc);
void omap_crtc_error_irq(struct drm_crtc *crtc, uint32_t irqstatus);
void omap_crtc_vblank_irq(struct drm_crtc *crtc);
+void omap_crtc_framedone_irq(struct drm_crtc *crtc, uint32_t irqstatus);
struct drm_plane *omap_plane_init(struct drm_device *dev,
int idx, enum drm_plane_type type,
diff --git a/drivers/gpu/drm/omapdrm/omap_irq.c b/drivers/gpu/drm/omapdrm/omap_irq.c
index 013b0bba712f..301c0e7a70b7 100644
--- a/drivers/gpu/drm/omapdrm/omap_irq.c
+++ b/drivers/gpu/drm/omapdrm/omap_irq.c
@@ -87,6 +87,27 @@ int omap_irq_wait(struct drm_device *dev, struct omap_irq_wait *wait,
return ret == 0 ? -1 : 0;
}
+int omap_irq_enable_framedone(struct drm_crtc *crtc, bool enable)
+{
+ struct drm_device *dev = crtc->dev;
+ struct omap_drm_private *priv = dev->dev_private;
+ unsigned long flags;
+ enum omap_channel channel = omap_crtc_channel(crtc);
+ int framedone_irq = priv->dispc_ops->mgr_get_framedone_irq(channel);
+
+ DBG("dev=%p, crtc=%u, enable=%d", dev, channel, enable);
+
+ spin_lock_irqsave(&priv->wait_lock, flags);
+ if (enable)
+ priv->irq_mask |= framedone_irq;
+ else
+ priv->irq_mask &= ~framedone_irq;
+ omap_irq_update(dev);
+ spin_unlock_irqrestore(&priv->wait_lock, flags);
+
+ return 0;
+}
+
/**
* enable_vblank - enable vblank interrupt events
* @dev: DRM device
@@ -217,6 +238,9 @@ static irqreturn_t omap_irq_handler(int irq, void *arg)
if (irqstatus & priv->dispc_ops->mgr_get_sync_lost_irq(channel))
omap_crtc_error_irq(crtc, irqstatus);
+
+ if (irqstatus & priv->dispc_ops->mgr_get_framedone_irq(channel))
+ omap_crtc_framedone_irq(crtc, irqstatus);
}
omap_irq_ocp_error_handler(dev, irqstatus);
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 05/14] drm/omap: add manual update detection helper |
| Message-ID | <u6PuP-83g-41@gated-at.bofh.it> |
| In reply to | #1694928 |
In preparation for manually updated display support, such as DSI
command mode panels, this adds a simple helper to see if a connector
is manually updated.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/omap_connector.c | 8 ++++++++
drivers/gpu/drm/omapdrm/omap_drv.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index c24b6b783e9a..5e941305ab1b 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -42,6 +42,14 @@ bool omap_connector_get_hdmi_mode(struct drm_connector *connector)
return omap_connector->hdmi_mode;
}
+bool omap_connector_get_manually_updated(struct drm_connector *connector)
+{
+ struct omap_connector *omap_connector = to_omap_connector(connector);
+
+ return !!(omap_connector->dssdev->caps &
+ OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE);
+}
+
static enum drm_connector_status omap_connector_detect(
struct drm_connector *connector, bool force)
{
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index 22f3d94994d2..f6c48f254c9b 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -142,6 +142,7 @@ struct drm_connector *omap_connector_init(struct drm_device *dev,
struct drm_encoder *omap_connector_attached_encoder(
struct drm_connector *connector);
bool omap_connector_get_hdmi_mode(struct drm_connector *connector);
+bool omap_connector_get_manually_updated(struct drm_connector *connector);
struct drm_framebuffer *omap_framebuffer_create(struct drm_device *dev,
struct drm_file *file, const struct drm_mode_fb_cmd2 *mode_cmd);
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 06/14] drm/omap: add support for manually updated displays |
| Message-ID | <u6PuO-83g-29@gated-at.bofh.it> |
| In reply to | #1694928 |
This adds the required infrastructure for manually
updated displays, such as DSI command mode panels.
While those panels often support partial updates
we currently always do a full refresh. Display
will be refreshed when something calls the dirty
callback, such as libdrm's drmModeDirtyFB().
This is currently being implemented for the kernel
console and for Xorg. Weston currently does not
implement this and is known not to work on manually
updated displays.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/omap_crtc.c | 110 +++++++++++++++++++++++++++++++++---
drivers/gpu/drm/omapdrm/omap_drv.h | 1 +
drivers/gpu/drm/omapdrm/omap_fb.c | 20 +++++++
3 files changed, 123 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 404652ad8a6d..35a40271d1cb 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -42,6 +42,7 @@ struct omap_crtc {
bool pending;
wait_queue_head_t pending_wait;
struct drm_pending_vblank_event *event;
+ struct delayed_work update_work;
void (*framedone_handler)(void *);
void *framedone_handler_data;
@@ -133,6 +134,28 @@ static void omap_crtc_dss_disconnect(enum omap_channel channel,
static void omap_crtc_dss_start_update(enum omap_channel channel)
{
+ struct omap_crtc *omap_crtc = omap_crtcs[channel];
+ struct omap_drm_private *priv = omap_crtc->base.dev->dev_private;
+
+ priv->dispc_ops->mgr_enable(channel, true);
+}
+
+static bool omap_crtc_is_manually_updated(struct drm_crtc *crtc)
+{
+ struct drm_connector *connector;
+ struct drm_connector_list_iter conn_iter;
+ bool result = false;
+
+ drm_connector_list_iter_begin(crtc->dev, &conn_iter);
+ drm_for_each_connector_iter(connector, &conn_iter) {
+ if (connector->state->crtc != crtc)
+ continue;
+ result = omap_connector_get_manually_updated(connector);
+ break;
+ }
+ drm_connector_list_iter_end(&conn_iter);
+
+ return result;
}
/* Called only from the encoder enable/disable and suspend/resume handlers. */
@@ -144,12 +167,17 @@ static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable)
enum omap_channel channel = omap_crtc->channel;
struct omap_irq_wait *wait;
u32 framedone_irq, vsync_irq;
+ bool is_manual = omap_crtc_is_manually_updated(crtc);
+ enum omap_display_type type = omap_crtc_output[channel]->output_type;
int ret;
if (WARN_ON(omap_crtc->enabled == enable))
return;
- if (omap_crtc_output[channel]->output_type == OMAP_DISPLAY_TYPE_HDMI) {
+ if (is_manual)
+ omap_irq_enable_framedone(crtc, enable);
+
+ if (is_manual || type == OMAP_DISPLAY_TYPE_HDMI) {
priv->dispc_ops->mgr_enable(channel, enable);
omap_crtc->enabled = enable;
return;
@@ -200,7 +228,6 @@ static void omap_crtc_set_enabled(struct drm_crtc *crtc, bool enable)
}
}
-
static int omap_crtc_dss_enable(enum omap_channel channel)
{
struct omap_crtc *omap_crtc = omap_crtcs[channel];
@@ -360,6 +387,53 @@ void omap_crtc_framedone_irq(struct drm_crtc *crtc, uint32_t irqstatus)
wake_up(&omap_crtc->pending_wait);
}
+void omap_crtc_flush(struct drm_crtc *crtc)
+{
+ struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+
+ if (!omap_crtc_is_manually_updated(crtc))
+ return;
+
+ if (!delayed_work_pending(&omap_crtc->update_work))
+ schedule_delayed_work(&omap_crtc->update_work, 0);
+}
+
+static void omap_crtc_manual_display_update(struct work_struct *data)
+{
+ struct omap_crtc *omap_crtc =
+ container_of(data, struct omap_crtc, update_work.work);
+ struct omap_dss_device *dssdev = omap_crtc_output[omap_crtc->channel];
+ struct drm_device *dev = omap_crtc->base.dev;
+ struct omap_dss_driver *dssdrv;
+ int ret, width, height;
+
+ if (!dssdev || !dssdev->dst) {
+ dev_err_once(dev->dev, "missing dssdev!");
+ return;
+ }
+
+ dssdev = dssdev->dst;
+ dssdrv = dssdev->driver;
+
+ if (!dssdrv || !dssdrv->update) {
+ dev_err_once(dev->dev, "incorrect dssdrv!");
+ return;
+ }
+
+ if (dssdrv->sync)
+ dssdrv->sync(dssdev);
+
+ width = dssdev->panel.vm.hactive;
+ height = dssdev->panel.vm.vactive;
+ ret = dssdrv->update(dssdev, 0, 0, width, height);
+ if (ret < 0) {
+ spin_lock_irq(&dev->event_lock);
+ omap_crtc->pending = false;
+ spin_unlock_irq(&dev->event_lock);
+ wake_up(&omap_crtc->pending_wait);
+ }
+}
+
static void omap_crtc_write_crtc_properties(struct drm_crtc *crtc)
{
struct omap_drm_private *priv = crtc->dev->dev_private;
@@ -411,6 +485,10 @@ static void omap_crtc_enable(struct drm_crtc *crtc)
DBG("%s", omap_crtc->name);
+ /* manual updated display will not trigger vsync irq */
+ if (omap_crtc_is_manually_updated(crtc))
+ return;
+
spin_lock_irq(&crtc->dev->event_lock);
drm_crtc_vblank_on(crtc);
ret = drm_crtc_vblank_get(crtc);
@@ -423,6 +501,7 @@ static void omap_crtc_enable(struct drm_crtc *crtc)
static void omap_crtc_disable(struct drm_crtc *crtc)
{
struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+ struct drm_device *dev = crtc->dev;
DBG("%s", omap_crtc->name);
@@ -433,6 +512,11 @@ static void omap_crtc_disable(struct drm_crtc *crtc)
}
spin_unlock_irq(&crtc->dev->event_lock);
+ cancel_delayed_work(&omap_crtc->update_work);
+
+ if (!omap_crtc_wait_pending(crtc))
+ dev_warn(dev->dev, "manual display update did not finish!");
+
drm_crtc_vblank_off(crtc);
}
@@ -535,13 +619,20 @@ static void omap_crtc_atomic_flush(struct drm_crtc *crtc,
DBG("%s: GO", omap_crtc->name);
- ret = drm_crtc_vblank_get(crtc);
- WARN_ON(ret != 0);
+ if (!omap_crtc_is_manually_updated(crtc)) {
+ ret = drm_crtc_vblank_get(crtc);
+ WARN_ON(ret != 0);
- spin_lock_irq(&crtc->dev->event_lock);
- priv->dispc_ops->mgr_go(omap_crtc->channel);
- omap_crtc_arm_event(crtc);
- spin_unlock_irq(&crtc->dev->event_lock);
+ spin_lock_irq(&crtc->dev->event_lock);
+ priv->dispc_ops->mgr_go(omap_crtc->channel);
+ omap_crtc_arm_event(crtc);
+ spin_unlock_irq(&crtc->dev->event_lock);
+ } else {
+ spin_lock_irq(&crtc->dev->event_lock);
+ omap_crtc_flush(crtc);
+ omap_crtc_arm_event(crtc);
+ spin_unlock_irq(&crtc->dev->event_lock);
+ }
}
static bool omap_crtc_is_plane_prop(struct drm_crtc *crtc,
@@ -677,6 +768,9 @@ struct drm_crtc *omap_crtc_init(struct drm_device *dev,
omap_crtc->channel = channel;
omap_crtc->name = channel_names[channel];
+ INIT_DELAYED_WORK(&omap_crtc->update_work,
+ omap_crtc_manual_display_update);
+
ret = drm_crtc_init_with_planes(dev, crtc, plane, NULL,
&omap_crtc_funcs, NULL);
if (ret < 0) {
diff --git a/drivers/gpu/drm/omapdrm/omap_drv.h b/drivers/gpu/drm/omapdrm/omap_drv.h
index f6c48f254c9b..3cb9f9afba16 100644
--- a/drivers/gpu/drm/omapdrm/omap_drv.h
+++ b/drivers/gpu/drm/omapdrm/omap_drv.h
@@ -126,6 +126,7 @@ int omap_crtc_wait_pending(struct drm_crtc *crtc);
void omap_crtc_error_irq(struct drm_crtc *crtc, uint32_t irqstatus);
void omap_crtc_vblank_irq(struct drm_crtc *crtc);
void omap_crtc_framedone_irq(struct drm_crtc *crtc, uint32_t irqstatus);
+void omap_crtc_flush(struct drm_crtc *crtc);
struct drm_plane *omap_plane_init(struct drm_device *dev,
int idx, enum drm_plane_type type,
diff --git a/drivers/gpu/drm/omapdrm/omap_fb.c b/drivers/gpu/drm/omapdrm/omap_fb.c
index ddf7a457951b..423709132223 100644
--- a/drivers/gpu/drm/omapdrm/omap_fb.c
+++ b/drivers/gpu/drm/omapdrm/omap_fb.c
@@ -97,8 +97,28 @@ static void omap_framebuffer_destroy(struct drm_framebuffer *fb)
kfree(omap_fb);
}
+static int omap_framebuffer_dirty(struct drm_framebuffer *fb,
+ struct drm_file *file_priv,
+ unsigned flags, unsigned color,
+ struct drm_clip_rect *clips,
+ unsigned num_clips)
+{
+ struct drm_connector *connector = NULL;
+
+ drm_modeset_lock_all(fb->dev);
+
+ while ((connector = omap_framebuffer_get_next_connector(fb, connector)))
+ if (connector->encoder && connector->encoder->crtc)
+ omap_crtc_flush(connector->encoder->crtc);
+
+ drm_modeset_unlock_all(fb->dev);
+
+ return 0;
+}
+
static const struct drm_framebuffer_funcs omap_framebuffer_funcs = {
.create_handle = omap_framebuffer_create_handle,
+ .dirty = omap_framebuffer_dirty,
.destroy = omap_framebuffer_destroy,
};
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 02/14] drm/omap: drop incorrect comment |
| Message-ID | <u6PuP-83g-43@gated-at.bofh.it> |
| In reply to | #1694928 |
The wrappers have been removed in commit 5a35876e2830
(drm: omapdrm: Remove manual update display support)
and will not be reintroduced, since the normal sys
functions properly call the dirty callback.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
index daf81a0a2899..929a3ef0fba0 100644
--- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
+++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
@@ -84,9 +84,6 @@ static struct fb_ops omap_fb_ops = {
.owner = THIS_MODULE,
DRM_FB_HELPER_DEFAULT_OPS,
- /* Note: to properly handle manual update displays, we wrap the
- * basic fbdev ops which write to the framebuffer
- */
.fb_read = drm_fb_helper_sys_read,
.fb_write = drm_fb_helper_sys_write,
.fb_fillrect = drm_fb_helper_sys_fillrect,
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-07-26 12:50 +0200 |
| Subject | Re: [PATCHv1 02/14] drm/omap: drop incorrect comment |
| Message-ID | <u7s37-7CE-1@gated-at.bofh.it> |
| In reply to | #1694936 |
[Multipart message — attachments visible in raw view] — view raw
On Mon 2017-07-24 19:32:59, Sebastian Reichel wrote:
> The wrappers have been removed in commit 5a35876e2830
> (drm: omapdrm: Remove manual update display support)
> and will not be reintroduced, since the normal sys
> functions properly call the dirty callback.
>
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Acked-by: Pavel Machek <pavel@ucw.cz>
> ---
> drivers/gpu/drm/omapdrm/omap_fbdev.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/omap_fbdev.c b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> index daf81a0a2899..929a3ef0fba0 100644
> --- a/drivers/gpu/drm/omapdrm/omap_fbdev.c
> +++ b/drivers/gpu/drm/omapdrm/omap_fbdev.c
> @@ -84,9 +84,6 @@ static struct fb_ops omap_fb_ops = {
> .owner = THIS_MODULE,
> DRM_FB_HELPER_DEFAULT_OPS,
>
> - /* Note: to properly handle manual update displays, we wrap the
> - * basic fbdev ops which write to the framebuffer
> - */
> .fb_read = drm_fb_helper_sys_read,
> .fb_write = drm_fb_helper_sys_write,
> .fb_fillrect = drm_fb_helper_sys_fillrect,
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 07/14] drm/omap: add support for physical size hints from display drivers |
| Message-ID | <u6PuP-83g-45@gated-at.bofh.it> |
| In reply to | #1694928 |
While physical size information is automatically parsed for EDID
based displays, we need to provide it manually for displays providing
one fixed mode.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/dss/omapdss.h | 2 ++
drivers/gpu/drm/omapdrm/omap_connector.c | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/dss/omapdss.h b/drivers/gpu/drm/omapdrm/dss/omapdss.h
index 4e619ff360ae..530365e9c48d 100644
--- a/drivers/gpu/drm/omapdrm/dss/omapdss.h
+++ b/drivers/gpu/drm/omapdrm/dss/omapdss.h
@@ -560,6 +560,8 @@ struct omap_dss_driver {
struct videomode *vm);
void (*get_timings)(struct omap_dss_device *dssdev,
struct videomode *vm);
+ void (*get_size)(struct omap_dss_device *dssdev,
+ unsigned int *width, unsigned int *height);
int (*set_wss)(struct omap_dss_device *dssdev, u32 wss);
u32 (*get_wss)(struct omap_dss_device *dssdev);
diff --git a/drivers/gpu/drm/omapdrm/omap_connector.c b/drivers/gpu/drm/omapdrm/omap_connector.c
index 5e941305ab1b..b2678105aaf2 100644
--- a/drivers/gpu/drm/omapdrm/omap_connector.c
+++ b/drivers/gpu/drm/omapdrm/omap_connector.c
@@ -136,6 +136,12 @@ static int omap_connector_get_modes(struct drm_connector *connector)
drm_mode_set_name(mode);
drm_mode_probed_add(connector, mode);
+ if (dssdrv->get_size) {
+ dssdrv->get_size(dssdev,
+ &connector->display_info.width_mm,
+ &connector->display_info.height_mm);
+ }
+
n = 1;
}
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-07-26 12:50 +0200 |
| Subject | Re: [PATCHv1 07/14] drm/omap: add support for physical size hints from display drivers |
| Message-ID | <u7s38-7CE-33@gated-at.bofh.it> |
| In reply to | #1694937 |
[Multipart message — attachments visible in raw view] — view raw
On Mon 2017-07-24 19:33:04, Sebastian Reichel wrote: > While physical size information is automatically parsed for EDID > based displays, we need to provide it manually for displays providing > one fixed mode. > > Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 03/14] drm/omap: plane: update fifo size on ovl setup |
| Message-ID | <u6PuP-83g-47@gated-at.bofh.it> |
| In reply to | #1694928 |
This is a workaround for a hardware bug occuring on OMAP3
with manually updated panels. Details about the HW bug are
unknown to me, but without this fix the panel refresh does
not work at all on Nokia N950.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
drivers/gpu/drm/omapdrm/dss/dispc.c | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/drivers/gpu/drm/omapdrm/dss/dispc.c b/drivers/gpu/drm/omapdrm/dss/dispc.c
index fd7504b37e3b..b6dca5ee34d4 100644
--- a/drivers/gpu/drm/omapdrm/dss/dispc.c
+++ b/drivers/gpu/drm/omapdrm/dss/dispc.c
@@ -1398,6 +1398,18 @@ void dispc_ovl_compute_fifo_thresholds(enum omap_plane_id plane,
}
}
+void dispc_ovl_set_manual_fifo_threshold(enum omap_plane_id plane)
+{
+ u32 fifo_low, fifo_high;
+ bool use_fifo_merge = false;
+ bool use_manual_update = true;
+
+ dispc_ovl_compute_fifo_thresholds(plane, &fifo_low, &fifo_high,
+ use_fifo_merge, use_manual_update);
+
+ dispc_ovl_set_fifo_threshold(plane, fifo_low, fifo_high);
+}
+
static void dispc_ovl_set_mflag(enum omap_plane_id plane, bool enable)
{
int bit;
@@ -2566,6 +2578,10 @@ static int dispc_ovl_setup(enum omap_plane_id plane,
oi->zorder, oi->pre_mult_alpha, oi->global_alpha,
oi->rotation_type, replication, vm, mem_to_mem);
+ /* manual mode needs other fifo thresholds */
+ if (mgr_fld_read(channel, DISPC_MGR_FLD_STALLMODE))
+ dispc_ovl_set_manual_fifo_threshold(plane);
+
return r;
}
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 14/14] ARM: dts: n950: add display support |
| Message-ID | <u6PuR-83g-61@gated-at.bofh.it> |
| In reply to | #1694928 |
Add basic panel support for the Nokia N950. It must be tweaked a
little bit later, since the panel was built into the device
upside-down. Also the first 5 and the last 5 pixels are covered
by plastic.
Signed-off-By: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
arch/arm/boot/dts/omap3-n950.dts | 88 ++++++++++++++++++++++++++++++++++++++++
1 file changed, 88 insertions(+)
diff --git a/arch/arm/boot/dts/omap3-n950.dts b/arch/arm/boot/dts/omap3-n950.dts
index 646601a3ebd8..ef70aae99d1b 100644
--- a/arch/arm/boot/dts/omap3-n950.dts
+++ b/arch/arm/boot/dts/omap3-n950.dts
@@ -51,6 +51,26 @@
};
};
+&omap3_pmx_core {
+ dsi_pins: pinmux_dsi_pins {
+ pinctrl-single,pins = <
+ OMAP3_CORE1_IOPAD(0x20dc, PIN_OUTPUT | MUX_MODE1) /* dsi_dx0 - data0+ */
+ OMAP3_CORE1_IOPAD(0x20de, PIN_OUTPUT | MUX_MODE1) /* dsi_dy0 - data0- */
+ OMAP3_CORE1_IOPAD(0x20e0, PIN_OUTPUT | MUX_MODE1) /* dsi_dx1 - clk+ */
+ OMAP3_CORE1_IOPAD(0x20e2, PIN_OUTPUT | MUX_MODE1) /* dsi_dy1 - clk- */
+ OMAP3_CORE1_IOPAD(0x20e4, PIN_OUTPUT | MUX_MODE1) /* dsi_dx2 - data1+ */
+ OMAP3_CORE1_IOPAD(0x20e6, PIN_OUTPUT | MUX_MODE1) /* dsi_dy2 - data1- */
+ >;
+ };
+
+ display_pins: pinmux_display_pins {
+ pinctrl-single,pins = <
+ OMAP3_CORE1_IOPAD(0x20ca, PIN_INPUT | MUX_MODE4) /* gpio 62 - display te */
+ OMAP3_CORE1_IOPAD(0x20fe, PIN_OUTPUT | MUX_MODE4) /* gpio 87 - display reset */
+ >;
+ };
+};
+
&i2c2 {
smia_1: camera@10 {
compatible = "nokia,smia";
@@ -185,3 +205,71 @@
st,max-limit-y = <32>;
st,max-limit-z = <32>;
};
+
+&dss {
+ status = "ok";
+
+ vdda_video-supply = <&vdac>;
+};
+
+&dsi {
+ status = "ok";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&dsi_pins>;
+
+ vdd-supply = <&vpll2>;
+
+ port {
+ dsi_out_ep: endpoint {
+ remote-endpoint = <&lcd0_in>;
+ lanes = <2 3 0 1 4 5>;
+ };
+ };
+
+ lcd0: display {
+ compatible = "nokia,himalaya", "panel-dsi-cm";
+ label = "lcd0";
+
+ pinctrl-names = "default";
+ pinctrl-0 = <&display_pins>;
+
+ vpnl-supply = <&vmmc2>;
+ vddi-supply = <&vio>;
+
+ reset-gpios = <&gpio3 23 GPIO_ACTIVE_HIGH>; /* 87 */
+ te-gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>; /* 62 */
+
+ width-mm = <49>; /* 48.960 mm */
+ height-mm = <88>; /* 88.128 mm */
+
+ /* TODO:
+ * - panel is upside-down
+ * - top + bottom 5px are not visible
+ */
+ panel-timing {
+ clock-frequency = <0>; /* Calculated by dsi */
+
+ hback-porch = <2>;
+ hactive = <480>;
+ hfront-porch = <0>;
+ hsync-len = <2>;
+
+ vback-porch = <1>;
+ vactive = <864>;
+ vfront-porch = <0>;
+ vsync-len = <1>;
+
+ hsync-active = <0>;
+ vsync-active = <0>;
+ de-active = <1>;
+ pixelclk-active = <1>;
+ };
+
+ port {
+ lcd0_in: endpoint {
+ remote-endpoint = <&dsi_out_ep>;
+ };
+ };
+ };
+};
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Pavel Machek <pavel@ucw.cz> |
|---|---|
| Date | 2017-07-26 12:50 +0200 |
| Subject | Re: [PATCHv1 14/14] ARM: dts: n950: add display support |
| Message-ID | <u7s39-7CE-37@gated-at.bofh.it> |
| In reply to | #1694942 |
[Multipart message — attachments visible in raw view] — view raw
On Mon 2017-07-24 19:33:11, Sebastian Reichel wrote: > Add basic panel support for the Nokia N950. It must be tweaked a > little bit later, since the panel was built into the device > upside-down. Also the first 5 and the last 5 pixels are covered > by plastic. > > Signed-off-By: Sebastian Reichel <sebastian.reichel@collabora.co.uk> Acked-by: Pavel Machek <pavel@ucw.cz> -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[toc] | [prev] | [next] | [standalone]
| From | Sebastian Reichel <sebastian.reichel@collabora.co.uk> |
|---|---|
| Date | 2017-07-24 19:40 +0200 |
| Subject | [PATCHv1 13/14] ARM: dts: omap4-droid4: improve LCD description |
| Message-ID | <u6PuR-83g-63@gated-at.bofh.it> |
| In reply to | #1694928 |
This improves LCD support for the Droid 4.
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
---
arch/arm/boot/dts/omap4-droid4-xt894.dts | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/arch/arm/boot/dts/omap4-droid4-xt894.dts b/arch/arm/boot/dts/omap4-droid4-xt894.dts
index 3af4905a6b61..942bb6ec99e5 100644
--- a/arch/arm/boot/dts/omap4-droid4-xt894.dts
+++ b/arch/arm/boot/dts/omap4-droid4-xt894.dts
@@ -192,6 +192,10 @@
vddi-supply = <&lcd_regulator>;
reset-gpios = <&gpio4 5 GPIO_ACTIVE_HIGH>; /* gpio101 */
+ width-mm = <50>;
+ height-mm = <89>;
+ backlight = <&lcd_backlight>;
+
panel-timing {
clock-frequency = <0>; /* Calculated by dsi */
@@ -361,7 +365,7 @@
enable-gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
- backlight {
+ lcd_backlight: backlight {
compatible = "ti,lm3532-backlight";
lcd {
--
2.13.2
[toc] | [prev] | [next] | [standalone]
| From | Tony Lindgren <tony@atomide.com> |
|---|---|
| Date | 2017-07-27 14:10 +0200 |
| Message-ID | <u7PM6-5VR-31@gated-at.bofh.it> |
| In reply to | #1694928 |
* Sebastian Reichel <sebastian.reichel@collabora.co.uk> [170724 10:34]: > Hi, > > This adds support for command mode DSI panels to > omapdrm. I tested the patches on Nokia N950 (omap3) > and Motorola Droid 4 (omap4). This is basically > PATCHv3 of my series adding N950 display support, > but I started from scratch without reverting the > removal of manual display update support. Works for me: Tested-by: Tony Lindgren <tony@atomide.com>
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web