Re: [PATCH] drm: Add helper macro for duplicating custom drm_*_state

2017-02-09 Thread Daniel Vetter
On Thu, Feb 09, 2017 at 03:41:42PM +, Mihail Atanassov wrote: > Assuming a derived struct of the form: > > struct foo_bar_state > { > struct drm_bar_state bar_state; > struct foo_private priv; > struct foo_private2 *priv2; > }; > > memcpy priv and priv2 to the new instance o

Re: [PATCH] drm: Add helper macro for duplicating custom drm_*_state

2017-02-09 Thread Daniel Vetter
On Thu, Feb 09, 2017 at 03:41:42PM +, Mihail Atanassov wrote: > Assuming a derived struct of the form: > > struct foo_bar_state > { > struct drm_bar_state bar_state; > struct foo_private priv; > struct foo_private2 *priv2; > }; > > memcpy priv and priv2 to the new instance o

[PATCH] drm: Add helper macro for duplicating custom drm_*_state

2017-02-09 Thread Mihail Atanassov
Assuming a derived struct of the form: struct foo_bar_state { struct drm_bar_state bar_state; struct foo_private priv; struct foo_private2 *priv2; }; memcpy priv and priv2 to the new instance of foo_bar_state. The intention is to use this macro in ->atomic_duplicate_state