Hi Thomas,

On Mon, Aug 31, 2009 at 11:34:00AM +0200, Thomas Hellström wrote:
> Hi,
>
> Is there any way we can try and put together a generic drm interface for
> this instead of an Intel-specific one?
I've tried to make the ioctl somewhat generic. That's the reason for the
generic buffer format flags (and the corresponding mapping to/from intel
overlay formats in kernel and ddx). So when the radeon devs are interested
in overlay support, there shouldn't be a big problem in distilling a
common ioctl interface.

But I don't see the point in a generic ioctl, because there are quite a
lot of hw specific restrictions (alignment, stride for all possible yuv
formats, ...) which a generic userspace driver would not know. See
intel_overlay_put_image in i915/intel_overlay.c for all the checks. A few
of these tests are buffer format specific and can certainly be extracted
and reused as helper functions, but besides that I don't see much code to
share. Moreover we most likely still need a device specific ioctl to
adjust color parameters (gamma, yuv->rbg mapping, ...).

I also don't see any gain in adding overlay support to the generic struct
drm_crtc because handling this crtc<->overlay relation is just a few lines
in my code. So not many opportunities to share stuff.

> Surely it will have a use for the Gallium Xorg state-tracker which is
> intended to be a device-independent Xorg driver on top of KMS and
> Gallium.
At least for intel this does not make sense. Gallium is only supported for
915 and onwards. So is textured video. Which leaves us with 8xx class hw
in need of overlay support but no way of gallium support (no shaders).

Furthermore I don't think it's a good idea to spoil the shiny new X
architecture with support for archaic hardware like overlays (which ruins
every compositioned desktop experience).

In conclusion I don't think a common ioctl is worth it. But sharing some
code and infrastructure on the kernel side is certainly possible, if
someone implements overlay support for another chipset. But I don't really
count on that, because at least radeon has textured video for all it's
chips.

> /Thomas

Yours, Daniel

-- 
Daniel Vetter
Mail: dan...@ffwll.ch
Mobile: +41 (0)79 365 57 48

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to