Regression on the sun4i-drm driver by cma helper change
Hi,
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is 894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b ("drm/cma-
helper: Use the generic fbdev emulation").
If this commit is present, sun4i_framebuffer_init() will return -ENODEV, because of the call of drm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.
By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Thanks,
Icenowy
A message that is not in the archive (sent off-list or not yet received): e08489e82f7145e01fd786fa3b1be836505bb950.camel-h8G6r0blFSE@public.gmane.org
CC'ing Noralf and Daniel,
Quoted 7 lines · Icenowy Zheng
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is
894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b("drm/cma-
helper: Use the generic fbdev emulation").
Quoted 7 lines
If this commit is present,
sun4i_framebuffer_init()will return-ENODEV, because of the call ofdrm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Any ideas?
Maxime
Signature · 3 lines
Maxime Ripard, Bootlin (formerly Free Electrons) Embedded Linux and Kernel engineering https://bootlin.com
Den 11.07.2018 16.06, skrev Maxime Ripard:
Quoted 10 lines
CC'ing Noralf and Daniel,
Quoted 7 lines · Icenowy Zheng
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is
894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b("drm/cma-
helper: Use the generic fbdev emulation").
Quoted 8 lines
Quoted 7 lines
If this commit is present,
sun4i_framebuffer_init()will return-ENODEV, because of the call ofdrm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Any ideas?
I think it's because drm_fb_cma_fbdev_init() is called before drm_dev_register() and that this is what returns -ENODEV:
int drm_client_new(struct drm_device *dev, struct drm_client_dev *client, const char *name, const struct drm_client_funcs *funcs) {
...
mutex_lock(&dev->clientlist_mutex);
registered = dev->registered;
if (registered)
list_add(&client->list, &dev->clientlist); mutex_unlock(&dev->clientlist_mutex);
if (!registered) {
ret = -ENODEV;
goto err_close;
}
I would have been nice to get it confirmed that indeed this is the case.
Maybe we should remove this check temporarily until all have converted to drm_fbdev_generic_setup() which will be called after drm_dev_register().
I'll come back when I have looked at the other drivers to see in which order they register fbdev and DRM.
Noralf.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): de02a097-fd27-8601-2982-d970728e04e0-L59+Z2yzLopAfugRpC6u6w@public.gmane.org
Quoted 42 lines · Noralf Trønnes
Den 11.07.2018 16.06, skrev Maxime Ripard:
Quoted 16 lines
CC'ing Noralf and Daniel,
Quoted 12 lines · Icenowy Zheng
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is
894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b("drm/cma-
helper: Use the generic fbdev emulation").If this commit is present,
sun4i_framebuffer_init()will return-ENODEV, because of the call ofdrm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.Quoted 5 lines
Quoted 3 lines
By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Any ideas?
I think it's because
drm_fb_cma_fbdev_init()is called beforedrm_dev_register()and that this is what returns-ENODEV:int drm_client_new(struct
drm_device*dev, structdrm_client_dev*client,
const char *name, const structdrm_client_funcs*funcs)
{
...mutex_lock(&dev->clientlist_mutex); registered = dev->registered; if (registered) list_add(&client->list, &dev->clientlist); mutex_unlock(&dev->clientlist_mutex); if (!registered) { ret = -ENODEV; goto err_close; }
Quoted 7 lines
I would have been nice to get it confirmed that indeed this is the case.
Maybe we should remove this check temporarily until all have converted to
drm_fbdev_generic_setup()which will be called afterdrm_dev_register().I'll come back when I have looked at the other drivers to see in which order they register fbdev and DRM.
Yeah I don't think we can require that drivers have called drm_dev_register before setting up the fbdev stuff, that will break the world. What we might want to consider is a ->register callback (for e.g. framebuffer_register, but not all the stuff leading up to it), but for now I don't think there's a need for that. -Daniel
Signature · 8 lines
Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.
Den 11.07.2018 17.04, skrev Daniel Vetter:
Quoted 43 lines · Noralf Trønnes
Quoted 42 lines
Den 11.07.2018 16.06, skrev Maxime Ripard:
Quoted 10 lines
CC'ing Noralf and Daniel,
Quoted 7 lines · Icenowy Zheng
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is
894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b("drm/cma-
helper: Use the generic fbdev emulation").Quoted 8 lines
Quoted 7 lines
If this commit is present,
sun4i_framebuffer_init()will return-ENODEV, because of the call ofdrm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Any ideas?
I think it's because
drm_fb_cma_fbdev_init()is called beforedrm_dev_register()and that this is what returns-ENODEV:int drm_client_new(struct
drm_device*dev, structdrm_client_dev*client,
const char *name, const structdrm_client_funcs*funcs)
{
...mutex_lock(&dev->clientlist_mutex); registered = dev->registered; if (registered) list_add(&client->list, &dev->clientlist); mutex_unlock(&dev->clientlist_mutex); if (!registered) { ret = -ENODEV; goto err_close; }I would have been nice to get it confirmed that indeed this is the case.
Maybe we should remove this check temporarily until all have converted to
drm_fbdev_generic_setup()which will be called afterdrm_dev_register().
Quoted 8 lines
Quoted 2 lines
I'll come back when I have looked at the other drivers to see in which order they register fbdev and DRM.
Yeah I don't think we can require that drivers have called
drm_dev_registerbefore setting up the fbdev stuff, that will break the world. What we might want to consider is a ->register callback (for e.g.framebuffer_register, but not all the stuff leading up to it), but for now I don't think there's a need for that. -Daniel
I've posted a fix, cc'ed the persons in this mail.
Noralf.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
A message that is not in the archive (sent off-list or not yet received): CAKMK7uHeJ_Z35vrgkOTOSH_M+=CiuvepPRM-Gva+p3Pw6Vfvfg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Hi,
Quoted 49 lines · Daniel Vetter
Quoted 47 lines · Noralf Trønnes
Den 11.07.2018 16.06, skrev Maxime Ripard:
Quoted 16 lines
CC'ing Noralf and Daniel,
Quoted 12 lines · Icenowy Zheng
Today, during testing the Banana Pi M2 Zero HDMI patch, I found a regression on the sun4i-drm driver, which happenes because of the cma helper change.
The bad commit is
894a677f4b3e6d2ab8d01bb46c1fbd5f92e4591b("drm/cma-
helper: Use the generic fbdev emulation").If this commit is present,
sun4i_framebuffer_init()will return-ENODEV, because of the call ofdrm_client_new(). In this case sun4i- drv will fail to probe, and all components will be unbound.Quoted 5 lines
Quoted 3 lines
By reverting the commit, sun4i-drv loads and HDMI output is correct.
Could anyone investigate into this, please?
Any ideas?
I think it's because
drm_fb_cma_fbdev_init()is called beforedrm_dev_register()and that this is what returns-ENODEV:int drm_client_new(struct
drm_device*dev, structdrm_client_dev*client,
const char *name, const structdrm_client_funcs*funcs)
{
...mutex_lock(&dev->clientlist_mutex); registered = dev->registered; if (registered) list_add(&client->list, &dev->clientlist); mutex_unlock(&dev->clientlist_mutex); if (!registered) { ret = -ENODEV; goto err_close; }I would have been nice to get it confirmed that indeed this is the case.
Maybe we should remove this check temporarily until all have converted to
drm_fbdev_generic_setup()which will be called afterdrm_dev_register().
Quoted 8 lines
Quoted 2 lines
I'll come back when I have looked at the other drivers to see in which order they register fbdev and DRM.
Yeah I don't think we can require that drivers have called
drm_dev_registerbefore setting up the fbdev stuff, that will break the world. What we might want to consider is a ->register callback (for e.g.framebuffer_register, but not all the stuff leading up to it), but for now I don't think there's a need for that.
Look like this is still exists in linux-next, with recent testing any suggestion or is it already fixed?
Jagan.
Signature · 3 lines
You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/[email protected] For more options, visit https://groups.google.com/d/optout.