[PATCH weston v7 3/3] drm: Don't hang onto the backend config object post-backend_init

Bryce Harrington bryce at osg.samsung.com
Wed May 11 01:19:54 UTC 2016


On Tue, May 10, 2016 at 03:33:59PM +0300, Pekka Paalanen wrote:
> On Fri, 29 Apr 2016 15:40:35 -0700
> Bryce Harrington <bryce at osg.samsung.com> wrote:
> 
> > The drm backend was copying most everything out of the config object
> > already, but now also copy the use_current_mode parameter and the
> > config_output function pointer, so that there are no remaining
> > references to the config object passed into backend_init().
> > 
> > By decoupling the config struct to the backend, if in the future if the
> > structure definition changes in non-backwards compatible ways, then any
> > version compatibility adaptation will be limited to just the
> > backend_init() routine.
> > 
> > With the use_current_mode moved into the main config class, the
> > drm_config wrapper is redundant.  Dropping it helps make the drm backend
> > config initialization more consistent with the other backends.
> > 
> > Also, enforce destruction of the backend config object after
> > initialization.  Since the backend config struct versioning implies that
> > there we expect potential future descrepancy between main's definition
> > of the config object and the backend's, don't allow the backend to hang
> > onto the config object outside the initialization scope.
> > 
> > Signed-off-by: Bryce Harrington <bryce at osg.samsung.com>
> > Reviewed-by: Pekka Paalanen <pekka.paalanen at collabora.co.uk>
> > 
> > ---
> > v6:
> >  - Drop use of drm_config config wrapper
> > v7:
> >  - Update to master
> >  - Put backend configs on stack instead of zalloc()
> >  - Enforce destruction of backend config object
> >    (Squashed patch as requested by pq)
> > 
> >  src/compositor-drm.c | 24 +++++++++++++++---------
> >  src/compositor-drm.h |  3 ++-
> >  src/main.c           | 46 ++++++++++++++++------------------------------
> >  3 files changed, 33 insertions(+), 40 deletions(-)
> 
> Hi,
> 
> I decided to do some cleaning up here, and squashed these two patches.
> It was getting annoying to review one patch and then see the follow-up
> in the same series void some of the earlier comments that would have
> caused a reject.
> 
> To put things short, pushed:
>    59987fa..1c0e40d  master -> master
> 
> I also wrote the commit message for this patch from scratch. I do not
> recall any of the conversion patches before this one to actually
> document *why* we are doing this. This and other changes you can find
> listed upstream. I thought I won't bother you with yet another round,
> but just fix what I thought was important at the moment and push it.
> 
> Let's deal with any comments and fallout in follow-ups.

Sounds good, it's nice to see this patch series finally get wrapped up,
and I agree there's plenty more work here for the future.

> Thank you Bryce for picking this up, and Benoit too.
> 
> 
> Thanks,
> pq

Bryce

> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2
> 
> iQIVAwUBVzHVNyNf5bQRqqqnAQi7BRAAl9cYXrOI+479pAQgxZg8POy+Hab+sOJH
> TK6Yd8viwAu/bsiHHlFYywmBFBVG1/JGp/eVmy92gFAADSMv1xANAhYQkPVxq2Yu
> qAjp9CVLQo1OEysB042BHYPCsgblFUF37gsu5I2B+z7aF5o1caVh7Qu47eE95gzp
> u0u62qf2TLYUz6kT0FmhL/Yh5vNoXIPn3nm/lP+B2LgY7kNKyAzQjKZRg/j5fReb
> XBAvGkOxhY/9ByEgEYjthfafp166Pv5GuoRsSOfSK8zgTSZV6jVkMBMIVmTFLD4S
> n7AUpzAu4xxYdKga6qYEwvtNtg7ZbujA411n+CuB8uq8W5SleTFxmQtsLnmGzagx
> wdkAmdV5yxRNtcOFnI1w9uIQRyaRX0yOVBlij7ezgJxZo22VJ2j1chdvo0Eb19zl
> O1OjEMCl6YbFyRf5AyS6cVIWjZKUirYGuRpb9MJWNKLH/WDFYiyVrljh7r7vNhCp
> 21HO+XOaTNLghPmMGuGs+0Iux81RktELMO3PQFJRw4uEjJGsTxD7hzUlrFMroeCT
> dOlCubc+z4XtGX8rL2x1OWsRNxvmbGrEmL1V2TzukMo+rHYoyskpZdPdgdYvuUV2
> knWFvTV8oAmQAEGeG6iPf1FeLNz0oJCUP5oyOjexLF+WbnRNLDvEITTGd4NbM8wj
> Bp1LEXkc2Zo=
> =RHBO
> -----END PGP SIGNATURE-----



More information about the wayland-devel mailing list