All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	Bryan Wu <bryan.wu@canonical.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Marcus Lorentzon <marcus.lorentzon@linaro.org>,
	Sumit Semwal <sumit.semwal@ti.com>, Archit Taneja <archit@ti.com>,
	Sebastien Guiriec <s-guiriec@ti.com>,
	Inki Dae <inki.dae@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC 3/5] video: panel: Add MIPI DBI bus support
Date: Fri, 17 Aug 2012 12:03:02 +0300	[thread overview]
Message-ID: <1345194182.3158.66.camel@deskari> (raw)
In-Reply-To: <1345164583-18924-4-git-send-email-laurent.pinchart@ideasonboard.com>

[-- Attachment #1: Type: text/plain, Size: 3118 bytes --]

On Fri, 2012-08-17 at 02:49 +0200, Laurent Pinchart wrote:

> +/* -----------------------------------------------------------------------------
> + * Bus operations
> + */
> +
> +void panel_dbi_write_command(struct panel_dbi_device *dev, unsigned long cmd)
> +{
> +	dev->bus->ops->write_command(dev->bus, cmd);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_write_command);
> +
> +void panel_dbi_write_data(struct panel_dbi_device *dev, unsigned long data)
> +{
> +	dev->bus->ops->write_data(dev->bus, data);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_write_data);
> +
> +unsigned long panel_dbi_read_data(struct panel_dbi_device *dev)
> +{
> +	return dev->bus->ops->read_data(dev->bus);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_read_data);

I'm not that familiar with how to implement bus drivers, can you
describe in pseudo code how the SoC's DBI driver would register these?


I think write/read data functions are a bit limited. Shouldn't they be
something like write_data(const u8 *buf, int size) and read_data(u8
*buf, int len)?

Something that's totally missing is configuring the DBI bus. There are a
bunch of timing related values that need to be configured. See
include/video/omapdss.h struct rfbi_timings. While the struct is OMAP
specific, if I recall right most of the values match to the MIPI DBI
spec.

And this makes me wonder, you use DBI bus for SYS-80 panel. The busses
may look similar in operation, but are they really so similar when you
take into account the timings (and perhaps something else, it's been
years since I read the MIPI DBI spec)?


Then there's the start_transfer. This is something I'm not sure what is
the best way to handle it, but the same problems that I mentioned in the
previous post related to enable apply here also. For example, what if
the panel needs to be update in two parts? This is done in Nokia N9.
From panel's perspective, it'd be best to handle it somewhat like this
(although asynchronously, probably):

write_update_area(0, 0, xres, yres / 2);
write_memory_start()
start_pixel_transfer();

wait_transfer_done();

write_update_area(0, yres / 2, xres, yres / 2);
write_memory_start()
start_pixel_transfer();

Why I said I'm not sure about this is that it does complicate things, as
the actual pixel data often comes from the display subsystem hardware,
which should probably be controlled by the display driver.


I think there also needs to be some kind of transfer_done notifier, for
both the display driver and the panel driver. Although if the display
driver handles starting the actual pixel transfer, then it'll get the
transfer_done via whatever interrupt the SoC has.


Also as food for thought, videomode timings does not really make sense
for DBI panels, at least when you just consider the DBI side. There's
really just the resolution of the display, and then the DBI timings. No
pck, syncs, etc. Of course in the end there's the actual panel, which
does have these video timings. But often they cannot be configured, and
often you don't even know them as the specs don't tell them.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Tomi Valkeinen <tomi.valkeinen@ti.com>
To: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org,
	linux-leds@vger.kernel.org, linux-media@vger.kernel.org,
	Bryan Wu <bryan.wu@canonical.com>,
	Richard Purdie <rpurdie@rpsys.net>,
	Marcus Lorentzon <marcus.lorentzon@linaro.org>,
	Sumit Semwal <sumit.semwal@ti.com>, Archit Taneja <archit@ti.com>,
	Sebastien Guiriec <s-guiriec@ti.com>,
	Inki Dae <inki.dae@samsung.com>,
	Kyungmin Park <kyungmin.park@samsung.com>
Subject: Re: [RFC 3/5] video: panel: Add MIPI DBI bus support
Date: Fri, 17 Aug 2012 09:03:02 +0000	[thread overview]
Message-ID: <1345194182.3158.66.camel@deskari> (raw)
In-Reply-To: <1345164583-18924-4-git-send-email-laurent.pinchart@ideasonboard.com>

[-- Attachment #1: Type: text/plain, Size: 3118 bytes --]

On Fri, 2012-08-17 at 02:49 +0200, Laurent Pinchart wrote:

> +/* -----------------------------------------------------------------------------
> + * Bus operations
> + */
> +
> +void panel_dbi_write_command(struct panel_dbi_device *dev, unsigned long cmd)
> +{
> +	dev->bus->ops->write_command(dev->bus, cmd);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_write_command);
> +
> +void panel_dbi_write_data(struct panel_dbi_device *dev, unsigned long data)
> +{
> +	dev->bus->ops->write_data(dev->bus, data);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_write_data);
> +
> +unsigned long panel_dbi_read_data(struct panel_dbi_device *dev)
> +{
> +	return dev->bus->ops->read_data(dev->bus);
> +}
> +EXPORT_SYMBOL_GPL(panel_dbi_read_data);

I'm not that familiar with how to implement bus drivers, can you
describe in pseudo code how the SoC's DBI driver would register these?


I think write/read data functions are a bit limited. Shouldn't they be
something like write_data(const u8 *buf, int size) and read_data(u8
*buf, int len)?

Something that's totally missing is configuring the DBI bus. There are a
bunch of timing related values that need to be configured. See
include/video/omapdss.h struct rfbi_timings. While the struct is OMAP
specific, if I recall right most of the values match to the MIPI DBI
spec.

And this makes me wonder, you use DBI bus for SYS-80 panel. The busses
may look similar in operation, but are they really so similar when you
take into account the timings (and perhaps something else, it's been
years since I read the MIPI DBI spec)?


Then there's the start_transfer. This is something I'm not sure what is
the best way to handle it, but the same problems that I mentioned in the
previous post related to enable apply here also. For example, what if
the panel needs to be update in two parts? This is done in Nokia N9.
From panel's perspective, it'd be best to handle it somewhat like this
(although asynchronously, probably):

write_update_area(0, 0, xres, yres / 2);
write_memory_start()
start_pixel_transfer();

wait_transfer_done();

write_update_area(0, yres / 2, xres, yres / 2);
write_memory_start()
start_pixel_transfer();

Why I said I'm not sure about this is that it does complicate things, as
the actual pixel data often comes from the display subsystem hardware,
which should probably be controlled by the display driver.


I think there also needs to be some kind of transfer_done notifier, for
both the display driver and the panel driver. Although if the display
driver handles starting the actual pixel transfer, then it'll get the
transfer_done via whatever interrupt the SoC has.


Also as food for thought, videomode timings does not really make sense
for DBI panels, at least when you just consider the DBI side. There's
really just the resolution of the display, and then the DBI timings. No
pck, syncs, etc. Of course in the end there's the actual panel, which
does have these video timings. But often they cannot be configured, and
often you don't even know them as the specs don't tell them.

 Tomi


[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-08-17  9:03 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-17  0:49 [RFC 0/5] Generic panel framework Laurent Pinchart
2012-08-17  0:49 ` Laurent Pinchart
2012-08-17  0:49 ` [RFC 1/5] video: Add generic display panel core Laurent Pinchart
2012-08-17  0:49   ` Laurent Pinchart
2012-09-04  9:24   ` Sascha Hauer
2012-09-04  9:24     ` Sascha Hauer
2012-09-13  1:40     ` Laurent Pinchart
2012-09-13  1:40       ` Laurent Pinchart
2012-09-13 11:29       ` Sascha Hauer
2012-09-13 11:29         ` Sascha Hauer
2012-09-13 19:32         ` Robert Schwebel
2012-09-13 19:32           ` Robert Schwebel
2012-08-17  0:49 ` [RFC 2/5] video: panel: Add dummy panel support Laurent Pinchart
2012-08-17  0:49   ` Laurent Pinchart
2012-08-17  0:49 ` [RFC 3/5] video: panel: Add MIPI DBI bus support Laurent Pinchart
2012-08-17  0:49   ` Laurent Pinchart
2012-08-17  9:03   ` Tomi Valkeinen [this message]
2012-08-17  9:03     ` Tomi Valkeinen
2012-08-17 10:02     ` Laurent Pinchart
2012-08-17 10:02       ` Laurent Pinchart
2012-08-17 10:51       ` Tomi Valkeinen
2012-08-17 10:51         ` Tomi Valkeinen
2012-08-17 12:33         ` Laurent Pinchart
2012-08-17 12:33           ` Laurent Pinchart
2012-08-17 13:06           ` Tomi Valkeinen
2012-08-17 13:06             ` Tomi Valkeinen
2012-08-17 14:06             ` Laurent Pinchart
2012-08-17 14:06               ` Laurent Pinchart
2012-08-17  0:49 ` [RFC 4/5] video: panel: Add R61505 panel support Laurent Pinchart
2012-08-17  0:49   ` Laurent Pinchart
2012-08-17  0:49 ` [RFC 5/5] video: panel: Add R61517 " Laurent Pinchart
2012-08-17  0:49   ` Laurent Pinchart
2012-08-17  1:33 ` [RFC 0/5] Generic panel framework Jingoo Han
2012-08-17  1:33   ` Jingoo Han
2012-08-17  8:38 ` Tomi Valkeinen
2012-08-17  8:38   ` Tomi Valkeinen
2012-08-17 11:10   ` Laurent Pinchart
2012-08-17 11:10     ` Laurent Pinchart
2012-08-17 11:42     ` Tomi Valkeinen
2012-08-17 11:42       ` Tomi Valkeinen
2012-08-18  1:16       ` Laurent Pinchart
2012-08-18  1:16         ` Laurent Pinchart
2012-08-18  1:16         ` Laurent Pinchart
2012-08-20 11:39         ` Tomi Valkeinen
2012-08-20 11:39           ` Tomi Valkeinen
2012-08-20 23:29           ` Laurent Pinchart
2012-08-20 23:29             ` Laurent Pinchart
2012-08-20 23:29             ` Laurent Pinchart
2012-08-21  5:49             ` Tomi Valkeinen
2012-08-21  5:49               ` Tomi Valkeinen
2012-08-21  9:23               ` Laurent Pinchart
2012-08-21  9:23                 ` Laurent Pinchart
2012-08-23  6:23                 ` Jun Nie
2012-08-23  6:23                   ` Jun Nie
2012-09-04  8:20                   ` Zhou Zhu
2012-09-04  8:20                     ` Zhou Zhu
2012-10-30 16:35                     ` Laurent Pinchart
2012-10-30 16:35                       ` Laurent Pinchart
2012-10-30 16:23                   ` Laurent Pinchart
2012-10-30 16:23                     ` Laurent Pinchart
2012-10-20 14:18   ` Inki Dae
2012-10-20 14:18     ` Inki Dae
2012-09-19 11:45 ` Tomi Valkeinen
2012-09-19 11:45   ` Tomi Valkeinen
2012-10-31 13:13   ` Laurent Pinchart
2012-10-31 13:13     ` Laurent Pinchart
2012-10-31 14:20     ` Tomi Valkeinen
2012-10-31 14:20       ` Tomi Valkeinen
2012-10-31 14:20       ` Tomi Valkeinen
2012-10-20 13:10 ` Inki Dae
2012-10-20 13:10   ` Inki Dae
2012-10-20 14:22   ` Inki Dae
2012-10-20 14:22     ` Inki Dae
2012-10-31 13:28   ` Laurent Pinchart
2012-10-31 13:28     ` Laurent Pinchart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1345194182.3158.66.camel@deskari \
    --to=tomi.valkeinen@ti.com \
    --cc=archit@ti.com \
    --cc=bryan.wu@canonical.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=inki.dae@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=linux-media@vger.kernel.org \
    --cc=marcus.lorentzon@linaro.org \
    --cc=rpurdie@rpsys.net \
    --cc=s-guiriec@ti.com \
    --cc=sumit.semwal@ti.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.