[RFC 0/1] drm: Add Grain Media GM12U320 kms driver
Noralf Trønnes
noralf at tronnes.org
Wed Jun 7 19:38:34 UTC 2017
Den 07.06.2017 20.46, skrev Marco Diego Aurélio Mesquita:
> Hi Noralf!
>
> On Wed, Jun 7, 2017 at 1:56 PM, Noralf Trønnes <noralf at tronnes.org> wrote:
>> 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
> I'll investigate how to modify the pl111 driver to fit my needs then.
> Do you think is there any change that must be done to the
> pl111_get_panel function regarding the call to
> of_graph_get_next_endpoint? I mean, the udl driver (which the gm12u320
> driver is based on) does not have a panel; would any change be needed
> because of this?
I guess you can keep your get_modes and do something like this:
static const struct drm_connector_helper_funcs gm12u320_helper_funcs = {
.get_modes = gm12u320_get_modes,
};
.best_encoder has a default that fits your 1 encoder case.
static const struct drm_connector_funcs gm12u320_connector_funcs = {
.fill_modes = drm_helper_probe_single_connector_modes,
.destroy = gm12u320_connector_destroy,
.detect = gm12u320_detect,
.dpms = drm_atomic_helper_connector_dpms,
.reset = drm_atomic_helper_connector_reset,
.atomic_duplicate_state = drm_atomic_helper_connector_duplicate_state,
.atomic_destroy_state = drm_atomic_helper_connector_destroy_state,
};
Then you init and add helper:
drm_connector_init(dev, connector, &gm12u320_connector_funcs,
DRM_MODE_CONNECTOR_Unknown);
drm_connector_helper_add(connector, &gm12u320_helper_funcs);
And finally attach the connector to the pipe:
drm_simple_display_pipe_init(..., connector);
The connector is registered when the drm device is registered.
Noralf.
More information about the dri-devel
mailing list