From: Daniel Vetter <daniel@ffwll.ch>
To: Alex Deucher <alexdeucher@gmail.com>
Cc: "Zach Reizner" <zachr@google.com>,
"Stéphane Marchesin" <marcheu@google.com>,
"Emil Velikov" <emil.l.velikov@gmail.com>,
dri-devel <dri-devel@lists.freedesktop.org>
Subject: Re: Atomic mode-setting drivers
Date: Thu, 24 Mar 2016 08:00:49 +0100 [thread overview]
Message-ID: <20160324070049.GE2510@phenom.ffwll.local> (raw)
In-Reply-To: <CADnq5_MRRLejGa7RwFR636_rSr+HeD5bRwwDnGTLuOtz-ga8ww@mail.gmail.com>
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
next prev parent reply other threads:[~2016-03-24 7:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[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 [this message]
2016-03-07 12:42 ` Chih-Wei Huang
2016-03-08 8:33 ` Daniel Vetter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160324070049.GE2510@phenom.ffwll.local \
--to=daniel@ffwll.ch \
--cc=alexdeucher@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=marcheu@google.com \
--cc=zachr@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox