[RFC 0/1] drm: Add Grain Media GM12U320 kms driver

Noralf Trønnes noralf at tronnes.org
Wed Jun 7 16:56:13 UTC 2017


Hi Marco,


Den 07.06.2017 17.35, skrev Marco Diego Aurélio Mesquita:
> Hi Emil!
>
> On Wed, Jun 7, 2017 at 7:30 AM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>> On 2 June 2017 at 17:39, Marco Diego Aurélio Mesquita
>> <marcodiegomesquita at gmail.com> wrote:
>>> Hi Emil!
>>>
>>> On Fri, Jun 2, 2017 at 1:14 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
>>>> As Daniel mentioned in the earlier thread, factoring out things can be
>>>> done as a follow-up.
>>>> On the other hand, I _think_ that the blocker for this driver that
>>>> it's not doing atomic mode setting.
>>>>
>>> I've been looking on other small drivers to see how complicated would
>>> it be to use the simple pipe framework. Both mxsfb and tinydrm do
>>> atomic mode setting. It looks like some changes would be needed like
>>> using the cma allocator and calling other specific functions tu do
>>> atomic mode setting.
>>>
>>> Can you point to a simple patch that implements one of these "conversions"?
>> TinyDRM is a helper/library which can be used to write a DRM driver
>> driving 'simple' hardware.
>> IIRC one of the ideas was to use it, as a reference you can skim
>> through the latest driver [nor merged yet] that utilises the helper
>> [1].
> Thanks for helping!
>
> I was indeed studying TinyDRM these days. But still haven't figured
> out it was a lib. So I started modifying it to fit my needs and found
> out it was too much work. Now I see, from the example you provided,
> how simple it should be to use it. Thanks! I'll try to do the same for
> gm12u320.
>
> Anyway, for now I still have some problems. Mainly the way gm12u320
> provides its modes. In the patch sent by Hans[2] the get_modes
> function seems to be hardcoded. So, TinyDRM would probably need to be
> modified so that a custom get_modes function can be provided. Do you
> think that is reasonable? Noralf Tronnes, can you answer this?
>
> Also, I've had some problems trying to compile TinyDRM. When I type
> "make modules SUBDIRS=drivers/gpu/drm/tinydrm" I get lots of "WARNING
> ... undefined!" warnings. What is the right way to compile TinyDRM?
>
> One more thing: isn't TinyDRM specific to spi devices?

tinydrm is targeted at displays on slow busses where userspace tells
the driver which part of the framebuffer it has changed to minimize
the transfer.

The PL111 driver uses drm_simple_display_pipe and might be a better
example for your use case:
https://cgit.freedesktop.org/drm/drm-misc/tree/drivers/gpu/drm/pl111

Noralf.

>> [1] https://lists.freedesktop.org/archives/dri-devel/2017-June/143357.html
> [2] https://lists.freedesktop.org/archives/dri-devel/2017-June/143234.html
>



More information about the dri-devel mailing list