Skip to contentSkip to conversation

drm_hwcomposer moving to fd.o

DISCUSSION Robert Foss 7 participants 15 messages Sep 21, 2017 – Sep 29, 2017

lore
Share & tools
lore
#0 lore raw

Hey,

After talking to Liviu Dudau at LPC and Sean Paul & Kaveh Nasri at XDC it seems that we all could benefit from community maintainership of drm_hwcomposer.

I'm happy to announce that drm_hwcomposer now officially is hosted on freedesktop.org:
https://cgit.freedesktop.org/drm_hwcomposer/

The chromiumos wiki entries have also been moved to f.do:
https://www.x.org/wiki/Projects/drm_hwcomposer/
https://www.x.org/wiki/Projects/drm_hwcomposer/Overview/

With this I'm hoping we'll be able to merge the changes done by intel in [1], but more importantly remove the need for an alternative implementation.

Regarding contributions, they are accepted on the dri-devel list, using the patch prefix "hwc".

Currently Sean Paul, Zach Reizner, Rob Clark, Rob Herring and Robert Foss have commit access. This is just the initial set, any contributor with a few commits under their belt is welcome to request commit access.

A fd.o account is needed for to grant commit rights, one can be requested here:
https://www.freedesktop.org/wiki/AccountRequests/

I would also like to thank Sean Paul for taking the initiative and helping out with the move.

[1] https://github.com/android-ia/external-drm_hwcomposer/

Rob.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

Great news!
Thanks a lot to make it happen.

I hope I am wrong.
From my understanding most x86 GPUs still cannot work with drm_hwcomposer since
they lack of atomic mode-setting API support required by drm_hwcomposer.
Hope this could be addressed soon since drm_hwcomposer becomes a standard project of fd.o.

How about the gralloc?
There are also several implementations scattered somewhere.
I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

2017-09-22 7:52 GMT+08:00 Robert Foss <[email protected]>:

Quoted 6 lines

Hey,

After talking to Liviu Dudau at LPC and Sean Paul & Kaveh Nasri at XDC it seems that we all could benefit from community maintainership of drm_hwcomposer.

Quoted 7 lines

I'm happy to announce that drm_hwcomposer now officially is hosted on freedesktop.org:
https://cgit.freedesktop.org/drm_hwcomposer/

The chromiumos wiki entries have also been moved to f.do:
https://www.x.org/wiki/Projects/drm_hwcomposer/
https://www.x.org/wiki/Projects/drm_hwcomposer/Overview/

Seems I can't connect to it now...

Quoted 21 lines

With this I'm hoping we'll be able to merge the changes done by intel in [1], but more importantly remove the need for an alternative implementation.

Regarding contributions, they are accepted on the dri-devel list, using the patch prefix "hwc".

Currently Sean Paul, Zach Reizner, Rob Clark, Rob Herring and Robert Foss have commit access. This is just the initial set, any contributor with a few commits under their belt is welcome to request commit access.

A fd.o account is needed for to grant commit rights, one can be requested here:
https://www.freedesktop.org/wiki/AccountRequests/

I would also like to thank Sean Paul for taking the initiative and helping out with the move.

[1] https://github.com/android-ia/external-drm_hwcomposer/

Signature · 7 lines
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#13 lore raw
In reply to Robert Foss
Quoted 3 lines · Robert Foss

After talking to Liviu Dudau at LPC and Sean Paul & Kaveh Nasri at XDC it seems that we all could benefit from community maintainership of drm_hwcomposer.

Sounds good!

Quoted 2 lines

Regarding contributions, they are accepted on the dri-devel list, using the patch prefix "hwc".

dri-devel averages around 2400-2500 messages per month AFAICT. If hwc community development picks up any kind of momentum, please consider starting a new list. Or would a joint userspace list with e.g. libdrm be beneficial? Daniel Stone will help you here.

BR,
Jani.

Signature · 5 lines
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#14 lore raw

Hey Jani,

Quoted 12 lines · Jani Nikula
Quoted 4 lines · Robert Foss

After talking to Liviu Dudau at LPC and Sean Paul & Kaveh Nasri at XDC
it seems that we all could benefit from community maintainership of drm_hwcomposer.

Sounds good!

Quoted 3 lines

Regarding contributions, they are accepted on the dri-devel list, using
the patch prefix "hwc".

Quoted 5 lines

dri-devel averages around 2400-2500 messages per month AFAICT. If hwc community development picks up any kind of momentum, please consider starting a new list. Or would a joint userspace list with e.g. libdrm be
beneficial? Daniel Stone will help you here.

A separate ML if there ends up being a significant volume of traffic sounds like a good idea.

I guess we're following the IGT model here, and will move if/when sustained development is occurring.

Quoted 4 lines

BR,
Jani.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw
In reply to Chih-Wei Huang

Hey Chih-Wei,

Quoted 10 lines · Chih-Wei Huang

Great news!
Thanks a lot to make it happen.

I hope I am wrong.
From my understanding most x86 GPUs still cannot work with drm_hwcomposer since
they lack of atomic mode-setting API support required by drm_hwcomposer.
Hope this could be addressed soon since drm_hwcomposer becomes a standard project of fd.o.

I haven't personally run drm_hwc ontop of any x86 hardware, but there are people who do it.
The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

Quoted 6 lines

How about the gralloc?
There are also several implementations scattered somewhere.
I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

Gralloc is a different story, and the right person to ask about it is not me, but maybe Rob Herring.

Rob.
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 13 lines

Hey Chih-Wei,

Quoted 10 lines · Chih-Wei Huang

Great news!
Thanks a lot to make it happen.

I hope I am wrong.
From my understanding most x86 GPUs still cannot work with drm_hwcomposer since
they lack of atomic mode-setting API support required by drm_hwcomposer.
Hope this could be addressed soon since drm_hwcomposer becomes a standard project of fd.o.

Quoted 2 lines

I haven't personally run drm_hwc ontop of any x86 hardware, but there are people who do it.

Indeed we (android-x86 project) are the people who try to use it but without lucky. Rob Herring also uses (a slightly modified) drm_hwcomposer with his aosp virgl porting.
Except these I don't know any others use it on x86 hardware. Though drm_hwcomposer is developed from Chromium
but I've heard Chrome actually use an alternative proprietary hwcomposer in their Android Runtime for Chrome (ARC).

Quoted 2 lines

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

The android-ia doesn't support using fdo's drm_hwcomposer I think. They use an alternative hwcomposer [1] as you said.
It looks very different than drm_hwcomposer though
both rely on the similar (or same?) atomic API. Android-ia's kernel has also been patched to work with it. The vanilla kernel (at least LTS 4.9) can't work with [1] or drm_hwcomposer.
Actually [1] only works with i915(i965) but we want
a more generic hwcomposer like drm_hwcomposer.

Please correct me if I am wrong.

[1]: git://github.com/01org/IA-Hardware-Composer

Quoted 8 lines
Quoted 5 lines

How about the gralloc?
There are also several implementations scattered somewhere.
I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

Gralloc is a different story, and the right person to ask about it is not me, but maybe Rob Herring.

Signature · 7 lines
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#4 lore raw

Hi Chih-Wei,

looks very different than drm_hwcomposer though both rely on the similar (or same?) atomic API.

Quoted 1 line
Quoted 1 line

Android-ia's kernel has also been patched to work with it.

Not sure why you have that impression. We don't carry any custom Kernel patches in our side.

Br,
Kalyan

-----Original Message-----
From: Chih-Wei Huang [mailto:[email protected]]
Sent: Sunday, September 24, 2017 7:44 PM
To: Robert Foss <[email protected]>
Cc: Zach Reizner <[email protected]>; Daniel Stone <[email protected]>; Tomeu Vizoso <[email protected]>; Liviu Dudau <[email protected]>; [email protected]; Marissa Wall <[email protected]>; Nasri, Kaveh <[email protected]>; Stephane Marchesin <[email protected]>; Kondapally, Kalyan <[email protected]>
Subject: Re: drm_hwcomposer moving to fd.o

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 12 lines

Hey Chih-Wei,

Quoted 9 lines · Chih-Wei Huang

Great news!
Thanks a lot to make it happen.

I hope I am wrong.
From my understanding most x86 GPUs still cannot work with drm_hwcomposer since they lack of atomic mode-setting API support required by drm_hwcomposer.
Hope this could be addressed soon since drm_hwcomposer becomes a standard project of fd.o.

Quoted 2 lines

I haven't personally run drm_hwc ontop of any x86 hardware, but there are people who do it.

Indeed we (android-x86 project) are the people who try to use it but without lucky. Rob Herring also uses (a slightly modified) drm_hwcomposer with his aosp virgl porting. Except these I don't know any others use it on x86 hardware.
Though drm_hwcomposer is developed from Chromium but I've heard Chrome actually use an alternative proprietary hwcomposer in their Android Runtime for Chrome (ARC).

Quoted 2 lines

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

The android-ia doesn't support using fdo's drm_hwcomposer I think.
They use an alternative hwcomposer [1] as you said.
It looks very different than drm_hwcomposer though both rely on the similar (or same?) atomic API. Android-ia's kernel has also been patched to work with it.
The vanilla kernel (at least LTS 4.9) can't work with [1] or drm_hwcomposer. Actually [1] only works with i915(i965) but we want a more generic hwcomposer like drm_hwcomposer.

Please correct me if I am wrong.

[1]: git://github.com/01org/IA-Hardware-Composer

Quoted 7 lines
Quoted 4 lines

How about the gralloc?
There are also several implementations scattered somewhere. I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

Gralloc is a different story, and the right person to ask about it is not me, but maybe Rob Herring.

--
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw
In reply to Chih-Wei Huang
Quoted 6 lines · Chih-Wei Huang

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 2 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

Quoted 7 lines
Quoted 2 lines

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

Regards,

Tomeu

Quoted 10 lines

The android-ia doesn't support using fdo's drm_hwcomposer I think. They use an alternative hwcomposer [1] as you said.
It looks very different than drm_hwcomposer though
both rely on the similar (or same?) atomic API. Android-ia's kernel has also been patched to work with it. The vanilla kernel (at least LTS 4.9) can't work with [1] or drm_hwcomposer.
Actually [1] only works with i915(i965) but we want
a more generic hwcomposer like drm_hwcomposer.

Quoted 16 lines

Please correct me if I am wrong.

[1]: git://github.com/01org/IA-Hardware-Composer

Quoted 8 lines
Quoted 5 lines

How about the gralloc?
There are also several implementations scattered somewhere.
I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

Gralloc is a different story, and the right person to ask about it is not me, but maybe Rob Herring.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw
Quoted 10 lines · Tomeu Vizoso
Quoted 9 lines · Chih-Wei Huang

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

Quoted 7 lines
Quoted 4 lines

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Cheers, Daniel

Quoted 35 lines

Regards,

Tomeu

Quoted 10 lines

The android-ia doesn't support using fdo's drm_hwcomposer I think. They use an alternative hwcomposer [1] as you said.
It looks very different than drm_hwcomposer though
both rely on the similar (or same?) atomic API. Android-ia's kernel has also been patched to work with it. The vanilla kernel (at least LTS 4.9) can't work with [1] or drm_hwcomposer.
Actually [1] only works with i915(i965) but we want
a more generic hwcomposer like drm_hwcomposer.

Quoted 16 lines

Please correct me if I am wrong.

[1]: git://github.com/01org/IA-Hardware-Composer

Quoted 8 lines
Quoted 5 lines

How about the gralloc?
There are also several implementations scattered somewhere.
I think it's also important to standardize it to fd.o and make it work with fd.o's drm_hwcomposer.

Gralloc is a different story, and the right person to ask about it is not me, but maybe Rob Herring.

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#7 lore raw

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 16 lines · Tomeu Vizoso
Quoted 15 lines · Chih-Wei Huang
Quoted 13 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 6 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 +
gbm_grallc + drm_hwcomposer + mesa 17.1
on Android-x86 7.1.
Except virgl all others just failed as expected.

i915 (i965) was tested in Intel Broxton.
It's the best result. SurfaceFlinger runs and
bootanimation is shown. However, after boot
complete it only shown systemui + navbar with
black background. No app icons or mouse cursor
in the desktop. I guess the composition of 3+
layers has some problems.

nouveau is tested on GTX 1060.
drm_hwcomposer init failed so SurfaceFlinger crashed. Seems the driver is not atomic:

09-28 13:21:39.719 3096 3096 E hwc-drm-resources: Failed to set atomic cap -1

which comes from this line of drmresources.cpp:

ret = drmSetClientCap(fd(), DRM_CLIENT_CAP_ATOMIC, 1);

vmwgfx also has issues on drm_hwcomposer
initialization. SurfaceFlinger didn't crashes but
no bootanimation. It seems just blocked.

09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set active config d=1 ret=-19
09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set initial config for d=1 ret=-19

09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to initialize display 1
09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to enumerate

displays: Unknown error -19

Full log:
https://drive.google.com/open?id=0B3GICgSwrKXcci1lbDdaSlJBRE0

Shall I create bugs in the Bugzilla?
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#8 lore raw
Quoted 31 lines · Chih-Wei Huang

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 16 lines · Tomeu Vizoso
Quoted 15 lines · Chih-Wei Huang
Quoted 13 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 6 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 +
gbm_grallc + drm_hwcomposer + mesa 17.1
on Android-x86 7.1.
Except virgl all others just failed as expected.

Quoted 7 lines

i915 (i965) was tested in Intel Broxton.
It's the best result. SurfaceFlinger runs and
bootanimation is shown. However, after boot
complete it only shown systemui + navbar with
black background. No app icons or mouse cursor
in the desktop. I guess the composition of 3+
layers has some problems.

Could be a bug in either drm_hwcomposer making assumptions that don't hold, or i915 for implementing stuff wrongly. Would need someone to debug. Given that we have products shipping on bxt using atomic (CrOS) I'm leaining towards drm_hwcomposer making bad assumptions.

Quoted 9 lines

nouveau is tested on GTX 1060.
drm_hwcomposer init failed so SurfaceFlinger crashed. Seems the driver is not atomic:

09-28 13:21:39.719 3096 3096 E hwc-drm-resources: Failed to set atomic cap -1

which comes from this line of drmresources.cpp:

ret = drmSetClientCap(fd(), DRM_CLIENT_CAP_ATOMIC, 1);

nouveau.atomic=1 or you won't get the atomic ioctl. Not sure why it's not enabled by default for nv50+. If it works, perhaps submit a patch to change the default?

Quoted 11 lines

vmwgfx also has issues on drm_hwcomposer
initialization. SurfaceFlinger didn't crashes but
no bootanimation. It seems just blocked.

09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set active config d=1 ret=-19
09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set initial config for d=1 ret=-19

09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to initialize display 1
09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to enumerate

displays: Unknown error -19

Sounds like the vmwgfx implementation of atomic is a big buggy. Bug filing for this would be good I think.

Cheers, Daniel

Quoted 5 lines

Full log:
https://drive.google.com/open?id=0B3GICgSwrKXcci1lbDdaSlJBRE0

Shall I create bugs in the Bugzilla?

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#9 lore raw
Quoted 40 lines · Daniel Vetter
Quoted 31 lines · Chih-Wei Huang

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 16 lines · Tomeu Vizoso
Quoted 15 lines · Chih-Wei Huang
Quoted 13 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 6 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 + gbm_grallc + drm_hwcomposer + mesa 17.1 on Android-x86 7.1.
Except virgl all others just failed as expected.

Quoted 7 lines

i915 (i965) was tested in Intel Broxton. It's the best result. SurfaceFlinger runs and bootanimation is shown. However, after boot complete it only shown systemui + navbar with black background. No app icons or mouse cursor in the desktop. I guess the composition of 3+ layers has some problems.

Quoted 4 lines

Could be a bug in either drm_hwcomposer making assumptions that don't hold, or i915 for implementing stuff wrongly. Would need someone to debug. Given that we have products shipping on bxt using atomic (CrOS) I'm leaining towards drm_hwcomposer making bad assumptions.

An easy way of making sure that the problem is with compositing with overlays is applying this hack:

https://git.collabora.com/cgit/user/tomeu/drm_hwcomposer.git/commit/?h=android-etnaviv&id=dbe21cb52f602eef11bf5ac083691e5b2b0a35ba

It should also allow you to move on and test more stuff.

Quoted 3 lines
Quoted 3 lines

vmwgfx also has issues on drm_hwcomposer initialization. SurfaceFlinger didn't crashes but no bootanimation. It seems just blocked.

If you want to test another driver in qemu, you can test Varad's patches in https://patchwork.freedesktop.org/series/29006/ for atomic updates in the Cirrus driver.

Regards,

Tomeu
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#10 lore raw
Quoted 46 lines · Tomeu Vizoso
Quoted 40 lines · Daniel Vetter
Quoted 31 lines · Chih-Wei Huang

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 16 lines · Tomeu Vizoso
Quoted 15 lines · Chih-Wei Huang
Quoted 13 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 6 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 + gbm_grallc + drm_hwcomposer + mesa 17.1 on Android-x86 7.1.
Except virgl all others just failed as expected.

Quoted 7 lines

i915 (i965) was tested in Intel Broxton. It's the best result. SurfaceFlinger runs and bootanimation is shown. However, after boot complete it only shown systemui + navbar with black background. No app icons or mouse cursor in the desktop. I guess the composition of 3+ layers has some problems.

Quoted 4 lines

Could be a bug in either drm_hwcomposer making assumptions that don't hold, or i915 for implementing stuff wrongly. Would need someone to debug. Given that we have products shipping on bxt using atomic (CrOS) I'm leaining towards drm_hwcomposer making bad assumptions.

Quoted 6 lines

An easy way of making sure that the problem is with compositing with overlays is applying this hack:

https://git.collabora.com/cgit/user/tomeu/drm_hwcomposer.git/commit/?h=android-etnaviv&id=dbe21cb52f602eef11bf5ac083691e5b2b0a35ba

It should also allow you to move on and test more stuff.

back when Android-IA used drm_hwcomposer there were some fixes made before things started to work, this is a shot in the dark but following commits might fix something (disclaimer, this is based on some old snapshot of drm_hwcomposer but one might be able to port relevant changes ...)

handle cursor separately:

https://github.com/android-ia/external-drm_hwcomposer/commit/f9029ff42f7f925a2e34aad1caa1481f72f347ac

introduce own planner for IA:

https://github.com/android-ia/external-drm_hwcomposer/commit/e5f32f820a93352c631b379d9721795c783fc4e7

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

vmwgfx also has issues on drm_hwcomposer initialization. SurfaceFlinger didn't crashes but no bootanimation. It seems just blocked.

If you want to test another driver in qemu, you can test Varad's patches in https://patchwork.freedesktop.org/series/29006/ for atomic updates in the Cirrus driver.

Quoted 8 lines

Regards,

Tomeu
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#11 lore raw
Quoted 78 lines · Tapani Pälli
Quoted 61 lines · Tomeu Vizoso
Quoted 53 lines · Daniel Vetter
Quoted 41 lines · Chih-Wei Huang

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 23 lines · Tomeu Vizoso
Quoted 21 lines · Chih-Wei Huang
Quoted 17 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 7 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 7 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 + gbm_grallc + drm_hwcomposer + mesa 17.1 on Android-x86 7.1.
Except virgl all others just failed as expected.

Quoted 7 lines

i915 (i965) was tested in Intel Broxton. It's the best result. SurfaceFlinger runs and bootanimation is shown. However, after boot complete it only shown systemui + navbar with black background. No app icons or mouse cursor in the desktop. I guess the composition of 3+ layers has some problems.

Quoted 4 lines

Could be a bug in either drm_hwcomposer making assumptions that don't hold, or i915 for implementing stuff wrongly. Would need someone to debug. Given that we have products shipping on bxt using atomic (CrOS) I'm leaining towards drm_hwcomposer making bad assumptions.

Quoted 7 lines

An easy way of making sure that the problem is with compositing with overlays is applying this hack:

https://git.collabora.com/cgit/user/tomeu/drm_hwcomposer.git/commit/?h=android-etnaviv&id=dbe21cb52f602eef11bf5ac083691e5b2b0a35ba

It should also allow you to move on and test more stuff.

back when Android-IA used drm_hwcomposer there were some fixes made before things started to work, this is a shot in the dark but following commits might fix something (disclaimer, this is based on some old snapshot of drm_hwcomposer but one might be able to port relevant changes ...)

Quoted 7 lines

handle cursor separately:

https://github.com/android-ia/external-drm_hwcomposer/commit/f9029ff42f7f925a2e34aad1caa1481f72f347ac

introduce own planner for IA:

https://github.com/android-ia/external-drm_hwcomposer/commit/e5f32f820a93352c631b379d9721795c783fc4e7

Both of these should be fixed in the generic code I'd say. Cursor is a perfect case of random special cases that might make some planes unsuable in certain conditions (but there's really nothing special with it being the cursor plane).

And the 2nd patch shows how we probably want to expose the can_scale and can_position stuff from the plane's atomic_check functions as hints to the compositor. Plus ofc the compositor should try to only use the supported drm_fourcc codes (if it indeed gets that wrong).

So yeah I'd say that's bugs in drm_hwcomposer, if this helps with fixing it. -Daniel

Quoted 18 lines
Quoted 17 lines
Quoted 3 lines
Quoted 3 lines

vmwgfx also has issues on drm_hwcomposer initialization. SurfaceFlinger didn't crashes but no bootanimation. It seems just blocked.

If you want to test another driver in qemu, you can test Varad's patches in https://patchwork.freedesktop.org/series/29006/ for atomic updates in the Cirrus driver.

Regards,

Tomeu
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

Signature · 7 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#12 lore raw
In reply to Daniel Vetter

2017-09-28 15:08 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 51 lines · Chih-Wei Huang
Quoted 31 lines

2017-09-26 13:26 GMT+08:00 Daniel Vetter <[email protected]>:

Quoted 16 lines · Tomeu Vizoso
Quoted 15 lines · Chih-Wei Huang
Quoted 13 lines

Hey Robert, thank you for the reply.

2017-09-22 23:43 GMT+08:00 Robert Foss <[email protected]>:

Quoted 5 lines

Hey Chih-Wei,
On Fri, 2017-09-22 at 10:40 +0800, Chih-Wei Huang wrote:

The android-ia project has supported using drm_hwcomposer and an alternative hwcomposer, so it would think there should be no issues.

By x86 GPUs, I meant i915(i965)/nouveau/radeon/amdgpu/virgl/vmwgfx. Among these only virgl works with the current drm_hwcomposer. All the others don't have a ready atomic mode-setting API to use it. That's the problem which should be addressed I meant.

Quoted 6 lines
Quoted 2 lines

Most if not all of those drivers support the atomic updates API in mainline (and have for a few releases by now).

amdgpu does not (but will once DC has landed, at least when you enable DC). Radeon doesn't, and likely never will. Nouveau is atomic only for nv50+.

Thank you for the clarification.

I have made test with kernel 4.13 +
gbm_grallc + drm_hwcomposer + mesa 17.1
on Android-x86 7.1.
Except virgl all others just failed as expected.

Quoted 7 lines

i915 (i965) was tested in Intel Broxton.
It's the best result. SurfaceFlinger runs and
bootanimation is shown. However, after boot
complete it only shown systemui + navbar with
black background. No app icons or mouse cursor
in the desktop. I guess the composition of 3+
layers has some problems.

Could be a bug in either drm_hwcomposer making assumptions that don't hold, or i915 for implementing stuff wrongly. Would need someone to debug. Given that we have products shipping on bxt using atomic (CrOS) I'm leaining towards drm_hwcomposer making bad assumptions.

Quoted 6 lines

nouveau is tested on GTX 1060.
drm_hwcomposer init failed so SurfaceFlinger crashed. Seems the driver is not atomic:

09-28 13:21:39.719 3096 3096 E hwc-drm-resources: Failed to set atomic cap -1

Quoted 7 lines
Quoted 3 lines

which comes from this line of drmresources.cpp:

ret = drmSetClientCap(fd(), DRM_CLIENT_CAP_ATOMIC, 1);

nouveau.atomic=1 or you won't get the atomic ioctl. Not sure why it's not enabled by default for nv50+. If it works, perhaps submit a patch to change the default?

Ah! Thank you for the hint.
By setting atomic=1 for nouveau it works.
But similar to i965 case, after boot complete it only shows systemui + navbar + black background Besides, it's quite unstable.
I tried to do something (move mouse, press some keys) then system_server crashes.

Log: https://drive.google.com/open?id=0B3GICgSwrKXcVTJfblY1NGllUXM

Quoted 12 lines
Quoted 11 lines

vmwgfx also has issues on drm_hwcomposer
initialization. SurfaceFlinger didn't crashes but
no bootanimation. It seems just blocked.

09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set active config d=1 ret=-19
09-28 04:46:09.043 3389 3389 E hwcomposer-drm: Failed to set initial config for d=1 ret=-19

09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to initialize display 1
09-28 04:46:09.043  3389  3389 E hwcomposer-drm: Failed to enumerate

displays: Unknown error -19

Quoted 2 lines

Sounds like the vmwgfx implementation of atomic is a big buggy. Bug filing for this would be good I think.

Will do. Thank you!

Signature · 7 lines
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel