Re: RFC on upstreaming of a Mediatek DRM modesetting driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Dec 1, 2014 at 5:01 AM, Frank Binns <frank.binns@xxxxxxxxxx> wrote:
> Hi,
>
> We are currently in negotiations with one of our customers (Mediatek) on a strategy that will allow them to push a DRM modesetting driver into the upstream kernel. We are writing to get people's opinions and feedback on our proposed approach.
>
> Currently, our driver is structured in such a way that the display driver is more tightly integrated with the GPU driver than we would like. Although our kernel driver has been shipped with a GPL license for a long time, it is not in a form that would be considered acceptable upstream. Unfortunately, it is going to be a long process to get this part of the driver into a reasonable state. However, in the meantime, we don't want to prevent customer portions of the driver from being upstreamed. With the work done on recent kernels, and with a willing partner in Mediatek, we now think that we can restructure our driver in such a way as to allow this to happen.
>
> We see two basic approaches to achieving this:
> 1) Two independent DRM drivers, i.e. modesetting and render node drivers
> 2) A single componentised DRM driver

As others have said, a render-node kms driver is the way to go, so
that the various KMS drivers it works with can be themselves
upstreamed.

In the past, I had gone (more or less) the second approach w/ omapdrm
but that required carrying some downstream omapdrm patches for the
integration with gpu.  This was, because at the time there was really
no alternative.  But now that we have dmabuf/prime and fence stuff in
place, there is no more a need to do that.  So the best approach is
one that allows the display/kms drivers to be used without downstream
patches.

Ofc, it would be nice to see an upstream-worthy driver for the gpu
side of things, but as others have noted, upstream kernel drivers
require *some* form of open source userspace so that we actually have
a proper way to review and test the code.

BR,
-R

> Our (IMG's) preferred approach is to have a single componentised DRM driver. This is due to the following reasons:
>
> - Existing user space is not fully prepared to handle render nodes.
>
> - There is concern that any IMG DRM render node driver will need knowledge about multiple SoCs, each one being from a different vendor. Would this be deemed acceptable?
>
> - There is a trend, at least for DRM SoC drivers, towards using the component interface. Although there appears to be very few (one?) examples of GPU component drivers.
>
> To give some high level details on how we expect the componentised DRM driver model to work, each vendor (in this case Mediatek) will write their own DRM driver (supporting modesetting, dumb buffers, GEM, prime, etc) and IMG will provide an almost entirely independent component driver that adds in GPU support. Until our GPU driver is in a suitable
> state this will most likely necessitate a small kernel patch to wire up support, e.g. GPU specific ioctls.
>
> Cross-device and cross-process memory allocations will be made using the DRM driver. In order for this memory to be shared with the GPU component driver it will be necessary, at least for the time being, to export it via prime and import it via a GPU ioctl. Synchronisation between the display and GPU will be performed via reservation objects.
>
> Does this sound like a sane approach? Questions and/or feedback is very welcome.
>
> Thanks
> Frank
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel





[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux