public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* RE: [PREVIEW] New display subsystem for OMAP2/3
@ 2008-10-01 10:51 Hiremath, Vaibhav
  2008-10-02  8:24 ` Tomi Valkeinen
  0 siblings, 1 reply; 26+ messages in thread
From: Hiremath, Vaibhav @ 2008-10-01 10:51 UTC (permalink / raw)
  To: Tomi Valkeinen
  Cc: Shah, Hardik, linux-omap@vger.kernel.org,
	video4linux-list@redhat.com

Tomi,

Have you got a chance to review the DSS library and V4l2 driver which we have posted?


Thanks,
Vaibhav Hiremath
Senior Software Engg.
Platform Support Products
Texas Instruments Inc
Ph: +91-80-25099927

> -----Original Message-----
> From: Hiremath, Vaibhav
> Sent: Monday, September 15, 2008 9:51 PM
> To: 'Tomi Valkeinen'
> Cc: Shah, Hardik; linux-omap@vger.kernel.org; video4linux-list@redhat.com
> Subject: RE: [PREVIEW] New display subsystem for OMAP2/3
> 
> 
> 
> Thanks,
> Vaibhav Hiremath
> Senior Software Engg.
> Platform Support Products
> Texas Instruments Inc
> Ph: +91-80-25099927
> TI IP Ph: 509-9927
> http://dbdwss01.india.ti.com/pspproducts/
> 
> > -----Original Message-----
> > From: linux-omap-owner@vger.kernel.org [mailto:linux-omap-owner@vger.kernel.org] On Behalf Of Tomi
> > Valkeinen
> > Sent: Monday, September 15, 2008 8:08 PM
> > To: Hiremath, Vaibhav
> > Cc: Shah, Hardik; linux-omap@vger.kernel.org; video4linux-list@redhat.com
> > Subject: RE: [PREVIEW] New display subsystem for OMAP2/3
> >
> > On Mon, 2008-09-15 at 19:02 +0530, ext Hiremath, Vaibhav wrote:
> >
> > > We more concentrated on TV and LCD interface, out design doesn't support DSI as of now. As
> > mentioned earlier it is easily extendible to support DSI.
> > >
> > > If I understand your implementation correctly, right now there is no way you can switch the
> > outputs, I mean to say from LCD to DVI. The frame buffer driver gets the handle with API
> > omap_dss_get_display, which will return pointer to omap_display for panel-sdp3430. Henceforth all
> > your functions will use omap_display configuring for LCD panel. How are you planning to add support
> > for this? Through some ioctls or sysfs entry? How about switching between multiple overlay
> managers?
> >
> > You can switch the outputs in the DSS driver. You can enable/disable
> > displays individually, and configure the planes and or L4 pixel source
> > for the display.
> >
> > But yes, the fb driver does not support that currently.
> >
> > One idea I had was to present each display with one framebuffer, so
> > let's say we have 3 displays, we would have fb[0-2]. In addition to
> > that, we would have two framebuffers for the video overlays. Only one of
> > the displays can be updated with DISPC, so the overlays would appear
> > there.
> >
> > Then the display that is updated with DISPC could be changed on the fly
> > to another one, but the framebuffer arrangement would stay the same (so
> > fb0 would still be seen on display0, even if it's now updated with L4).
> >
> > There's still the question how to manage the video overlays, in this
> > scenario they would automatically move to other LCD's as the DISPC
> > target is changed. Also the TV-out is problematic.
> >
> > > This issue has been addresses with our design, you can change the output either to TV, LCD or to
> > DVI through sysfs entry. Switching between multiple overlay managers is very well supported in DSS
> > library. Currently SYSFS is the user interface layer to control the overlay managers. But in future
> > DSS library will easily be suitable to support media processor interface which is in concept phase
> > right now.  RFC for the media processor is at
> >
> > Does your design support displays that are not updated with DISPC?
> 
> Yes, it should. I don't see any reason why it should fail if the display is completely independent.
> 
> >
> > Your design has good points. I have to think about the overlay managers
> > a bit more. Especially if in some future hardware there were more
> > overlay managers instead of the current two.
> >
> 
> Let me take this opportunity, shortly I will post the DSS library and V4L2 driver. We can work
> together to add support for DSI, RFBI and SDI support to it.
> 
> > > http://lists-archives.org/video4linux/23652-rfc-add-support-to-query-and-change-connections-
> inside-
> > a-media-device.html
> > >
> > >
> > > > I also wanted to be able to change the configuration on the fly,
> > > > changing where DISPC output is going and which displays are updated with
> > > > CPU or sDMA.
> > > >
> > > > This is why I have the display-concept in my design.
> > > >
> > >
> > >
> > > Here we both are on same page, you have broken the displays and modes supported into multiple
> files
> > registering functions to the display.c file, there are many loopholes though.
> > >
> > > > I haven't made support for multiple users of the displays (like separate
> > > > fb and v4l drivers), but I don't immediately see why it couldn't be
> > > > done.
> > > >
> > >
> > > How are you going to handle the concurrency between these two?
> >
> > In the simple case of just an LCD and a TV-out, what are the concurrency
> > problems? Each plane is independent of each other. Sure you need to
> > check that the output is on if there's a plane enabled there and basic
> > things like that. Are there some other issues I'm not seeing?
> >
> 
> Yes some of the features of the DSS are tied to overlay managers and not the individual planes like
> global alpha, alpha blending enabling and timing parameters. So while programming of these parameters
> DSS library will have to maintain the data structures for the same and then any high level drivers
> can query those data structures.
> 
> > > > However, there are some questions regarding that, as the planes do not
> > > > represent displays, but just overlay planes. What happens when both fb
> > > > and v4l drivers want to change the resolution or timings of the display?
> > > >
> > > > Also I still don't quite know how to present displays to user space.
> > > > Currently my omapfb just uses the first display, and that's it. I think
> > > > in the end the user (be it X server, or perhaps some entity over it),
> > > > needs to have some understanding of what OMAP offers and how it can use
> > > > the displays. And there probably needs to be some product spesific
> > > > configuration regarding this in userspace.
> > > >
> > >
> > > Here are you saying application will have hardware specific support? Is this feasible?
> > >
> >
> > I don't see any other way. The displays are not independent of each
> > other.  For example the OMAP3 SDP has LCD and DVI outputs. They can't be
> > switched programmatically, but let's say it was possible. Only one of
> > those displays can be enabled at time. If an application wants to use
> > them both, it has to understand that they will not both work at the same
> > time.
> >
> > Or if there are two DSI displays, and one is updated with DISPC and the
> > other via L4. The application has to know that a video overlay can only
> > be used on the first display, or it has to exchange the DISPC/L4
> > updating order.
> >
> > Of course this is product specific software and configuration, not
> > something I'm planning to put in the driver. A normal application does
> > not have to know anything about it. I was just bringing it up to
> > demonstrate what must be possible.
> >
> >  Tomi
> >
> >
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-omap" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at  http://vger.kernel.org/majordomo-info.html


^ permalink raw reply	[flat|nested] 26+ messages in thread
* [PREVIEW] New display subsystem for OMAP2/3
@ 2008-09-11 14:55 Tomi Valkeinen
  2008-09-12 14:29 ` Shah, Hardik
  0 siblings, 1 reply; 26+ messages in thread
From: Tomi Valkeinen @ 2008-09-11 14:55 UTC (permalink / raw)
  To: linux-omap

Display Subsystem driver for OMAP2 and 3 (DSS2)
-----------------------------------------------

This is an almost total rewrite of the current OmapFB driver (let's call it
DSS1). The main targets for this work are to implement DSI, TV-out and multiple
display support. 

The DSS2 driver (omap-dss module) lives in arch/arm/plat-omap/dss/, and the FB,
panel and controller drivers live in drivers/video/omap2/. DSS1 and DSS2 live
currently side by side, you can choose which one to use.

I know it would be best to modify the DSS1 driver to implement the missing
features, but the task seemed overwhelming. The DSS1 driver was just not
designed for multiple displays or other outputs than parallel and rfbi, and I
thought maintaining a patch set to change those wasn't something I could handle
and stay sane. So I implemented DSS2 parallel to the DSS1.

I'm sending this now as a preview. DSS2 is in no way ready yet, even though it
should be usable. I'm interested to hear comments about it, most importantly if
it is ok to have DSS2 as a separate driver from DSS1 or is it a no-no.

Some code, especially in the dispc and rfbi, was taken and modified from the
DSS1 driver by Imre Deak and others.

The patch set is about 200kB, so I decided not to send it as email, but to put
it to http://www.bat.org/~tomba/omap-dss/

Architecture
------------

DSS driver has to be loaded first, then the panel and the controller drivers
are loaded and they register themselves to the DSS. At this point the DSS is
ready. The DSS abstracts each display behind a struct omap_display, and these
are the main interface to the DSS.

OmapFB driver gets a display from DSS, initializes framebuffer memory,
configures the display and activates it. Currently OmapFB only uses the first
display.  Also, one could implement other ways to handle the displays as the
DSS does not depend on OmapFB in any way.

And a piece of cool ascii art:

                DSS
               /   \
              /     \        +--- Panel
             /       \      /
Panel----Display     Display
             \       /      \
              \     /        +--- Ctrl
               \   /
              OmapFB

Porting panel and controller drivers to DSS2 is trivial. However, only OMAP3
SDP panel driver is currently ported, as I don't have any other public
hardware.

Features
--------

Current implemented and tested features include:
- DSI output in command mode
- SDI output (not tested for a while, might've gotten broken)
- RFBI output (not tested for a while, might've gotten broken)
- Parallel output (OMAP3 SDP, both LCD and DVI)
- All pieces can be compiled as a module or inside kernel
- Display timing change (with, for example, fbset)
- Using DISPC to update any of the outputs
- Using CPU to update RFBI or DSI output
- OMAP DISPC planes
- RGB16, RGB24 packed, RGB24 unpacked
- YUV2, UYVY 

TODO
----

OMAP2 not tested for some time
- DSS2 did work on OMAP2, but I haven't been able to test it for some time.

DSS locking
- Things break if you change dispc settings during DSI screen update.  Probably
  the same for RFBI.

Error checking
- Lots of checks are missing or implemented just as BUG()

Rotate (external FB)
Rotate (VRFB)
Rotate (SMS)
VENC

Pixel clock
- Currently allows only pixel clocks that can be exactly produced.
- Use DSI PLL to produce pixel clock

System DMA update for DSI
- Can be used for RGB16 and RGB24P modes. Probably not for RGB24U (how
  to skip the empty byte?)

Power management
- Clocks on/off in the first place

Multiple display handling
- Perhaps extra framebuffers, and an ioctl to map any of the FBs to any of the
  DISPC planes or L4. So, for example, fb1 could be GFX plane, fb0 could be
  updated with CPU. Then later on fb1 could be changed to use CPU with an
  ioctl, and fb0 to use GFX.
- Because of the dependencies of the DISPC planes, LCD/DIGIT output,
  the application has to know what it is doing.

Resolution change
- The x/y res of the framebuffer are not display resolutions, but just the
  resolution of the framebuffer (and the plane).
- The display resolution affects all planes on the display.
- Display resolution is not really a framebuffer feature. A sysfs
  entry for each display? If yes, is that an omapfb or DSS feature?
  Changing resolution affects the framebuffers.

DSI configuration
- Currently quite hardcoded configuration

OMAP1 support
- Not sure if needed

FBSET
-----

fbset with omap planes support can be found at
http://www.bat.org/~tomba/fbset/

The debian package is from ubuntu, with a patch that adds omap support.

---

 arch/arm/mach-omap2/board-3430sdp.c       |   66 +-
 arch/arm/plat-omap/Kconfig                |    2 +
 arch/arm/plat-omap/Makefile               |    2 +
 arch/arm/plat-omap/dss/Kconfig            |    5 +
 arch/arm/plat-omap/dss/Makefile           |    6 +
 arch/arm/plat-omap/dss/dispc.c            | 1539 +++++++++++++++++++
 arch/arm/plat-omap/dss/display.c          |  304 ++++
 arch/arm/plat-omap/dss/dpi.c              |  196 +++
 arch/arm/plat-omap/dss/dsi.c              | 2371 +++++++++++++++++++++++++++++
 arch/arm/plat-omap/dss/dss.c              |  389 +++++
 arch/arm/plat-omap/dss/dss.h              |  191 +++
 arch/arm/plat-omap/dss/rfbi.c             | 1274 ++++++++++++++++
 arch/arm/plat-omap/dss/sdi.c              |  152 ++
 arch/arm/plat-omap/dss/venc.c             |  501 ++++++
 arch/arm/plat-omap/fb.c                   |    9 +-
 arch/arm/plat-omap/include/mach/display.h |  358 +++++
 arch/arm/plat-omap/include/mach/omapfb.h  |    7 +
 drivers/video/Kconfig                     |    1 +
 drivers/video/Makefile                    |    1 +
 drivers/video/omap/Kconfig                |    2 +-
 drivers/video/omap2/Kconfig               |   20 +
 drivers/video/omap2/Makefile              |    4 +
 drivers/video/omap2/omapfb.c              | 1377 +++++++++++++++++
 drivers/video/omap2/panel-sdp3430-dvi.c   |  157 ++
 drivers/video/omap2/panel-sdp3430.c       |  187 +++
 25 files changed, 9108 insertions(+), 13 deletions(-)

-- 



^ permalink raw reply	[flat|nested] 26+ messages in thread

end of thread, other threads:[~2008-10-24  9:50 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-10-01 10:51 [PREVIEW] New display subsystem for OMAP2/3 Hiremath, Vaibhav
2008-10-02  8:24 ` Tomi Valkeinen
2008-10-03 12:47   ` Hiremath, Vaibhav
2008-10-03 13:25     ` Tomi Valkeinen
2008-10-03 13:34       ` Tony Lindgren
2008-10-03 14:16         ` Hiremath, Vaibhav
2008-10-24  9:50           ` Shah, Hardik
2008-10-03 14:03     ` Hans Verkuil
2008-10-03 14:19       ` Tomi Valkeinen
  -- strict thread matches above, loose matches on Subject: below --
2008-09-11 14:55 Tomi Valkeinen
2008-09-12 14:29 ` Shah, Hardik
2008-09-12 15:29   ` Daniel Stone
2008-09-13 20:27     ` Koen Kooi
2008-09-13 21:47       ` Måns Rullgård
2008-09-15  8:40         ` Shah, Hardik
2008-09-15 12:05         ` Tomi Valkeinen
2008-09-15 19:27           ` Måns Rullgård
2008-09-17  7:32             ` Tomi Valkeinen
2008-09-17  8:47               ` Måns Rullgård
2008-09-15 11:07   ` Tomi Valkeinen
2008-09-15 11:52     ` Shah, Hardik
2008-09-15 12:36       ` Tomi Valkeinen
2008-09-15 12:04     ` Daniel Stone
2008-09-15 13:32     ` Hiremath, Vaibhav
2008-09-15 14:38       ` Tomi Valkeinen
2008-09-15 16:20         ` Hiremath, Vaibhav

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox