* Re: Atomic mode-setting drivers
[not found] <CAKc24n1tSZwiE_5FEEvvKQqnvqJrwnmyJcgnTdvanta4n6Wg8Q@mail.gmail.com>
@ 2016-03-04 16:32 ` Daniel Vetter
2016-03-04 17:43 ` Rob Clark
` (2 more replies)
0 siblings, 3 replies; 8+ messages in thread
From: Daniel Vetter @ 2016-03-04 16:32 UTC (permalink / raw)
To: Chih-Wei Huang, dri-devel, Stéphane Marchesin, Sean Paul,
Zach Reizner
Adding relevant mailing lists and people. Please don't send private
mails to maintainers ;-)
On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
> Hi Daniel,
> This is the Android-x86 project.
> I'm looking for info about atomic mode-setting drivers
> and then found your presentation at
> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
>
> Especially page 16 talks about the Android support,
> exactly what I want.
>
> It said "no one has an open-source atomic hwc".
> Actually there is one in the AOSP 6.0 release:
>
> https://android.googlesource.com/platform/external/drm_hwcomposer
>
> It's developed by the Chromium team.
> An update repo is here:
> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
Yup, my presentation is already outdated - the latest one for LCA2016
mentions that hwc exists.
> Contributing instructions are here:
> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
>
> We are trying to enable the drm_hwcomposer for Android-x86.
> However, it requires atomic mode-setting drivers
> which seems are not ready in the vanilla kernel 4.4,
> the kernel we are using now.
>
> Unfortunately none of us is an expert of kernel drm drivres.
> Could you give me a brief status of the
> current atomic mode-setting drivers in vanilla kernel?
> What are still missing? fences? deadlock?
> More important, how much effort do we need
> to make them work with AOSP's drm_hwcomposer?
There's a pile of drivers, but for classic x86 desktop only i915.ko,
and that is still not yet enabled by default. i915.nuclear_pageflip=1
will give you experimental atomic support but not sure whether that's
good enough for hwcomposer.
Fences are being worked on in upstream kernel, but nothing to show
yet.. Otherwise I don't know what's all needed to make it, I haven't
had a chance to play around with it yet.
>
> More discussion about it can be found in
> our devel group:
> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
Please include that mailing list too, to make sure everyone is on board.
Thanks, Daniel
>
> Thank you!
>
> Best regards,
> --
> Chih-Wei
> Android-x86 project
> http://www.android-x86.org
--
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 16:32 ` Atomic mode-setting drivers Daniel Vetter
@ 2016-03-04 17:43 ` Rob Clark
2016-03-04 18:08 ` Emil Velikov
2016-03-07 12:42 ` Chih-Wei Huang
2 siblings, 0 replies; 8+ messages in thread
From: Rob Clark @ 2016-03-04 17:43 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Stéphane Marchesin, dri-devel, Zach Reizner
On Fri, Mar 4, 2016 at 11:32 AM, Daniel Vetter <daniel@ffwll.ch> wrote:
> Adding relevant mailing lists and people. Please don't send private
> mails to maintainers ;-)
>
> On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
>> Hi Daniel,
>> This is the Android-x86 project.
>> I'm looking for info about atomic mode-setting drivers
>> and then found your presentation at
>> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
>>
>> Especially page 16 talks about the Android support,
>> exactly what I want.
>>
>> It said "no one has an open-source atomic hwc".
>> Actually there is one in the AOSP 6.0 release:
>>
>> https://android.googlesource.com/platform/external/drm_hwcomposer
>>
>> It's developed by the Chromium team.
>> An update repo is here:
>> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
>
> Yup, my presentation is already outdated - the latest one for LCA2016
> mentions that hwc exists.
>
>> Contributing instructions are here:
>> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
>>
>> We are trying to enable the drm_hwcomposer for Android-x86.
>> However, it requires atomic mode-setting drivers
>> which seems are not ready in the vanilla kernel 4.4,
>> the kernel we are using now.
>>
>> Unfortunately none of us is an expert of kernel drm drivres.
>> Could you give me a brief status of the
>> current atomic mode-setting drivers in vanilla kernel?
>> What are still missing? fences? deadlock?
>> More important, how much effort do we need
>> to make them work with AOSP's drm_hwcomposer?
>
> There's a pile of drivers, but for classic x86 desktop only i915.ko,
> and that is still not yet enabled by default. i915.nuclear_pageflip=1
> will give you experimental atomic support but not sure whether that's
> good enough for hwcomposer.
Note that Rob Herring has been playing w/ the drm/atomic hwc (which
last I heard still uses userspace fences until they are supported in
kernel upstream). I believe he has been using qemu/qxl/virtgl as well
as msm (dragonboard 410c).
BR,
-R
> Fences are being worked on in upstream kernel, but nothing to show
> yet.. Otherwise I don't know what's all needed to make it, I haven't
> had a chance to play around with it yet.
>
>>
>> More discussion about it can be found in
>> our devel group:
>> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
>
> Please include that mailing list too, to make sure everyone is on board.
>
> Thanks, Daniel
>>
>> Thank you!
>>
>> Best regards,
>> --
>> Chih-Wei
>> Android-x86 project
>> http://www.android-x86.org
>
>
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> +41 (0) 79 365 57 48 - http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 16:32 ` Atomic mode-setting drivers Daniel Vetter
2016-03-04 17:43 ` Rob Clark
@ 2016-03-04 18:08 ` Emil Velikov
2016-03-04 21:59 ` Daniel Vetter
2016-03-07 12:42 ` Chih-Wei Huang
2 siblings, 1 reply; 8+ messages in thread
From: Emil Velikov @ 2016-03-04 18:08 UTC (permalink / raw)
To: Daniel Vetter; +Cc: Zach Reizner, Stéphane Marchesin, dri-devel
On 4 March 2016 at 16:32, Daniel Vetter <daniel@ffwll.ch> wrote:
> Adding relevant mailing lists and people. Please don't send private
> mails to maintainers ;-)
>
> On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
>> Hi Daniel,
>> This is the Android-x86 project.
>> I'm looking for info about atomic mode-setting drivers
>> and then found your presentation at
>> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
>>
>> Especially page 16 talks about the Android support,
>> exactly what I want.
>>
>> It said "no one has an open-source atomic hwc".
>> Actually there is one in the AOSP 6.0 release:
>>
>> https://android.googlesource.com/platform/external/drm_hwcomposer
>>
>> It's developed by the Chromium team.
>> An update repo is here:
>> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
>
> Yup, my presentation is already outdated - the latest one for LCA2016
> mentions that hwc exists.
>
>> Contributing instructions are here:
>> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
>>
>> We are trying to enable the drm_hwcomposer for Android-x86.
>> However, it requires atomic mode-setting drivers
>> which seems are not ready in the vanilla kernel 4.4,
>> the kernel we are using now.
>>
>> Unfortunately none of us is an expert of kernel drm drivres.
>> Could you give me a brief status of the
>> current atomic mode-setting drivers in vanilla kernel?
>> What are still missing? fences? deadlock?
>> More important, how much effort do we need
>> to make them work with AOSP's drm_hwcomposer?
>
> There's a pile of drivers, but for classic x86 desktop only i915.ko,
> and that is still not yet enabled by default. i915.nuclear_pageflip=1
> will give you experimental atomic support but not sure whether that's
> good enough for hwcomposer.
>
> Fences are being worked on in upstream kernel, but nothing to show
> yet.. Otherwise I don't know what's all needed to make it, I haven't
> had a chance to play around with it yet.
>
Let's not forget the new AMDGPU code that, according to the summary
[1], adds ATOMIC support for newer AMD hardware.
Chih-Wei, there might be an updated branch somewhere you can grab,
sadly I did not find any. Thus you might have to pick the patches off
the mailing list, unless we have a patchwork instance for it somewhere
?
>>
>> More discussion about it can be found in
>> our devel group:
>> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
>
> Please include that mailing list too, to make sure everyone is on board.
>
Not sure why, yet that mailing list is closed for public eyes. Last
time I checked one has to be invited to read or write to it :-(
Props to Chih-Wei I'm on it, although others are sure to get the short
end of the stick.
Regards,
Emil
[1] https://lists.freedesktop.org/archives/dri-devel/2016-February/100524.html
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 18:08 ` Emil Velikov
@ 2016-03-04 21:59 ` Daniel Vetter
2016-03-04 22:20 ` Alex Deucher
0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2016-03-04 21:59 UTC (permalink / raw)
To: Emil Velikov; +Cc: Stéphane Marchesin, dri-devel, Zach Reizner
On Fri, Mar 04, 2016 at 06:08:16PM +0000, Emil Velikov wrote:
> On 4 March 2016 at 16:32, Daniel Vetter <daniel@ffwll.ch> wrote:
> > Adding relevant mailing lists and people. Please don't send private
> > mails to maintainers ;-)
> >
> > On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
> >> Hi Daniel,
> >> This is the Android-x86 project.
> >> I'm looking for info about atomic mode-setting drivers
> >> and then found your presentation at
> >> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
> >>
> >> Especially page 16 talks about the Android support,
> >> exactly what I want.
> >>
> >> It said "no one has an open-source atomic hwc".
> >> Actually there is one in the AOSP 6.0 release:
> >>
> >> https://android.googlesource.com/platform/external/drm_hwcomposer
> >>
> >> It's developed by the Chromium team.
> >> An update repo is here:
> >> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
> >
> > Yup, my presentation is already outdated - the latest one for LCA2016
> > mentions that hwc exists.
> >
> >> Contributing instructions are here:
> >> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
> >>
> >> We are trying to enable the drm_hwcomposer for Android-x86.
> >> However, it requires atomic mode-setting drivers
> >> which seems are not ready in the vanilla kernel 4.4,
> >> the kernel we are using now.
> >>
> >> Unfortunately none of us is an expert of kernel drm drivres.
> >> Could you give me a brief status of the
> >> current atomic mode-setting drivers in vanilla kernel?
> >> What are still missing? fences? deadlock?
> >> More important, how much effort do we need
> >> to make them work with AOSP's drm_hwcomposer?
> >
> > There's a pile of drivers, but for classic x86 desktop only i915.ko,
> > and that is still not yet enabled by default. i915.nuclear_pageflip=1
> > will give you experimental atomic support but not sure whether that's
> > good enough for hwcomposer.
> >
> > Fences are being worked on in upstream kernel, but nothing to show
> > yet.. Otherwise I don't know what's all needed to make it, I haven't
> > had a chance to play around with it yet.
> >
> Let's not forget the new AMDGPU code that, according to the summary
> [1], adds ATOMIC support for newer AMD hardware.
>
> Chih-Wei, there might be an updated branch somewhere you can grab,
> sadly I did not find any. Thus you might have to pick the patches off
> the mailing list, unless we have a patchwork instance for it somewhere
> ?
amdgpu DAL rewrite isn't really atomic unfortunately. I can't tell you how
un-atomic it is since it's such a maze, but there's not much chance it is
useful as an atomic driver.
-Daniel
>
> >>
> >> More discussion about it can be found in
> >> our devel group:
> >> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
> >
> > Please include that mailing list too, to make sure everyone is on board.
> >
> Not sure why, yet that mailing list is closed for public eyes. Last
> time I checked one has to be invited to read or write to it :-(
> Props to Chih-Wei I'm on it, although others are sure to get the short
> end of the stick.
>
> Regards,
> Emil
>
> [1] https://lists.freedesktop.org/archives/dri-devel/2016-February/100524.html
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 21:59 ` Daniel Vetter
@ 2016-03-04 22:20 ` Alex Deucher
2016-03-24 7:00 ` Daniel Vetter
0 siblings, 1 reply; 8+ messages in thread
From: Alex Deucher @ 2016-03-04 22:20 UTC (permalink / raw)
To: Daniel Vetter
Cc: Zach Reizner, Stéphane Marchesin, Emil Velikov, dri-devel
On Fri, Mar 4, 2016 at 4:59 PM, Daniel Vetter <daniel@ffwll.ch> wrote:
> On Fri, Mar 04, 2016 at 06:08:16PM +0000, Emil Velikov wrote:
>> On 4 March 2016 at 16:32, Daniel Vetter <daniel@ffwll.ch> wrote:
>> > Adding relevant mailing lists and people. Please don't send private
>> > mails to maintainers ;-)
>> >
>> > On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
>> >> Hi Daniel,
>> >> This is the Android-x86 project.
>> >> I'm looking for info about atomic mode-setting drivers
>> >> and then found your presentation at
>> >> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
>> >>
>> >> Especially page 16 talks about the Android support,
>> >> exactly what I want.
>> >>
>> >> It said "no one has an open-source atomic hwc".
>> >> Actually there is one in the AOSP 6.0 release:
>> >>
>> >> https://android.googlesource.com/platform/external/drm_hwcomposer
>> >>
>> >> It's developed by the Chromium team.
>> >> An update repo is here:
>> >> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
>> >
>> > Yup, my presentation is already outdated - the latest one for LCA2016
>> > mentions that hwc exists.
>> >
>> >> Contributing instructions are here:
>> >> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
>> >>
>> >> We are trying to enable the drm_hwcomposer for Android-x86.
>> >> However, it requires atomic mode-setting drivers
>> >> which seems are not ready in the vanilla kernel 4.4,
>> >> the kernel we are using now.
>> >>
>> >> Unfortunately none of us is an expert of kernel drm drivres.
>> >> Could you give me a brief status of the
>> >> current atomic mode-setting drivers in vanilla kernel?
>> >> What are still missing? fences? deadlock?
>> >> More important, how much effort do we need
>> >> to make them work with AOSP's drm_hwcomposer?
>> >
>> > There's a pile of drivers, but for classic x86 desktop only i915.ko,
>> > and that is still not yet enabled by default. i915.nuclear_pageflip=1
>> > will give you experimental atomic support but not sure whether that's
>> > good enough for hwcomposer.
>> >
>> > Fences are being worked on in upstream kernel, but nothing to show
>> > yet.. Otherwise I don't know what's all needed to make it, I haven't
>> > had a chance to play around with it yet.
>> >
>> Let's not forget the new AMDGPU code that, according to the summary
>> [1], adds ATOMIC support for newer AMD hardware.
>>
>> Chih-Wei, there might be an updated branch somewhere you can grab,
>> sadly I did not find any. Thus you might have to pick the patches off
>> the mailing list, unless we have a patchwork instance for it somewhere
>> ?
>
> amdgpu DAL rewrite isn't really atomic unfortunately. I can't tell you how
> un-atomic it is since it's such a maze, but there's not much chance it is
> useful as an atomic driver.
Code complexities and internal abstractions aside, we've implemented
the API and tested it and it appears to work. What sort of additional
semantics does atomic imply that you don't think DAL would handle?
Alex
> -Daniel
>
>>
>> >>
>> >> More discussion about it can be found in
>> >> our devel group:
>> >> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
>> >
>> > Please include that mailing list too, to make sure everyone is on board.
>> >
>> Not sure why, yet that mailing list is closed for public eyes. Last
>> time I checked one has to be invited to read or write to it :-(
>> Props to Chih-Wei I'm on it, although others are sure to get the short
>> end of the stick.
>>
>> Regards,
>> Emil
>>
>> [1] https://lists.freedesktop.org/archives/dri-devel/2016-February/100524.html
>
> --
> Daniel Vetter
> Software Engineer, Intel Corporation
> http://blog.ffwll.ch
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 16:32 ` Atomic mode-setting drivers Daniel Vetter
2016-03-04 17:43 ` Rob Clark
2016-03-04 18:08 ` Emil Velikov
@ 2016-03-07 12:42 ` Chih-Wei Huang
2016-03-08 8:33 ` Daniel Vetter
2 siblings, 1 reply; 8+ messages in thread
From: Chih-Wei Huang @ 2016-03-07 12:42 UTC (permalink / raw)
To: Daniel Vetter
Cc: Zach Reizner, Stéphane Marchesin, Android-x86 development,
dri-devel
2016-03-05 0:32 GMT+08:00 Daniel Vetter <daniel@ffwll.ch>:
> Adding relevant mailing lists and people. Please don't send private
> mails to maintainers ;-)
Thank you for the reply and pointing it.
> On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
>> Hi Daniel,
>> This is the Android-x86 project.
>> I'm looking for info about atomic mode-setting drivers
>> and then found your presentation at
>> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
>>
>> Especially page 16 talks about the Android support,
>> exactly what I want.
>>
>> It said "no one has an open-source atomic hwc".
>> Actually there is one in the AOSP 6.0 release:
>>
>> https://android.googlesource.com/platform/external/drm_hwcomposer
>>
>> It's developed by the Chromium team.
>> An update repo is here:
>> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
>
> Yup, my presentation is already outdated - the latest one for LCA2016
> mentions that hwc exists.
Thanks! Do you have a link for it?
>> Contributing instructions are here:
>> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
>>
>> We are trying to enable the drm_hwcomposer for Android-x86.
>> However, it requires atomic mode-setting drivers
>> which seems are not ready in the vanilla kernel 4.4,
>> the kernel we are using now.
>>
>> Unfortunately none of us is an expert of kernel drm drivres.
>> Could you give me a brief status of the
>> current atomic mode-setting drivers in vanilla kernel?
>> What are still missing? fences? deadlock?
>> More important, how much effort do we need
>> to make them work with AOSP's drm_hwcomposer?
>
> There's a pile of drivers, but for classic x86 desktop only i915.ko,
> and that is still not yet enabled by default. i915.nuclear_pageflip=1
> will give you experimental atomic support but not sure whether that's
> good enough for hwcomposer.
Yes. I've tried i915.nuclear_pageflip=1
(before sent you the email)
The atomic call pass, but I got further errors:
02-25 17:37:28.320 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.320 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
02-25 17:37:28.323 1641 1641 E hwc-drm-resources: Could not find a
suitable encoder/crtc for display 3
02-25 17:37:28.323 1641 1641 E hwc-drm-resources: Failed
CreateDisplayPipe 47 with -19
02-25 17:37:28.323 1641 1641 E hwcomposer-drm: Can't initialize Drm object -19
Still black screen.
The other x86 drivers I've tried are radeon and vmwgfx.
Both seems don't support atomic mode-setting yet.
The only x86 GPU works with drm_hwcomposer
is virgl (with patches by Rob Herring).
> Fences are being worked on in upstream kernel, but nothing to show
> yet.. Otherwise I don't know what's all needed to make it, I haven't
> had a chance to play around with it yet.
>
>> More discussion about it can be found in
>> our devel group:
>> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
>
> Please include that mailing list too, to make sure everyone is on board.
Included. Thanks!
--
Chih-Wei
Android-x86 project
http://www.android-x86.org
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-07 12:42 ` Chih-Wei Huang
@ 2016-03-08 8:33 ` Daniel Vetter
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2016-03-08 8:33 UTC (permalink / raw)
To: Chih-Wei Huang
Cc: Stéphane Marchesin, Android-x86 development, dri-devel,
Zach Reizner
On Mon, Mar 07, 2016 at 08:42:10PM +0800, Chih-Wei Huang wrote:
> 2016-03-05 0:32 GMT+08:00 Daniel Vetter <daniel@ffwll.ch>:
> > Adding relevant mailing lists and people. Please don't send private
> > mails to maintainers ;-)
>
> Thank you for the reply and pointing it.
>
> > On Fri, Mar 4, 2016 at 1:47 PM, Chih-Wei Huang <cwhuang@android-x86.org> wrote:
> >> Hi Daniel,
> >> This is the Android-x86 project.
> >> I'm looking for info about atomic mode-setting drivers
> >> and then found your presentation at
> >> http://www.x.org/wiki/Events/XDC2015/Program/xdc-2015.pdf
> >>
> >> Especially page 16 talks about the Android support,
> >> exactly what I want.
> >>
> >> It said "no one has an open-source atomic hwc".
> >> Actually there is one in the AOSP 6.0 release:
> >>
> >> https://android.googlesource.com/platform/external/drm_hwcomposer
> >>
> >> It's developed by the Chromium team.
> >> An update repo is here:
> >> https://chromium.googlesource.com/chromiumos/drm_hwcomposer
> >
> > Yup, my presentation is already outdated - the latest one for LCA2016
> > mentions that hwc exists.
>
> Thanks! Do you have a link for it?
>
> >> Contributing instructions are here:
> >> https://sites.google.com/a/chromium.org/dev/contributing-to-drm_hwcomposer
> >>
> >> We are trying to enable the drm_hwcomposer for Android-x86.
> >> However, it requires atomic mode-setting drivers
> >> which seems are not ready in the vanilla kernel 4.4,
> >> the kernel we are using now.
> >>
> >> Unfortunately none of us is an expert of kernel drm drivres.
> >> Could you give me a brief status of the
> >> current atomic mode-setting drivers in vanilla kernel?
> >> What are still missing? fences? deadlock?
> >> More important, how much effort do we need
> >> to make them work with AOSP's drm_hwcomposer?
> >
> > There's a pile of drivers, but for classic x86 desktop only i915.ko,
> > and that is still not yet enabled by default. i915.nuclear_pageflip=1
> > will give you experimental atomic support but not sure whether that's
> > good enough for hwcomposer.
>
> Yes. I've tried i915.nuclear_pageflip=1
> (before sent you the email)
> The atomic call pass, but I got further errors:
>
> 02-25 17:37:28.320 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.320 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.321 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.322 1641 1641 I hwc-drm-plane: Could not get alpha property
> 02-25 17:37:28.323 1641 1641 E hwc-drm-resources: Could not find a
> suitable encoder/crtc for display 3
> 02-25 17:37:28.323 1641 1641 E hwc-drm-resources: Failed
> CreateDisplayPipe 47 with -19
> 02-25 17:37:28.323 1641 1641 E hwcomposer-drm: Can't initialize Drm object -19
>
> Still black screen.
>
> The other x86 drivers I've tried are radeon and vmwgfx.
> Both seems don't support atomic mode-setting yet.
>
> The only x86 GPU works with drm_hwcomposer
> is virgl (with patches by Rob Herring).
Sounds like trouble in hwcomposer, not in the i915 driver. I guess you
need to trace what makes hwc unhappy and then adjust the code to be more
flexible - not all hw supports e.g. alpha blending on all planes. Given
that hwc was written for some specific hw plane model (pretty much
universal hw planes with blending) and intel doesn't implement this (at
least on older platforms) there's some work needed.
-Daniel
>
> > Fences are being worked on in upstream kernel, but nothing to show
> > yet.. Otherwise I don't know what's all needed to make it, I haven't
> > had a chance to play around with it yet.
> >
> >> More discussion about it can be found in
> >> our devel group:
> >> https://groups.google.com/d/msg/android-x86-devel/RErWaXk3b7g/g_OSPGf4AwAJ
> >
> > Please include that mailing list too, to make sure everyone is on board.
>
> Included. Thanks!
>
> --
> Chih-Wei
> Android-x86 project
> http://www.android-x86.org
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Atomic mode-setting drivers
2016-03-04 22:20 ` Alex Deucher
@ 2016-03-24 7:00 ` Daniel Vetter
0 siblings, 0 replies; 8+ messages in thread
From: Daniel Vetter @ 2016-03-24 7:00 UTC (permalink / raw)
To: Alex Deucher
Cc: Zach Reizner, Stéphane Marchesin, Emil Velikov, dri-devel
On Fri, Mar 04, 2016 at 05:20:00PM -0500, Alex Deucher wrote:
> Code complexities and internal abstractions aside, we've implemented
> the API and tested it and it appears to work. What sort of additional
> semantics does atomic imply that you don't think DAL would handle?
Michel asked me to follow up here. I thought I've followed up on irc.
Anyway the big problem and reason why I didnt' fully dig into things are
that reading 100kloc for an atomic review when it's clear the code overall
needs some serious love is something I didn't want to do. I'm still up to
reading things once they look a bit more reasonable, and it's not
massively more work than all the other atomic drivers/conversions I looked
at.
So without looking again, with a few months of brain memory degradation:
- The glue looked fairly incomplete, e.g. it wasn't using all the
legacy2atomic helpers we have. Which likely means it wasn't really
tested much.
- Not universal planes, hence atomic plane updates not possible.
- It did roll it's own commit (which is how this is meant to be really in
the end), but I did not see the a clear reason, and it didn't seem to
have been closely modelled after atomic helpers. Not necessarily bad,
just increases chances that some of the semantics are wrong.
And the more fundamental thing, but the one I couldn't check because
abstraction:
- Doesn't seem to stage derived state needed to check limits (e.g. clocks,
memory bandwidth) in something subclassing drm_*_state structures.
Either that means you're rolling your own atomic machinery (no-go) or
you get it wrong (no-go). But since DAL completely forgoes drm
structures I didn't have a map to read the code and got lost.
- It looked liked DAL works with a try_commit()/rollback() model, but
atomic requires a check()/commit() model. And the check phase is not
allowed to change _any_ persistent state (whether sw or hw). That's why
atomic needs to stage everything that might change, and which might need
to be checked up-front in these free-standing state structures.
I think for me to be able to actually give you a clear answer here we'd
need 2 things:
- Handle all the list of cleanup tasks to get rid of reinvented code.
- Embed drm_* structs in corresponding DAL structs to really link concepts
together, and have some kind of map to be able to read the code. I think
only with that it's possible to have a clear idea whether DAL needs to
be redesigned to be able to implement atomic, or not.
Again: I din't look at the code, this is purely from memory.
Cheers, Daniel
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-03-24 7:00 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <CAKc24n1tSZwiE_5FEEvvKQqnvqJrwnmyJcgnTdvanta4n6Wg8Q@mail.gmail.com>
2016-03-04 16:32 ` Atomic mode-setting drivers Daniel Vetter
2016-03-04 17:43 ` Rob Clark
2016-03-04 18:08 ` Emil Velikov
2016-03-04 21:59 ` Daniel Vetter
2016-03-04 22:20 ` Alex Deucher
2016-03-24 7:00 ` Daniel Vetter
2016-03-07 12:42 ` Chih-Wei Huang
2016-03-08 8:33 ` Daniel Vetter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox