Re: [PATCH 19/19] drm/kms: don't export drm_mode_group_init_legacy_group

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

 



Hi

On Thu, Jan 23, 2014 at 9:52 AM, Daniel Vetter <daniel.vetter@xxxxxxxx> wrote:
> Driver modules really don't have much business frobbing around with
> this: Splitting up modeset resources (if we ever get around to enable
> this for real) should be something purely controlled and managed by
> the drm core in a driver-agnostic fashion. As usual imx disagrees, but
> that's due to the convoluted setup sequence. Russell King is working
> on a proper fix for that, so this patch needs to wait for those to
> land to avoid breaking imx.

I tried working on "modeset-object splitting" as part of the
DRM-Master rework, but that's all really racy and we'd break current
user-space. For instance the object-indices (compared to object-IDs)
need to be constant, but with our current object-lists, removing an
object will change indices (thus breaking possible_crtcs/encoders).

There are ways to make that work, but it'd require huge drm_crtc.c
changes. And I also think our locking doesn't provide for that.
Furthermore, resource-retrieval is not atomic (we need multiple
ioctls: GetResources, GetCrtc, ...) so if we change the objects in
between, we may break running apps in a subtle way.

So I'm all for making object-lists immutable after drm_dev_register()
was called. Imo, hardware should wait for all sub-devices to be
present and then call drm_dev_register(). Once the first sub-device is
removed, you call drm_dev_unregister(). And I think that's what
Russel's compound-device infrastructure does by hiding the sub-devices
in a compound device.

If there's ever hardware that truly supports sub-device hotplugging,
we can support that by adding a DRM-ClientCap like 3D modes. But as I
understand, the current hardware is still a single piece of hardware
which just might get probed via different buses and thus is not an
atomic entity. So the device is still hotplugged as a whole, we just
don't get the events through a single path.

Thanks
David

>
> Cc: Sascha Hauer <s.hauer@xxxxxxxxxxxxxx>
> Cc: Russell King <rmk+kernel@xxxxxxxxxxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Signed-off-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> ---
>  drivers/gpu/drm/drm_crtc.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
> index cf134540b675..98084413a842 100644
> --- a/drivers/gpu/drm/drm_crtc.c
> +++ b/drivers/gpu/drm/drm_crtc.c
> @@ -1264,7 +1264,6 @@ int drm_mode_group_init_legacy_group(struct drm_device *dev,
>
>         return 0;
>  }
> -EXPORT_SYMBOL(drm_mode_group_init_legacy_group);
>
>  /**
>   * drm_crtc_convert_to_umode - convert a drm_display_mode into a modeinfo
> --
> 1.8.5.2
>
> _______________________________________________
> 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