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

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

 




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@xxxxxxxxxxx> 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.

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://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